Gutenberg - Version 10.5.2

Version Description

Download this release

Release Info

Developer gutenbergplugin
Plugin Icon 128x128 Gutenberg
Version 10.5.2
Comparing to
See all releases

Code changes from version 10.5.1 to 10.5.2

build/block-editor/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => '03b49d2fb4f620da6199dad936b24233');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-wordcount'), 'version' => '12eefb0b7c1cddf0756e0971095c327b');
build/block-editor/index.js CHANGED
@@ -1,4 +1,4 @@
1
- window.wp=window.wp||{},window.wp.blockEditor=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=542)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},11:function(e,t){e.exports=window.wp.blocks},12:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},121:function(e,t,n){"use strict";t.__esModule=!0;var r=n(241);t.default=r.TextareaAutosize},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},135:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=c},14:function(e,t){e.exports=window.wp.compose},145:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(234)),c=r(n(235)),i=n(8),a=r(i),l=r(n(208)),s=r(n(237)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,O,g=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}return l(t,e),t}(g),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}l(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function y(e,t){v={fn:e,transform:t}}function k(e){O=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var S,B=function(){return Date.now()};function I(e){S=e}var x,P,T=function(e){return e.current};function N(e){x=e}var D=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:y,get colorNames(){return O},injectColorNames:k,get requestFrame(){return E},get cancelFrame(){return w},injectFrame:function(e,t){E=e,w=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return S},injectDefaultElement:I,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),A=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return l(t,e),t}(j),L=!1,R=new Set,M=function e(){if(!L)return!1;var t=B(),n=R,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,l=0;l<i.configs.length;l++){for(var s=i.configs[l],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],v=f.lastPosition,O=m instanceof g,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(O&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),y=0;y<j;++y)v+=1*(h+=(-s.tension*(v-m)+-s.friction*h)/s.mass*1/1e3)/1e3;var k=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,w=0===s.tension||Math.abs(m-v)<=s.precision;u=k||_&&w,f.lastVelocity=h,f.lastTime=t}O&&!s.toValues[b].done&&(u=!1),u?(f.value!==m&&(v=m),f.done=!0):a=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(R.delete(i),i.stop(!0))}return R.size?P?P():E(e):L=!1,L};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,l){var s=l?l(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r,s)}(e,c[t],c[t+1],o[t],o[t+1],l,i,a,r.map)}}var V=function(e){function t(n,r,o){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(r,o),c}l(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(h),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}l(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(g),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}l(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var l={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},a),s=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(l)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var a=o.delay,l=c(o,["delay"]),s=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){n===t.guid&&(d?t.runAsync(l,s):t.diff(l).start(s))}),a):d?t.runAsync(l,s):t.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,R.has(this)||R.add(this),L||(L=!0,E(P||M));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,R.has(this)&&R.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(u.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)l(s);else if(u.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,l=n.config,s=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,g=n.immediate;if(d){var h=[a,c];c=h[0],a=h[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var j=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},l=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!O[i],m=u.arr(i),h=!l&&!m&&!d,y=u.und(c[r])?i:c[r],k=l||m||d?i:1,E=p(s,r);j&&(k=j.animations[r].parent);var w,C=a.parent,S=a.interpolation,I=f(j?k.getPayload():k),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(C)&&a.animatedValues.some((function(e){return!e.done})),D=!u.equ(x,T),A=!u.equ(x,a.previous),L=!u.equ(E,a.config);if(v||A&&D||L){var R;if(l||d)C=S=a.parent||new H(y);else if(m)C=S=a.parent||new z(y);else if(h){var M=a.interpolation&&a.interpolation.calc(a.parent.value);M=void 0===M||v?y:M,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[M,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=C.interpolate(F)}return I=f(j?k.getPayload():k),w=f(C.getPayload()),v&&!h&&C.setValue(y,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&C.setValue(h?k:i,!1),o({},e,((R={})[r]=o({},a,{name:r,parent:C,interpolation:S,animatedValues:w,toValues:I,previous:x,config:E,fromValues:f(C.getValue()),immediate:p(g,r),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),R))}return D?e:(h&&(C.setValue(1,!1),S.updateConfig({output:[x,x]})),C.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:x}),P)))}),this.animations),this.hasChanged)for(var y in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[y]=this.animations[y].interpolation,this.values[y]=this.animations[y].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new U,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],l=c[1];r.current=a,i.useImperativeHandle(l,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),l||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):l||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,q=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=v.transform(t)),n.payload=t,n}return l(t,e),t}(j),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),i=le(o,r,e),a=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Oe=new RegExp("("+Object.keys(Q).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var ye={};N((function(e){return new X(e)})),I("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(Oe,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),k(Q),y((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),l="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in a){var f=l?b:ye[b]||(ye[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[b])}}),(function(e){return e}));var ke,_e,Ee=(ke=function(e){return i.forwardRef((function(t,n){var r=d(),l=i.useRef(!0),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){b.current&&!1===v.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(u.fun(r)?r(t):u.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ke(n),e}),ke)}),we=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=M,t.animated=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),c=p(t),a=i.useRef(),l=W(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=l[0],d=l[1],b=l[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,s=void 0!==l&&l,u=(a.unique,a.reset),b=void 0!==u&&u,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,O=a.onStart,g=a.ref,h=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),y=i.useRef(!1),k=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!y.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(k.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(k.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(k.current.instances).map((function(e){return e[1]}))}}})),k.current=function(e,t){for(var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,s=a.keys,u=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,O=void 0===v?0:v,g=a.unique,h=a.config,j=a.order,y=void 0===j?["enter","leave","update"]:j,k=$(r),_=k.keys,E=k.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),B=new Set(S),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return B.has(e)})),N=-O;y.length;)switch(y.shift()){case"enter":x.forEach((function(e,t){g&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=l[r],c=n&&void 0!==u?"initial":"enter";w[e]={slot:c,originalKey:e,key:g?String(e):K++,item:o,trail:N+=O,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=O,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=O,config:p(h,n,"update"),to:p(m,n)})}))}var D=s.map((function(e){return w[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:D,current:w,deleted:C,prevProps:t})}(k.current,r),k.current.changed&&k.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,l=e.item;k.current.instances.has(a)||k.current.instances.set(a,new U);var u=k.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:g,onRest:function(n){k.current.mounted&&(e.destroyed&&(g||s||Y(k,a),f&&f(l)),!Array.from(k.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&k.current.deleted.length>0&&Y(k),v&&v(l,t,n))},onStart:O&&function(){return O(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),k.current.paused||u.start()})),i.useEffect((function(){return k.current.mounted=y.current=!0,function(){k.current.mounted=y.current=!1,Array.from(k.current.instances).map((function(e){return e[1].destroy()})),k.current.instances.clear()}}),[]),k.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:k.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25),o=n(44),c=n(30);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.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.")}()}},153:function(e,t,n){"use strict";var r=n(5),o=n(13),c=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,a=void 0===n?24:n,l=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:a,height:a},l))}},154:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},158:function(e,t,n){"use strict";e.exports=n(238)},159:function(e,t){e.exports=window.wp.wordcount},16:function(e,t){e.exports=window.regeneratorRuntime},163:function(e,t){e.exports=window.wp.shortcode},168:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.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"}));t.a=c},17:function(e,t){e.exports=window.wp.keycodes},177:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},178:function(e,t,n){"use strict";var r=n(179);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},179:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},193:function(e,t){e.exports=window.wp.tokenList},2:function(e,t){e.exports=window.lodash},207:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},208:function(e,t,n){var r=n(236);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},21:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},224:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},234:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},235:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},236:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},237: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},e.exports.default=e.exports,e.exports.__esModule=!0},238:function(e,t,n){"use strict";var r=n(239);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,i=n.alignWithTop,a=n.alignWithLeft,l=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,O=void 0,g=void 0,h=void 0,j=void 0,y=void 0,k=void 0,_=void 0,E=void 0,w=void 0;b?(k=t,w=r.height(k),E=r.width(k),_={left:r.scrollLeft(k),top:r.scrollTop(k)},j={left:f.left-_.left-s,top:f.top-_.top-l},y={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+w)+u},h=_):(v=r.offset(t),O=t.clientHeight,g=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},y={left:f.left+m-(v.left+g+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+O+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||y.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+y.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+y.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+y.top)),o&&(j.left<0||y.left>0?!0===a?r.scrollLeft(t,h.left+j.left):!1===a?r.scrollLeft(t,h.left+y.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+y.left):c||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+y.left)))}},239:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function i(e){return c(e)}function a(e){return c(e,!0)}function l(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,c=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||c.clientLeft||0,top:r-=i.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=a(r),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function O(e,t,n){var r=0,o=void 0,c=void 0,i=void 0;for(c=0;c<t.length;c++)if(o=t[c])for(i=0;i<n.length;i++){var a;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function g(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(g(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=c?1:-1);var a=void 0!==o||c,l=o||i;if(-1===n)return a?l-O(e,["border","padding"],r):i;if(a){var s=2===n?-O(e,["border"],r):O(e,["margin"],r);return l+(1===n?0:s)}return i+O(e,m.slice(n),r)}f(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,c=r.documentElement[n];return"CSS1Compat"===r.compatMode&&c||o&&o[n]||c}}));var y={position:"absolute",visibility:"hidden",display:"block"};function k(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=j.apply(void 0,n):v(e,y,(function(){t=j.apply(void 0,n)})),t}function _(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["outer"+t]=function(t,n){return t&&k(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[e]=function(t,r){return void 0===r?t&&k(t,e,-1):t?(b(t),p(t)&&(r+=O(t,["padding","border"],n)),_(t,e,r)):void 0}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(e),r={},o=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o=parseFloat(_(e,c))||0,r[c]=o+t[c]-n[c]);_(e,r)}(e,t)},isWindow:g,each:f,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(g(e)){if(void 0===t)return i(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(g(e)){if(void 0===t)return a(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},24:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},240:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},241:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(8),l=n(37),s=n(242),u=n(243),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return a.createElement("textarea",c({},l,{onChange:this.onChange,style:u?c({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,c({},e,{innerRef:t}))}))},242:function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){var t=o.get(e);t&&t.destroy()}function a(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,a=function(){e.clientWidth!==r&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},243:function(e,t,n){var r=n(244);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,i=document.createElement(c);i.innerHTML="&nbsp;","TEXTAREA"===c.toUpperCase()&&i.setAttribute("rows","1");var a=r(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},244:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},245:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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=c},246:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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=c},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},26:function(e,t){e.exports=window.wp.richText},262:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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=c},28:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},281:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));t.a=c},282:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},283:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},284:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},285:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},286:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},287:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},29:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},31:function(e,t){e.exports=window.wp.url},32:function(e,t){e.exports=window.wp.hooks},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58);function o(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&&Object(r.a)(e,t)}},34:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(62),o=n.n(r),c=n(21);function i(e,t){return!t||"object"!==o()(t)&&"function"!=typeof t?Object(c.a)(e):t}},35:function(e,t){e.exports=window.wp.dom},356:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return o.diff(e,t,n)},t.characterDiff=void 0;var o=new(((r=n(408))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},357:function(e,t,n){"use strict";t.match=function(e,t){return l(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every((function(e){var n=e.feature,r=e.modifier,o=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=d(o),c=d(c);break;case"resolution":o=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=l;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],a=t[3]||"",l={};return l.inverse=!!n&&"not"===n.toLowerCase(),l.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(a)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},358:function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){l(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){a=!1},block:function(){p=!1}};if(!a)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}v();var O=t.call(m,m.node);return void 0!==O&&m.update&&m.update(O),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return s(i(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),s(i(r),(function(e){a[e]=n(r[e])})),e.pop(),t.pop(),a}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},37:function(e,t,n){e.exports=n(178)()},39:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},403:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},404:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},405:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},406:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},407:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},408:function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,a=0,l=0;c<i;c++){var s=t[c];if(s.removed){if(s.value=e.join(r.slice(l,l+s.count)),l+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(a,a+s.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=l+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1<l,v=f&&0<=p&&p<s;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=l&&p+1>=s)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,a=i-r,l=0;i+1<o&&a+1<c&&this.equals(t[i+1],n[a+1]);)i++,a++,l++;return l&&e.components.push({count:l}),e.newPos=i,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},409:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},41:function(e,t){e.exports=window.wp.deprecated},410:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"}));t.a=c},44:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},45:function(e,t){e.exports=window.wp.notices},46:function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function a(e){r(i,o,c,a,l,"next",e)}function l(e){r(i,o,c,a,l,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},47:function(e,t){e.exports=window.wp.keyboardShortcuts},49:function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!a(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(a(r.args,c,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,c)},c[0]=null,r.args=c,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=c),l=o?function(e){var t,o,c,a,l,s=n,u=!0;for(t=0;t<e.length;t++){if(!(l=o=e[t])||"object"!=typeof l){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((a=i()).isUniqueByDependants=u,s.set(r,a)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},5: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}))},50:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},53:function(e,t){e.exports=window.wp.blob},542:function(e,t,n){"use strict";n.r(t),n.d(t,"__experimentalGetColorClassesAndStyles",(function(){return ba})),n.d(t,"__experimentalUseColorProps",(function(){return fa})),n.d(t,"getColorClassName",(function(){return Po})),n.d(t,"getColorObjectByAttributeValues",(function(){return Io})),n.d(t,"getColorObjectByColorValue",(function(){return xo})),n.d(t,"createCustomColorsHOC",(function(){return Ca})),n.d(t,"withColors",(function(){return Sa})),n.d(t,"__experimentalUseColors",(function(){return Ga})),n.d(t,"__experimentalGetGradientClass",(function(){return No})),n.d(t,"getGradientValueBySlug",(function(){return Do})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Ao})),n.d(t,"getGradientSlugByValue",(function(){return Lo})),n.d(t,"__experimentalUseGradient",(function(){return Ro})),n.d(t,"getFontSize",(function(){return xi})),n.d(t,"getFontSizeClass",(function(){return Ti})),n.d(t,"getFontSizeObjectByValue",(function(){return Pi})),n.d(t,"FontSizePicker",(function(){return Ni})),n.d(t,"withFontSizes",(function(){return $a})),n.d(t,"AlignmentControl",(function(){return rl})),n.d(t,"AlignmentToolbar",(function(){return ol})),n.d(t,"Autocomplete",(function(){return kl})),n.d(t,"BlockAlignmentControl",(function(){return Yr})),n.d(t,"BlockAlignmentToolbar",(function(){return Xr})),n.d(t,"__experimentalBlockFullHeightAligmentControl",(function(){return El})),n.d(t,"__experimentalBlockAlignmentMatrixControl",(function(){return wl})),n.d(t,"BlockBreadcrumb",(function(){return Bl})),n.d(t,"BlockContextProvider",(function(){return Tl})),n.d(t,"BlockControls",(function(){return Br})),n.d(t,"BlockFormatControls",(function(){return Sr})),n.d(t,"BlockColorsStyleSelector",(function(){return Ll})),n.d(t,"BlockEdit",(function(){return Fl})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockIcon",(function(){return hl})),n.d(t,"BlockNavigationDropdown",(function(){return uf})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return Yb})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return Cf})),n.d(t,"__experimentalBlockNavigationTree",(function(){return af})),n.d(t,"__experimentalBlockVariationPicker",(function(){return Bf})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return Pf})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Hf})),n.d(t,"BlockVerticalAlignmentControl",(function(){return Vf})),n.d(t,"__experimentalBorderStyleControl",(function(){return cc})),n.d(t,"ButtonBlockerAppender",(function(){return qu})),n.d(t,"ColorPalette",(function(){return Wf})),n.d(t,"ColorPaletteControl",(function(){return Kf})),n.d(t,"ContrastChecker",(function(){return Cc})),n.d(t,"__experimentalGradientPicker",(function(){return Yf})),n.d(t,"__experimentalGradientPickerControl",(function(){return Xf})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Qf})),n.d(t,"__experimentalFontAppearanceControl",(function(){return vi})),n.d(t,"__experimentalFontFamilyControl",(function(){return _i})),n.d(t,"__experimentalColorGradientControl",(function(){return Ko})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return Ec})),n.d(t,"__experimentalImageSizeControl",(function(){return Jf})),n.d(t,"InnerBlocks",(function(){return bp})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return dp})),n.d(t,"InspectorAdvancedControls",(function(){return lo})),n.d(t,"InspectorControls",(function(){return po})),n.d(t,"JustifyToolbar",(function(){return jp})),n.d(t,"JustifyContentControl",(function(){return hp})),n.d(t,"__experimentalLinkControl",(function(){return Yp})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return zp})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return Pp})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return xp})),n.d(t,"LineHeightControl",(function(){return si})),n.d(t,"MediaReplaceFlow",(function(){return em})),n.d(t,"MediaPlaceholder",(function(){return im})),n.d(t,"MediaUpload",(function(){return Zp})),n.d(t,"MediaUploadCheck",(function(){return Jp})),n.d(t,"PanelColorSettings",(function(){return Ta})),n.d(t,"PlainText",(function(){return sm})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return dm})),n.d(t,"RichText",(function(){return wf})),n.d(t,"RichTextShortcut",(function(){return bm})),n.d(t,"RichTextToolbarButton",(function(){return fm})),n.d(t,"__unstableRichTextInputEvent",(function(){return pm})),n.d(t,"ToolSelector",(function(){return vm})),n.d(t,"__experimentalUnitControl",(function(){return Gi})),n.d(t,"URLInput",(function(){return Sp})),n.d(t,"URLInputButton",(function(){return hm})),n.d(t,"URLPopover",(function(){return om})),n.d(t,"__experimentalImageURLInputUI",(function(){return _m})),n.d(t,"withColorContext",(function(){return Uf})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Jd})),n.d(t,"__experimentalInserterMenuExtension",(function(){return Du})),n.d(t,"__experimentalPreviewOptions",(function(){return wm})),n.d(t,"__experimentalUseResizeCanvas",(function(){return Tm})),n.d(t,"BlockInspector",(function(){return Fm})),n.d(t,"BlockList",(function(){return kb})),n.d(t,"useBlockProps",(function(){return Nb})),n.d(t,"__experimentalBlock",(function(){return Gm})),n.d(t,"__experimentalLayoutStyle",(function(){return Vr})),n.d(t,"BlockMover",(function(){return ld})),n.d(t,"BlockPreview",(function(){return Js})),n.d(t,"BlockSelectionClearer",(function(){return Wm})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return Um})),n.d(t,"BlockSettingsMenu",(function(){return db})),n.d(t,"BlockSettingsMenuControls",(function(){return ab})),n.d(t,"BlockTitle",(function(){return Sl})),n.d(t,"BlockToolbar",(function(){return bb})),n.d(t,"CopyHandler",(function(){return Kd})),n.d(t,"__unstableUseClipboardHandler",(function(){return Wd})),n.d(t,"DefaultBlockAppender",(function(){return Ku})),n.d(t,"__unstableEditorStyles",(function(){return vv})),n.d(t,"Inserter",(function(){return Wu})),n.d(t,"__experimentalLibrary",(function(){return Ov})),n.d(t,"__experimentalSearchForm",(function(){return Ws})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return hv})),n.d(t,"MultiSelectScrollIntoView",(function(){return jv})),n.d(t,"NavigableToolbar",(function(){return ad})),n.d(t,"ObserveTyping",(function(){return Ev})),n.d(t,"__unstableUseTypingObserver",(function(){return _v})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return kv})),n.d(t,"PreserveScrollInReorder",(function(){return wv})),n.d(t,"SkipToSelectedBlock",(function(){return Nm})),n.d(t,"Typewriter",(function(){return Iv})),n.d(t,"__unstableUseTypewriter",(function(){return Bv})),n.d(t,"Warning",(function(){return ss})),n.d(t,"WritingFlow",(function(){return Ls})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return Pv})),n.d(t,"useBlockDisplayInformation",(function(){return Cl})),n.d(t,"__unstableIframe",(function(){return Dv})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return Mv})),n.d(t,"BlockEditorProvider",(function(){return Ys})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return Pm})),n.d(t,"__experimentalUseEditorFeature",(function(){return wo})),n.d(t,"transformStyles",(function(){return pv})),n.d(t,"validateThemeColors",(function(){return Fv})),n.d(t,"validateThemeGradients",(function(){return Vv})),n.d(t,"__experimentalGetMatchingVariation",(function(){return If})),n.d(t,"storeConfig",(function(){return jr})),n.d(t,"store",(function(){return yr})),n.d(t,"SETTINGS_DEFAULTS",(function(){return E}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return Y})),n.d(r,"isBlockValid",(function(){return X})),n.d(r,"getBlockAttributes",(function(){return Q})),n.d(r,"getBlock",(function(){return Z})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return J})),n.d(r,"getBlocks",(function(){return ee})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return te})),n.d(r,"__unstableGetBlockTree",(function(){return ne})),n.d(r,"__unstableGetClientIdWithClientIdsTree",(function(){return re})),n.d(r,"__unstableGetClientIdsTree",(function(){return oe})),n.d(r,"getClientIdsOfDescendants",(function(){return ce})),n.d(r,"getClientIdsWithDescendants",(function(){return ie})),n.d(r,"getGlobalBlockCount",(function(){return ae})),n.d(r,"getBlocksByClientId",(function(){return le})),n.d(r,"getBlockCount",(function(){return se})),n.d(r,"getSelectionStart",(function(){return ue})),n.d(r,"getSelectionEnd",(function(){return de})),n.d(r,"getBlockSelectionStart",(function(){return be})),n.d(r,"getBlockSelectionEnd",(function(){return fe})),n.d(r,"getSelectedBlockCount",(function(){return pe})),n.d(r,"hasSelectedBlock",(function(){return me})),n.d(r,"getSelectedBlockClientId",(function(){return ve})),n.d(r,"getSelectedBlock",(function(){return Oe})),n.d(r,"getBlockRootClientId",(function(){return ge})),n.d(r,"getBlockParents",(function(){return he})),n.d(r,"getBlockParentsByBlockName",(function(){return je})),n.d(r,"getBlockHierarchyRootClientId",(function(){return ye})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return ke})),n.d(r,"getAdjacentBlockClientId",(function(){return _e})),n.d(r,"getPreviousBlockClientId",(function(){return Ee})),n.d(r,"getNextBlockClientId",(function(){return we})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return Ce})),n.d(r,"getSelectedBlockClientIds",(function(){return Se})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return Be})),n.d(r,"getMultiSelectedBlocks",(function(){return Ie})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return xe})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return Pe})),n.d(r,"isFirstMultiSelectedBlock",(function(){return Te})),n.d(r,"isBlockMultiSelected",(function(){return Ne})),n.d(r,"isAncestorMultiSelected",(function(){return De})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return Ae})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return Le})),n.d(r,"getBlockOrder",(function(){return Re})),n.d(r,"getBlockIndex",(function(){return Me})),n.d(r,"isBlockSelected",(function(){return Fe})),n.d(r,"hasSelectedInnerBlock",(function(){return Ve})),n.d(r,"isBlockWithinSelection",(function(){return He})),n.d(r,"hasMultiSelection",(function(){return ze})),n.d(r,"isMultiSelecting",(function(){return Ge})),n.d(r,"isSelectionEnabled",(function(){return Ue})),n.d(r,"getBlockMode",(function(){return We})),n.d(r,"isTyping",(function(){return Ke})),n.d(r,"isDraggingBlocks",(function(){return qe})),n.d(r,"getDraggedBlockClientIds",(function(){return $e})),n.d(r,"isBlockBeingDragged",(function(){return Ye})),n.d(r,"isAncestorBeingDragged",(function(){return Xe})),n.d(r,"isCaretWithinFormattedText",(function(){return Qe})),n.d(r,"getBlockInsertionPoint",(function(){return Ze})),n.d(r,"isBlockInsertionPointVisible",(function(){return Je})),n.d(r,"isValidTemplate",(function(){return et})),n.d(r,"getTemplate",(function(){return tt})),n.d(r,"getTemplateLock",(function(){return nt})),n.d(r,"canInsertBlockType",(function(){return ot})),n.d(r,"canInsertBlocks",(function(){return ct})),n.d(r,"getInserterItems",(function(){return dt})),n.d(r,"getBlockTransformItems",(function(){return bt})),n.d(r,"hasInserterItems",(function(){return ft})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return pt})),n.d(r,"__experimentalGetParsedPattern",(function(){return mt})),n.d(r,"__experimentalGetAllowedPatterns",(function(){return vt})),n.d(r,"__experimentalGetPatternsByBlockTypes",(function(){return Ot})),n.d(r,"__experimentalGetPatternTransformItems",(function(){return gt})),n.d(r,"getBlockListSettings",(function(){return ht})),n.d(r,"getSettings",(function(){return jt})),n.d(r,"isLastBlockChangePersistent",(function(){return yt})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return kt})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return _t})),n.d(r,"__experimentalGetReusableBlockTitle",(function(){return Et})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return wt})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return Ct})),n.d(r,"isNavigationMode",(function(){return Bt})),n.d(r,"hasBlockMovingClientId",(function(){return It})),n.d(r,"didAutomaticChange",(function(){return xt})),n.d(r,"isBlockHighlighted",(function(){return Pt})),n.d(r,"areInnerBlocksControlled",(function(){return Tt})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Nt})),n.d(r,"wasBlockJustInserted",(function(){return Dt}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return pn})),n.d(o,"validateBlocksToTemplate",(function(){return mn})),n.d(o,"resetSelection",(function(){return vn})),n.d(o,"receiveBlocks",(function(){return On})),n.d(o,"updateBlockAttributes",(function(){return gn})),n.d(o,"updateBlock",(function(){return hn})),n.d(o,"selectBlock",(function(){return jn})),n.d(o,"selectPreviousBlock",(function(){return yn})),n.d(o,"selectNextBlock",(function(){return kn})),n.d(o,"startMultiSelect",(function(){return En})),n.d(o,"stopMultiSelect",(function(){return wn})),n.d(o,"multiSelect",(function(){return Cn})),n.d(o,"clearSelectedBlock",(function(){return Sn})),n.d(o,"toggleSelection",(function(){return Bn})),n.d(o,"replaceBlocks",(function(){return xn})),n.d(o,"replaceBlock",(function(){return Pn})),n.d(o,"moveBlocksDown",(function(){return Nn})),n.d(o,"moveBlocksUp",(function(){return Dn})),n.d(o,"moveBlocksToPosition",(function(){return An})),n.d(o,"moveBlockToPosition",(function(){return Ln})),n.d(o,"insertBlock",(function(){return Rn})),n.d(o,"insertBlocks",(function(){return Mn})),n.d(o,"__unstableSetInsertionPoint",(function(){return Fn})),n.d(o,"showInsertionPoint",(function(){return Vn})),n.d(o,"hideInsertionPoint",(function(){return Hn})),n.d(o,"setTemplateValidity",(function(){return zn})),n.d(o,"synchronizeTemplate",(function(){return Gn})),n.d(o,"mergeBlocks",(function(){return Un})),n.d(o,"removeBlocks",(function(){return Wn})),n.d(o,"removeBlock",(function(){return Kn})),n.d(o,"replaceInnerBlocks",(function(){return qn})),n.d(o,"toggleBlockMode",(function(){return $n})),n.d(o,"startTyping",(function(){return Yn})),n.d(o,"stopTyping",(function(){return Xn})),n.d(o,"startDraggingBlocks",(function(){return Qn})),n.d(o,"stopDraggingBlocks",(function(){return Zn})),n.d(o,"enterFormattedText",(function(){return Jn})),n.d(o,"exitFormattedText",(function(){return er})),n.d(o,"selectionChange",(function(){return tr})),n.d(o,"insertDefaultBlock",(function(){return nr})),n.d(o,"updateBlockListSettings",(function(){return rr})),n.d(o,"updateSettings",(function(){return or})),n.d(o,"__unstableSaveReusableBlock",(function(){return cr})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return ir})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return ar})),n.d(o,"__unstableMarkAutomaticChange",(function(){return lr})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return sr})),n.d(o,"setNavigationMode",(function(){return ur})),n.d(o,"setBlockMovingClientId",(function(){return dr})),n.d(o,"duplicateBlocks",(function(){return br})),n.d(o,"insertBeforeBlock",(function(){return fr})),n.d(o,"insertAfterBlock",(function(){return pr})),n.d(o,"toggleBlockHighlight",(function(){return mr})),n.d(o,"flashBlock",(function(){return vr})),n.d(o,"setHasControlledInnerBlocks",(function(){return Or}));var c=n(26),i=n(10),a=n(5),l=n(0),s=n(12),u=n.n(s),d=n(2),b=n(14),f=n(32),p=n(11),m=n(3),v=n(4),O=Object(l.createContext)({name:"",isSelected:!1,clientId:null}),g=O.Provider;function h(){return Object(l.useContext)(O)}var j=n(13),y=n(15),k=n(1),_={insertUsage:{}},E={alignWide:!1,supportsLayout:!0,colors:[{name:Object(k.__)("Black"),slug:"black",color:"#000000"},{name:Object(k.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(k.__)("White"),slug:"white",color:"#ffffff"},{name:Object(k.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(k.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(k.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(k.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(k.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(k.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(k.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(k.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(k.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(k._x)("Small","font size name"),size:13,slug:"small"},{name:Object(k._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(k._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(k._x)("Large","font size name"),size:36,slug:"large"},{name:Object(k._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:Object(k.__)("Thumbnail")},{slug:"medium",name:Object(k.__)("Medium")},{slug:"large",name:Object(k.__)("Large")},{slug:"full",name:Object(k.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(k.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(k.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(k.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(k.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(k.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(k.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(k.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(k.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(k.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(k.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(k.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(k.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function w(e,t,n){return[].concat(Object(y.a)(e.slice(0,n)),Object(y.a)(Object(d.castArray)(t)),Object(y.a)(e.slice(n)))}function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(y.a)(e);return o.splice(t,r),w(o,e.slice(t,t+r),n)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(a.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,I(o,r))})),n}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(a.a)({},n.clientId,t),x(n.innerBlocks,n.clientId))}),{})}function P(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(y.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(j.a)(o,["innerBlocks"]);r.push.apply(r,Object(y.a)(c)),n[i.clientId]=t(i)}return n}function T(e){return P(e,(function(e){return Object(d.omit)(e,"attributes")}))}function N(e){return P(e,(function(e){return e.attributes}))}function D(e,t){return e===t?B({},e):t}function A(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(d.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(d.isEqual)(Object(d.keys)(n),Object(d.keys)(r)));var n,r}var L=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},R=Object(d.flow)(v.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=B({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?B(B({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(d.mapValues)(P(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(P(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=B(B({},r.cache),L(o(c)));break;case"UPDATE_BLOCK":r.cache=B(B({},r.cache),L(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=B(B({},r.cache),L(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=L(o(n.replacedClientIds));r.cache=B(B(B({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),L(Object(d.keys)(P(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=B(B({},Object(d.omit)(r.cache,n.removedClientIds)),L(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(y.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=B(B({},r.cache),L(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=B(B({},r.cache),L(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=B(B({},r.cache),L(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(y.a)(r)),(c=r).push.apply(c,Object(y.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=B(B({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=B(B({},n),{},{type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var r={};if(Object.keys(t.controlledInnerBlocks).length)for(var o=Object(y.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(j.a)(c,["innerBlocks"]);o.push.apply(o,Object(y.a)(i)),t.controlledInnerBlocks[a.clientId]&&(r[a.clientId]=!0)}var l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var s=l;return n.blocks.length&&((s=e(s,B(B({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=B(B({},s.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(d.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(y.a)(n),[o],Object(y.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return B(B({},t),{},{byClientId:B(B({},Object(d.omit)(t.byClientId,r)),T(n.blocks)),attributes:B(B({},Object(d.omit)(t.attributes,r)),N(n.blocks)),order:B(B({},Object(d.omit)(t.order,r)),Object(d.omit)(I(n.blocks),o)),parents:B(B({},Object(d.omit)(t.parents,r)),x(n.blocks)),cache:B(B({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(P(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var l=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===l?r:B(B({},c),{},{isPersistentChange:l})}return c=B(B({},c),{},{isPersistentChange:i?!n:!A(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return T(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return B(B({},e),T(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(d.omit)(t.updates,"attributes");return Object(d.isEmpty)(n)?e:B(B({},e),{},Object(a.a)({},t.clientId,B(B({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?B(B({},Object(d.omit)(e,t.replacedClientIds)),T(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return N(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return B(B({},e),N(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?B(B({},e),{},Object(a.a)({},t.clientId,B(B({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return B(B({},n),{},Object(a.a)({},r,Object(d.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,(function(t,n,o){return n!==t[o]&&((t=D(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:B(B({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?B(B({},Object(d.omit)(e,t.replacedClientIds)),N(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return I(t.blocks);case"RECEIVE_BLOCKS":return B(B({},e),Object(d.omit)(I(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=I(t.blocks,r),i=t.index,l=void 0===i?o.length:i;return B(B(B({},e),c),{},Object(a.a)({},r,w(o,c[r],l)));case"MOVE_BLOCKS_TO_POSITION":var s,u=t.fromRootClientId,b=void 0===u?"":u,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,O=void 0===v?e[p].length:v;if(b===p){var g=e[p],h=g.indexOf(m[0]);return B(B({},e),{},Object(a.a)({},p,C(e[p],h,O,m.length)))}return B(B({},e),{},(s={},Object(a.a)(s,b,d.without.apply(void 0,[e[b]].concat(Object(y.a)(m)))),Object(a.a)(s,p,w(e[p],m,O)),s));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,_=void 0===k?"":k,E=Object(d.first)(j),S=e[_];if(!S.length||E===Object(d.first)(S))return e;var x=S.indexOf(E);return B(B({},e),{},Object(a.a)({},_,C(S,x,x-1,j.length)));case"MOVE_BLOCKS_DOWN":var P=t.clientIds,T=t.rootClientId,N=void 0===T?"":T,D=Object(d.first)(P),A=Object(d.last)(P),L=e[N];if(!L.length||A===Object(d.last)(L))return e;var R=L.indexOf(D);return B(B({},e),{},Object(a.a)({},N,C(L,R,R+1,P.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var M=t.clientIds;if(!t.blocks)return e;var F=I(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return B(B({},e),Object(d.omit)(F,""))},function(e){return Object(d.mapValues)(e,(function(e){return Object(d.reduce)(e,(function(e,t){return t===M[0]?[].concat(Object(y.a)(e),Object(y.a)(F[""])):(-1===M.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.flow)([function(e){return Object(d.omit)(e,t.removedClientIds)},function(e){return Object(d.mapValues)(e,(function(e){return d.without.apply(void 0,[e].concat(Object(y.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return x(t.blocks);case"RECEIVE_BLOCKS":return B(B({},e),x(t.blocks));case"INSERT_BLOCKS":return B(B({},e),x(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return B(B({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return B(B({},Object(d.omit)(e,t.replacedClientIds)),x(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?B(B({},e),{},Object(a.a)({},r,o)):e}});function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];return r?r.clientId===e.clientId?e:{clientId:r.clientId}:{}}return e}function F(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"SELECTION_CHANGE":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var V=Object(v.combineReducers)({blocks:R,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}};case"RESET_SELECTION":var o=r.selectionStart,c=r.selectionEnd;return{selectionStart:o,selectionEnd:c};case"MULTI_SELECT":var i=r.start,a=r.end;return{selectionStart:{clientId:i},selectionEnd:{clientId:a}};case"RESET_BLOCKS":var l=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,s=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!l&&!s)return n;if(!r.blocks.some((function(e){return e.clientId===l})))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((function(e){return e.clientId===s})))return B(B({},n),{},{selectionEnd:n.selectionStart})}return{selectionStart:M(n.selectionStart,r),selectionEnd:M(n.selectionEnd,r)}},isMultiSelecting:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return B(B({},e),{},Object(a.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(d.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(d.isEqual)(e[n],t.settings)?e:B(B({},e),{},Object(a.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(d.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return F(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return F(e,t,!1)},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return B(B({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return B(B({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((function(e,n){var r=n.attributes,o=n.name,c=Object(p.getBlockVariations)(o),i=null==c?void 0:c.find((function(e){var t;return null===(t=e.isActive)||void 0===t?void 0:t.call(e,r,e.attributes)})),l=null!=i&&i.name?"".concat(o,"/").concat(i.name):o,s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),B(B({},e),{},{insertUsage:B(B({},e.insertUsage),{},Object(a.a)({},l,{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(a.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return B(B({},e),{},Object(a.a)({},n,t.uniqueByBlock?t.attributes[n]:t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":if(!n.blocks.length)return t;var r=n.blocks[0].clientId,o=null===(e=n.meta)||void 0===e?void 0:e.source;return{clientId:r,source:o};case"RESET_BLOCKS":return{}}return t}}),H=n(63),z=n(49);function G(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return U(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var q=Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(m.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(l.createElement)(m.G,null,Object(l.createElement)(m.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),$=[];function Y(e,t){var n=e.blocks.byClientId[t];if("web"!==l.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){var r=e.blocks.attributes[t].service;return r?"".concat("core/social-link","-").concat(r):"core/social-link"}return n?n.name:null}function X(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Q(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var Z=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t),innerBlocks:Tt(e,t)?$:ee(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),J=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),ee=Object(z.a)((function(e,t){return Object(d.map)(Re(e,t),(function(t){return Z(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),te=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t),innerBlocks:ne(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),ne=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(Re(e,t),(function(t){return te(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),re=Object(z.a)((function(e,t){return{clientId:t,innerBlocks:oe(e,t)}}),(function(e){return[e.blocks.order]})),oe=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(Re(e,t),(function(t){return re(e,t)}))}),(function(e){return[e.blocks.order]})),ce=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=Re(t,n);return[].concat(Object(y.a)(r),Object(y.a)(e(t,r)))}))},ie=Object(z.a)((function(e){var t=Re(e);return[].concat(Object(y.a)(t),Object(y.a)(ce(e,t)))}),(function(e){return[e.blocks.order]})),ae=Object(z.a)((function(e,t){var n=ie(e);return t?Object(d.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),le=Object(z.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return Z(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function se(e,t){return Re(e,t).length}function ue(e){return e.selection.selectionStart}function de(e){return e.selection.selectionEnd}function be(e){return e.selection.selectionStart.clientId}function fe(e){return e.selection.selectionEnd.clientId}function pe(e){return Be(e).length||(e.selection.selectionStart.clientId?1:0)}function me(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return!!n.clientId&&n.clientId===r.clientId}function ve(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd,o=n.clientId;return o&&o===r.clientId?o:null}function Oe(e){var t=ve(e);return t?Z(e,t):null}function ge(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var he=Object(z.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),je=Object(z.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=he(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:Y(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function ye(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function ke(e,t){for(var n,r=ve(e),o=[].concat(Object(y.a)(he(e,t)),[t]),c=[].concat(Object(y.a)(he(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a<i&&o[a]===c[a];a++)n=o[a];return n}function _e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ve(e)),void 0===t&&(t=n<0?xe(e):Pe(e)),!t)return null;var r=ge(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),a=i+1*n;return a<0||a===c.length?null:c[a]}function Ee(e,t){return _e(e,t,-1)}function we(e,t){return _e(e,t,1)}function Ce(e){return e.initialPosition}var Se=Object(z.a)((function(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;if(void 0===n.clientId||void 0===r.clientId)return $;if(n.clientId===r.clientId)return[n.clientId];var o=ge(e,n.clientId);if(null===o)return $;var c=Re(e,o),i=c.indexOf(n.clientId),a=c.indexOf(r.clientId);return i>a?c.slice(a,i+1):c.slice(i,a+1)}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Be(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?$:Se(e)}var Ie=Object(z.a)((function(e){var t=Be(e);return t.length?t.map((function(t){return Z(e,t)})):$}),(function(e){return[].concat(Object(y.a)(Se.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function xe(e){return Object(d.first)(Be(e))||null}function Pe(e){return Object(d.last)(Be(e))||null}function Te(e,t){return xe(e)===t}function Ne(e,t){return-1!==Be(e).indexOf(t)}var De=Object(z.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Ne(e,n=ge(e,n));return r}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Ae(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:n.clientId||null}function Le(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:r.clientId||null}function Re(e,t){return e.blocks.order[t||""]||$}function Me(e,t,n){return Re(e,n).indexOf(t)}function Fe(e,t){var n=e.selection,r=n.selectionStart,o=n.selectionEnd;return r.clientId===o.clientId&&r.clientId===t}function Ve(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(Re(e,t),(function(t){return Fe(e,t)||Ne(e,t)||n&&Ve(e,t,n)}))}function He(e,t){if(!t)return!1;var n=Be(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function ze(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId!==r.clientId}function Ge(e){return e.isMultiSelecting}function Ue(e){return e.isSelectionEnabled}function We(e,t){return e.blocksMode[t]||"visual"}function Ke(e){return e.isTyping}function qe(e){return!!e.draggedBlocks.length}function $e(e){return e.draggedBlocks}function Ye(e,t){return e.draggedBlocks.includes(t)}function Xe(e,t){if(!qe(e))return!1;var n=he(e,t);return Object(d.some)(n,(function(t){return Ye(e,t)}))}function Qe(e){return e.isCaretWithinFormattedText}function Ze(e){var t,n,r=e.insertionPoint,o=e.selection.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=ge(e,c)||void 0,n=Me(e,o.clientId,t)+1):n=Re(e).length,{rootClientId:t,index:n}}function Je(e){return e.insertionPointVisibility}function et(e){return e.template.isValid}function tt(e){return e.settings.template}function nt(e,t){if(!t)return e.settings.templateLock;var n=ht(e,t);return n?n.templateLock:null}var rt=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n};if(t&&"object"===Object(H.a)(t)?t=(n=t).name:n=Object(p.getBlockType)(t),!n)return!1;var c=jt(e),i=c.allowedBlockTypes,a=o(i,t,!0);if(!a)return!1;var l=!!nt(e,r);if(l)return!1;var s=ht(e,r);if(r&&void 0===s)return!1;var u=null==s?void 0:s.allowedBlocks,b=o(u,t),f=n.parent,m=Y(e,r),v=o(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},ot=Object(z.a)(rt,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function ct(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return ot(e,Y(e,t),n)}))}function it(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}var at=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&rt(e,t.name,n)},lt=function(e,t){return function(n){var r="".concat(t.id,"/").concat(n.name),o=it(e,r)||{},c=o.time,i=o.count,a=void 0===i?0:i;return K(K({},t),{},{id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:K(K({},t.initialAttributes),n.attributes),innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:st(c,a)})}},st=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},ut=function(e,t){var n=t.buildScope,r=void 0===n?"inserter":n;return function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(le(e,ie(e)),{name:t.name}));var c=it(e,n)||{},i=c.time,a=c.count,l=void 0===a?0:a,s={id:n,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:st(i,l)};if("transform"===r)return s;var u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return K(K({},s),{},{initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:u,example:t.example,utility:1})}},dt=Object(z.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=ut(e,{buildScope:"inserter"}),o=function(t){var n,r="core/block/".concat(t.id),o=_t(e,t.id);1===o.length&&(n=Object(p.getBlockType)(o[0].name));var c=it(e,r)||{},i=c.time,a=c.count,l=st(i,void 0===a?0:a);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:q,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:l}},c=Object(p.getBlockTypes)().filter((function(t){return at(e,t,n)})).map(r),i=rt(e,"core/block",n)?St(e).map(o):[],a=c.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),l=[],s=G(c);try{for(s.s();!(t=s.n()).done;){var u=t.value,d=u.variations,b=void 0===d?[]:d;if(b.length){var f=lt(e,u);l.push.apply(l,Object(y.a)(b.map(f)))}}}catch(e){s.e(e)}finally{s.f()}var m=function(e,t){var n=e.name.startsWith("core/"),r=t.name.startsWith("core/");return n&&r?0:n&&!r?-1:1},v=[].concat(Object(y.a)(a),l).sort(m);return[].concat(Object(y.a)(v),Object(y.a)(i))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,St(e),Object(p.getBlockTypes)()]})),bt=Object(z.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=ut(e,{buildScope:"transform"}),o=Object(p.getBlockTypes)().filter((function(t){return at(e,t,n)})).map(r),c=Object(d.mapKeys)(o,(function(e){return e.name})),i=Object(p.getPossibleBlockTransformations)(t).reduce((function(e,t){return c[null==t?void 0:t.name]&&e.push(c[t.name]),e}),[]),a=Object(d.orderBy)(i,(function(e){return c[e.name].frecency}),"desc");return a}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),ft=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(d.some)(Object(p.getBlockTypes)(),(function(n){return at(e,n,t)}));if(n)return!0;var r=rt(e,"core/block",t)&&St(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,St(e),Object(p.getBlockTypes)()]})),pt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(d.filter)(Object(p.getBlockTypes)(),(function(n){return at(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),mt=Object(z.a)((function(e,t){var n=e.settings.__experimentalBlockPatterns.find((function(e){return e.name===t}));return n?K(K({},n),{},{blocks:Object(p.parse)(n.content)}):null}),(function(e){return[e.settings.__experimentalBlockPatterns]})),vt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.settings.__experimentalBlockPatterns,r=n.map((function(t){var n=t.name;return mt(e,n)})),o=Object(d.filter)(r,(function(n){return n.blocks.every((function(n){var r=n.name;return ot(e,r,t)}))}));return o}),(function(e,t){return[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]]})),Ot=Object(z.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return $;var r=vt(e,n),o=Array.isArray(t)?t:[t];return r.filter((function(e){var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(function(e){return o.includes(e)}))}))}),(function(e,t){return Object(y.a)(vt.getDependants(e,t))})),gt=Object(z.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return $;if(t.some((function(t){var n=t.clientId;return t.innerBlocks.length||Tt(e,n)})))return $;var r=Array.from(new Set(t.map((function(e){return e.name}))));return Ot(e,r,n)}),(function(e,t){return Object(y.a)(Ot.getDependants(e,t))}));function ht(e,t){return e.blockListSettings[t]}function jt(e){return e.settings}function yt(e){return e.blocks.isPersistentChange}var kt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce((function(t,n){return e.blockListSettings[n]?K(K({},t),{},Object(a.a)({},n,e.blockListSettings[n])):t}),{})}),(function(e){return[e.blockListSettings]})),_t=Object(z.a)((function(e,t){var n=Object(d.find)(St(e),(function(e){return e.id===t}));return n?Object(p.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[St(e)]})),Et=Object(z.a)((function(e,t){var n,r=Object(d.find)(St(e),(function(e){return e.id===t}));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(function(e){return[St(e)]}));function wt(e){return e.blocks.isIgnoredChange}function Ct(e){return e.lastBlockAttributesChange}function St(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:$}function Bt(e){return e.isNavigationMode}function It(e){return e.hasBlockMovingClientId}function xt(e){return!!e.automaticChangeStatus}function Pt(e,t){return e.highlightedBlock===t}function Tt(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Nt=Object(z.a)((function(e,t){if(!t.length)return null;var n=ve(e);if(t.includes(Y(e,n)))return n;var r=Be(e),o=je(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]}));function Dt(e,t,n){var r=e.lastBlockInserted;return r.clientId===t&&r.source===n}var At=n(16),Lt=n.n(At),Rt=n(55),Mt=n(41),Ft=n.n(Mt),Vt={SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))},MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(v.createRegistryControl)((function(e){return function(){var t=window.requestIdleCallback;(void 0===t?function(e){return setTimeout(e,100)}:t)((function(){return e.dispatch(yr).__unstableMarkAutomaticChangeFinal()}))}}))},Ht="core/block-editor";function zt(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Gt(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gt(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kt=Lt.a.mark(fn),qt=Lt.a.mark(pn),$t=Lt.a.mark(mn),Yt=Lt.a.mark(yn),Xt=Lt.a.mark(kn),Qt=Lt.a.mark(Cn),Zt=Lt.a.mark(xn),Jt=Lt.a.mark(An),en=Lt.a.mark(Ln),tn=Lt.a.mark(Mn),nn=Lt.a.mark(Gn),rn=Lt.a.mark(Un),on=Lt.a.mark(Wn),cn=Lt.a.mark(lr),an=Lt.a.mark(ur),ln=Lt.a.mark(dr),sn=Lt.a.mark(br),un=Lt.a.mark(fr),dn=Lt.a.mark(pr),bn=Lt.a.mark(vr);function fn(){return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.controls.select(Ht,"getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,nr();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),Kt)}function pn(e){return Lt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{type:"RESET_BLOCKS",blocks:e};case 2:return t.delegateYield(mn(e),"t0",3);case 3:return t.abrupt("return",t.t0);case 4:case"end":return t.stop()}}),qt)}function mn(e){var t,n,r,o;return Lt.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,v.controls.select(Ht,"getTemplate");case 2:return t=c.sent,c.next=5,v.controls.select(Ht,"getTemplateLock");case 5:return n=c.sent,r=!t||"all"!==n||Object(p.doBlocksMatchTemplate)(e,t),c.next=9,v.controls.select(Ht,"isValidTemplate");case 9:if(o=c.sent,r===o){c.next=14;break}return c.next=13,zn(r);case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}}),$t)}function vn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function On(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function gn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t,uniqueByBlock:n}}function hn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function jn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function yn(e){var t;return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select(Ht,"getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,jn(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Yt)}function kn(e){var t;return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select(Ht,"getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,jn(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Xt)}function En(){return{type:"START_MULTI_SELECT"}}function wn(){return{type:"STOP_MULTI_SELECT"}}function Cn(e,t){var n;return Lt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"MULTI_SELECT",start:e,end:t};case 2:return r.next=4,v.controls.select(Ht,"getSelectedBlockCount");case 4:n=r.sent,Object(Rt.speak)(Object(k.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
  Object(k._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),Qt)}function Sn(){return{type:"CLEAR_SELECTED_BLOCK"}}function Bn(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function In(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(p.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;var c=e.attributes,i=void 0===c?{}:c,a=o[n];return Wt(Wt({},e),{},{attributes:Wt(Wt({},i),{},{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function xn(e,t,n){var r,o,c,i,a,l=arguments;return Lt.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=l.length>3&&void 0!==l[3]?l[3]:0,o=l.length>4?l[4]:void 0,e=Object(d.castArray)(e),s.t0=In,s.t1=Object(d.castArray)(t),s.next=7,v.controls.select(Ht,"getSettings");case 7:return s.t2=s.sent,t=(0,s.t0)(s.t1,s.t2),s.next=11,v.controls.select(Ht,"getBlockRootClientId",Object(d.first)(e));case 11:c=s.sent,i=0;case 13:if(!(i<t.length)){s.next=23;break}return a=t[i],s.next=17,v.controls.select(Ht,"canInsertBlockType",a.name,c);case 17:if(s.sent){s.next=20;break}return s.abrupt("return");case 20:i++,s.next=13;break;case 23:return s.next=25,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 25:return s.delegateYield(fn(),"t3",26);case 26:case"end":return s.stop()}}),Zt)}function Pn(e,t){return xn(e,t)}function Tn(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var Nn=Tn("MOVE_BLOCKS_DOWN"),Dn=Tn("MOVE_BLOCKS_UP");function An(e){var t,n,r,o,c,i=arguments;return Lt.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,a.next=5,v.controls.select(Ht,"getTemplateLock",t);case 5:if("all"!==(o=a.sent)){a.next=8;break}return a.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){a.next=13;break}return a.next=12,c;case 12:return a.abrupt("return");case 13:if("insert"!==o){a.next=15;break}return a.abrupt("return");case 15:return a.next=17,v.controls.select(Ht,"canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),Jt)}function Ln(e){var t,n,r,o=arguments;return Lt.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,An([e],t,n,r);case 5:case"end":return c.stop()}}),en)}function Rn(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4?arguments[4]:void 0;return Mn([e],t,n,r,0,o)}function Mn(e,t,n){var r,o,c,i,a,l,s,u=arguments;return Lt.a.wrap((function(b){for(;;)switch(b.prev=b.next){case 0:return r=!(u.length>3&&void 0!==u[3])||u[3],o=u.length>4&&void 0!==u[4]?u[4]:0,c=u.length>5?u[5]:void 0,Object(d.isObject)(o)&&(c=o,o=0,Ft()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),b.t0=In,b.t1=Object(d.castArray)(e),b.next=8,v.controls.select(Ht,"getSettings");case 8:b.t2=b.sent,e=(0,b.t0)(b.t1,b.t2),i=[],a=zt(e),b.prev=12,a.s();case 14:if((l=a.n()).done){b.next=22;break}return s=l.value,b.next=18,v.controls.select(Ht,"canInsertBlockType",s.name,n);case 18:b.sent&&i.push(s);case 20:b.next=14;break;case 22:b.next=27;break;case 24:b.prev=24,b.t3=b.catch(12),a.e(b.t3);case 27:return b.prev=27,a.f(),b.finish(27);case 30:if(!i.length){b.next=32;break}return b.abrupt("return",{type:"INSERT_BLOCKS",blocks:i,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:c});case 32:case"end":return b.stop()}}),tn,null,[[12,24,27,30]])}function Fn(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function Vn(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Hn(){return{type:"HIDE_INSERTION_POINT"}}function zn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Gn(){var e,t,n;return Lt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"SYNCHRONIZE_TEMPLATE"};case 2:return r.next=4,v.controls.select(Ht,"getBlocks");case 4:return e=r.sent,r.next=7,v.controls.select(Ht,"getTemplate");case 7:return t=r.sent,n=Object(p.synchronizeBlocksWithTemplate)(e,t),r.next=11,pn(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),nn)}function Un(e,t){var n,r,o,i,a,l,s,u,b,f,m,O,g,h,j,k,_,E,w,C,S,B,I,x,P,T,N,D,A,L,R,M,F,V;return Lt.a.wrap((function(z){for(;;)switch(z.prev=z.next){case 0:return n=[e,t],z.next=3,{type:"MERGE_BLOCKS",blocks:n};case 3:return r=n[0],o=n[1],z.next=6,v.controls.select(Ht,"getBlock",r);case 6:if(i=z.sent,(a=Object(p.getBlockType)(i.name)).merge){z.next=12;break}return z.next=11,jn(i.clientId);case 11:return z.abrupt("return");case 12:return z.next=14,v.controls.select(Ht,"getBlock",o);case 14:return l=z.sent,s=Object(p.getBlockType)(l.name),z.next=18,v.controls.select(Ht,"getSelectionStart");case 18:if(u=z.sent,b=u.clientId,f=u.attributeKey,m=u.offset,O=(b===r?a:s).attributes[f],g=(b===r||b===o)&&void 0!==f&&void 0!==m&&!!O,O||("number"==typeof f?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(H.a)(f))):window.console.error("The RichText identifier prop does not match any attributes defined by the block.")),h="†",j=Object(p.cloneBlock)(i),k=Object(p.cloneBlock)(l),g&&(E=(_=b===r?j:k).attributes[f],w=O.multiline,C=O.__unstableMultilineWrapperTags,S=O.__unstablePreserveWhiteSpace,B=Object(c.insert)(Object(c.create)({html:E,multilineTag:w,multilineWrapperTags:C,preserveWhiteSpace:S}),h,m,m),_.attributes[f]=Object(c.toHTMLString)({value:B,multilineTag:w,preserveWhiteSpace:S})),(I=i.name===l.name?[k]:Object(p.switchToBlockType)(k,i.name))&&I.length){z.next=33;break}return z.abrupt("return");case 33:if(x=a.merge(j.attributes,I[0].attributes),!g){z.next=45;break}return P=Object(d.findKey)(x,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),T=x[P],N=a.attributes[P],D=N.multiline,A=N.__unstableMultilineWrapperTags,L=N.__unstablePreserveWhiteSpace,R=Object(c.create)({html:T,multilineTag:D,multilineWrapperTags:A,preserveWhiteSpace:L}),M=R.text.indexOf(h),F=Object(c.remove)(R,M,M+1),V=Object(c.toHTMLString)({value:F,multilineTag:D,preserveWhiteSpace:L}),x[P]=V,z.next=45,tr(i.clientId,P,M,M);case 45:return z.delegateYield(xn([i.clientId,l.clientId],[Wt(Wt({},i),{},{attributes:Wt(Wt({},i.attributes),x)})].concat(Object(y.a)(I.slice(1)))),"t0",46);case 46:case"end":return z.stop()}}),rn)}function Wn(e){var t,n,r,o,c=arguments;return Lt.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(d.castArray)(e),i.next=6,v.controls.select(Ht,"getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,v.controls.select(Ht,"getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,yn(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,v.controls.select(Ht,"getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(fn(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),on)}function Kn(e,t){return Wn([e],t)}function qn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function $n(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Yn(){return{type:"START_TYPING"}}function Xn(){return{type:"STOP_TYPING"}}function Qn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Zn(){return{type:"STOP_DRAGGING_BLOCKS"}}function Jn(){return{type:"ENTER_FORMATTED_TEXT"}}function er(){return{type:"EXIT_FORMATTED_TEXT"}}function tr(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function nr(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return Rn(Object(p.createBlock)(r,e),n,t)}function rr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function or(e){return{type:"UPDATE_SETTINGS",settings:e}}function cr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function ir(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ar(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function lr(){return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"MARK_AUTOMATIC_CHANGE"};case 2:return e.next=4,{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"};case 4:case"end":return e.stop()}}),cn)}function sr(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function ur(){var e,t=arguments;return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(Rt.speak)(Object(k.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(Rt.speak)(Object(k.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),an)}function dr(){var e,t=arguments;return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(Rt.speak)(Object(k.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."));case 4:case"end":return n.stop()}}),ln)}function br(e){var t,n,r,o,c,i,a=arguments;return Lt.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=!(a.length>1&&void 0!==a[1])||a[1],e||e.length){l.next=3;break}return l.abrupt("return");case 3:return l.next=5,v.controls.select(Ht,"getBlocksByClientId",e);case 5:return n=l.sent,l.next=8,v.controls.select(Ht,"getBlockRootClientId",e[0]);case 8:if(r=l.sent,!Object(d.some)(n,(function(e){return!e}))){l.next=11;break}return l.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(d.some)(o,(function(e){return!Object(p.hasBlockSupport)(e,"multiple",!0)}))){l.next=14;break}return l.abrupt("return");case 14:return l.next=16,v.controls.select(Ht,"getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=l.sent,i=n.map((function(e){return Object(p.__experimentalCloneSanitizedBlock)(e)})),l.next=20,Mn(i,c+1,r,t);case 20:if(!(i.length>1&&t)){l.next=23;break}return l.next=23,Cn(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return l.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return l.stop()}}),sn)}function fr(e){var t,n;return Lt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,v.controls.select(Ht,"getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select(Ht,"getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select(Ht,"getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,nr({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),un)}function pr(e){var t,n;return Lt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,v.controls.select(Ht,"getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select(Ht,"getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select(Ht,"getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,nr({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),dn)}function mr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function vr(e){return Lt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mr(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,mr(e,!1);case 6:case"end":return t.stop()}}),bn)}function Or(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jr={reducer:V,selectors:r,actions:o,controls:Vt},yr=Object(v.createReduxStore)(Ht,hr(hr({},jr),{},{persist:["preferences"]}));function kr(){var e=h(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(v.useSelect)((function(e){if(!t){var o=e(yr),c=o.getBlockName,i=o.isFirstMultiSelectedBlock,a=o.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return c(e)===r}))}}),[n,t,r]);return t||o}Object(v.registerStore)(Ht,hr(hr({},jr),{},{persist:["preferences"]}));var _r={default:Object(m.createSlotFill)("BlockControls"),block:Object(m.createSlotFill)("BlockControlsBlock"),inline:Object(m.createSlotFill)("BlockFormatControls"),other:Object(m.createSlotFill)("BlockControlsOther")};function Er(e){var t=e.group,n=void 0===t?"default":t,r=e.controls,o=e.children;if(!kr())return null;var c=_r[n].Fill;return Object(l.createElement)(m.__experimentalStyleProvider,{document:document},Object(l.createElement)(c,null,(function(e){var t=Object(d.isEmpty)(e)?null:e;return Object(l.createElement)(m.__experimentalToolbarContext.Provider,{value:t},"default"===n&&Object(l.createElement)(m.ToolbarGroup,{controls:r}),o)})))}function wr(e){var t=e.group,n=void 0===t?"default":t,r=Object(j.a)(e,["group"]),o=Object(l.useContext)(m.__experimentalToolbarContext),c=_r[n].Slot,a=Object(m.__experimentalUseSlot)(c.__unstableName);return Boolean(a.fills&&a.fills.length)?"default"===n?Object(l.createElement)(c,Object(i.a)({},r,{bubblesVirtually:!0,fillProps:o})):Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(c,Object(i.a)({},r,{bubblesVirtually:!0,fillProps:o}))):null}var Cr=Er;Cr.Slot=wr;var Sr=function(e){return Object(l.createElement)(Er,Object(i.a)({group:"inline"},e))};Sr.Slot=function(e){return Object(l.createElement)(wr,Object(i.a)({group:"inline"},e))};var Br=Cr,Ir=n(7),xr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Pr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Tr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),Nr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),Dr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),Ar={type:"default"},Lr=Object(l.createContext)(Ar);function Rr(e,t){return e.split(",").map((function(e){return".editor-styles-wrapper ".concat(e," ").concat(t)})).join(",")}var Mr=Lr.Provider;function Fr(){return Object(l.useContext)(Lr)}function Vr(e){var t=e.selector,n=e.layout,r=void 0===n?{}:n,o=r.contentSize,c=r.wideSize,i=o||c?"\n\t\t\t\t".concat(Rr(t,"> *")," {\n\t\t\t\t\tmax-width: ").concat(null!=o?o:c,";\n\t\t\t\t\tmargin-left: auto;\n\t\t\t\t\tmargin-right: auto;\n\t\t\t\t}\n\n\t\t\t\t").concat(Rr(t,'> [data-align="wide"]')," {\n\t\t\t\t\tmax-width: ").concat(null!=c?c:o,";\n\t\t\t\t}\n\n\t\t\t\t").concat(Rr(t,'> [data-align="full"]')," {\n\t\t\t\t\tmax-width: none;\n\t\t\t\t}\n\t\t\t"):"";return i+="\n\t\t".concat(Rr(t,'> [data-align="left"]')," {\n\t\t\tfloat: left;\n\t\t\tmargin-right: 2em;\n\t\t}\n\n\t\t").concat(Rr(t,'> [data-align="right"]')," {\n\t\t\tfloat: right;\n\t\t\tmargin-left: 2em;\n\t\t}\n\t"),Object(l.createElement)("style",null,i)}var Hr=["left","center","right","wide","full"],zr=["wide","full"];function Gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hr,t=Object(v.useSelect)((function(e){return{wideControlsEnabled:(0,e(yr).getSettings)().alignWide}}),[]),n=t.wideControlsEnabled,r=void 0!==n&&n,o=Fr(),c="default"===o.type;if(!c)return[];var i=o.alignments,a=void 0===i?Hr:i,l=e.filter((function(e){return(o.alignments||r||!zr.includes(e))&&a.includes(e)}));return l}function Ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kr={left:{icon:xr,title:Object(k.__)("Align left")},center:{icon:Pr,title:Object(k.__)("Align center")},right:{icon:Tr,title:Object(k.__)("Align right")},wide:{icon:Nr,title:Object(k.__)("Wide width")},full:{icon:Dr,title:Object(k.__)("Full width")}},qr={isAlternate:!0},$r=function(e){var t=e.value,n=e.onChange,r=e.controls,o=e.isToolbar,c=e.isCollapsed,a=void 0===c||c,s=e.isToolbarButton,u=void 0===s||s,d=Gr(r);if(0===d.length)return null;var b=Kr[t],f=Kr.center,p=o?m.ToolbarGroup:m.DropdownMenu,v=o?{isCollapsed:a}:{isToolbarButton:u};return Object(l.createElement)(p,Object(i.a)({popoverProps:qr,icon:b?b.icon:f.icon,label:Object(k.__)("Align"),toggleProps:{describedBy:Object(k.__)("Change alignment")},controls:d.map((function(e){return Wr(Wr({},Kr[e]),{},{isActive:t===e,role:a?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))},v))};function Yr(e){return Object(l.createElement)($r,Object(i.a)({},e,{isToolbar:!1}))}function Xr(e){return Object(l.createElement)($r,Object(i.a)({},e,{isToolbar:!0}))}function Qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jr=["left","center","right","wide","full"],eo=["wide","full"];function to(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Jr.filter((function(t){return e.includes(t)})):!0===e?Jr:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(eo)):t}var no=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Gr(to(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0)));return[r.length>0&&t.isSelected&&Object(l.createElement)(Br,{key:"align-controls",group:"block"},Object(l.createElement)(Yr,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(p.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e=""),t.setAttributes({align:e})},controls:r})),Object(l.createElement)(e,Object(i.a)({key:"edit"},t))]}}),"withToolbarControls"),ro=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Gr(to(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0)));if(void 0===r)return Object(l.createElement)(e,t);var c=t.wrapperProps;return o.includes(r)&&(c=Zr(Zr({},c),{},{"data-align":r})),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:c}))}}));Object(f.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(d.has)(e.attributes,["align","type"])||Object(p.hasBlockSupport)(e,"align")&&(e.attributes=Zr(Zr({},e.attributes),{},{align:{type:"string",enum:[].concat(Jr,[""])}})),e})),Object(f.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",ro),Object(f.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",no),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return to(Object(p.getBlockSupport)(t,"align"),Object(p.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=u()("align".concat(r),e.className)),e}));var oo=Object(m.createSlotFill)("InspectorAdvancedControls"),co=oo.Fill,io=oo.Slot;function ao(e){var t=e.children;return h().isSelected?Object(l.createElement)(m.__experimentalStyleProvider,{document:document},Object(l.createElement)(co,null,t)):null}ao.slotName="InspectorAdvancedControls",ao.Slot=io;var lo=ao,so=Object(m.createSlotFill)("InspectorControls"),uo=so.Fill,bo=so.Slot;function fo(e){var t=e.children;return kr()?Object(l.createElement)(m.__experimentalStyleProvider,{document:document},Object(l.createElement)(uo,null,t)):null}fo.Slot=bo;var po=fo;function mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oo=/[\s#]/g,go=Object(b.createHigherOrderComponent)((function(e){return function(t){if(Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected){var n="web"===l.Platform.OS,r=Object(l.createElement)(m.TextControl,{className:"html-anchor-control",label:Object(k.__)("HTML anchor"),help:Object(l.createElement)(l.Fragment,null,Object(k.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(l.createElement)(m.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(k.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:Object(k.__)("Add an anchor"),onChange:function(e){e=e.replace(Oo,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),n&&Object(l.createElement)(lo,null,r),!n&&"core/heading"===t.name&&Object(l.createElement)(po,null,Object(l.createElement)(m.PanelBody,{title:Object(k.__)("Heading settings")},r)))}return Object(l.createElement)(e,t)}}),"withInspectorControl");function ho(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ho(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ho(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(d.has)(e.attributes,["anchor","type"])||Object(p.hasBlockSupport)(e,"anchor")&&(e.attributes=vo(vo({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",go),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var yo=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(lo,null,Object(l.createElement)(m.TextControl,{autoComplete:"off",label:Object(k.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(k.__)("Separate multiple classes with spaces.")}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function ko(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(p.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(f.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=jo(jo({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",yo),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=u()(e.className,n.className)),e})),Object(f.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(p.hasBlockSupport)(t,"customClassName",!0)){var r=Object(d.omit)(e,["className"]),o=Object(p.getSaveContent)(t,r),c=ko(o),i=ko(n),a=Object(d.difference)(i,c);a.length?e.className=a.join(" "):o&&delete e.className}return e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(d.uniq)([Object(p.getBlockDefaultClassName)(t.name)].concat(Object(y.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var _o={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":function(e){return e.enableCustomSpacing}};function Eo(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function wo(e){var t=h(),n=t.name,r=t.clientId;return Object(v.useSelect)((function(t){var o,c=t(yr),i=c.getBlockAttributes,a=(0,c.getSettings)(),l=t(p.store).getBlockType(n),s=n,u=Object(d.get)(l,["supports","__experimentalSelector"]);if(r&&Object(d.isObject)(u)){var b=i(r)||{};for(var f in u)if(Eo(b,u[f].attributes)){s=f;break}}var m="__experimentalFeatures.defaults.".concat(e),v="__experimentalFeatures.".concat(s,".").concat(e),O=null!==(o=Object(d.get)(a,v))&&void 0!==o?o:Object(d.get)(a,m);if(void 0!==O)return O;var g=_o[e]?_o[e](a):void 0;return void 0!==g?g:"typography.dropCap"===e||void 0}),[n,r,e])}var Co=n(9),So=n(59),Bo=n.n(So),Io=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},xo=function(e,t){return Object(d.find)(e,{color:t})};function Po(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var To=[];function No(e){if(e)return"has-".concat(e,"-gradient-background")}function Do(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function Ao(e,t){return Object(d.find)(e,["gradient",t])}function Lo(e,t){var n=Ao(e,t);return n&&n.slug}function Ro(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=h(),i=c.clientId,s=wo("color.gradients")||To,u=Object(v.useSelect)((function(e){var t=(0,e(yr).getBlockAttributes)(i)||{};return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=u.gradient,b=u.customGradient,f=Object(v.useDispatch)(yr),p=f.updateBlockAttributes,m=Object(l.useCallback)((function(e){var t,r,c=Lo(s,e);p(i,c?(r={},Object(a.a)(r,n,c),Object(a.a)(r,o,void 0),r):(t={},Object(a.a)(t,n,void 0),Object(a.a)(t,o,e),t))}),[s,i,p]),O=No(d);return{gradientClass:O,gradientValue:d?Do(s,d):b,setGradient:m}}function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
4
  // translators: first %s: the color name or value (e.g. red or #ff0000)
@@ -26,12 +26,12 @@ Object(k.__)("Block %1$s is at the beginning of the content and can’t be moved
26
  Object(k.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(s,O&&O.title,E,y,_,"up"===r?-1:1,C)))})),os=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(rs,Object(i.a)({direction:"up",ref:t},e))})),cs=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(rs,Object(i.a)({direction:"down",ref:t},e))})),is=Object(l.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),as=function(){return Object(l.useContext)(is)},ls=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),ss=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(l.createElement)("div",{className:u()(t,"block-editor-warning")},Object(l.createElement)("div",{className:"block-editor-warning__contents"},Object(l.createElement)("p",{className:"block-editor-warning__message"},r),(l.Children.count(n)>0||o)&&Object(l.createElement)("div",{className:"block-editor-warning__actions"},l.Children.count(n)>0&&l.Children.map(n,(function(e,t){return Object(l.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(l.createElement)(m.DropdownMenu,{className:"block-editor-warning__secondary",icon:ls,label:Object(k.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(l.createElement)(m.MenuGroup,null,o.map((function(e,t){return Object(l.createElement)(m.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},us=n(356),ds=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(l.createElement)("div",{className:i},Object(l.createElement)("div",{className:"block-editor-block-compare__content"},Object(l.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(l.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(l.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(l.createElement)("div",{className:"block-editor-block-compare__action"},Object(l.createElement)(m.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))},bs=function(e){var t,n,r,o,c=e.block,i=e.onKeep,a=e.onConvert,s=e.convertor,b=e.convertButtonText,f={rawContent:c.originalContent,renderedContent:Object(p.getSaveElement)(c.name,c.attributes)},m=(t=s(c),r=(n=Object(d.castArray)(t)).map((function(e){return Object(p.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(p.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(us.diffChars)(e,t).map((function(e,t){var n=u()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(l.createElement)("span",{key:t,className:n},e.value)}))}(f.rawContent,m.rawContent);return Object(l.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(l.createElement)(ds,{title:Object(k.__)("Current"),className:"block-editor-block-compare__current",action:i,actionText:Object(k.__)("Convert to HTML"),rawContent:f.rawContent,renderedContent:f.renderedContent}),Object(l.createElement)(ds,{title:Object(k.__)("After Conversion"),className:"block-editor-block-compare__converted",action:a,actionText:b,rawContent:v,renderedContent:m.renderedContent}))},fs=function(e){return Object(p.rawHandler)({HTML:e.originalContent})},ps=Object(b.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId;return{block:e(yr).getBlock(n)}})),Object(v.withDispatch)((function(e,t){var n=t.block,r=e(yr).replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,fs(n))},attemptBlockRecovery:function(){var e,t,o,c;r(n.clientId,(t=(e=n).name,o=e.attributes,c=e.innerBlocks,Object(p.createBlock)(t,o,c)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,c=e.block,i=!!Object(p.getBlockType)("core/html"),a=Object(l.useState)(!1),s=Object(Co.a)(a,2),u=s[0],d=s[1],b=Object(l.useCallback)((function(){return d(!0)}),[]),f=Object(l.useCallback)((function(){return d(!1)}),[]),v=Object(l.useMemo)((function(){return[{
27
  // translators: Button to fix block content
28
  title:Object(k._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(k.__)("Convert to HTML"),onClick:t},{title:Object(k.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(ss,{actions:[Object(l.createElement)(m.Button,{key:"recover",onClick:o,isPrimary:!0},Object(k.__)("Attempt Block Recovery"))],secondaryActions:v},Object(k.__)("This block contains unexpected or invalid content.")),u&&Object(l.createElement)(m.Modal,{title:// translators: Dialog title to fix block content
29
- Object(k.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(l.createElement)(bs,{block:c,onKeep:t,onConvert:n,convertor:fs,convertButtonText:Object(k.__)("Convert to Blocks")})))})),ms=Object(l.createElement)(ss,{className:"block-editor-block-list__block-crash-warning"},Object(k.__)("This block has encountered an error and cannot be previewed.")),vs=function(){return ms};var Os=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(){var e;return Object(pa.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(ma.a)(o,[{key:"componentDidCatch",value:function(){this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?this.props.fallback:this.props.children}}]),o}(l.Component),gs=n(121),hs=n.n(gs),js=function(e){var t=e.clientId,n=Object(l.useState)(""),r=Object(Co.a)(n,2),o=r[0],c=r[1],i=Object(v.useSelect)((function(e){return e(yr).getBlock(t)}),[t]),a=Object(v.useDispatch)(yr).updateBlock;return Object(l.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(l.createElement)(hs.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(p.getBlockType)(i.name),n=Object(p.getBlockAttributes)(e,o,i.attributes),r=o||Object(p.getSaveContent)(e,n),l=!o||Object(p.isValidBlockContent)(e,n,r);a(t,{attributes:n,originalContent:r,isValid:l}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})};function ys(e){var t=Object(l.useRef)(),n=function(e){return Object(v.useSelect)((function(t){var n=t(yr),r=n.getSelectedBlocksInitialCaretPosition,o=n.isMultiSelecting,c=n.isNavigationMode;if((0,n.isBlockSelected)(e)&&!o()&&!c())return r()}),[e])}(e);return Object(l.useEffect)((function(){if(null!=n&&t.current){var e=t.current.ownerDocument;if(!t.current.contains(e.activeElement)){var r=Wl.focus.tabbable.find(t.current).filter((function(e){return Object(Wl.isTextField)(e)})),o=-1===n,c=(o?d.last:d.first)(r)||t.current;Bc(t.current,c)&&!c.closest(".block-list-appender")?Object(Wl.placeCaretAtHorizontalEdge)(c,o):t.current.focus()}}}),[n]),t}function ks(e){if(!e.defaultPrevented){var t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}}function _s(){var e=Object(v.useSelect)((function(e){var t=e(yr),n=t.isNavigationMode,r=t.getSettings;return n()||r().outlineMode}),[]);return Object(b.useRefEffect)((function(t){if(e)return t.addEventListener("mouseout",ks),t.addEventListener("mouseover",ks),function(){t.removeEventListener("mouseout",ks),t.removeEventListener("mouseover",ks),t.classList.remove("is-hovered")}}),[e])}function Es(e){return Object(v.useSelect)((function(t){var n=t(yr),r=n.isBlockBeingDragged,o=n.isBlockHighlighted,c=n.isBlockSelected,i=n.isBlockMultiSelected,a=n.getBlockName,l=n.getSettings,s=n.hasSelectedInnerBlock,d=n.__experimentalGetActiveBlockIdByBlockNames,b=l().__experimentalSpotlightEntityBlocks,f=r(e),m=c(e),v=a(e),O=s(e,!0),g=d(b);return u()("block-editor-block-list__block",{"is-selected":m,"is-highlighted":o(e),"is-multi-selected":i(e),"is-reusable":Object(p.isReusableBlock)(Object(p.getBlockType)(v)),"is-dragging":f,"has-child-selected":O,"has-active-entity":g,"is-active-entity":g===e})}),[e])}function ws(e){return Object(v.useSelect)((function(t){var n=t(yr).getBlockName(e),r=Object(p.getBlockType)(n);if(r.apiVersion>1||Object(p.hasBlockSupport)(r,"lightBlockWrapper",!1))return Object(p.getBlockDefaultClassName)(n)}),[e])}function Cs(e){return Object(v.useSelect)((function(t){var n=t(yr),r=n.getBlockName,o=(0,n.getBlockAttributes)(e).className;if(o){var c=Object(p.getBlockType)(r(e));if(c.apiVersion>1||Object(p.hasBlockSupport)(c,"lightBlockWrapper",!1))return o}}),[e])}function Ss(e){return Object(v.useSelect)((function(t){var n=t(yr),r=n.hasBlockMovingClientId,o=n.canInsertBlockType,c=n.getBlockName,i=n.getBlockRootClientId;if((0,n.isBlockSelected)(e)){var a=r();if(a)return u()("is-block-moving-mode",{"can-insert-moving-block":o(c(a),i(e))})}}),[e])}function Bs(e,t){for(var n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function Is(e){var t=e(yr),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.getMultiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.getSelectedBlockClientId;return{isSelectionEnabled:n(),isMultiSelecting:r(),multiSelectedBlockClientIds:o(),hasMultiSelection:c(),getBlockParents:i,selectedBlockClientId:a()}}function xs(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var Ps=Object(l.createContext)(),Ts={position:"fixed"};function Ns(e){var t=e.tagName;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Ds(e,t,n,r){var o,c=Wl.focus.focusable.find(n);return t&&(c=Object(d.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(d.find)(c,(function(e){if(!Wl.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){var t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}))}function As(e){var t=e(yr),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,b=t.isSelectionEnabled,f=t.getBlockSelectionStart,p=t.isMultiSelecting,m=t.getSettings,v=t.isNavigationMode,O=n(),g=r(),h=o(),j=u();return{selectedBlockClientId:O,selectionStartClientId:g,selectionBeforeEndClientId:c(h||O),selectionAfterEndClientId:i(h||O),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),firstBlock:Object(d.first)(j),lastBlock:Object(d.last)(j),isSelectionEnabled:b(),blockSelectionStart:f(),isMultiSelecting:p(),keepCaretInsideBlock:m().keepCaretInsideBlock,isNavigationMode:v()}}function Ls(e){var t=e.children,n=Object(l.useRef)(),r=Object(l.useRef)(),o=Object(l.useRef)(),c=Object(l.useRef)(),i=Object(l.useRef)(),a=Object(l.useRef)(),s=Object(l.useRef)(),u=Object(v.useSelect)(As,[]),d=u.selectedBlockClientId,b=u.selectionStartClientId,f=u.selectionBeforeEndClientId,p=u.selectionAfterEndClientId,m=u.selectedFirstClientId,O=u.selectedLastClientId,g=u.hasMultiSelection,h=u.firstBlock,j=u.lastBlock,_=u.isSelectionEnabled,E=u.blockSelectionStart,w=u.isMultiSelecting,C=u.keepCaretInsideBlock,S=u.isNavigationMode,B=Object(v.useDispatch)(yr),I=B.multiSelect,x=B.selectBlock,P=B.setNavigationMode;function T(e){var t=e?f:p;t&&I(b||d,t)}function N(e){var t=e?m:O;t&&x(t)}Object(l.useEffect)((function(){g&&!w&&c.current.focus()}),[g,w]);var D=function(e){var t=Object(v.useSelect)(Is,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,s=Object(v.useDispatch)(yr),u=s.startMultiSelect,d=s.stopMultiSelect,b=s.multiSelect,f=s.selectBlock,p=Object(l.useRef)(),m=Object(l.useRef)(),O=Object(l.useRef)();Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var i=o.length;if(!(i<2)){var l=o[0],s=o[i-1],u=Sc(l,t),d=Sc(s,t),b=n.getSelection(),f=t.createRange();u=Bs(u,"start"),d=Bs(d,"end"),f.setStartBefore(u),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!a||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=Sc(a,t),v=p.getRangeAt(0),O=v.startContainer,g=v.endContainer;!m||m.contains(O)&&m.contains(g)||p.removeAllRanges()}}}),[c,r,o,f,a]);var g=Object(l.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=Ic(r.focusNode);if(m.current===o){if(f(o),n&&(xs(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;O.current.contains(c)&&O.current.focus()}}else{var a=[].concat(Object(y.a)(i(m.current)),[m.current]),l=[].concat(Object(y.a)(i(o)),[o]),s=Math.min(a.length,l.length)-1;b(a[s],l[s])}}else xs(e.current,!0)}),[f,i,b]),h=Object(l.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){g({isSelectionEnd:!0}),d()}))}),[g,d]);return Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[g,h]),Object(l.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;m.current=t,O.current=r.activeElement,u(),r.addEventListener("selectionchange",g),o.addEventListener("mouseup",h),xs(e.current,!1)}}),[n,u,h])}(n),A=Object(l.useRef)();function L(e){if(a.current)a.current=null;else if(g)c.current.focus();else if(d)A.current.focus();else{P(!0);var t=e.target.compareDocumentPosition(n.current)&e.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Wl.focus.tabbable[t](e.target).focus()}}Object(l.useEffect)((function(){function e(e){A.current=e.target}return n.current.addEventListener("focusout",e),function(){n.current.removeEventListener("focusout",e)}}),[]);var R=S?void 0:"0";return Object(l.createElement)(Ps.Provider,{value:D},Object(l.createElement)("div",{ref:r,tabIndex:R,onFocus:L,style:Ts}),Object(l.createElement)("div",{ref:c,tabIndex:g?"0":void 0,"aria-label":g?Object(k.__)("Multiple selected blocks"):void 0,style:Ts,onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey,c=t===li.UP,i=t===li.DOWN,l=t===li.LEFT,s=t===li.RIGHT,u=c||l,d=l||s||c||i;t===li.TAB?(a.current=!0,n?r.current.focus():o.current.focus()):d&&((n?T:N)(u),e.preventDefault())}}),Object(l.createElement)("div",{ref:n,className:"block-editor-writing-flow",onKeyDown:function(e){var t=e.keyCode,c=e.target;if(n.current.contains(c)){var l=t===li.UP,u=t===li.DOWN,b=t===li.LEFT,m=t===li.RIGHT,v=t===li.TAB,O=t===li.ESCAPE,g=l||b,y=b||m,k=l||u,_=y||k,E=e.shiftKey,w=E||e.ctrlKey||e.altKey||e.metaKey,S=k?Wl.isVerticalEdge:Wl.isHorizontalEdge,B=n.current.ownerDocument.defaultView;if(d){if(v){var x=E?"findPrevious":"findNext";if(Ns(c)&&Ns(Wl.focus.tabbable[x](c)))return;var N=E?r:o;return a.current=!0,void N.current.focus()}O&&P(!0)}if(k?s.current||(s.current=Object(Wl.computeCaretRect)(B)):s.current=null,!_)return li.isKeyboardEvent.primary(e)&&(i.current=Object(Wl.isEntirelySelected)(c)),void(li.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?i.current:Object(Wl.isEntirelySelected)(c))&&(I(h,j),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===li.UP||t===li.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,t,w)){var D,A="rtl"===(D=c).ownerDocument.defaultView.getComputedStyle(D).direction?!g:g;if(E)(g&&f||!g&&p)&&function(e,t){var r,o,c=Ds(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(c,g)&&S(c,g)&&(T(g),e.preventDefault());else if(k&&Object(Wl.isVerticalEdge)(c,g)&&!C){var L=Ds(c,g,n.current,!0);L&&(Object(Wl.placeCaretAtVerticalEdge)(L,g,s.current),e.preventDefault())}else if(y&&B.getSelection().isCollapsed&&Object(Wl.isHorizontalEdge)(c,A)&&!C){var R=Ds(c,A,n.current);Object(Wl.placeCaretAtHorizontalEdge)(R,A),e.preventDefault()}}}},onMouseDown:function(e){if(s.current=null,_&&0===e.button){var t=Ic(e.target);t&&(e.shiftKey?E!==t&&(I(E,t),e.preventDefault()):g&&x(t))}}},t),Object(l.createElement)("div",{ref:o,tabIndex:R,onFocus:L,style:Ts}))}function Rs(e){var t=Object(l.useContext)(Ps),n=Object(v.useSelect)((function(t){var n=t(yr),r=n.isBlockSelected,o=n.getBlockRootClientId,c=n.getBlockIndex;return{isSelected:r(e),rootClientId:o(e),index:c(e)}}),[e]),r=n.isSelected,o=n.rootClientId,c=n.index,i=Object(v.useDispatch)(yr),a=i.insertDefaultBlock,s=i.removeBlock,u=i.selectBlock;return Object(b.useRefEffect)((function(n){if(!r){function i(t){Bc(n,t.target)&&u(e)}return n.addEventListener("focusin",i),function(){n.removeEventListener("focusin",i)}}function l(t){var r=t.keyCode,i=t.target;r!==li.ENTER&&r!==li.BACKSPACE&&r!==li.DELETE||i!==n||Object(Wl.isTextField)(i)||(t.preventDefault(),r===li.ENTER?a({},o,c+1):s(e))}function d(n){1===n.buttons&&t(e)}function b(e){e.preventDefault()}return n.addEventListener("keydown",l),n.addEventListener("mouseleave",d),n.addEventListener("dragstart",b),function(){n.removeEventListener("mouseleave",d),n.removeEventListener("keydown",l),n.removeEventListener("dragstart",b)}}),[r,o,c,t,a,s,u])}function Ms(e){var t=Object(v.useSelect)(yr),n=t.isNavigationMode,r=t.isBlockSelected,o=Object(v.useDispatch)(yr),c=o.setNavigationMode,i=o.selectBlock;return Object(b.useRefEffect)((function(t){function o(t){n()&&!t.defaultPrevented&&(t.preventDefault(),r(e)?c(!1):i(e))}return t.addEventListener("mousedown",o),function(){t.addEventListener("mousedown",o)}}),[e,n,r,c])}var Fs=n(71),Vs=n(177),Hs=[Object(l.createInterpolateElement)(Object(k.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(k.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(k.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(k.__)("Drag files into the editor to automatically insert media blocks."),Object(k.__)("Change a block's type by pressing the block icon on the toolbar.")],zs=function(){var e=Object(l.useState)(Math.floor(Math.random()*Hs.length)),t=Object(Co.a)(e,1)[0];return Object(l.createElement)(m.Tip,null,Hs[t])},Gs=n(135),Us=n(282),Ws=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.label,i=t.placeholder,a=Object(b.useInstanceId)(e),s=Object(l.useRef)();return Object(l.createElement)("div",{className:u()("block-editor-inserter__search",n)},Object(l.createElement)(m.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(a)},c||i),Object(l.createElement)("input",{ref:s,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(a),type:"search",placeholder:i,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(l.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(l.createElement)(m.Button,{icon:Gs.a,label:Object(k.__)("Reset search"),onClick:function(){r(""),s.current.focus()}}),!o&&Object(l.createElement)(ra.a,{icon:Us.a})))},Ks=function(e){var t=e.title,n=e.icon,r=e.description,o=e.blockType;return o&&(Ft()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),t=o.title,n=o.icon,r=o.description),Object(l.createElement)("div",{className:"block-editor-block-card"},Object(l.createElement)(hl,{icon:n,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-block-card__content"},Object(l.createElement)("h2",{className:"block-editor-block-card__title"},t),Object(l.createElement)("span",{className:"block-editor-block-card__description"},r)))};function qs(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selection,c=e.onChange,i=void 0===c?d.noop:c,a=e.onInput,s=void 0===a?d.noop:a,u=Object(v.useRegistry)(),b=u.dispatch(yr),f=b.resetBlocks,m=b.resetSelection,O=b.replaceInnerBlocks,g=b.setHasControlledInnerBlocks,h=b.__unstableMarkNextChangeAsNotPersistent,j=u.select(yr),y=j.getBlockName,k=j.getBlocks,_=Object(l.useRef)({incoming:null,outgoing:[]}),E=Object(l.useRef)(!1),w=Object(l.useRef)(s),C=Object(l.useRef)(i);Object(l.useEffect)((function(){w.current=s,C.current=i}),[s,i]),Object(l.useEffect)((function(){_.current.outgoing.includes(r)?Object(d.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):k(n)!==r&&(_.current.outgoing=[],function(){if(r)if(h(),n){g(n,!0),h();var e=r.map((function(e){return Object(p.cloneBlock)(e)}));E.current&&(_.current.incoming=e),O(n,e)}else E.current&&(_.current.incoming=r),f(r)}(),o&&m(o.selectionStart,o.selectionEnd,o.initialPosition))}),[r,n]),Object(l.useEffect)((function(){var e=u.select(yr),t=e.getSelectionStart,r=e.getSelectionEnd,o=e.getSelectedBlocksInitialCaretPosition,c=e.isLastBlockChangePersistent,i=e.__unstableIsLastBlockChangeIgnored,a=k(n),l=c(),s=!1;E.current=!0;var d=u.subscribe((function(){if(null===n||null!==y(n)){var e=c(),u=k(n),d=u!==a;if(a=u,d&&(_.current.incoming||i()))return _.current.incoming=null,void(l=e);(d||s&&!d&&e&&!l)&&(l=e,_.current.outgoing.push(a),(l?C.current:w.current)(a,{selection:{selectionStart:t(),selectionEnd:r(),initialPosition:o()}})),s=d}}));return function(){return d()}}),[u,n])}var $s,Ys=Object(b.createHigherOrderComponent)((function(e){return Object(v.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(j.a)(t,["useSubRegistry","registry"]);if(!r)return Object(l.createElement)(e,Object(i.a)({registry:o},c));var a=Object(l.useState)(null),s=Object(Co.a)(a,2),u=s[0],d=s[1];return Object(l.useEffect)((function(){var e=Object(v.createRegistry)({},o);e.registerStore(Ht,jr),d(e)}),[o]),u?Object(l.createElement)(v.RegistryProvider,{value:u},Object(l.createElement)(e,Object(i.a)({registry:u},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(v.useDispatch)(yr).updateSettings;return Object(l.useEffect)((function(){r(n)}),[n]),qs(e),t}));function Xs(e){var t=e.onClick;return Object(l.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(l.createElement)(m.Disabled,null,Object(l.createElement)(kb,null)))}var Qs=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(Co.a)(r,2),c=o[0],i=o[1].width,a=Object(b.useResizeObserver)(),s=Object(Co.a)(a,2),u=s[0],d=s[1].height;$s=$s||Object(b.pure)(kb);var f=(i-2*n)/t;return Object(l.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(l.createElement)(m.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},u,Object(l.createElement)($s,null)))};function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Js=Object(l.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?1200:o,i=e.__experimentalLive,s=void 0!==i&&i,u=e.__experimentalOnClick,b=Object(v.useSelect)((function(e){return e(yr).getSettings()}),[]),f=Object(l.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zs(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return e.__experimentalBlockPatterns=[],e}),[b]),p=Object(l.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(l.createElement)(Ys,{value:p,settings:f},s?Object(l.createElement)(Xs,{onClick:u}):Object(l.createElement)(Qs,{viewportWidth:c,__experimentalPadding:r})):null}));function eu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nu=function(e){var t,n,r=e.item,o=r.name,c=r.title,i=r.icon,a=r.description,s=r.initialAttributes,u=Object(p.getBlockType)(o),d=Object(p.isReusableBlock)(r);return Object(l.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(l.createElement)("div",{className:"block-editor-inserter__preview"},d||u.example?Object(l.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(l.createElement)(Js,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=u.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:u.example?Object(p.getBlockFromExample)(r.name,{attributes:tu(tu({},u.example.attributes),s),innerBlocks:u.example.innerBlocks}):Object(p.createBlock)(o,s)})):Object(l.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(k.__)("No Preview Available."))),!d&&Object(l.createElement)(Ks,{title:c,icon:i,description:a}))},ru=Object(l.createContext)();function ou(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ou(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ou(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iu=Object(l.forwardRef)((function(e,t){var n=e.isFirst,r=e.as,o=e.children,c=Object(j.a)(e,["isFirst","as","children"]),a=Object(l.useContext)(ru);return Object(l.createElement)(m.__unstableCompositeItem,Object(i.a)({ref:t,state:a,role:"option",focusable:!0},c),(function(e){var t=cu(cu({},e),{},{tabIndex:n?0:e.tabIndex});return r?Object(l.createElement)(r,t,o):"function"==typeof o?o(t):Object(l.createElement)(m.Button,t,o)}))})),au=Object(l.createElement)(Ir.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(l.createElement)(Ir.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function lu(e){var t=e.count,n=e.icon;return Object(l.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(l.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(l.createElement)(m.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(l.createElement)(m.FlexItem,null,n?Object(l.createElement)(hl,{icon:n}):Object(k.sprintf)(
30
  /* translators: %d: Number of blocks. */
31
  Object(k._n)("%d block","%d blocks",t),t)),Object(l.createElement)(m.FlexItem,null,Object(l.createElement)(hl,{icon:au})))))}var su=function(e){var t=e.isEnabled,n=e.blocks,r=e.icon,o=e.children,c={type:"inserter",blocks:n};return Object(l.createElement)(m.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:c,__experimentalDragComponent:Object(l.createElement)(lu,{count:n.length,icon:r})},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};function uu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.navigator.platform;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var du=Object(l.memo)((function(e){var t=e.className,n=e.isFirst,r=e.item,o=e.onSelect,c=e.onHover,a=e.isDraggable,s=Object(j.a)(e,["className","isFirst","item","onSelect","onHover","isDraggable"]),d=Object(l.useRef)(!1),b=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},f=Object(l.useMemo)((function(){return[Object(p.createBlock)(r.name,r.initialAttributes,Object(p.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]}),[r.name,r.initialAttributes,r.initialAttributes]);return Object(l.createElement)(su,{isEnabled:a&&!r.disabled,blocks:f,icon:r.icon},(function(e){var a=e.draggable,f=e.onDragStart,p=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:a,onDragStart:function(e){d.current=!0,f&&(c(null),f(e))},onDragEnd:function(e){d.current=!1,p&&p(e)}},Object(l.createElement)(iu,Object(i.a)({isFirst:n,className:u()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:function(e){e.preventDefault(),o(r,uu()?e.metaKey:e.ctrlKey),c(null)},onKeyDown:function(e){e.keyCode===li.ENTER&&(e.preventDefault(),o(r,uu()?e.metaKey:e.ctrlKey),c(null))},onFocus:function(){d.current||c(r)},onMouseEnter:function(){d.current||c(r)},onMouseLeave:function(){return c(null)},onBlur:function(){return c(null)}},s),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:b},Object(l.createElement)(hl,{icon:r.icon,showColors:!0})),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))})),bu=Object(l.forwardRef)((function(e,t){var n=Object(l.useState)(!1),r=Object(Co.a)(n,2),o=r[0],c=r[1];return Object(l.useEffect)((function(){o&&Object(Rt.speak)(Object(k.__)("Use left and right arrow keys to move through blocks"))}),[o]),Object(l.createElement)("div",Object(i.a)({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:function(){c(!0)},onBlur:function(e){!e.currentTarget.contains(e.relatedTarget)&&c(!1)}},e))})),fu=Object(l.forwardRef)((function(e,t){var n=Object(l.useContext)(ru);return Object(l.createElement)(m.__unstableCompositeGroup,Object(i.a)({state:n,role:"presentation",ref:t},e))})),pu=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,c=void 0===o?function(){}:o,i=e.children,a=e.label,s=e.isDraggable,u=void 0===s||s;return Object(l.createElement)(bu,{className:"block-editor-block-types-list","aria-label":a},function(e,t){for(var n=[],r=0,o=e.length;r<o;r+=3)n.push(e.slice(r,r+3));return n}(n).map((function(e,t){return Object(l.createElement)(fu,{key:t},e.map((function(e,n){return Object(l.createElement)(du,{key:e.id,item:e,className:Object(p.getBlockMenuDefaultClassName)(e.id),onSelect:r,onHover:c,isDraggable:u,isFirst:0===t&&0===n})})))})),i)},mu=function(e){var t=e.title,n=e.icon,r=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(l.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(l.createElement)(m.Icon,{icon:n})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},r))},vu=function(e){var t=e.children,n=Object(m.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return Object(l.createElement)(ru.Provider,{value:n},t)};function Ou(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var gu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=Ol(t,n),i=Object(Co.a)(c,4),s=i[0],u=i[1],b=i[2],f=i[3],p=Object(l.useMemo)((function(){return Object(d.orderBy)(s,["frecency"],["desc"]).slice(0,6)}),[s]),m=Object(l.useMemo)((function(){return s.filter((function(e){return!e.category}))}),[s]),v=Object(l.useMemo)((function(){return Object(d.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(e){return Object(d.groupBy)(e,"category")}))(s)}),[s]),O=Object(l.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ou(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return Object.keys(b).forEach((function(t){e[t]=s.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[s,b]);return Object(l.useEffect)((function(){return function(){return r(null)}}),[]),Object(l.createElement)(vu,null,Object(l.createElement)("div",null,o&&!!p.length&&Object(l.createElement)(mu,{title:Object(k._x)("Most used","blocks")},Object(l.createElement)(pu,{items:p,onSelect:f,onHover:r,label:Object(k._x)("Most used","blocks")})),Object(d.map)(u,(function(e){var t=v[e.slug];return t&&t.length?Object(l.createElement)(mu,{key:e.slug,title:e.title,icon:e.icon},Object(l.createElement)(pu,{items:t,onSelect:f,onHover:r,label:e.title})):null})),m.length>0&&Object(l.createElement)(mu,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(k.__)("Uncategorized")},Object(l.createElement)(pu,{items:m,onSelect:f,onHover:r,label:Object(k.__)("Uncategorized")})),Object(d.map)(b,(function(e,t){var n=O[t];return n&&n.length?Object(l.createElement)(mu,{key:t,title:e.title,icon:e.icon},Object(l.createElement)(pu,{items:n,onSelect:f,onHover:r,label:e.title})):null}))))},hu=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:u()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(l.createElement)(m.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(k.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},onBlur:function(e){null!=e&&e.relatedTarget||e.stopPropagation()},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},ju=n(45),yu=function(e,t){var n=Object(v.useSelect)((function(e){var n=e(yr),r=n.__experimentalGetAllowedPatterns,o=n.getSettings;return{patterns:r(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),r=n.patternCategories,o=n.patterns,c=Object(v.useDispatch)(ju.store).createSuccessNotice;return[o,r,Object(l.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),c(Object(k.sprintf)(
32
  /* translators: %s: block pattern title. */
33
- Object(k.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function ku(e){var t=e.isDraggable,n=e.pattern,r=e.onClick,o=e.composite,c=n.name,a=n.viewportWidth,s=Object(v.useSelect)((function(e){return e(yr).__experimentalGetParsedPattern(c)}),[c]).blocks,u=Object(b.useInstanceId)(ku),d="block-editor-block-patterns-list__item-description-".concat(u);return Object(l.createElement)(su,{isEnabled:t,blocks:s},(function(e){var t=e.draggable,c=e.onDragStart,u=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?d:void 0,draggable:t,onDragStart:c,onDragEnd:u},Object(l.createElement)(m.__unstableCompositeItem,Object(i.a)({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:function(){return r(n,s)}}),Object(l.createElement)(Js,{blocks:s,viewportWidth:a}),Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&Object(l.createElement)(m.VisuallyHidden,{id:d},n.description)))}))}function _u(){return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Eu=function(e){var t=e.isDraggable,n=e.blockPatterns,r=e.shownPatterns,o=e.onClickPattern,c=e.orientation,a=e.label,s=void 0===a?Object(k.__)("Block Patterns"):a,u=Object(m.__unstableUseCompositeState)({orientation:c});return Object(l.createElement)(m.__unstableComposite,Object(i.a)({},u,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((function(e){return r.includes(e)?Object(l.createElement)(ku,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:u}):Object(l.createElement)(_u,{key:e.name})})))};function wu(e){var t=e.rootClientId,n=e.onInsert,r=e.selectedCategory,o=e.onClickCategory,c=yu(n,t),i=Object(Co.a)(c,3),a=i[0],s=i[1],u=i[2],f=Object(l.useMemo)((function(){return s.filter((function(e){return a.some((function(t){var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)}))}))}),[a,s]),p=r||f[0];Object(l.useEffect)((function(){a.some((function(e){return m(e)===1/0}))&&!f.find((function(e){return"uncategorized"===e.name}))&&f.push({name:"uncategorized",label:Object(k._x)("Uncategorized")})}),[f,a]);var m=Object(l.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(d.fromPairs)(f.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(y.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[f]),v=Object(l.useMemo)((function(){return a.filter((function(e){return"uncategorized"===p.name?m(e)===1/0:e.categories&&e.categories.includes(p.name)}))}),[a,p]),O=Object(l.useMemo)((function(){return v.sort((function(e,t){return m(e)-m(t)}))}),[v,m]),g=Object(b.useAsyncList)(O);return Object(l.createElement)(l.Fragment,null,!!v.length&&Object(l.createElement)(hu,{selectedCategory:p,patternCategories:f,onClickCategory:o},Object(l.createElement)(Eu,{shownPatterns:g,blockPatterns:v,onClickPattern:u,label:p.label,orientation:"vertical",isDraggable:!0})))}var Cu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onClickCategory,o=e.selectedCategory;return Object(l.createElement)(wu,{rootClientId:t,selectedCategory:o,onInsert:n,onClickCategory:r})},Su=n(31),Bu=function(){return Object(l.createElement)("div",{className:"block-editor-inserter__no-results"},Object(l.createElement)(ra.a,{className:"block-editor-inserter__no-results-icon",icon:gl.a}),Object(l.createElement)("p",null,Object(k.__)("No results found.")))};function Iu(e){var t=e.onHover,n=e.onInsert,r=e.rootClientId,o=Ol(r,n),c=Object(Co.a)(o,4),i=c[0],a=c[3],s=Object(l.useMemo)((function(){return i.filter((function(e){return"reusable"===e.category}))}),[i]);return 0===s.length?Object(l.createElement)(Bu,null):Object(l.createElement)(mu,{title:Object(k.__)("Reusable blocks")},Object(l.createElement)(pu,{items:s,onSelect:a,onHover:t,label:Object(k.__)("Reusable blocks")}))}var xu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Iu,{onHover:r,onInsert:n,rootClientId:t}),Object(l.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(l.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(Su.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(k.__)("Manage Reusable blocks"))))},Pu=Object(m.createSlotFill)("__experimentalInserterMenuExtension"),Tu=Pu.Fill,Nu=Pu.Slot;Tu.Slot=Nu;var Du=Tu,Au=function(e){var t=e.rootClientId,n=e.insertionIndex,r=e.clientId,o=e.isAppender,c=e.onSelect,i=e.shouldFocusBlock,a=void 0===i||i,s=Object(v.useSelect)((function(e){var c,i,a=e(yr),l=a.getSelectedBlock,s=a.getBlockIndex,u=a.getBlockOrder,d=a.getBlockInsertionPoint;if(t||n||r||o)c=t,i=n||(r?s(r,c):u(c).length);else{var b=d();c=b.rootClientId,i=b.index}return{getSelectedBlock:l,destinationRootClientId:c,destinationIndex:i}}),[t,n,r,o]),u=s.destinationRootClientId,b=s.destinationIndex,f=s.getSelectedBlock,m=Object(v.useDispatch)(yr),O=m.replaceBlocks,g=m.insertBlocks,h=m.showInsertionPoint,j=m.hideInsertionPoint,y=Object(l.useCallback)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=f();!o&&r&&Object(p.isUnmodifiedDefaultBlock)(r)?O(r.clientId,e,null,a||n?0:null,t):g(e,b,u,!0,a||n?0:null,t);var i=Object(k.sprintf)(// translators: %d: the name of the block that has been added
34
- Object(k._n)("%d block added.","%d blocks added.",Object(d.castArray)(e).length),Object(d.castArray)(e).length);Object(Rt.speak)(i),c&&c()}),[o,f,O,g,u,b,c,a]),_=Object(l.useCallback)((function(e){e?h(u,b):j()}),[h,j,u,b]);return[u,y,_]},Lu=function(e){var t=e.filterValue,n=e.onSelect,r=e.onHover,o=e.rootClientId,c=e.clientId,i=e.isAppender,a=e.maxBlockPatterns,s=e.maxBlockTypes,u=e.showBlockDirectory,f=void 0!==u&&u,p=e.isDraggable,v=void 0===p||p,O=e.shouldFocusBlock,g=void 0===O||O,h=Object(b.useDebounce)(Rt.speak,500),j=Au({onSelect:n,rootClientId:o,clientId:c,isAppender:i,shouldFocusBlock:g}),y=Object(Co.a)(j,2),_=y[0],E=y[1],w=Ol(_,E),C=Object(Co.a)(w,4),S=C[0],B=C[1],I=C[2],x=C[3],P=yu(E,_),T=Object(Co.a)(P,3),N=T[0],D=T[2],A=Object(l.useMemo)((function(){var e=pl(Object(d.orderBy)(S,["frecency"],["desc"]),B,I,t);return void 0!==s?e.slice(0,s):e}),[t,S,B,I,s]),L=Object(l.useMemo)((function(){var e=ml(N,t);return void 0!==a?e.slice(0,a):e}),[t,N,a]);Object(l.useEffect)((function(){if(t){var e=A.length+L.length,n=Object(k.sprintf)(
35
  /* translators: %d: number of results. */
36
  Object(k._n)("%d result found.","%d results found.",e),e);h(n)}}),[t,h]);var R=Object(b.useAsyncList)(L),M=!Object(d.isEmpty)(A)||!Object(d.isEmpty)(L);return Object(l.createElement)(vu,null,!f&&!M&&Object(l.createElement)(Bu,null),!!A.length&&Object(l.createElement)(mu,{title:Object(l.createElement)(m.VisuallyHidden,null,Object(k.__)("Blocks"))},Object(l.createElement)(pu,{items:A,onSelect:x,onHover:r,label:Object(k.__)("Blocks"),isDraggable:v})),!!A.length&&!!L.length&&Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!L.length&&Object(l.createElement)(mu,{title:Object(l.createElement)(m.VisuallyHidden,null,Object(k.__)("Block Patterns"))},Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(l.createElement)(Eu,{shownPatterns:R,blockPatterns:L,onClickPattern:D,isDraggable:v}))),f&&Object(l.createElement)(Du.Slot,{fillProps:{onSelect:x,onHover:r,filterValue:t,hasItems:M,rootClientId:_}},(function(e){return e.length?e:M?null:Object(l.createElement)(Bu,null)})))},Ru={name:"blocks",
37
  /* translators: Blocks tab title in the block inserter. */
@@ -42,41 +42,41 @@ title:Object(k.__)("Patterns")},Fu={name:"reusable",
42
  title:Object(k.__)("Reusable")},Vu=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,a=Object(l.useMemo)((function(){var e=[Ru];return r&&e.push(Mu),c&&e.push(Fu),e}),[Ru,r,Mu,c,Fu]);return Object(l.createElement)(m.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},Hu=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalInsertionIndex,c=e.onSelect,i=e.showInserterHelpPanel,a=e.showMostUsedBlocks,s=e.shouldFocusBlock,u=void 0===s||s,d=Object(l.useState)(""),b=Object(Co.a)(d,2),f=b[0],p=b[1],O=Object(l.useState)(null),g=Object(Co.a)(O,2),h=g[0],j=g[1],y=Object(l.useState)(null),_=Object(Co.a)(y,2),E=_[0],w=_[1],C=Au({rootClientId:t,clientId:n,isAppender:r,insertionIndex:o,shouldFocusBlock:u}),S=Object(Co.a)(C,3),B=S[0],I=S[1],x=S[2],P=Object(v.useSelect)((function(e){var t,n=e(yr),r=n.__experimentalGetAllowedPatterns,o=n.getSettings;return{showPatterns:!B||!!r(B).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[B]),T=P.showPatterns,N=P.hasReusableBlocks,D=Object(l.useCallback)((function(e,t,n){I(e,t,n),c()}),[I,c]),A=Object(l.useCallback)((function(e,t){I(e,{patternName:t}),c()}),[I,c]),L=Object(l.useCallback)((function(e){x(!!e),j(e)}),[x,j]),R=Object(l.useCallback)((function(e){w(e)}),[w]),M=Object(l.useMemo)((function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__block-list"},Object(l.createElement)(gu,{rootClientId:B,onInsert:D,onHover:L,showMostUsedBlocks:a})),i&&Object(l.createElement)("div",{className:"block-editor-inserter__tips"},Object(l.createElement)(m.VisuallyHidden,{as:"h2"},Object(k.__)("A tip for using the block editor")),Object(l.createElement)(zs,null)))}),[B,D,L,f,a,i]),F=Object(l.useMemo)((function(){return Object(l.createElement)(Cu,{rootClientId:B,onInsert:A,onClickCategory:R,selectedCategory:E})}),[B,A,R,E]),V=Object(l.useMemo)((function(){return Object(l.createElement)(xu,{rootClientId:B,onInsert:D,onHover:L})}),[B,D,L]),H=Object(l.useCallback)((function(e){return"blocks"===e.name?M:"patterns"===e.name?F:V}),[M,F,V]);return Object(l.createElement)("div",{className:"block-editor-inserter__menu"},Object(l.createElement)("div",{className:"block-editor-inserter__main-area"},Object(l.createElement)("div",{className:"block-editor-inserter__content"},Object(l.createElement)(Ws,{onChange:function(e){h&&j(null),p(e)},value:f,label:Object(k.__)("Search for blocks and patterns"),placeholder:Object(k.__)("Search")}),!!f&&Object(l.createElement)(Lu,{filterValue:f,onSelect:c,onHover:L,rootClientId:t,clientId:n,isAppender:r,showBlockDirectory:!0,shouldFocusBlock:u}),!f&&(T||N)&&Object(l.createElement)(Vu,{showPatterns:T,showReusableBlocks:N},H),!f&&!T&&!N&&M)),i&&h&&Object(l.createElement)(nu,{item:h}))};function zu(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=Object(l.useState)(""),i=Object(Co.a)(c,2),a=i[0],s=i[1],d=Au({onSelect:t,rootClientId:n,clientId:r,isAppender:o}),b=Object(Co.a)(d,2),f=b[0],p=b[1],O=Ol(f,p),g=Object(Co.a)(O,1)[0],h=yu(p,f),j=Object(Co.a)(h,1)[0],y=j.length&&!!a,_=y&&j.length>6||g.length>6,E=Object(v.useSelect)((function(e){var t=e(yr),o=t.getSettings,c=t.getBlockIndex;return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,blockIndex:c(r,n)}}),[r,n]),w=E.setInserterIsOpened,C=E.blockIndex;Object(l.useEffect)((function(){w&&w(!1)}),[w]);var S=Object(v.useDispatch)(yr).__unstableSetInsertionPoint;return Object(l.createElement)("div",{className:u()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":w})},_&&Object(l.createElement)(Ws,{value:a,onChange:function(e){s(e)},label:Object(k.__)("Search for blocks and patterns"),placeholder:Object(k.__)("Search")}),Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(l.createElement)(Lu,{filterValue:a,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:y?2:0,maxBlockTypes:6,isDraggable:!1})),w&&Object(l.createElement)(m.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){S(n,C),w(!0)},"aria-label":Object(k.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(k.__)("Browse all")))}var Gu=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,a=e.hasSingleBlockType,s=e.toggleProps,u=void 0===s?{}:s;t=a?Object(k.sprintf)(// translators: %s: the name of the block when there is only one
43
  Object(k._x)("Add %s","directly add the only allowed block"),c):Object(k._x)("Add block","Generic label for block inserter button");var d=u.onClick,b=Object(j.a)(u,["onClick"]);return Object(l.createElement)(m.Button,Object(i.a)({icon:Vs.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&o,disabled:r},b))},Uu=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(){var e;return Object(pa.a)(this,o),(e=r.apply(this,arguments)).onToggle=e.onToggle.bind(Object(va.a)(e)),e.renderToggle=e.renderToggle.bind(Object(va.a)(e)),e.renderContent=e.renderContent.bind(Object(va.a)(e)),e}return Object(ma.a)(o,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,a=r.toggleProps,l=r.hasItems,s=r.renderToggle;return(void 0===s?Gu:s)({onToggle:t,isOpen:n,disabled:o||!l,blockTitle:c,hasSingleBlockType:i,toggleProps:a})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel;return n.__experimentalIsQuick?Object(l.createElement)(zu,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c}):Object(l.createElement)(Hu,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick,c=e.onSelectOrClose;return n?this.renderToggle({onToggle:r}):Object(l.createElement)(m.Dropdown,{className:"block-editor-inserter",contentClassName:u()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(k.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:c})}}]),o}(l.Component),Wu=Object(b.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e(yr),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e(p.store).getBlockVariations,s=a(r=r||c(n)||void 0),u=1===Object(d.size)(s)&&0===Object(d.size)(l(s[0].name,"inserter")),b=!1;return u&&(b=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:b?b.title:"",allowedBlockType:b,rootClientId:r}})),Object(v.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,c=t.isAppender,i=t.hasSingleBlockType,a=t.allowedBlockType,l=t.onSelectOrClose;if(i){(0,e(yr).insertBlock)(Object(p.createBlock)(a.name),function(){var e=r(yr),t=e.getBlockIndex,i=e.getBlockSelectionEnd,a=e.getBlockOrder,l=e.getBlockRootClientId;if(o)return t(o,n);var s=i();return!c&&s&&l(s)===n?t(s,n)+1:a(n).length}(),n),l&&l();var s=Object(k.sprintf)(// translators: %s: the name of the block that has been added
44
  Object(k.__)("%s block added"),a.title);Object(Rt.speak)(s)}}}})),Object(b.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Uu),Ku=Object(b.compose)(Object(v.withSelect)((function(e,t){var n=e(yr),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,i=n.getSettings,a=n.getTemplateLock,l=!r(t.rootClientId),s=o(t.lastBlockClientId)===Object(p.getDefaultBlockName)(),u=c(t.lastBlockClientId),d=i().bodyPlaceholder;return{isVisible:l||!s||!u,showPrompt:l,isLocked:!!a(t.rootClientId),placeholder:d}})),Object(v.withDispatch)((function(e,t){var n=e(yr),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}})))((function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,c=e.placeholder,i=e.rootClientId;if(t||!n)return null;var a=Object(Fs.decodeEntities)(c)||Object(k.__)("Type / to choose a block");return Object(l.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(l.createElement)(hs.a,{role:"button","aria-label":Object(k.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(l.createElement)(Wu,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))})),qu=Object(l.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.onFocus,c=e.tabIndex;return Object(l.createElement)(Wu,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:function(e){var n,i=e.onToggle,a=e.disabled,s=e.isOpen,d=e.blockTitle,b=e.hasSingleBlockType;n=b?Object(k.sprintf)(// translators: %s: the name of the block when there is only one
45
- Object(k._x)("Add %s","directly add the only allowed block"),d):Object(k._x)("Add block","Generic label for block inserter button");var f=!b,p=Object(l.createElement)(m.Button,{ref:t,onFocus:o,tabIndex:c,className:u()(r,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:a,label:n},!b&&Object(l.createElement)(m.VisuallyHidden,{as:"span"},n),Object(l.createElement)(ra.a,{icon:Vs.a}));return(f||b)&&(p=Object(l.createElement)(m.Tooltip,{text:n},p)),p},isAppender:!0})}));function $u(e){e.stopPropagation()}Object(l.createContext)();var Yu=Object(v.withSelect)((function(e,t){var n=t.rootClientId,r=e(yr),o=r.getBlockOrder,c=r.canInsertBlockType,i=r.getTemplateLock,a=r.getSelectedBlockClientId;return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(p.getDefaultBlockName)(),n),selectedBlockClientId:a()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,s=e.selectedBlockClientId,b=e.tagName,f=void 0===b?"div":b;if(c||!1===i)return null;if(i)t=Object(l.createElement)(i,null);else{var p=!r,m=s===r,v=s&&!n.includes(s);if(!p&&!m&&(!s||v))return null;t=o?Object(l.createElement)(Ku,{rootClientId:r,lastBlockClientId:Object(d.last)(n)}):Object(l.createElement)(qu,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(l.createElement)(f,{tabIndex:-1,onFocus:$u,className:u()("block-list-appender","wp-block",a)},t)}));function Xu(e,t){var n=Object(v.useSelect)((function(e){var t=e(yr);return{canInsertBlockType:t.canInsertBlockType,getBlockIndex:t.getBlockIndex,getClientIdsOfDescendants:t.getClientIdsOfDescendants,hasUploadPermissions:(0,t.getSettings)().mediaUpload}}),[]),r=n.canInsertBlockType,o=n.getBlockIndex,c=n.getClientIdsOfDescendants,i=n.hasUploadPermissions,a=Object(v.useDispatch)(yr),l=a.insertBlocks,s=a.moveBlocksToPosition,u=a.updateBlockAttributes,d=function(e,t,n,r,o,c,i){return function(a){var l=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(a),s=l.srcRootClientId,u=l.srcClientIds,d=l.type,b=l.blocks;if("inserter"===d&&(i(),c(b,t,e,!0,null)),"block"===d){var f=n(u[0],s);if(s===e&&f===t)return;if(u.includes(e)||r(u).some((function(t){return t===e})))return;var p=s===e,m=u.length;o(u,s,e,p&&f<t?t-m:t)}}}(e,t,o,c,s,l,a.clearSelectedBlock),b=function(e,t,n,r,o,c){return function(i){if(n){var a=Object(p.findTransform)(Object(p.getBlockTransforms)("from"),(function(t){return"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)}));if(a){var l=a.transform(i,r);c(l,t,e)}}}}(e,t,i,u,r,l),f=function(e,t,n){return function(r){var o=Object(p.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}(e,t,l);return function(e){var t=Object(Wl.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?b(t):n?f(n):d(e)}}function Qu(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,s=o?t.left:t.top,u=o?t.right:t.bottom,d=t[n];return r=a>=s&&a<=u?a:a<u?s:u,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function Zu(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=Qu(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function Ju(e,t,n){var r,o,c="horizontal"===n?["left","right"]:["top","bottom"];return e.forEach((function(n,i){if(n.classList.contains("wp-block")){var a=n.getBoundingClientRect(),l=Zu(t,a,c),s=Object(Co.a)(l,2),u=s[0],d=s[1];if(void 0===o||u<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=u,r=i+(f+=p?1:0)}}})),r}function ed(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.rootClientId,n=void 0===t?"":t,r=Object(l.useState)(null),o=Object(Co.a)(r,2),c=o[0],i=o[1],a=Object(v.useSelect)((function(e){var t,r=e(yr),o=r.getBlockListSettings;return{isLockedAll:"all"===(0,r.getTemplateLock)(n),orientation:null===(t=o(n))||void 0===t?void 0:t.orientation}}),[n]),s=a.isLockedAll,u=a.orientation,d=Object(v.useDispatch)("core/block-editor"),f=d.showInsertionPoint,p=d.hideInsertionPoint,m=Xu(n,c),O=Object(b.useThrottle)(Object(l.useCallback)((function(e,t){var r=Ju(Array.from(t.children),{x:e.clientX,y:e.clientY},u);i(void 0===r?0:r),null!==r&&f(n,r)}),[]),200);return Object(b.__experimentalUseDropZone)({isDisabled:s,onDrop:m,onDragOver:function(e){O(e,e.currentTarget)},onDragEnd:function(){O.cancel(),p(),i(null)}})}function td(e){var t=e.clientId,n=e.rootClientId,r=e.setIsInserterForced;return Object(l.createElement)("div",{className:u()("block-editor-block-list__insertion-point-inserter")},Object(l.createElement)(Wu,{position:"bottom center",clientId:t,rootClientId:n,__experimentalIsQuick:!0,onToggle:r,onSelectOrClose:function(){return r(!1)}}))}function nd(e){var t=e.clientId,n=e.selectedRootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,s=Object(v.useDispatch)(yr).selectBlock,d=Object(l.useRef)(),b=Object(v.useSelect)((function(e){var r,o=e(yr),c=o.getBlockOrder,a=o.getBlockRootClientId,l=o.getBlockListSettings,s=o.getMultiSelectedBlockClientIds,u=o.getSelectedBlockClientId,d=o.hasMultiSelection,b=o.getSettings,f=i.current.ownerDocument,p=t?a(t):n,m=c(p);if(!m.length)return{};var v=t||m[m.length-1],O=v===m[m.length-1]?null:m[m.indexOf(v)+1],g=b().hasReducedUI,h=s(),j=u(),y=(null===(r=l(p))||void 0===r?void 0:r.orientation)||"vertical";return{previousElement:Sc(v,f),nextElement:Sc(O,f),nextClientId:O,isHidden:g||(d()?O&&h.includes(O):O&&"vertical"===y&&O===j),orientation:y,rootClientId:p}}),[t,n]),f=b.previousElement,p=b.nextElement,O=b.orientation,g=b.isHidden,h=b.nextClientId,j=b.rootClientId,y=Object(l.useMemo)((function(){if(!f)return{};var e=f.getBoundingClientRect(),t=p?p.getBoundingClientRect():null;if("vertical"===O)return{width:f.offsetWidth,height:t?t.top-e.bottom:0};var n=0;return p&&(n=Object(k.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:f.offsetHeight}}),[f,p]),_=Object(l.useCallback)((function(){var e=f.getBoundingClientRect(),t=p?p.getBoundingClientRect():null;return"vertical"===O?Object(k.isRTL)()?{top:e.bottom,left:e.right,right:e.left,bottom:t?t.top:e.bottom}:{top:e.bottom,left:e.left,right:e.right,bottom:t?t.top:e.bottom}:Object(k.isRTL)()?{top:e.top,left:t?t.right:e.left,right:e.left,bottom:e.bottom}:{top:e.top,left:e.right,right:t?t.left:e.right,bottom:e.bottom}}),[f,p]);if(!f)return null;var E=u()("block-editor-block-list__insertion-point","is-"+O),w=!g&&p&&(r||o),C=w||!g&&a;return Object(l.createElement)(m.Popover,{noArrow:!0,animate:!1,getAnchorRect:_,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(l.createElement)("div",{ref:d,tabIndex:-1,onClick:function(e){e.target===d.current&&h&&s(h,-1)},onFocus:function(e){e.target!==d.current&&c(!0)},className:u()(E,{"is-with-inserter":w}),style:y},C&&Object(l.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),w&&Object(l.createElement)(td,{rootClientId:j,clientId:h,setIsInserterForced:c})))}var rd=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,s=e.onDragStart,u=e.onDragEnd,d=e.elementId,b=Object(v.useSelect)((function(e){var t,n=e(yr),r=n.getBlockRootClientId,o=n.getTemplateLock,c=n.getBlockName,a=r(i[0]),l=a?o(a):null,s=c(i[0]);return{srcRootClientId:a,isDraggable:"all"!==l,icon:null===(t=Object(p.getBlockType)(s))||void 0===t?void 0:t.icon}}),[i]),f=b.srcRootClientId,O=b.isDraggable,g=b.icon,h=Object(l.useRef)(!1),j=(t=Object(l.useRef)(null),n=Object(l.useRef)(null),r=Object(l.useRef)(null),o=Object(l.useRef)(null),Object(l.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(l.useCallback)((function(e){t.current=e.clientY,r.current=Object(Wl.getScrollContainer)(e.target),o.current=setInterval((function(){if(r.current&&n.current){var e=r.current.scrollTop+n.current;r.current.scroll({top:e})}}),25)}),[]),Object(l.useCallback)((function(e){if(r.current){var o=r.current.offsetHeight,c=t.current-r.current.offsetTop,i=e.clientY-r.current.offsetTop;if(e.clientY>c){var a=Math.max(o-c-50,0),l=Math.max(i-c-50,0)/a;n.current=25*l}else if(e.clientY<c){var s=Math.max(c-50,0),u=Math.max(c-i-50,0)/s;n.current=-25*u}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),y=Object(Co.a)(j,3),k=y[0],_=y[1],E=y[2],w=Object(v.useDispatch)(yr),C=w.startDraggingBlocks,S=w.stopDraggingBlocks;if(Object(l.useEffect)((function(){return function(){h.current&&S()}}),[]),!O)return c({isDraggable:!1});var B={type:"block",srcClientIds:i,srcRootClientId:f};return Object(l.createElement)(m.Draggable,{cloneClassname:a,elementId:d,__experimentalTransferDataType:"wp-blocks",transferData:B,onDragStart:function(e){C(i),h.current=!0,k(e),s&&s()},onDragOver:_,onDragEnd:function(){S(),h.current=!1,E(),u&&u()},__experimentalDragComponent:Object(l.createElement)(lu,{count:i.length,icon:g})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({draggable:!0,onDragStart:t,onDragEnd:n})}))};function od(e){var t=e(yr),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksEndClientId,o=t.getPreviousBlockClientId,c=t.getNextBlockClientId,i=t.hasBlockMovingClientId,a=t.getBlockIndex,l=t.getBlockRootClientId,s=t.getClientIdsOfDescendants,u=t.canInsertBlockType,d=t.getBlockName,b=n(),f=r();return{selectedBlockClientId:b,selectionBeforeEndClientId:o(f||b),selectionAfterEndClientId:c(f||b),hasBlockMovingClientId:i,getBlockIndex:a,getBlockRootClientId:l,getClientIdsOfDescendants:s,canInsertBlockType:u,getBlockName:d}}var cd=function(e){var t=e.clientId,n=e.rootClientId,r=e.blockElement,o=Cl(t),c=Object(v.useSelect)((function(e){var r,o=e(yr),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,s=i(t,n),u=c(t);return{index:s,name:u.name,attributes:u.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),a=c.index,s=c.name,d=c.attributes,b=c.blockMovingMode,f=c.orientation,O=Object(v.useDispatch)(yr),g=O.setNavigationMode,h=O.removeBlock,j=Object(l.useRef)();Object(l.useEffect)((function(){j.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(Rt.speak)(L)}),[]);var y=Object(v.useSelect)(od,[]),_=y.selectedBlockClientId,E=y.selectionBeforeEndClientId,w=y.selectionAfterEndClientId,C=y.hasBlockMovingClientId,S=y.getBlockIndex,B=y.getBlockRootClientId,I=y.getClientIdsOfDescendants,x=Object(v.useDispatch)(yr),P=x.selectBlock,T=x.clearSelectedBlock,N=x.setBlockMovingClientId,D=x.moveBlockToPosition,A=Object(p.getBlockType)(s),L=Object(p.__experimentalGetAccessibleBlockLabel)(A,d,a+1,f),R=u()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!b}),M=Object(k.__)("Drag");return Object(l.createElement)("div",{className:R},Object(l.createElement)(m.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},Object(l.createElement)(m.FlexItem,null,Object(l.createElement)(hl,{icon:null==o?void 0:o.icon,showColors:!0})),Object(l.createElement)(m.FlexItem,null,Object(l.createElement)(rd,{clientIds:[t]},(function(e){return Object(l.createElement)(m.Button,Object(i.a)({icon:au,className:"block-selection-button_drag-handle","aria-hidden":"true",label:M,tabIndex:"-1"},e))}))),Object(l.createElement)(m.FlexItem,null,Object(l.createElement)(m.Button,{ref:j,onClick:function(){return g(!1)},onKeyDown:function(e){var n=e.keyCode,o=n===li.UP,c=n===li.DOWN,i=n===li.LEFT,a=n===li.RIGHT,l=n===li.TAB,s=n===li.ESCAPE,u=n===li.ENTER,d=n===li.SPACE,b=e.shiftKey;if(n===li.BACKSPACE||n===li.DELETE)return h(t),void e.preventDefault();var f,p=l&&b||o,m=l&&!b||c,v=i,O=a;if(p)f=E;else if(m)f=w;else if(v){var g;f=null!==(g=B(_))&&void 0!==g?g:_}else if(O){var j;f=null!==(j=I([_])[0])&&void 0!==j?j:_}var y=C();if(s&&y&&N(null),(u||d)&&y){var k=B(y),x=B(_),A=S(y,k),L=S(_,x);A<L&&k===x&&(L-=1),D(y,k,x,L),P(y),N(null)}if(m||p||v||O)if(f)e.preventDefault(),P(f);else if(l&&_){var R;m?(R=Wl.focus.tabbable.findNext(r))||(R=r.ownerDocument.defaultView.frameElement,R=Wl.focus.tabbable.findNext(R)):R=Wl.focus.tabbable.findPrevious(r),R&&(e.preventDefault(),R.focus(),T())}},label:L,className:"block-selection-button_select-button"},Object(l.createElement)(Sl,{clientId:t})))))};function id(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var ad=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(j.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),a=Object(l.useRef)(),s=function(e){var t=Object(l.useState)(!0),n=Object(Co.a)(t,2),r=n[0],o=n[1],c=Object(l.useCallback)((function(){var t=!Wl.focus.tabbable.find(e.current).some((function(e){return!("toolbarItem"in e.dataset)}));t||Ft()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(t)}),[]);return Object(l.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(a);return function(e,t,n,r,o){var c=Object(l.useState)(t),i=Object(Co.a)(c,1)[0],a=Object(l.useState)(r),s=Object(Co.a)(a,1)[0],u=Object(l.useCallback)((function(){var t,n,r;t=e.current,n=Wl.focus.tabbable.find(t),(r=Object(Co.a)(n,1)[0])&&r.focus()}),[]);Object(Vl.useShortcut)("core/block-editor/focus-toolbar",u,{bindGlobal:!0,eventName:"keydown"}),Object(l.useEffect)((function(){i&&u()}),[n,i,u]),Object(l.useEffect)((function(){var t=0;return s&&!i&&(t=window.requestAnimationFrame((function(){var t,n=id(e.current),r=s||0;n[r]&&(t=e.current).contains(t.ownerDocument.activeElement)&&n[r].focus()}))),function(){if(window.cancelAnimationFrame(t),o){var n=id(e.current).findIndex((function(e){return 0===e.tabIndex}));o(n)}}}),[s,i])}(a,n,s,r,o),s?Object(l.createElement)(m.Toolbar,Object(i.a)({label:c["aria-label"],ref:a},c),t):Object(l.createElement)(m.NavigableMenu,Object(i.a)({orientation:"horizontal",role:"toolbar",ref:a},c),t)},ld=Object(v.withSelect)((function(e,t){var n,r=t.clientIds,o=e(yr),c=o.getBlock,i=o.getBlockIndex,a=o.getBlockListSettings,l=o.getTemplateLock,s=o.getBlockOrder,u=o.getBlockRootClientId,b=Object(d.castArray)(r),f=Object(d.first)(b),m=c(f),v=u(Object(d.first)(b)),O=i(f,v),g=0===O,h=i(Object(d.last)(b),v)===s(v).length-1;return{blockType:m?Object(p.getBlockType)(m.name):null,isLocked:"all"===l(v),rootClientId:v,firstIndex:O,isFirst:g,isLast:h,orientation:null===(n=a(v))||void 0===n?void 0:n.orientation}}))((function(e){var t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,a=e.rootClientId,s=e.orientation,d=e.hideDragHandle,b=Object(l.useState)(!1),f=Object(Co.a)(b,2),p=f[0],v=f[1],O=function(){return v(!0)},g=function(){return v(!1)};if(o||t&&n&&!a)return null;var h=Object(k.__)("Drag");return Object(l.createElement)("div",{className:u()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===s})},!d&&Object(l.createElement)(rd,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){return Object(l.createElement)(m.Button,Object(i.a)({icon:au,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:h,tabIndex:"-1"},e))})),Object(l.createElement)(m.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(l.createElement)(m.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(os,Object(i.a)({clientIds:r},e))})),Object(l.createElement)(m.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(cs,Object(i.a)({clientIds:r},e))}))))})),sd=window,ud=sd.clearTimeout,dd=sd.setTimeout;function bd(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?d.noop:c,a=Object(l.useState)(!1),s=Object(Co.a)(a,2),u=s[0],b=s[1],f=Object(l.useRef)(),p=function(e){null!=t&&t.current&&b(e),i(e)},m=function(){var e=f.current;e&&ud&&ud(e)};return Object(l.useEffect)((function(){return function(){return m()}}),[]),{showMovers:u,debouncedShowMovers:function(e){e&&e.stopPropagation(),m(),u||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),m(),f.current=dd((function(){var e;e=(null==t?void 0:t.current)&&t.current.matches(":hover"),!n&&!e&&p(!1)}),o)}}}function fd(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?d.noop:o,i=Object(l.useState)(!1),a=Object(Co.a)(i,2),s=a[0],u=a[1],b=bd({ref:t,debounceTimeout:r,isFocused:s,onChange:c}),f=b.showMovers,p=b.debouncedShowMovers,m=b.debouncedHideMovers,v=Object(l.useRef)(!1),O=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(l.useEffect)((function(){var e=t.current,n=function(){O()&&(u(!0),p())},r=function(){O()||(u(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,u,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}function pd(){var e=Object(v.useDispatch)(yr),t=e.selectBlock,n=e.toggleBlockHighlight,r=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockName,r=t.getBlockParents,o=t.getSelectedBlockClientId,c=t.getSettings,i=e(p.store).hasBlockSupport,a=r(o()),l=a[a.length-1],s=n(l),u=Object(p.getBlockType)(s),d=c();return{firstParentClientId:l,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),o=r.firstParentClientId,c=r.shouldHide,a=r.hasReducedUI,s=Cl(o),u=Object(l.useRef)(),d=fd({ref:u,onChange:function(e){e&&a||n(o,e)}}).gestures;return c||void 0===o?null:Object(l.createElement)("div",Object(i.a)({className:"block-editor-block-parent-selector",key:o,ref:u},d),Object(l.createElement)(m.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return t(o)},label:Object(k.sprintf)(
46
  /* translators: %s: Name of the block's parent. */
47
- Object(k.__)("Select %s"),s.title),showTooltip:!0,icon:Object(l.createElement)(hl,{icon:s.icon})}))}var md=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function vd(e){var t=e.blocks;return Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(l.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(k.__)("Preview")),Object(l.createElement)(Js,{viewportWidth:500,blocks:t})))))}var Od=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect,o=e.blocks,c=Object(l.useState)(),i=Object(Co.a)(c,2),a=i[0],s=i[1];return Object(l.createElement)(m.MenuGroup,{label:Object(k.__)("Transform to"),className:t},a&&Object(l.createElement)(vd,{blocks:Object(p.switchToBlockType)(o,a)}),n.map((function(e){var t=e.name,n=e.icon,o=e.title,c=e.isDisabled;return Object(l.createElement)(m.MenuItem,{key:t,className:Object(p.getBlockMenuDefaultClassName)(t),onClick:function(e){e.preventDefault(),r(t)},disabled:c,onMouseLeave:function(){return s(null)},onMouseEnter:function(){return s(t)}},Object(l.createElement)(hl,{icon:n,showColors:!0}),o)})))};function gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yd={};function kd(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,s=e.itemRole,d=Object(l.useMemo)((function(){return jd(jd({},t),{},{attributes:jd(jd({},t.attributes),{},{className:a})})}),[t,a]);return Object(l.createElement)("div",{key:n.name,className:u()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){li.ENTER!==e.keyCode&&li.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:s||"button",tabIndex:"0","aria-label":n.label||n.name},Object(l.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(l.createElement)(Js,{viewportWidth:500,blocks:d})),Object(l.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var _d=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?d.noop:n,o=e.onHoverClassName,c=void 0===o?d.noop:o,i=e.itemRole,a=Object(v.useSelect)((function(e){var n=(0,e(yr).getBlock)(t);return n?{block:n,type:Object(p.getBlockType)(n.name),styles:(0,e(p.store).getBlockStyles)(n.name),className:n.attributes.className||""}:yd}),[t]),s=a.styles,u=a.block,b=a.type,f=a.className,m=Object(v.useDispatch)(yr).updateBlockAttributes,O=function(e,t){return Object(l.useMemo)((function(){var n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?Object(p.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?Object(p.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(u,b);if(!s||0===s.length)return null;var g=Object(d.find)(s,"isDefault")?s:[{name:"default",label:Object(k._x)("Default","block style"),isDefault:!0}].concat(Object(y.a)(s)),h=function(e,t){var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return gd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(new Ii.a(t).values());try{for(r.s();!(n=r.n()).done;){var o=n.value;if(-1!==o.indexOf("is-style-")){var c=o.substring(9),i=Object(d.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(d.find)(e,"isDefault")}(g,f);return Object(l.createElement)("div",{className:"block-editor-block-styles"},g.map((function(e){var n=function(e,t,n){var r=new Ii.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(f,h,e);return Object(l.createElement)(kd,{genericPreviewBlock:O,className:f,isActive:h===e,key:e.name,onSelect:function(){m(t,{className:n}),c(null),r()},onBlur:function(){return c(null)},onHover:function(){return c(n)},style:e,styleClassName:n,itemRole:i})})))};function Ed(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ed(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ed(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cd(e){var t=e.hoveredBlock,n=e.onSwitch,r=t.name,o=t.clientId,c=Object(l.useState)(),i=Object(Co.a)(c,2),a=i[0],s=i[1],u=Object(v.useSelect)((function(e){return e(p.store).getBlockType(r)}),[r]);return Object(l.createElement)(m.MenuGroup,{label:Object(k.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},a&&Object(l.createElement)(vd,{blocks:u.example?Object(p.getBlockFromExample)(u.name,{attributes:wd(wd({},u.example.attributes),{},{className:a}),innerBlocks:u.example.innerBlocks}):Object(p.cloneBlock)(t,{className:a})}),Object(l.createElement)(_d,{clientId:o,onSwitch:n,onHoverClassName:s,itemRole:"menuitem"}))}function Sd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Bd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Bd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Id=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,o=t.clientId,c=t.name,i=t.innerBlocks,a=void 0===i?[]:i;if(!r.has(o)){if(c===n)return t;var l,s=Sd(a);try{for(s.s();!(l=s.n()).done;){var u=l.value,d=e(u,n,r);if(d)return d}}catch(e){s.e(e)}finally{s.f()}}};function xd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Pd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Td(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Td(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Td(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dd=function(e,t){var n,r,o,c=(n=t.name,r=t.attributes,null!=(o=Object(p.__experimentalGetBlockAttributesNamesByRole)(n,"content"))&&o.length?o.reduce((function(e,t){return r[t]&&(e[t]=r[t]),e}),{}):r);e.attributes=Nd(Nd({},e.attributes),c)};function Ad(e){var t=e.patterns,n=e.onSelect;return Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(l.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(k.__)("Preview")),Object(l.createElement)(Ld,{patterns:t,onSelect:n})))))}function Ld(e){var t=e.patterns,n=e.onSelect,r=Object(m.__unstableUseCompositeState)();return Object(l.createElement)(m.__unstableComposite,Object(i.a)({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":Object(k.__)("Patterns list")}),t.map((function(e){return Object(l.createElement)(Rd,{key:e.name,pattern:e,onSelect:n,composite:r})})))}function Rd(e){var t=e.pattern,n=e.onSelect,r=e.composite,o="block-editor-block-switcher__preview-patterns-container",c=Object(b.useInstanceId)(Rd,"".concat(o,"-list__item-description"));return Object(l.createElement)("div",{className:"".concat(o,"-list__list-item"),"aria-label":t.title,"aria-describedby":t.description?c:void 0},Object(l.createElement)(m.__unstableCompositeItem,Object(i.a)({role:"option",as:"div"},r,{className:"".concat(o,"-list__item"),onClick:function(){return n(t.transformedBlocks)}}),Object(l.createElement)(Js,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),Object(l.createElement)("div",{className:"".concat(o,"-list__item-title")},t.title)),!!t.description&&Object(l.createElement)(m.VisuallyHidden,{id:c},t.description))}var Md=function(e){var t=e.blocks,n=e.patterns,r=e.onSelect,o=Object(l.useState)(!1),c=Object(Co.a)(o,2),i=c[0],a=c[1],s=function(e,t){return Object(l.useMemo)((function(){return e.reduce((function(e,n){var r=function(e,t){var n,r=t.map((function(e){return Object(p.cloneBlock)(e)})),o=new Set,c=xd(e);try{for(c.s();!(n=c.n()).done;){var i,a=n.value,l=!1,s=xd(r);try{for(s.s();!(i=s.n()).done;){var u=i.value,d=Id(u,a.name,o);if(d){l=!0,o.add(d.clientId),Dd(d,a);break}}}catch(e){s.e(e)}finally{s.f()}if(!l)return}}catch(e){c.e(e)}finally{c.f()}return r}(t,n.blocks);return r&&e.push(Nd(Nd({},n),{},{transformedBlocks:r})),e}),[])}),[e,t])}(n,t);return s.length?Object(l.createElement)(m.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},i&&Object(l.createElement)(Ad,{patterns:s,onSelect:r}),Object(l.createElement)(m.MenuItem,{onClick:function(e){e.preventDefault(),a(!i)},icon:Ql.a},Object(k.__)("Patterns"))):null};function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hd=function(e){var t=e.clientIds,n=e.blocks,r=Object(v.useDispatch)(yr).replaceBlocks,o=Cl(n[0].clientId),c=Object(v.useSelect)((function(e){var r,c,i=e(yr),a=i.getBlockRootClientId,l=i.getBlockTransformItems,s=i.__experimentalGetPatternTransformItems,u=e(p.store),b=u.getBlockStyles,f=u.getBlockType,m=a(Object(d.castArray)(t)[0]),v=Object(Co.a)(n,1)[0].name,O=1===n.length,g=O&&b(v);return r=O?null==o?void 0:o.icon:1===Object(d.uniq)(n.map((function(e){return e.name}))).length?null===(c=f(v))||void 0===c?void 0:c.icon:md,{possibleBlockTransformations:l(n,m),hasBlockStyles:!(null==g||!g.length),icon:r,blockTitle:f(v).title,patterns:s(n,m)}}),[t,n,null==o?void 0:o.icon]),i=c.possibleBlockTransformations,a=c.hasBlockStyles,s=c.icon,u=c.blockTitle,b=c.patterns,f=1===n.length&&Object(p.isReusableBlock)(n[0]),O=1===n.length&&Object(p.isTemplatePart)(n[0]),g=!!i.length,h=!(null==b||!b.length);if(!a&&!g)return Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(m.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:u,icon:Object(l.createElement)(hl,{icon:s,showColors:!0})}));var j=u,y=1===n.length?Object(k.sprintf)(
48
  /* translators: %s: block title. */
49
  Object(k.__)("%s: Change block type or style"),u):Object(k.sprintf)(
50
  /* translators: %d: number of blocks. */
51
- Object(k._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),_=a||g||h;return Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(m.ToolbarItem,null,(function(e){return Object(l.createElement)(m.DropdownMenu,{className:"block-editor-block-switcher",label:j,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(hl,{icon:s,className:"block-editor-block-switcher__toggle",showColors:!0}),(f||O)&&Object(l.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},Object(l.createElement)(Sl,{clientId:t}))),toggleProps:Vd({describedBy:y},e),menuProps:{orientation:"both"}},(function(e){var o=e.onClose;return _&&Object(l.createElement)("div",{className:"block-editor-block-switcher__container"},h&&Object(l.createElement)(Md,{blocks:n,patterns:b,onSelect:function(e){!function(e){r(t,e)}(e),o()}}),g&&Object(l.createElement)(Od,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:function(e){!function(e){r(t,Object(p.switchToBlockType)(n,e))}(e),o()}}),a&&Object(l.createElement)(Cd,{hoveredBlock:n[0],onSwitch:o}))}))})))},zd=function(e){var t=e.clientIds,n=Object(v.useSelect)((function(e){return e(yr).getBlocksByClientId(t)}),[t]);return!n.length||n.some((function(e){return!e}))?null:Object(l.createElement)(Hd,{clientIds:t,blocks:n})},Gd=n(53);function Ud(){var e=Object(v.useSelect)((function(e){return e(yr)}),[]).getBlockName,t=Object(v.useSelect)((function(e){return e(p.store)}),[]).getBlockType,n=Object(v.useDispatch)(ju.store).createSuccessNotice;return Object(l.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(k.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
52
  Object(k.__)('Copied "%s" to clipboard.'),a):Object(k.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
53
  Object(k.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(k.sprintf)(// Translators: %d: Number of blocks being copied.
54
  Object(k._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(k.sprintf)(// Translators: %d: Number of blocks being cut.
55
- Object(k._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}function Wd(){var e=Object(v.useSelect)((function(e){return e(yr)}),[]),t=e.getBlocksByClientId,n=e.getSelectedBlockClientIds,r=e.hasMultiSelection,o=e.getSettings,c=Object(v.useDispatch)(yr),i=c.flashBlock,a=c.removeBlocks,l=c.replaceBlocks,s=Ud();return Object(b.useRefEffect)((function(e){function c(c){var u=n();if(0!==u.length){if(!r()){var d=c.target.ownerDocument;if("copy"===c.type||"cut"===c.type?Object(Wl.documentHasUncollapsedSelection)(d):Object(Wl.documentHasSelection)(d))return}if(e.contains(c.target.ownerDocument.activeElement)){if(c.preventDefault(),"copy"===c.type||"cut"===c.type){1===u.length&&i(u[0]),s(c.type,u);var b=t(u),f=Object(p.serialize)(b);c.clipboardData.setData("text/plain",f),c.clipboardData.setData("text/html",f)}if("cut"===c.type)a(u);else if("paste"===c.type){var m=o().__experimentalCanUserUseUnfilteredHTML,v=function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}var o=Object(Wl.getFilesFromDataTransfer)(t).filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}));return o.length&&!r&&(r=o.map((function(e){return'<img src="'.concat(Object(Gd.createBlobURL)(e),'">')})).join(""),n=""),{html:r,plainText:n}}(c),O=v.plainText,g=v.html,h=Object(p.pasteHandler)({HTML:g,plainText:O,mode:"BLOCKS",canUserUseUnfilteredHTML:m});l(u,h,h.length-1,-1)}}}}return e.ownerDocument.addEventListener("copy",c),e.ownerDocument.addEventListener("cut",c),e.ownerDocument.addEventListener("paste",c),function(){e.ownerDocument.removeEventListener("copy",c),e.ownerDocument.removeEventListener("cut",c),e.ownerDocument.removeEventListener("paste",c)}}),[])}var Kd=function(e){var t=e.children;return Object(l.createElement)("div",{ref:Wd()},t)};function qd(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(v.useSelect)((function(e){return e(yr)}),[]),c=o.canInsertBlockType,i=o.getBlockRootClientId,a=o.getBlocksByClientId,l=o.getTemplateLock,s=Object(v.useSelect)((function(e){return e(p.store)}),[]),u=s.getDefaultBlockName,b=s.getGroupingBlockName,f=a(t),m=i(t[0]),O=Object(d.every)(f,(function(e){return!!e&&Object(p.hasBlockSupport)(e.name,"multiple",!0)&&c(e.name,m)})),g=c(u(),m),h=Object(v.useDispatch)(yr),j=h.removeBlocks,y=h.replaceBlocks,k=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,B=h.selectBlock,I=Ud();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!l(m),rootClientId:m,blocks:f,onDuplicate:function(){return k(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(d.first)(Object(d.castArray)(t)))},onInsertAfter:function(){_(Object(d.last)(Object(d.castArray)(t)))},onMoveTo:function(){S(!0),B(t[0]),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(p.switchToBlockType)(f,e);n&&y(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&y(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&w(e[0]),I("copy",e)}})}var $d=Object(b.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=e(yr),o=r.getBlock,c=r.getBlockMode,i=r.getSettings,a=o(n),l=i().codeEditingEnabled;return{mode:c(n),blockType:a?Object(p.getBlockType)(a.name):null,isCodeEditingEnabled:l}})),Object(v.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?d.noop:n,o=t.clientId;return{onToggleMode:function(){e(yr).toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o,i=e.isCodeEditingEnabled,a=void 0===i||i;if(!Object(p.hasBlockSupport)(t,"html",!0)||!a)return null;var s="visual"===n?Object(k.__)("Edit as HTML"):Object(k.__)("Edit visually");return Object(l.createElement)(m.MenuItem,{onClick:r},!c&&s)})),Yd=Object(b.compose)(Object(v.withSelect)((function(e,t){var n=t.clientId,r=e(yr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(v.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e(yr).replaceBlocks(n.clientId,Object(p.rawHandler)({HTML:Object(p.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(k.__)("Convert to Blocks");return Object(l.createElement)(m.MenuItem,{onClick:n},!r&&o)})),Xd=Object(m.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),Qd=Xd.Fill,Zd=Xd.Slot;Qd.Slot=Zd;var Jd=Qd;function eb(e){var t=e.clientIds,n=e.isGroupable,r=e.isUngroupable,o=e.blocksSelection,c=e.groupingBlockName,i=e.onClose,a=void 0===i?function(){}:i,s=Object(v.useDispatch)(yr).replaceBlocks;return n||r?Object(l.createElement)(l.Fragment,null,n&&Object(l.createElement)(m.MenuItem,{onClick:function(){var e;(e=Object(p.switchToBlockType)(o,c))&&s(t,e),a()}},Object(k._x)("Group","verb")),r&&Object(l.createElement)(m.MenuItem,{onClick:function(){var e;(e=o[0].innerBlocks).length&&s(t,e),a()}},Object(k._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function tb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rb=Object(m.createSlotFill)("BlockSettingsMenuControls"),ob=rb.Fill,cb=rb.Slot;function ib(e){var t=Object(i.a)({},e);return Object(l.createElement)(m.__experimentalStyleProvider,{document:document},Object(l.createElement)(ob,t))}ib.Slot=function(e){var t,n=e.fillProps,r=e.clientIds,o=void 0===r?null:r,c=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlocksByClientId,r=t.getSelectedBlockClientIds,c=null!==o?o:r();return Object(d.map)(Object(d.compact)(n(c)),(function(e){return e.name}))}),[o]),a={clientIds:(t=Object(v.useSelect)((function(e){var t,n=e(yr),r=n.getBlockRootClientId,o=n.getBlocksByClientId,c=n.canInsertBlockType,i=n.getSelectedBlockClientIds,a=e(p.store).getGroupingBlockName,l=i(),s=a(),u=c(s,null!=l&&l.length?r(l[0]):void 0),d=o(l),b=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===s;return{clientIds:l,isGroupable:u&&d.length&&!b,isUngroupable:b&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:s}}),[])).clientIds,isGroupable:t.isGroupable,isUngroupable:t.isUngroupable,blocksSelection:t.blocksSelection,groupingBlockName:t.groupingBlockName},s=a.isGroupable||a.isUngroupable;return Object(l.createElement)(cb,{fillProps:nb(nb({},n),{},{selectedBlocks:c})},(function(e){if((null==e?void 0:e.length)>0||s)return Object(l.createElement)(m.MenuGroup,null,e,Object(l.createElement)(eb,Object(i.a)({},a,{onClose:null==n?void 0:n.onClose})))}))};var ab=ib,lb={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function sb(e){var t=e.blocks,n=e.onCopy,r=Object(b.useCopyToClipboard)((function(){return Object(p.serialize)(t)}),n);return Object(l.createElement)(m.MenuItem,{ref:r},Object(k.__)("Copy"))}var ub=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(j.a)(e,["clientIds","__experimentalSelectBlock","children"]),c=Object(d.castArray)(t),a=c.length,s=c[0],u=Object(v.useSelect)((function(e){var t=e(Vl.store).getShortcutRepresentation;return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=Object(l.useCallback)(n?function(){var e=Object(zl.a)(Lt.a.mark((function e(t){var r;return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}():d.noop,[n]),f=1===a?Object(k.__)("Remove block"):Object(k.__)("Remove blocks");return Object(l.createElement)(qd,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,c=e.canInsertDefaultBlock,p=e.isLocked,v=e.onDuplicate,O=e.onInsertAfter,g=e.onInsertBefore,h=e.onRemove,j=e.onCopy,y=e.onMoveTo,_=e.blocks;return Object(l.createElement)(m.DropdownMenu,Object(i.a)({icon:Gl.a,label:Object(k.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:lb,noIcons:!0},o),(function(e){var o=e.onClose;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.MenuGroup,null,Object(l.createElement)(Jd.Slot,{fillProps:{onClose:o}}),1===a&&Object(l.createElement)(Yd,{clientId:s}),Object(l.createElement)(sb,{blocks:_,onCopy:j}),n&&Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,v,b),shortcut:u.duplicate},Object(k.__)("Duplicate")),c&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,g),shortcut:u.insertBefore},Object(k.__)("Insert before")),Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,O),shortcut:u.insertAfter},Object(k.__)("Insert after"))),!p&&Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,y)},Object(k.__)("Move to")),1===a&&Object(l.createElement)($d,{clientId:s,onToggle:o})),Object(l.createElement)(ab.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):l.Children.map((function(e){return Object(l.cloneElement)(e,{onClose:o})})),Object(l.createElement)(m.MenuGroup,null,!p&&Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,h,b),shortcut:u.remove},f)))}))}))},db=function(e){var t=e.clientIds,n=Object(j.a)(e,["clientIds"]);return Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(m.ToolbarItem,null,(function(e){return Object(l.createElement)(ub,Object(i.a)({clientIds:t,toggleProps:e},n))})))};function bb(e){var t=e.hideDragHandle,n=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,c=t.isBlockValid,i=t.getBlockRootClientId,a=t.getSettings,l=o(),s=l[0],u=i(s),d=a();return{blockClientIds:l,blockClientId:s,blockType:s&&Object(p.getBlockType)(n(s)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:l.every((function(e){return c(e)})),isVisual:l.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,c=n.blockType,a=n.hasFixedToolbar,s=n.hasReducedUI,d=n.isValid,f=n.isVisual,O=Object(v.useDispatch)(yr).toggleBlockHighlight,g=Object(l.useRef)(),h=fd({ref:g,onChange:function(e){e&&s||O(o,e)}}),j=h.showMovers,y=h.gestures,k=Object(b.useViewportMatch)("medium","<")||a;if(c&&!Object(p.hasBlockSupport)(c,"__experimentalToolbar",!0))return null;var _=k||j;if(0===r.length)return null;var E=d&&f,w=r.length>1,C=u()("block-editor-block-toolbar",_&&"is-showing-movers");return Object(l.createElement)("div",{className:C},!w&&!k&&Object(l.createElement)(pd,{clientIds:r}),Object(l.createElement)("div",Object(i.a)({ref:g},y),(E||w)&&Object(l.createElement)(m.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(l.createElement)(zd,{clientIds:r}),Object(l.createElement)(ld,{clientIds:r,hideDragHandle:t||s}))),E&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Br.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(Br.Slot,{className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(Br.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(Br.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),Object(l.createElement)(db,{clientIds:r}))}var fb=function(e){var t=e.focusOnMount,n=Object(j.a)(e,["focusOnMount"]),r=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockName,r=t.getBlockParents,o=t.getSelectedBlockClientIds,c=e(p.store).getBlockType,i=o()[0];return{blockType:i&&c(n(i)),hasParents:r(i).length}}),[]),o=r.blockType,c=r.hasParents;if(o&&!Object(p.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;var a=u()("block-editor-block-contextual-toolbar",{"has-parent":c});return Object(l.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(l.createElement)(ad,Object(i.a)({focusOnMount:t,className:a
56
- /* translators: accessibility text for the block toolbar */,"aria-label":Object(k.__)("Block tools")},n),Object(l.createElement)(bb,null)))};function pb(e){var t=e(yr),n=t.isNavigationMode,r=t.isMultiSelecting,o=t.hasMultiSelection,c=t.isTyping,i=t.isCaretWithinFormattedText,a=t.getSettings,l=t.getLastMultiSelectedBlockClientId;return{isNavigationMode:n(),isMultiSelecting:r(),isTyping:c(),isCaretWithinFormattedText:i(),hasMultiSelection:o(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:l()}}function mb(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(v.useSelect)(pb,[]),a=i.isNavigationMode,s=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,p=i.hasMultiSelection,O=i.hasFixedToolbar,g=i.lastClientId,h=Object(b.useViewportMatch)("medium"),j=Object(l.useState)(!1),y=Object(Co.a)(j,2),k=y[0],_=y[1],E=Object(l.useState)(!1),w=Object(Co.a)(E,2),C=w[0],S=w[1],B=Object(l.useContext)(jb),I=Object(v.useDispatch)(yr).stopTyping,x=!d&&!a&&o&&r,P=a,T=!a&&!O&&h&&!x&&!s&&(!d||f),N=!(a||T||O||o);Object(Vl.useShortcut)("core/block-editor/focus-toolbar",Object(l.useCallback)((function(){_(!0),I(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),Object(l.useEffect)((function(){T||_(!1)}),[T]);var D=Object(l.useRef)();if(Object(l.useEffect)((function(){D.current=void 0}),[t]),!(P||T||k||x))return null;var A=B[t];if(!A)return null;var L=A.ownerDocument;c&&(A=Sc(c,L));var R=A;if(p){var M=B[g];if(!M)return null;R={top:A,bottom:M}}var F=x?"top left right":"top right left",V=x?void 0:L.defaultView.frameElement||Object(Wl.getScrollContainer)(A)||L.body;return Object(l.createElement)(m.Popover,{noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:R,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:V,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:A,shouldAnchorIncludePadding:!0},(T||k)&&Object(l.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:u()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},Object(l.createElement)(Wu,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||k)&&Object(l.createElement)(fb,{focusOnMount:k,__experimentalInitialIndex:D.current,__experimentalOnIndexChange:function(e){D.current=e}}),P&&Object(l.createElement)(cd,{clientId:t,rootClientId:n,blockElement:A}),x&&Object(l.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(l.createElement)(Wu,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function vb(e){var t=e(yr),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,c=t.__unstableGetBlockWithoutInnerBlocks,i=t.getBlockParents,a=t.__experimentalGetBlockListSettingsForBlocks,l=n()||r();if(l){var s=c(l)||{},u=s.name,b=s.attributes,f=void 0===b?{}:b,m=s.isValid,v=i(l),O=a(v),g=Object(d.find)(v,(function(e){var t;return null===(t=O[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:l,rootClientId:o(l),name:u,isValid:m,isEmptyDefaultBlock:u&&Object(p.isUnmodifiedDefaultBlock)({name:u,attributes:f}),capturingClientId:g}}}function Ob(){var e=Object(v.useSelect)(vb,[]);if(!e)return null;var t=e.clientId,n=e.rootClientId,r=e.name,o=e.isValid,c=e.isEmptyDefaultBlock,i=e.capturingClientId;return r?Object(l.createElement)(mb,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var gb="undefined"==typeof window?function(e){setTimeout((function(){return e(Date.now())}),0)}:window.requestIdleCallback||window.requestAnimationFrame,hb="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame,jb=Object(l.createContext)(),yb=Object(l.createContext)();function kb(e){var t,n=e.className,r=e.__experimentalLayout,o=Object(l.useRef)(),c=Object(l.useState)({}),i=Object(Co.a)(c,2),a=i[0],s=i[1],d=function(e){var t=Object(l.useState)(!1),n=Object(Co.a)(t,2),r=n[0],o=n[1],c=Object(l.useState)(!1),i=Object(Co.a)(c,2),a=i[0],s=i[1],u=Object(l.useState)(null),d=Object(Co.a)(u,2),b=d[0],f=d[1],p=Object(v.useSelect)((function(e){var t=e(yr),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=t.getBlockListSettings,a=o(),l=c(a.rootClientId);return{getBlockListSettings:i,isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:l[a.index-1],selectedRootClientId:a.rootClientId}}),[]),m=p.isMultiSelecting,O=p.isInserterVisible,g=p.selectedClientId,h=p.selectedRootClientId,j=p.getBlockListSettings,y=Object(l.useCallback)((function(e){var t;if(e.target.classList.contains("block-editor-block-list__layout")){var n;e.target.classList.contains("is-root-container")||(n=(e.target.getAttribute("data-block")?e.target:e.target.closest("[data-block]")).getAttribute("data-block"));var c=(null===(t=j(n))||void 0===t?void 0:t.orientation)||"vertical",i=e.target.getBoundingClientRect(),a=e.clientY-i.top,l=e.clientX-i.left,s=Array.from(e.target.children),u=s.find((function(e){return e.classList.contains("wp-block")&&"vertical"===c&&e.offsetTop>a||e.classList.contains("wp-block")&&"horizontal"===c&&e.offsetLeft>l})),d=u?s[s.indexOf(u)-1]:s[s.length-1];if(d&&(d.id||(d=d.firstElementChild))){var b=d.id.slice("block-".length);if(b){var p=d.getBoundingClientRect();"horizontal"===c&&(e.clientY>p.bottom||e.clientY<p.top)||"vertical"===c&&(e.clientX>p.right||e.clientX<p.left)?r&&o(!1):(o(!0),f(b))}}}else r&&o(!1)}),[r,o,f]),k=!a&&!m;return Object(l.useEffect)((function(){if(k)return e.current.addEventListener("mousemove",y),function(){e.current.removeEventListener("mousemove",y)}}),[k,y]),!m&&(r||a||O)&&Object(l.createElement)(nd,{clientId:O?g:b,selectedRootClientId:h,isInserterShown:r,isInserterForced:a,setIsInserterForced:function(e){s(e),e||o(e)},containerRef:e,showInsertionPoint:O})}(o);t=Object(v.useSelect)((function(e){return e(yr).getSettings().__experimentalBlockPatterns}),[]),Object(l.useEffect)((function(){if(null!=t&&t.length){var e,n=-1;return e=gb((function r(){++n>=t.length||(Object(v.select)(yr).__experimentalGetParsedPattern(t[n].name),e=gb(r))})),function(){return hb(e)}}}),[t]);var f=Object(b.useViewportMatch)("medium"),p=Object(v.useSelect)((function(e){var t=e(yr),n=t.isTyping,r=t.getSettings,o=t.isNavigationMode,c=r(),i=c.outlineMode,a=c.focusMode;return{isTyping:n(),isOutlineMode:i,isFocusMode:a,isNavigationMode:o()}}),[]),m=p.isTyping,O=p.isOutlineMode,g=p.isFocusMode,h=p.isNavigationMode;return Object(l.createElement)(jb.Provider,{value:a},d,Object(l.createElement)(Ob,null),Object(l.createElement)("div",{ref:Object(b.useMergeRefs)([o,ed()]),className:u()("block-editor-block-list__layout is-root-container",n,{"is-typing":m,"is-outline-mode":O,"is-focus-mode":g&&f,"is-navigate-mode":h})},Object(l.createElement)(yb.Provider,{value:s},Object(l.createElement)(Eb,{__experimentalLayout:r}))))}function _b(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.__experimentalLayout,i=void 0===c?Ar:c,a=Object(v.useSelect)((function(e){var t=e(yr),r=t.getBlockOrder,o=t.getSelectedBlockClientId,c=t.getMultiSelectedBlockClientIds,i=t.hasMultiSelection;return{blockClientIds:r(n),selectedBlockClientId:o(),multiSelectedBlockClientIds:c(),hasMultiSelection:i()}}),[n]),s=a.blockClientIds,u=a.selectedBlockClientId,d=a.multiSelectedBlockClientIds,b=a.hasMultiSelection;return Object(l.createElement)(Mr,{value:i},s.map((function(e,t){var r=b?d.includes(e):u===e;return Object(l.createElement)(v.AsyncModeProvider,{key:e,value:!r},Object(l.createElement)(Vb,{rootClientId:n,clientId:e,index:t}))})),s.length<1&&t,Object(l.createElement)(Yu,{tagName:o,rootClientId:n,renderAppender:r}))}function Eb(e){return Object(l.createElement)(v.AsyncModeProvider,{value:!1},Object(l.createElement)(_b,e))}function wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sb(e){var t=Object(l.useContext)(yb),n=Object(v.useSelect)((function(t){var n=t(yr),r=n.isBlockSelected,o=n.isFirstMultiSelectedBlock,c=n.getLastMultiSelectedBlockClientId;return r(e)||o(e)||c()===e}));return Object(b.useRefEffect)((function(r){if(n)return t((function(t){return Cb(Cb({},t),{},Object(a.a)({},e,r))})),function(){t((function(t){return Object(d.omit)(t,e)}))}}),[n,e,t])}var Bb=n(158),Ib=n.n(Bb);function xb(e){var t=Object(l.useRef)(),n=Object(v.useSelect)((function(t){var n=t(yr),r=n.isBlockSelected,o=n.getBlockSelectionEnd;return r(e)||o()===e}),[e]);return Object(l.useEffect)((function(){if(n){var e=t.current;if(!e.contains(e.ownerDocument.activeElement)){var r=Object(Wl.getScrollContainer)(e);r&&Ib()(e,r,{onlyScrollIfNeeded:!0})}}}),[n]),t}function Pb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__unstableIsHtml,r=Object(l.useContext)(Lb),o=r.clientId,c=r.index,i=r.className,a=r.wrapperProps,s=void 0===a?{}:a,d=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockMode,r=t.getBlockName,c=t.isTyping,i=t.getGlobalBlockCount,a=t.isBlockSelected,l=t.isBlockMultiSelected,s=t.isAncestorMultiSelected,u=t.isFirstMultiSelectedBlock,d=a(o),b=l(o)||s(o),f=r(o);return{mode:n(o),name:f,blockTitle:Object(p.getBlockType)(f).title,isPartOfSelection:d||b,adjustScrolling:d||u(o),enableAnimation:!c()&&i()<=200}}),[o]),f=d.mode,m=d.name,O=d.blockTitle,g=d.isPartOfSelection,h=d.adjustScrolling,j=d.enableAnimation,y=Object(k.sprintf)(Object(k.__)("Block: %s"),O),_="html"!==f||n?"":"-visual",E=Object(b.useMergeRefs)([e.ref,ys(o),xb(o),Sb(o),Rs(o),Ms(o),_s(),$l({isSelected:g,adjustScrolling:h,enableAnimation:j,triggerAnimationOnChange:c})]);return Tb(Tb(Tb({},s),e),{},{ref:E,id:"block-".concat(o).concat(_),tabIndex:0,role:"group","aria-label":y,"data-block":o,"data-type":m,"data-title":O,className:u()(i,e.className,s.className,Es(o),ws(o),Cs(o),Ss(o)),style:Tb(Tb({},s.style),e.style)})}function Db(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ab(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Db(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Db(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Nb.save=p.__unstableGetBlockProps;var Lb=Object(l.createContext)();function Rb(e){var t=e.children,n=e.isHtml,r=Object(j.a)(e,["children","isHtml"]);return Object(l.createElement)("div",Nb(r,{__unstableIsHtml:n}),t)}var Mb=Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e(yr),c=o.isBlockSelected,i=o.getBlockMode,a=o.isSelectionEnabled,l=o.getTemplateLock,s=(0,o.__unstableGetBlockWithoutInnerBlocks)(n),u=c(n),d=l(r),b=s||{},f=b.name,p=b.attributes,m=b.isValid;return{mode:i(n),isSelectionEnabled:a(),isLocked:!!d,block:s,name:f,attributes:p,isValid:m,isSelected:u}})),Fb=Object(v.withDispatch)((function(e,t,n){var r=n.select,o=e(yr),c=o.updateBlockAttributes,i=o.insertBlocks,a=o.mergeBlocks,l=o.replaceBlocks,s=o.toggleSelection,u=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=(0,r(yr).getMultiSelectedBlockClientIds)(),o=t.clientId,i=n.length?n:[o];c(i,e)},onInsertBlocks:function(e,n){var r=t.rootClientId;i(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r(yr).getBlockIndex)(n,o);i(e,c+1,o)},onMerge:function(e){var n=t.clientId,o=r(yr),c=o.getPreviousBlockClientId,i=o.getNextBlockClientId;if(e){var l=i(n);l&&a(n,l)}else{var s=c(n);s&&a(s,n)}},onReplace:function(e,n,r){e.length&&!Object(p.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),l([t.clientId],e,n,r)},toggleSelection:function(e){s(e)}}})),Vb=Object(b.compose)(b.pure,Mb,Fb,Object(b.ifCondition)((function(e){return!!e.block})),Object(m.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,c=e.isLocked,i=e.clientId,a=e.isSelected,s=e.isSelectionEnabled,b=e.className,f=e.name,m=e.isValid,O=e.attributes,g=e.wrapperProps,h=e.setAttributes,j=e.onReplace,y=e.onInsertBlocksAfter,k=e.onMerge,_=e.toggleSelection,E=e.index,w=Object(v.useDispatch)(yr).removeBlock,C=Object(l.useCallback)((function(){return w(i)}),[i]),S=Object(l.createElement)(Fl,{name:f,isSelected:a,attributes:O,setAttributes:h,insertBlocksAfter:c?void 0:y,onReplace:c?void 0:j,onRemove:c?void 0:C,mergeBlocks:c?void 0:k,clientId:i,isSelectionEnabled:s,toggleSelection:_}),B=Object(p.getBlockType)(f),I=B.apiVersion>1||Object(p.hasBlockSupport)(B,"lightBlockWrapper",!1);B.getEditWrapperProps&&(t=g,n=B.getEditWrapperProps(O),r=Ab(Ab({},t),n),t&&n&&t.className&&n.className&&(r.className=u()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=Ab(Ab({},t.style),n.style)),g=r);var x,P=g&&!!g["data-align"];P&&(S=Object(l.createElement)("div",{className:"wp-block","data-align":g["data-align"]},S)),x=m?"html"===o?Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{style:{display:"none"}},S),Object(l.createElement)(Rb,{isHtml:!0},Object(l.createElement)(js,{clientId:i}))):I?S:Object(l.createElement)(Rb,g,S):Object(l.createElement)(Rb,{className:"has-warning"},Object(l.createElement)(ps,{clientId:i}),Object(l.createElement)("div",null,Object(p.getSaveElement)(B,O)));var T={clientId:i,isSelected:a,index:E,className:u()(b,{"wp-block":!P}),wrapperProps:Object(d.omit)(g,["data-align"])},N=Object(l.useMemo)((function(){return T}),Object.values(T));return Object(l.createElement)(Lb.Provider,{value:N},Object(l.createElement)(Os,{fallback:Object(l.createElement)(Rb,{className:"has-warning"},Object(l.createElement)(vs,null))},x))}));function Hb(e){var t=e.level;return Object(d.times)(t-1,(function(e){var n=e+2===t;return Object(l.createElement)("div",{key:e,"aria-hidden":"true",className:u()("block-editor-block-navigator-indentation",{"has-item":n})})}))}var zb=function(e,t,n){return Object(k.sprintf)(
57
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
58
- Object(k.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},Gb=function(e,t){return Object(d.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e},Ub=Object(l.forwardRef)((function e(t,n){var r=t.className,o=t.block.clientId,c=t.isSelected,i=t.onClick,a=t.position,s=t.siblingBlockCount,d=t.level,f=t.tabIndex,p=t.onFocus,v=t.onDragStart,O=t.onDragEnd,g=t.draggable,h=Cl(o),j=Object(b.useInstanceId)(e),y="block-navigation-block-select-button__".concat(j),_=zb(a,s,d);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.Button,{className:u()("block-editor-block-navigation-block-select-button",r),onClick:i,"aria-describedby":y,ref:n,tabIndex:f,onFocus:p,onDragStart:v,onDragEnd:O,draggable:g},Object(l.createElement)(Hb,{level:d}),Object(l.createElement)(hl,{icon:null==h?void 0:h.icon,showColors:!0}),Object(l.createElement)(Sl,{clientId:o}),c&&Object(l.createElement)(m.VisuallyHidden,null,Object(k.__)("(selected block)"))),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:y},_))}));function Wb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qb=function(e){return"BlockNavigationBlock-".concat(e)},$b=Object(l.forwardRef)((function e(t,n){var r=t.block.clientId,o=Object(v.useSelect)((function(e){return e(yr).getBlockName(r)}),[r]).name,c=Object(b.useInstanceId)(e);return Object(l.createElement)(m.Slot,{name:qb(r)},(function(e){if(!e.length)return Object(l.createElement)(Ub,Object(i.a)({ref:n},t));var r=t.className,a=t.isSelected,s=t.position,d=t.siblingBlockCount,b=t.level,f=t.tabIndex,v=t.onFocus,O=Object(p.getBlockType)(o),g="block-navigation-block-slot__".concat(c),h=zb(s,d,b),j={tabIndex:f,onFocus:v,ref:n,"aria-describedby":g};return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:u()("block-editor-block-navigation-block-slot",r)},Object(l.createElement)(hl,{icon:O.icon,showColors:!0}),l.Children.map(e,(function(e){return Object(l.cloneElement)(e,Kb(Kb({},e.props),j))})),a&&Object(l.createElement)(m.VisuallyHidden,null,Object(k.__)("(selected block)")),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:g},h)))}))})),Yb=function(e){var t=Object(l.useContext)(Lb).clientId;return Object(l.createElement)(m.Fill,Object(i.a)({},e,{name:qb(t)}))},Xb=Object(l.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,a=e.siblingBlockCount,s=e.level,d=Object(j.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),b=as(),f=b.__experimentalFeatures,p=b.blockDropTarget,m=void 0===p?{}:p,O=r.clientId,g=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(O)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[O]),h=g.rootClientId,y=g.blockMovingClientId,k=g.selectedBlockInBlockEditor,_=y&&k===O,E=m.rootClientId,w=m.clientId,C=m.dropPosition,S=E===h&&w===O&&"top"===C,B=E===h&&w===O&&"bottom"===C,I=E===O&&"inside"===C,x=u()("block-editor-block-navigation-block-contents",{"is-dropping-before":S||_,"is-dropping-after":B,"is-dropping-to-inner-blocks":I});return Object(l.createElement)(rd,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var u=e.draggable,b=e.onDragStart,p=e.onDragEnd;return f?Object(l.createElement)($b,Object(i.a)({ref:t,className:x,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d)):Object(l.createElement)(Ub,Object(i.a)({ref:t,className:x,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d))}))}));function Qb(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Zb(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zb(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Zb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jb(e){var t=e.block,n=e.isSelected,r=e.isBranchSelected,o=e.isLastOfSelectedBranch,c=e.onClick,i=e.position,a=e.level,s=e.rowCount,d=e.siblingBlockCount,b=e.showBlockMovers,f=e.path,p=Object(l.useRef)(null),O=Object(l.useState)(!1),g=Object(Co.a)(O,2),h=g[0],j=g[1],y=t.clientId,_=Object(v.useSelect)((function(e){var t=e(yr),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged,o=t.getBlockParents;return{isDragging:n(y)||r(y),blockParents:o(y)}}),[y]),E=_.isDragging,w=_.blockParents,C=Object(v.useDispatch)(yr),S=C.selectBlock,B=C.toggleBlockHighlight,I=b&&d>0,x=u()("block-editor-block-navigation-block__mover-cell",{"is-visible":h}),P=as(),T=P.__experimentalFeatures,N=P.__experimentalPersistentListViewFeatures,D=u()("block-editor-block-navigation-block__menu-cell",{"is-visible":h});Object(l.useEffect)((function(){N&&n&&p.current.focus()}),[]),Object(l.useEffect)((function(){T&&n&&p.current.focus()}),[T,n]);var A=N?B:function(){},L=function(){j(!0),A(y,!0)},R=function(){j(!1),A(y,!1)},M=u()({"is-selected":n,"is-branch-selected":N&&r,"is-last-of-selected-branch":N&&o,"is-dragging":E});return Object(l.createElement)(Xl,{className:M,onMouseEnter:L,onMouseLeave:R,onFocus:L,onBlur:R,level:a,position:i,rowCount:s,path:f,id:"block-navigation-block-".concat(y),"data-block":y},Object(l.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:p},(function(e){var r=e.ref,o=e.tabIndex,s=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(l.createElement)(Xb,{block:t,onClick:function(){return c(t.clientId)},isSelected:n,position:i,siblingBlockCount:d,level:a,ref:r,tabIndex:o,onFocus:s}))})),I&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.__experimentalTreeGridCell,{className:x,withoutGridItem:!0},Object(l.createElement)(m.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(os,{orientation:"vertical",clientIds:[y],ref:t,tabIndex:n,onFocus:r})})),Object(l.createElement)(m.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(cs,{orientation:"vertical",clientIds:[y],ref:t,tabIndex:n,onFocus:r})})))),T&&Object(l.createElement)(m.__experimentalTreeGridCell,{className:D},(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(ub,{clientIds:[y],icon:Gl.a,toggleProps:{ref:t,tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:c},(function(e){var t=e.onClose;return Object(l.createElement)(m.MenuGroup,null,Object(l.createElement)(m.MenuItem,{onClick:Object(zl.a)(Lt.a.mark((function e(){var n,r,o;return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!w.length){e.next=20;break}n=Qb(w),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return o=r.value,e.next=8,S(o);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:e.next=22;break;case 20:return e.next=22,S(null);case 22:return e.next=24,S(y);case 24:t();case 25:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))},Object(k.__)("Go to block")))}))})))}function ef(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.path,i=Object(v.useSelect)((function(e){var n=e(yr),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),a=Object(b.useInstanceId)(ef),s="block-navigation-appender-row__description_".concat(a),d=Object(k.sprintf)(
59
  /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
60
- Object(k.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(l.createElement)(Xl,{className:u()({"is-dragging":i}),level:r,position:n,rowCount:o,path:c},Object(l.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var n=e.ref,o=e.tabIndex,c=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(l.createElement)(Hb,{level:r}),Object(l.createElement)(Wu,{rootClientId:t,__experimentalIsQuick:!0,"aria-describedby":s,toggleProps:{ref:n,tabIndex:o,onFocus:c}}),Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:s},d))})))}function tf(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientIds,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,s=e.level,u=void 0===s?1:s,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=e.isBranchSelected,O=void 0!==v&&v,g=e.isLastOfBranch,h=void 0!==g&&g,j=!a,k=Object(d.compact)(t),_=function(e){return o&&!j&&Gb(e,r)},E=_(a),w=k.length,C=E?w+1:w,S=C;return Object(l.createElement)(l.Fragment,null,Object(d.map)(k,(function(e,t){var a=e.clientId,s=e.innerBlocks,d=t+1,b=C===d?[].concat(Object(y.a)(f),[u]):f,p=[].concat(Object(y.a)(m),[d]),v=i&&!!s&&!!s.length,g=_(a),j=v||g,k=Gb(a,r),E=O||k&&j,S=t===w-1,B=k||h&&S,I=h&&!j&&S;return Object(l.createElement)(l.Fragment,{key:a},Object(l.createElement)(Jb,{block:e,onClick:n,isSelected:k,isBranchSelected:E,isLastOfSelectedBranch:I,level:u,position:d,rowCount:C,siblingBlockCount:w,showBlockMovers:c,terminatedLevels:f,path:p}),j&&Object(l.createElement)(tf,{blocks:s,selectedBlockClientIds:r,selectBlock:n,isBranchSelected:E,isLastOfBranch:B,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:u+1,terminatedLevels:b,path:p}))})),E&&Object(l.createElement)(ef,{parentBlockClientId:a,position:C,rowCount:S,level:u,terminatedLevels:f,path:[].concat(Object(y.a)(m),[S])}))}function nf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rf(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}tf.defaultProps={selectBlock:function(){}};var of=["top","bottom"];function cf(){var e=Object(v.useSelect)((function(e){var t=e(yr);return{canInsertBlocks:t.canInsertBlocks,getBlockRootClientId:t.getBlockRootClientId,getBlockIndex:t.getBlockIndex,getBlockCount:t.getBlockCount,getDraggedBlockClientIds:t.getDraggedBlockClientIds}}),[]),t=e.getBlockRootClientId,n=e.getBlockIndex,r=e.getBlockCount,o=e.getDraggedBlockClientIds,c=e.canInsertBlocks,i=Object(l.useState)(),a=Object(Co.a)(i,2),s=a[0],u=a[1],d=s||{},f=Xu(d.rootClientId,d.blockIndex),p=Object(b.useThrottle)(Object(l.useCallback)((function(e,i){var a={x:e.clientX,y:e.clientY},l=!!e.dataTransfer.getData("wp-blocks"),s=l?o():void 0,d=function(e,t){var n,r,o,c,i,a=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return nf(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nf(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(!l.isDraggedBlock){var s=l.element.getBoundingClientRect(),u=Zu(t,s,of),d=Object(Co.a)(u,2),b=d[0],f=d[1],p=rf(t,s);if(void 0===o||b<o||p){o=b;var m=e.indexOf(l),v=e[m-1];if("top"===f&&v&&v.rootClientId===l.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=l,n=f,c=s),p)break}}}}catch(e){a.e(e)}finally{a.f()}if(r){var O="bottom"===n;if(O&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){var n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(r.canInsertDraggedBlocksAsSibling){var g=O?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+g,dropPosition:n}}}}(Array.from(i.querySelectorAll("[data-block]")).map((function(e){var o=e.dataset.block,i=t(o);return{clientId:o,rootClientId:i,blockIndex:n(o,i),element:e,isDraggedBlock:!!l&&s.includes(o),innerBlockCount:r(o),canInsertDraggedBlocksAsSibling:!l||c(s,i),canInsertDraggedBlocksAsChild:!l||c(s,o)}})),a);d&&u(d)}),[]),200);return{ref:Object(b.__experimentalUseDropZone)({onDrop:f,onDragOver:function(e){p(e,e.currentTarget)},onDragEnd:function(){p.cancel(),u(null)}}),target:s}}function af(e){var t=e.__experimentalFeatures,n=e.__experimentalPersistentListViewFeatures,r=Object(j.a)(e,["__experimentalFeatures","__experimentalPersistentListViewFeatures"]),o=cf(),c=o.ref,i=o.target;t||(i=void 0);var a=Object(l.useMemo)((function(){return{__experimentalFeatures:t,__experimentalPersistentListViewFeatures:n,blockDropTarget:i}}),[t,n,i]);return Object(l.createElement)(m.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(k.__)("Block navigation structure"),ref:c},Object(l.createElement)(is.Provider,{value:a},Object(l.createElement)(tf,r)))}function lf(e){var t=e.onSelect,n=void 0===t?d.noop:t,r=e.__experimentalFeatures,o=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockHierarchyRootClientId,r=t.getSelectedBlockClientId,o=t.__unstableGetClientIdsTree,c=t.__unstableGetClientIdWithClientIdsTree,i=r(),l=o();return{rootBlock:a&&!Object(d.isArray)(a)?c(n(i)):null,rootBlocks:l,selectedBlockClientId:i}})),c=o.rootBlock,i=o.rootBlocks,a=o.selectedBlockClientId,s=Object(v.useDispatch)(yr).selectBlock;if(!i||0===i.length)return null;var u=c&&(!Gb(c.clientId,a)||c.innerBlocks&&0!==c.innerBlocks.length);return Object(l.createElement)("div",{className:"block-editor-block-navigation__container"},Object(l.createElement)("p",{className:"block-editor-block-navigation__label"},Object(k.__)("List view")),Object(l.createElement)(af,{blocks:u?[c]:i,selectedBlockClientIds:[a],selectBlock:function(e){s(e),n(e)},__experimentalFeatures:r,showNestedBlocks:!0}))}function sf(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(j.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(Vl.useShortcut)("core/edit-post/toggle-block-navigation",Object(l.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var a=Object(v.useSelect)((function(e){return e(Vl.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(l.createElement)(m.Button,Object(i.a)({},c,{ref:o,icon:Hl.a,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
61
- /* translators: button label text should, if possible, be under 16 characters. */,label:Object(k.__)("List view"),className:"block-editor-block-navigation",shortcut:a,"aria-disabled":!t}))}var uf=Object(l.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(j.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(v.useSelect)((function(e){return!!e(yr).getBlockCount()}),[])&&!n;return Object(l.createElement)(m.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(l.createElement)(sf,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(l.createElement)(lf,{onSelect:t,__experimentalFeatures:r})}})})),df=n(163),bf=[li.rawShortcut.primary("z"),li.rawShortcut.primaryShift("z"),li.rawShortcut.primary("y")],ff=Object(l.createElement)(m.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)(bf.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),pf=function(){return ff};function mf(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'<img src="'.concat(Object(Gd.createBlobURL)(e),'">')})).join("")}var vf={position:"bottom right",isAlternate:!0},Of=function(){return Object(l.createElement)(l.Fragment,null,["bold","italic","link","text-color"].map((function(e){return Object(l.createElement)(m.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(l.createElement)(m.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(l.createElement)(m.ToolbarItem,null,(function(t){return Object(l.createElement)(m.DropdownMenu,{icon:es.a
62
- /* translators: button label text should, if possible, be under 16 characters. */,label:Object(k.__)("More"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(Co.a)(e,1)[0].props})),"title"),popoverProps:vf})}))})))},gf=function(e){var t=e.inline,n=e.anchorRef;return t?Object(l.createElement)(m.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(l.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(Of,null)))):Object(l.createElement)(Br,{group:"inline"},Object(l.createElement)(Of,null))};function hf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hf(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yf(e,t){if(t.length)for(var n=e.formats.length;n--;)e.formats[n]=[].concat(Object(y.a)(t),Object(y.a)(e.formats[n]||[]))}function kf(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function _f(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?_f.EMPTY_ARRAY:t||n?t||(Ft()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}_f.EMPTY_ARRAY=[];var Ef=Object(l.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,s=t.onChange,d=t.isSelected,f=t.multiline,m=t.inlineToolbar,O=t.wrapperClassName,g=t.autocompleters,k=t.onReplace,_=t.placeholder,E=t.allowedFormats,w=t.formattingControls,C=t.withoutInteractiveFormatting,S=t.onRemove,B=t.onMerge,I=t.onSplit,x=t.__unstableOnSplitAtEnd,P=t.__unstableOnSplitMiddle,T=t.identifier,N=t.preserveWhiteSpace,D=t.__unstablePastePlainText,A=t.__unstableEmbedURLOnPaste,L=t.__unstableDisableFormats,R=t.disableLineBreaks,M=t.unstableOnFocus,F=t.__unstableAllowPrefixTransformations,V=t.__unstableMultilineRootTag,H=t.__unstableMobileNoFocusOnMount,z=t.deleteEnter,G=t.placeholderTextColor,U=t.textAlign,W=t.selectionColor,K=t.tagsToEliminate,q=t.rootTagsToEliminate,$=t.disableEditingMenu,Y=t.fontSize,X=t.fontFamily,Q=t.fontWeight,Z=t.fontStyle,J=t.minWidth,ee=t.maxWidth,te=t.onBlur,ne=t.setRef,re=Object(j.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstablePastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),oe=Object(b.useInstanceId)(e);T=T||oe;var ce=Object(l.useRef)(),ie=h(),ae=ie.clientId,le=ie.isSelected,se=Object(v.useSelect)((function(e){var t,n=e(yr),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,a=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,u=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===ae&&f.attributeKey===T:d&&(t=f.clientId===ae);var O={};if("native"===l.Platform.OS){var g=ae&&s(ae);O={shouldBlurOnUnmount:g&&t&&Object(p.isUnmodifiedDefaultBlock)(g)}}return jf({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:a(),disabled:u()||b(),undo:v},O)})),ue=se.isCaretWithinFormattedText,de=se.selectionStart,be=se.selectionEnd,fe=se.isSelected,pe=se.didAutomaticChange,me=se.disabled,ve=se.undo,Oe=se.shouldBlurOnUnmount,ge=Object(v.useDispatch)(yr),he=ge.__unstableMarkLastChangeAsPersistent,je=ge.enterFormattedText,ye=ge.exitFormattedText,ke=ge.selectionChange,_e=ge.__unstableMarkAutomaticChange,Ee=kf(f),we=_f({allowedFormats:E,formattingControls:w,disableFormats:L}),Ce=!we||we.length>0,Se=a,Be=s;Array.isArray(a)&&(Se=p.children.toHTML(a),Be=function(e){return s(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Ie=Object(l.useCallback)((function(e,t){ke(ae,T,e,t)}),[ae,T]),xe=Object(l.useCallback)((function(e){var t=e.value,n=e.isReverse;B&&B(!n),S&&Object(c.isEmpty)(t)&&n&&S(!n)}),[B,S]),Pe=Object(l.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(k&&I){var n=[],r=Object(c.split)(e),o=Object(Co.a)(r,2),i=o[0],a=o[1],l=t.length>0,s=-1,u=Object(c.isEmpty)(i)&&!Object(c.isEmpty)(a);l&&Object(c.isEmpty)(i)||(n.push(I(Object(c.toHTMLString)({value:i,multilineTag:Ee}),!u)),s+=1),l?(n.push.apply(n,Object(y.a)(t)),s+=t.length):P&&n.push(P()),(l||P)&&Object(c.isEmpty)(a)||n.push(I(Object(c.toHTMLString)({value:a,multilineTag:Ee}),u));var d=l?s:1,b=l?-1:0;k(n,d,b)}}),[k,I,Ee,P]),Te=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=k&&I;if(k){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),a=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));a&&(k([a.transform({content:t.text})]),_e())}if(f)r?R||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?Pe(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var l=t.text,s=t.start,u=t.end,d=x&&s===u&&u===l.length;r||!o&&!d?R||n(Object(c.insert)(t,"\n")):!o&&d?x():o&&Pe(t)}}),[k,I,_e,f,Pe,x]),Ne=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,a=e.isInternal,l=e.files,s=e.activeFormats;if(a){var u=Object(c.create)({html:r,multilineTag:Ee,multilineWrapperTags:"li"===Ee?["ul","ol"]:void 0,preserveWhiteSpace:N});return yf(u,s),void n(Object(c.insert)(t,u))}if(D)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(l&&l.length&&!r){var d=Object(p.pasteHandler)({HTML:mf(l),mode:"BLOCKS",tagName:o,preserveWhiteSpace:N});return window.console.log("Received items:\n\n",l),void(k&&Object(c.isEmpty)(t)?k(d):Pe(t,d))}var b,f=k&&I?"AUTO":"INLINE";"AUTO"===f&&Object(c.isEmpty)(t)&&(b=i,Object(df.regexp)(".*").test(b))&&(f="BLOCKS"),A&&Object(c.isEmpty)(t)&&Object(Su.isURL)(i.trim())&&(f="BLOCKS");var m=Object(p.pasteHandler)({HTML:r,plainText:i,mode:f,tagName:o,preserveWhiteSpace:N});if("string"==typeof m){var v=Object(c.create)({html:m});yf(v,s),Ee&&(v=Object(c.replace)(v,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),n(Object(c.insert)(t,v))}else m.length>0&&(k&&Object(c.isEmpty)(t)?k(m,m.length-1,-1):Pe(t,m))}}),[o,k,I,Pe,A,Ee,N,D]),De=Object(l.useCallback)((function(e,t){if(k){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),i=Object(p.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),a=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(a){var l=t(Object(c.slice)(e,n,r.length)),s=a.transform(l);k([s]),_e()}}}}),[k,_e]),Ae=Object(b.useMergeRefs)([n,ce]),Le=Object(l.createElement)(c.__experimentalRichText,Object(i.a)({clientId:ae,identifier:T,ref:Ae,value:Se,onChange:Be,selectionStart:de,selectionEnd:be,onSelectionChange:Ie,tagName:o,placeholder:_,allowedFormats:we,withoutInteractiveFormatting:C,onEnter:Te,onDelete:xe,onPaste:Ne,__unstableIsSelected:fe,__unstableInputRule:De,__unstableMultilineTag:Ee,__unstableIsCaretWithinFormattedText:ue,__unstableOnEnterFormattedText:je,__unstableOnExitFormattedText:ye,__unstableOnCreateUndoLevel:he,__unstableMarkAutomaticChange:_e,__unstableDidAutomaticChange:pe,__unstableUndo:ve,__unstableDisableFormats:L,preserveWhiteSpace:N,disabled:me,unstableOnFocus:M,__unstableAllowPrefixTransformations:F,__unstableMultilineRootTag:V},{},{blockIsSelected:void 0!==d?d:le,shouldBlurOnUnmount:Oe,__unstableMobileNoFocusOnMount:H,deleteEnter:z,placeholderTextColor:G,textAlign:U,selectionColor:W,tagsToEliminate:K,rootTagsToEliminate:q,disableEditingMenu:$,fontSize:Y,fontFamily:X,fontWeight:Q,fontStyle:Z,minWidth:J,maxWidth:ee,onBlur:te,setRef:ne,id:re.id,style:re.style}),(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,a=e.editableProps,s=e.editableTagName;return Object(l.createElement)(l.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Ce&&Object(l.createElement)(gf,{inline:m,anchorRef:ce.current}),t&&Object(l.createElement)(pf,null),Object(l.createElement)(kl,{onReplace:k,completers:g,record:n,onChange:o,isSelected:t,contentRef:ce},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(l.createElement)(s,Object(i.a)({},a,re,{style:re.style?jf(jf({},re.style),a.style):a.style,className:u()("block-editor-rich-text__editable",re.className,a.className),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),a.onKeyDown(e)}}))})))}));return O?(Ft()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"}),Object(l.createElement)("div",{className:u()("block-editor-rich-text",O)},Le)):Le}));Ef.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(j.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=kf(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(l.createElement)(l.RawHTML,null,t);return n?Object(l.createElement)(n,Object(d.omit)(o,["format"]),i):i},Ef.isEmpty=function(e){return!e||0===e.length},Ef.Content.defaultProps={format:"string",value:""};var wf=Ef;function Cf(e){var t=e.value,n=e.onChange;return Object(l.createElement)(Yb,null,Object(l.createElement)(wf,{value:t,onChange:n,placeholder:Object(k.__)("Navigation item"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Sf=n(245),Bf=function(e){var t=e.icon,n=void 0===t?Sf.a:t,r=e.label,o=void 0===r?Object(k.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(k.__)("Select a variation to start with."):c,a=e.variations,s=e.onSelect,d=e.allowSkip,b=u()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(l.createElement)(m.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(l.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(k.__)("Block variations")},a.map((function(e){return Object(l.createElement)("li",{key:e.name},Object(l.createElement)(m.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return s(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(l.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(l.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(l.createElement)(m.Button,{isLink:!0,onClick:function(){return s()}},Object(k.__)("Skip"))))},If=function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(d.isMatch)(e,n)}));if(1===n.length)return n[0]}};function xf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Pf=function(e){var t=e.blockClientId,n=Object(l.useState)(),r=Object(Co.a)(n,2),o=r[0],c=r[1],i=Object(v.useDispatch)(yr).updateBlockAttributes,s=Object(v.useSelect)((function(e){var n=e(p.store).getBlockVariations,r=e(yr),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),u=s.variations,d=s.blockAttributes;if(Object(l.useEffect)((function(){var e;c(null===(e=If(d,u))||void 0===e?void 0:e.name)}),[d,u]),null==u||!u.length)return null;var b=u.map((function(e){return{value:e.name,label:e.title,info:e.description}})),f=function(e){i(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xf(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u.find((function(t){return t.name===e})).attributes))},O="block-editor-block-variation-transforms";return Object(l.createElement)(m.DropdownMenu,{className:O,label:Object(k.__)("Transform to variation"),text:Object(k.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(O,"__popover")},icon:es.a,toggleProps:{iconPosition:"right"}},(function(){return Object(l.createElement)("div",{className:"".concat(O,"__container")},Object(l.createElement)(m.MenuGroup,null,Object(l.createElement)(m.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},Tf=Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(m.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Nf=Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(m.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function Df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Af(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Df(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Df(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lf={top:{icon:Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(m.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(k._x)("Align top","Block vertical alignment setting")},center:{icon:Nf,title:Object(k._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Tf,title:Object(k._x)("Align bottom","Block vertical alignment setting")}},Rf=["top","center","bottom"],Mf={isAlternate:!0},Ff=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Rf:r,c=e.isCollapsed,a=void 0===c||c,s=e.isToolbar,u=e.isToolbarButton,d=void 0===u||u,b=Lf[t],f=Lf.top,p=s?m.ToolbarGroup:m.DropdownMenu,v=s?{isCollapsed:a}:{isToolbarButton:d};return Object(l.createElement)(p,Object(i.a)({popoverProps:Mf,icon:b?b.icon:f.icon,label:Object(k._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return Af(Af({},Lf[e]),{},{isActive:t===e,role:a?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))},v))};function Vf(e){return Object(l.createElement)(Ff,Object(i.a)({},e,{isToolbar:!1}))}function Hf(e){return Object(l.createElement)(Ff,Object(i.a)({},e,{isToolbar:!0}))}function zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zf(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Uf=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=wo("color.palette"),r=!wo("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(d.isEmpty)(o)||!c;return Object(l.createElement)(e,Gf(Gf({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Wf=Uf(m.ColorPalette);function Kf(e){var t=e.onChange,n=e.value,r=Object(j.a)(e,["onChange","value"]);return Object(l.createElement)(Ko,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var qf=[];function $f(e){var t=wo("color.gradients")||qf,n=!wo("color.customGradient");return Object(l.createElement)(m.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var Yf=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?m.__experimentalGradientPicker:$f;return Object(l.createElement)(t,e)};function Xf(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(k.__)("Gradient Presets"):o,a=Object(j.a)(e,["className","value","onChange","label"]),s=wo("color.gradients"),b=!wo("color.customGradient");return Object(d.isEmpty)(s)&&b?null:Object(l.createElement)(m.BaseControl,{className:u()("block-editor-gradient-picker-control",t)},Object(l.createElement)(m.BaseControl.VisualLabel,null,c),Object(l.createElement)(Yf,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:s,disableCustomGradients:b},a)))}function Qf(e){var t=wo("color.gradients");return Object(d.isEmpty)(t)?null:Object(l.createElement)(m.PanelBody,{title:Object(k.__)("Gradient")},Object(l.createElement)(Xf,e))}var Zf=[25,50,75,100];function Jf(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,s=void 0===a||a,u=e.slug,b=e.width,f=e.height,p=e.onChange,v=e.onChangeImage,O=void 0===v?d.noop:v;function g(e,t){return function(){p({width:e,height:t})}}return Object(l.createElement)(l.Fragment,null,!Object(d.isEmpty)(i)&&Object(l.createElement)(m.SelectControl,{label:Object(k.__)("Image size"),value:u,options:i,onChange:O}),s&&Object(l.createElement)("div",{className:"block-editor-image-size-control"},Object(l.createElement)("p",{className:"block-editor-image-size-control__row"},Object(k.__)("Image dimensions")),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(k.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(l.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(k.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(m.ButtonGroup,{"aria-label":Object(k.__)("Image size presets")},Zf.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(l.createElement)(m.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:g(t,n)},e,"%")}))),Object(l.createElement)(m.Button,{isSmall:!0,onClick:g()},Object(k.__)("Reset")))))}var ep=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(l.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),tp=ep((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(l.createElement)(qu,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),np=Object(b.compose)([ep,Object(v.withSelect)((function(e,t){var n=t.clientId,r=(0,e(yr).getBlockOrder)(n);return{lastBlockClientId:Object(d.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(l.createElement)(Ku,{rootClientId:t,lastBlockClientId:n})})),rp=n(75),op=n.n(rp),cp=new WeakMap;function ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ap(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ip(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ip(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lp(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,a=e.__experimentalCaptureToolbars,s=e.__experimentalAppenderTagName,u=e.renderAppender,b=e.orientation,f=e.placeholder,m=e.__experimentalLayout;!function(e,t,n,r,o){var c=Object(v.useDispatch)(yr).updateBlockListSettings,i=Object(v.useSelect)((function(t){var n=t(yr).getBlockRootClientId(e);return{blockListSettings:t(yr).getBlockListSettings(e),parentLock:t(yr).getTemplateLock(n)}}),[e]),a=i.blockListSettings,s=i.parentLock,u=Object(l.useMemo)((function(){return t}),t);Object(l.useLayoutEffect)((function(){var t={allowedBlocks:u,templateLock:void 0===n?s:n};void 0!==r&&(t.__experimentalCaptureToolbars=r),void 0!==o&&(t.orientation=o),op()(a,t)||c(e,t)}),[e,a,u,n,s,r,o,c])}(t,n,o,a,b),function(e,t,n,r){var o=Object(v.useSelect)((function(e){return e(yr).getSelectedBlocksInitialCaretPosition}),[]),c=Object(v.useDispatch)(yr).replaceInnerBlocks,i=Object(v.useSelect)((function(t){return t(yr).getBlocks(e)}),[e]),a=Object(l.useRef)(null);Object(l.useLayoutEffect)((function(){if((0===i.length||"all"===n)&&!Object(d.isEqual)(t,a.current)){a.current=t;var l=Object(p.synchronizeBlocksWithTemplate)(i,t);Object(d.isEqual)(l,i)||c(e,l,0===i.length&&r&&0!==l.length,o())}}),[i,t,n,e])}(t,r,o,i);var O=Object(v.useSelect)((function(e){var n=e(yr).getBlock(t),r=Object(p.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){cp.has(t)||cp.set(t,new WeakMap);var n=cp.get(t);if(!n.has(e)){var r=Object(d.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(l.createElement)(Tl,{value:O},Object(l.createElement)(Eb,{rootClientId:t,renderAppender:u,__experimentalAppenderTagName:s,__experimentalLayout:m,wrapperRef:c,placeholder:f}))}function sp(e){return qs(e),Object(l.createElement)(lp,e)}var up=Object(l.forwardRef)((function(e,t){var n=dp({ref:t},e);return Object(l.createElement)("div",{className:"block-editor-inner-blocks"},Object(l.createElement)("div",n))}));function dp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=h(),r=n.clientId,o=Object(b.useViewportMatch)("medium","<"),c=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockName,c=t.isBlockSelected,i=t.hasSelectedInnerBlock,a=(0,t.isNavigationMode)()||o;return"core/template"!==n(r)&&!c(r)&&!i(r,!0)&&a}),[r,o]),a=Object(b.useMergeRefs)([e.ref,ed({rootClientId:r})]),s=t.value&&t.onChange?sp:lp;return ap(ap({},e),{},{ref:a,className:u()(e.className,"block-editor-block-list__layout",{"has-overlay":c}),children:Object(l.createElement)(s,Object(i.a)({},t,{clientId:r}))})}up.DefaultBlockAppender=np,up.ButtonBlockAppender=tp,up.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(l.createElement)(t,null)}));var bp=up,fp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),pp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),mp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),vp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),Op={left:fp,center:pp,right:mp,"space-between":vp},gp=function(e){var t=e.allowedControls,n=void 0===t?["left","center","right","space-between"]:t,r=e.isCollapsed,o=void 0===r||r,c=e.onChange,a=e.value,s=e.popoverProps,u=e.isToolbar,d=e.isToolbarButton,b=void 0===d||d,f=function(e){c(e===a?void 0:e)},p=a?Op[a]:Op.left,v=[{name:"left",icon:fp,title:Object(k.__)("Justify items left"),isActive:"left"===a,onClick:function(){return f("left")}},{name:"center",icon:pp,title:Object(k.__)("Justify items center"),isActive:"center"===a,onClick:function(){return f("center")}},{name:"right",icon:mp,title:Object(k.__)("Justify items right"),isActive:"right"===a,onClick:function(){return f("right")}},{name:"space-between",icon:vp,title:Object(k.__)("Space between items"),isActive:"space-between"===a,onClick:function(){return f("space-between")}}],O=u?m.ToolbarGroup:m.DropdownMenu,g=u?{isCollapsed:o}:{isToolbarButton:b};return Object(l.createElement)(O,Object(i.a)({icon:p,popoverProps:s,label:Object(k.__)("Change items justification"),controls:v.filter((function(e){return n.includes(e.name)}))},g))};function hp(e){return Object(l.createElement)(gp,Object(i.a)({},e,{isToolbar:!1}))}function jp(e){return Object(l.createElement)(gp,Object(i.a)({},e,{isToolbar:!0}))}var yp=n(286);function kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ep=[{id:"opensInNewTab",title:Object(k.__)("Open in new tab")}],wp=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?Ep:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(_p(_p({},t),{},Object(a.a)({},e.id,n)))}},s=c.map((function(e){return Object(l.createElement)(m.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(l.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(l.createElement)(m.VisuallyHidden,{as:"legend"},Object(k.__)("Currently selected link settings")),s)};var Cp=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(e){var t;return Object(pa.a)(this,o),(t=r.call(this,e)).onChange=t.onChange.bind(Object(va.a)(t)),t.onFocus=t.onFocus.bind(Object(va.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(va.a)(t)),t.selectLink=t.selectLink.bind(Object(va.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(va.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(va.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(l.createRef)(),t.inputRef=Object(l.createRef)(),t.updateSuggestions=Object(d.debounce)(t.updateSuggestions.bind(Object(va.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},t}return Object(ma.a)(o,[{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.showSuggestions,o=n.selectedSuggestion,c=this.props.value;r&&null!==o&&this.suggestionNodes[o]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Ib()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){t.scrollingIntoView=!1}),100)),e.value!==c&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentDidMount",value:function(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"shouldShowInitialSuggestions",value:function(){var e=this.state.suggestions,t=this.props,n=t.__experimentalShowInitialSuggestions,r=void 0!==n&&n,o=t.value;return!this.isUpdatingSuggestions&&r&&!(o&&o.length)&&!(e&&e.length)}},{key:"updateSuggestions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(Su.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(k.sprintf)(
63
  /* translators: %s: number of results. */
64
- Object(k._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(Object(k.__)("No results."),"assertive"),e.isUpdatingSuggestions=!1)})).catch((function(){e.suggestionsRequest===i&&(e.setState({loading:!1}),e.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}else this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}},{key:"onFocus",value:function(){var e=this.state.suggestions,t=this.props,n=t.disableSuggestions,r=t.value;!r||n||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(r.trim())}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,c=t.loading;if(n&&o.length&&!c){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case li.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case li.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case li.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(k.__)("Link selected.")));break;case li.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case li.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case li.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){return Object(l.createElement)(l.Fragment,null,this.renderControl(),this.renderSuggestions())}},{key:"renderControl",value:function(){var e=this.props,t=e.label,n=e.className,r=e.isFullWidth,o=e.instanceId,c=e.placeholder,i=void 0===c?Object(k.__)("Paste URL or type to search"):c,a=e.__experimentalRenderControl,s=e.value,d=void 0===s?"":s,b=this.state,f=b.loading,p=b.showSuggestions,v=b.selectedSuggestion,O=b.suggestionsListboxId,g=b.suggestionOptionIdPrefix,h={id:"url-input-control-".concat(o),label:t,className:u()("block-editor-url-input",n,{"is-full-width":r})},j={value:d,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(k.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":O,"aria-activedescendant":null!==v?"".concat(g,"-").concat(v):void 0,ref:this.inputRef};return a?a(h,j,f):Object(l.createElement)(m.BaseControl,h,Object(l.createElement)("input",j),f&&Object(l.createElement)(m.Spinner,null))}},{key:"renderSuggestions",value:function(){var e=this,t=this.props,n=t.className,r=t.__experimentalRenderSuggestions,o=t.value,c=void 0===o?"":o,a=t.__experimentalShowInitialSuggestions,s=void 0!==a&&a,b=this.state,f=b.showSuggestions,p=b.suggestions,v=b.selectedSuggestion,O=b.suggestionsListboxId,g=b.suggestionOptionIdPrefix,h=b.loading,j={id:O,ref:this.autocompleteRef,role:"listbox"},y=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(g,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===v}};return Object(d.isFunction)(r)&&f&&p.length?r({suggestions:p,selectedSuggestion:v,suggestionsListProps:j,buildSuggestionItemProps:y,isLoading:h,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:s&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(l.createElement)(m.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(l.createElement)("div",Object(i.a)({},j,{className:u()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(l.createElement)(m.Button,Object(i.a)({},y(0,n),{key:t.id,className:u()("block-editor-url-input__suggestion",{"is-selected":n===v}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.instanceId,o=e.disableSuggestions,c=e.__experimentalShowInitialSuggestions,i=void 0!==c&&c,a=t.showSuggestions,l=n&&n.length;return i||l||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),o}(l.Component),Sp=Object(b.compose)(b.withSafeTimeout,m.withSpokenMessages,b.withInstanceId,Object(v.withSelect)((function(e,t){if(!Object(d.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e(yr).getSettings)().__experimentalFetchLinkSuggestions}})))(Cp),Bp=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,a=e.buttonText;return n?(t=a?Object(d.isFunction)(a)?a(n):a:Object(l.createInterpolateElement)(Object(k.sprintf)(
65
  /* translators: %s: search term. */
66
- Object(k.__)("Create: <mark>%s</mark>"),n),{mark:Object(l.createElement)("mark",null)}),Object(l.createElement)(m.Button,Object(i.a)({},o,{className:u()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(l.createElement)(ra.a,{className:"block-editor-link-control__search-item-icon",icon:Vs.a}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},Ip=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(l.createElement)(Ir.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),xp=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,a=e.isURL,s=void 0!==a&&a,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(l.createElement)(m.Button,Object(i.a)({},t,{onClick:c,className:u()("block-editor-link-control__search-item",{"is-selected":o,"is-url":s,"is-entity":!s})}),s&&Object(l.createElement)(ra.a,{className:"block-editor-link-control__search-item-icon",icon:Ip}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(l.createElement)(m.TextHighlight,{text:n.title,highlight:b})),Object(l.createElement)("span",{"aria-hidden":!s,className:"block-editor-link-control__search-item-info"},!s&&(Object(Su.filterURLForDisplay)(Object(Su.safeDecodeURI)(n.url))||""),s&&Object(k.__)("Press ENTER to add this link"))),p&&n.type&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function Pp(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,a=e.buildSuggestionItemProps,s=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,v=e.suggestionsQuery,O=u()("block-editor-link-control__search-results",{"is-loading":b}),g=["url","mailto","tel","internal"],h=1===s.length&&g.includes(s[0].type.toLowerCase()),j=n&&!h&&!f,y=!(null!=v&&v.type),_="block-editor-link-control-search-results-label-".concat(t),E=f?Object(k.__)("Recently updated"):Object(k.sprintf)(
67
  /* translators: %s: search term. */
68
- Object(k.__)('Search results for "%s"'),r),w=Object(l.createElement)(f?l.Fragment:m.VisuallyHidden,{},Object(l.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},E));return Object(l.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,Object(l.createElement)("div",Object(i.a)({},c,{className:O,"aria-labelledby":_}),s.map((function(e,t){return j&&"__CREATE__"===e.type?Object(l.createElement)(Bp,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:a(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(l.createElement)(xp,{key:"".concat(e.id,"-").concat(e.type),itemProps:a(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:g.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:y})}))))}function Tp(e){var t=Object(d.startsWith)(e,"#");return Object(Su.isURL)(e)||e&&e.includes("www.")||t}function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Np(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ap=function(){return Promise.resolve([])},Lp=function(e){var t="URL",n=Object(Su.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(d.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(Su.prependHTTP)(e):e,type:t}])},Rp=function(){var e=Object(zl.a)(Lt.a.mark((function e(t,n,r,o,c,i){var a,l,s;return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(l=e.sent,s=!t.includes(" "),l=s&&i&&!a?l[0].concat(l[1]):l[0],!a){e.next=8;break}return e.abrupt("return",l);case 8:return e.abrupt("return",Tp(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(_x,t,n,r,o,c){return e.apply(this,arguments)}}();function Mp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vp=Promise.resolve([]),Hp=Object(l.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,a=void 0===i?null:i,s=e.placeholder,u=void 0===s?null:s,f=e.withCreateSuggestion,p=void 0!==f&&f,m=e.onCreateSuggestion,O=void 0===m?d.noop:m,g=e.onChange,h=void 0===g?d.noop:g,j=e.onSelect,y=void 0===j?d.noop:j,_=e.showSuggestions,E=void 0===_||_,w=e.renderSuggestions,C=void 0===w?function(e){return Object(l.createElement)(Pp,e)}:w,S=e.fetchSuggestions,B=void 0===S?null:S,I=e.allowDirectEntry,x=void 0===I||I,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,A=e.withURLSuggestion,L=void 0===A||A,R=e.createSuggestionButtonText,M=function(e,t,n,r){var o=Object(v.useSelect)((function(e){return{fetchSearchSuggestions:(0,e(yr).getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?Lp:Ap;return Object(l.useCallback)((function(t,i){var a=i.isInitialSuggestions;return Tp(t)?c(t,{isInitialSuggestions:a}):Rp(t,Dp(Dp({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,p,L),F=E?B||M:Vp,V=Object(b.useInstanceId)(Hp),H=Object(l.useState)(),z=Object(Co.a)(H,2),G=z[0],U=z[1],W=function(){var e=Object(zl.a)(Lt.a.mark((function e(t){var n,r;return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,"__CREATE__"!==t.type){e.next=12;break}return e.prev=2,e.next=5,O(t.title);case 5:n=e.sent,null!==(r=n)&&void 0!==r&&r.url&&y(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(x||n&&Object.keys(n).length>=1)&&y(Fp(Fp({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(_x){return e.apply(this,arguments)}}();return Object(l.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(G||{url:n})}},Object(l.createElement)(Sp,{className:a,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=u?u:Object(k.__)("Search or type url"),__experimentalRenderSuggestions:E?function(e){return C(Fp(Fp({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:R,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),zp=Hp,Gp=Object(m.createSlotFill)("BlockEditorLinkControlViewer"),Up=Gp.Slot,Wp=Gp.Fill;function Kp(e){var t=e.value,n=e.onEditClick,r=t&&Object(Su.filterURLForDisplay)(Object(Su.safeDecodeURI)(t.url),16)||"";return Object(l.createElement)("div",{"aria-label":Object(k.__)("Currently selected"),"aria-selected":"true",className:u()("block-editor-link-control__search-item",{"is-current":!0})},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)(m.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(l.createElement)(m.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(k.__)("Edit")),Object(l.createElement)(Up,{fillProps:t}))}var qp=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function $p(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,s=e.showSuggestions,u=void 0===s||s,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,v=e.withCreateSuggestion,O=e.inputValue,g=void 0===O?"":O,h=e.suggestionsQuery,j=void 0===h?{}:h,y=e.noURLSuggestion,_=void 0!==y&&y,E=e.createSuggestionButtonText;void 0===v&&p&&(v=!0);var w=Object(l.useRef)(!0),C=Object(l.useRef)(),S=Object(l.useState)(n&&n.url||""),B=Object(Co.a)(S,2),I=B[0],x=B[1],P=g||I,T=Object(l.useState)(void 0!==f?f:!n||!n.url),N=Object(Co.a)(T,2),D=N[0],A=N[1],L=Object(l.useRef)(!1);Object(l.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(l.useEffect)((function(){w.current?w.current=!1:(C.current.contains(C.current.ownerDocument.activeElement)||(Wl.focus.focusable.find(C.current)[0]||C.current).focus(),L.current=!1)}),[D]);var R=function(e){var t=Object(l.useRef)(),n=Object(l.useState)(!1),r=Object(Co.a)(n,2),o=r[0],c=r[1],i=Object(l.useState)(null),a=Object(Co.a)(i,2),s=a[0],u=a[1],d=function(){var n=Object(zl.a)(Lt.a.mark((function n(r){return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),u(null),n.prev=2,t.current=qp(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw u(n.t0.message||Object(k.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(_x){return n.apply(this,arguments)}}();return Object(l.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:s}}(p),M=R.createPage,F=R.isCreatingPage,V=R.errorMessage;return Object(l.createElement)("div",{tabIndex:-1,ref:C,className:"block-editor-link-control"},F&&Object(l.createElement)("div",{className:"block-editor-link-control__loading"},Object(l.createElement)(m.Spinner,null)," ",Object(k.__)("Creating"),"…"),(D||!n)&&!F&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(l.createElement)(zp,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:P,withCreateSuggestion:v,onCreateSuggestion:M,onChange:x,onSelect:function(e){var t;c(e),L.current=!(null===(t=C.current)||void 0===t||!t.contains(C.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!a,showSuggestions:u,suggestionsQuery:j,withURLSuggestion:!_,createSuggestionButtonText:E},Object(l.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(l.createElement)(m.Button,{type:"submit",label:Object(k.__)("Submit"),icon:yp.a,className:"block-editor-link-control__search-submit"})))),V&&Object(l.createElement)(m.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(l.createElement)(Kp,{value:n,onEditClick:function(){return A(!0)}}),Object(l.createElement)(wp,{value:n,settings:r,onChange:c}))}$p.ViewerFill=Wp;var Yp=$p,Xp=n(409),Qp=n(287),Zp=Object(m.withFilters)("editor.MediaUpload")((function(){return null})),Jp=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(v.useSelect)((function(e){return!!(0,e(yr).getSettings)().mediaUpload}),[])?r:n},em=Object(b.compose)([Object(v.withDispatch)((function(e){var t=e(ju.store);return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(m.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,a=e.onFilesUpload,s=void 0===a?d.noop:a,u=e.name,b=void 0===u?Object(k.__)("Replace"):u,f=e.createNotice,p=e.removeNotice,O=Object(l.useState)(t),g=Object(Co.a)(O,2),h=g[0],j=g[1],y=Object(v.useSelect)((function(e){return e(yr).getSettings().mediaUpload}),[]),_=Object(l.createRef)(),E=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),w=function(e){var t=document.createElement("div");t.innerHTML=Object(l.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},C=function(e){c(e),j(e.url),Object(Rt.speak)(Object(k.__)("The media file has been replaced")),p(E)},S=function(e){e.keyCode===li.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(l.createElement)(m.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(l.createElement)(m.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b)},renderContent:function(e){return e.onClose,Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(l.createElement)(Zp,{value:n,onSelect:function(e){return C(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(l.createElement)(m.MenuItem,{icon:Xp.a,onClick:t},Object(k.__)("Open Media Library"))}}),Object(l.createElement)(Jp,null,Object(l.createElement)(m.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;s(t),y({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(Co.a)(e,1)[0];C(t)},onError:w})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(l.createElement)(m.MenuItem,{icon:Qp.a,onClick:function(){t()}},Object(k.__)("Upload"))}}))),i&&Object(l.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[li.TAB,li.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[li.TAB,li.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(l.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(k.__)("Current media URL:")),Object(l.createElement)(Yp,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),_.current.focus()}})))}})})),tm=n(262);function nm(e){var t=e.url,n=e.urlLabel,r=e.className,o=u()(r,"block-editor-url-popover__link-viewer-url");return t?Object(l.createElement)(m.ExternalLink,{className:o,href:t},n||Object(Su.filterURLForDisplay)(Object(Su.safeDecodeURI)(t))):Object(l.createElement)("span",{className:o})}function rm(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,a=e.focusOnMount,s=void 0===a?"firstElement":a,u=Object(j.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(l.useState)(!1),b=Object(Co.a)(d,2),f=b[0],p=b[1],v=!!r&&f;return Object(l.createElement)(m.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:s,position:c},u),Object(l.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(l.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(l.createElement)(m.Button,{className:"block-editor-url-popover__settings-toggle",icon:es.a,label:Object(k.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),v&&Object(l.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!v&&Object(l.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}rm.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(j.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(l.createElement)("form",Object(i.a)({className:u()("block-editor-url-popover__link-editor",n)},c),Object(l.createElement)(Sp,{value:o,onChange:r,autocompleteRef:t}),Object(l.createElement)(m.Button,{icon:yp.a,label:Object(k.__)("Apply"),type:"submit"}))},rm.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,a=Object(j.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(l.createElement)("div",Object(i.a)({className:u()("block-editor-url-popover__link-viewer",t)},a),Object(l.createElement)(nm,{url:o,urlLabel:c,className:n}),r&&Object(l.createElement)(m.Button,{icon:tm.a,label:Object(k.__)("Edit"),onClick:r}))};var om=rm,cm=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(l.createElement)(om,{onClose:o},Object(l.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(l.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(k.__)("URL"),placeholder:Object(k.__)("Paste or type URL"),onChange:n,value:t}),Object(l.createElement)(m.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:yp.a,label:Object(k.__)("Apply"),type:"submit"})))},im=Object(m.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,a=void 0===i?{}:i,s=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,O=e.addToGallery,g=e.multiple,h=void 0!==g&&g,j=e.dropZoneUIOnly,y=e.disableDropZone,_=e.disableMediaButtons,E=e.onError,w=e.onSelect,C=e.onCancel,S=e.onSelectURL,B=e.onDoubleClick,I=e.onFilesPreUpload,x=void 0===I?d.noop:I,P=e.onHTMLDrop,T=void 0===P?d.noop:P,N=e.children,D=Object(v.useSelect)((function(e){return(0,e(yr).getSettings)().mediaUpload}),[]),A=Object(l.useState)(""),L=Object(Co.a)(A,2),R=L[0],M=L[1],F=Object(l.useState)(!1),V=Object(Co.a)(F,2),H=V[0],z=V[1];Object(l.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var G=function(e){M(e.target.value)},U=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),R&&S&&(S(R),W())},q=function(e){var t;if(x(e),h)if(O){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));w(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=w;else t=function(e){var t=Object(Co.a)(e,1)[0];return w(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:E})},$=function(e){q(e.target.files)},Y=function(e,t){var n=a.instructions,i=a.title;if(D||S||(n=Object(k.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(Co.a)(d,1)[0],v=1===d.length,O=v&&"audio"===p,g=v&&"image"===p,h=v&&"video"===p;void 0===n&&D&&(n=Object(k.__)("Upload a media file or pick one from your media library."),O?n=Object(k.__)("Upload an audio file, pick one from your media library, or add one with a URL."):g?n=Object(k.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(k.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(k.__)("Media"),O?i=Object(k.__)("Audio"):g?i=Object(k.__)("Image"):h&&(i=Object(k.__)("Video")))}var j=u()("block-editor-media-placeholder",o,{"is-appender":f});return Object(l.createElement)(m.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:B,preview:s},e,N)},X=function(){return y?null:Object(l.createElement)(m.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return C&&Object(l.createElement)(m.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(k.__)("Cancel"),isLink:!0,onClick:C},Object(k.__)("Cancel"))},Z=function(){return S&&Object(l.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(l.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(k.__)("Insert from URL")),H&&Object(l.createElement)(cm,{src:R,onChange:G,onSubmit:K,onClose:W}))};return j||_?(j&&Ft()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),Object(l.createElement)(Jp,null,X())):Object(l.createElement)(Jp,{fallback:Y(Z())},function(){var e=Object(l.createElement)(Zp,{addToGallery:O,gallery:h&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:h,onSelect:w,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(l.createElement)(m.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(k.__)("Media Library"))}});if(D&&f)return Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(m.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.Button,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(k.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(m.FormFileUpload,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(k.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),am=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(wf,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));am.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(j.a)(e,["value","tagName"]);return Object(l.createElement)(o,c,n)};var lm=am,sm=Object(l.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(j.a)(e,["__experimentalVersion"]);if(2===n)return Object(l.createElement)(lm,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,a=Object(j.a)(r,["className","onChange"]);return Object(l.createElement)(hs.a,Object(i.a)({ref:t,className:u()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},a))}));function um(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(um),c=r||Object(k.sprintf)(
69
  /* translators: 1: property name. 2: viewport name. */
70
- Object(k._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(l.createElement)(m.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var dm=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,s=void 0!==a&&a,d=e.defaultLabel,b=void 0===d?{id:"all",
71
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
72
  label:Object(k.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Object(k.__)("Small screens")},{id:"medium",label:Object(k.__)("Medium screens")},{id:"large",label:Object(k.__)("Large screens")}]:f;if(!t||!n||!c)return null;var v=r||Object(k.sprintf)(
73
  /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
74
- Object(k.__)("Use the same %s on all screensizes."),n),O=Object(k.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=c(Object(l.createElement)(um,{property:n,viewport:b}),b);
75
- /* translators: 'Help text for the responsive mode toggle control.' */return Object(l.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(l.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(l.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(l.createElement)(m.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:v,checked:!s,onChange:o,help:O}),Object(l.createElement)("div",{className:u()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&g,s&&(i?i(p):p.map((function(e){return Object(l.createElement)(l.Fragment,{key:e.id},c(Object(l.createElement)(um,{property:n,viewport:e}),e))}))))))};function bm(e){var t=e.character,n=e.type,r=e.onUse;return Object(b.useKeyboardShortcut)(li.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function fm(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(j.a)(e,["name","shortcutType","shortcutCharacter"]),a="RichText.ToolbarControls";return n&&(a+=".".concat(n)),r&&o&&(t=li.displayShortcut[r](o)),Object(l.createElement)(m.Fill,{name:a},Object(l.createElement)(m.ToolbarButton,Object(i.a)({},c,{shortcut:t})))}var pm=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(){var e;return Object(pa.a)(this,o),(e=r.apply(this,arguments)).onInput=e.onInput.bind(Object(va.a)(e)),e}return Object(ma.a)(o,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),o}(l.Component),mm=Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(m.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"})),vm=Object(l.forwardRef)((function(e,t){var n=Object(v.useSelect)((function(e){return e(yr).isNavigationMode()}),[]),r=Object(v.useDispatch)(yr).setNavigationMode,o=function(e){r("edit"!==e)};return Object(l.createElement)(m.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(l.createElement)(m.Button,Object(i.a)({},e,{ref:t,icon:n?mm:tm.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c
76
- /* translators: button label text should, if possible, be under 16 characters. */,label:Object(k.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.NavigableMenu,{role:"menu","aria-label":Object(k.__)("Modes")},Object(l.createElement)(m.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(ra.a,{icon:tm.a}),Object(k.__)("Edit"))},{value:"select",label:Object(l.createElement)(l.Fragment,null,mm,Object(k.__)("Select"))}]})),Object(l.createElement)("div",{className:"block-editor-tool-selector__help"},Object(k.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),Om=n(246),gm=n(410);var hm=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(){var e;return Object(pa.a)(this,o),(e=r.apply(this,arguments)).toggle=e.toggle.bind(Object(va.a)(e)),e.submitLink=e.submitLink.bind(Object(va.a)(e)),e.state={expanded:!1},e}return Object(ma.a)(o,[{key:"toggle",value:function(){this.setState({expanded:!this.state.expanded})}},{key:"submitLink",value:function(e){e.preventDefault(),this.toggle()}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.onChange,r=this.state.expanded,o=t?Object(k.__)("Edit link"):Object(k.__)("Insert link");return Object(l.createElement)("div",{className:"block-editor-url-input__button"},Object(l.createElement)(m.Button,{icon:Om.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(l.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(l.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(l.createElement)(m.Button,{className:"block-editor-url-input__back",icon:gm.a,label:Object(k.__)("Close"),onClick:this.toggle}),Object(l.createElement)(Sp,{value:t||"",onChange:n}),Object(l.createElement)(m.Button,{icon:yp.a,label:Object(k.__)("Submit"),type:"submit"}))))}}]),o}(l.Component),jm=n(168),ym=["noreferrer","noopener"],km=Object(l.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(m.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(l.createElement)(m.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(l.createElement)(m.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),_m=function(e){var t=e.linkDestination,n=e.onChangeUrl,r=e.url,o=e.mediaType,c=void 0===o?"image":o,i=e.mediaUrl,a=e.mediaLink,s=e.linkTarget,u=e.linkClass,b=e.rel,f=Object(l.useState)(!1),p=Object(Co.a)(f,2),v=p[0],O=p[1],g=Object(l.useCallback)((function(){O(!0)})),h=Object(l.useState)(!1),j=Object(Co.a)(h,2),y=j[0],_=j[1],E=Object(l.useState)(null),w=Object(Co.a)(E,2),C=w[0],S=w[1],B=Object(l.useRef)(null),I=Object(l.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),_(!0)})),x=Object(l.useCallback)((function(){_(!1)})),P=Object(l.useCallback)((function(){S(null),x(),O(!1)})),T=function(e){var t=e;return void 0===e||Object(d.isEmpty)(t)||Object(d.isEmpty)(t)||(Object(d.each)(ym,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(d.isEmpty)(t)&&(t=void 0)),t},N=Object(l.useCallback)((function(){return function(e){var t=B.current;t&&t.contains(e.target)||(O(!1),S(null),x())}})),D=Object(l.useCallback)((function(){return function(e){if(C){var t,r=(null===(t=L().find((function(e){return e.url===C})))||void 0===t?void 0:t.linkDestination)||"custom";n({href:C,linkDestination:r})}x(),S(null),e.preventDefault()}})),A=Object(l.useCallback)((function(){n({linkDestination:"none",href:""})})),L=function(){var e=[{linkDestination:"media",title:Object(k.__)("Media File"),url:"image"===c?i:void 0,icon:km}];return"image"===c&&a&&e.push({linkDestination:"attachment",title:Object(k.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(l.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(m.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(l.createElement)(m.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},R=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.ToggleControl,{label:Object(k.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||b?T(b):void 0}}(e);n(t)},checked:"_blank"===s}),Object(l.createElement)(m.TextControl,{label:Object(k.__)("Link Rel"),value:T(b)||"",onChange:function(e){n({rel:e})}}),Object(l.createElement)(m.TextControl,{label:Object(k.__)("Link CSS Class"),value:u||"",onChange:function(e){n({linkClass:e})}})),M=null!==C?C:r,F=(Object(d.find)(L(),["linkDestination",t])||{}).title;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.ToolbarButton,{icon:Om.a,className:"components-toolbar__control",label:r?Object(k.__)("Edit link"):Object(k.__)("Insert link"),"aria-expanded":v,onClick:g}),v&&Object(l.createElement)(om,{onFocusOutside:N(),onClose:P,renderSettings:function(){return R},additionalControls:!M&&Object(l.createElement)(m.NavigableMenu,null,Object(d.map)(L(),(function(e){return Object(l.createElement)(m.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=L(),r=t?(Object(d.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),x()}},e.title)})))},(!r||y)&&Object(l.createElement)(om.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:S,onSubmit:D(),autocompleteRef:B}),r&&!y&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(om.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:I,urlLabel:F}),Object(l.createElement)(m.Button,{icon:jm.a,label:Object(k.__)("Remove link"),onClick:A}))))},Em=n(154);function wm(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;if(Object(b.useViewportMatch)("small","<"))return null;var a={className:u()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!o,
77
  /* translators: button label text should, if possible, be under 16 characters. */
78
- children:Object(k.__)("Preview")};return Object(l.createElement)(m.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,icon:null},(function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.MenuGroup,null,Object(l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&Em.a},Object(k.__)("Desktop")),Object(l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&Em.a},Object(k.__)("Tablet")),Object(l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&Em.a},Object(k.__)("Mobile"))),t)}))}var Cm=n(357),Sm=/\((min|max)-width:[^\(]*?\)/g;function Bm(e){return!!e.media&&!!e.media.mediaText.match(Sm)}function Im(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function xm(e,t){return e.replace(Sm,(function(e){return Object(Cm.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function Pm(e,t){Object(l.useEffect)((function(){if(t){var n,r,o,c="undefined"==typeof window?[]:Object(d.filter)(null!==(n=null===(r=window)||void 0===r||null===(o=r.document)||void 0===o?void 0:o.styleSheets)&&void 0!==n?n:[],(function(e){return!!e.href&&Object(Su.getProtocol)(e.href)===window.location.protocol&&Object(Su.getAuthority)(e.href)===window.location.host})),i=[];return c.forEach((function(n,r){for(var o=!1,c=0;c<n.cssRules.length;++c){var a=n.cssRules[c];if((a.type===window.CSSRule.STYLE_RULE||a.type===window.CSSRule.MEDIA_RULE)&&(!o&&a.cssText.match(new RegExp("#start-".concat(e)))&&(o=!0),o&&a.cssText.match(new RegExp("#end-".concat(e)))&&(o=!1),o&&Bm(a))){var l=a.cssText;i[r]||(i[r]=[]),i[r][c]=l,Im(n,xm(l,t),c)}}})),function(){i.forEach((function(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];r&&Im(c[t],r,n)}}))}}}),[t])}function Tm(e,t){var n=Object(l.useState)(window.innerWidth),r=Object(Co.a)(n,2),o=r[0],c=r[1];Object(l.useEffect)((function(){if("Desktop"!==e){var t=function(){return c(window.innerWidth)};return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]);var i=function(e){var t;switch(e){case"Tablet":t=780;break;case"Mobile":t=360;break;default:return null}return t<o?t:o};return Pm("resizable-editor-section",t?null:i(e)),function(e){var t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:i(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}}(e)}var Nm=Object(v.withSelect)((function(e){return{selectedBlockClientId:e(yr).getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t?Object(l.createElement)(m.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:function(){Sc(t,document).focus()}},Object(k.__)("Skip to the selected block")):null})),Dm=n(159),Am=Object(v.withSelect)((function(e){return{blocks:(0,e(yr).getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(Dm.count)(Object(p.serialize)(t),"words");return Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(l.createElement)(hl,{icon:md,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(k.sprintf)(
79
  /* translators: %d: number of blocks */
80
  Object(k._n)("%d block","%d blocks",t.length),t.length)),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(k.sprintf)(
81
  /* translators: %d: number of words */
82
- Object(k._n)("%d word","%d words",n),n))))}));function Lm(e){var t=e.blockName,n=Object(v.useSelect)((function(e){var n,r,o=e(yr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(p.store).getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(l.useMemo)((function(){return[{label:Object(k.__)("Not set"),value:""}].concat(Object(y.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(l.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(l.createElement)(m.SelectControl,{options:i,value:r||"",label:Object(k.__)("Default Style"),onChange:a})}var Rm=function(e){var t=e.clientId,n=e.blockName,r=e.hasBlockStyles,o=e.bubblesVirtually,c=Cl(t);return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(Ks,c),Object(l.createElement)(Pf,{blockClientId:t}),r&&Object(l.createElement)("div",null,Object(l.createElement)(m.PanelBody,{title:Object(k.__)("Styles")},Object(l.createElement)(_d,{clientId:t}),Object(p.hasBlockSupport)(n,"defaultStylePicker",!0)&&Object(l.createElement)(Lm,{blockName:n}))),Object(l.createElement)(po.Slot,{bubblesVirtually:o}),Object(l.createElement)("div",null,Object(l.createElement)(Mm,{slotName:lo.slotName,bubblesVirtually:o})),Object(l.createElement)(Nm,{key:"back"}))},Mm=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(m.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(l.createElement)(m.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(k.__)("Advanced"),initialOpen:!1},Object(l.createElement)(lo.Slot,{bubblesVirtually:n})):null},Fm=function(e){var t=e.showNoBlockSelectedMessage,n=void 0===t||t,r=e.bubblesVirtually,o=void 0===r||r,c=Object(v.useSelect)((function(e){var t=e(yr),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,c=e(p.store).getBlockStyles,i=n(),a=i&&o(i),l=a&&Object(p.getBlockType)(a),s=a&&c(a);return{count:r(),selectedBlockClientId:i,selectedBlockName:a,blockType:l,hasBlockStyles:s&&s.length>0}}),[]),i=c.count,a=c.hasBlockStyles,s=c.selectedBlockName,u=c.selectedBlockClientId,d=c.blockType;if(i>1)return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(Am,null),Object(l.createElement)(po.Slot,{bubblesVirtually:o}));var b=s===Object(p.getUnregisteredTypeHandlerName)();return d&&u&&!b?Object(l.createElement)(Rm,{clientId:u,blockName:d.name,hasBlockStyles:a,bubblesVirtually:o}):n?Object(l.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(k.__)("No block selected.")):null};function Vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vm(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zm=Object(l.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(j.a)(e,["children","tagName"]);Ft()("wp.blockEditor.__experimentalBlock",{since:"5.6",alternative:"wp.blockEditor.useBlockProps"});var i=Nb(Hm(Hm({},c),{},{ref:t}));return Object(l.createElement)(o,i,n)})),Gm=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"].reduce((function(e,t){return e[t]=Object(l.forwardRef)((function(e,n){return Object(l.createElement)(zm,Object(i.a)({},e,{ref:n,tagName:t}))})),e}),zm);function Um(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(v.useSelect)((function(e){var t=e(yr),n=t.hasSelectedBlock,r=t.hasMultiSelection;return n()||r()})),n=Object(v.useDispatch)(yr),r=n.clearSelectedBlock;return Object(b.useRefEffect)((function(n){if(t)return n.addEventListener("mousedown",o),function(){n.removeEventListener("mousedown",o)};function o(t){t.target.closest(".wp-block")||e&&t.target!==n||r()}}),[t,r])}function Wm(e){return Object(l.createElement)("div",Object(i.a)({ref:Um()},e))}var Km=n(358),qm=n.n(Km),$m=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Ym(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Xm=n(224),Qm=n.n(Xm),Zm=Jm;function Jm(e){this.options=e||{}}Jm.prototype.emit=function(e){return e},Jm.prototype.visit=function(e){return this[e.type](e)},Jm.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var ev=tv;function tv(e){Zm.call(this,e)}Qm()(tv,Zm),tv.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},tv.prototype.comment=function(e){return this.emit("",e.position)},tv.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},tv.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},tv.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},tv.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},tv.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},tv.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},tv.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},tv.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},tv.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},tv.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},tv.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},tv.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},tv.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},tv.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var nv=rv;function rv(e){e=e||{},Zm.call(this,e),this.indentation=e.indent}Qm()(rv,Zm),rv.prototype.compile=function(e){return this.stylesheet(e)},rv.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},rv.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},rv.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},rv.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},rv.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},rv.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},rv.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},rv.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},rv.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},rv.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},rv.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},rv.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},rv.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},rv.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},rv.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},rv.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},rv.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var ov=function(e,t){try{var n=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function c(){var e={line:n,column:r};return function(t){return t.position=new i(e),f(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var a=[];function l(o){var c=new Error(t.source+":"+n+":"+r+": "+o);if(c.reason=o,c.filename=t.source,c.line=n,c.column=r,c.source=e,!t.silent)throw c;a.push(c)}function s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){var t,n,r,o=[];for(f(),p(o);e.length&&"}"!==e.charAt(0)&&(t=w()||(n=void 0,r=void 0,n=c(),(r=v())?(p(),n({type:"rule",selectors:r,declarations:g()})):l("selector missing")));)!1!==t&&(o.push(t),p(o));return o}function b(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){b(/^\s*/)}function p(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=c();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function v(){var e=b(/^([^{]+)/);if(e)return Ym(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function O(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Ym(t[0]),!b(/^:\s*/))return l("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace($m,""),value:n?Ym(n[0]).replace($m,""):""});return b(/^[;\s]*/),r}}function g(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=O();)!1!==e&&(t.push(e),p(t));return u()?t:l("missing '}'")}function h(){for(var e,t=[],n=c();e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var j,y=E("import"),k=E("charset"),_=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=c(),r=b(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function w(){if("@"===e[0])return function(){var e=c(),t=b(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=b(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!s())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=Ym(t[1]);if(!s())return l("@media missing '{'");var r=p().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Ym(t[1]),media:Ym(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=Ym(t[1]);if(!s())return l("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||y()||k()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Ym(t[1]),r=Ym(t[2]);if(!s())return l("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=v()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=O();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!s())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!s())return l("@font-face missing '{'");for(var t,n=p();t=O();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===Object(H.a)(i)&&e(i,o)}return r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null}),t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))}(e);return r=qm.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)})),((o=o||{}).compress?new ev(o):new nv(o)).compile(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var r,o};function cv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cv(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function av(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function lv(e,t){return new URL(e,t).toString()}var sv=function(e){return function(t){if("declaration"===t.type){var n=function(e){for(var t,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(t=n.exec(e));){var o={source:t[0],before:t[1],quote:t[2],value:t[3],after:t[4]};av(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return iv(iv({},e),{},{newUrl:"url("+e.before+e.quote+lv(e.value,c)+e.quote+e.after+")"})}));return iv(iv({},t),{},{value:(r=t.value,o=n,o.forEach((function(e){r=r.replace(e.source,e.newUrl)})),r)})}var r,o,c;return t}};function uv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bv=/^(body|html|:root).*$/,fv=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?dv(dv({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(bv)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},pv=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(e,(function(e){var n=e.css,r=e.baseURL,o=e.__experimentalNoWrapper,c=[];return t&&!(void 0!==o&&o)&&c.push(fv(t)),r&&c.push(sv(r)),c.length?ov(n,Object(b.compose)(c)):n}))};function mv(e){return Object(l.useCallback)((function(e){if(e){var t=e.ownerDocument,n=t.defaultView,r=t.body,o=t.querySelector(".editor-styles-wrapper"),c=n.getComputedStyle(o,null).getPropertyValue("background-color");Bo()(c).getLuminance()>.5?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}}),[e])}function vv(e){var t=e.styles;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("style",{ref:mv(t)}),pv(t,".editor-styles-wrapper").map((function(e,t){return Object(l.createElement)("style",{key:t},e)})))}var Ov=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,a=e.__experimentalInsertionIndex,s=e.onSelect,u=void 0===s?d.noop:s,b=e.shouldFocusBlock,f=void 0!==b&&b,p=Object(v.useSelect)((function(e){var r=e(yr).getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(l.createElement)(Hu,{onSelect:u,rootClientId:p,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalInsertionIndex:a,shouldFocusBlock:f})};function gv(){var e=Object(v.useSelect)((function(e){var t=e(yr),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(Co.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(v.useDispatch)(yr),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,p=o.moveBlocksDown;return Object(Vl.useShortcut)("core/block-editor/move-up",Object(l.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/move-down",Object(l.useCallback)((function(e){e.preventDefault(),p(t,r)}),[t,p]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/duplicate",Object(l.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/remove",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/insert-after",Object(l.useCallback)((function(e){e.preventDefault(),a(Object(d.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/insert-before",Object(l.useCallback)((function(e){e.preventDefault(),s(Object(d.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/delete-multi-selection",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(Vl.useShortcut)("core/block-editor/select-all",Object(l.useCallback)((function(e){e.preventDefault(),u(Object(d.first)(n),Object(d.last)(n))}),[n,u])),Object(Vl.useShortcut)("core/block-editor/unselect",Object(l.useCallback)((function(e){e.preventDefault(),b(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}gv.Register=function(){var e=Object(v.useDispatch)(Vl.store).registerShortcut;return Object(l.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(k.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(k.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(k.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(k.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(k.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(k.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(k.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(k.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(k.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(k.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var hv=gv;function jv(){return Ft()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}var yv=new Set([li.UP,li.RIGHT,li.DOWN,li.LEFT,li.ENTER,li.BACKSPACE]);function kv(){var e=Object(v.useSelect)((function(e){return e(yr).isTyping()})),t=Object(v.useDispatch)(yr).stopTyping;return Object(b.useRefEffect)((function(n){if(e){var r,o,c=n.ownerDocument;return c.addEventListener("mousemove",i),function(){c.removeEventListener("mousemove",i)}}function i(e){var n=e.clientX,c=e.clientY;r&&o&&(r!==n||o!==c)&&t(),r=n,o=c}}),[e,t])}function _v(){var e=Object(v.useSelect)((function(e){return e(yr).isTyping()})),t=Object(v.useDispatch)(yr),n=t.startTyping,r=t.stopTyping,o=kv(),c=Object(b.useRefEffect)((function(t){var o=t.ownerDocument,c=o.defaultView;if(e){var i;function a(e){var t=e.target;i=c.setTimeout((function(){Object(Wl.isTextField)(t)||r()}))}function l(e){var t=e.keyCode;t!==li.ESCAPE&&t!==li.TAB||r()}function s(){var e=c.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||r()}return t.addEventListener("focus",a),t.addEventListener("keydown",l),o.addEventListener("selectionchange",s),function(){c.clearTimeout(i),t.removeEventListener("focus",a),t.removeEventListener("keydown",l),o.removeEventListener("selectionchange",s)}}function u(e){var r=e.type,o=e.target;Object(Wl.isTextField)(o)&&t.contains(o)&&("keydown"!==r||function(e){var t=e.keyCode;return!e.shiftKey&&yv.has(t)}(e))&&n()}return t.addEventListener("keypress",u),t.addEventListener("keydown",u),function(){t.removeEventListener("keypress",u),t.removeEventListener("keydown",u)}}),[e,n,r]);return Object(b.useMergeRefs)([o,c])}var Ev=function(e){var t=e.children;return Object(l.createElement)("div",{ref:_v()},t)};function wv(){return Ft()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}var Cv=-1!==window.navigator.userAgent.indexOf("Trident"),Sv=new Set([li.UP,li.DOWN,li.LEFT,li.RIGHT]);function Bv(){var e=Object(v.useSelect)((function(e){return e(yr).hasSelectedBlock()}));return Object(b.useRefEffect)((function(t){if(e){var n,r,o,c=t.ownerDocument,i=c.defaultView;return i.addEventListener("scroll",a,!0),i.addEventListener("resize",a,!0),t.addEventListener("keydown",l),t.addEventListener("keyup",s),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),function(){i.removeEventListener("scroll",a,!0),i.removeEventListener("resize",a,!0),t.removeEventListener("keydown",l),t.removeEventListener("keyup",s),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),c.removeEventListener("selectionchange",d),i.cancelAnimationFrame(n),i.cancelAnimationFrame(r)}}function a(){n||(n=i.requestAnimationFrame((function(){b(),n=null})))}function l(e){r&&i.cancelAnimationFrame(r),r=i.requestAnimationFrame((function(){s(e),r=null}))}function s(e){var n=e.keyCode;if(f()){var r=Object(Wl.computeCaretRect)(i);if(r)if(o)if(Sv.has(n))o=r;else{var a=r.top-o.top;if(0!==a){var l=Object(Wl.getScrollContainer)(t);if(l){var s=l===c.body,u=s?i.scrollY:l.scrollTop,d=s?0:l.getBoundingClientRect().top,b=s?o.top/i.innerHeight:(o.top-d)/(i.innerHeight-d);if(0===u&&b<.75&&(p=t.querySelectorAll('[contenteditable="true"]'))[p.length-1]===c.activeElement)o=r;else{var p,m=s?i.innerHeight:l.clientHeight;o.top+o.height>d+m||o.top<d?o=r:s?i.scrollBy(0,a):l.scrollTop+=a}}}}else o=r}}function u(){c.addEventListener("selectionchange",d)}function d(){c.removeEventListener("selectionchange",d),b()}function b(){f()&&(o=Object(Wl.computeCaretRect)(i))}function f(){return t.contains(c.activeElement)&&c.activeElement.isContentEditable}}),[e])}var Iv=Cv?function(e){return e.children}:function(e){var t=e.children;return Object(l.createElement)("div",{ref:Bv(),className:"block-editor__typewriter"},t)},xv=Object(d.overEvery)([Wl.isTextField,Wl.focus.tabbable.isTabbableIndex]);function Pv(){return Object(b.useRefEffect)((function(e){function t(t){if(t.target===e){var n=Wl.focus.focusable.find(e),r=Object(d.findLast)(n,xv);r&&(Object(Wl.placeCaretAtHorizontalEdge)(r,!0),t.preventDefault())}}return e.addEventListener("mousedown",t),function(){e.addEventListener("mousedown",t)}}),[])}function Tv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nv(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Tv(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tv(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(document.body.classList);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith("admin-color-")&&e.body.classList.add(r)}}catch(e){n.e(e)}finally{n.f()}}var Dv=Object(l.forwardRef)((function(e,t){var n=e.contentRef,r=e.children,o=e.head,c=e.headHTML,a=Object(j.a)(e,["contentRef","children","head","headHTML"]),s=Object(l.useState)(),u=Object(Co.a)(s,2),d=u[0],f=u[1],p=Object(l.useCallback)((function(e){function t(){var t,r=e.contentDocument,o=r.readyState,i=r.body;return("interactive"===o||"complete"===o)&&("function"==typeof n?n(i):n&&(n.current=i),function(e,t){e.head.innerHTML="<style>body{margin:0}</style>"+t}(r,c),Nv(r),t=r,Array.from(document.styleSheets).forEach((function(e){try{e.cssRules}catch(e){return}var n=e.ownerNode,r=e.cssRules;r&&Array.from(r).find((function(e){var t=e.selectorText;return t&&(t.includes(".".concat("editor-styles-wrapper"))||t.includes(".".concat("wp-block")))}))&&!t.getElementById(n.id)&&t.head.appendChild(n.cloneNode(!0))})),function(e){var t=e.defaultView,n=t.frameElement;function r(e){var r=Object.getPrototypeOf(e).constructor.name,o=window[r],c={};for(var i in e)c[i]=e[i];if(e instanceof t.MouseEvent){var a=n.getBoundingClientRect();c.clientX+=a.left,c.clientY+=a.top}var l=new o(e.type,c);!n.dispatchEvent(l)&&e.preventDefault()}for(var o=0,c=["keydown","keypress","dragover"];o<c.length;o++){var i=c[o];e.addEventListener(i,r)}}(r),Nv(r),f(r),!0)}e&&(t()||e.addEventListener("load",(function(){t()})))}),[]);return Object(l.createElement)("iframe",Object(i.a)({},a,{ref:Object(b.useMergeRefs)([t,p]),tabIndex:"0",title:Object(k.__)("Editor canvas"),name:"editor-canvas"}),d&&Object(l.createPortal)(Object(l.createElement)(m.__experimentalStyleProvider,{document:d},r),d.body),d&&Object(l.createPortal)(o,d.head))}));function Av(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Av(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Av(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rv=Object(l.createContext)({});function Mv(e){var t,n=Object(l.useContext)(Rv),r=h().name,o=Boolean(null===(t=n[r])||void 0===t?void 0:t.has(e)),c=Object(l.useMemo)((function(){return function(e,t,n){var r=Lv(Lv({},e),{},Object(a.a)({},t,e[t]?new Set(e[t]):new Set));return r[t].add(n),r}(n,r,e)}),[n,r,e]);return[o,Object(l.useCallback)((function(e){var t=e.children;return Object(l.createElement)(Rv.Provider,{value:c},t)}),[c])]}function Fv(e){if(void 0===e)e=E.colors;else{var t=e.filter((function(e){return e.color}));0===t.length?e=E.colors:t.length<e.length&&(e=t)}return e}function Vv(e){if(void 0===e)e=E.gradients;else{var t=e.filter((function(e){return e.gradient}));0===t.length?e=E.gradients:t.length<e.length&&(e=t)}return e}},55:function(e,t){e.exports=window.wp.a11y},58:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},59:function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,r,a={r:0,g:0,b:0},l=1,d=null,b=null,f=null,p=!1,m=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,r=e.b,a={r:255*N(t,255),g:255*N(n,255),b:255*N(r,255)},p=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=R(e.s),b=R(e.v),a=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),c=e-r,i=n*(1-t),a=n*(1-c*t),l=n*(1-(1-c)*t),s=r%6;return{r:255*[n,a,i,i,l,n][s],g:255*[l,n,n,a,i,i][s],b:255*[i,i,l,n,n,a][s]}}(e.h,d,b),p=!0,m="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=R(e.s),f=R(e.l),a=function(e,t,n){var r,o,c;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),c=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=T(l),{ok:p,format:e.format||m,r:s(255,u(a.r,0)),g:s(255,u(a.g,0)),b:s(255,u(a.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=(c+i)/2;if(c==i)r=o=0;else{var l=c-i;switch(o=a>.5?l/(2-c-i):l/(c+i),c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=c,l=c-i;if(o=0===c?0:l/c,c==i)r=0;else{switch(c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function m(e,t,n,r){var o=[L(l(e).toString(16)),L(l(t).toString(16)),L(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function v(e,t,n,r){return[L(M(r)),L(l(e).toString(16)),L(l(t).toString(16)),L(l(n).toString(16))].join("")}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=D(n.s),b(n)}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=D(n.s),b(n)}function h(e){return b(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=D(n.l),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(255,n.b-l(-t/100*255))),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=D(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+a)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var c=[L(l(e).toString(16)),L(l(t).toString(16)),L(l(n).toString(16)),L(M(r))];return o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(O,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c,i,a,l=b.readability(e,t);switch(o=!1,(c=n,"AA"!==(i=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(a=(c.size||"small").toLowerCase())&&"large"!==a&&(a="small"),r={level:i,size:a}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,a=null,l=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var s=0;s<t.length;s++)(r=b.readability(e,t[s]))>l&&(l=r,a=b(t[s]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return s(1,u(0,e))}function A(e){return parseInt(e,16)}function L(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},62:function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},63: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)}n.d(t,"a",(function(){return r}))},7:function(e,t){e.exports=window.wp.primitives},71:function(e,t){e.exports=window.wp.htmlEntities},75:function(e,t){e.exports=window.wp.isShallowEqual},77:function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(i=0;i<l;i++)if(a.args[i]!==arguments[i]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(c=new Array(l),i=0;i<l;i++)c[i]=arguments[i];return a={args:c,val:e.apply(null,c)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},8:function(e,t){e.exports=window.React},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(39),o=n(30),c=n(40);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(_n=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}}});
1
+ window.wp=window.wp||{},window.wp.blockEditor=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=542)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},11:function(e,t){e.exports=window.wp.blocks},12:function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},121:function(e,t,n){"use strict";t.__esModule=!0;var r=n(241);t.default=r.TextareaAutosize},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},135:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.a=c},14:function(e,t){e.exports=window.wp.compose},145:function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(234)),c=r(n(235)),i=n(8),a=r(i),l=r(n(208)),s=r(n(237)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!u.und(n)||e===t}};function d(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function b(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return u.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(u.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return u.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var v,O,g=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),h=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}return l(t,e),t}(g),j=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}l(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function y(e,t){v={fn:e,transform:t}}function k(e){O=e}var _,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},w=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function C(e){_=e}var S,B=function(){return Date.now()};function I(e){S=e}var x,P,T=function(e){return e.current};function N(e){x=e}var D=Object.freeze({get applyAnimatedValues(){return v},injectApplyAnimatedValues:y,get colorNames(){return O},injectColorNames:k,get requestFrame(){return E},get cancelFrame(){return w},injectFrame:function(e,t){E=e,w=t},get interpolation(){return _},injectStringInterpolator:C,get now(){return B},injectNow:function(e){B=e},get defaultElement(){return S},injectDefaultElement:I,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:N,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),A=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return l(t,e),t}(j),L=!1,R=new Set,M=function e(){if(!L)return!1;var t=B(),n=R,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,l=0;l<i.configs.length;l++){for(var s=i.configs[l],u=void 0,d=void 0,b=0;b<s.animatedValues.length;b++){var f=s.animatedValues[b];if(!f.done){var p=s.fromValues[b],m=s.toValues[b],v=f.lastPosition,O=m instanceof g,h=Array.isArray(s.initialVelocity)?s.initialVelocity[b]:s.initialVelocity;if(O&&(m=m.getValue()),s.immediate)f.setValue(m),f.done=!0;else if("string"!=typeof p&&"string"!=typeof m){if(void 0!==s.duration)v=p+s.easing((t-f.startTime)/s.duration)*(m-p),u=t>=f.startTime+s.duration;else if(s.decay)v=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-v)<.1)&&(m=v);else{d=void 0!==f.lastTime?f.lastTime:t,h=void 0!==f.lastVelocity?f.lastVelocity:s.initialVelocity,t>d+64&&(d=t);for(var j=Math.floor(t-d),y=0;y<j;++y)v+=1*(h+=(-s.tension*(v-m)+-s.friction*h)/s.mass*1/1e3)/1e3;var k=!(!s.clamp||0===s.tension)&&(p<m?v>m:v<m),_=Math.abs(h)<=s.precision,w=0===s.tension||Math.abs(m-v)<=s.precision;u=k||_&&w,f.lastVelocity=h,f.lastTime=t}O&&!s.toValues[b].done&&(u=!1),u?(f.value!==m&&(v=m),f.done=!0):a=!0,f.setValue(v),f.lastPosition=v}else f.setValue(m),f.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(R.delete(i),i.stop(!0))}return R.size?P?P():E(e):L=!1,L};function F(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return F({range:e,output:t,extrapolate:n});if(_&&"string"==typeof e.output[0])return _(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,l){var s=l?l(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t),s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r,s)}(e,c[t],c[t+1],o[t],o[t+1],l,i,a,r.map)}}var V=function(e){function t(n,r,o){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=F(r,o),c}l(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t){this.calc=F(e,t)},n.interpolate=function(e,n){return new t(this,e,n)},t}(h),H=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}l(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t){return new V(this,e,t)},t}(g),z=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new H(e)})),n}l(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(h),G=0,U=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(u.arr(i)||u.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var l={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:p(r,n)},a),s=l[i.delay]&&l[i.delay].to;l[i.delay]=o({},l[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(l)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(t.merged=o({},r,t.merged)),u.obj(i)&&(t.merged=o({},t.merged,i))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,i){var a=o.delay,l=c(o,["delay"]),s=function(o){i===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){n===t.guid&&(d?t.runAsync(l,s):t.diff(l).start(s))}),a):d?t.runAsync(l,s):t.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,R.has(this)||R.add(this),L||(L=!0,E(P||M));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,R.has(this)&&R.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(u.arr(r.to))for(var l=function(e){var t=e,c=o({},r,m(r.to[t]));u.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)l(s);else if(u.fun(r.to)){var d,b=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(u.arr(t.config)&&(t.config=t.config[b]),b++,i===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,l=n.config,s=void 0===l?{}:l,d=n.reverse,m=n.attach,v=n.reset,g=n.immediate;if(d){var h=[a,c];c=h[0],a=h[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var j=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},l=u.num(i),d=u.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!O[i],m=u.arr(i),h=!l&&!m&&!d,y=u.und(c[r])?i:c[r],k=l||m||d?i:1,E=p(s,r);j&&(k=j.animations[r].parent);var w,C=a.parent,S=a.interpolation,I=f(j?k.getPayload():k),x=i;h&&(x=_({range:[0,1],output:[i,i]})(1));var P,T=S&&S.getValue(),N=!u.und(C)&&a.animatedValues.some((function(e){return!e.done})),D=!u.equ(x,T),A=!u.equ(x,a.previous),L=!u.equ(E,a.config);if(v||A&&D||L){var R;if(l||d)C=S=a.parent||new H(y);else if(m)C=S=a.parent||new z(y);else if(h){var M=a.interpolation&&a.interpolation.calc(a.parent.value);M=void 0===M||v?y:M,a.parent?(C=a.parent).setValue(0,!1):C=new H(0);var F={output:[M,i]};a.interpolation?(S=a.interpolation,a.interpolation.updateConfig(F)):S=C.interpolate(F)}return I=f(j?k.getPayload():k),w=f(C.getPayload()),v&&!h&&C.setValue(y,!1),t.hasChanged=!0,w.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=N?e.lastVelocity:void 0,e.lastTime=N?e.lastTime:void 0,e.startTime=B(),e.done=!1,e.animatedStyles.clear()})),p(g,r)&&C.setValue(h?k:i,!1),o({},e,((R={})[r]=o({},a,{name:r,parent:C,interpolation:S,animatedValues:w,toValues:I,previous:x,config:E,fromValues:f(C.getValue()),immediate:p(g,r),initialVelocity:b(E.velocity,0),clamp:b(E.clamp,!1),precision:b(E.precision,.01),tension:b(E.tension,170),friction:b(E.friction,26),mass:b(E.mass,1),duration:E.duration,easing:b(E.easing,(function(e){return e})),decay:E.decay}),R))}return D?e:(h&&(C.setValue(1,!1),S.updateConfig({output:[x,x]})),C.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:x}),P)))}),this.animations),this.hasChanged)for(var y in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[y]=this.animations[y].interpolation,this.values[y]=this.animations[y].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=u.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new U,i=o?p(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],l=c[1];r.current=a,i.useImperativeHandle(l,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?p(e,n,t):e[n]),l||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):l||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,q=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(u.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=v.transform(t)),n.payload=t,n}return l(t,e),t}(j),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=le(o,r,e+1/3),i=le(o,r,e),a=le(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function be(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function pe(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|255)>>>0:(n=te.exec(t))?(ue(n[1])<<24|ue(n[2])<<16|ue(n[3])<<8|be(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(se(de(n[1]),fe(n[2]),fe(n[3]))|be(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ve=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Oe=new RegExp("("+Object.keys(Q).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","Ms","Moz","O"];function je(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return he.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var ye={};N((function(e){return new X(e)})),I("div"),C((function(e){var t=e.output.map((function(e){return e.replace(ve,pe)})).map((function(e){return e.replace(Oe,pe)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return F(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),k(Q),y((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),l="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var u=0===s.indexOf("--"),d=je(s,n[s],u);"float"===s&&(s="cssFloat"),u?e.style.setProperty(s,d):e.style[s]=d}for(var b in a){var f=l?b:ye[b]||(ye[b]=b.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,a[b])}}),(function(e){return e}));var ke,_e,Ee=(ke=function(e){return i.forwardRef((function(t,n){var r=d(),l=i.useRef(!0),s=i.useRef(null),b=i.useRef(null),f=i.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){b.current&&!1===v.fn(b.current,s.current.getAnimatedValue())&&r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){l.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(b,l,r)})),f(t);var p=s.current.getValue(),m=(p.scrollTop,p.scrollLeft,c(p,["scrollTop","scrollLeft"]));return a.createElement(e,o({},m,{ref:function(e){return b.current=(t=e,(r=n)&&(u.fun(r)?r(t):u.obj(r)&&(r.current=t)),t);var t,r}}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=_e?t[0].toLowerCase()+t.substring(1):t;return e[n]=ke(n),e}),ke)}),we=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=M,t.animated=we,t.a=we,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=u.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=u.fun(t),c=p(t),a=i.useRef(),l=W(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:p(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=l[0],d=l[1],b=l[2],f=i.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:p(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&f(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,f,b]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=$(r),l=a.lazy,s=void 0!==l&&l,u=(a.unique,a.reset),b=void 0!==u&&u,f=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),v=a.onRest,O=a.onStart,g=a.ref,h=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),y=i.useRef(!1),k=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!y.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(k.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(k.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(k.current.instances).map((function(e){return e[1]}))}}})),k.current=function(e,t){for(var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=$(t),l=a.items,s=a.keys,u=a.initial,d=a.from,b=a.enter,f=a.leave,m=a.update,v=a.trail,O=void 0===v?0:v,g=a.unique,h=a.config,j=a.order,y=void 0===j?["enter","leave","update"]:j,k=$(r),_=k.keys,E=k.items,w=o({},i.current),C=[].concat(i.deleted),S=Object.keys(w),B=new Set(S),I=new Set(s),x=s.filter((function(e){return!B.has(e)})),P=i.transitions.filter((function(e){return!e.destroyed&&!I.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return B.has(e)})),N=-O;y.length;)switch(y.shift()){case"enter":x.forEach((function(e,t){g&&C.find((function(t){return t.originalKey===e}))&&(C=C.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=l[r],c=n&&void 0!==u?"initial":"enter";w[e]={slot:c,originalKey:e,key:g?String(e):K++,item:o,trail:N+=O,config:p(h,o,c),from:p(n&&void 0!==u?u||{}:d,o),to:p(b,o)}}));break;case"leave":P.forEach((function(e){var t=_.indexOf(e),n=E[t];C.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=O,config:p(h,n,"leave"),to:p(f,n)})),delete w[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];w[e]=o({},w[e],{item:n,slot:"update",trail:N+=O,config:p(h,n,"update"),to:p(m,n)})}))}var D=s.map((function(e){return w[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:D,current:w,deleted:C,prevProps:t})}(k.current,r),k.current.changed&&k.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,l=e.item;k.current.instances.has(a)||k.current.instances.set(a,new U);var u=k.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:g,onRest:function(n){k.current.mounted&&(e.destroyed&&(g||s||Y(k,a),f&&f(l)),!Array.from(k.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&k.current.deleted.length>0&&Y(k),v&&v(l,t,n))},onStart:O&&function(){return O(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),k.current.paused||u.start()})),i.useEffect((function(){return k.current.mounted=y.current=!0,function(){k.current.mounted=y.current=!1,Array.from(k.current.instances).map((function(e){return e[1].destroy()})),k.current.instances.clear()}}),[]),k.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:k.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){u.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25),o=n(44),c=n(30);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(c.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.")}()}},153:function(e,t,n){"use strict";var r=n(5),o=n(13),c=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,a=void 0===n?24:n,l=Object(o.a)(e,["icon","size"]);return Object(c.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:a,height:a},l))}},154:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));t.a=c},158:function(e,t,n){"use strict";e.exports=n(238)},159:function(e,t){e.exports=window.wp.wordcount},16:function(e,t){e.exports=window.regeneratorRuntime},163:function(e,t){e.exports=window.wp.shortcode},168:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.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"}));t.a=c},17:function(e,t){e.exports=window.wp.keycodes},177:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));t.a=c},178:function(e,t,n){"use strict";var r=n(179);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},179:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},193:function(e,t){e.exports=window.wp.tokenList},2:function(e,t){e.exports=window.lodash},207:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=c},208:function(e,t,n){var r=n(236);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},21:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},224:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},234:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},235:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},236:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},237: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},e.exports.default=e.exports,e.exports.__esModule=!0},238:function(e,t,n){"use strict";var r=n(239);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,c=n.onlyScrollIfNeeded,i=n.alignWithTop,a=n.alignWithLeft,l=n.offsetTop||0,s=n.offsetLeft||0,u=n.offsetBottom||0,d=n.offsetRight||0;o=void 0===o||o;var b=r.isWindow(t),f=r.offset(e),p=r.outerHeight(e),m=r.outerWidth(e),v=void 0,O=void 0,g=void 0,h=void 0,j=void 0,y=void 0,k=void 0,_=void 0,E=void 0,w=void 0;b?(k=t,w=r.height(k),E=r.width(k),_={left:r.scrollLeft(k),top:r.scrollTop(k)},j={left:f.left-_.left-s,top:f.top-_.top-l},y={left:f.left+m-(_.left+E)+d,top:f.top+p-(_.top+w)+u},h=_):(v=r.offset(t),O=t.clientHeight,g=t.clientWidth,h={left:t.scrollLeft,top:t.scrollTop},j={left:f.left-(v.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-s,top:f.top-(v.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-l},y={left:f.left+m-(v.left+g+(parseFloat(r.css(t,"borderRightWidth"))||0))+d,top:f.top+p-(v.top+O+(parseFloat(r.css(t,"borderBottomWidth"))||0))+u}),j.top<0||y.top>0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+y.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+y.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+y.top)),o&&(j.left<0||y.left>0?!0===a?r.scrollLeft(t,h.left+j.left):!1===a?r.scrollLeft(t,h.left+y.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+y.left):c||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+y.left)))}},239:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function c(e,t){var n=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function i(e){return c(e)}function a(e){return c(e,!0)}function l(e){var t=function(e){var t,n=void 0,r=void 0,o=e.ownerDocument,c=o.body,i=o&&o.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=i.clientLeft||c.clientLeft||0,top:r-=i.clientTop||c.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=i(r),t.top+=a(r),t}var s=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),u=/^(top|right|bottom|left)$/,d="left",b=void 0;function f(e,t){for(var n=0;n<e.length;n++)t(e[n])}function p(e){return"border-box"===b(e,"boxSizing")}"undefined"!=typeof window&&(b=window.getComputedStyle?function(e,t,n){var r="",o=e.ownerDocument,c=n||o.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(s.test(n)&&!u.test(t)){var r=e.style,o=r[d],c=e.runtimeStyle[d];e.runtimeStyle[d]=e.currentStyle[d],r[d]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[d]=o,e.runtimeStyle[d]=c}return""===n?"auto":n});var m=["margin","border","padding"];function v(e,t,n){var r={},o=e.style,c=void 0;for(c in t)t.hasOwnProperty(c)&&(r[c]=o[c],o[c]=t[c]);for(c in n.call(e),t)t.hasOwnProperty(c)&&(o[c]=r[c])}function O(e,t,n){var r=0,o=void 0,c=void 0,i=void 0;for(c=0;c<t.length;c++)if(o=t[c])for(i=0;i<n.length;i++){var a;a="border"===o?o+n[i]+"Width":o+n[i],r+=parseFloat(b(e,a))||0}return r}function g(e){return null!=e&&e==e.window}var h={};function j(e,t,n){if(g(e))return"width"===t?h.viewportWidth(e):h.viewportHeight(e);if(9===e.nodeType)return"width"===t?h.docWidth(e):h.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],o="width"===t?e.offsetWidth:e.offsetHeight,c=(b(e),p(e)),i=0;(null==o||o<=0)&&(o=void 0,(null==(i=b(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=c?1:-1);var a=void 0!==o||c,l=o||i;if(-1===n)return a?l-O(e,["border","padding"],r):i;if(a){var s=2===n?-O(e,["border"],r):O(e,["margin"],r);return l+(1===n?0:s)}return i+O(e,m.slice(n),r)}f(["Width","Height"],(function(e){h["doc"+e]=function(t){var n=t.document;return Math.max(n.documentElement["scroll"+e],n.body["scroll"+e],h["viewport"+e](n))},h["viewport"+e]=function(t){var n="client"+e,r=t.document,o=r.body,c=r.documentElement[n];return"CSS1Compat"===r.compatMode&&c||o&&o[n]||c}}));var y={position:"absolute",visibility:"hidden",display:"block"};function k(e){var t=void 0,n=arguments;return 0!==e.offsetWidth?t=j.apply(void 0,n):v(e,y,(function(){t=j.apply(void 0,n)})),t}function _(e,t,n){var r=n;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==r?("number"==typeof r&&(r+="px"),void(e.style[t]=r)):b(e,t);for(var c in t)t.hasOwnProperty(c)&&_(e,c,t[c])}f(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);h["outer"+t]=function(t,n){return t&&k(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];h[e]=function(t,r){return void 0===r?t&&k(t,e,-1):t?(b(t),p(t)&&(r+=O(t,["padding","border"],n)),_(t,e,r)):void 0}})),e.exports=r({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return l(e);!function(e,t){"static"===_(e,"position")&&(e.style.position="relative");var n=l(e),r={},o=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(o=parseFloat(_(e,c))||0,r[c]=o+t[c]-n[c]);_(e,r)}(e,t)},isWindow:g,each:f,css:_,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var n in e)e.hasOwnProperty(n)&&(t.overflow[n]=e.overflow[n]);return t},scrollLeft:function(e,t){if(g(e)){if(void 0===t)return i(e);window.scrollTo(t,a(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(g(e)){if(void 0===t)return a(e);window.scrollTo(i(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},h)},24:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},240:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));t.a=c},241:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(8),l=n(37),s=n(242),u=n(243),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,r=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||r?setTimeout((function(){return e.textarea&&s(e.textarea)})):this.textarea&&s(this.textarea),this.textarea&&this.textarea.addEventListener("autosize:resized",this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener("autosize:resized",this.onResize),s.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),r=(t.onChange,t.style),o=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),s=this.state.lineHeight,u=n&&s?s*n:null;return a.createElement("textarea",c({},l,{onChange:this.onChange,style:u?c({},r,{maxHeight:u}):r,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&s.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(d,c({},e,{innerRef:t}))}))},242:function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),c=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){c=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){var t=o.get(e);t&&t.destroy()}function a(e){var t=o.get(e);t&&t.update()}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,i=null,a=function(){e.clientWidth!==r&&d()},l=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:l,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function s(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){u();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(s("scroll"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(s("hidden"),u(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==r){i=r;var o=c("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=l,e.exports=t.default})?r.apply(t,[e,t]):r)||(e.exports=o)},243:function(e,t,n){var r=n(244);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var c=e.nodeName,i=document.createElement(c);i.innerHTML="&nbsp;","TEXTAREA"===c.toUpperCase()&&i.setAttribute("rows","1");var a=r(e,"font-size");i.style.fontSize=a,i.style.padding="0px",i.style.border="0px";var l=document.body;l.appendChild(i),n=i.offsetHeight,l.removeChild(i)}return n}},244:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},245:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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=c},246:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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=c},25:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},26:function(e,t){e.exports=window.wp.richText},262:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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=c},28:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},281:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));t.a=c},282:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"}));t.a=c},283:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.a=c},284:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"}));t.a=c},285:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));t.a=c},286:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.a=c},287:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.a=c},29:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},3:function(e,t){e.exports=window.wp.components},30:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},31:function(e,t){e.exports=window.wp.url},32:function(e,t){e.exports=window.wp.hooks},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(58);function o(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&&Object(r.a)(e,t)}},34:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(62),o=n.n(r),c=n(21);function i(e,t){return!t||"object"!==o()(t)&&"function"!=typeof t?Object(c.a)(e):t}},35:function(e,t){e.exports=window.wp.dom},356:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.diffChars=function(e,t,n){return o.diff(e,t,n)},t.characterDiff=void 0;var o=new(((r=n(408))&&r.__esModule?r:{default:r}).default);t.characterDiff=o},357:function(e,t,n){"use strict";t.match=function(e,t){return l(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var o=e.expressions.every((function(e){var n=e.feature,r=e.modifier,o=e.value,c=t[n];if(!c)return!1;switch(n){case"orientation":case"scan":return c.toLowerCase()===o.toLowerCase();case"width":case"height":case"device-width":case"device-height":o=d(o),c=d(c);break;case"resolution":o=u(o),c=u(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":o=s(o),c=s(c);break;case"grid":case"color":case"color-index":case"monochrome":o=parseInt(o,10)||1,c=parseInt(c,10)||0}switch(r){case"min":return c>=o;case"max":return c<=o;default:return c===o}}));return o&&!n||!o&&n}))},t.parse=l;var r=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,c=/^(?:(min|max)-)?(.+)/,i=/(em|rem|px|cm|mm|in|pt|pc)?$/,a=/(dpi|dpcm|dppx)?$/;function l(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(r),n=t[1],i=t[2],a=t[3]||"",l={};return l.inverse=!!n&&"not"===n.toLowerCase(),l.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(o),n=t[1].toLowerCase().match(c);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function s(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function u(e){var t=parseFloat(e);switch(String(e).match(a)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function d(e){var t=parseFloat(e);switch(String(e).match(i)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},358:function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],a=!0;return function e(d){var b=n?c(d):d,f={},p=!0,m={node:b,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){m.isRoot||(m.parent.node[m.key]=e),m.node=e,t&&(p=!1)},delete:function(e){delete m.parent.node[m.key],e&&(p=!1)},remove:function(e){l(m.parent.node)?m.parent.node.splice(m.key,1):delete m.parent.node[m.key],e&&(p=!1)},keys:null,before:function(e){f.before=e},after:function(e){f.after=e},pre:function(e){f.pre=e},post:function(e){f.post=e},stop:function(){a=!1},block:function(){p=!1}};if(!a)return m;function v(){if("object"==typeof m.node&&null!==m.node){m.keys&&m.node_===m.node||(m.keys=i(m.node)),m.isLeaf=0==m.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===d){m.circular=o[e];break}}else m.isLeaf=!0,m.keys=null;m.notLeaf=!m.isLeaf,m.notRoot=!m.isRoot}v();var O=t.call(m,m.node);return void 0!==O&&m.update&&m.update(O),f.before&&f.before.call(m,m.node),p?("object"!=typeof m.node||null===m.node||m.circular||(o.push(m),v(),s(m.keys,(function(t,o){r.push(t),f.pre&&f.pre.call(m,m.node[t],t);var c=e(m.node[t]);n&&u.call(m.node,t)&&(m.node[t]=c.node),c.isLast=o==m.keys.length-1,c.isFirst=0==o,f.post&&f.post.call(m,c),r.pop()})),o.pop()),f.after&&f.after.call(m,m.node),m):m}(e).node}function c(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if("[object Date]"===a(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===a(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===a(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===a(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===a(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===a(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return s(i(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var a=c(r);return e.push(r),t.push(a),s(i(r),(function(e){a[e]=n(r[e])})),e.pop(),t.pop(),a}return r}(this.value)};var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function a(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};s(i(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},37:function(e,t,n){e.exports=n(178)()},39:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},4:function(e,t){e.exports=window.wp.data},40:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},403:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"}));t.a=c},404:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"}));t.a=c},405:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"}));t.a=c},406:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"}));t.a=c},407:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}));t.a=c},408:function(e,t,n){"use strict";function r(){}function o(e,t,n,r,o){for(var c=0,i=t.length,a=0,l=0;c<i;c++){var s=t[c];if(s.removed){if(s.value=e.join(r.slice(l,l+s.count)),l+=s.count,c&&t[c-1].added){var u=t[c-1];t[c-1]=t[c],t[c]=u}}else{if(!s.added&&o){var d=n.slice(a,a+s.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),s.value=e.join(d)}else s.value=e.join(n.slice(a,a+s.count));a+=s.count,s.added||(l+=s.count)}}var b=t[i-1];return i>1&&"string"==typeof b.value&&(b.added||b.removed)&&e.equals("",b.value)&&(t[i-2].value+=b.value,t.pop()),t}function c(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,u=1,d=l+s,b=[{newPos:-1,components:[]}],f=this.extractCommon(b[0],t,e,0);if(b[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(t),count:t.length}]);function p(){for(var n=-1*u;n<=u;n+=2){var r=void 0,d=b[n-1],f=b[n+1],p=(f?f.newPos:0)-n;d&&(b[n-1]=void 0);var m=d&&d.newPos+1<l,v=f&&0<=p&&p<s;if(m||v){if(!m||v&&d.newPos<f.newPos?(r=c(f),i.pushComponent(r.components,void 0,!0)):((r=d).newPos++,i.pushComponent(r.components,!0,void 0)),p=i.extractCommon(r,t,e,n),r.newPos+1>=l&&p+1>=s)return a(o(i,r.components,t,e,i.useLongestToken));b[n]=r}else b[n]=void 0}u++}if(r)!function e(){setTimeout((function(){if(u>d)return r();p()||e()}),0)}();else for(;u<=d;){var m=p();if(m)return m}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,c=n.length,i=e.newPos,a=i-r,l=0;i+1<o&&a+1<c&&this.equals(t[i+1],n[a+1]);)i++,a++,l++;return l&&e.components.push({count:l}),e.newPos=i,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},409:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"}));t.a=c},41:function(e,t){e.exports=window.wp.deprecated},410:function(e,t,n){"use strict";var r=n(0),o=n(7),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M9.737 18.011L3.98 12.255l5.734-6.28 1.107 1.012-4.103 4.494h13.3v1.5H6.828l3.97 3.97-1.06 1.06z"}));t.a=c},44:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},45:function(e,t){e.exports=window.wp.notices},46:function(e,t,n){"use strict";function r(e,t,n,r,o,c,i){try{var a=e[c](i),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,c){var i=e.apply(t,n);function a(e){r(i,o,c,a,l,"next",e)}function l(e){r(i,o,c,a,l,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},47:function(e,t){e.exports=window.wp.keyboardShortcuts},49:function(e,t,n){"use strict";var r,o;function c(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function s(){n=o?new WeakMap:i()}function u(){var n,r,o,c,i,s=arguments.length;for(c=new Array(s),o=0;o<s;o++)c[o]=arguments[o];for(i=t.apply(null,c),(n=l(i)).isUniqueByDependants||(n.lastDependants&&!a(i,n.lastDependants,0)&&n.clear(),n.lastDependants=i),r=n.head;r;){if(a(r.args,c,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,c)},c[0]=null,r.args=c,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=c),l=o?function(e){var t,o,c,a,l,s=n,u=!0;for(t=0;t<e.length;t++){if(!(l=o=e[t])||"object"!=typeof l){u=!1;break}s.has(o)?s=s.get(o):(c=new WeakMap,s.set(o,c),s=c)}return s.has(r)||((a=i()).isUniqueByDependants=u,s.set(r,a)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},5: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}))},50:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},53:function(e,t){e.exports=window.wp.blob},542:function(e,t,n){"use strict";n.r(t),n.d(t,"__experimentalGetColorClassesAndStyles",(function(){return ba})),n.d(t,"__experimentalUseColorProps",(function(){return fa})),n.d(t,"getColorClassName",(function(){return Po})),n.d(t,"getColorObjectByAttributeValues",(function(){return Io})),n.d(t,"getColorObjectByColorValue",(function(){return xo})),n.d(t,"createCustomColorsHOC",(function(){return Ca})),n.d(t,"withColors",(function(){return Sa})),n.d(t,"__experimentalUseColors",(function(){return Ga})),n.d(t,"__experimentalGetGradientClass",(function(){return No})),n.d(t,"getGradientValueBySlug",(function(){return Do})),n.d(t,"__experimentalGetGradientObjectByGradientValue",(function(){return Ao})),n.d(t,"getGradientSlugByValue",(function(){return Lo})),n.d(t,"__experimentalUseGradient",(function(){return Ro})),n.d(t,"getFontSize",(function(){return xi})),n.d(t,"getFontSizeClass",(function(){return Ti})),n.d(t,"getFontSizeObjectByValue",(function(){return Pi})),n.d(t,"FontSizePicker",(function(){return Ni})),n.d(t,"withFontSizes",(function(){return $a})),n.d(t,"AlignmentControl",(function(){return rl})),n.d(t,"AlignmentToolbar",(function(){return ol})),n.d(t,"Autocomplete",(function(){return kl})),n.d(t,"BlockAlignmentControl",(function(){return Yr})),n.d(t,"BlockAlignmentToolbar",(function(){return Xr})),n.d(t,"__experimentalBlockFullHeightAligmentControl",(function(){return El})),n.d(t,"__experimentalBlockAlignmentMatrixControl",(function(){return wl})),n.d(t,"BlockBreadcrumb",(function(){return Bl})),n.d(t,"BlockContextProvider",(function(){return Tl})),n.d(t,"BlockControls",(function(){return Br})),n.d(t,"BlockFormatControls",(function(){return Sr})),n.d(t,"BlockColorsStyleSelector",(function(){return Ll})),n.d(t,"BlockEdit",(function(){return Fl})),n.d(t,"useBlockEditContext",(function(){return h})),n.d(t,"BlockIcon",(function(){return hl})),n.d(t,"BlockNavigationDropdown",(function(){return sf})),n.d(t,"__experimentalBlockNavigationBlockFill",(function(){return $b})),n.d(t,"__experimentalBlockNavigationEditor",(function(){return wf})),n.d(t,"__experimentalBlockNavigationTree",(function(){return cf})),n.d(t,"__experimentalBlockVariationPicker",(function(){return Sf})),n.d(t,"__experimentalBlockVariationTransforms",(function(){return xf})),n.d(t,"BlockVerticalAlignmentToolbar",(function(){return Vf})),n.d(t,"BlockVerticalAlignmentControl",(function(){return Ff})),n.d(t,"__experimentalBorderStyleControl",(function(){return cc})),n.d(t,"ButtonBlockerAppender",(function(){return qu})),n.d(t,"ColorPalette",(function(){return Uf})),n.d(t,"ColorPaletteControl",(function(){return Wf})),n.d(t,"ContrastChecker",(function(){return Cc})),n.d(t,"__experimentalGradientPicker",(function(){return $f})),n.d(t,"__experimentalGradientPickerControl",(function(){return Yf})),n.d(t,"__experimentalGradientPickerPanel",(function(){return Xf})),n.d(t,"__experimentalFontAppearanceControl",(function(){return vi})),n.d(t,"__experimentalFontFamilyControl",(function(){return _i})),n.d(t,"__experimentalColorGradientControl",(function(){return Ko})),n.d(t,"__experimentalPanelColorGradientSettings",(function(){return Ec})),n.d(t,"__experimentalImageSizeControl",(function(){return Zf})),n.d(t,"InnerBlocks",(function(){return dp})),n.d(t,"__experimentalUseInnerBlocksProps",(function(){return up})),n.d(t,"InspectorAdvancedControls",(function(){return lo})),n.d(t,"InspectorControls",(function(){return po})),n.d(t,"JustifyToolbar",(function(){return hp})),n.d(t,"JustifyContentControl",(function(){return gp})),n.d(t,"__experimentalLinkControl",(function(){return $p})),n.d(t,"__experimentalLinkControlSearchInput",(function(){return Hp})),n.d(t,"__experimentalLinkControlSearchResults",(function(){return xp})),n.d(t,"__experimentalLinkControlSearchItem",(function(){return Ip})),n.d(t,"LineHeightControl",(function(){return si})),n.d(t,"MediaReplaceFlow",(function(){return Jp})),n.d(t,"MediaPlaceholder",(function(){return cm})),n.d(t,"MediaUpload",(function(){return Qp})),n.d(t,"MediaUploadCheck",(function(){return Zp})),n.d(t,"PanelColorSettings",(function(){return Ta})),n.d(t,"PlainText",(function(){return lm})),n.d(t,"__experimentalResponsiveBlockControl",(function(){return um})),n.d(t,"RichText",(function(){return Ef})),n.d(t,"RichTextShortcut",(function(){return dm})),n.d(t,"RichTextToolbarButton",(function(){return bm})),n.d(t,"__unstableRichTextInputEvent",(function(){return fm})),n.d(t,"ToolSelector",(function(){return mm})),n.d(t,"__experimentalUnitControl",(function(){return Gi})),n.d(t,"URLInput",(function(){return Cp})),n.d(t,"URLInputButton",(function(){return gm})),n.d(t,"URLPopover",(function(){return rm})),n.d(t,"__experimentalImageURLInputUI",(function(){return km})),n.d(t,"withColorContext",(function(){return Gf})),n.d(t,"__experimentalBlockSettingsMenuFirstItem",(function(){return Zd})),n.d(t,"__experimentalInserterMenuExtension",(function(){return Du})),n.d(t,"__experimentalPreviewOptions",(function(){return Em})),n.d(t,"__experimentalUseResizeCanvas",(function(){return Pm})),n.d(t,"BlockInspector",(function(){return Mm})),n.d(t,"BlockList",(function(){return yb})),n.d(t,"useBlockProps",(function(){return Tb})),n.d(t,"__experimentalBlock",(function(){return zm})),n.d(t,"__experimentalLayoutStyle",(function(){return Vr})),n.d(t,"BlockMover",(function(){return ad})),n.d(t,"BlockPreview",(function(){return Js})),n.d(t,"BlockSelectionClearer",(function(){return Um})),n.d(t,"__unstableUseBlockSelectionClearer",(function(){return Gm})),n.d(t,"BlockSettingsMenu",(function(){return ub})),n.d(t,"BlockSettingsMenuControls",(function(){return ib})),n.d(t,"BlockTitle",(function(){return Sl})),n.d(t,"BlockToolbar",(function(){return db})),n.d(t,"CopyHandler",(function(){return Wd})),n.d(t,"__unstableUseClipboardHandler",(function(){return Ud})),n.d(t,"DefaultBlockAppender",(function(){return Ku})),n.d(t,"__unstableEditorStyles",(function(){return mv})),n.d(t,"Inserter",(function(){return Wu})),n.d(t,"__experimentalLibrary",(function(){return vv})),n.d(t,"__experimentalSearchForm",(function(){return Ws})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return gv})),n.d(t,"MultiSelectScrollIntoView",(function(){return hv})),n.d(t,"NavigableToolbar",(function(){return id})),n.d(t,"ObserveTyping",(function(){return _v})),n.d(t,"__unstableUseTypingObserver",(function(){return kv})),n.d(t,"__unstableUseMouseMoveTypingReset",(function(){return yv})),n.d(t,"PreserveScrollInReorder",(function(){return Ev})),n.d(t,"SkipToSelectedBlock",(function(){return Tm})),n.d(t,"Typewriter",(function(){return Bv})),n.d(t,"__unstableUseTypewriter",(function(){return Sv})),n.d(t,"Warning",(function(){return ss})),n.d(t,"WritingFlow",(function(){return Ls})),n.d(t,"__unstableUseCanvasClickRedirect",(function(){return xv})),n.d(t,"useBlockDisplayInformation",(function(){return Cl})),n.d(t,"__unstableIframe",(function(){return Nv})),n.d(t,"__experimentalUseNoRecursiveRenders",(function(){return Rv})),n.d(t,"BlockEditorProvider",(function(){return Ys})),n.d(t,"__experimentalUseSimulatedMediaQuery",(function(){return xm})),n.d(t,"__experimentalUseEditorFeature",(function(){return wo})),n.d(t,"transformStyles",(function(){return fv})),n.d(t,"validateThemeColors",(function(){return Mv})),n.d(t,"validateThemeGradients",(function(){return Fv})),n.d(t,"__experimentalGetMatchingVariation",(function(){return Bf})),n.d(t,"storeConfig",(function(){return jr})),n.d(t,"store",(function(){return yr})),n.d(t,"SETTINGS_DEFAULTS",(function(){return E}));var r={};n.r(r),n.d(r,"getBlockName",(function(){return Y})),n.d(r,"isBlockValid",(function(){return X})),n.d(r,"getBlockAttributes",(function(){return Q})),n.d(r,"getBlock",(function(){return Z})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return J})),n.d(r,"getBlocks",(function(){return ee})),n.d(r,"__unstableGetBlockWithBlockTree",(function(){return te})),n.d(r,"__unstableGetBlockTree",(function(){return ne})),n.d(r,"__unstableGetClientIdWithClientIdsTree",(function(){return re})),n.d(r,"__unstableGetClientIdsTree",(function(){return oe})),n.d(r,"getClientIdsOfDescendants",(function(){return ce})),n.d(r,"getClientIdsWithDescendants",(function(){return ie})),n.d(r,"getGlobalBlockCount",(function(){return ae})),n.d(r,"getBlocksByClientId",(function(){return le})),n.d(r,"getBlockCount",(function(){return se})),n.d(r,"getSelectionStart",(function(){return ue})),n.d(r,"getSelectionEnd",(function(){return de})),n.d(r,"getBlockSelectionStart",(function(){return be})),n.d(r,"getBlockSelectionEnd",(function(){return fe})),n.d(r,"getSelectedBlockCount",(function(){return pe})),n.d(r,"hasSelectedBlock",(function(){return me})),n.d(r,"getSelectedBlockClientId",(function(){return ve})),n.d(r,"getSelectedBlock",(function(){return Oe})),n.d(r,"getBlockRootClientId",(function(){return ge})),n.d(r,"getBlockParents",(function(){return he})),n.d(r,"getBlockParentsByBlockName",(function(){return je})),n.d(r,"getBlockHierarchyRootClientId",(function(){return ye})),n.d(r,"getLowestCommonAncestorWithSelectedBlock",(function(){return ke})),n.d(r,"getAdjacentBlockClientId",(function(){return _e})),n.d(r,"getPreviousBlockClientId",(function(){return Ee})),n.d(r,"getNextBlockClientId",(function(){return we})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return Ce})),n.d(r,"getSelectedBlockClientIds",(function(){return Se})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return Be})),n.d(r,"getMultiSelectedBlocks",(function(){return Ie})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return xe})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return Pe})),n.d(r,"isFirstMultiSelectedBlock",(function(){return Te})),n.d(r,"isBlockMultiSelected",(function(){return Ne})),n.d(r,"isAncestorMultiSelected",(function(){return De})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return Ae})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return Le})),n.d(r,"getBlockOrder",(function(){return Re})),n.d(r,"getBlockIndex",(function(){return Me})),n.d(r,"isBlockSelected",(function(){return Fe})),n.d(r,"hasSelectedInnerBlock",(function(){return Ve})),n.d(r,"isBlockWithinSelection",(function(){return He})),n.d(r,"hasMultiSelection",(function(){return ze})),n.d(r,"isMultiSelecting",(function(){return Ge})),n.d(r,"isSelectionEnabled",(function(){return Ue})),n.d(r,"getBlockMode",(function(){return We})),n.d(r,"isTyping",(function(){return Ke})),n.d(r,"isDraggingBlocks",(function(){return qe})),n.d(r,"getDraggedBlockClientIds",(function(){return $e})),n.d(r,"isBlockBeingDragged",(function(){return Ye})),n.d(r,"isAncestorBeingDragged",(function(){return Xe})),n.d(r,"isCaretWithinFormattedText",(function(){return Qe})),n.d(r,"getBlockInsertionPoint",(function(){return Ze})),n.d(r,"isBlockInsertionPointVisible",(function(){return Je})),n.d(r,"isValidTemplate",(function(){return et})),n.d(r,"getTemplate",(function(){return tt})),n.d(r,"getTemplateLock",(function(){return nt})),n.d(r,"canInsertBlockType",(function(){return ot})),n.d(r,"canInsertBlocks",(function(){return ct})),n.d(r,"getInserterItems",(function(){return dt})),n.d(r,"getBlockTransformItems",(function(){return bt})),n.d(r,"hasInserterItems",(function(){return ft})),n.d(r,"__experimentalGetAllowedBlocks",(function(){return pt})),n.d(r,"__experimentalGetParsedPattern",(function(){return mt})),n.d(r,"__experimentalGetAllowedPatterns",(function(){return vt})),n.d(r,"__experimentalGetPatternsByBlockTypes",(function(){return Ot})),n.d(r,"__experimentalGetPatternTransformItems",(function(){return gt})),n.d(r,"getBlockListSettings",(function(){return ht})),n.d(r,"getSettings",(function(){return jt})),n.d(r,"isLastBlockChangePersistent",(function(){return yt})),n.d(r,"__experimentalGetBlockListSettingsForBlocks",(function(){return kt})),n.d(r,"__experimentalGetParsedReusableBlock",(function(){return _t})),n.d(r,"__experimentalGetReusableBlockTitle",(function(){return Et})),n.d(r,"__unstableIsLastBlockChangeIgnored",(function(){return wt})),n.d(r,"__experimentalGetLastBlockAttributeChanges",(function(){return Ct})),n.d(r,"isNavigationMode",(function(){return Bt})),n.d(r,"hasBlockMovingClientId",(function(){return It})),n.d(r,"didAutomaticChange",(function(){return xt})),n.d(r,"isBlockHighlighted",(function(){return Pt})),n.d(r,"areInnerBlocksControlled",(function(){return Tt})),n.d(r,"__experimentalGetActiveBlockIdByBlockNames",(function(){return Nt})),n.d(r,"wasBlockJustInserted",(function(){return Dt}));var o={};n.r(o),n.d(o,"resetBlocks",(function(){return pn})),n.d(o,"validateBlocksToTemplate",(function(){return mn})),n.d(o,"resetSelection",(function(){return vn})),n.d(o,"receiveBlocks",(function(){return On})),n.d(o,"updateBlockAttributes",(function(){return gn})),n.d(o,"updateBlock",(function(){return hn})),n.d(o,"selectBlock",(function(){return jn})),n.d(o,"selectPreviousBlock",(function(){return yn})),n.d(o,"selectNextBlock",(function(){return kn})),n.d(o,"startMultiSelect",(function(){return En})),n.d(o,"stopMultiSelect",(function(){return wn})),n.d(o,"multiSelect",(function(){return Cn})),n.d(o,"clearSelectedBlock",(function(){return Sn})),n.d(o,"toggleSelection",(function(){return Bn})),n.d(o,"replaceBlocks",(function(){return xn})),n.d(o,"replaceBlock",(function(){return Pn})),n.d(o,"moveBlocksDown",(function(){return Nn})),n.d(o,"moveBlocksUp",(function(){return Dn})),n.d(o,"moveBlocksToPosition",(function(){return An})),n.d(o,"moveBlockToPosition",(function(){return Ln})),n.d(o,"insertBlock",(function(){return Rn})),n.d(o,"insertBlocks",(function(){return Mn})),n.d(o,"__unstableSetInsertionPoint",(function(){return Fn})),n.d(o,"showInsertionPoint",(function(){return Vn})),n.d(o,"hideInsertionPoint",(function(){return Hn})),n.d(o,"setTemplateValidity",(function(){return zn})),n.d(o,"synchronizeTemplate",(function(){return Gn})),n.d(o,"mergeBlocks",(function(){return Un})),n.d(o,"removeBlocks",(function(){return Wn})),n.d(o,"removeBlock",(function(){return Kn})),n.d(o,"replaceInnerBlocks",(function(){return qn})),n.d(o,"toggleBlockMode",(function(){return $n})),n.d(o,"startTyping",(function(){return Yn})),n.d(o,"stopTyping",(function(){return Xn})),n.d(o,"startDraggingBlocks",(function(){return Qn})),n.d(o,"stopDraggingBlocks",(function(){return Zn})),n.d(o,"enterFormattedText",(function(){return Jn})),n.d(o,"exitFormattedText",(function(){return er})),n.d(o,"selectionChange",(function(){return tr})),n.d(o,"insertDefaultBlock",(function(){return nr})),n.d(o,"updateBlockListSettings",(function(){return rr})),n.d(o,"updateSettings",(function(){return or})),n.d(o,"__unstableSaveReusableBlock",(function(){return cr})),n.d(o,"__unstableMarkLastChangeAsPersistent",(function(){return ir})),n.d(o,"__unstableMarkNextChangeAsNotPersistent",(function(){return ar})),n.d(o,"__unstableMarkAutomaticChange",(function(){return lr})),n.d(o,"__unstableMarkAutomaticChangeFinal",(function(){return sr})),n.d(o,"setNavigationMode",(function(){return ur})),n.d(o,"setBlockMovingClientId",(function(){return dr})),n.d(o,"duplicateBlocks",(function(){return br})),n.d(o,"insertBeforeBlock",(function(){return fr})),n.d(o,"insertAfterBlock",(function(){return pr})),n.d(o,"toggleBlockHighlight",(function(){return mr})),n.d(o,"flashBlock",(function(){return vr})),n.d(o,"setHasControlledInnerBlocks",(function(){return Or}));var c=n(26),i=n(10),a=n(5),l=n(0),s=n(12),u=n.n(s),d=n(2),b=n(14),f=n(32),p=n(11),m=n(3),v=n(4),O=Object(l.createContext)({name:"",isSelected:!1,clientId:null}),g=O.Provider;function h(){return Object(l.useContext)(O)}var j=n(13),y=n(15),k=n(1),_={insertUsage:{}},E={alignWide:!1,supportsLayout:!0,colors:[{name:Object(k.__)("Black"),slug:"black",color:"#000000"},{name:Object(k.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(k.__)("White"),slug:"white",color:"#ffffff"},{name:Object(k.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(k.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(k.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(k.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(k.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(k.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(k.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(k.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(k.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(k._x)("Small","font size name"),size:13,slug:"small"},{name:Object(k._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(k._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(k._x)("Large","font size name"),size:36,slug:"large"},{name:Object(k._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:Object(k.__)("Thumbnail")},{slug:"medium",name:Object(k.__)("Medium")},{slug:"large",name:Object(k.__)("Large")},{slug:"full",name:Object(k.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],__experimentalSpotlightEntityBlocks:[],gradients:[{name:Object(k.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:Object(k.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:Object(k.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:Object(k.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:Object(k.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:Object(k.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:Object(k.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(k.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:Object(k.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:Object(k.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:Object(k.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(k.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function w(e,t,n){return[].concat(Object(y.a)(e.slice(0,n)),Object(y.a)(Object(d.castArray)(t)),Object(y.a)(e.slice(n)))}function C(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(y.a)(e);return o.splice(t,r),w(o,e.slice(t,t+r),n)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(a.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,I(o,r))})),n}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(a.a)({},n.clientId,t),x(n.innerBlocks,n.clientId))}),{})}function P(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.identity,n={},r=Object(y.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(j.a)(o,["innerBlocks"]);r.push.apply(r,Object(y.a)(c)),n[i.clientId]=t(i)}return n}function T(e){return P(e,(function(e){return Object(d.omit)(e,"attributes")}))}function N(e){return P(e,(function(e){return e.attributes}))}function D(e,t){return e===t?B({},e):t}function A(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(d.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(d.isEqual)(Object(d.keys)(n),Object(d.keys)(r)));var n,r}var L=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})},R=Object(d.flow)(v.combineReducers,(function(e){return function(t,n){if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){var r=n.id,o=n.updatedId;if(r===o)return t;(t=B({},t)).attributes=Object(d.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?B(B({},e),{},{ref:o}):e}))}return e(t,n)}}),(function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=e(t,n);if(r===t)return t;r.cache=t.cache?t.cache:{};var o=function(e){return e.reduce((function(e,n){var r=n;do{e.push(r),r=t.parents[r]}while(r&&!t.controlledInnerBlocks[r]);return e}),[])};switch(n.type){case"RESET_BLOCKS":r.cache=Object(d.mapValues)(P(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(d.keys)(P(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=B(B({},r.cache),L(o(c)));break;case"UPDATE_BLOCK":r.cache=B(B({},r.cache),L(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=B(B({},r.cache),L(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=L(o(n.replacedClientIds));r.cache=B(B(B({},Object(d.omit)(r.cache,n.replacedClientIds)),Object(d.omit)(i,n.replacedClientIds)),L(Object(d.keys)(P(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=B(B({},Object(d.omit)(r.cache,n.removedClientIds)),L(Object(d.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(y.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=B(B({},r.cache),L(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=B(B({},r.cache),L(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(d.keys)(Object(d.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=B(B({},r.cache),L(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o<r.length;o++){var c;!t.order[r[o]]||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[r[o]]||(r===e&&(r=Object(y.a)(r)),(c=r).push.apply(c,Object(y.a)(t.order[r[o]])))}return r};if(t)switch(n.type){case"REMOVE_BLOCKS":n=B(B({},n),{},{type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:r(n.clientIds)});break;case"REPLACE_BLOCKS":n=B(B({},n),{},{type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:r(n.clientIds)})}return e(t,n)}}),(function(e){return function(t,n){if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);var r={};if(Object.keys(t.controlledInnerBlocks).length)for(var o=Object(y.a)(n.blocks);o.length;){var c=o.shift(),i=c.innerBlocks,a=Object(j.a)(c,["innerBlocks"]);o.push.apply(o,Object(y.a)(i)),t.controlledInnerBlocks[a.clientId]&&(r[a.clientId]=!0)}var l=t;t.order[n.rootClientId]&&(l=e(l,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:r,clientIds:t.order[n.rootClientId]}));var s=l;return n.blocks.length&&((s=e(s,B(B({},n),{},{type:"INSERT_BLOCKS",index:0}))).order=B(B({},s.order),Object(d.reduce)(r,(function(e,n,r){return t.order[r]&&(e[r]=t.order[r]),e}),{}))),s}}),(function(e){return function(t,n){if(t&&"RESET_BLOCKS"===n.type){var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(d.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(y.a)(n),[o],Object(y.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(d.pickBy)(t.controlledInnerBlocks));return B(B({},t),{},{byClientId:B(B({},Object(d.omit)(t.byClientId,r)),T(n.blocks)),attributes:B(B({},Object(d.omit)(t.attributes,r)),N(n.blocks)),order:B(B({},Object(d.omit)(t.order,r)),Object(d.omit)(I(n.blocks),o)),parents:B(B({},Object(d.omit)(t.parents,r)),x(n.blocks)),cache:B(B({},Object(d.omit)(t.cache,r)),Object(d.omit)(Object(d.mapValues)(P(n.blocks),(function(){return{}})),o))})}return e(t,n)}}),(function(e){var t,n=!1;return function(r,o){var c=e(r,o),i="MARK_LAST_CHANGE_AS_PERSISTENT"===o.type||n;if(r===c&&!i){var a;n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var l=null===(a=null==r?void 0:r.isPersistentChange)||void 0===a||a;return r.isPersistentChange===l?r:B(B({},c),{},{isPersistentChange:l})}return c=B(B({},c),{},{isPersistentChange:i?!n:!A(o,t)}),t=o,n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type,c}}),(function(e){var t=new Set(["RECEIVE_BLOCKS"]);return function(n,r){var o=e(n,r);return o!==n&&(o.isIgnoredChange=t.has(r.type)),o}}))({byClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return T(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return B(B({},e),T(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(d.omit)(t.updates,"attributes");return Object(d.isEmpty)(n)?e:B(B({},e),{},Object(a.a)({},t.clientId,B(B({},e[t.clientId]),n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?B(B({},Object(d.omit)(e,t.replacedClientIds)),T(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},attributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return N(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return B(B({},e),N(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?B(B({},e),{},Object(a.a)({},t.clientId,B(B({},e[t.clientId]),t.updates.attributes))):e;case"UPDATE_BLOCK_ATTRIBUTES":if(t.clientIds.every((function(t){return!e[t]})))return e;var n=t.clientIds.reduce((function(n,r){return B(B({},n),{},Object(a.a)({},r,Object(d.reduce)(t.uniqueByBlock?t.attributes[r]:t.attributes,(function(t,n,o){return n!==t[o]&&((t=D(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:B(B({},e),n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?B(B({},Object(d.omit)(e,t.replacedClientIds)),N(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},order:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return I(t.blocks);case"RECEIVE_BLOCKS":return B(B({},e),Object(d.omit)(I(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=I(t.blocks,r),i=t.index,l=void 0===i?o.length:i;return B(B(B({},e),c),{},Object(a.a)({},r,w(o,c[r],l)));case"MOVE_BLOCKS_TO_POSITION":var s,u=t.fromRootClientId,b=void 0===u?"":u,f=t.toRootClientId,p=void 0===f?"":f,m=t.clientIds,v=t.index,O=void 0===v?e[p].length:v;if(b===p){var g=e[p],h=g.indexOf(m[0]);return B(B({},e),{},Object(a.a)({},p,C(e[p],h,O,m.length)))}return B(B({},e),{},(s={},Object(a.a)(s,b,d.without.apply(void 0,[e[b]].concat(Object(y.a)(m)))),Object(a.a)(s,p,w(e[p],m,O)),s));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,_=void 0===k?"":k,E=Object(d.first)(j),S=e[_];if(!S.length||E===Object(d.first)(S))return e;var x=S.indexOf(E);return B(B({},e),{},Object(a.a)({},_,C(S,x,x-1,j.length)));case"MOVE_BLOCKS_DOWN":var P=t.clientIds,T=t.rootClientId,N=void 0===T?"":T,D=Object(d.first)(P),A=Object(d.last)(P),L=e[N];if(!L.length||A===Object(d.last)(L))return e;var R=L.indexOf(D);return B(B({},e),{},Object(a.a)({},N,C(L,R,R+1,P.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var M=t.clientIds;if(!t.blocks)return e;var F=I(t.blocks);return Object(d.flow)([function(e){return Object(d.omit)(e,t.replacedClientIds)},function(e){return B(B({},e),Object(d.omit)(F,""))},function(e){return Object(d.mapValues)(e,(function(e){return Object(d.reduce)(e,(function(e,t){return t===M[0]?[].concat(Object(y.a)(e),Object(y.a)(F[""])):(-1===M.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.flow)([function(e){return Object(d.omit)(e,t.removedClientIds)},function(e){return Object(d.mapValues)(e,(function(e){return d.without.apply(void 0,[e].concat(Object(y.a)(t.removedClientIds)))}))}])(e)}return e},parents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_BLOCKS":return x(t.blocks);case"RECEIVE_BLOCKS":return B(B({},e),x(t.blocks));case"INSERT_BLOCKS":return B(B({},e),x(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return B(B({},e),t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return B(B({},Object(d.omit)(e,t.replacedClientIds)),x(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(d.omit)(e,t.removedClientIds)}return e},controlledInnerBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.clientId,o=t.hasControlledInnerBlocks;return"SET_HAS_CONTROLLED_INNER_BLOCKS"===n?B(B({},e),{},Object(a.a)({},r,o)):e}});function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":if(-1===t.clientIds.indexOf(e.clientId))return e;var n=t.indexToSelect||t.blocks.length-1,r=t.blocks[n];return r?r.clientId===e.clientId?e:{clientId:r.clientId}:{}}return e}function F(e,t,n){switch(t.type){case"CLEAR_SELECTED_BLOCK":case"SELECT_BLOCK":case"SELECTION_CHANGE":case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":case"REMOVE_BLOCKS":case"REPLACE_BLOCKS":return n}return e}var V=Object(v.combineReducers)({blocks:R,isTyping:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},draggedBlocks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},isCaretWithinFormattedText:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENTER_FORMATTED_TEXT":return!0;case"EXIT_FORMATTED_TEXT":return!1}return e},selection:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"SELECTION_CHANGE":return{selectionStart:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.startOffset},selectionEnd:{clientId:r.clientId,attributeKey:r.attributeKey,offset:r.endOffset}};case"RESET_SELECTION":var o=r.selectionStart,c=r.selectionEnd;return{selectionStart:o,selectionEnd:c};case"MULTI_SELECT":var i=r.start,a=r.end;return{selectionStart:{clientId:i},selectionEnd:{clientId:a}};case"RESET_BLOCKS":var l=null==n||null===(e=n.selectionStart)||void 0===e?void 0:e.clientId,s=null==n||null===(t=n.selectionEnd)||void 0===t?void 0:t.clientId;if(!l&&!s)return n;if(!r.blocks.some((function(e){return e.clientId===l})))return{selectionStart:{},selectionEnd:{}};if(!r.blocks.some((function(e){return e.clientId===s})))return B(B({},n),{},{selectionEnd:n.selectionStart})}return{selectionStart:M(n.selectionStart,r),selectionEnd:M(n.selectionEnd,r)}},isMultiSelecting:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_SELECTION":return t.isSelectionEnabled}return e},initialPosition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("TOGGLE_BLOCK_MODE"===t.type){var n=t.clientId;return B(B({},e),{},Object(a.a)({},n,e[n]&&"html"===e[n]?"visual":"html"))}return e},blockListSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object(d.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(d.isEqual)(e[n],t.settings)?e:B(B({},e),{},Object(a.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(d.omit)(e,n):e}return e},insertionPoint:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_INSERTION_POINT":case"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r}}return F(e,t,null)},insertionPointVisibility:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_INSERTION_POINT":return!0;case"HIDE_INSERTION_POINT":return!1}return F(e,t,!1)},template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return B(B({},e),{},{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return B(B({},e),t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":return t.blocks.reduce((function(e,n){var r=n.attributes,o=n.name,c=Object(p.getBlockVariations)(o),i=null==c?void 0:c.find((function(e){var t;return null===(t=e.isActive)||void 0===t?void 0:t.call(e,r,e.attributes)})),l=null!=i&&i.name?"".concat(o,"/").concat(i.name):o,s={name:l};return"core/block"===o&&(s.ref=r.ref,l+="/"+r.ref),B(B({},e),{},{insertUsage:B(B({},e.insertUsage),{},Object(a.a)({},l,{time:t.time,count:e.insertUsage[l]?e.insertUsage[l].count+1:1,insert:s}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(a.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return B(B({},e),{},Object(a.a)({},n,t.uniqueByBlock?t.attributes[n]:t.attributes))}),{})}return null},isNavigationMode:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"INSERT_BLOCKS"!==t.type&&("SET_NAVIGATION_MODE"===t.type?t.isNavigationMode:e)},hasBlockMovingClientId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return"SET_BLOCK_MOVING_MODE"===t.type?t.hasBlockMovingClientId:"SET_NAVIGATION_MODE"===t.type?null:e},automaticChangeStatus:function(e,t){switch(t.type){case"MARK_AUTOMATIC_CHANGE":return"pending";case"MARK_AUTOMATIC_CHANGE_FINAL":return"pending"===e?"final":void 0;case"SELECTION_CHANGE":return"final"!==e?e:void 0;case"START_TYPING":case"STOP_TYPING":return e}},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":var n=t.clientId;return t.isHighlighted?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_BLOCKS":if(!n.blocks.length)return t;var r=n.blocks[0].clientId,o=null===(e=n.meta)||void 0===e?void 0:e.source;return{clientId:r,source:o};case"RESET_BLOCKS":return{}}return t}}),H=n(63),z=n(49);function G(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return U(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var q=Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(m.Rect,{x:"0",fill:"none",width:"24",height:"24"}),Object(l.createElement)(m.G,null,Object(l.createElement)(m.Path,{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"}))),$=[];function Y(e,t){var n=e.blocks.byClientId[t];if("web"!==l.Platform.OS&&"core/social-link"===(null==n?void 0:n.name)){var r=e.blocks.attributes[t].service;return r?"".concat("core/social-link","-").concat(r):"core/social-link"}return n?n.name:null}function X(e,t){var n=e.blocks.byClientId[t];return!!n&&n.isValid}function Q(e,t){return e.blocks.byClientId[t]?e.blocks.attributes[t]:null}var Z=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t),innerBlocks:Tt(e,t)?$:ee(e,t)}):null}),(function(e,t){return[e.blocks.cache[t]]})),J=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t)}):null}),(function(e,t){return[e.blocks.byClientId[t],e.blocks.attributes[t]]})),ee=Object(z.a)((function(e,t){return Object(d.map)(Re(e,t),(function(t){return Z(e,t)}))}),(function(e,t){return Object(d.map)(e.blocks.order[t||""],(function(t){return e.blocks.cache[t]}))})),te=Object(z.a)((function(e,t){var n=e.blocks.byClientId[t];return n?K(K({},n),{},{attributes:Q(e,t),innerBlocks:ne(e,t)}):null}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),ne=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(Re(e,t),(function(t){return te(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]})),re=Object(z.a)((function(e,t){return{clientId:t,innerBlocks:oe(e,t)}}),(function(e){return[e.blocks.order]})),oe=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(Re(e,t),(function(t){return re(e,t)}))}),(function(e){return[e.blocks.order]})),ce=function e(t,n){return Object(d.flatMap)(n,(function(n){var r=Re(t,n);return[].concat(Object(y.a)(r),Object(y.a)(e(t,r)))}))},ie=Object(z.a)((function(e){var t=Re(e);return[].concat(Object(y.a)(t),Object(y.a)(ce(e,t)))}),(function(e){return[e.blocks.order]})),ae=Object(z.a)((function(e,t){var n=ie(e);return t?Object(d.reduce)(n,(function(n,r){return e.blocks.byClientId[r].name===t?n+1:n}),0):n.length}),(function(e){return[e.blocks.order,e.blocks.byClientId]})),le=Object(z.a)((function(e,t){return Object(d.map)(Object(d.castArray)(t),(function(t){return Z(e,t)}))}),(function(e){return[e.blocks.byClientId,e.blocks.order,e.blocks.attributes]}));function se(e,t){return Re(e,t).length}function ue(e){return e.selection.selectionStart}function de(e){return e.selection.selectionEnd}function be(e){return e.selection.selectionStart.clientId}function fe(e){return e.selection.selectionEnd.clientId}function pe(e){return Be(e).length||(e.selection.selectionStart.clientId?1:0)}function me(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return!!n.clientId&&n.clientId===r.clientId}function ve(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd,o=n.clientId;return o&&o===r.clientId?o:null}function Oe(e){var t=ve(e);return t?Z(e,t):null}function ge(e,t){return void 0!==e.blocks.parents[t]?e.blocks.parents[t]:null}var he=Object(z.a)((function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t;e.blocks.parents[o];)o=e.blocks.parents[o],r.push(o);return n?r:r.reverse()}),(function(e){return[e.blocks.parents]})),je=Object(z.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=he(e,t,r);return Object(d.map)(Object(d.filter)(Object(d.map)(o,(function(t){return{id:t,name:Y(e,t)}})),(function(e){var t=e.name;return Array.isArray(n)?n.includes(t):t===n})),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function ye(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function ke(e,t){for(var n,r=ve(e),o=[].concat(Object(y.a)(he(e,t)),[t]),c=[].concat(Object(y.a)(he(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a<i&&o[a]===c[a];a++)n=o[a];return n}function _e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=ve(e)),void 0===t&&(t=n<0?xe(e):Pe(e)),!t)return null;var r=ge(e,t);if(null===r)return null;var o=e.blocks.order,c=o[r],i=c.indexOf(t),a=i+1*n;return a<0||a===c.length?null:c[a]}function Ee(e,t){return _e(e,t,-1)}function we(e,t){return _e(e,t,1)}function Ce(e){return e.initialPosition}var Se=Object(z.a)((function(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;if(void 0===n.clientId||void 0===r.clientId)return $;if(n.clientId===r.clientId)return[n.clientId];var o=ge(e,n.clientId);if(null===o)return $;var c=Re(e,o),i=c.indexOf(n.clientId),a=c.indexOf(r.clientId);return i>a?c.slice(a,i+1):c.slice(i,a+1)}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Be(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?$:Se(e)}var Ie=Object(z.a)((function(e){var t=Be(e);return t.length?t.map((function(t){return Z(e,t)})):$}),(function(e){return[].concat(Object(y.a)(Se.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function xe(e){return Object(d.first)(Be(e))||null}function Pe(e){return Object(d.last)(Be(e))||null}function Te(e,t){return xe(e)===t}function Ne(e,t){return-1!==Be(e).indexOf(t)}var De=Object(z.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Ne(e,n=ge(e,n));return r}),(function(e){return[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]}));function Ae(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:n.clientId||null}function Le(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId===r.clientId?null:r.clientId||null}function Re(e,t){return e.blocks.order[t||""]||$}function Me(e,t,n){return Re(e,n).indexOf(t)}function Fe(e,t){var n=e.selection,r=n.selectionStart,o=n.selectionEnd;return r.clientId===o.clientId&&r.clientId===t}function Ve(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(d.some)(Re(e,t),(function(t){return Fe(e,t)||Ne(e,t)||n&&Ve(e,t,n)}))}function He(e,t){if(!t)return!1;var n=Be(e),r=n.indexOf(t);return r>-1&&r<n.length-1}function ze(e){var t=e.selection,n=t.selectionStart,r=t.selectionEnd;return n.clientId!==r.clientId}function Ge(e){return e.isMultiSelecting}function Ue(e){return e.isSelectionEnabled}function We(e,t){return e.blocksMode[t]||"visual"}function Ke(e){return e.isTyping}function qe(e){return!!e.draggedBlocks.length}function $e(e){return e.draggedBlocks}function Ye(e,t){return e.draggedBlocks.includes(t)}function Xe(e,t){if(!qe(e))return!1;var n=he(e,t);return Object(d.some)(n,(function(t){return Ye(e,t)}))}function Qe(e){return e.isCaretWithinFormattedText}function Ze(e){var t,n,r=e.insertionPoint,o=e.selection.selectionEnd;if(null!==r)return r;var c=o.clientId;return c?(t=ge(e,c)||void 0,n=Me(e,o.clientId,t)+1):n=Re(e).length,{rootClientId:t,index:n}}function Je(e){return e.insertionPointVisibility}function et(e){return e.template.isValid}function tt(e){return e.settings.template}function nt(e,t){if(!t)return e.settings.templateLock;var n=ht(e,t);return n?n.templateLock:null}var rt=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(d.isBoolean)(e)?e:Object(d.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n};if(t&&"object"===Object(H.a)(t)?t=(n=t).name:n=Object(p.getBlockType)(t),!n)return!1;var c=jt(e),i=c.allowedBlockTypes,a=o(i,t,!0);if(!a)return!1;var l=!!nt(e,r);if(l)return!1;var s=ht(e,r);if(r&&void 0===s)return!1;var u=null==s?void 0:s.allowedBlocks,b=o(u,t),f=n.parent,m=Y(e,r),v=o(f,m);return null!==b&&null!==v?b||v:null!==b?b:null===v||v},ot=Object(z.a)(rt,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function ct(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return ot(e,Y(e,t),n)}))}function it(e,t){var n,r;return null!==(n=null===(r=e.preferences.insertUsage)||void 0===r?void 0:r[t])&&void 0!==n?n:null}var at=function(e,t,n){return!!Object(p.hasBlockSupport)(t,"inserter",!0)&&rt(e,t.name,n)},lt=function(e,t){return function(n){var r="".concat(t.id,"/").concat(n.name),o=it(e,r)||{},c=o.time,i=o.count,a=void 0===i?0:i;return K(K({},t),{},{id:r,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:K(K({},t.initialAttributes),n.attributes),innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:st(c,a)})}},st=function(e,t){if(!e)return t;var n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},ut=function(e,t){var n=t.buildScope,r=void 0===n?"inserter":n;return function(t){var n=t.name,o=!1;Object(p.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(d.some)(le(e,ie(e)),{name:t.name}));var c=it(e,n)||{},i=c.time,a=c.count,l=void 0===a?0:a,s={id:n,name:t.name,title:t.title,icon:t.icon,isDisabled:o,frecency:st(i,l)};if("transform"===r)return s;var u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return K(K({},s),{},{initialAttributes:{},description:t.description,category:t.category,keywords:t.keywords,variations:u,example:t.example,utility:1})}},dt=Object(z.a)((function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=ut(e,{buildScope:"inserter"}),o=function(t){var n,r="core/block/".concat(t.id),o=_t(e,t.id);1===o.length&&(n=Object(p.getBlockType)(o[0].name));var c=it(e,r)||{},i=c.time,a=c.count,l=st(i,void 0===a?0:a);return{id:r,name:"core/block",initialAttributes:{ref:t.id},title:t.title.raw,icon:n?n.icon:q,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:l}},c=Object(p.getBlockTypes)().filter((function(t){return at(e,t,n)})).map(r),i=rt(e,"core/block",n)?St(e).map(o):[],a=c.filter((function(e){var t=e.variations;return!(void 0===t?[]:t).some((function(e){return e.isDefault}))})),l=[],s=G(c);try{for(s.s();!(t=s.n()).done;){var u=t.value,d=u.variations,b=void 0===d?[]:d;if(b.length){var f=lt(e,u);l.push.apply(l,Object(y.a)(b.map(f)))}}}catch(e){s.e(e)}finally{s.f()}var m=function(e,t){var n=e.name.startsWith("core/"),r=t.name.startsWith("core/");return n&&r?0:n&&!r?-1:1},v=[].concat(Object(y.a)(a),l).sort(m);return[].concat(Object(y.a)(v),Object(y.a)(i))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,St(e),Object(p.getBlockTypes)()]})),bt=Object(z.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=ut(e,{buildScope:"transform"}),o=Object(p.getBlockTypes)().filter((function(t){return at(e,t,n)})).map(r),c=Object(d.mapKeys)(o,(function(e){return e.name})),i=Object(p.getPossibleBlockTransformations)(t).reduce((function(e,t){return c[null==t?void 0:t.name]&&e.push(c[t.name]),e}),[]),a=Object(d.orderBy)(i,(function(e){return c[e.name].frecency}),"desc");return a}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),ft=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(d.some)(Object(p.getBlockTypes)(),(function(n){return at(e,n,t)}));if(n)return!0;var r=rt(e,"core/block",t)&&St(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,St(e),Object(p.getBlockTypes)()]})),pt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(d.filter)(Object(p.getBlockTypes)(),(function(n){return at(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(p.getBlockTypes)()]})),mt=Object(z.a)((function(e,t){var n=e.settings.__experimentalBlockPatterns.find((function(e){return e.name===t}));return n?K(K({},n),{},{blocks:Object(p.parse)(n.content)}):null}),(function(e){return[e.settings.__experimentalBlockPatterns]})),vt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.settings.__experimentalBlockPatterns,r=n.map((function(t){var n=t.name;return mt(e,n)})),o=Object(d.filter)(r,(function(n){return n.blocks.every((function(n){var r=n.name;return ot(e,r,t)}))}));return o}),(function(e,t){return[e.settings.__experimentalBlockPatterns,e.settings.allowedBlockTypes,e.settings.templateLock,e.blockListSettings[t],e.blocks.byClientId[t]]})),Ot=Object(z.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return $;var r=vt(e,n),o=Array.isArray(t)?t:[t];return r.filter((function(e){var t,n;return null==e||null===(t=e.blockTypes)||void 0===t||null===(n=t.some)||void 0===n?void 0:n.call(t,(function(e){return o.includes(e)}))}))}),(function(e,t){return Object(y.a)(vt.getDependants(e,t))})),gt=Object(z.a)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return $;if(t.some((function(t){var n=t.clientId;return t.innerBlocks.length||Tt(e,n)})))return $;var r=Array.from(new Set(t.map((function(e){return e.name}))));return Ot(e,r,n)}),(function(e,t){return Object(y.a)(Ot.getDependants(e,t))}));function ht(e,t){return e.blockListSettings[t]}function jt(e){return e.settings}function yt(e){return e.blocks.isPersistentChange}var kt=Object(z.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.reduce((function(t,n){return e.blockListSettings[n]?K(K({},t),{},Object(a.a)({},n,e.blockListSettings[n])):t}),{})}),(function(e){return[e.blockListSettings]})),_t=Object(z.a)((function(e,t){var n=Object(d.find)(St(e),(function(e){return e.id===t}));return n?Object(p.parse)("string"==typeof n.content.raw?n.content.raw:n.content):null}),(function(e){return[St(e)]})),Et=Object(z.a)((function(e,t){var n,r=Object(d.find)(St(e),(function(e){return e.id===t}));return r?null===(n=r.title)||void 0===n?void 0:n.raw:null}),(function(e){return[St(e)]}));function wt(e){return e.blocks.isIgnoredChange}function Ct(e){return e.lastBlockAttributesChange}function St(e){var t,n;return null!==(t=null==e||null===(n=e.settings)||void 0===n?void 0:n.__experimentalReusableBlocks)&&void 0!==t?t:$}function Bt(e){return e.isNavigationMode}function It(e){return e.hasBlockMovingClientId}function xt(e){return!!e.automaticChangeStatus}function Pt(e,t){return e.highlightedBlock===t}function Tt(e,t){return!!e.blocks.controlledInnerBlocks[t]}var Nt=Object(z.a)((function(e,t){if(!t.length)return null;var n=ve(e);if(t.includes(Y(e,n)))return n;var r=Be(e),o=je(e,n||r[0],t);return o?Object(d.last)(o):null}),(function(e,t){return[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]}));function Dt(e,t,n){var r=e.lastBlockInserted;return r.clientId===t&&r.source===n}var At=n(16),Lt=n.n(At),Rt=n(55),Mt=n(41),Ft=n.n(Mt),Vt={SLEEP:function(e){var t=e.duration;return new Promise((function(e){setTimeout(e,t)}))},MARK_AUTOMATIC_CHANGE_FINAL_CONTROL:Object(v.createRegistryControl)((function(e){return function(){var t=window.requestIdleCallback;(void 0===t?function(e){return setTimeout(e,100)}:t)((function(){return e.dispatch(yr).__unstableMarkAutomaticChangeFinal()}))}}))},Ht="core/block-editor";function zt(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Gt(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gt(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kt=Lt.a.mark(fn),qt=Lt.a.mark(pn),$t=Lt.a.mark(mn),Yt=Lt.a.mark(yn),Xt=Lt.a.mark(kn),Qt=Lt.a.mark(Cn),Zt=Lt.a.mark(xn),Jt=Lt.a.mark(An),en=Lt.a.mark(Ln),tn=Lt.a.mark(Mn),nn=Lt.a.mark(Gn),rn=Lt.a.mark(Un),on=Lt.a.mark(Wn),cn=Lt.a.mark(lr),an=Lt.a.mark(ur),ln=Lt.a.mark(dr),sn=Lt.a.mark(br),un=Lt.a.mark(fr),dn=Lt.a.mark(pr),bn=Lt.a.mark(vr);function fn(){return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.controls.select(Ht,"getBlockCount");case 2:if(0!==e.sent){e.next=7;break}return e.next=6,nr();case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),Kt)}function pn(e){return Lt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{type:"RESET_BLOCKS",blocks:e};case 2:return t.delegateYield(mn(e),"t0",3);case 3:return t.abrupt("return",t.t0);case 4:case"end":return t.stop()}}),qt)}function mn(e){var t,n,r,o;return Lt.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,v.controls.select(Ht,"getTemplate");case 2:return t=c.sent,c.next=5,v.controls.select(Ht,"getTemplateLock");case 5:return n=c.sent,r=!t||"all"!==n||Object(p.doBlocksMatchTemplate)(e,t),c.next=9,v.controls.select(Ht,"isValidTemplate");case 9:if(o=c.sent,r===o){c.next=14;break}return c.next=13,zn(r);case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}}),$t)}function vn(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function On(e){return{type:"RECEIVE_BLOCKS",blocks:e}}function gn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:Object(d.castArray)(e),attributes:t,uniqueByBlock:n}}function hn(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function jn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function yn(e){var t;return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select(Ht,"getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,jn(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Yt)}function kn(e){var t;return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,v.controls.select(Ht,"getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,jn(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Xt)}function En(){return{type:"START_MULTI_SELECT"}}function wn(){return{type:"STOP_MULTI_SELECT"}}function Cn(e,t){var n;return Lt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"MULTI_SELECT",start:e,end:t};case 2:return r.next=4,v.controls.select(Ht,"getSelectedBlockCount");case 4:n=r.sent,Object(Rt.speak)(Object(k.sprintf)(
2
  /* translators: %s: number of selected blocks */
3
  Object(k._n)("%s block selected.","%s blocks selected.",n),n),"assertive");case 6:case"end":return r.stop()}}),Qt)}function Sn(){return{type:"CLEAR_SELECTED_BLOCK"}}function Bn(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function In(e,t){var n,r,o=null!==(n=null==t||null===(r=t.__experimentalPreferredStyleVariations)||void 0===r?void 0:r.value)&&void 0!==n?n:{};return e.map((function(e){var t,n=e.name;if(!Object(p.hasBlockSupport)(n,"defaultStylePicker",!0))return e;if(!o[n])return e;var r=null===(t=e.attributes)||void 0===t?void 0:t.className;if(null!=r&&r.includes("is-style-"))return e;var c=e.attributes,i=void 0===c?{}:c,a=o[n];return Wt(Wt({},e),{},{attributes:Wt(Wt({},i),{},{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function xn(e,t,n){var r,o,c,i,a,l=arguments;return Lt.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=l.length>3&&void 0!==l[3]?l[3]:0,o=l.length>4?l[4]:void 0,e=Object(d.castArray)(e),s.t0=In,s.t1=Object(d.castArray)(t),s.next=7,v.controls.select(Ht,"getSettings");case 7:return s.t2=s.sent,t=(0,s.t0)(s.t1,s.t2),s.next=11,v.controls.select(Ht,"getBlockRootClientId",Object(d.first)(e));case 11:c=s.sent,i=0;case 13:if(!(i<t.length)){s.next=23;break}return a=t[i],s.next=17,v.controls.select(Ht,"canInsertBlockType",a.name,c);case 17:if(s.sent){s.next=20;break}return s.abrupt("return");case 20:i++,s.next=13;break;case 23:return s.next=25,{type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:r,meta:o};case 25:return s.delegateYield(fn(),"t3",26);case 26:case"end":return s.stop()}}),Zt)}function Pn(e,t){return xn(e,t)}function Tn(e){return function(t,n){return{clientIds:Object(d.castArray)(t),type:e,rootClientId:n}}}var Nn=Tn("MOVE_BLOCKS_DOWN"),Dn=Tn("MOVE_BLOCKS_UP");function An(e){var t,n,r,o,c,i=arguments;return Lt.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return t=i.length>1&&void 0!==i[1]?i[1]:"",n=i.length>2&&void 0!==i[2]?i[2]:"",r=i.length>3?i[3]:void 0,a.next=5,v.controls.select(Ht,"getTemplateLock",t);case 5:if("all"!==(o=a.sent)){a.next=8;break}return a.abrupt("return");case 8:if(c={type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:r},t!==n){a.next=13;break}return a.next=12,c;case 12:return a.abrupt("return");case 13:if("insert"!==o){a.next=15;break}return a.abrupt("return");case 15:return a.next=17,v.controls.select(Ht,"canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),Jt)}function Ln(e){var t,n,r,o=arguments;return Lt.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=o.length>1&&void 0!==o[1]?o[1]:"",n=o.length>2&&void 0!==o[2]?o[2]:"",r=o.length>3?o[3]:void 0,c.next=5,An([e],t,n,r);case 5:case"end":return c.stop()}}),en)}function Rn(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4?arguments[4]:void 0;return Mn([e],t,n,r,0,o)}function Mn(e,t,n){var r,o,c,i,a,l,s,u=arguments;return Lt.a.wrap((function(b){for(;;)switch(b.prev=b.next){case 0:return r=!(u.length>3&&void 0!==u[3])||u[3],o=u.length>4&&void 0!==u[4]?u[4]:0,c=u.length>5?u[5]:void 0,Object(d.isObject)(o)&&(c=o,o=0,Ft()("meta argument in wp.data.dispatch('core/block-editor')",{since:"10.1",plugin:"Gutenberg",hint:"The meta argument is now the 6th argument of the function"})),b.t0=In,b.t1=Object(d.castArray)(e),b.next=8,v.controls.select(Ht,"getSettings");case 8:b.t2=b.sent,e=(0,b.t0)(b.t1,b.t2),i=[],a=zt(e),b.prev=12,a.s();case 14:if((l=a.n()).done){b.next=22;break}return s=l.value,b.next=18,v.controls.select(Ht,"canInsertBlockType",s.name,n);case 18:b.sent&&i.push(s);case 20:b.next=14;break;case 22:b.next=27;break;case 24:b.prev=24,b.t3=b.catch(12),a.e(b.t3);case 27:return b.prev=27,a.f(),b.finish(27);case 30:if(!i.length){b.next=32;break}return b.abrupt("return",{type:"INSERT_BLOCKS",blocks:i,index:t,rootClientId:n,time:Date.now(),updateSelection:r,initialPosition:r?o:null,meta:c});case 32:case"end":return b.stop()}}),tn,null,[[12,24,27,30]])}function Fn(e,t){return{type:"SET_INSERTION_POINT",rootClientId:e,index:t}}function Vn(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Hn(){return{type:"HIDE_INSERTION_POINT"}}function zn(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Gn(){var e,t,n;return Lt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,{type:"SYNCHRONIZE_TEMPLATE"};case 2:return r.next=4,v.controls.select(Ht,"getBlocks");case 4:return e=r.sent,r.next=7,v.controls.select(Ht,"getTemplate");case 7:return t=r.sent,n=Object(p.synchronizeBlocksWithTemplate)(e,t),r.next=11,pn(n);case 11:return r.abrupt("return",r.sent);case 12:case"end":return r.stop()}}),nn)}function Un(e,t){var n,r,o,i,a,l,s,u,b,f,m,O,g,h,j,k,_,E,w,C,S,B,I,x,P,T,N,D,A,L,R,M,F,V;return Lt.a.wrap((function(z){for(;;)switch(z.prev=z.next){case 0:return n=[e,t],z.next=3,{type:"MERGE_BLOCKS",blocks:n};case 3:return r=n[0],o=n[1],z.next=6,v.controls.select(Ht,"getBlock",r);case 6:if(i=z.sent,(a=Object(p.getBlockType)(i.name)).merge){z.next=12;break}return z.next=11,jn(i.clientId);case 11:return z.abrupt("return");case 12:return z.next=14,v.controls.select(Ht,"getBlock",o);case 14:return l=z.sent,s=Object(p.getBlockType)(l.name),z.next=18,v.controls.select(Ht,"getSelectionStart");case 18:if(u=z.sent,b=u.clientId,f=u.attributeKey,m=u.offset,O=(b===r?a:s).attributes[f],g=(b===r||b===o)&&void 0!==f&&void 0!==m&&!!O,O||("number"==typeof f?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ".concat(Object(H.a)(f))):window.console.error("The RichText identifier prop does not match any attributes defined by the block.")),h="†",j=Object(p.cloneBlock)(i),k=Object(p.cloneBlock)(l),g&&(E=(_=b===r?j:k).attributes[f],w=O.multiline,C=O.__unstableMultilineWrapperTags,S=O.__unstablePreserveWhiteSpace,B=Object(c.insert)(Object(c.create)({html:E,multilineTag:w,multilineWrapperTags:C,preserveWhiteSpace:S}),h,m,m),_.attributes[f]=Object(c.toHTMLString)({value:B,multilineTag:w,preserveWhiteSpace:S})),(I=i.name===l.name?[k]:Object(p.switchToBlockType)(k,i.name))&&I.length){z.next=33;break}return z.abrupt("return");case 33:if(x=a.merge(j.attributes,I[0].attributes),!g){z.next=45;break}return P=Object(d.findKey)(x,(function(e){return"string"==typeof e&&-1!==e.indexOf(h)})),T=x[P],N=a.attributes[P],D=N.multiline,A=N.__unstableMultilineWrapperTags,L=N.__unstablePreserveWhiteSpace,R=Object(c.create)({html:T,multilineTag:D,multilineWrapperTags:A,preserveWhiteSpace:L}),M=R.text.indexOf(h),F=Object(c.remove)(R,M,M+1),V=Object(c.toHTMLString)({value:F,multilineTag:D,preserveWhiteSpace:L}),x[P]=V,z.next=45,tr(i.clientId,P,M,M);case 45:return z.delegateYield(xn([i.clientId,l.clientId],[Wt(Wt({},i),{},{attributes:Wt(Wt({},i.attributes),x)})].concat(Object(y.a)(I.slice(1)))),"t0",46);case 46:case"end":return z.stop()}}),rn)}function Wn(e){var t,n,r,o,c=arguments;return Lt.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t=!(c.length>1&&void 0!==c[1])||c[1],e&&e.length){i.next=3;break}return i.abrupt("return");case 3:return e=Object(d.castArray)(e),i.next=6,v.controls.select(Ht,"getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,v.controls.select(Ht,"getTemplateLock",n);case 9:if(!i.sent){i.next=12;break}return i.abrupt("return");case 12:if(!t){i.next=18;break}return i.next=15,yn(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,v.controls.select(Ht,"getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(fn(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),on)}function Kn(e,t){return Wn([e],t)}function qn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?r:null,time:Date.now()}}function $n(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Yn(){return{type:"START_TYPING"}}function Xn(){return{type:"STOP_TYPING"}}function Qn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function Zn(){return{type:"STOP_DRAGGING_BLOCKS"}}function Jn(){return{type:"ENTER_FORMATTED_TEXT"}}function er(){return{type:"EXIT_FORMATTED_TEXT"}}function tr(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function nr(e,t,n){var r=Object(p.getDefaultBlockName)();if(r)return Rn(Object(p.createBlock)(r,e),n,t)}function rr(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function or(e){return{type:"UPDATE_SETTINGS",settings:e}}function cr(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function ir(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function ar(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function lr(){return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,{type:"MARK_AUTOMATIC_CHANGE"};case 2:return e.next=4,{type:"MARK_AUTOMATIC_CHANGE_FINAL_CONTROL"};case 4:case"end":return e.stop()}}),cn)}function sr(){return{type:"MARK_AUTOMATIC_CHANGE_FINAL"}}function ur(){var e,t=arguments;return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=!(t.length>0&&void 0!==t[0])||t[0],n.next=3,{type:"SET_NAVIGATION_MODE",isNavigationMode:e};case 3:e?Object(Rt.speak)(Object(k.__)("You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.")):Object(Rt.speak)(Object(k.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),an)}function dr(){var e,t=arguments;return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=t.length>0&&void 0!==t[0]?t[0]:null,n.next=3,{type:"SET_BLOCK_MOVING_MODE",hasBlockMovingClientId:e};case 3:e&&Object(Rt.speak)(Object(k.__)("Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block."));case 4:case"end":return n.stop()}}),ln)}function br(e){var t,n,r,o,c,i,a=arguments;return Lt.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=!(a.length>1&&void 0!==a[1])||a[1],e||e.length){l.next=3;break}return l.abrupt("return");case 3:return l.next=5,v.controls.select(Ht,"getBlocksByClientId",e);case 5:return n=l.sent,l.next=8,v.controls.select(Ht,"getBlockRootClientId",e[0]);case 8:if(r=l.sent,!Object(d.some)(n,(function(e){return!e}))){l.next=11;break}return l.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(d.some)(o,(function(e){return!Object(p.hasBlockSupport)(e,"multiple",!0)}))){l.next=14;break}return l.abrupt("return");case 14:return l.next=16,v.controls.select(Ht,"getBlockIndex",Object(d.last)(Object(d.castArray)(e)),r);case 16:return c=l.sent,i=n.map((function(e){return Object(p.__experimentalCloneSanitizedBlock)(e)})),l.next=20,Mn(i,c+1,r,t);case 20:if(!(i.length>1&&t)){l.next=23;break}return l.next=23,Cn(Object(d.first)(i).clientId,Object(d.last)(i).clientId);case 23:return l.abrupt("return",i.map((function(e){return e.clientId})));case 24:case"end":return l.stop()}}),sn)}function fr(e){var t,n;return Lt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,v.controls.select(Ht,"getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select(Ht,"getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select(Ht,"getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,nr({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),un)}function pr(e){var t,n;return Lt.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e){r.next=2;break}return r.abrupt("return");case 2:return r.next=4,v.controls.select(Ht,"getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,v.controls.select(Ht,"getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,v.controls.select(Ht,"getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,nr({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),dn)}function mr(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function vr(e){return Lt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,mr(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,mr(e,!1);case 6:case"end":return t.stop()}}),bn)}function Or(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jr={reducer:V,selectors:r,actions:o,controls:Vt},yr=Object(v.createReduxStore)(Ht,hr(hr({},jr),{},{persist:["preferences"]}));function kr(){var e=h(),t=e.isSelected,n=e.clientId,r=e.name,o=Object(v.useSelect)((function(e){if(!t){var o=e(yr),c=o.getBlockName,i=o.isFirstMultiSelectedBlock,a=o.getMultiSelectedBlockClientIds;return!!i(n)&&a().every((function(e){return c(e)===r}))}}),[n,t,r]);return t||o}Object(v.registerStore)(Ht,hr(hr({},jr),{},{persist:["preferences"]}));var _r={default:Object(m.createSlotFill)("BlockControls"),block:Object(m.createSlotFill)("BlockControlsBlock"),inline:Object(m.createSlotFill)("BlockFormatControls"),other:Object(m.createSlotFill)("BlockControlsOther")};function Er(e){var t=e.group,n=void 0===t?"default":t,r=e.controls,o=e.children;if(!kr())return null;var c=_r[n].Fill;return Object(l.createElement)(m.__experimentalStyleProvider,{document:document},Object(l.createElement)(c,null,(function(e){var t=Object(d.isEmpty)(e)?null:e;return Object(l.createElement)(m.__experimentalToolbarContext.Provider,{value:t},"default"===n&&Object(l.createElement)(m.ToolbarGroup,{controls:r}),o)})))}function wr(e){var t=e.group,n=void 0===t?"default":t,r=Object(j.a)(e,["group"]),o=Object(l.useContext)(m.__experimentalToolbarContext),c=_r[n].Slot,a=Object(m.__experimentalUseSlot)(c.__unstableName);return Boolean(a.fills&&a.fills.length)?"default"===n?Object(l.createElement)(c,Object(i.a)({},r,{bubblesVirtually:!0,fillProps:o})):Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(c,Object(i.a)({},r,{bubblesVirtually:!0,fillProps:o}))):null}var Cr=Er;Cr.Slot=wr;var Sr=function(e){return Object(l.createElement)(Er,Object(i.a)({group:"inline"},e))};Sr.Slot=function(e){return Object(l.createElement)(wr,Object(i.a)({group:"inline"},e))};var Br=Cr,Ir=n(7),xr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"})),Pr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z"})),Tr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"})),Nr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z"})),Dr=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z"})),Ar={type:"default"},Lr=Object(l.createContext)(Ar);function Rr(e,t){return e.split(",").map((function(e){return".editor-styles-wrapper ".concat(e," ").concat(t)})).join(",")}var Mr=Lr.Provider;function Fr(){return Object(l.useContext)(Lr)}function Vr(e){var t=e.selector,n=e.layout,r=void 0===n?{}:n,o=r.contentSize,c=r.wideSize,i=o||c?"\n\t\t\t\t".concat(Rr(t,"> *")," {\n\t\t\t\t\tmax-width: ").concat(null!=o?o:c,";\n\t\t\t\t\tmargin-left: auto;\n\t\t\t\t\tmargin-right: auto;\n\t\t\t\t}\n\n\t\t\t\t").concat(Rr(t,'> [data-align="wide"]')," {\n\t\t\t\t\tmax-width: ").concat(null!=c?c:o,";\n\t\t\t\t}\n\n\t\t\t\t").concat(Rr(t,'> [data-align="full"]')," {\n\t\t\t\t\tmax-width: none;\n\t\t\t\t}\n\t\t\t"):"";return i+="\n\t\t".concat(Rr(t,'> [data-align="left"]')," {\n\t\t\tfloat: left;\n\t\t\tmargin-right: 2em;\n\t\t}\n\n\t\t").concat(Rr(t,'> [data-align="right"]')," {\n\t\t\tfloat: right;\n\t\t\tmargin-left: 2em;\n\t\t}\n\t"),Object(l.createElement)("style",null,i)}var Hr=["left","center","right","wide","full"],zr=["wide","full"];function Gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hr,t=Object(v.useSelect)((function(e){return{wideControlsEnabled:(0,e(yr).getSettings)().alignWide}}),[]),n=t.wideControlsEnabled,r=void 0!==n&&n,o=Fr(),c="default"===o.type;if(!c)return[];var i=o.alignments,a=void 0===i?Hr:i,l=e.filter((function(e){return(o.alignments||r||!zr.includes(e))&&a.includes(e)}));return l}function Ur(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ur(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kr={left:{icon:xr,title:Object(k.__)("Align left")},center:{icon:Pr,title:Object(k.__)("Align center")},right:{icon:Tr,title:Object(k.__)("Align right")},wide:{icon:Nr,title:Object(k.__)("Wide width")},full:{icon:Dr,title:Object(k.__)("Full width")}},qr={isAlternate:!0},$r=function(e){var t=e.value,n=e.onChange,r=e.controls,o=e.isToolbar,c=e.isCollapsed,a=void 0===c||c,s=e.isToolbarButton,u=void 0===s||s,d=Gr(r);if(0===d.length)return null;var b=Kr[t],f=Kr.center,p=o?m.ToolbarGroup:m.DropdownMenu,v=o?{isCollapsed:a}:{isToolbarButton:u};return Object(l.createElement)(p,Object(i.a)({popoverProps:qr,icon:b?b.icon:f.icon,label:Object(k.__)("Align"),toggleProps:{describedBy:Object(k.__)("Change alignment")},controls:d.map((function(e){return Wr(Wr({},Kr[e]),{},{isActive:t===e,role:a?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))},v))};function Yr(e){return Object(l.createElement)($r,Object(i.a)({},e,{isToolbar:!1}))}function Xr(e){return Object(l.createElement)($r,Object(i.a)({},e,{isToolbar:!0}))}function Qr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qr(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jr=["left","center","right","wide","full"],eo=["wide","full"];function to(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?Jr.filter((function(t){return e.includes(t)})):!0===e?Jr:[],!r||!0===e&&!n?d.without.apply(void 0,[t].concat(eo)):t}var no=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Gr(to(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0)));return[r.length>0&&t.isSelected&&Object(l.createElement)(Br,{key:"align-controls",group:"block"},Object(l.createElement)(Yr,{value:t.attributes.align,onChange:function(e){var n,r;e||(null===(n=Object(p.getBlockType)(t.name).attributes)||void 0===n||null===(r=n.align)||void 0===r?void 0:r.default)&&(e=""),t.setAttributes({align:e})},controls:r})),Object(l.createElement)(e,Object(i.a)({key:"edit"},t))]}}),"withToolbarControls"),ro=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Gr(to(Object(p.getBlockSupport)(n,"align"),Object(p.hasBlockSupport)(n,"alignWide",!0)));if(void 0===r)return Object(l.createElement)(e,t);var c=t.wrapperProps;return o.includes(r)&&(c=Zr(Zr({},c),{},{"data-align":r})),Object(l.createElement)(e,Object(i.a)({},t,{wrapperProps:c}))}}));Object(f.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(d.has)(e.attributes,["align","type"])||Object(p.hasBlockSupport)(e,"align")&&(e.attributes=Zr(Zr({},e.attributes),{},{align:{type:"string",enum:[].concat(Jr,[""])}})),e})),Object(f.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",ro),Object(f.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",no),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return to(Object(p.getBlockSupport)(t,"align"),Object(p.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=u()("align".concat(r),e.className)),e}));var oo=Object(m.createSlotFill)("InspectorAdvancedControls"),co=oo.Fill,io=oo.Slot;function ao(e){var t=e.children;return h().isSelected?Object(l.createElement)(m.__experimentalStyleProvider,{document:document},Object(l.createElement)(co,null,t)):null}ao.slotName="InspectorAdvancedControls",ao.Slot=io;var lo=ao,so=Object(m.createSlotFill)("InspectorControls"),uo=so.Fill,bo=so.Slot;function fo(e){var t=e.children;return kr()?Object(l.createElement)(m.__experimentalStyleProvider,{document:document},Object(l.createElement)(uo,null,t)):null}fo.Slot=bo;var po=fo;function mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oo=/[\s#]/g,go=Object(b.createHigherOrderComponent)((function(e){return function(t){if(Object(p.hasBlockSupport)(t.name,"anchor")&&t.isSelected){var n="web"===l.Platform.OS,r=Object(l.createElement)(m.TextControl,{className:"html-anchor-control",label:Object(k.__)("HTML anchor"),help:Object(l.createElement)(l.Fragment,null,Object(k.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(l.createElement)(m.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(k.__)("Learn more about anchors"))),value:t.attributes.anchor||"",placeholder:n?null:Object(k.__)("Add an anchor"),onChange:function(e){e=e.replace(Oo,"-"),t.setAttributes({anchor:e})},autoCapitalize:"none",autoComplete:"off"});return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),n&&Object(l.createElement)(lo,null,r),!n&&"core/heading"===t.name&&Object(l.createElement)(po,null,Object(l.createElement)(m.PanelBody,{title:Object(k.__)("Heading settings")},r)))}return Object(l.createElement)(e,t)}}),"withInspectorControl");function ho(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ho(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ho(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(d.has)(e.attributes,["anchor","type"])||Object(p.hasBlockSupport)(e,"anchor")&&(e.attributes=vo(vo({},e.attributes),{},{anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/anchor/with-inspector-control",go),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/anchor/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor),e}));var yo=Object(b.createHigherOrderComponent)((function(e){return function(t){return Object(p.hasBlockSupport)(t.name,"customClassName",!0)&&t.isSelected?Object(l.createElement)(l.Fragment,null,Object(l.createElement)(e,t),Object(l.createElement)(lo,null,Object(l.createElement)(m.TextControl,{autoComplete:"off",label:Object(k.__)("Additional CSS class(es)"),value:t.attributes.className||"",onChange:function(e){t.setAttributes({className:""!==e?e:void 0})},help:Object(k.__)("Separate multiple classes with spaces.")}))):Object(l.createElement)(e,t)}}),"withInspectorControl");function ko(e){e="<div data-custom-class-name>".concat(e,"</div>");var t=Object(p.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(f.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=jo(jo({},e.attributes),{},{className:{type:"string"}})),e})),Object(f.addFilter)("editor.BlockEdit","core/editor/custom-class-name/with-inspector-control",yo),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/custom-class-name/save-props",(function(e,t,n){return Object(p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=u()(e.className,n.className)),e})),Object(f.addFilter)("blocks.getBlockAttributes","core/custom-class-name/addParsedDifference",(function(e,t,n){if(Object(p.hasBlockSupport)(t,"customClassName",!0)){var r=Object(d.omit)(e,["className"]),o=Object(p.getSaveContent)(t,r),c=ko(o),i=ko(n),a=Object(d.difference)(i,c);a.length?e.className=a.join(" "):o&&delete e.className}return e})),Object(f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return Object(p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=Object(d.uniq)([Object(p.getBlockDefaultClassName)(t.name)].concat(Object(y.a)(e.className.split(" ")))).join(" ").trim():e.className=Object(p.getBlockDefaultClassName)(t.name)),e}));var _o={"color.palette":function(e){return void 0===e.colors?void 0:e.colors},"color.gradients":function(e){return void 0===e.gradients?void 0:e.gradients},"color.custom":function(e){return void 0===e.disableCustomColors?void 0:!e.disableCustomColors},"color.customGradient":function(e){return void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients},"typography.fontSizes":function(e){return void 0===e.fontSizes?void 0:e.fontSizes},"typography.customFontSize":function(e){return void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes},"typography.customLineHeight":function(e){return e.enableCustomLineHeight},"spacing.units":function(e){if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw"]:e.enableCustomUnits},"spacing.customPadding":function(e){return e.enableCustomSpacing}};function Eo(e,t){for(var n in t)if(t[n]!==e[n])return!1;return!0}function wo(e){var t=h(),n=t.name,r=t.clientId;return Object(v.useSelect)((function(t){var o,c=t(yr),i=c.getBlockAttributes,a=(0,c.getSettings)(),l=t(p.store).getBlockType(n),s=n,u=Object(d.get)(l,["supports","__experimentalSelector"]);if(r&&Object(d.isObject)(u)){var b=i(r)||{};for(var f in u)if(Eo(b,u[f].attributes)){s=f;break}}var m="__experimentalFeatures.defaults.".concat(e),v="__experimentalFeatures.".concat(s,".").concat(e),O=null!==(o=Object(d.get)(a,v))&&void 0!==o?o:Object(d.get)(a,m);if(void 0!==O)return O;var g=_o[e]?_o[e](a):void 0;return void 0!==g?g:"typography.dropCap"===e||void 0}),[n,r,e])}var Co=n(9),So=n(59),Bo=n.n(So),Io=function(e,t,n){if(t){var r=Object(d.find)(e,{slug:t});if(r)return r}return{color:n}},xo=function(e,t){return Object(d.find)(e,{color:t})};function Po(e,t){if(e&&t)return"has-".concat(Object(d.kebabCase)(t),"-").concat(e)}var To=[];function No(e){if(e)return"has-".concat(e,"-gradient-background")}function Do(e,t){var n=Object(d.find)(e,["slug",t]);return n&&n.gradient}function Ao(e,t){return Object(d.find)(e,["gradient",t])}function Lo(e,t){var n=Ao(e,t);return n&&n.slug}function Ro(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.gradientAttribute,n=void 0===t?"gradient":t,r=e.customGradientAttribute,o=void 0===r?"customGradient":r,c=h(),i=c.clientId,s=wo("color.gradients")||To,u=Object(v.useSelect)((function(e){var t=(0,e(yr).getBlockAttributes)(i)||{};return{customGradient:t[o],gradient:t[n]}}),[i,n,o]),d=u.gradient,b=u.customGradient,f=Object(v.useDispatch)(yr),p=f.updateBlockAttributes,m=Object(l.useCallback)((function(e){var t,r,c=Lo(s,e);p(i,c?(r={},Object(a.a)(r,n,c),Object(a.a)(r,o,void 0),r):(t={},Object(a.a)(t,n,void 0),Object(a.a)(t,o,e),t))}),[s,i,p]),O=No(d);return{gradientClass:O,gradientValue:d?Do(s,d):b,setGradient:m}}function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}
4
  // translators: first %s: the color name or value (e.g. red or #ff0000)
26
  Object(k.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}(s,O&&O.title,E,y,_,"up"===r?-1:1,C)))})),os=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(rs,Object(i.a)({direction:"up",ref:t},e))})),cs=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(rs,Object(i.a)({direction:"down",ref:t},e))})),is=Object(l.createContext)({__experimentalFeatures:!1,__experimentalPersistentListViewFeatures:!1}),as=function(){return Object(l.useContext)(is)},ls=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"})),ss=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(l.createElement)("div",{className:u()(t,"block-editor-warning")},Object(l.createElement)("div",{className:"block-editor-warning__contents"},Object(l.createElement)("p",{className:"block-editor-warning__message"},r),(l.Children.count(n)>0||o)&&Object(l.createElement)("div",{className:"block-editor-warning__actions"},l.Children.count(n)>0&&l.Children.map(n,(function(e,t){return Object(l.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(l.createElement)(m.DropdownMenu,{className:"block-editor-warning__secondary",icon:ls,label:Object(k.__)("More options"),popoverProps:{position:"bottom left",className:"block-editor-warning__dropdown"},noIcons:!0},(function(){return Object(l.createElement)(m.MenuGroup,null,o.map((function(e,t){return Object(l.createElement)(m.MenuItem,{onClick:e.onClick,key:t},e.title)})))})))))},us=n(356),ds=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(l.createElement)("div",{className:i},Object(l.createElement)("div",{className:"block-editor-block-compare__content"},Object(l.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(l.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(l.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(l.createElement)("div",{className:"block-editor-block-compare__action"},Object(l.createElement)(m.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))},bs=function(e){var t,n,r,o,c=e.block,i=e.onKeep,a=e.onConvert,s=e.convertor,b=e.convertButtonText,f={rawContent:c.originalContent,renderedContent:Object(p.getSaveElement)(c.name,c.attributes)},m=(t=s(c),r=(n=Object(d.castArray)(t)).map((function(e){return Object(p.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(p.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),v=function(e,t){return Object(us.diffChars)(e,t).map((function(e,t){var n=u()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(l.createElement)("span",{key:t,className:n},e.value)}))}(f.rawContent,m.rawContent);return Object(l.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(l.createElement)(ds,{title:Object(k.__)("Current"),className:"block-editor-block-compare__current",action:i,actionText:Object(k.__)("Convert to HTML"),rawContent:f.rawContent,renderedContent:f.renderedContent}),Object(l.createElement)(ds,{title:Object(k.__)("After Conversion"),className:"block-editor-block-compare__converted",action:a,actionText:b,rawContent:v,renderedContent:m.renderedContent}))},fs=function(e){return Object(p.rawHandler)({HTML:e.originalContent})},ps=Object(b.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId;return{block:e(yr).getBlock(n)}})),Object(v.withDispatch)((function(e,t){var n=t.block,r=e(yr).replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(p.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,fs(n))},attemptBlockRecovery:function(){var e,t,o,c;r(n.clientId,(t=(e=n).name,o=e.attributes,c=e.innerBlocks,Object(p.createBlock)(t,o,c)))}}}))])((function(e){var t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,c=e.block,i=!!Object(p.getBlockType)("core/html"),a=Object(l.useState)(!1),s=Object(Co.a)(a,2),u=s[0],d=s[1],b=Object(l.useCallback)((function(){return d(!0)}),[]),f=Object(l.useCallback)((function(){return d(!1)}),[]),v=Object(l.useMemo)((function(){return[{
27
  // translators: Button to fix block content
28
  title:Object(k._x)("Resolve","imperative verb"),onClick:b},i&&{title:Object(k.__)("Convert to HTML"),onClick:t},{title:Object(k.__)("Convert to Classic Block"),onClick:r}].filter(Boolean)}),[b,t,r]);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(ss,{actions:[Object(l.createElement)(m.Button,{key:"recover",onClick:o,isPrimary:!0},Object(k.__)("Attempt Block Recovery"))],secondaryActions:v},Object(k.__)("This block contains unexpected or invalid content.")),u&&Object(l.createElement)(m.Modal,{title:// translators: Dialog title to fix block content
29
+ Object(k.__)("Resolve Block"),onRequestClose:f,className:"block-editor-block-compare"},Object(l.createElement)(bs,{block:c,onKeep:t,onConvert:n,convertor:fs,convertButtonText:Object(k.__)("Convert to Blocks")})))})),ms=Object(l.createElement)(ss,{className:"block-editor-block-list__block-crash-warning"},Object(k.__)("This block has encountered an error and cannot be previewed.")),vs=function(){return ms};var Os=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(){var e;return Object(pa.a)(this,o),(e=r.apply(this,arguments)).state={hasError:!1},e}return Object(ma.a)(o,[{key:"componentDidCatch",value:function(){this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?this.props.fallback:this.props.children}}]),o}(l.Component),gs=n(121),hs=n.n(gs),js=function(e){var t=e.clientId,n=Object(l.useState)(""),r=Object(Co.a)(n,2),o=r[0],c=r[1],i=Object(v.useSelect)((function(e){return e(yr).getBlock(t)}),[t]),a=Object(v.useDispatch)(yr).updateBlock;return Object(l.useEffect)((function(){c(Object(p.getBlockContent)(i))}),[i]),Object(l.createElement)(hs.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(p.getBlockType)(i.name),n=Object(p.getBlockAttributes)(e,o,i.attributes),r=o||Object(p.getSaveContent)(e,n),l=!o||Object(p.isValidBlockContent)(e,n,r);a(t,{attributes:n,originalContent:r,isValid:l}),o||c({content:r})},onChange:function(e){return c(e.target.value)}})};function ys(e){var t=Object(l.useRef)(),n=function(e){return Object(v.useSelect)((function(t){var n=t(yr),r=n.getSelectedBlocksInitialCaretPosition,o=n.isMultiSelecting,c=n.isNavigationMode;if((0,n.isBlockSelected)(e)&&!o()&&!c())return r()}),[e])}(e);return Object(l.useEffect)((function(){if(null!=n&&t.current){var e=t.current.ownerDocument;if(!t.current.contains(e.activeElement)){var r=Wl.focus.tabbable.find(t.current).filter((function(e){return Object(Wl.isTextField)(e)})),o=-1===n,c=(o?d.last:d.first)(r)||t.current;Bc(t.current,c)&&!c.closest(".block-list-appender")?Object(Wl.placeCaretAtHorizontalEdge)(c,o):t.current.focus()}}}),[n]),t}function ks(e){if(!e.defaultPrevented){var t="mouseover"===e.type?"add":"remove";e.preventDefault(),e.currentTarget.classList[t]("is-hovered")}}function _s(){var e=Object(v.useSelect)((function(e){var t=e(yr),n=t.isNavigationMode,r=t.getSettings;return n()||r().outlineMode}),[]);return Object(b.useRefEffect)((function(t){if(e)return t.addEventListener("mouseout",ks),t.addEventListener("mouseover",ks),function(){t.removeEventListener("mouseout",ks),t.removeEventListener("mouseover",ks),t.classList.remove("is-hovered")}}),[e])}function Es(e){return Object(v.useSelect)((function(t){var n=t(yr),r=n.isBlockBeingDragged,o=n.isBlockHighlighted,c=n.isBlockSelected,i=n.isBlockMultiSelected,a=n.getBlockName,l=n.getSettings,s=n.hasSelectedInnerBlock,d=n.__experimentalGetActiveBlockIdByBlockNames,b=l().__experimentalSpotlightEntityBlocks,f=r(e),m=c(e),v=a(e),O=s(e,!0),g=d(b);return u()("block-editor-block-list__block",{"is-selected":m,"is-highlighted":o(e),"is-multi-selected":i(e),"is-reusable":Object(p.isReusableBlock)(Object(p.getBlockType)(v)),"is-dragging":f,"has-child-selected":O,"has-active-entity":g,"is-active-entity":g===e})}),[e])}function ws(e){return Object(v.useSelect)((function(t){var n=t(yr).getBlockName(e),r=Object(p.getBlockType)(n);if(r.apiVersion>1||Object(p.hasBlockSupport)(r,"lightBlockWrapper",!1))return Object(p.getBlockDefaultClassName)(n)}),[e])}function Cs(e){return Object(v.useSelect)((function(t){var n=t(yr),r=n.getBlockName,o=(0,n.getBlockAttributes)(e).className;if(o){var c=Object(p.getBlockType)(r(e));if(c.apiVersion>1||Object(p.hasBlockSupport)(c,"lightBlockWrapper",!1))return o}}),[e])}function Ss(e){return Object(v.useSelect)((function(t){var n=t(yr),r=n.hasBlockMovingClientId,o=n.canInsertBlockType,c=n.getBlockName,i=n.getBlockRootClientId;if((0,n.isBlockSelected)(e)){var a=r();if(a)return u()("is-block-moving-mode",{"can-insert-moving-block":o(c(a),i(e))})}}),[e])}function Bs(e,t){for(var n="start"===t?"firstChild":"lastChild",r="start"===t?"nextSibling":"previousSibling";e[n];)for(e=e[n];e.nodeType===e.TEXT_NODE&&/^[ \t\n]*$/.test(e.data)&&e[r];)e=e[r];return e}function Is(e){var t=e(yr),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.getMultiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getSelectedBlockClientId;return{isSelectionEnabled:n(),isMultiSelecting:r(),multiSelectedBlockClientIds:o(),hasMultiSelection:c(),selectedBlockClientId:i()}}function xs(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var Ps=Object(l.createContext)(),Ts={position:"fixed"};function Ns(e){var t=e.tagName;return"INPUT"===t||"BUTTON"===t||"SELECT"===t||"TEXTAREA"===t}function Ds(e,t,n,r){var o,c=Wl.focus.focusable.find(n);return t&&(c=Object(d.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(d.find)(c,(function(e){if(!Wl.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(r){var t=e.getBoundingClientRect();if(t.left>=o.right||t.right<=o.left)return!1}return!0}))}function As(e){var t=e(yr),n=t.getSelectedBlockClientId,r=t.getMultiSelectedBlocksStartClientId,o=t.getMultiSelectedBlocksEndClientId,c=t.getPreviousBlockClientId,i=t.getNextBlockClientId,a=t.getFirstMultiSelectedBlockClientId,l=t.getLastMultiSelectedBlockClientId,s=t.hasMultiSelection,u=t.getBlockOrder,b=t.isSelectionEnabled,f=t.getBlockSelectionStart,p=t.isMultiSelecting,m=t.getSettings,v=t.isNavigationMode,O=n(),g=r(),h=o(),j=u();return{selectedBlockClientId:O,selectionStartClientId:g,selectionBeforeEndClientId:c(h||O),selectionAfterEndClientId:i(h||O),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),firstBlock:Object(d.first)(j),lastBlock:Object(d.last)(j),isSelectionEnabled:b(),blockSelectionStart:f(),isMultiSelecting:p(),keepCaretInsideBlock:m().keepCaretInsideBlock,isNavigationMode:v()}}function Ls(e){var t=e.children,n=Object(l.useRef)(),r=Object(l.useRef)(),o=Object(l.useRef)(),c=Object(l.useRef)(),i=Object(l.useRef)(),a=Object(l.useRef)(),s=Object(l.useRef)(),u=Object(v.useSelect)(As,[]),d=u.selectedBlockClientId,b=u.selectionStartClientId,f=u.selectionBeforeEndClientId,p=u.selectionAfterEndClientId,m=u.selectedFirstClientId,O=u.selectedLastClientId,g=u.hasMultiSelection,h=u.firstBlock,j=u.lastBlock,_=u.isSelectionEnabled,E=u.blockSelectionStart,w=u.isMultiSelecting,C=u.keepCaretInsideBlock,S=u.isNavigationMode,B=Object(v.useDispatch)(yr),I=B.multiSelect,x=B.selectBlock,P=B.setNavigationMode;function T(e){var t=e?f:p;t&&I(b||d,t)}function N(e){var t=e?m:O;t&&x(t)}Object(l.useEffect)((function(){g&&!w&&c.current.focus()}),[g,w]);var D=function(e){var t=Object(v.useSelect)(Is,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.selectedBlockClientId,a=Object(v.useSelect)(yr).getBlockParents,s=Object(v.useDispatch)(yr),u=s.startMultiSelect,d=s.stopMultiSelect,b=s.multiSelect,f=s.selectBlock,p=Object(l.useRef)(),m=Object(l.useRef)(),O=Object(l.useRef)();Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;if(c&&!r){var a=o.length;if(!(a<2)){var l=o[0],s=o[a-1],u=Sc(l,t),d=Sc(s,t),b=n.getSelection(),f=t.createRange();u=Bs(u,"start"),d=Bs(d,"end"),f.setStartBefore(u),f.setEndAfter(d),b.removeAllRanges(),b.addRange(f)}}else{if(!i||r)return;var p=n.getSelection();if(p.rangeCount&&!p.isCollapsed){var m=Sc(i,t),v=p.getRangeAt(0),O=v.startContainer,g=v.endContainer;!m||m.contains(O)&&m.contains(g)||p.removeAllRanges()}}}),[c,r,o,f,i]);var g=Object(l.useCallback)((function(t){var n=t.isSelectionEnd,r=e.current.ownerDocument.defaultView.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=Ic(r.focusNode);if(m.current===o){if(f(o),n&&(xs(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;O.current.contains(c)&&O.current.focus()}}else{var i=[].concat(Object(y.a)(a(m.current)),[m.current]),l=[].concat(Object(y.a)(a(o)),[o]),s=Math.min(i.length,l.length)-1;b(i[s],l[s])}}else xs(e.current,!0)}),[f,a,b]),h=Object(l.useCallback)((function(){var t=e.current.ownerDocument,n=t.defaultView;t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),p.current=n.requestAnimationFrame((function(){g({isSelectionEnd:!0}),d()}))}),[g,d]);return Object(l.useEffect)((function(){var t=e.current.ownerDocument,n=t.defaultView;return function(){t.removeEventListener("selectionchange",g),n.removeEventListener("mouseup",h),n.cancelAnimationFrame(p.current)}}),[g,h]),Object(l.useCallback)((function(t){if(n){var r=e.current.ownerDocument,o=r.defaultView;m.current=t,O.current=r.activeElement,u(),r.addEventListener("selectionchange",g),o.addEventListener("mouseup",h),xs(e.current,!1)}}),[n,u,h])}(n),A=Object(l.useRef)();function L(e){if(a.current)a.current=null;else if(g)c.current.focus();else if(d)A.current.focus();else{P(!0);var t=e.target.compareDocumentPosition(n.current)&e.target.DOCUMENT_POSITION_FOLLOWING?"findNext":"findPrevious";Wl.focus.tabbable[t](e.target).focus()}}Object(l.useEffect)((function(){function e(e){A.current=e.target}return n.current.addEventListener("focusout",e),function(){n.current.removeEventListener("focusout",e)}}),[]);var R=S?void 0:"0";return Object(l.createElement)(Ps.Provider,{value:D},Object(l.createElement)("div",{ref:r,tabIndex:R,onFocus:L,style:Ts}),Object(l.createElement)("div",{ref:c,tabIndex:g?"0":void 0,"aria-label":g?Object(k.__)("Multiple selected blocks"):void 0,style:Ts,onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey,c=t===li.UP,i=t===li.DOWN,l=t===li.LEFT,s=t===li.RIGHT,u=c||l,d=l||s||c||i;t===li.TAB?(a.current=!0,n?r.current.focus():o.current.focus()):d&&((n?T:N)(u),e.preventDefault())}}),Object(l.createElement)("div",{ref:n,className:"block-editor-writing-flow",onKeyDown:function(e){var t=e.keyCode,c=e.target;if(n.current.contains(c)){var l=t===li.UP,u=t===li.DOWN,b=t===li.LEFT,m=t===li.RIGHT,v=t===li.TAB,O=t===li.ESCAPE,g=l||b,y=b||m,k=l||u,_=y||k,E=e.shiftKey,w=E||e.ctrlKey||e.altKey||e.metaKey,S=k?Wl.isVerticalEdge:Wl.isHorizontalEdge,B=n.current.ownerDocument.defaultView;if(d){if(v){var x=E?"findPrevious":"findNext";if(Ns(c)&&Ns(Wl.focus.tabbable[x](c)))return;var N=E?r:o;return a.current=!0,void N.current.focus()}O&&P(!0)}if(k?s.current||(s.current=Object(Wl.computeCaretRect)(B)):s.current=null,!_)return li.isKeyboardEvent.primary(e)&&(i.current=Object(Wl.isEntirelySelected)(c)),void(li.isKeyboardEvent.primary(e,"a")&&((c.isContentEditable?i.current:Object(Wl.isEntirelySelected)(c))&&(I(h,j),e.preventDefault()),i.current=!0));if(!e.nativeEvent.defaultPrevented&&function(e,t,n){if((t===li.UP||t===li.DOWN)&&!n)return!0;var r=e.tagName;return"INPUT"!==r&&"TEXTAREA"!==r}(c,t,w)){var D,A="rtl"===(D=c).ownerDocument.defaultView.getComputedStyle(D).direction?!g:g;if(E)(g&&f||!g&&p)&&function(e,t){var r,o,c=Ds(e,t,n.current);return!(c&&(r=e,o=c,r.closest(".block-editor-block-list__block")===o.closest(".block-editor-block-list__block")))}(c,g)&&S(c,g)&&(T(g),e.preventDefault());else if(k&&Object(Wl.isVerticalEdge)(c,g)&&!C){var L=Ds(c,g,n.current,!0);L&&(Object(Wl.placeCaretAtVerticalEdge)(L,g,s.current),e.preventDefault())}else if(y&&B.getSelection().isCollapsed&&Object(Wl.isHorizontalEdge)(c,A)&&!C){var R=Ds(c,A,n.current);Object(Wl.placeCaretAtHorizontalEdge)(R,A),e.preventDefault()}}}},onMouseDown:function(e){if(s.current=null,_&&0===e.button){var t=Ic(e.target);t&&(e.shiftKey?E!==t&&(I(E,t),e.preventDefault()):g&&x(t))}}},t),Object(l.createElement)("div",{ref:o,tabIndex:R,onFocus:L,style:Ts}))}function Rs(e){var t=Object(l.useContext)(Ps),n=Object(v.useSelect)((function(t){var n=t(yr),r=n.isBlockSelected,o=n.getBlockRootClientId,c=n.getBlockIndex;return{isSelected:r(e),rootClientId:o(e),index:c(e)}}),[e]),r=n.isSelected,o=n.rootClientId,c=n.index,i=Object(v.useDispatch)(yr),a=i.insertDefaultBlock,s=i.removeBlock,u=i.selectBlock;return Object(b.useRefEffect)((function(n){if(!r){function i(t){Bc(n,t.target)&&u(e)}return n.addEventListener("focusin",i),function(){n.removeEventListener("focusin",i)}}function l(t){var r=t.keyCode,i=t.target;r!==li.ENTER&&r!==li.BACKSPACE&&r!==li.DELETE||i!==n||Object(Wl.isTextField)(i)||(t.preventDefault(),r===li.ENTER?a({},o,c+1):s(e))}function d(n){1===n.buttons&&t(e)}function b(e){e.preventDefault()}return n.addEventListener("keydown",l),n.addEventListener("mouseleave",d),n.addEventListener("dragstart",b),function(){n.removeEventListener("mouseleave",d),n.removeEventListener("keydown",l),n.removeEventListener("dragstart",b)}}),[r,o,c,t,a,s,u])}function Ms(e){var t=Object(v.useSelect)(yr),n=t.isNavigationMode,r=t.isBlockSelected,o=Object(v.useDispatch)(yr),c=o.setNavigationMode,i=o.selectBlock;return Object(b.useRefEffect)((function(t){function o(t){n()&&!t.defaultPrevented&&(t.preventDefault(),r(e)?c(!1):i(e))}return t.addEventListener("mousedown",o),function(){t.addEventListener("mousedown",o)}}),[e,n,r,c])}var Fs=n(71),Vs=n(177),Hs=[Object(l.createInterpolateElement)(Object(k.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(k.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(l.createInterpolateElement)(Object(k.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:Object(l.createElement)("kbd",null)}),Object(k.__)("Drag files into the editor to automatically insert media blocks."),Object(k.__)("Change a block's type by pressing the block icon on the toolbar.")],zs=function(){var e=Object(l.useState)(Math.floor(Math.random()*Hs.length)),t=Object(Co.a)(e,1)[0];return Object(l.createElement)(m.Tip,null,Hs[t])},Gs=n(135),Us=n(282),Ws=function e(t){var n=t.className,r=t.onChange,o=t.value,c=t.label,i=t.placeholder,a=Object(b.useInstanceId)(e),s=Object(l.useRef)();return Object(l.createElement)("div",{className:u()("block-editor-inserter__search",n)},Object(l.createElement)(m.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(a)},c||i),Object(l.createElement)("input",{ref:s,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(a),type:"search",placeholder:i,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(l.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(l.createElement)(m.Button,{icon:Gs.a,label:Object(k.__)("Reset search"),onClick:function(){r(""),s.current.focus()}}),!o&&Object(l.createElement)(ra.a,{icon:Us.a})))},Ks=function(e){var t=e.title,n=e.icon,r=e.description,o=e.blockType;return o&&(Ft()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),t=o.title,n=o.icon,r=o.description),Object(l.createElement)("div",{className:"block-editor-block-card"},Object(l.createElement)(hl,{icon:n,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-block-card__content"},Object(l.createElement)("h2",{className:"block-editor-block-card__title"},t),Object(l.createElement)("span",{className:"block-editor-block-card__description"},r)))};function qs(e){var t=e.clientId,n=void 0===t?null:t,r=e.value,o=e.selection,c=e.onChange,i=void 0===c?d.noop:c,a=e.onInput,s=void 0===a?d.noop:a,u=Object(v.useRegistry)(),b=u.dispatch(yr),f=b.resetBlocks,m=b.resetSelection,O=b.replaceInnerBlocks,g=b.setHasControlledInnerBlocks,h=b.__unstableMarkNextChangeAsNotPersistent,j=u.select(yr),y=j.getBlockName,k=j.getBlocks,_=Object(l.useRef)({incoming:null,outgoing:[]}),E=Object(l.useRef)(!1),w=Object(l.useRef)(s),C=Object(l.useRef)(i);Object(l.useEffect)((function(){w.current=s,C.current=i}),[s,i]),Object(l.useEffect)((function(){_.current.outgoing.includes(r)?Object(d.last)(_.current.outgoing)===r&&(_.current.outgoing=[]):k(n)!==r&&(_.current.outgoing=[],function(){if(r)if(h(),n){g(n,!0),h();var e=r.map((function(e){return Object(p.cloneBlock)(e)}));E.current&&(_.current.incoming=e),O(n,e)}else E.current&&(_.current.incoming=r),f(r)}(),o&&m(o.selectionStart,o.selectionEnd,o.initialPosition))}),[r,n]),Object(l.useEffect)((function(){var e=u.select(yr),t=e.getSelectionStart,r=e.getSelectionEnd,o=e.getSelectedBlocksInitialCaretPosition,c=e.isLastBlockChangePersistent,i=e.__unstableIsLastBlockChangeIgnored,a=k(n),l=c(),s=!1;E.current=!0;var d=u.subscribe((function(){if(null===n||null!==y(n)){var e=c(),u=k(n),d=u!==a;if(a=u,d&&(_.current.incoming||i()))return _.current.incoming=null,void(l=e);(d||s&&!d&&e&&!l)&&(l=e,_.current.outgoing.push(a),(l?C.current:w.current)(a,{selection:{selectionStart:t(),selectionEnd:r(),initialPosition:o()}})),s=d}}));return function(){return d()}}),[u,n])}var $s,Ys=Object(b.createHigherOrderComponent)((function(e){return Object(v.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(j.a)(t,["useSubRegistry","registry"]);if(!r)return Object(l.createElement)(e,Object(i.a)({registry:o},c));var a=Object(l.useState)(null),s=Object(Co.a)(a,2),u=s[0],d=s[1];return Object(l.useEffect)((function(){var e=Object(v.createRegistry)({},o);e.registerStore(Ht,jr),d(e)}),[o]),u?Object(l.createElement)(v.RegistryProvider,{value:u},Object(l.createElement)(e,Object(i.a)({registry:u},c))):null}))}),"withRegistryProvider")((function(e){var t=e.children,n=e.settings,r=Object(v.useDispatch)(yr).updateSettings;return Object(l.useEffect)((function(){r(n)}),[n]),qs(e),t}));function Xs(e){var t=e.onClick;return Object(l.createElement)("div",{tabIndex:0,role:"button",onClick:t,onKeyPress:t},Object(l.createElement)(m.Disabled,null,Object(l.createElement)(yb,null)))}var Qs=function(e){var t=e.viewportWidth,n=e.__experimentalPadding,r=Object(b.useResizeObserver)(),o=Object(Co.a)(r,2),c=o[0],i=o[1].width,a=Object(b.useResizeObserver)(),s=Object(Co.a)(a,2),u=s[0],d=s[1].height;$s=$s||Object(b.pure)(yb);var f=(i-2*n)/t;return Object(l.createElement)("div",{className:"block-editor-block-preview__container editor-styles-wrapper","aria-hidden":!0,style:{height:d*f+2*n}},c,Object(l.createElement)(m.Disabled,{style:{transform:"scale(".concat(f,")"),width:t,left:n,right:n,top:n},className:"block-editor-block-preview__content"},u,Object(l.createElement)($s,null)))};function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Js=Object(l.memo)((function(e){var t=e.blocks,n=e.__experimentalPadding,r=void 0===n?0:n,o=e.viewportWidth,c=void 0===o?1200:o,i=e.__experimentalLive,s=void 0!==i&&i,u=e.__experimentalOnClick,b=Object(v.useSelect)((function(e){return e(yr).getSettings()}),[]),f=Object(l.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zs(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return e.__experimentalBlockPatterns=[],e}),[b]),p=Object(l.useMemo)((function(){return Object(d.castArray)(t)}),[t]);return t&&0!==t.length?Object(l.createElement)(Ys,{value:p,settings:f},s?Object(l.createElement)(Xs,{onClick:u}):Object(l.createElement)(Qs,{viewportWidth:c,__experimentalPadding:r})):null}));function eu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eu(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nu=function(e){var t,n,r=e.item,o=r.name,c=r.title,i=r.icon,a=r.description,s=r.initialAttributes,u=Object(p.getBlockType)(o),d=Object(p.isReusableBlock)(r);return Object(l.createElement)("div",{className:"block-editor-inserter__preview-container"},Object(l.createElement)("div",{className:"block-editor-inserter__preview"},d||u.example?Object(l.createElement)("div",{className:"block-editor-inserter__preview-content"},Object(l.createElement)(Js,{__experimentalPadding:16,viewportWidth:null!==(t=null===(n=u.example)||void 0===n?void 0:n.viewportWidth)&&void 0!==t?t:500,blocks:u.example?Object(p.getBlockFromExample)(r.name,{attributes:tu(tu({},u.example.attributes),s),innerBlocks:u.example.innerBlocks}):Object(p.createBlock)(o,s)})):Object(l.createElement)("div",{className:"block-editor-inserter__preview-content-missing"},Object(k.__)("No Preview Available."))),!d&&Object(l.createElement)(Ks,{title:c,icon:i,description:a}))},ru=Object(l.createContext)();function ou(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ou(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ou(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var iu=Object(l.forwardRef)((function(e,t){var n=e.isFirst,r=e.as,o=e.children,c=Object(j.a)(e,["isFirst","as","children"]),a=Object(l.useContext)(ru);return Object(l.createElement)(m.__unstableCompositeItem,Object(i.a)({ref:t,state:a,role:"option",focusable:!0},c),(function(e){var t=cu(cu({},e),{},{tabIndex:n?0:e.tabIndex});return r?Object(l.createElement)(r,t,o):"function"==typeof o?o(t):Object(l.createElement)(m.Button,t,o)}))})),au=Object(l.createElement)(Ir.SVG,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(l.createElement)(Ir.Path,{d:"M5 4h2V2H5v2zm6-2v2h2V2h-2zm-6 8h2V8H5v2zm6 0h2V8h-2v2zm-6 6h2v-2H5v2zm6 0h2v-2h-2v2z"}));function lu(e){var t=e.count,n=e.icon;return Object(l.createElement)("div",{className:"block-editor-block-draggable-chip-wrapper"},Object(l.createElement)("div",{className:"block-editor-block-draggable-chip"},Object(l.createElement)(m.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content"},Object(l.createElement)(m.FlexItem,null,n?Object(l.createElement)(hl,{icon:n}):Object(k.sprintf)(
30
  /* translators: %d: Number of blocks. */
31
  Object(k._n)("%d block","%d blocks",t),t)),Object(l.createElement)(m.FlexItem,null,Object(l.createElement)(hl,{icon:au})))))}var su=function(e){var t=e.isEnabled,n=e.blocks,r=e.icon,o=e.children,c={type:"inserter",blocks:n};return Object(l.createElement)(m.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:c,__experimentalDragComponent:Object(l.createElement)(lu,{count:n.length,icon:r})},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return o({draggable:t,onDragStart:t?n:void 0,onDragEnd:t?r:void 0})}))};function uu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.navigator.platform;return-1!==t.indexOf("Mac")||["iPad","iPhone"].includes(t)}var du=Object(l.memo)((function(e){var t=e.className,n=e.isFirst,r=e.item,o=e.onSelect,c=e.onHover,a=e.isDraggable,s=Object(j.a)(e,["className","isFirst","item","onSelect","onHover","isDraggable"]),d=Object(l.useRef)(!1),b=r.icon?{backgroundColor:r.icon.background,color:r.icon.foreground}:{},f=Object(l.useMemo)((function(){return[Object(p.createBlock)(r.name,r.initialAttributes,Object(p.createBlocksFromInnerBlocksTemplate)(r.innerBlocks))]}),[r.name,r.initialAttributes,r.initialAttributes]);return Object(l.createElement)(su,{isEnabled:a&&!r.disabled,blocks:f,icon:r.icon},(function(e){var a=e.draggable,f=e.onDragStart,p=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-types-list__list-item",draggable:a,onDragStart:function(e){d.current=!0,f&&(c(null),f(e))},onDragEnd:function(e){d.current=!1,p&&p(e)}},Object(l.createElement)(iu,Object(i.a)({isFirst:n,className:u()("block-editor-block-types-list__item",t),disabled:r.isDisabled,onClick:function(e){e.preventDefault(),o(r,uu()?e.metaKey:e.ctrlKey),c(null)},onKeyDown:function(e){e.keyCode===li.ENTER&&(e.preventDefault(),o(r,uu()?e.metaKey:e.ctrlKey),c(null))},onFocus:function(){d.current||c(r)},onMouseEnter:function(){d.current||c(r)},onMouseLeave:function(){return c(null)},onBlur:function(){return c(null)}},s),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-icon",style:b},Object(l.createElement)(hl,{icon:r.icon,showColors:!0})),Object(l.createElement)("span",{className:"block-editor-block-types-list__item-title"},r.title)))}))})),bu=Object(l.forwardRef)((function(e,t){var n=Object(l.useState)(!1),r=Object(Co.a)(n,2),o=r[0],c=r[1];return Object(l.useEffect)((function(){o&&Object(Rt.speak)(Object(k.__)("Use left and right arrow keys to move through blocks"))}),[o]),Object(l.createElement)("div",Object(i.a)({ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:function(){c(!0)},onBlur:function(e){!e.currentTarget.contains(e.relatedTarget)&&c(!1)}},e))})),fu=Object(l.forwardRef)((function(e,t){var n=Object(l.useContext)(ru);return Object(l.createElement)(m.__unstableCompositeGroup,Object(i.a)({state:n,role:"presentation",ref:t},e))})),pu=function(e){var t=e.items,n=void 0===t?[]:t,r=e.onSelect,o=e.onHover,c=void 0===o?function(){}:o,i=e.children,a=e.label,s=e.isDraggable,u=void 0===s||s;return Object(l.createElement)(bu,{className:"block-editor-block-types-list","aria-label":a},function(e,t){for(var n=[],r=0,o=e.length;r<o;r+=3)n.push(e.slice(r,r+3));return n}(n).map((function(e,t){return Object(l.createElement)(fu,{key:t},e.map((function(e,n){return Object(l.createElement)(du,{key:e.id,item:e,className:Object(p.getBlockMenuDefaultClassName)(e.id),onSelect:r,onHover:c,isDraggable:u,isFirst:0===t&&0===n})})))})),i)},mu=function(e){var t=e.title,n=e.icon,r=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__panel-header"},Object(l.createElement)("h2",{className:"block-editor-inserter__panel-title"},t),Object(l.createElement)(m.Icon,{icon:n})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},r))},vu=function(e){var t=e.children,n=Object(m.__unstableUseCompositeState)({shift:!0,wrap:"horizontal"});return Object(l.createElement)(ru.Provider,{value:n},t)};function Ou(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var gu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover,o=e.showMostUsedBlocks,c=Ol(t,n),i=Object(Co.a)(c,4),s=i[0],u=i[1],b=i[2],f=i[3],p=Object(l.useMemo)((function(){return Object(d.orderBy)(s,["frecency"],["desc"]).slice(0,6)}),[s]),m=Object(l.useMemo)((function(){return s.filter((function(e){return!e.category}))}),[s]),v=Object(l.useMemo)((function(){return Object(d.flow)((function(e){return e.filter((function(e){return e.category&&"reusable"!==e.category}))}),(function(e){return Object(d.groupBy)(e,"category")}))(s)}),[s]),O=Object(l.useMemo)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ou(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b);return Object.keys(b).forEach((function(t){e[t]=s.filter((function(e){return function(e){return e.name.split("/")[0]}(e)===t})),0===e[t].length&&delete e[t]})),e}),[s,b]);return Object(l.useEffect)((function(){return function(){return r(null)}}),[]),Object(l.createElement)(vu,null,Object(l.createElement)("div",null,o&&!!p.length&&Object(l.createElement)(mu,{title:Object(k._x)("Most used","blocks")},Object(l.createElement)(pu,{items:p,onSelect:f,onHover:r,label:Object(k._x)("Most used","blocks")})),Object(d.map)(u,(function(e){var t=v[e.slug];return t&&t.length?Object(l.createElement)(mu,{key:e.slug,title:e.title,icon:e.icon},Object(l.createElement)(pu,{items:t,onSelect:f,onHover:r,label:e.title})):null})),m.length>0&&Object(l.createElement)(mu,{className:"block-editor-inserter__uncategorized-blocks-panel",title:Object(k.__)("Uncategorized")},Object(l.createElement)(pu,{items:m,onSelect:f,onHover:r,label:Object(k.__)("Uncategorized")})),Object(d.map)(b,(function(e,t){var n=O[t];return n&&n.length?Object(l.createElement)(mu,{key:t,title:e.title,icon:e.icon},Object(l.createElement)(pu,{items:n,onSelect:f,onHover:r,label:e.title})):null}))))},hu=function(e){var t,n=e.selectedCategory,r=e.patternCategories,o=e.onClickCategory,c=e.children;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:u()("block-editor-inserter__panel-header","block-editor-inserter__panel-header-patterns")},Object(l.createElement)(m.SelectControl,{className:"block-editor-inserter__panel-dropdown",label:Object(k.__)("Filter patterns"),hideLabelFromVision:!0,value:n.name,onChange:function(e){o(r.find((function(t){return e===t.name})))},onBlur:function(e){null!=e&&e.relatedTarget||e.stopPropagation()},options:(t=[],r.map((function(e){return t.push({value:e.name,label:e.label})})),t)})),Object(l.createElement)("div",{className:"block-editor-inserter__panel-content"},c))},ju=n(45),yu=function(e,t){var n=Object(v.useSelect)((function(e){var n=e(yr),r=n.__experimentalGetAllowedPatterns,o=n.getSettings;return{patterns:r(t),patternCategories:o().__experimentalBlockPatternCategories}}),[t]),r=n.patternCategories,o=n.patterns,c=Object(v.useDispatch)(ju.store).createSuccessNotice;return[o,r,Object(l.useCallback)((function(t,n){e(Object(d.map)(n,(function(e){return Object(p.cloneBlock)(e)})),t.name),c(Object(k.sprintf)(
32
  /* translators: %s: block pattern title. */
33
+ Object(k.__)('Block pattern "%s" inserted.'),t.title),{type:"snackbar"})}),[])]};function ku(e){var t=e.isDraggable,n=e.pattern,r=e.onClick,o=e.composite,c=n.name,a=n.viewportWidth,s=Object(v.useSelect)((function(e){return e(yr).__experimentalGetParsedPattern(c)}),[c]).blocks,u=Object(b.useInstanceId)(ku),d="block-editor-block-patterns-list__item-description-".concat(u);return Object(l.createElement)(su,{isEnabled:t,blocks:s},(function(e){var t=e.draggable,c=e.onDragStart,u=e.onDragEnd;return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__list-item","aria-label":n.title,"aria-describedby":n.description?d:void 0,draggable:t,onDragStart:c,onDragEnd:u},Object(l.createElement)(m.__unstableCompositeItem,Object(i.a)({role:"option",as:"div"},o,{className:"block-editor-block-patterns-list__item",onClick:function(){return r(n,s)}}),Object(l.createElement)(Js,{blocks:s,viewportWidth:a}),Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item-title"},n.title),!!n.description&&Object(l.createElement)(m.VisuallyHidden,{id:d},n.description)))}))}function _u(){return Object(l.createElement)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var Eu=function(e){var t=e.isDraggable,n=e.blockPatterns,r=e.shownPatterns,o=e.onClickPattern,c=e.orientation,a=e.label,s=void 0===a?Object(k.__)("Block Patterns"):a,u=Object(m.__unstableUseCompositeState)({orientation:c});return Object(l.createElement)(m.__unstableComposite,Object(i.a)({},u,{role:"listbox",className:"block-editor-block-patterns-list","aria-label":s}),n.map((function(e){return r.includes(e)?Object(l.createElement)(ku,{key:e.name,pattern:e,onClick:o,isDraggable:t,composite:u}):Object(l.createElement)(_u,{key:e.name})})))};function wu(e){var t=e.rootClientId,n=e.onInsert,r=e.selectedCategory,o=e.onClickCategory,c=yu(n,t),i=Object(Co.a)(c,3),a=i[0],s=i[1],u=i[2],f=Object(l.useMemo)((function(){return s.filter((function(e){return a.some((function(t){var n;return null===(n=t.categories)||void 0===n?void 0:n.includes(e.name)}))}))}),[a,s]),p=r||f[0];Object(l.useEffect)((function(){a.some((function(e){return m(e)===1/0}))&&!f.find((function(e){return"uncategorized"===e.name}))&&f.push({name:"uncategorized",label:Object(k._x)("Uncategorized")})}),[f,a]);var m=Object(l.useCallback)((function(e){if(!e.categories||!e.categories.length)return 1/0;var t=Object(d.fromPairs)(f.map((function(e,t){return[e.name,t]})));return Math.min.apply(Math,Object(y.a)(e.categories.map((function(e){return void 0!==t[e]?t[e]:1/0}))))}),[f]),v=Object(l.useMemo)((function(){return a.filter((function(e){return"uncategorized"===p.name?m(e)===1/0:e.categories&&e.categories.includes(p.name)}))}),[a,p]),O=Object(l.useMemo)((function(){return v.sort((function(e,t){return m(e)-m(t)}))}),[v,m]),g=Object(b.useAsyncList)(O);return Object(l.createElement)(l.Fragment,null,!!v.length&&Object(l.createElement)(hu,{selectedCategory:p,patternCategories:f,onClickCategory:o},Object(l.createElement)(Eu,{shownPatterns:g,blockPatterns:v,onClickPattern:u,label:p.label,orientation:"vertical",isDraggable:!0})))}var Cu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onClickCategory,o=e.selectedCategory;return Object(l.createElement)(wu,{rootClientId:t,selectedCategory:o,onInsert:n,onClickCategory:r})},Su=n(31),Bu=function(){return Object(l.createElement)("div",{className:"block-editor-inserter__no-results"},Object(l.createElement)(ra.a,{className:"block-editor-inserter__no-results-icon",icon:gl.a}),Object(l.createElement)("p",null,Object(k.__)("No results found.")))};function Iu(e){var t=e.onHover,n=e.onInsert,r=e.rootClientId,o=Ol(r,n),c=Object(Co.a)(o,4),i=c[0],a=c[3],s=Object(l.useMemo)((function(){return i.filter((function(e){return"reusable"===e.category}))}),[i]);return 0===s.length?Object(l.createElement)(Bu,null):Object(l.createElement)(mu,{title:Object(k.__)("Reusable blocks")},Object(l.createElement)(pu,{items:s,onSelect:a,onHover:t,label:Object(k.__)("Reusable blocks")}))}var xu=function(e){var t=e.rootClientId,n=e.onInsert,r=e.onHover;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Iu,{onHover:r,onInsert:n,rootClientId:t}),Object(l.createElement)("div",{className:"block-editor-inserter__manage-reusable-blocks-container"},Object(l.createElement)("a",{className:"block-editor-inserter__manage-reusable-blocks",href:Object(Su.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(k.__)("Manage Reusable blocks"))))},Pu=Object(m.createSlotFill)("__experimentalInserterMenuExtension"),Tu=Pu.Fill,Nu=Pu.Slot;Tu.Slot=Nu;var Du=Tu,Au=function(e){var t=e.rootClientId,n=e.insertionIndex,r=e.clientId,o=e.isAppender,c=e.onSelect,i=e.shouldFocusBlock,a=void 0===i||i,s=Object(v.useSelect)(yr).getSelectedBlock,u=Object(v.useSelect)((function(e){var c,i,a=e(yr),l=a.getBlockIndex,s=a.getBlockOrder,u=a.getBlockInsertionPoint;if(t||n||r||o)c=t,i=n||(r?l(r,c):s(c).length);else{var d=u();c=d.rootClientId,i=d.index}return{destinationRootClientId:c,destinationIndex:i}}),[t,n,r,o]),b=u.destinationRootClientId,f=u.destinationIndex,m=Object(v.useDispatch)(yr),O=m.replaceBlocks,g=m.insertBlocks,h=m.showInsertionPoint,j=m.hideInsertionPoint,y=Object(l.useCallback)((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=s();!o&&r&&Object(p.isUnmodifiedDefaultBlock)(r)?O(r.clientId,e,null,a||n?0:null,t):g(e,f,b,!0,a||n?0:null,t);var i=Object(k.sprintf)(// translators: %d: the name of the block that has been added
34
+ Object(k._n)("%d block added.","%d blocks added.",Object(d.castArray)(e).length),Object(d.castArray)(e).length);Object(Rt.speak)(i),c&&c()}),[o,s,O,g,b,f,c,a]),_=Object(l.useCallback)((function(e){e?h(b,f):j()}),[h,j,b,f]);return[b,y,_]},Lu=function(e){var t=e.filterValue,n=e.onSelect,r=e.onHover,o=e.rootClientId,c=e.clientId,i=e.isAppender,a=e.maxBlockPatterns,s=e.maxBlockTypes,u=e.showBlockDirectory,f=void 0!==u&&u,p=e.isDraggable,v=void 0===p||p,O=e.shouldFocusBlock,g=void 0===O||O,h=Object(b.useDebounce)(Rt.speak,500),j=Au({onSelect:n,rootClientId:o,clientId:c,isAppender:i,shouldFocusBlock:g}),y=Object(Co.a)(j,2),_=y[0],E=y[1],w=Ol(_,E),C=Object(Co.a)(w,4),S=C[0],B=C[1],I=C[2],x=C[3],P=yu(E,_),T=Object(Co.a)(P,3),N=T[0],D=T[2],A=Object(l.useMemo)((function(){var e=pl(Object(d.orderBy)(S,["frecency"],["desc"]),B,I,t);return void 0!==s?e.slice(0,s):e}),[t,S,B,I,s]),L=Object(l.useMemo)((function(){var e=ml(N,t);return void 0!==a?e.slice(0,a):e}),[t,N,a]);Object(l.useEffect)((function(){if(t){var e=A.length+L.length,n=Object(k.sprintf)(
35
  /* translators: %d: number of results. */
36
  Object(k._n)("%d result found.","%d results found.",e),e);h(n)}}),[t,h]);var R=Object(b.useAsyncList)(L),M=!Object(d.isEmpty)(A)||!Object(d.isEmpty)(L);return Object(l.createElement)(vu,null,!f&&!M&&Object(l.createElement)(Bu,null),!!A.length&&Object(l.createElement)(mu,{title:Object(l.createElement)(m.VisuallyHidden,null,Object(k.__)("Blocks"))},Object(l.createElement)(pu,{items:A,onSelect:x,onHover:r,label:Object(k.__)("Blocks"),isDraggable:v})),!!A.length&&!!L.length&&Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),!!L.length&&Object(l.createElement)(mu,{title:Object(l.createElement)(m.VisuallyHidden,null,Object(k.__)("Block Patterns"))},Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-patterns"},Object(l.createElement)(Eu,{shownPatterns:R,blockPatterns:L,onClickPattern:D,isDraggable:v}))),f&&Object(l.createElement)(Du.Slot,{fillProps:{onSelect:x,onHover:r,filterValue:t,hasItems:M,rootClientId:_}},(function(e){return e.length?e:M?null:Object(l.createElement)(Bu,null)})))},Ru={name:"blocks",
37
  /* translators: Blocks tab title in the block inserter. */
42
  title:Object(k.__)("Reusable")},Vu=function(e){var t=e.children,n=e.showPatterns,r=void 0!==n&&n,o=e.showReusableBlocks,c=void 0!==o&&o,i=e.onSelect,a=Object(l.useMemo)((function(){var e=[Ru];return r&&e.push(Mu),c&&e.push(Fu),e}),[Ru,r,Mu,c,Fu]);return Object(l.createElement)(m.TabPanel,{className:"block-editor-inserter__tabs",tabs:a,onSelect:i},t)},Hu=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.__experimentalInsertionIndex,c=e.onSelect,i=e.showInserterHelpPanel,a=e.showMostUsedBlocks,s=e.shouldFocusBlock,u=void 0===s||s,d=Object(l.useState)(""),b=Object(Co.a)(d,2),f=b[0],p=b[1],O=Object(l.useState)(null),g=Object(Co.a)(O,2),h=g[0],j=g[1],y=Object(l.useState)(null),_=Object(Co.a)(y,2),E=_[0],w=_[1],C=Au({rootClientId:t,clientId:n,isAppender:r,insertionIndex:o,shouldFocusBlock:u}),S=Object(Co.a)(C,3),B=S[0],I=S[1],x=S[2],P=Object(v.useSelect)((function(e){var t,n=e(yr),r=n.__experimentalGetAllowedPatterns,o=n.getSettings;return{showPatterns:!B||!!r(B).length,hasReusableBlocks:!(null===(t=o().__experimentalReusableBlocks)||void 0===t||!t.length)}}),[B]),T=P.showPatterns,N=P.hasReusableBlocks,D=Object(l.useCallback)((function(e,t,n){I(e,t,n),c()}),[I,c]),A=Object(l.useCallback)((function(e,t){I(e,{patternName:t}),c()}),[I,c]),L=Object(l.useCallback)((function(e){x(!!e),j(e)}),[x,j]),R=Object(l.useCallback)((function(e){w(e)}),[w]),M=Object(l.useMemo)((function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-inserter__block-list"},Object(l.createElement)(gu,{rootClientId:B,onInsert:D,onHover:L,showMostUsedBlocks:a})),i&&Object(l.createElement)("div",{className:"block-editor-inserter__tips"},Object(l.createElement)(m.VisuallyHidden,{as:"h2"},Object(k.__)("A tip for using the block editor")),Object(l.createElement)(zs,null)))}),[B,D,L,f,a,i]),F=Object(l.useMemo)((function(){return Object(l.createElement)(Cu,{rootClientId:B,onInsert:A,onClickCategory:R,selectedCategory:E})}),[B,A,R,E]),V=Object(l.useMemo)((function(){return Object(l.createElement)(xu,{rootClientId:B,onInsert:D,onHover:L})}),[B,D,L]),H=Object(l.useCallback)((function(e){return"blocks"===e.name?M:"patterns"===e.name?F:V}),[M,F,V]);return Object(l.createElement)("div",{className:"block-editor-inserter__menu"},Object(l.createElement)("div",{className:"block-editor-inserter__main-area"},Object(l.createElement)("div",{className:"block-editor-inserter__content"},Object(l.createElement)(Ws,{onChange:function(e){h&&j(null),p(e)},value:f,label:Object(k.__)("Search for blocks and patterns"),placeholder:Object(k.__)("Search")}),!!f&&Object(l.createElement)(Lu,{filterValue:f,onSelect:c,onHover:L,rootClientId:t,clientId:n,isAppender:r,showBlockDirectory:!0,shouldFocusBlock:u}),!f&&(T||N)&&Object(l.createElement)(Vu,{showPatterns:T,showReusableBlocks:N},H),!f&&!T&&!N&&M)),i&&h&&Object(l.createElement)(nu,{item:h}))};function zu(e){var t=e.onSelect,n=e.rootClientId,r=e.clientId,o=e.isAppender,c=Object(l.useState)(""),i=Object(Co.a)(c,2),a=i[0],s=i[1],d=Au({onSelect:t,rootClientId:n,clientId:r,isAppender:o}),b=Object(Co.a)(d,2),f=b[0],p=b[1],O=Ol(f,p),g=Object(Co.a)(O,1)[0],h=yu(p,f),j=Object(Co.a)(h,1)[0],y=j.length&&!!a,_=y&&j.length>6||g.length>6,E=Object(v.useSelect)((function(e){var t=e(yr),o=t.getSettings,c=t.getBlockIndex;return{setInserterIsOpened:o().__experimentalSetIsInserterOpened,blockIndex:c(r,n)}}),[r,n]),w=E.setInserterIsOpened,C=E.blockIndex;Object(l.useEffect)((function(){w&&w(!1)}),[w]);var S=Object(v.useDispatch)(yr).__unstableSetInsertionPoint;return Object(l.createElement)("div",{className:u()("block-editor-inserter__quick-inserter",{"has-search":_,"has-expand":w})},_&&Object(l.createElement)(Ws,{value:a,onChange:function(e){s(e)},label:Object(k.__)("Search for blocks and patterns"),placeholder:Object(k.__)("Search")}),Object(l.createElement)("div",{className:"block-editor-inserter__quick-inserter-results"},Object(l.createElement)(Lu,{filterValue:a,onSelect:t,rootClientId:n,clientId:r,isAppender:o,maxBlockPatterns:y?2:0,maxBlockTypes:6,isDraggable:!1})),w&&Object(l.createElement)(m.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){S(n,C),w(!0)},"aria-label":Object(k.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(k.__)("Browse all")))}var Gu=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,a=e.hasSingleBlockType,s=e.toggleProps,u=void 0===s?{}:s;t=a?Object(k.sprintf)(// translators: %s: the name of the block when there is only one
43
  Object(k._x)("Add %s","directly add the only allowed block"),c):Object(k._x)("Add block","Generic label for block inserter button");var d=u.onClick,b=Object(j.a)(u,["onClick"]);return Object(l.createElement)(m.Button,Object(i.a)({icon:Vs.a,label:t,tooltipPosition:"bottom",onClick:function(e){n&&n(e),d&&d(e)},className:"block-editor-inserter__toggle","aria-haspopup":!a&&"true","aria-expanded":!a&&o,disabled:r},b))},Uu=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(){var e;return Object(pa.a)(this,o),(e=r.apply(this,arguments)).onToggle=e.onToggle.bind(Object(va.a)(e)),e.renderToggle=e.renderToggle.bind(Object(va.a)(e)),e.renderContent=e.renderContent.bind(Object(va.a)(e)),e}return Object(ma.a)(o,[{key:"onToggle",value:function(e){var t=this.props.onToggle;t&&t(e)}},{key:"renderToggle",value:function(e){var t=e.onToggle,n=e.isOpen,r=this.props,o=r.disabled,c=r.blockTitle,i=r.hasSingleBlockType,a=r.toggleProps,l=r.hasItems,s=r.renderToggle;return(void 0===s?Gu:s)({onToggle:t,isOpen:n,disabled:o||!l,blockTitle:c,hasSingleBlockType:i,toggleProps:a})}},{key:"renderContent",value:function(e){var t=e.onClose,n=this.props,r=n.rootClientId,o=n.clientId,c=n.isAppender,i=n.showInserterHelpPanel;return n.__experimentalIsQuick?Object(l.createElement)(zu,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c}):Object(l.createElement)(Hu,{onSelect:function(){t()},rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick,c=e.onSelectOrClose;return n?this.renderToggle({onToggle:r}):Object(l.createElement)(m.Dropdown,{className:"block-editor-inserter",contentClassName:u()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(k.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:c})}}]),o}(l.Component),Wu=Object(b.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e(yr),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=e(p.store).getBlockVariations,s=a(r=r||c(n)||void 0),u=1===Object(d.size)(s)&&0===Object(d.size)(l(s[0].name,"inserter")),b=!1;return u&&(b=s[0]),{hasItems:i(r),hasSingleBlockType:u,blockTitle:b?b.title:"",allowedBlockType:b,rootClientId:r}})),Object(v.withDispatch)((function(e,t,n){var r=n.select;return{insertOnlyAllowedBlock:function(){var n=t.rootClientId,o=t.clientId,c=t.isAppender,i=t.hasSingleBlockType,a=t.allowedBlockType,l=t.onSelectOrClose;if(i){(0,e(yr).insertBlock)(Object(p.createBlock)(a.name),function(){var e=r(yr),t=e.getBlockIndex,i=e.getBlockSelectionEnd,a=e.getBlockOrder,l=e.getBlockRootClientId;if(o)return t(o,n);var s=i();return!c&&s&&l(s)===n?t(s,n)+1:a(n).length}(),n),l&&l();var s=Object(k.sprintf)(// translators: %s: the name of the block that has been added
44
  Object(k.__)("%s block added"),a.title);Object(Rt.speak)(s)}}}})),Object(b.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Uu),Ku=Object(b.compose)(Object(v.withSelect)((function(e,t){var n=e(yr),r=n.getBlockCount,o=n.getBlockName,c=n.isBlockValid,i=n.getSettings,a=n.getTemplateLock,l=!r(t.rootClientId),s=o(t.lastBlockClientId)===Object(p.getDefaultBlockName)(),u=c(t.lastBlockClientId),d=i().bodyPlaceholder;return{isVisible:l||!s||!u,showPrompt:l,isLocked:!!a(t.rootClientId),placeholder:d}})),Object(v.withDispatch)((function(e,t){var n=e(yr),r=n.insertDefaultBlock,o=n.startTyping;return{onAppend:function(){var e=t.rootClientId;r(void 0,e),o()}}})))((function(e){var t=e.isLocked,n=e.isVisible,r=e.onAppend,o=e.showPrompt,c=e.placeholder,i=e.rootClientId;if(t||!n)return null;var a=Object(Fs.decodeEntities)(c)||Object(k.__)("Type / to choose a block");return Object(l.createElement)("div",{"data-root-client-id":i||"",className:"wp-block block-editor-default-block-appender"},Object(l.createElement)(hs.a,{role:"button","aria-label":Object(k.__)("Add block"),className:"block-editor-default-block-appender__content",readOnly:!0,onFocus:r,value:o?a:""}),Object(l.createElement)(Wu,{rootClientId:i,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0}))})),qu=Object(l.forwardRef)((function(e,t){var n=e.rootClientId,r=e.className,o=e.onFocus,c=e.tabIndex;return Object(l.createElement)(Wu,{position:"bottom center",rootClientId:n,__experimentalIsQuick:!0,renderToggle:function(e){var n,i=e.onToggle,a=e.disabled,s=e.isOpen,d=e.blockTitle,b=e.hasSingleBlockType;n=b?Object(k.sprintf)(// translators: %s: the name of the block when there is only one
45
+ Object(k._x)("Add %s","directly add the only allowed block"),d):Object(k._x)("Add block","Generic label for block inserter button");var f=!b,p=Object(l.createElement)(m.Button,{ref:t,onFocus:o,tabIndex:c,className:u()(r,"block-editor-button-block-appender"),onClick:i,"aria-haspopup":f?"true":void 0,"aria-expanded":f?s:void 0,disabled:a,label:n},!b&&Object(l.createElement)(m.VisuallyHidden,{as:"span"},n),Object(l.createElement)(ra.a,{icon:Vs.a}));return(f||b)&&(p=Object(l.createElement)(m.Tooltip,{text:n},p)),p},isAppender:!0})}));function $u(e){e.stopPropagation()}Object(l.createContext)();var Yu=Object(v.withSelect)((function(e,t){var n=t.rootClientId,r=e(yr),o=r.getBlockOrder,c=r.canInsertBlockType,i=r.getTemplateLock,a=r.getSelectedBlockClientId;return{isLocked:!!i(n),blockClientIds:o(n),canInsertDefaultBlock:c(Object(p.getDefaultBlockName)(),n),selectedBlockClientId:a()}}))((function(e){var t,n=e.blockClientIds,r=e.rootClientId,o=e.canInsertDefaultBlock,c=e.isLocked,i=e.renderAppender,a=e.className,s=e.selectedBlockClientId,b=e.tagName,f=void 0===b?"div":b;if(c||!1===i)return null;if(i)t=Object(l.createElement)(i,null);else{var p=!r,m=s===r,v=s&&!n.includes(s);if(!p&&!m&&(!s||v))return null;t=o?Object(l.createElement)(Ku,{rootClientId:r,lastBlockClientId:Object(d.last)(n)}):Object(l.createElement)(qu,{rootClientId:r,className:"block-list-appender__toggle"})}return Object(l.createElement)(f,{tabIndex:-1,onFocus:$u,className:u()("block-list-appender","wp-block",a)},t)}));function Xu(e,t){var n=Object(v.useSelect)((function(e){return e(yr).getSettings().mediaUpload}),[]),r=Object(v.useSelect)(yr),o=r.canInsertBlockType,c=r.getBlockIndex,i=r.getClientIdsOfDescendants,a=Object(v.useDispatch)(yr),l=a.insertBlocks,s=a.moveBlocksToPosition,u=a.updateBlockAttributes,d=function(e,t,n,r,o,c,i){return function(a){var l=function(e){var t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}(a),s=l.srcRootClientId,u=l.srcClientIds,d=l.type,b=l.blocks;if("inserter"===d&&(i(),c(b,t,e,!0,null)),"block"===d){var f=n(u[0],s);if(s===e&&f===t)return;if(u.includes(e)||r(u).some((function(t){return t===e})))return;var p=s===e,m=u.length;o(u,s,e,p&&f<t?t-m:t)}}}(e,t,c,i,s,l,a.clearSelectedBlock),b=function(e,t,n,r,o,c){return function(i){if(n){var a=Object(p.findTransform)(Object(p.getBlockTransforms)("from"),(function(t){return"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)}));if(a){var l=a.transform(i,r);c(l,t,e)}}}}(e,t,n,u,o,l),f=function(e,t,n){return function(r){var o=Object(p.pasteHandler)({HTML:r,mode:"BLOCKS"});o.length&&n(o,t,e)}}(e,t,l);return function(e){var t=Object(Wl.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");t.length?b(t):n?f(n):d(e)}}function Qu(e,t,n){var r,o="top"===n||"bottom"===n,c=e.x,i=e.y,a=o?c:i,l=o?i:c,s=o?t.left:t.top,u=o?t.right:t.bottom,d=t[n];return r=a>=s&&a<=u?a:a<u?s:u,Math.sqrt(Math.pow(a-r,2)+Math.pow(l-d,2))}function Zu(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["top","bottom","left","right"];return o.forEach((function(o){var c=Qu(e,t,o);(void 0===n||c<n)&&(n=c,r=o)})),[n,r]}function Ju(e,t,n){var r,o,c="horizontal"===n?["left","right"]:["top","bottom"];return e.forEach((function(n,i){if(n.classList.contains("wp-block")){var a=n.getBoundingClientRect(),l=Zu(t,a,c),s=Object(Co.a)(l,2),u=s[0],d=s[1];if(void 0===o||u<o){var b="bottom"===d||"right"===d,f=b?1:0,p=b&&e[i+1]&&e[i+1].classList.contains("is-dragging");o=u,r=i+(f+=p?1:0)}}})),r}function ed(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.rootClientId,n=void 0===t?"":t,r=Object(l.useState)(null),o=Object(Co.a)(r,2),c=o[0],i=o[1],a=Object(v.useSelect)((function(e){var t,r=e(yr),o=r.getBlockListSettings;return{isLockedAll:"all"===(0,r.getTemplateLock)(n),orientation:null===(t=o(n))||void 0===t?void 0:t.orientation}}),[n]),s=a.isLockedAll,u=a.orientation,d=Object(v.useDispatch)("core/block-editor"),f=d.showInsertionPoint,p=d.hideInsertionPoint,m=Xu(n,c),O=Object(b.useThrottle)(Object(l.useCallback)((function(e,t){var r=Ju(Array.from(t.children),{x:e.clientX,y:e.clientY},u);i(void 0===r?0:r),null!==r&&f(n,r)}),[]),200);return Object(b.__experimentalUseDropZone)({isDisabled:s,onDrop:m,onDragOver:function(e){O(e,e.currentTarget)},onDragEnd:function(){O.cancel(),p(),i(null)}})}function td(e){var t=e.clientId,n=e.rootClientId,r=e.setIsInserterForced;return Object(l.createElement)("div",{className:u()("block-editor-block-list__insertion-point-inserter")},Object(l.createElement)(Wu,{position:"bottom center",clientId:t,rootClientId:n,__experimentalIsQuick:!0,onToggle:r,onSelectOrClose:function(){return r(!1)}}))}function nd(e){var t=e.clientId,n=e.selectedRootClientId,r=e.isInserterShown,o=e.isInserterForced,c=e.setIsInserterForced,i=e.containerRef,a=e.showInsertionPoint,s=Object(v.useDispatch)(yr).selectBlock,d=Object(l.useRef)(),b=Object(v.useSelect)((function(e){var r,o=e(yr),c=o.getBlockOrder,a=o.getBlockRootClientId,l=o.getBlockListSettings,s=o.getMultiSelectedBlockClientIds,u=o.getSelectedBlockClientId,d=o.hasMultiSelection,b=o.getSettings,f=i.current.ownerDocument,p=t?a(t):n,m=c(p);if(!m.length)return{};var v=t||m[m.length-1],O=v===m[m.length-1]?null:m[m.indexOf(v)+1],g=b().hasReducedUI,h=s(),j=u(),y=(null===(r=l(p))||void 0===r?void 0:r.orientation)||"vertical";return{previousElement:Sc(v,f),nextElement:Sc(O,f),nextClientId:O,isHidden:g||(d()?O&&h.includes(O):O&&"vertical"===y&&O===j),orientation:y,rootClientId:p}}),[t,n]),f=b.previousElement,p=b.nextElement,O=b.orientation,g=b.isHidden,h=b.nextClientId,j=b.rootClientId,y=Object(l.useMemo)((function(){if(!f)return{};var e=f.getBoundingClientRect(),t=p?p.getBoundingClientRect():null;if("vertical"===O)return{width:f.offsetWidth,height:t?t.top-e.bottom:0};var n=0;return p&&(n=Object(k.isRTL)()?e.left-t.right:t.left-e.right),{width:n,height:f.offsetHeight}}),[f,p]),_=Object(l.useCallback)((function(){var e=f.getBoundingClientRect(),t=p?p.getBoundingClientRect():null;return"vertical"===O?Object(k.isRTL)()?{top:e.bottom,left:e.right,right:e.left,bottom:t?t.top:e.bottom}:{top:e.bottom,left:e.left,right:e.right,bottom:t?t.top:e.bottom}:Object(k.isRTL)()?{top:e.top,left:t?t.right:e.left,right:e.left,bottom:e.bottom}:{top:e.top,left:e.right,right:t?t.left:e.right,bottom:e.bottom}}),[f,p]);if(!f)return null;var E=u()("block-editor-block-list__insertion-point","is-"+O),w=!g&&p&&(r||o),C=w||!g&&a;return Object(l.createElement)(m.Popover,{noArrow:!0,animate:!1,getAnchorRect:_,focusOnMount:!1,className:"block-editor-block-list__insertion-point-popover",__unstableSlotName:"block-toolbar"},Object(l.createElement)("div",{ref:d,tabIndex:-1,onClick:function(e){e.target===d.current&&h&&s(h,-1)},onFocus:function(e){e.target!==d.current&&c(!0)},className:u()(E,{"is-with-inserter":w}),style:y},C&&Object(l.createElement)("div",{className:"block-editor-block-list__insertion-point-indicator"}),w&&Object(l.createElement)(td,{rootClientId:j,clientId:h,setIsInserterForced:c})))}var rd=function(e){var t,n,r,o,c=e.children,i=e.clientIds,a=e.cloneClassname,s=e.onDragStart,u=e.onDragEnd,d=e.elementId,b=Object(v.useSelect)((function(e){var t,n=e(yr),r=n.getBlockRootClientId,o=n.getTemplateLock,c=n.getBlockName,a=r(i[0]),l=a?o(a):null,s=c(i[0]);return{srcRootClientId:a,isDraggable:"all"!==l,icon:null===(t=Object(p.getBlockType)(s))||void 0===t?void 0:t.icon}}),[i]),f=b.srcRootClientId,O=b.isDraggable,g=b.icon,h=Object(l.useRef)(!1),j=(t=Object(l.useRef)(null),n=Object(l.useRef)(null),r=Object(l.useRef)(null),o=Object(l.useRef)(null),Object(l.useEffect)((function(){return function(){o.current&&(clearInterval(o.current),o.current=null)}}),[]),[Object(l.useCallback)((function(e){t.current=e.clientY,r.current=Object(Wl.getScrollContainer)(e.target),o.current=setInterval((function(){if(r.current&&n.current){var e=r.current.scrollTop+n.current;r.current.scroll({top:e})}}),25)}),[]),Object(l.useCallback)((function(e){if(r.current){var o=r.current.offsetHeight,c=t.current-r.current.offsetTop,i=e.clientY-r.current.offsetTop;if(e.clientY>c){var a=Math.max(o-c-50,0),l=Math.max(i-c-50,0)/a;n.current=25*l}else if(e.clientY<c){var s=Math.max(c-50,0),u=Math.max(c-i-50,0)/s;n.current=-25*u}else n.current=0}}),[]),function(){t.current=null,r.current=null,o.current&&(clearInterval(o.current),o.current=null)}]),y=Object(Co.a)(j,3),k=y[0],_=y[1],E=y[2],w=Object(v.useDispatch)(yr),C=w.startDraggingBlocks,S=w.stopDraggingBlocks;if(Object(l.useEffect)((function(){return function(){h.current&&S()}}),[]),!O)return c({isDraggable:!1});var B={type:"block",srcClientIds:i,srcRootClientId:f};return Object(l.createElement)(m.Draggable,{cloneClassname:a,elementId:d,__experimentalTransferDataType:"wp-blocks",transferData:B,onDragStart:function(e){C(i),h.current=!0,k(e),s&&s()},onDragOver:_,onDragEnd:function(){S(),h.current=!1,E(),u&&u()},__experimentalDragComponent:Object(l.createElement)(lu,{count:i.length,icon:g})},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return c({draggable:!0,onDragStart:t,onDragEnd:n})}))},od=function(e){var t=e.clientId,n=e.rootClientId,r=e.blockElement,o=Cl(t),c=Object(v.useSelect)((function(e){var r,o=e(yr),c=o.__unstableGetBlockWithoutInnerBlocks,i=o.getBlockIndex,a=o.hasBlockMovingClientId,l=o.getBlockListSettings,s=i(t,n),u=c(t);return{index:s,name:u.name,attributes:u.attributes,blockMovingMode:a(),orientation:null===(r=l(n))||void 0===r?void 0:r.orientation}}),[t,n]),a=c.index,s=c.name,d=c.attributes,b=c.blockMovingMode,f=c.orientation,O=Object(v.useDispatch)(yr),g=O.setNavigationMode,h=O.removeBlock,j=Object(l.useRef)();Object(l.useEffect)((function(){j.current.focus(),window.navigator.platform.indexOf("Win")>-1&&Object(Rt.speak)(R)}),[]);var y=Object(v.useSelect)(yr),_=y.hasBlockMovingClientId,E=y.getBlockIndex,w=y.getBlockRootClientId,C=y.getClientIdsOfDescendants,S=y.getSelectedBlockClientId,B=y.getMultiSelectedBlocksEndClientId,I=y.getPreviousBlockClientId,x=y.getNextBlockClientId,P=Object(v.useDispatch)(yr),T=P.selectBlock,N=P.clearSelectedBlock,D=P.setBlockMovingClientId,A=P.moveBlockToPosition,L=Object(p.getBlockType)(s),R=Object(p.__experimentalGetAccessibleBlockLabel)(L,d,a+1,f),M=u()("block-editor-block-list__block-selection-button",{"is-block-moving-mode":!!b}),F=Object(k.__)("Drag");return Object(l.createElement)("div",{className:M},Object(l.createElement)(m.Flex,{justify:"center",className:"block-editor-block-list__block-selection-button__content"},Object(l.createElement)(m.FlexItem,null,Object(l.createElement)(hl,{icon:null==o?void 0:o.icon,showColors:!0})),Object(l.createElement)(m.FlexItem,null,Object(l.createElement)(rd,{clientIds:[t]},(function(e){return Object(l.createElement)(m.Button,Object(i.a)({icon:au,className:"block-selection-button_drag-handle","aria-hidden":"true",label:F,tabIndex:"-1"},e))}))),Object(l.createElement)(m.FlexItem,null,Object(l.createElement)(m.Button,{ref:j,onClick:function(){return g(!1)},onKeyDown:function(e){var n=e.keyCode,o=n===li.UP,c=n===li.DOWN,i=n===li.LEFT,a=n===li.RIGHT,l=n===li.TAB,s=n===li.ESCAPE,u=n===li.ENTER,d=n===li.SPACE,b=e.shiftKey;if(n===li.BACKSPACE||n===li.DELETE)return h(t),void e.preventDefault();var f,p=S(),m=B(),v=I(m||p),O=x(m||p),g=l&&b||o,j=l&&!b||c,y=i,k=a;if(g)f=v;else if(j)f=O;else if(y){var P;f=null!==(P=w(p))&&void 0!==P?P:p}else if(k){var L;f=null!==(L=C([p])[0])&&void 0!==L?L:p}var R=_();if(s&&R&&D(null),(u||d)&&R){var M=w(R),F=w(p),V=E(R,M),H=E(p,F);V<H&&M===F&&(H-=1),A(R,M,F,H),T(R),D(null)}if(j||g||y||k)if(f)e.preventDefault(),T(f);else if(l&&p){var z;j?(z=Wl.focus.tabbable.findNext(r))||(z=r.ownerDocument.defaultView.frameElement,z=Wl.focus.tabbable.findNext(z)):z=Wl.focus.tabbable.findPrevious(r),z&&(e.preventDefault(),z.focus(),N())}},label:R,className:"block-selection-button_select-button"},Object(l.createElement)(Sl,{clientId:t})))))};function cd(e){return Array.from(e.querySelectorAll("[data-toolbar-item]"))}var id=function(e){var t=e.children,n=e.focusOnMount,r=e.__experimentalInitialIndex,o=e.__experimentalOnIndexChange,c=Object(j.a)(e,["children","focusOnMount","__experimentalInitialIndex","__experimentalOnIndexChange"]),a=Object(l.useRef)(),s=function(e){var t=Object(l.useState)(!0),n=Object(Co.a)(t,2),r=n[0],o=n[1],c=Object(l.useCallback)((function(){var t=!Wl.focus.tabbable.find(e.current).some((function(e){return!("toolbarItem"in e.dataset)}));t||Ft()("Using custom components as toolbar controls",{since:"5.6",alternative:"ToolbarItem or ToolbarButton components",link:"https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols"}),o(t)}),[]);return Object(l.useLayoutEffect)((function(){var t=new window.MutationObserver(c);return t.observe(e.current,{childList:!0,subtree:!0}),function(){return t.disconnect()}}),[r]),r}(a);return function(e,t,n,r,o){var c=Object(l.useState)(t),i=Object(Co.a)(c,1)[0],a=Object(l.useState)(r),s=Object(Co.a)(a,1)[0],u=Object(l.useCallback)((function(){var t,n,r;t=e.current,n=Wl.focus.tabbable.find(t),(r=Object(Co.a)(n,1)[0])&&r.focus()}),[]);Object(Vl.useShortcut)("core/block-editor/focus-toolbar",u,{bindGlobal:!0,eventName:"keydown"}),Object(l.useEffect)((function(){i&&u()}),[n,i,u]),Object(l.useEffect)((function(){var t=0;return s&&!i&&(t=window.requestAnimationFrame((function(){var t,n=cd(e.current),r=s||0;n[r]&&(t=e.current).contains(t.ownerDocument.activeElement)&&n[r].focus()}))),function(){if(window.cancelAnimationFrame(t),o){var n=cd(e.current).findIndex((function(e){return 0===e.tabIndex}));o(n)}}}),[s,i])}(a,n,s,r,o),s?Object(l.createElement)(m.Toolbar,Object(i.a)({label:c["aria-label"],ref:a},c),t):Object(l.createElement)(m.NavigableMenu,Object(i.a)({orientation:"horizontal",role:"toolbar",ref:a},c),t)},ad=Object(v.withSelect)((function(e,t){var n,r=t.clientIds,o=e(yr),c=o.getBlock,i=o.getBlockIndex,a=o.getBlockListSettings,l=o.getTemplateLock,s=o.getBlockOrder,u=o.getBlockRootClientId,b=Object(d.castArray)(r),f=Object(d.first)(b),m=c(f),v=u(Object(d.first)(b)),O=i(f,v),g=0===O,h=i(Object(d.last)(b),v)===s(v).length-1;return{blockType:m?Object(p.getBlockType)(m.name):null,isLocked:"all"===l(v),rootClientId:v,firstIndex:O,isFirst:g,isLast:h,orientation:null===(n=a(v))||void 0===n?void 0:n.orientation}}))((function(e){var t=e.isFirst,n=e.isLast,r=e.clientIds,o=e.isLocked,c=e.isHidden,a=e.rootClientId,s=e.orientation,d=e.hideDragHandle,b=Object(l.useState)(!1),f=Object(Co.a)(b,2),p=f[0],v=f[1],O=function(){return v(!0)},g=function(){return v(!1)};if(o||t&&n&&!a)return null;var h=Object(k.__)("Drag");return Object(l.createElement)("div",{className:u()("block-editor-block-mover",{"is-visible":p||!c,"is-horizontal":"horizontal"===s})},!d&&Object(l.createElement)(rd,{clientIds:r,cloneClassname:"block-editor-block-mover__drag-clone"},(function(e){return Object(l.createElement)(m.Button,Object(i.a)({icon:au,className:"block-editor-block-mover__drag-handle","aria-hidden":"true",label:h,tabIndex:"-1"},e))})),Object(l.createElement)(m.ToolbarGroup,{className:"block-editor-block-mover__move-button-container"},Object(l.createElement)(m.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(os,Object(i.a)({clientIds:r},e))})),Object(l.createElement)(m.ToolbarItem,{onFocus:O,onBlur:g},(function(e){return Object(l.createElement)(cs,Object(i.a)({clientIds:r},e))}))))})),ld=window,sd=ld.clearTimeout,ud=ld.setTimeout;function dd(e){var t=e.ref,n=e.isFocused,r=e.debounceTimeout,o=void 0===r?200:r,c=e.onChange,i=void 0===c?d.noop:c,a=Object(l.useState)(!1),s=Object(Co.a)(a,2),u=s[0],b=s[1],f=Object(l.useRef)(),p=function(e){null!=t&&t.current&&b(e),i(e)},m=function(){var e=f.current;e&&sd&&sd(e)};return Object(l.useEffect)((function(){return function(){return m()}}),[]),{showMovers:u,debouncedShowMovers:function(e){e&&e.stopPropagation(),m(),u||p(!0)},debouncedHideMovers:function(e){e&&e.stopPropagation(),m(),f.current=ud((function(){var e;e=(null==t?void 0:t.current)&&t.current.matches(":hover"),!n&&!e&&p(!1)}),o)}}}function bd(e){var t=e.ref,n=e.debounceTimeout,r=void 0===n?200:n,o=e.onChange,c=void 0===o?d.noop:o,i=Object(l.useState)(!1),a=Object(Co.a)(i,2),s=a[0],u=a[1],b=dd({ref:t,debounceTimeout:r,isFocused:s,onChange:c}),f=b.showMovers,p=b.debouncedShowMovers,m=b.debouncedHideMovers,v=Object(l.useRef)(!1),O=function(){return(null==t?void 0:t.current)&&t.current.contains(t.current.ownerDocument.activeElement)};return Object(l.useEffect)((function(){var e=t.current,n=function(){O()&&(u(!0),p())},r=function(){O()||(u(!1),m())};return e&&!v.current&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",r,!0),v.current=!0),function(){e&&(e.removeEventListener("focus",n),e.removeEventListener("blur",r))}}),[t,v,u,p,m]),{showMovers:f,gestures:{onMouseMove:p,onMouseLeave:m}}}function fd(){var e=Object(v.useDispatch)(yr),t=e.selectBlock,n=e.toggleBlockHighlight,r=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockName,r=t.getBlockParents,o=t.getSelectedBlockClientId,c=t.getSettings,i=e(p.store).hasBlockSupport,a=r(o()),l=a[a.length-1],s=n(l),u=Object(p.getBlockType)(s),d=c();return{firstParentClientId:l,shouldHide:!i(u,"__experimentalParentSelector",!0),hasReducedUI:d.hasReducedUI}}),[]),o=r.firstParentClientId,c=r.shouldHide,a=r.hasReducedUI,s=Cl(o),u=Object(l.useRef)(),d=bd({ref:u,onChange:function(e){e&&a||n(o,e)}}).gestures;return c||void 0===o?null:Object(l.createElement)("div",Object(i.a)({className:"block-editor-block-parent-selector",key:o,ref:u},d),Object(l.createElement)(m.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:function(){return t(o)},label:Object(k.sprintf)(
46
  /* translators: %s: Name of the block's parent. */
47
+ Object(k.__)("Select %s"),s.title),showTooltip:!0,icon:Object(l.createElement)(hl,{icon:s.icon})}))}var pd=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"}));function md(e){var t=e.blocks;return Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(l.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right",focusOnMount:!1},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(k.__)("Preview")),Object(l.createElement)(Js,{viewportWidth:500,blocks:t})))))}var vd=function(e){var t=e.className,n=e.possibleBlockTransformations,r=e.onSelect,o=e.blocks,c=Object(l.useState)(),i=Object(Co.a)(c,2),a=i[0],s=i[1];return Object(l.createElement)(m.MenuGroup,{label:Object(k.__)("Transform to"),className:t},a&&Object(l.createElement)(md,{blocks:Object(p.switchToBlockType)(o,a)}),n.map((function(e){var t=e.name,n=e.icon,o=e.title,c=e.isDisabled;return Object(l.createElement)(m.MenuItem,{key:t,className:Object(p.getBlockMenuDefaultClassName)(t),onClick:function(e){e.preventDefault(),r(t)},disabled:c,onMouseLeave:function(){return s(null)},onMouseEnter:function(){return s(t)}},Object(l.createElement)(hl,{icon:n,showColors:!0}),o)})))};function Od(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jd={};function yd(e){var t=e.genericPreviewBlock,n=e.style,r=e.isActive,o=e.onBlur,c=e.onHover,i=e.onSelect,a=e.styleClassName,s=e.itemRole,d=Object(l.useMemo)((function(){return hd(hd({},t),{},{attributes:hd(hd({},t.attributes),{},{className:a})})}),[t,a]);return Object(l.createElement)("div",{key:n.name,className:u()("block-editor-block-styles__item",{"is-active":r}),onClick:function(){return i()},onKeyDown:function(e){li.ENTER!==e.keyCode&&li.SPACE!==e.keyCode||(e.preventDefault(),i())},onMouseEnter:c,onMouseLeave:o,role:s||"button",tabIndex:"0","aria-label":n.label||n.name},Object(l.createElement)("div",{className:"block-editor-block-styles__item-preview"},Object(l.createElement)(Js,{viewportWidth:500,blocks:d})),Object(l.createElement)("div",{className:"block-editor-block-styles__item-label"},n.label||n.name))}var kd=function(e){var t=e.clientId,n=e.onSwitch,r=void 0===n?d.noop:n,o=e.onHoverClassName,c=void 0===o?d.noop:o,i=e.itemRole,a=Object(v.useSelect)((function(e){var n=(0,e(yr).getBlock)(t);return n?{block:n,type:Object(p.getBlockType)(n.name),styles:(0,e(p.store).getBlockStyles)(n.name),className:n.attributes.className||""}:jd}),[t]),s=a.styles,u=a.block,b=a.type,f=a.className,m=Object(v.useDispatch)(yr).updateBlockAttributes,O=function(e,t){return Object(l.useMemo)((function(){var n=null==t?void 0:t.example,r=null==t?void 0:t.name;return n&&r?Object(p.getBlockFromExample)(r,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?Object(p.cloneBlock)(e):void 0}),[null!=t&&t.example?null==e?void 0:e.name:e,t])}(u,b);if(!s||0===s.length)return null;var g=Object(d.find)(s,"isDefault")?s:[{name:"default",label:Object(k._x)("Default","block style"),isDefault:!0}].concat(Object(y.a)(s)),h=function(e,t){var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Od(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Od(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(new Ii.a(t).values());try{for(r.s();!(n=r.n()).done;){var o=n.value;if(-1!==o.indexOf("is-style-")){var c=o.substring(9),i=Object(d.find)(e,{name:c});if(i)return i}}}catch(e){r.e(e)}finally{r.f()}return Object(d.find)(e,"isDefault")}(g,f);return Object(l.createElement)("div",{className:"block-editor-block-styles"},g.map((function(e){var n=function(e,t,n){var r=new Ii.a(e);return t&&r.remove("is-style-"+t.name),r.add("is-style-"+n.name),r.value}(f,h,e);return Object(l.createElement)(yd,{genericPreviewBlock:O,className:f,isActive:h===e,key:e.name,onSelect:function(){m(t,{className:n}),c(null),r()},onBlur:function(){return c(null)},onHover:function(){return c(n)},style:e,styleClassName:n,itemRole:i})})))};function _d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ed(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_d(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wd(e){var t=e.hoveredBlock,n=e.onSwitch,r=t.name,o=t.clientId,c=Object(l.useState)(),i=Object(Co.a)(c,2),a=i[0],s=i[1],u=Object(v.useSelect)((function(e){return e(p.store).getBlockType(r)}),[r]);return Object(l.createElement)(m.MenuGroup,{label:Object(k.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup"},a&&Object(l.createElement)(md,{blocks:u.example?Object(p.getBlockFromExample)(u.name,{attributes:Ed(Ed({},u.example.attributes),{},{className:a}),innerBlocks:u.example.innerBlocks}):Object(p.cloneBlock)(t,{className:a})}),Object(l.createElement)(kd,{clientId:o,onSwitch:n,onHoverClassName:s,itemRole:"menuitem"}))}function Cd(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Sd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Sd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Bd=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,o=t.clientId,c=t.name,i=t.innerBlocks,a=void 0===i?[]:i;if(!r.has(o)){if(c===n)return t;var l,s=Cd(a);try{for(s.s();!(l=s.n()).done;){var u=l.value,d=e(u,n,r);if(d)return d}}catch(e){s.e(e)}finally{s.f()}}};function Id(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xd(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xd(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function xd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Td(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pd(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nd=function(e,t){var n,r,o,c=(n=t.name,r=t.attributes,null!=(o=Object(p.__experimentalGetBlockAttributesNamesByRole)(n,"content"))&&o.length?o.reduce((function(e,t){return r[t]&&(e[t]=r[t]),e}),{}):r);e.attributes=Td(Td({},e.attributes),c)};function Dd(e){var t=e.patterns,n=e.onSelect;return Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__parent"},Object(l.createElement)("div",{className:"block-editor-block-switcher__popover__preview__container"},Object(l.createElement)(m.Popover,{className:"block-editor-block-switcher__preview__popover",position:"bottom right"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview"},Object(l.createElement)("div",{className:"block-editor-block-switcher__preview-title"},Object(k.__)("Preview")),Object(l.createElement)(Ad,{patterns:t,onSelect:n})))))}function Ad(e){var t=e.patterns,n=e.onSelect,r=Object(m.__unstableUseCompositeState)();return Object(l.createElement)(m.__unstableComposite,Object(i.a)({},r,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":Object(k.__)("Patterns list")}),t.map((function(e){return Object(l.createElement)(Ld,{key:e.name,pattern:e,onSelect:n,composite:r})})))}function Ld(e){var t=e.pattern,n=e.onSelect,r=e.composite,o="block-editor-block-switcher__preview-patterns-container",c=Object(b.useInstanceId)(Ld,"".concat(o,"-list__item-description"));return Object(l.createElement)("div",{className:"".concat(o,"-list__list-item"),"aria-label":t.title,"aria-describedby":t.description?c:void 0},Object(l.createElement)(m.__unstableCompositeItem,Object(i.a)({role:"option",as:"div"},r,{className:"".concat(o,"-list__item"),onClick:function(){return n(t.transformedBlocks)}}),Object(l.createElement)(Js,{blocks:t.transformedBlocks,viewportWidth:t.viewportWidth||500}),Object(l.createElement)("div",{className:"".concat(o,"-list__item-title")},t.title)),!!t.description&&Object(l.createElement)(m.VisuallyHidden,{id:c},t.description))}var Rd=function(e){var t=e.blocks,n=e.patterns,r=e.onSelect,o=Object(l.useState)(!1),c=Object(Co.a)(o,2),i=c[0],a=c[1],s=function(e,t){return Object(l.useMemo)((function(){return e.reduce((function(e,n){var r=function(e,t){var n,r=t.map((function(e){return Object(p.cloneBlock)(e)})),o=new Set,c=Id(e);try{for(c.s();!(n=c.n()).done;){var i,a=n.value,l=!1,s=Id(r);try{for(s.s();!(i=s.n()).done;){var u=i.value,d=Bd(u,a.name,o);if(d){l=!0,o.add(d.clientId),Nd(d,a);break}}}catch(e){s.e(e)}finally{s.f()}if(!l)return}}catch(e){c.e(e)}finally{c.f()}return r}(t,n.blocks);return r&&e.push(Td(Td({},n),{},{transformedBlocks:r})),e}),[])}),[e,t])}(n,t);return s.length?Object(l.createElement)(m.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup"},i&&Object(l.createElement)(Dd,{patterns:s,onSelect:r}),Object(l.createElement)(m.MenuItem,{onClick:function(e){e.preventDefault(),a(!i)},icon:Ql.a},Object(k.__)("Patterns"))):null};function Md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Md(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vd=function(e){var t=e.clientIds,n=e.blocks,r=Object(v.useDispatch)(yr).replaceBlocks,o=Cl(n[0].clientId),c=Object(v.useSelect)((function(e){var r,c,i=e(yr),a=i.getBlockRootClientId,l=i.getBlockTransformItems,s=i.__experimentalGetPatternTransformItems,u=e(p.store),b=u.getBlockStyles,f=u.getBlockType,m=a(Object(d.castArray)(t)[0]),v=Object(Co.a)(n,1)[0].name,O=1===n.length,g=O&&b(v);return r=O?null==o?void 0:o.icon:1===Object(d.uniq)(n.map((function(e){return e.name}))).length?null===(c=f(v))||void 0===c?void 0:c.icon:pd,{possibleBlockTransformations:l(n,m),hasBlockStyles:!(null==g||!g.length),icon:r,blockTitle:f(v).title,patterns:s(n,m)}}),[t,n,null==o?void 0:o.icon]),i=c.possibleBlockTransformations,a=c.hasBlockStyles,s=c.icon,u=c.blockTitle,b=c.patterns,f=1===n.length&&Object(p.isReusableBlock)(n[0]),O=1===n.length&&Object(p.isTemplatePart)(n[0]),g=!!i.length,h=!(null==b||!b.length);if(!a&&!g)return Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(m.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:u,icon:Object(l.createElement)(hl,{icon:s,showColors:!0})}));var j=u,y=1===n.length?Object(k.sprintf)(
48
  /* translators: %s: block title. */
49
  Object(k.__)("%s: Change block type or style"),u):Object(k.sprintf)(
50
  /* translators: %d: number of blocks. */
51
+ Object(k._n)("Change type of %d block","Change type of %d blocks",n.length),n.length),_=a||g||h;return Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(m.ToolbarItem,null,(function(e){return Object(l.createElement)(m.DropdownMenu,{className:"block-editor-block-switcher",label:j,popoverProps:{position:"bottom right",isAlternate:!0,className:"block-editor-block-switcher__popover"},icon:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(hl,{icon:s,className:"block-editor-block-switcher__toggle",showColors:!0}),(f||O)&&Object(l.createElement)("span",{className:"block-editor-block-switcher__toggle-text"},Object(l.createElement)(Sl,{clientId:t}))),toggleProps:Fd({describedBy:y},e),menuProps:{orientation:"both"}},(function(e){var o=e.onClose;return _&&Object(l.createElement)("div",{className:"block-editor-block-switcher__container"},h&&Object(l.createElement)(Rd,{blocks:n,patterns:b,onSelect:function(e){!function(e){r(t,e)}(e),o()}}),g&&Object(l.createElement)(vd,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:i,blocks:n,onSelect:function(e){!function(e){r(t,Object(p.switchToBlockType)(n,e))}(e),o()}}),a&&Object(l.createElement)(wd,{hoveredBlock:n[0],onSwitch:o}))}))})))},Hd=function(e){var t=e.clientIds,n=Object(v.useSelect)((function(e){return e(yr).getBlocksByClientId(t)}),[t]);return!n.length||n.some((function(e){return!e}))?null:Object(l.createElement)(Vd,{clientIds:t,blocks:n})},zd=n(53);function Gd(){var e=Object(v.useSelect)(yr).getBlockName,t=Object(v.useSelect)(p.store).getBlockType,n=Object(v.useDispatch)(ju.store).createSuccessNotice;return Object(l.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(k.sprintf)(// Translators: Name of the block being copied, e.g. "Paragraph".
52
  Object(k.__)('Copied "%s" to clipboard.'),a):Object(k.sprintf)(// Translators: Name of the block being cut, e.g. "Paragraph".
53
  Object(k.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(k.sprintf)(// Translators: %d: Number of blocks being copied.
54
  Object(k._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",o.length),o.length):Object(k.sprintf)(// Translators: %d: Number of blocks being cut.
55
+ Object(k._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",o.length),o.length);n(c,{type:"snackbar"})}),[])}function Ud(){var e=Object(v.useSelect)(yr),t=e.getBlocksByClientId,n=e.getSelectedBlockClientIds,r=e.hasMultiSelection,o=e.getSettings,c=Object(v.useDispatch)(yr),i=c.flashBlock,a=c.removeBlocks,l=c.replaceBlocks,s=Gd();return Object(b.useRefEffect)((function(e){function c(c){var u=n();if(0!==u.length){if(!r()){var d=c.target.ownerDocument;if("copy"===c.type||"cut"===c.type?Object(Wl.documentHasUncollapsedSelection)(d):Object(Wl.documentHasSelection)(d))return}if(e.contains(c.target.ownerDocument.activeElement)){if(c.preventDefault(),"copy"===c.type||"cut"===c.type){1===u.length&&i(u[0]),s(c.type,u);var b=t(u),f=Object(p.serialize)(b);c.clipboardData.setData("text/plain",f),c.clipboardData.setData("text/html",f)}if("cut"===c.type)a(u);else if("paste"===c.type){var m=o().__experimentalCanUserUseUnfilteredHTML,v=function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}var o=Object(Wl.getFilesFromDataTransfer)(t).filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}));return o.length&&!r&&(r=o.map((function(e){return'<img src="'.concat(Object(zd.createBlobURL)(e),'">')})).join(""),n=""),{html:r,plainText:n}}(c),O=v.plainText,g=v.html,h=Object(p.pasteHandler)({HTML:g,plainText:O,mode:"BLOCKS",canUserUseUnfilteredHTML:m});l(u,h,h.length-1,-1)}}}}return e.ownerDocument.addEventListener("copy",c),e.ownerDocument.addEventListener("cut",c),e.ownerDocument.addEventListener("paste",c),function(){e.ownerDocument.removeEventListener("copy",c),e.ownerDocument.removeEventListener("cut",c),e.ownerDocument.removeEventListener("paste",c)}}),[])}var Wd=function(e){var t=e.children;return Object(l.createElement)("div",{ref:Ud()},t)};function Kd(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(v.useSelect)((function(e){return e(yr)}),[]),c=o.canInsertBlockType,i=o.getBlockRootClientId,a=o.getBlocksByClientId,l=o.getTemplateLock,s=Object(v.useSelect)((function(e){return e(p.store)}),[]),u=s.getDefaultBlockName,b=s.getGroupingBlockName,f=a(t),m=i(t[0]),O=Object(d.every)(f,(function(e){return!!e&&Object(p.hasBlockSupport)(e.name,"multiple",!0)&&c(e.name,m)})),g=c(u(),m),h=Object(v.useDispatch)(yr),j=h.removeBlocks,y=h.replaceBlocks,k=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,w=h.flashBlock,C=h.setBlockMovingClientId,S=h.setNavigationMode,B=h.selectBlock,I=Gd();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!l(m),rootClientId:m,blocks:f,onDuplicate:function(){return k(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(d.first)(Object(d.castArray)(t)))},onInsertAfter:function(){_(Object(d.last)(Object(d.castArray)(t)))},onMoveTo:function(){S(!0),B(t[0]),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(p.switchToBlockType)(f,e);n&&y(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&y(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&w(e[0]),I("copy",e)}})}var qd=Object(b.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=e(yr),o=r.getBlock,c=r.getBlockMode,i=r.getSettings,a=o(n),l=i().codeEditingEnabled;return{mode:c(n),blockType:a?Object(p.getBlockType)(a.name):null,isCodeEditingEnabled:l}})),Object(v.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?d.noop:n,o=t.clientId;return{onToggleMode:function(){e(yr).toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,c=void 0!==o&&o,i=e.isCodeEditingEnabled,a=void 0===i||i;if(!Object(p.hasBlockSupport)(t,"html",!0)||!a)return null;var s="visual"===n?Object(k.__)("Edit as HTML"):Object(k.__)("Edit visually");return Object(l.createElement)(m.MenuItem,{onClick:r},!c&&s)})),$d=Object(b.compose)(Object(v.withSelect)((function(e,t){var n=t.clientId,r=e(yr).getBlock(n);return{block:r,shouldRender:r&&"core/html"===r.name}})),Object(v.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e(yr).replaceBlocks(n.clientId,Object(p.rawHandler)({HTML:Object(p.getBlockContent)(n)}))}}})))((function(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(k.__)("Convert to Blocks");return Object(l.createElement)(m.MenuItem,{onClick:n},!r&&o)})),Yd=Object(m.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),Xd=Yd.Fill,Qd=Yd.Slot;Xd.Slot=Qd;var Zd=Xd;function Jd(e){var t=e.clientIds,n=e.isGroupable,r=e.isUngroupable,o=e.blocksSelection,c=e.groupingBlockName,i=e.onClose,a=void 0===i?function(){}:i,s=Object(v.useDispatch)(yr).replaceBlocks;return n||r?Object(l.createElement)(l.Fragment,null,n&&Object(l.createElement)(m.MenuItem,{onClick:function(){var e;(e=Object(p.switchToBlockType)(o,c))&&s(t,e),a()}},Object(k._x)("Group","verb")),r&&Object(l.createElement)(m.MenuItem,{onClick:function(){var e;(e=o[0].innerBlocks).length&&s(t,e),a()}},Object(k._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor "))):null}function eb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nb=Object(m.createSlotFill)("BlockSettingsMenuControls"),rb=nb.Fill,ob=nb.Slot;function cb(e){var t=Object(i.a)({},e);return Object(l.createElement)(m.__experimentalStyleProvider,{document:document},Object(l.createElement)(rb,t))}cb.Slot=function(e){var t,n=e.fillProps,r=e.clientIds,o=void 0===r?null:r,c=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlocksByClientId,r=t.getSelectedBlockClientIds,c=null!==o?o:r();return Object(d.map)(Object(d.compact)(n(c)),(function(e){return e.name}))}),[o]),a={clientIds:(t=Object(v.useSelect)((function(e){var t,n=e(yr),r=n.getBlockRootClientId,o=n.getBlocksByClientId,c=n.canInsertBlockType,i=n.getSelectedBlockClientIds,a=e(p.store).getGroupingBlockName,l=i(),s=a(),u=c(s,null!=l&&l.length?r(l[0]):void 0),d=o(l),b=1===d.length&&(null===(t=d[0])||void 0===t?void 0:t.name)===s;return{clientIds:l,isGroupable:u&&d.length&&!b,isUngroupable:b&&!!d[0].innerBlocks.length,blocksSelection:d,groupingBlockName:s}}),[])).clientIds,isGroupable:t.isGroupable,isUngroupable:t.isUngroupable,blocksSelection:t.blocksSelection,groupingBlockName:t.groupingBlockName},s=a.isGroupable||a.isUngroupable;return Object(l.createElement)(ob,{fillProps:tb(tb({},n),{},{selectedBlocks:c})},(function(e){if((null==e?void 0:e.length)>0||s)return Object(l.createElement)(m.MenuGroup,null,e,Object(l.createElement)(Jd,Object(i.a)({},a,{onClose:null==n?void 0:n.onClose})))}))};var ib=cb,ab={className:"block-editor-block-settings-menu__popover",position:"bottom right",isAlternate:!0};function lb(e){var t=e.blocks,n=e.onCopy,r=Object(b.useCopyToClipboard)((function(){return Object(p.serialize)(t)}),n);return Object(l.createElement)(m.MenuItem,{ref:r},Object(k.__)("Copy"))}var sb=function(e){var t=e.clientIds,n=e.__experimentalSelectBlock,r=e.children,o=Object(j.a)(e,["clientIds","__experimentalSelectBlock","children"]),c=Object(d.castArray)(t),a=c.length,s=c[0],u=Object(v.useSelect)((function(e){var t=e(Vl.store).getShortcutRepresentation;return{duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),b=Object(l.useCallback)(n?function(){var e=Object(zl.a)(Lt.a.mark((function e(t){var r;return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:(r=e.sent)&&r[0]&&n(r[0]);case 4:case"end":return e.stop()}}),e)})));return function(_x){return e.apply(this,arguments)}}():d.noop,[n]),f=1===a?Object(k.__)("Remove block"):Object(k.__)("Remove blocks");return Object(l.createElement)(Kd,{clientIds:t,__experimentalUpdateSelection:!n},(function(e){var n=e.canDuplicate,c=e.canInsertDefaultBlock,p=e.isLocked,v=e.onDuplicate,O=e.onInsertAfter,g=e.onInsertBefore,h=e.onRemove,j=e.onCopy,y=e.onMoveTo,_=e.blocks;return Object(l.createElement)(m.DropdownMenu,Object(i.a)({icon:Gl.a,label:Object(k.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:ab,noIcons:!0},o),(function(e){var o=e.onClose;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.MenuGroup,null,Object(l.createElement)(Zd.Slot,{fillProps:{onClose:o}}),1===a&&Object(l.createElement)($d,{clientId:s}),Object(l.createElement)(lb,{blocks:_,onCopy:j}),n&&Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,v,b),shortcut:u.duplicate},Object(k.__)("Duplicate")),c&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,g),shortcut:u.insertBefore},Object(k.__)("Insert before")),Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,O),shortcut:u.insertAfter},Object(k.__)("Insert after"))),!p&&Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,y)},Object(k.__)("Move to")),1===a&&Object(l.createElement)(qd,{clientId:s,onToggle:o})),Object(l.createElement)(ib.Slot,{fillProps:{onClose:o},clientIds:t}),"function"==typeof r?r({onClose:o}):l.Children.map((function(e){return Object(l.cloneElement)(e,{onClose:o})})),Object(l.createElement)(m.MenuGroup,null,!p&&Object(l.createElement)(m.MenuItem,{onClick:Object(d.flow)(o,h,b),shortcut:u.remove},f)))}))}))},ub=function(e){var t=e.clientIds,n=Object(j.a)(e,["clientIds"]);return Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(m.ToolbarItem,null,(function(e){return Object(l.createElement)(sb,Object(i.a)({clientIds:t,toggleProps:e},n))})))};function db(e){var t=e.hideDragHandle,n=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockName,r=t.getBlockMode,o=t.getSelectedBlockClientIds,c=t.isBlockValid,i=t.getBlockRootClientId,a=t.getSettings,l=o(),s=l[0],u=i(s),d=a();return{blockClientIds:l,blockClientId:s,blockType:s&&Object(p.getBlockType)(n(s)),hasFixedToolbar:d.hasFixedToolbar,hasReducedUI:d.hasReducedUI,rootClientId:u,isValid:l.every((function(e){return c(e)})),isVisual:l.every((function(e){return"visual"===r(e)}))}}),[]),r=n.blockClientIds,o=n.blockClientId,c=n.blockType,a=n.hasFixedToolbar,s=n.hasReducedUI,d=n.isValid,f=n.isVisual,O=Object(v.useDispatch)(yr).toggleBlockHighlight,g=Object(l.useRef)(),h=bd({ref:g,onChange:function(e){e&&s||O(o,e)}}),j=h.showMovers,y=h.gestures,k=Object(b.useViewportMatch)("medium","<")||a;if(c&&!Object(p.hasBlockSupport)(c,"__experimentalToolbar",!0))return null;var _=k||j;if(0===r.length)return null;var E=d&&f,w=r.length>1,C=u()("block-editor-block-toolbar",_&&"is-showing-movers");return Object(l.createElement)("div",{className:C},!w&&!k&&Object(l.createElement)(fd,{clientIds:r}),Object(l.createElement)("div",Object(i.a)({ref:g},y),(E||w)&&Object(l.createElement)(m.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls"},Object(l.createElement)(Hd,{clientIds:r}),Object(l.createElement)(ad,{clientIds:r,hideDragHandle:t||s}))),E&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(Br.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(Br.Slot,{className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(Br.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),Object(l.createElement)(Br.Slot,{group:"other",className:"block-editor-block-toolbar__slot"})),Object(l.createElement)(ub,{clientIds:r}))}var bb=function(e){var t=e.focusOnMount,n=Object(j.a)(e,["focusOnMount"]),r=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockName,r=t.getBlockParents,o=t.getSelectedBlockClientIds,c=e(p.store).getBlockType,i=o()[0];return{blockType:i&&c(n(i)),hasParents:r(i).length}}),[]),o=r.blockType,c=r.hasParents;if(o&&!Object(p.hasBlockSupport)(o,"__experimentalToolbar",!0))return null;var a=u()("block-editor-block-contextual-toolbar",{"has-parent":c});return Object(l.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(l.createElement)(id,Object(i.a)({focusOnMount:t,className:a
56
+ /* translators: accessibility text for the block toolbar */,"aria-label":Object(k.__)("Block tools")},n),Object(l.createElement)(db,null)))};function fb(e){var t=e(yr),n=t.isNavigationMode,r=t.isMultiSelecting,o=t.hasMultiSelection,c=t.isTyping,i=t.isCaretWithinFormattedText,a=t.getSettings,l=t.getLastMultiSelectedBlockClientId;return{isNavigationMode:n(),isMultiSelecting:r(),isTyping:c(),isCaretWithinFormattedText:i(),hasMultiSelection:o(),hasFixedToolbar:a().hasFixedToolbar,lastClientId:l()}}function pb(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(v.useSelect)(fb,[]),a=i.isNavigationMode,s=i.isMultiSelecting,d=i.isTyping,f=i.isCaretWithinFormattedText,p=i.hasMultiSelection,O=i.hasFixedToolbar,g=i.lastClientId,h=Object(b.useViewportMatch)("medium"),j=Object(l.useState)(!1),y=Object(Co.a)(j,2),k=y[0],_=y[1],E=Object(l.useState)(!1),w=Object(Co.a)(E,2),C=w[0],S=w[1],B=Object(l.useContext)(hb),I=Object(v.useDispatch)(yr).stopTyping,x=!d&&!a&&o&&r,P=a,T=!a&&!O&&h&&!x&&!s&&(!d||f),N=!(a||T||O||o);Object(Vl.useShortcut)("core/block-editor/focus-toolbar",Object(l.useCallback)((function(){_(!0),I(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),Object(l.useEffect)((function(){T||_(!1)}),[T]);var D=Object(l.useRef)();if(Object(l.useEffect)((function(){D.current=void 0}),[t]),!(P||T||k||x))return null;var A=B[t];if(!A)return null;var L=A.ownerDocument;c&&(A=Sc(c,L));var R=A;if(p){var M=B[g];if(!M)return null;R={top:A,bottom:M}}var F=x?"top left right":"top right left",V=x?void 0:L.defaultView.frameElement||Object(Wl.getScrollContainer)(A)||L.body;return Object(l.createElement)(m.Popover,{noArrow:!0,animate:!1,position:F,focusOnMount:!1,anchorRef:R,className:"block-editor-block-list__block-popover",__unstableStickyBoundaryElement:V,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:A,shouldAnchorIncludePadding:!0},(T||k)&&Object(l.createElement)("div",{onFocus:function(){S(!0)},onBlur:function(){S(!1)},tabIndex:-1,className:u()("block-editor-block-list__block-popover-inserter",{"is-visible":C})},Object(l.createElement)(Wu,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||k)&&Object(l.createElement)(bb,{focusOnMount:k,__experimentalInitialIndex:D.current,__experimentalOnIndexChange:function(e){D.current=e}}),P&&Object(l.createElement)(od,{clientId:t,rootClientId:n,blockElement:A}),x&&Object(l.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(l.createElement)(Wu,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function mb(e){var t=e(yr),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,c=t.__unstableGetBlockWithoutInnerBlocks,i=t.getBlockParents,a=t.__experimentalGetBlockListSettingsForBlocks,l=n()||r();if(l){var s=c(l)||{},u=s.name,b=s.attributes,f=void 0===b?{}:b,m=s.isValid,v=i(l),O=a(v),g=Object(d.find)(v,(function(e){var t;return null===(t=O[e])||void 0===t?void 0:t.__experimentalCaptureToolbars}));return{clientId:l,rootClientId:o(l),name:u,isValid:m,isEmptyDefaultBlock:u&&Object(p.isUnmodifiedDefaultBlock)({name:u,attributes:f}),capturingClientId:g}}}function vb(){var e=Object(v.useSelect)(mb,[]);if(!e)return null;var t=e.clientId,n=e.rootClientId,r=e.name,o=e.isValid,c=e.isEmptyDefaultBlock,i=e.capturingClientId;return r?Object(l.createElement)(pb,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var Ob="undefined"==typeof window?function(e){setTimeout((function(){return e(Date.now())}),0)}:window.requestIdleCallback||window.requestAnimationFrame,gb="undefined"==typeof window?clearTimeout:window.cancelIdleCallback||window.cancelAnimationFrame,hb=Object(l.createContext)(),jb=Object(l.createContext)();function yb(e){var t,n=e.className,r=e.__experimentalLayout,o=Object(l.useRef)(),c=Object(l.useState)({}),i=Object(Co.a)(c,2),a=i[0],s=i[1],d=function(e){var t=Object(l.useState)(!1),n=Object(Co.a)(t,2),r=n[0],o=n[1],c=Object(l.useState)(!1),i=Object(Co.a)(c,2),a=i[0],s=i[1],u=Object(l.useState)(null),d=Object(Co.a)(u,2),b=d[0],f=d[1],p=Object(v.useSelect)((function(e){var t=e(yr),n=t.isMultiSelecting,r=t.isBlockInsertionPointVisible,o=t.getBlockInsertionPoint,c=t.getBlockOrder,i=o(),a=c(i.rootClientId);return{isMultiSelecting:n(),isInserterVisible:r(),selectedClientId:a[i.index-1],selectedRootClientId:i.rootClientId}}),[]),m=p.isMultiSelecting,O=p.isInserterVisible,g=p.selectedClientId,h=p.selectedRootClientId,j=Object(v.useSelect)(yr).getBlockListSettings,y=Object(l.useCallback)((function(e){var t;if(e.target.classList.contains("block-editor-block-list__layout")){var n;e.target.classList.contains("is-root-container")||(n=(e.target.getAttribute("data-block")?e.target:e.target.closest("[data-block]")).getAttribute("data-block"));var c=(null===(t=j(n))||void 0===t?void 0:t.orientation)||"vertical",i=e.target.getBoundingClientRect(),a=e.clientY-i.top,l=e.clientX-i.left,s=Array.from(e.target.children),u=s.find((function(e){return e.classList.contains("wp-block")&&"vertical"===c&&e.offsetTop>a||e.classList.contains("wp-block")&&"horizontal"===c&&e.offsetLeft>l})),d=u?s[s.indexOf(u)-1]:s[s.length-1];if(d&&(d.id||(d=d.firstElementChild))){var b=d.id.slice("block-".length);if(b){var p=d.getBoundingClientRect();"horizontal"===c&&(e.clientY>p.bottom||e.clientY<p.top)||"vertical"===c&&(e.clientX>p.right||e.clientX<p.left)?r&&o(!1):(o(!0),f(b))}}}else r&&o(!1)}),[r,o,f]),k=!a&&!m;return Object(l.useEffect)((function(){if(k)return e.current.addEventListener("mousemove",y),function(){e.current.removeEventListener("mousemove",y)}}),[k,y]),!m&&(r||a||O)&&Object(l.createElement)(nd,{clientId:O?g:b,selectedRootClientId:h,isInserterShown:r,isInserterForced:a,setIsInserterForced:function(e){s(e),e||o(e)},containerRef:e,showInsertionPoint:O})}(o);t=Object(v.useSelect)((function(e){return e(yr).getSettings().__experimentalBlockPatterns}),[]),Object(l.useEffect)((function(){if(null!=t&&t.length){var e,n=-1;return e=Ob((function r(){++n>=t.length||(Object(v.select)(yr).__experimentalGetParsedPattern(t[n].name),e=Ob(r))})),function(){return gb(e)}}}),[t]);var f=Object(b.useViewportMatch)("medium"),p=Object(v.useSelect)((function(e){var t=e(yr),n=t.isTyping,r=t.getSettings,o=t.isNavigationMode,c=r(),i=c.outlineMode,a=c.focusMode;return{isTyping:n(),isOutlineMode:i,isFocusMode:a,isNavigationMode:o()}}),[]),m=p.isTyping,O=p.isOutlineMode,g=p.isFocusMode,h=p.isNavigationMode;return Object(l.createElement)(hb.Provider,{value:a},d,Object(l.createElement)(vb,null),Object(l.createElement)("div",{ref:Object(b.useMergeRefs)([o,ed()]),className:u()("block-editor-block-list__layout is-root-container",n,{"is-typing":m,"is-outline-mode":O,"is-focus-mode":g&&f,"is-navigate-mode":h})},Object(l.createElement)(jb.Provider,{value:s},Object(l.createElement)(_b,{__experimentalLayout:r}))))}function kb(e){var t=e.placeholder,n=e.rootClientId,r=e.renderAppender,o=e.__experimentalAppenderTagName,c=e.__experimentalLayout,i=void 0===c?Ar:c,a=Object(v.useSelect)((function(e){var t=e(yr),r=t.getBlockOrder,o=t.getSelectedBlockClientId,c=t.getMultiSelectedBlockClientIds,i=t.hasMultiSelection;return{blockClientIds:r(n),selectedBlockClientId:o(),multiSelectedBlockClientIds:c(),hasMultiSelection:i()}}),[n]),s=a.blockClientIds,u=a.selectedBlockClientId,d=a.multiSelectedBlockClientIds,b=a.hasMultiSelection;return Object(l.createElement)(Mr,{value:i},s.map((function(e,t){var r=b?d.includes(e):u===e;return Object(l.createElement)(v.AsyncModeProvider,{key:e,value:!r},Object(l.createElement)(Fb,{rootClientId:n,clientId:e,index:t}))})),s.length<1&&t,Object(l.createElement)(Yu,{tagName:o,rootClientId:n,renderAppender:r}))}function _b(e){return Object(l.createElement)(v.AsyncModeProvider,{value:!1},Object(l.createElement)(kb,e))}function Eb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Eb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cb(e){var t=Object(l.useContext)(jb),n=Object(v.useSelect)((function(t){var n=t(yr),r=n.isBlockSelected,o=n.isFirstMultiSelectedBlock,c=n.getLastMultiSelectedBlockClientId;return r(e)||o(e)||c()===e}));return Object(b.useRefEffect)((function(r){if(n)return t((function(t){return wb(wb({},t),{},Object(a.a)({},e,r))})),function(){t((function(t){return Object(d.omit)(t,e)}))}}),[n,e,t])}var Sb=n(158),Bb=n.n(Sb);function Ib(e){var t=Object(l.useRef)(),n=Object(v.useSelect)((function(t){var n=t(yr),r=n.isBlockSelected,o=n.getBlockSelectionEnd;return r(e)||o()===e}),[e]);return Object(l.useEffect)((function(){if(n){var e=t.current;if(!e.contains(e.ownerDocument.activeElement)){var r=Object(Wl.getScrollContainer)(e);r&&Bb()(e,r,{onlyScrollIfNeeded:!0})}}}),[n]),t}function xb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.__unstableIsHtml,r=Object(l.useContext)(Ab),o=r.clientId,c=r.index,i=r.className,a=r.wrapperProps,s=void 0===a?{}:a,d=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockMode,r=t.getBlockName,c=t.isTyping,i=t.getGlobalBlockCount,a=t.isBlockSelected,l=t.isBlockMultiSelected,s=t.isAncestorMultiSelected,u=t.isFirstMultiSelectedBlock,d=a(o),b=l(o)||s(o),f=r(o);return{mode:n(o),name:f,blockTitle:Object(p.getBlockType)(f).title,isPartOfSelection:d||b,adjustScrolling:d||u(o),enableAnimation:!c()&&i()<=200}}),[o]),f=d.mode,m=d.name,O=d.blockTitle,g=d.isPartOfSelection,h=d.adjustScrolling,j=d.enableAnimation,y=Object(k.sprintf)(Object(k.__)("Block: %s"),O),_="html"!==f||n?"":"-visual",E=Object(b.useMergeRefs)([e.ref,ys(o),Ib(o),Cb(o),Rs(o),Ms(o),_s(),$l({isSelected:g,adjustScrolling:h,enableAnimation:j,triggerAnimationOnChange:c})]);return Pb(Pb(Pb({},s),e),{},{ref:E,id:"block-".concat(o).concat(_),tabIndex:0,role:"group","aria-label":y,"data-block":o,"data-type":m,"data-title":O,className:u()(i,e.className,s.className,Es(o),ws(o),Cs(o),Ss(o)),style:Pb(Pb({},s.style),e.style)})}function Nb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nb(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Tb.save=p.__unstableGetBlockProps;var Ab=Object(l.createContext)();function Lb(e){var t=e.children,n=e.isHtml,r=Object(j.a)(e,["children","isHtml"]);return Object(l.createElement)("div",Tb(r,{__unstableIsHtml:n}),t)}var Rb=Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e(yr),c=o.isBlockSelected,i=o.getBlockMode,a=o.isSelectionEnabled,l=o.getTemplateLock,s=(0,o.__unstableGetBlockWithoutInnerBlocks)(n),u=c(n),d=l(r),b=s||{},f=b.name,p=b.attributes,m=b.isValid;return{mode:i(n),isSelectionEnabled:a(),isLocked:!!d,block:s,name:f,attributes:p,isValid:m,isSelected:u}})),Mb=Object(v.withDispatch)((function(e,t,n){var r=n.select,o=e(yr),c=o.updateBlockAttributes,i=o.insertBlocks,a=o.mergeBlocks,l=o.replaceBlocks,s=o.toggleSelection,u=o.__unstableMarkLastChangeAsPersistent;return{setAttributes:function(e){var n=(0,r(yr).getMultiSelectedBlockClientIds)(),o=t.clientId,i=n.length?n:[o];c(i,e)},onInsertBlocks:function(e,n){var r=t.rootClientId;i(e,n,r)},onInsertBlocksAfter:function(e){var n=t.clientId,o=t.rootClientId,c=(0,r(yr).getBlockIndex)(n,o);i(e,c+1,o)},onMerge:function(e){var n=t.clientId,o=r(yr),c=o.getPreviousBlockClientId,i=o.getNextBlockClientId;if(e){var l=i(n);l&&a(n,l)}else{var s=c(n);s&&a(s,n)}},onReplace:function(e,n,r){e.length&&!Object(p.isUnmodifiedDefaultBlock)(e[e.length-1])&&u(),l([t.clientId],e,n,r)},toggleSelection:function(e){s(e)}}})),Fb=Object(b.compose)(b.pure,Rb,Mb,Object(b.ifCondition)((function(e){return!!e.block})),Object(m.withFilters)("editor.BlockListBlock"))((function(e){var t,n,r,o=e.mode,c=e.isLocked,i=e.clientId,a=e.isSelected,s=e.isSelectionEnabled,b=e.className,f=e.name,m=e.isValid,O=e.attributes,g=e.wrapperProps,h=e.setAttributes,j=e.onReplace,y=e.onInsertBlocksAfter,k=e.onMerge,_=e.toggleSelection,E=e.index,w=Object(v.useDispatch)(yr).removeBlock,C=Object(l.useCallback)((function(){return w(i)}),[i]),S=Object(l.createElement)(Fl,{name:f,isSelected:a,attributes:O,setAttributes:h,insertBlocksAfter:c?void 0:y,onReplace:c?void 0:j,onRemove:c?void 0:C,mergeBlocks:c?void 0:k,clientId:i,isSelectionEnabled:s,toggleSelection:_}),B=Object(p.getBlockType)(f),I=B.apiVersion>1||Object(p.hasBlockSupport)(B,"lightBlockWrapper",!1);B.getEditWrapperProps&&(t=g,n=B.getEditWrapperProps(O),r=Db(Db({},t),n),t&&n&&t.className&&n.className&&(r.className=u()(t.className,n.className)),t&&n&&t.style&&n.style&&(r.style=Db(Db({},t.style),n.style)),g=r);var x,P=g&&!!g["data-align"];P&&(S=Object(l.createElement)("div",{className:"wp-block","data-align":g["data-align"]},S)),x=m?"html"===o?Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{style:{display:"none"}},S),Object(l.createElement)(Lb,{isHtml:!0},Object(l.createElement)(js,{clientId:i}))):I?S:Object(l.createElement)(Lb,g,S):Object(l.createElement)(Lb,{className:"has-warning"},Object(l.createElement)(ps,{clientId:i}),Object(l.createElement)("div",null,Object(p.getSaveElement)(B,O)));var T={clientId:i,isSelected:a,index:E,className:u()(b,{"wp-block":!P}),wrapperProps:Object(d.omit)(g,["data-align"])},N=Object(l.useMemo)((function(){return T}),Object.values(T));return Object(l.createElement)(Ab.Provider,{value:N},Object(l.createElement)(Os,{fallback:Object(l.createElement)(Lb,{className:"has-warning"},Object(l.createElement)(vs,null))},x))}));function Vb(e){var t=e.level;return Object(d.times)(t-1,(function(e){var n=e+2===t;return Object(l.createElement)("div",{key:e,"aria-hidden":"true",className:u()("block-editor-block-navigator-indentation",{"has-item":n})})}))}var Hb=function(e,t,n){return Object(k.sprintf)(
57
  /* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */
58
+ Object(k.__)("Block %1$d of %2$d, Level %3$d"),e,t,n)},zb=function(e,t){return Object(d.isArray)(t)&&t.length?-1!==t.indexOf(e):t===e},Gb=Object(l.forwardRef)((function e(t,n){var r=t.className,o=t.block.clientId,c=t.isSelected,i=t.onClick,a=t.position,s=t.siblingBlockCount,d=t.level,f=t.tabIndex,p=t.onFocus,v=t.onDragStart,O=t.onDragEnd,g=t.draggable,h=Cl(o),j=Object(b.useInstanceId)(e),y="block-navigation-block-select-button__".concat(j),_=Hb(a,s,d);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.Button,{className:u()("block-editor-block-navigation-block-select-button",r),onClick:i,"aria-describedby":y,ref:n,tabIndex:f,onFocus:p,onDragStart:v,onDragEnd:O,draggable:g},Object(l.createElement)(Vb,{level:d}),Object(l.createElement)(hl,{icon:null==h?void 0:h.icon,showColors:!0}),Object(l.createElement)(Sl,{clientId:o}),c&&Object(l.createElement)(m.VisuallyHidden,null,Object(k.__)("(selected block)"))),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-select-button__description",id:y},_))}));function Ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ub(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ub(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kb=function(e){return"BlockNavigationBlock-".concat(e)},qb=Object(l.forwardRef)((function e(t,n){var r=t.block.clientId,o=Object(v.useSelect)((function(e){return e(yr).getBlockName(r)}),[r]).name,c=Object(b.useInstanceId)(e);return Object(l.createElement)(m.Slot,{name:Kb(r)},(function(e){if(!e.length)return Object(l.createElement)(Gb,Object(i.a)({ref:n},t));var r=t.className,a=t.isSelected,s=t.position,d=t.siblingBlockCount,b=t.level,f=t.tabIndex,v=t.onFocus,O=Object(p.getBlockType)(o),g="block-navigation-block-slot__".concat(c),h=Hb(s,d,b),j={tabIndex:f,onFocus:v,ref:n,"aria-describedby":g};return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:u()("block-editor-block-navigation-block-slot",r)},Object(l.createElement)(hl,{icon:O.icon,showColors:!0}),l.Children.map(e,(function(e){return Object(l.cloneElement)(e,Wb(Wb({},e.props),j))})),a&&Object(l.createElement)(m.VisuallyHidden,null,Object(k.__)("(selected block)")),Object(l.createElement)("div",{className:"block-editor-block-navigation-block-slot__description",id:g},h)))}))})),$b=function(e){var t=Object(l.useContext)(Ab).clientId;return Object(l.createElement)(m.Fill,Object(i.a)({},e,{name:Kb(t)}))},Yb=Object(l.forwardRef)((function(e,t){var n=e.onClick,r=e.block,o=e.isSelected,c=e.position,a=e.siblingBlockCount,s=e.level,d=Object(j.a)(e,["onClick","block","isSelected","position","siblingBlockCount","level"]),b=as(),f=b.__experimentalFeatures,p=b.blockDropTarget,m=void 0===p?{}:p,O=r.clientId,g=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockRootClientId,r=t.hasBlockMovingClientId,o=t.getSelectedBlockClientId;return{rootClientId:n(O)||"",blockMovingClientId:r(),selectedBlockInBlockEditor:o()}}),[O]),h=g.rootClientId,y=g.blockMovingClientId,k=g.selectedBlockInBlockEditor,_=y&&k===O,E=m.rootClientId,w=m.clientId,C=m.dropPosition,S=E===h&&w===O&&"top"===C,B=E===h&&w===O&&"bottom"===C,I=E===O&&"inside"===C,x=u()("block-editor-block-navigation-block-contents",{"is-dropping-before":S||_,"is-dropping-after":B,"is-dropping-to-inner-blocks":I});return Object(l.createElement)(rd,{clientIds:[r.clientId],elementId:"block-navigation-block-".concat(r.clientId)},(function(e){var u=e.draggable,b=e.onDragStart,p=e.onDragEnd;return f?Object(l.createElement)(qb,Object(i.a)({ref:t,className:x,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d)):Object(l.createElement)(Gb,Object(i.a)({ref:t,className:x,block:r,onClick:n,isSelected:o,position:c,siblingBlockCount:a,level:s,draggable:u&&f,onDragStart:b,onDragEnd:p},d))}))}));function Xb(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Qb(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qb(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function Qb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zb(e){var t=e.block,n=e.isSelected,r=e.isBranchSelected,o=e.isLastOfSelectedBranch,c=e.onClick,i=e.position,a=e.level,s=e.rowCount,d=e.siblingBlockCount,b=e.showBlockMovers,f=e.path,p=Object(l.useRef)(null),O=Object(l.useState)(!1),g=Object(Co.a)(O,2),h=g[0],j=g[1],y=t.clientId,_=Object(v.useSelect)((function(e){var t=e(yr),n=t.isBlockBeingDragged,r=t.isAncestorBeingDragged,o=t.getBlockParents;return{isDragging:n(y)||r(y),blockParents:o(y)}}),[y]),E=_.isDragging,w=_.blockParents,C=Object(v.useDispatch)(yr),S=C.selectBlock,B=C.toggleBlockHighlight,I=b&&d>0,x=u()("block-editor-block-navigation-block__mover-cell",{"is-visible":h}),P=as(),T=P.__experimentalFeatures,N=P.__experimentalPersistentListViewFeatures,D=u()("block-editor-block-navigation-block__menu-cell",{"is-visible":h});Object(l.useEffect)((function(){N&&n&&p.current.focus()}),[]),Object(l.useEffect)((function(){T&&n&&p.current.focus()}),[T,n]);var A=N?B:function(){},L=function(){j(!0),A(y,!0)},R=function(){j(!1),A(y,!1)},M=u()({"is-selected":n,"is-branch-selected":N&&r,"is-last-of-selected-branch":N&&o,"is-dragging":E});return Object(l.createElement)(Xl,{className:M,onMouseEnter:L,onMouseLeave:R,onFocus:L,onBlur:R,level:a,position:i,rowCount:s,path:f,id:"block-navigation-block-".concat(y),"data-block":y},Object(l.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:I?void 0:2,ref:p},(function(e){var r=e.ref,o=e.tabIndex,s=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(l.createElement)(Yb,{block:t,onClick:function(){return c(t.clientId)},isSelected:n,position:i,siblingBlockCount:d,level:a,ref:r,tabIndex:o,onFocus:s}))})),I&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.__experimentalTreeGridCell,{className:x,withoutGridItem:!0},Object(l.createElement)(m.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(os,{orientation:"vertical",clientIds:[y],ref:t,tabIndex:n,onFocus:r})})),Object(l.createElement)(m.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(cs,{orientation:"vertical",clientIds:[y],ref:t,tabIndex:n,onFocus:r})})))),T&&Object(l.createElement)(m.__experimentalTreeGridCell,{className:D},(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(l.createElement)(sb,{clientIds:[y],icon:Gl.a,toggleProps:{ref:t,tabIndex:n,onFocus:r},disableOpenOnArrowDown:!0,__experimentalSelectBlock:c},(function(e){var t=e.onClose;return Object(l.createElement)(m.MenuGroup,null,Object(l.createElement)(m.MenuItem,{onClick:Object(zl.a)(Lt.a.mark((function e(){var n,r,o;return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!w.length){e.next=20;break}n=Xb(w),e.prev=2,n.s();case 4:if((r=n.n()).done){e.next=10;break}return o=r.value,e.next=8,S(o);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:e.next=22;break;case 20:return e.next=22,S(null);case 22:return e.next=24,S(y);case 24:t();case 25:case"end":return e.stop()}}),e,null,[[2,12,15,18]])})))},Object(k.__)("Go to block")))}))})))}function Jb(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.path,i=Object(v.useSelect)((function(e){var n=e(yr),r=n.isBlockBeingDragged,o=n.isAncestorBeingDragged;return r(t)||o(t)}),[t]),a=Object(b.useInstanceId)(Jb),s="block-navigation-appender-row__description_".concat(a),d=Object(k.sprintf)(
59
  /* translators: 1: The numerical position of the block that will be inserted. 2: The level of nesting for the block that will be inserted. */
60
+ Object(k.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(l.createElement)(Xl,{className:u()({"is-dragging":i}),level:r,position:n,rowCount:o,path:c},Object(l.createElement)(m.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var n=e.ref,o=e.tabIndex,c=e.onFocus;return Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(l.createElement)(Vb,{level:r}),Object(l.createElement)(Wu,{rootClientId:t,__experimentalIsQuick:!0,"aria-describedby":s,toggleProps:{ref:n,tabIndex:o,onFocus:c}}),Object(l.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:s},d))})))}function ef(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientIds,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,s=e.level,u=void 0===s?1:s,b=e.terminatedLevels,f=void 0===b?[]:b,p=e.path,m=void 0===p?[]:p,v=e.isBranchSelected,O=void 0!==v&&v,g=e.isLastOfBranch,h=void 0!==g&&g,j=!a,k=Object(d.compact)(t),_=function(e){return o&&!j&&zb(e,r)},E=_(a),w=k.length,C=E?w+1:w,S=C;return Object(l.createElement)(l.Fragment,null,Object(d.map)(k,(function(e,t){var a=e.clientId,s=e.innerBlocks,d=t+1,b=C===d?[].concat(Object(y.a)(f),[u]):f,p=[].concat(Object(y.a)(m),[d]),v=i&&!!s&&!!s.length,g=_(a),j=v||g,k=zb(a,r),E=O||k&&j,S=t===w-1,B=k||h&&S,I=h&&!j&&S;return Object(l.createElement)(l.Fragment,{key:a},Object(l.createElement)(Zb,{block:e,onClick:n,isSelected:k,isBranchSelected:E,isLastOfSelectedBranch:I,level:u,position:d,rowCount:C,siblingBlockCount:w,showBlockMovers:c,terminatedLevels:f,path:p}),j&&Object(l.createElement)(ef,{blocks:s,selectedBlockClientIds:r,selectBlock:n,isBranchSelected:E,isLastOfBranch:B,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:u+1,terminatedLevels:b,path:p}))})),E&&Object(l.createElement)(Jb,{parentBlockClientId:a,position:C,rowCount:S,level:u,terminatedLevels:f,path:[].concat(Object(y.a)(m),[S])}))}function tf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nf(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}ef.defaultProps={selectBlock:function(){}};var rf=["top","bottom"];function of(){var e=Object(v.useSelect)(yr),t=e.getBlockRootClientId,n=e.getBlockIndex,r=e.getBlockCount,o=e.getDraggedBlockClientIds,c=e.canInsertBlocks,i=Object(l.useState)(),a=Object(Co.a)(i,2),s=a[0],u=a[1],d=s||{},f=Xu(d.rootClientId,d.blockIndex),p=Object(b.useThrottle)(Object(l.useCallback)((function(e,i){var a={x:e.clientX,y:e.clientY},l=!!e.dataTransfer.getData("wp-blocks"),s=l?o():void 0,d=function(e,t){var n,r,o,c,i,a=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return tf(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tf(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(!l.isDraggedBlock){var s=l.element.getBoundingClientRect(),u=Zu(t,s,rf),d=Object(Co.a)(u,2),b=d[0],f=d[1],p=nf(t,s);if(void 0===o||b<o||p){o=b;var m=e.indexOf(l),v=e[m-1];if("top"===f&&v&&v.rootClientId===l.rootClientId&&!v.isDraggedBlock?(r=v,n="bottom",c=v.element.getBoundingClientRect()):(r=l,n=f,c=s),p)break}}}}catch(e){a.e(e)}finally{a.f()}if(r){var O="bottom"===n;if(O&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0||function(e,t){var n=t.left+t.width/2;return e.x>n}(t,c)))return{rootClientId:r.clientId,blockIndex:0,dropPosition:"inside"};if(r.canInsertDraggedBlocksAsSibling){var g=O?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+g,dropPosition:n}}}}(Array.from(i.querySelectorAll("[data-block]")).map((function(e){var o=e.dataset.block,i=t(o);return{clientId:o,rootClientId:i,blockIndex:n(o,i),element:e,isDraggedBlock:!!l&&s.includes(o),innerBlockCount:r(o),canInsertDraggedBlocksAsSibling:!l||c(s,i),canInsertDraggedBlocksAsChild:!l||c(s,o)}})),a);d&&u(d)}),[]),200);return{ref:Object(b.__experimentalUseDropZone)({onDrop:f,onDragOver:function(e){p(e,e.currentTarget)},onDragEnd:function(){p.cancel(),u(null)}}),target:s}}function cf(e){var t=e.__experimentalFeatures,n=e.__experimentalPersistentListViewFeatures,r=Object(j.a)(e,["__experimentalFeatures","__experimentalPersistentListViewFeatures"]),o=of(),c=o.ref,i=o.target;t||(i=void 0);var a=Object(l.useMemo)((function(){return{__experimentalFeatures:t,__experimentalPersistentListViewFeatures:n,blockDropTarget:i}}),[t,n,i]);return Object(l.createElement)(m.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(k.__)("Block navigation structure"),ref:c},Object(l.createElement)(is.Provider,{value:a},Object(l.createElement)(ef,r)))}function af(e){var t=e.onSelect,n=void 0===t?d.noop:t,r=e.__experimentalFeatures,o=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockHierarchyRootClientId,r=t.getSelectedBlockClientId,o=t.__unstableGetClientIdsTree,c=t.__unstableGetClientIdWithClientIdsTree,i=r(),l=o();return{rootBlock:a&&!Object(d.isArray)(a)?c(n(i)):null,rootBlocks:l,selectedBlockClientId:i}})),c=o.rootBlock,i=o.rootBlocks,a=o.selectedBlockClientId,s=Object(v.useDispatch)(yr).selectBlock;if(!i||0===i.length)return null;var u=c&&(!zb(c.clientId,a)||c.innerBlocks&&0!==c.innerBlocks.length);return Object(l.createElement)("div",{className:"block-editor-block-navigation__container"},Object(l.createElement)("p",{className:"block-editor-block-navigation__label"},Object(k.__)("List view")),Object(l.createElement)(cf,{blocks:u?[c]:i,selectedBlockClientIds:[a],selectBlock:function(e){s(e),n(e)},__experimentalFeatures:r,showNestedBlocks:!0}))}function lf(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(j.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(Vl.useShortcut)("core/edit-post/toggle-block-navigation",Object(l.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var a=Object(v.useSelect)((function(e){return e(Vl.store).getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(l.createElement)(m.Button,Object(i.a)({},c,{ref:o,icon:Hl.a,"aria-expanded":r,"aria-haspopup":"true",onClick:t?n:void 0
61
+ /* translators: button label text should, if possible, be under 16 characters. */,label:Object(k.__)("List view"),className:"block-editor-block-navigation",shortcut:a,"aria-disabled":!t}))}var sf=Object(l.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(j.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(v.useSelect)((function(e){return!!e(yr).getBlockCount()}),[])&&!n;return Object(l.createElement)(m.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(l.createElement)(lf,Object(i.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(l.createElement)(af,{onSelect:t,__experimentalFeatures:r})}})})),uf=n(163),df=[li.rawShortcut.primary("z"),li.rawShortcut.primaryShift("z"),li.rawShortcut.primary("y")],bf=Object(l.createElement)(m.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(d.fromPairs)(df.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),ff=function(){return bf};function pf(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'<img src="'.concat(Object(zd.createBlobURL)(e),'">')})).join("")}var mf={position:"bottom right",isAlternate:!0},vf=function(){return Object(l.createElement)(l.Fragment,null,["bold","italic","link","text-color"].map((function(e){return Object(l.createElement)(m.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(l.createElement)(m.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(l.createElement)(m.ToolbarItem,null,(function(t){return Object(l.createElement)(m.DropdownMenu,{icon:es.a
62
+ /* translators: button label text should, if possible, be under 16 characters. */,label:Object(k.__)("More"),toggleProps:t,controls:Object(d.orderBy)(e.map((function(e){return Object(Co.a)(e,1)[0].props})),"title"),popoverProps:mf})}))})))},Of=function(e){var t=e.inline,n=e.anchorRef;return t?Object(l.createElement)(m.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar"},Object(l.createElement)("div",{className:"block-editor-rich-text__inline-format-toolbar-group"},Object(l.createElement)(m.ToolbarGroup,null,Object(l.createElement)(vf,null)))):Object(l.createElement)(Br,{group:"inline"},Object(l.createElement)(vf,null))};function gf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gf(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jf(e,t){if(t.length)for(var n=e.formats.length;n--;)e.formats[n]=[].concat(Object(y.a)(t),Object(y.a)(e.formats[n]||[]))}function yf(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function kf(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?kf.EMPTY_ARRAY:t||n?t||(Ft()("wp.blockEditor.RichText formattingControls prop",{since:"5.4",alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}kf.EMPTY_ARRAY=[];var _f=Object(l.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,s=t.onChange,d=t.isSelected,f=t.multiline,m=t.inlineToolbar,O=t.wrapperClassName,g=t.autocompleters,k=t.onReplace,_=t.placeholder,E=t.allowedFormats,w=t.formattingControls,C=t.withoutInteractiveFormatting,S=t.onRemove,B=t.onMerge,I=t.onSplit,x=t.__unstableOnSplitAtEnd,P=t.__unstableOnSplitMiddle,T=t.identifier,N=t.preserveWhiteSpace,D=t.__unstablePastePlainText,A=t.__unstableEmbedURLOnPaste,L=t.__unstableDisableFormats,R=t.disableLineBreaks,M=t.unstableOnFocus,F=t.__unstableAllowPrefixTransformations,V=t.__unstableMultilineRootTag,H=t.__unstableMobileNoFocusOnMount,z=t.deleteEnter,G=t.placeholderTextColor,U=t.textAlign,W=t.selectionColor,K=t.tagsToEliminate,q=t.rootTagsToEliminate,$=t.disableEditingMenu,Y=t.fontSize,X=t.fontFamily,Q=t.fontWeight,Z=t.fontStyle,J=t.minWidth,ee=t.maxWidth,te=t.onBlur,ne=t.setRef,re=Object(j.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","autocompleters","onReplace","placeholder","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","preserveWhiteSpace","__unstablePastePlainText","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks","unstableOnFocus","__unstableAllowPrefixTransformations","__unstableMultilineRootTag","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","fontSize","fontFamily","fontWeight","fontStyle","minWidth","maxWidth","onBlur","setRef"]),oe=Object(b.useInstanceId)(e);T=T||oe;var ce=Object(l.useRef)(),ie=h(),ae=ie.clientId,le=ie.isSelected,se=Object(v.useSelect)((function(e){var t,n=e(yr),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,c=n.getSelectionEnd,i=n.getSettings,a=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,u=n.isMultiSelecting,b=n.hasMultiSelection,f=o(),m=c(),v=i().__experimentalUndo;void 0===d?t=f.clientId===ae&&f.attributeKey===T:d&&(t=f.clientId===ae);var O={};if("native"===l.Platform.OS){var g=ae&&s(ae);O={shouldBlurOnUnmount:g&&t&&Object(p.isUnmodifiedDefaultBlock)(g)}}return hf({isCaretWithinFormattedText:r(),selectionStart:t?f.offset:void 0,selectionEnd:t?m.offset:void 0,isSelected:t,didAutomaticChange:a(),disabled:u()||b(),undo:v},O)})),ue=se.isCaretWithinFormattedText,de=se.selectionStart,be=se.selectionEnd,fe=se.isSelected,pe=se.didAutomaticChange,me=se.disabled,ve=se.undo,Oe=se.shouldBlurOnUnmount,ge=Object(v.useDispatch)(yr),he=ge.__unstableMarkLastChangeAsPersistent,je=ge.enterFormattedText,ye=ge.exitFormattedText,ke=ge.selectionChange,_e=ge.__unstableMarkAutomaticChange,Ee=yf(f),we=kf({allowedFormats:E,formattingControls:w,disableFormats:L}),Ce=!we||we.length>0,Se=a,Be=s;Array.isArray(a)&&(Se=p.children.toHTML(a),Be=function(e){return s(p.children.fromDOM(Object(c.__unstableCreateElement)(document,e).childNodes))});var Ie=Object(l.useCallback)((function(e,t){ke(ae,T,e,t)}),[ae,T]),xe=Object(l.useCallback)((function(e){var t=e.value,n=e.isReverse;B&&B(!n),S&&Object(c.isEmpty)(t)&&n&&S(!n)}),[B,S]),Pe=Object(l.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(k&&I){var n=[],r=Object(c.split)(e),o=Object(Co.a)(r,2),i=o[0],a=o[1],l=t.length>0,s=-1,u=Object(c.isEmpty)(i)&&!Object(c.isEmpty)(a);l&&Object(c.isEmpty)(i)||(n.push(I(Object(c.toHTMLString)({value:i,multilineTag:Ee}),!u)),s+=1),l?(n.push.apply(n,Object(y.a)(t)),s+=t.length):P&&n.push(P()),(l||P)&&Object(c.isEmpty)(a)||n.push(I(Object(c.toHTMLString)({value:a,multilineTag:Ee}),u));var d=l?s:1,b=l?-1:0;k(n,d,b)}}),[k,I,Ee,P]),Te=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=k&&I;if(k){var i=Object(p.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),a=Object(p.findTransform)(i,(function(e){return e.regExp.test(t.text)}));a&&(k([a.transform({content:t.text})]),_e())}if(f)r?R||n(Object(c.insert)(t,"\n")):o&&Object(c.__unstableIsEmptyLine)(t)?Pe(t):n(Object(c.__unstableInsertLineSeparator)(t));else{var l=t.text,s=t.start,u=t.end,d=x&&s===u&&u===l.length;r||!o&&!d?R||n(Object(c.insert)(t,"\n")):!o&&d?x():o&&Pe(t)}}),[k,I,_e,f,Pe,x]),Ne=Object(l.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,i=e.plainText,a=e.isInternal,l=e.files,s=e.activeFormats;if(a){var u=Object(c.create)({html:r,multilineTag:Ee,multilineWrapperTags:"li"===Ee?["ul","ol"]:void 0,preserveWhiteSpace:N});return jf(u,s),void n(Object(c.insert)(t,u))}if(D)n(Object(c.insert)(t,Object(c.create)({text:i})));else{if(l&&l.length&&!r){var d=Object(p.pasteHandler)({HTML:pf(l),mode:"BLOCKS",tagName:o,preserveWhiteSpace:N});return window.console.log("Received items:\n\n",l),void(k&&Object(c.isEmpty)(t)?k(d):Pe(t,d))}var b,f=k&&I?"AUTO":"INLINE";"AUTO"===f&&Object(c.isEmpty)(t)&&(b=i,Object(uf.regexp)(".*").test(b))&&(f="BLOCKS"),A&&Object(c.isEmpty)(t)&&Object(Su.isURL)(i.trim())&&(f="BLOCKS");var m=Object(p.pasteHandler)({HTML:r,plainText:i,mode:f,tagName:o,preserveWhiteSpace:N});if("string"==typeof m){var v=Object(c.create)({html:m});jf(v,s),Ee&&(v=Object(c.replace)(v,/\n+/g,c.__UNSTABLE_LINE_SEPARATOR)),n(Object(c.insert)(t,v))}else m.length>0&&(k&&Object(c.isEmpty)(t)?k(m,m.length-1,-1):Pe(t,m))}}),[o,k,I,Pe,A,Ee,N,D]),De=Object(l.useCallback)((function(e,t){if(k){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),i=Object(p.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),a=Object(p.findTransform)(i,(function(e){var t=e.prefix;return o===t}));if(a){var l=t(Object(c.slice)(e,n,r.length)),s=a.transform(l);k([s]),_e()}}}}),[k,_e]),Ae=Object(b.useMergeRefs)([n,ce]),Le=Object(l.createElement)(c.__experimentalRichText,Object(i.a)({clientId:ae,identifier:T,ref:Ae,value:Se,onChange:Be,selectionStart:de,selectionEnd:be,onSelectionChange:Ie,tagName:o,placeholder:_,allowedFormats:we,withoutInteractiveFormatting:C,onEnter:Te,onDelete:xe,onPaste:Ne,__unstableIsSelected:fe,__unstableInputRule:De,__unstableMultilineTag:Ee,__unstableIsCaretWithinFormattedText:ue,__unstableOnEnterFormattedText:je,__unstableOnExitFormattedText:ye,__unstableOnCreateUndoLevel:he,__unstableMarkAutomaticChange:_e,__unstableDidAutomaticChange:pe,__unstableUndo:ve,__unstableDisableFormats:L,preserveWhiteSpace:N,disabled:me,unstableOnFocus:M,__unstableAllowPrefixTransformations:F,__unstableMultilineRootTag:V},{},{blockIsSelected:void 0!==d?d:le,shouldBlurOnUnmount:Oe,__unstableMobileNoFocusOnMount:H,deleteEnter:z,placeholderTextColor:G,textAlign:U,selectionColor:W,tagsToEliminate:K,rootTagsToEliminate:q,disableEditingMenu:$,fontSize:Y,fontFamily:X,fontWeight:Q,fontStyle:Z,minWidth:J,maxWidth:ee,onBlur:te,setRef:ne,id:re.id,style:re.style}),(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,a=e.editableProps,s=e.editableTagName;return Object(l.createElement)(l.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&Ce&&Object(l.createElement)(Of,{inline:m,anchorRef:ce.current}),t&&Object(l.createElement)(ff,null),Object(l.createElement)(kl,{onReplace:k,completers:g,record:n,onChange:o,isSelected:t,contentRef:ce},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(l.createElement)(s,Object(i.a)({},a,re,{style:re.style?hf(hf({},re.style),a.style):a.style,className:u()("block-editor-rich-text__editable",re.className,a.className),"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,onKeyDown:function(e){r(e),a.onKeyDown(e)}}))})))}));return O?(Ft()("wp.blockEditor.RichText wrapperClassName prop",{since:"5.4",alternative:"className prop or create your own wrapper div"}),Object(l.createElement)("div",{className:u()("block-editor-rich-text",O)},Le)):Le}));_f.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(j.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=p.children.toHTML(t));var c=yf(r);!t&&c&&(t="<".concat(c,"></").concat(c,">"));var i=Object(l.createElement)(l.RawHTML,null,t);return n?Object(l.createElement)(n,Object(d.omit)(o,["format"]),i):i},_f.isEmpty=function(e){return!e||0===e.length},_f.Content.defaultProps={format:"string",value:""};var Ef=_f;function wf(e){var t=e.value,n=e.onChange;return Object(l.createElement)($b,null,Object(l.createElement)(Ef,{value:t,onChange:n,placeholder:Object(k.__)("Navigation item"),withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Cf=n(245),Sf=function(e){var t=e.icon,n=void 0===t?Cf.a:t,r=e.label,o=void 0===r?Object(k.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(k.__)("Select a variation to start with."):c,a=e.variations,s=e.onSelect,d=e.allowSkip,b=u()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(l.createElement)(m.Placeholder,{icon:n,label:o,instructions:i,className:b},Object(l.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(k.__)("Block variations")},a.map((function(e){return Object(l.createElement)("li",{key:e.name},Object(l.createElement)(m.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return s(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(l.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),d&&Object(l.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(l.createElement)(m.Button,{isLink:!0,onClick:function(){return s()}},Object(k.__)("Skip"))))},Bf=function(e,t){if(t&&e){var n=t.filter((function(t){var n=t.attributes;return!(!n||!Object.keys(n).length)&&Object(d.isMatch)(e,n)}));if(1===n.length)return n[0]}};function If(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var xf=function(e){var t=e.blockClientId,n=Object(l.useState)(),r=Object(Co.a)(n,2),o=r[0],c=r[1],i=Object(v.useDispatch)(yr).updateBlockAttributes,s=Object(v.useSelect)((function(e){var n=e(p.store).getBlockVariations,r=e(yr),o=r.getBlockName,c=r.getBlockAttributes,i=t&&o(t);return{variations:i&&n(i,"transform"),blockAttributes:c(t)}}),[t]),u=s.variations,d=s.blockAttributes;if(Object(l.useEffect)((function(){var e;c(null===(e=Bf(d,u))||void 0===e?void 0:e.name)}),[d,u]),null==u||!u.length)return null;var b=u.map((function(e){return{value:e.name,label:e.title,info:e.description}})),f=function(e){i(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?If(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},u.find((function(t){return t.name===e})).attributes))},O="block-editor-block-variation-transforms";return Object(l.createElement)(m.DropdownMenu,{className:O,label:Object(k.__)("Transform to variation"),text:Object(k.__)("Transform to variation"),popoverProps:{position:"bottom center",className:"".concat(O,"__popover")},icon:es.a,toggleProps:{iconPosition:"right"}},(function(){return Object(l.createElement)("div",{className:"".concat(O,"__container")},Object(l.createElement)(m.MenuGroup,null,Object(l.createElement)(m.MenuItemsChoice,{choices:b,value:o,onSelect:f})))}))},Pf=Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(m.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Tf=Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(m.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function Nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Df(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nf(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Af={top:{icon:Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(m.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(k._x)("Align top","Block vertical alignment setting")},center:{icon:Tf,title:Object(k._x)("Align middle","Block vertical alignment setting")},bottom:{icon:Pf,title:Object(k._x)("Align bottom","Block vertical alignment setting")}},Lf=["top","center","bottom"],Rf={isAlternate:!0},Mf=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Lf:r,c=e.isCollapsed,a=void 0===c||c,s=e.isToolbar,u=e.isToolbarButton,d=void 0===u||u,b=Af[t],f=Af.top,p=s?m.ToolbarGroup:m.DropdownMenu,v=s?{isCollapsed:a}:{isToolbarButton:d};return Object(l.createElement)(p,Object(i.a)({popoverProps:Rf,icon:b?b.icon:f.icon,label:Object(k._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return Df(Df({},Af[e]),{},{isActive:t===e,role:a?"menuitemradio":void 0,onClick:(r=e,function(){return n(t===r?void 0:r)})});var r}))},v))};function Ff(e){return Object(l.createElement)(Mf,Object(i.a)({},e,{isToolbar:!1}))}function Vf(e){return Object(l.createElement)(Mf,Object(i.a)({},e,{isToolbar:!0}))}function Hf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hf(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gf=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=wo("color.palette"),r=!wo("color.custom"),o=void 0===t.colors?n:t.colors,c=void 0===t.disableCustomColors?r:t.disableCustomColors,i=!Object(d.isEmpty)(o)||!c;return Object(l.createElement)(e,zf(zf({},t),{},{colors:o,disableCustomColors:c,hasColorsToChoose:i}))}}),"withColorContext"),Uf=Gf(m.ColorPalette);function Wf(e){var t=e.onChange,n=e.value,r=Object(j.a)(e,["onChange","value"]);return Object(l.createElement)(Ko,Object(i.a)({},r,{onColorChange:t,colorValue:n,gradients:[],disableCustomGradients:!0}))}var Kf=[];function qf(e){var t=wo("color.gradients")||Kf,n=!wo("color.customGradient");return Object(l.createElement)(m.__experimentalGradientPicker,Object(i.a)({gradients:void 0!==e.gradients?e.gradient:t,disableCustomGradients:void 0!==e.disableCustomGradients?e.disableCustomGradients:n},e))}var $f=function(e){var t=void 0!==e.gradients&&void 0!==e.disableCustomGradients?m.__experimentalGradientPicker:qf;return Object(l.createElement)(t,e)};function Yf(e){var t=e.className,n=e.value,r=e.onChange,o=e.label,c=void 0===o?Object(k.__)("Gradient Presets"):o,a=Object(j.a)(e,["className","value","onChange","label"]),s=wo("color.gradients"),b=!wo("color.customGradient");return Object(d.isEmpty)(s)&&b?null:Object(l.createElement)(m.BaseControl,{className:u()("block-editor-gradient-picker-control",t)},Object(l.createElement)(m.BaseControl.VisualLabel,null,c),Object(l.createElement)($f,Object(i.a)({value:n,onChange:r,className:"block-editor-gradient-picker-control__gradient-picker-presets",gradients:s,disableCustomGradients:b},a)))}function Xf(e){var t=wo("color.gradients");return Object(d.isEmpty)(t)?null:Object(l.createElement)(m.PanelBody,{title:Object(k.__)("Gradient")},Object(l.createElement)(Yf,e))}var Qf=[25,50,75,100];function Zf(e){var t,n,r=e.imageWidth,o=e.imageHeight,c=e.imageSizeOptions,i=void 0===c?[]:c,a=e.isResizable,s=void 0===a||a,u=e.slug,b=e.width,f=e.height,p=e.onChange,v=e.onChangeImage,O=void 0===v?d.noop:v;function g(e,t){return function(){p({width:e,height:t})}}return Object(l.createElement)(l.Fragment,null,!Object(d.isEmpty)(i)&&Object(l.createElement)(m.SelectControl,{label:Object(k.__)("Image size"),value:u,options:i,onChange:O}),s&&Object(l.createElement)("div",{className:"block-editor-image-size-control"},Object(l.createElement)("p",{className:"block-editor-image-size-control__row"},Object(k.__)("Image dimensions")),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__width",label:Object(k.__)("Width"),value:null!==(t=null!=b?b:r)&&void 0!==t?t:"",min:1,onChange:function(e){return p({width:parseInt(e,10)})}}),Object(l.createElement)(m.TextControl,{type:"number",className:"block-editor-image-size-control__height",label:Object(k.__)("Height"),value:null!==(n=null!=f?f:o)&&void 0!==n?n:"",min:1,onChange:function(e){return p({height:parseInt(e,10)})}})),Object(l.createElement)("div",{className:"block-editor-image-size-control__row"},Object(l.createElement)(m.ButtonGroup,{"aria-label":Object(k.__)("Image size presets")},Qf.map((function(e){var t=Math.round(r*(e/100)),n=Math.round(o*(e/100)),c=b===t&&f===n;return Object(l.createElement)(m.Button,{key:e,isSmall:!0,isPrimary:c,isPressed:c,onClick:g(t,n)},e,"%")}))),Object(l.createElement)(m.Button,{isSmall:!0,onClick:g()},Object(k.__)("Reset")))))}var Jf=Object(b.createHigherOrderComponent)((function(e){return function(t){var n=h().clientId;return Object(l.createElement)(e,Object(i.a)({},t,{clientId:n}))}}),"withClientId"),ep=Jf((function(e){var t=e.clientId,n=e.showSeparator,r=e.isFloating,o=e.onAddBlock;return Object(l.createElement)(qu,{rootClientId:t,showSeparator:n,isFloating:r,onAddBlock:o})})),tp=Object(b.compose)([Jf,Object(v.withSelect)((function(e,t){var n=t.clientId,r=(0,e(yr).getBlockOrder)(n);return{lastBlockClientId:Object(d.last)(r)}}))])((function(e){var t=e.clientId,n=e.lastBlockClientId;return Object(l.createElement)(Ku,{rootClientId:t,lastBlockClientId:n})})),np=n(75),rp=n.n(np),op=new WeakMap;function cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ip(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ap(e){var t=e.clientId,n=e.allowedBlocks,r=e.template,o=e.templateLock,c=e.wrapperRef,i=e.templateInsertUpdatesSelection,a=e.__experimentalCaptureToolbars,s=e.__experimentalAppenderTagName,u=e.renderAppender,b=e.orientation,f=e.placeholder,m=e.__experimentalLayout;!function(e,t,n,r,o){var c=Object(v.useDispatch)(yr).updateBlockListSettings,i=Object(v.useSelect)((function(t){var n=t(yr).getBlockRootClientId(e);return{blockListSettings:t(yr).getBlockListSettings(e),parentLock:t(yr).getTemplateLock(n)}}),[e]),a=i.blockListSettings,s=i.parentLock,u=Object(l.useMemo)((function(){return t}),t);Object(l.useLayoutEffect)((function(){var t={allowedBlocks:u,templateLock:void 0===n?s:n};void 0!==r&&(t.__experimentalCaptureToolbars=r),void 0!==o&&(t.orientation=o),rp()(a,t)||c(e,t)}),[e,a,u,n,s,r,o,c])}(t,n,o,a,b),function(e,t,n,r){var o=Object(v.useSelect)(yr).getSelectedBlocksInitialCaretPosition,c=Object(v.useDispatch)(yr).replaceInnerBlocks,i=Object(v.useSelect)((function(t){return t(yr).getBlocks(e)}),[e]),a=Object(l.useRef)(null);Object(l.useLayoutEffect)((function(){if((0===i.length||"all"===n)&&!Object(d.isEqual)(t,a.current)){a.current=t;var l=Object(p.synchronizeBlocksWithTemplate)(i,t);Object(d.isEqual)(l,i)||c(e,l,0===i.length&&r&&0!==l.length,o())}}),[i,t,n,e])}(t,r,o,i);var O=Object(v.useSelect)((function(e){var n=e(yr).getBlock(t),r=Object(p.getBlockType)(n.name);if(r&&r.providesContext)return function(e,t){op.has(t)||op.set(t,new WeakMap);var n=op.get(t);if(!n.has(e)){var r=Object(d.mapValues)(t.providesContext,(function(t){return e[t]}));n.set(e,r)}return n.get(e)}(n.attributes,r)}),[t]);return Object(l.createElement)(Tl,{value:O},Object(l.createElement)(_b,{rootClientId:t,renderAppender:u,__experimentalAppenderTagName:s,__experimentalLayout:m,wrapperRef:c,placeholder:f}))}function lp(e){return qs(e),Object(l.createElement)(ap,e)}var sp=Object(l.forwardRef)((function(e,t){var n=up({ref:t},e);return Object(l.createElement)("div",{className:"block-editor-inner-blocks"},Object(l.createElement)("div",n))}));function up(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=h(),r=n.clientId,o=Object(b.useViewportMatch)("medium","<"),c=Object(v.useSelect)((function(e){var t=e(yr),n=t.getBlockName,c=t.isBlockSelected,i=t.hasSelectedInnerBlock,a=(0,t.isNavigationMode)()||o;return"core/template"!==n(r)&&!c(r)&&!i(r,!0)&&a}),[r,o]),a=Object(b.useMergeRefs)([e.ref,ed({rootClientId:r})]),s=t.value&&t.onChange?lp:ap;return ip(ip({},e),{},{ref:a,className:u()(e.className,"block-editor-block-list__layout",{"has-overlay":c}),children:Object(l.createElement)(s,Object(i.a)({},t,{clientId:r}))})}sp.DefaultBlockAppender=tp,sp.ButtonBlockAppender=ep,sp.Content=Object(p.withBlockContentContext)((function(e){var t=e.BlockContent;return Object(l.createElement)(t,null)}));var dp=sp,bp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),fp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),pp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),mp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(Ir.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),vp={left:bp,center:fp,right:pp,"space-between":mp},Op=function(e){var t=e.allowedControls,n=void 0===t?["left","center","right","space-between"]:t,r=e.isCollapsed,o=void 0===r||r,c=e.onChange,a=e.value,s=e.popoverProps,u=e.isToolbar,d=e.isToolbarButton,b=void 0===d||d,f=function(e){c(e===a?void 0:e)},p=a?vp[a]:vp.left,v=[{name:"left",icon:bp,title:Object(k.__)("Justify items left"),isActive:"left"===a,onClick:function(){return f("left")}},{name:"center",icon:fp,title:Object(k.__)("Justify items center"),isActive:"center"===a,onClick:function(){return f("center")}},{name:"right",icon:pp,title:Object(k.__)("Justify items right"),isActive:"right"===a,onClick:function(){return f("right")}},{name:"space-between",icon:mp,title:Object(k.__)("Space between items"),isActive:"space-between"===a,onClick:function(){return f("space-between")}}],O=u?m.ToolbarGroup:m.DropdownMenu,g=u?{isCollapsed:o}:{isToolbarButton:b};return Object(l.createElement)(O,Object(i.a)({icon:p,popoverProps:s,label:Object(k.__)("Change items justification"),controls:v.filter((function(e){return n.includes(e.name)}))},g))};function gp(e){return Object(l.createElement)(Op,Object(i.a)({},e,{isToolbar:!1}))}function hp(e){return Object(l.createElement)(Op,Object(i.a)({},e,{isToolbar:!0}))}var jp=n(286);function yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _p=[{id:"opensInNewTab",title:Object(k.__)("Open in new tab")}],Ep=function(e){var t=e.value,n=e.onChange,r=void 0===n?d.noop:n,o=e.settings,c=void 0===o?_p:o;if(!c||!c.length)return null;var i=function(e){return function(n){r(kp(kp({},t),{},Object(a.a)({},e.id,n)))}},s=c.map((function(e){return Object(l.createElement)(m.ToggleControl,{className:"block-editor-link-control__setting",key:e.id,label:e.title,onChange:i(e),checked:!!t&&!!t[e.id]})}));return Object(l.createElement)("fieldset",{className:"block-editor-link-control__settings"},Object(l.createElement)(m.VisuallyHidden,{as:"legend"},Object(k.__)("Currently selected link settings")),s)};var wp=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(e){var t;return Object(pa.a)(this,o),(t=r.call(this,e)).onChange=t.onChange.bind(Object(va.a)(t)),t.onFocus=t.onFocus.bind(Object(va.a)(t)),t.onKeyDown=t.onKeyDown.bind(Object(va.a)(t)),t.selectLink=t.selectLink.bind(Object(va.a)(t)),t.handleOnClick=t.handleOnClick.bind(Object(va.a)(t)),t.bindSuggestionNode=t.bindSuggestionNode.bind(Object(va.a)(t)),t.autocompleteRef=e.autocompleteRef||Object(l.createRef)(),t.inputRef=Object(l.createRef)(),t.updateSuggestions=Object(d.debounce)(t.updateSuggestions.bind(Object(va.a)(t)),200),t.suggestionNodes=[],t.isUpdatingSuggestions=!1,t.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""},t}return Object(ma.a)(o,[{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,r=n.showSuggestions,o=n.selectedSuggestion,c=this.props.value;r&&null!==o&&this.suggestionNodes[o]&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,Bb()(this.suggestionNodes[o],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((function(){t.scrollingIntoView=!1}),100)),e.value!==c&&this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentDidMount",value:function(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}},{key:"componentWillUnmount",value:function(){var e,t;null===(e=this.suggestionsRequest)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),delete this.suggestionsRequest}},{key:"bindSuggestionNode",value:function(e){var t=this;return function(n){t.suggestionNodes[e]=n}}},{key:"shouldShowInitialSuggestions",value:function(){var e=this.state.suggestions,t=this.props,n=t.__experimentalShowInitialSuggestions,r=void 0!==n&&n,o=t.value;return!this.isUpdatingSuggestions&&r&&!(o&&o.length)&&!(e&&e.length)}},{key:"updateSuggestions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.props,r=n.__experimentalFetchLinkSuggestions,o=n.__experimentalHandleURLSuggestions;if(r){var c=!(t&&t.length);if(c||!(t.length<2||!o&&Object(Su.isURL)(t))){this.isUpdatingSuggestions=!0,this.setState({selectedSuggestion:null,loading:!0});var i=r(t,{isInitialSuggestions:c});i.then((function(t){e.suggestionsRequest===i&&(e.setState({suggestions:t,loading:!1,showSuggestions:!!t.length}),t.length?e.props.debouncedSpeak(Object(k.sprintf)(
63
  /* translators: %s: number of results. */
64
+ Object(k._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):e.props.debouncedSpeak(Object(k.__)("No results."),"assertive"),e.isUpdatingSuggestions=!1)})).catch((function(){e.suggestionsRequest===i&&(e.setState({loading:!1}),e.isUpdatingSuggestions=!1)})),this.suggestionsRequest=i}else this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1})}}},{key:"onChange",value:function(e){var t=e.target.value;this.props.onChange(t),this.props.disableSuggestions||this.updateSuggestions(t.trim())}},{key:"onFocus",value:function(){var e=this.state.suggestions,t=this.props,n=t.disableSuggestions,r=t.value;!r||n||this.isUpdatingSuggestions||e&&e.length||this.updateSuggestions(r.trim())}},{key:"onKeyDown",value:function(e){var t=this.state,n=t.showSuggestions,r=t.selectedSuggestion,o=t.suggestions,c=t.loading;if(n&&o.length&&!c){var i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case li.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case li.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case li.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(k.__)("Link selected.")));break;case li.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case li.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case li.DOWN:this.props.value.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length))}}},{key:"selectLink",value:function(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}},{key:"handleOnClick",value:function(e){this.selectLink(e),this.inputRef.current.focus()}},{key:"render",value:function(){return Object(l.createElement)(l.Fragment,null,this.renderControl(),this.renderSuggestions())}},{key:"renderControl",value:function(){var e=this.props,t=e.label,n=e.className,r=e.isFullWidth,o=e.instanceId,c=e.placeholder,i=void 0===c?Object(k.__)("Paste URL or type to search"):c,a=e.__experimentalRenderControl,s=e.value,d=void 0===s?"":s,b=this.state,f=b.loading,p=b.showSuggestions,v=b.selectedSuggestion,O=b.suggestionsListboxId,g=b.suggestionOptionIdPrefix,h={id:"url-input-control-".concat(o),label:t,className:u()("block-editor-url-input",n,{"is-full-width":r})},j={value:d,required:!0,className:"block-editor-url-input__input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:i,onKeyDown:this.onKeyDown,role:"combobox","aria-label":Object(k.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":O,"aria-activedescendant":null!==v?"".concat(g,"-").concat(v):void 0,ref:this.inputRef};return a?a(h,j,f):Object(l.createElement)(m.BaseControl,h,Object(l.createElement)("input",j),f&&Object(l.createElement)(m.Spinner,null))}},{key:"renderSuggestions",value:function(){var e=this,t=this.props,n=t.className,r=t.__experimentalRenderSuggestions,o=t.value,c=void 0===o?"":o,a=t.__experimentalShowInitialSuggestions,s=void 0!==a&&a,b=this.state,f=b.showSuggestions,p=b.suggestions,v=b.selectedSuggestion,O=b.suggestionsListboxId,g=b.suggestionOptionIdPrefix,h=b.loading,j={id:O,ref:this.autocompleteRef,role:"listbox"},y=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(g,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===v}};return Object(d.isFunction)(r)&&f&&p.length?r({suggestions:p,selectedSuggestion:v,suggestionsListProps:j,buildSuggestionItemProps:y,isLoading:h,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:s&&!(c&&c.length)}):!Object(d.isFunction)(r)&&f&&p.length?Object(l.createElement)(m.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(l.createElement)("div",Object(i.a)({},j,{className:u()("block-editor-url-input__suggestions","".concat(n,"__suggestions"))}),p.map((function(t,n){return Object(l.createElement)(m.Button,Object(i.a)({},y(0,n),{key:t.id,className:u()("block-editor-url-input__suggestion",{"is-selected":n===v}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.instanceId,o=e.disableSuggestions,c=e.__experimentalShowInitialSuggestions,i=void 0!==c&&c,a=t.showSuggestions,l=n&&n.length;return i||l||(a=!1),!0===o&&(a=!1),{showSuggestions:a,suggestionsListboxId:"block-editor-url-input-suggestions-".concat(r),suggestionOptionIdPrefix:"block-editor-url-input-suggestion-".concat(r)}}}]),o}(l.Component),Cp=Object(b.compose)(b.withSafeTimeout,m.withSpokenMessages,b.withInstanceId,Object(v.withSelect)((function(e,t){if(!Object(d.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e(yr).getSettings)().__experimentalFetchLinkSuggestions}})))(wp),Sp=function(e){var t,n=e.searchTerm,r=e.onClick,o=e.itemProps,c=e.isSelected,a=e.buttonText;return n?(t=a?Object(d.isFunction)(a)?a(n):a:Object(l.createInterpolateElement)(Object(k.sprintf)(
65
  /* translators: %s: search term. */
66
+ Object(k.__)("Create: <mark>%s</mark>"),n),{mark:Object(l.createElement)("mark",null)}),Object(l.createElement)(m.Button,Object(i.a)({},o,{className:u()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":c}),onClick:r}),Object(l.createElement)(ra.a,{className:"block-editor-link-control__search-item-icon",icon:Vs.a}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},t)))):null},Bp=Object(l.createElement)(Ir.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(l.createElement)(Ir.Path,{d:"M9 0C4.03 0 0 4.03 0 9s4.03 9 9 9 9-4.03 9-9-4.03-9-9-9zM1.11 9.68h2.51c.04.91.167 1.814.38 2.7H1.84c-.403-.85-.65-1.764-.73-2.7zm8.57-5.4V1.19c.964.366 1.756 1.08 2.22 2 .205.347.386.708.54 1.08l-2.76.01zm3.22 1.35c.232.883.37 1.788.41 2.7H9.68v-2.7h3.22zM8.32 1.19v3.09H5.56c.154-.372.335-.733.54-1.08.462-.924 1.255-1.64 2.22-2.01zm0 4.44v2.7H4.7c.04-.912.178-1.817.41-2.7h3.21zm-4.7 2.69H1.11c.08-.936.327-1.85.73-2.7H4c-.213.886-.34 1.79-.38 2.7zM4.7 9.68h3.62v2.7H5.11c-.232-.883-.37-1.788-.41-2.7zm3.63 4v3.09c-.964-.366-1.756-1.08-2.22-2-.205-.347-.386-.708-.54-1.08l2.76-.01zm1.35 3.09v-3.04h2.76c-.154.372-.335.733-.54 1.08-.464.92-1.256 1.634-2.22 2v-.04zm0-4.44v-2.7h3.62c-.04.912-.178 1.817-.41 2.7H9.68zm4.71-2.7h2.51c-.08.936-.327 1.85-.73 2.7H14c.21-.87.337-1.757.38-2.65l.01-.05zm0-1.35c-.046-.894-.176-1.78-.39-2.65h2.16c.403.85.65 1.764.73 2.7l-2.5-.05zm1-4H13.6c-.324-.91-.793-1.76-1.39-2.52 1.244.56 2.325 1.426 3.14 2.52h.04zm-9.6-2.52c-.597.76-1.066 1.61-1.39 2.52H2.65c.815-1.094 1.896-1.96 3.14-2.52zm-3.15 12H4.4c.324.91.793 1.76 1.39 2.52-1.248-.567-2.33-1.445-3.14-2.55l-.01.03zm9.56 2.52c.597-.76 1.066-1.61 1.39-2.52h1.76c-.82 1.08-1.9 1.933-3.14 2.48l-.01.04z"})),Ip=function(e){var t=e.itemProps,n=e.suggestion,r=e.isSelected,o=void 0!==r&&r,c=e.onClick,a=e.isURL,s=void 0!==a&&a,d=e.searchTerm,b=void 0===d?"":d,f=e.shouldShowType,p=void 0!==f&&f;return Object(l.createElement)(m.Button,Object(i.a)({},t,{onClick:c,className:u()("block-editor-link-control__search-item",{"is-selected":o,"is-url":s,"is-entity":!s})}),s&&Object(l.createElement)(ra.a,{className:"block-editor-link-control__search-item-icon",icon:Bp}),Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(l.createElement)(m.TextHighlight,{text:n.title,highlight:b})),Object(l.createElement)("span",{"aria-hidden":!s,className:"block-editor-link-control__search-item-info"},!s&&(Object(Su.filterURLForDisplay)(Object(Su.safeDecodeURI)(n.url))||""),s&&Object(k.__)("Press ENTER to add this link"))),p&&n.type&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-type"},"post_tag"===n.type?"tag":n.type))};function xp(e){var t=e.instanceId,n=e.withCreateSuggestion,r=e.currentInputValue,o=e.handleSuggestionClick,c=e.suggestionsListProps,a=e.buildSuggestionItemProps,s=e.suggestions,d=e.selectedSuggestion,b=e.isLoading,f=e.isInitialSuggestions,p=e.createSuggestionButtonText,v=e.suggestionsQuery,O=u()("block-editor-link-control__search-results",{"is-loading":b}),g=["url","mailto","tel","internal"],h=1===s.length&&g.includes(s[0].type.toLowerCase()),j=n&&!h&&!f,y=!(null!=v&&v.type),_="block-editor-link-control-search-results-label-".concat(t),E=f?Object(k.__)("Recently updated"):Object(k.sprintf)(
67
  /* translators: %s: search term. */
68
+ Object(k.__)('Search results for "%s"'),r),w=Object(l.createElement)(f?l.Fragment:m.VisuallyHidden,{},Object(l.createElement)("span",{className:"block-editor-link-control__search-results-label",id:_},E));return Object(l.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},w,Object(l.createElement)("div",Object(i.a)({},c,{className:O,"aria-labelledby":_}),s.map((function(e,t){return j&&"__CREATE__"===e.type?Object(l.createElement)(Sp,{searchTerm:r,buttonText:p,onClick:function(){return o(e)},key:e.type,itemProps:a(e,t),isSelected:t===d}):"__CREATE__"===e.type?null:Object(l.createElement)(Ip,{key:"".concat(e.id,"-").concat(e.type),itemProps:a(e,t),suggestion:e,index:t,onClick:function(){o(e)},isSelected:t===d,isURL:g.includes(e.type.toLowerCase()),searchTerm:r,shouldShowType:y})}))))}function Pp(e){var t=Object(d.startsWith)(e,"#");return Object(Su.isURL)(e)||e&&e.includes("www.")||t}function Tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Np(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Dp=function(){return Promise.resolve([])},Ap=function(e){var t="URL",n=Object(Su.getProtocol)(e)||"";return n.includes("mailto")&&(t="mailto"),n.includes("tel")&&(t="tel"),Object(d.startsWith)(e,"#")&&(t="internal"),Promise.resolve([{id:e,title:e,url:"URL"===t?Object(Su.prependHTTP)(e):e,type:t}])},Lp=function(){var e=Object(zl.a)(Lt.a.mark((function e(t,n,r,o,c,i){var a,l,s;return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.isInitialSuggestions,e.next=3,Promise.all([r(t,n),o(t)]);case 3:if(l=e.sent,s=!t.includes(" "),l=s&&i&&!a?l[0].concat(l[1]):l[0],!a){e.next=8;break}return e.abrupt("return",l);case 8:return e.abrupt("return",Pp(t)||!c?l:l.concat({title:t,url:t,type:"__CREATE__"}));case 9:case"end":return e.stop()}}),e)})));return function(_x,t,n,r,o,c){return e.apply(this,arguments)}}();function Rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rp(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Fp=Promise.resolve([]),Vp=Object(l.forwardRef)((function(e,t){var n=e.value,r=e.children,o=e.currentLink,c=void 0===o?{}:o,i=e.className,a=void 0===i?null:i,s=e.placeholder,u=void 0===s?null:s,f=e.withCreateSuggestion,p=void 0!==f&&f,m=e.onCreateSuggestion,O=void 0===m?d.noop:m,g=e.onChange,h=void 0===g?d.noop:g,j=e.onSelect,y=void 0===j?d.noop:j,_=e.showSuggestions,E=void 0===_||_,w=e.renderSuggestions,C=void 0===w?function(e){return Object(l.createElement)(xp,e)}:w,S=e.fetchSuggestions,B=void 0===S?null:S,I=e.allowDirectEntry,x=void 0===I||I,P=e.showInitialSuggestions,T=void 0!==P&&P,N=e.suggestionsQuery,D=void 0===N?{}:N,A=e.withURLSuggestion,L=void 0===A||A,R=e.createSuggestionButtonText,M=function(e,t,n,r){var o=Object(v.useSelect)((function(e){return{fetchSearchSuggestions:(0,e(yr).getSettings)().__experimentalFetchLinkSuggestions}}),[]).fetchSearchSuggestions,c=t?Ap:Dp;return Object(l.useCallback)((function(t,i){var a=i.isInitialSuggestions;return Pp(t)?c(t,{isInitialSuggestions:a}):Lp(t,Np(Np({},e),{},{isInitialSuggestions:a}),o,c,n,r)}),[c,o,n])}(D,x,p,L),F=E?B||M:Fp,V=Object(b.useInstanceId)(Vp),H=Object(l.useState)(),z=Object(Co.a)(H,2),G=z[0],U=z[1],W=function(){var e=Object(zl.a)(Lt.a.mark((function e(t){var n,r;return Lt.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,"__CREATE__"!==t.type){e.next=12;break}return e.prev=2,e.next=5,O(t.title);case 5:n=e.sent,null!==(r=n)&&void 0!==r&&r.url&&y(n),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return");case 12:(x||n&&Object.keys(n).length>=1)&&y(Mp(Mp({},Object(d.omit)(c,"id","url")),n),n);case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(_x){return e.apply(this,arguments)}}();return Object(l.createElement)("form",{onSubmit:function(e){e.preventDefault(),W(G||{url:n})}},Object(l.createElement)(Cp,{className:a,value:n,onChange:function(e,t){h(e),U(t)},placeholder:null!=u?u:Object(k.__)("Search or type url"),__experimentalRenderSuggestions:E?function(e){return C(Mp(Mp({},e),{},{instanceId:V,withCreateSuggestion:p,currentInputValue:n,createSuggestionButtonText:R,suggestionsQuery:D,handleSuggestionClick:function(t){e.handleSuggestionClick&&e.handleSuggestionClick(t),W(t)}}))}:null,__experimentalFetchLinkSuggestions:F,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:T,ref:t}),r)})),Hp=Vp,zp=Object(m.createSlotFill)("BlockEditorLinkControlViewer"),Gp=zp.Slot,Up=zp.Fill;function Wp(e){var t=e.value,n=e.onEditClick,r=t&&Object(Su.filterURLForDisplay)(Object(Su.safeDecodeURI)(t.url),16)||"";return Object(l.createElement)("div",{"aria-label":Object(k.__)("Currently selected"),"aria-selected":"true",className:u()("block-editor-link-control__search-item",{"is-current":!0})},Object(l.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(l.createElement)(m.ExternalLink,{className:"block-editor-link-control__search-item-title",href:t.url},t&&t.title||r),t&&t.title&&Object(l.createElement)("span",{className:"block-editor-link-control__search-item-info"},r)),Object(l.createElement)(m.Button,{isSecondary:!0,onClick:function(){return n()},className:"block-editor-link-control__search-item-action"},Object(k.__)("Edit")),Object(l.createElement)(Gp,{fillProps:t}))}var Kp=function(e){var t=!1;return{promise:new Promise((function(n,r){e.then((function(e){return t?r({isCanceled:!0}):n(e)}),(function(e){return r(t?{isCanceled:!0}:e)}))})),cancel:function(){t=!0}}};function qp(e){var t=e.searchInputPlaceholder,n=e.value,r=e.settings,o=e.onChange,c=void 0===o?d.noop:o,i=e.noDirectEntry,a=void 0!==i&&i,s=e.showSuggestions,u=void 0===s||s,b=e.showInitialSuggestions,f=e.forceIsEditingLink,p=e.createSuggestion,v=e.withCreateSuggestion,O=e.inputValue,g=void 0===O?"":O,h=e.suggestionsQuery,j=void 0===h?{}:h,y=e.noURLSuggestion,_=void 0!==y&&y,E=e.createSuggestionButtonText;void 0===v&&p&&(v=!0);var w=Object(l.useRef)(!0),C=Object(l.useRef)(),S=Object(l.useState)(n&&n.url||""),B=Object(Co.a)(S,2),I=B[0],x=B[1],P=g||I,T=Object(l.useState)(void 0!==f?f:!n||!n.url),N=Object(Co.a)(T,2),D=N[0],A=N[1],L=Object(l.useRef)(!1);Object(l.useEffect)((function(){void 0!==f&&f!==D&&A(f)}),[f]),Object(l.useEffect)((function(){w.current?w.current=!1:(C.current.contains(C.current.ownerDocument.activeElement)||(Wl.focus.focusable.find(C.current)[0]||C.current).focus(),L.current=!1)}),[D]);var R=function(e){var t=Object(l.useRef)(),n=Object(l.useState)(!1),r=Object(Co.a)(n,2),o=r[0],c=r[1],i=Object(l.useState)(null),a=Object(Co.a)(i,2),s=a[0],u=a[1],d=function(){var n=Object(zl.a)(Lt.a.mark((function n(r){return Lt.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c(!0),u(null),n.prev=2,t.current=Kp(Promise.resolve(e(r))),n.next=6,t.current.promise;case 6:return n.abrupt("return",n.sent);case 9:if(n.prev=9,n.t0=n.catch(2),!n.t0||!n.t0.isCanceled){n.next=13;break}return n.abrupt("return");case 13:throw u(n.t0.message||Object(k.__)("An unknown error occurred during creation. Please try again.")),n.t0;case 15:return n.prev=15,c(!1),n.finish(15);case 18:case"end":return n.stop()}}),n,null,[[2,9,15,18]])})));return function(_x){return n.apply(this,arguments)}}();return Object(l.useEffect)((function(){return function(){t.current&&t.current.cancel()}}),[]),{createPage:d,isCreatingPage:o,errorMessage:s}}(p),M=R.createPage,F=R.isCreatingPage,V=R.errorMessage;return Object(l.createElement)("div",{tabIndex:-1,ref:C,className:"block-editor-link-control"},F&&Object(l.createElement)("div",{className:"block-editor-link-control__loading"},Object(l.createElement)(m.Spinner,null)," ",Object(k.__)("Creating"),"…"),(D||!n)&&!F&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(l.createElement)(Hp,{currentLink:n,className:"block-editor-link-control__search-input",placeholder:t,value:P,withCreateSuggestion:v,onCreateSuggestion:M,onChange:x,onSelect:function(e){var t;c(e),L.current=!(null===(t=C.current)||void 0===t||!t.contains(C.current.ownerDocument.activeElement)),A(!1)},showInitialSuggestions:b,allowDirectEntry:!a,showSuggestions:u,suggestionsQuery:j,withURLSuggestion:!_,createSuggestionButtonText:E},Object(l.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(l.createElement)(m.Button,{type:"submit",label:Object(k.__)("Submit"),icon:jp.a,className:"block-editor-link-control__search-submit"})))),V&&Object(l.createElement)(m.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},V)),n&&!D&&!F&&Object(l.createElement)(Wp,{value:n,onEditClick:function(){return A(!0)}}),Object(l.createElement)(Ep,{value:n,settings:r,onChange:c}))}qp.ViewerFill=Up;var $p=qp,Yp=n(409),Xp=n(287),Qp=Object(m.withFilters)("editor.MediaUpload")((function(){return null})),Zp=function(e){var t=e.fallback,n=void 0===t?null:t,r=e.children;return Object(v.useSelect)((function(e){return!!(0,e(yr).getSettings)().mediaUpload}),[])?r:n},Jp=Object(b.compose)([Object(v.withDispatch)((function(e){var t=e(ju.store);return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(m.withFilters)("editor.MediaReplaceFlow")])((function(e){var t=e.mediaURL,n=e.mediaId,r=e.allowedTypes,o=e.accept,c=e.onSelect,i=e.onSelectURL,a=e.onFilesUpload,s=void 0===a?d.noop:a,u=e.name,b=void 0===u?Object(k.__)("Replace"):u,f=e.createNotice,p=e.removeNotice,O=Object(l.useState)(t),g=Object(Co.a)(O,2),h=g[0],j=g[1],y=Object(v.useSelect)((function(e){return e(yr).getSettings().mediaUpload}),[]),_=Object(l.createRef)(),E=Object(d.uniqueId)("block-editor/media-replace-flow/error-notice/"),w=function(e){var t=document.createElement("div");t.innerHTML=Object(l.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){f("error",n,{speak:!0,id:E,isDismissible:!0})}),1e3)},C=function(e){c(e),j(e.url),Object(Rt.speak)(Object(k.__)("The media file has been replaced")),p(E)},S=function(e){e.keyCode===li.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(l.createElement)(m.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(l.createElement)(m.ToolbarButton,{ref:_,"aria-expanded":t,"aria-haspopup":"true",onClick:n,onKeyDown:S},b)},renderContent:function(e){return e.onClose,Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(l.createElement)(Qp,{value:n,onSelect:function(e){return C(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(l.createElement)(m.MenuItem,{icon:Yp.a,onClick:t},Object(k.__)("Open Media Library"))}}),Object(l.createElement)(Zp,null,Object(l.createElement)(m.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;s(t),y({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(Co.a)(e,1)[0];C(t)},onError:w})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(l.createElement)(m.MenuItem,{icon:Xp.a,onClick:function(){t()}},Object(k.__)("Upload"))}}))),i&&Object(l.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){[li.TAB,li.ESCAPE].includes(e.keyCode)||e.stopPropagation()},onKeyPress:function(e){[li.TAB,li.ESCAPE].includes(e.keyCode)||e.stopPropagation()}},Object(l.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(k.__)("Current media URL:")),Object(l.createElement)($p,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),_.current.focus()}})))}})})),em=n(262);function tm(e){var t=e.url,n=e.urlLabel,r=e.className,o=u()(r,"block-editor-url-popover__link-viewer-url");return t?Object(l.createElement)(m.ExternalLink,{className:o,href:t},n||Object(Su.filterURLForDisplay)(Object(Su.safeDecodeURI)(t))):Object(l.createElement)("span",{className:o})}function nm(e){var t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,a=e.focusOnMount,s=void 0===a?"firstElement":a,u=Object(j.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),d=Object(l.useState)(!1),b=Object(Co.a)(d,2),f=b[0],p=b[1],v=!!r&&f;return Object(l.createElement)(m.Popover,Object(i.a)({className:"block-editor-url-popover",focusOnMount:s,position:c},u),Object(l.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(l.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(l.createElement)(m.Button,{className:"block-editor-url-popover__settings-toggle",icon:es.a,label:Object(k.__)("Link settings"),onClick:function(){p(!f)},"aria-expanded":f})),v&&Object(l.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!v&&Object(l.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}nm.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(j.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(l.createElement)("form",Object(i.a)({className:u()("block-editor-url-popover__link-editor",n)},c),Object(l.createElement)(Cp,{value:o,onChange:r,autocompleteRef:t}),Object(l.createElement)(m.Button,{icon:jp.a,label:Object(k.__)("Apply"),type:"submit"}))},nm.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,a=Object(j.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(l.createElement)("div",Object(i.a)({className:u()("block-editor-url-popover__link-viewer",t)},a),Object(l.createElement)(tm,{url:o,urlLabel:c,className:n}),r&&Object(l.createElement)(m.Button,{icon:em.a,label:Object(k.__)("Edit"),onClick:r}))};var rm=nm,om=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(l.createElement)(rm,{onClose:o},Object(l.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(l.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(k.__)("URL"),placeholder:Object(k.__)("Paste or type URL"),onChange:n,value:t}),Object(l.createElement)(m.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:jp.a,label:Object(k.__)("Apply"),type:"submit"})))},cm=Object(m.withFilters)("editor.MediaPlaceholder")((function(e){var t=e.value,n=void 0===t?{}:t,r=e.allowedTypes,o=e.className,c=e.icon,i=e.labels,a=void 0===i?{}:i,s=e.mediaPreview,b=e.notices,f=e.isAppender,p=e.accept,O=e.addToGallery,g=e.multiple,h=void 0!==g&&g,j=e.dropZoneUIOnly,y=e.disableDropZone,_=e.disableMediaButtons,E=e.onError,w=e.onSelect,C=e.onCancel,S=e.onSelectURL,B=e.onDoubleClick,I=e.onFilesPreUpload,x=void 0===I?d.noop:I,P=e.onHTMLDrop,T=void 0===P?d.noop:P,N=e.children,D=Object(v.useSelect)((function(e){return(0,e(yr).getSettings)().mediaUpload}),[]),A=Object(l.useState)(""),L=Object(Co.a)(A,2),R=L[0],M=L[1],F=Object(l.useState)(!1),V=Object(Co.a)(F,2),H=V[0],z=V[1];Object(l.useEffect)((function(){var e;M(null!==(e=null==n?void 0:n.src)&&void 0!==e?e:"")}),[null==n?void 0:n.src]);var G=function(e){M(e.target.value)},U=function(){z(!0)},W=function(){z(!1)},K=function(e){e.preventDefault(),R&&S&&(S(R),W())},q=function(e){var t;if(x(e),h)if(O){var o=[];t=function(e){var t=(null!=n?n:[]).filter((function(e){return e.id?!o.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!o.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));w(t.concat(e)),o=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=w;else t=function(e){var t=Object(Co.a)(e,1)[0];return w(t)};D({allowedTypes:r,filesList:e,onFileChange:t,onError:E})},$=function(e){q(e.target.files)},Y=function(e,t){var n=a.instructions,i=a.title;if(D||S||(n=Object(k.__)("To edit this block, you need permission to upload media.")),void 0===n||void 0===i){var d=null!=r?r:[],p=Object(Co.a)(d,1)[0],v=1===d.length,O=v&&"audio"===p,g=v&&"image"===p,h=v&&"video"===p;void 0===n&&D&&(n=Object(k.__)("Upload a media file or pick one from your media library."),O?n=Object(k.__)("Upload an audio file, pick one from your media library, or add one with a URL."):g?n=Object(k.__)("Upload an image file, pick one from your media library, or add one with a URL."):h&&(n=Object(k.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===i&&(i=Object(k.__)("Media"),O?i=Object(k.__)("Audio"):g?i=Object(k.__)("Image"):h&&(i=Object(k.__)("Video")))}var j=u()("block-editor-media-placeholder",o,{"is-appender":f});return Object(l.createElement)(m.Placeholder,{icon:c,label:i,instructions:n,className:j,notices:b,onClick:t,onDoubleClick:B,preview:s},e,N)},X=function(){return y?null:Object(l.createElement)(m.DropZone,{onFilesDrop:q,onHTMLDrop:T})},Q=function(){return C&&Object(l.createElement)(m.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(k.__)("Cancel"),isLink:!0,onClick:C},Object(k.__)("Cancel"))},Z=function(){return S&&Object(l.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(l.createElement)(m.Button,{className:"block-editor-media-placeholder__button",onClick:U,isPressed:H,isTertiary:!0},Object(k.__)("Insert from URL")),H&&Object(l.createElement)(om,{src:R,onChange:G,onSubmit:K,onClose:W}))};return j||_?(j&&Ft()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{since:"5.4",alternative:"disableMediaButtons"}),Object(l.createElement)(Zp,null,X())):Object(l.createElement)(Zp,{fallback:Y(Z())},function(){var e=Object(l.createElement)(Qp,{addToGallery:O,gallery:h&&!(!r||0===r.length)&&r.every((function(e){return"image"===e||e.startsWith("image/")})),multiple:h,onSelect:w,allowedTypes:r,value:Array.isArray(n)?n.map((function(e){return e.id})):n.id,render:function(e){var t=e.open;return Object(l.createElement)(m.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(k.__)("Media Library"))}});if(D&&f)return Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(m.FormFileUpload,{onChange:$,accept:p,multiple:h,render:function(t){var n=t.openFileDialog,r=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.Button,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(k.__)("Upload")),e,Z(),Q());return Y(r,n)}}));if(D){var t=Object(l.createElement)(l.Fragment,null,X(),Object(l.createElement)(m.FormFileUpload,{isPrimary:!0,className:u()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:$,accept:p,multiple:h},Object(k.__)("Upload")),e,Z(),Q());return Y(t)}return Y(e)}())})),im=Object(l.forwardRef)((function(e,t){return Object(l.createElement)(Ef,Object(i.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));im.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(j.a)(e,["value","tagName"]);return Object(l.createElement)(o,c,n)};var am=im,lm=Object(l.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(j.a)(e,["__experimentalVersion"]);if(2===n)return Object(l.createElement)(am,Object(i.a)({ref:t},r));var o=r.className,c=r.onChange,a=Object(j.a)(r,["className","onChange"]);return Object(l.createElement)(hs.a,Object(i.a)({ref:t,className:u()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},a))}));function sm(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(b.useInstanceId)(sm),c=r||Object(k.sprintf)(
69
  /* translators: 1: property name. 2: viewport name. */
70
+ Object(k._x)("Controls the %1$s property for %2$s viewports.","Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size."),t,n.label);return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(l.createElement)(m.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var um=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,s=void 0!==a&&a,d=e.defaultLabel,b=void 0===d?{id:"all",
71
  /* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */
72
  label:Object(k.__)("All")}:d,f=e.viewports,p=void 0===f?[{id:"small",label:Object(k.__)("Small screens")},{id:"medium",label:Object(k.__)("Medium screens")},{id:"large",label:Object(k.__)("Large screens")}]:f;if(!t||!n||!c)return null;var v=r||Object(k.sprintf)(
73
  /* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */
74
+ Object(k.__)("Use the same %s on all screensizes."),n),O=Object(k.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),g=c(Object(l.createElement)(sm,{property:n,viewport:b}),b);
75
+ /* translators: 'Help text for the responsive mode toggle control.' */return Object(l.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(l.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(l.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(l.createElement)(m.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:v,checked:!s,onChange:o,help:O}),Object(l.createElement)("div",{className:u()("block-editor-responsive-block-control__group",{"is-responsive":s})},!s&&g,s&&(i?i(p):p.map((function(e){return Object(l.createElement)(l.Fragment,{key:e.id},c(Object(l.createElement)(sm,{property:n,viewport:e}),e))}))))))};function dm(e){var t=e.character,n=e.type,r=e.onUse;return Object(b.useKeyboardShortcut)(li.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function bm(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(j.a)(e,["name","shortcutType","shortcutCharacter"]),a="RichText.ToolbarControls";return n&&(a+=".".concat(n)),r&&o&&(t=li.displayShortcut[r](o)),Object(l.createElement)(m.Fill,{name:a},Object(l.createElement)(m.ToolbarButton,Object(i.a)({},c,{shortcut:t})))}var fm=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(){var e;return Object(pa.a)(this,o),(e=r.apply(this,arguments)).onInput=e.onInput.bind(Object(va.a)(e)),e}return Object(ma.a)(o,[{key:"onInput",value:function(e){e.inputType===this.props.inputType&&this.props.onInput()}},{key:"componentDidMount",value:function(){document.addEventListener("input",this.onInput,!0)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("input",this.onInput,!0)}},{key:"render",value:function(){return null}}]),o}(l.Component),pm=Object(l.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(l.createElement)(m.Path,{d:"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"})),mm=Object(l.forwardRef)((function(e,t){var n=Object(v.useSelect)((function(e){return e(yr).isNavigationMode()}),[]),r=Object(v.useDispatch)(yr).setNavigationMode,o=function(e){r("edit"!==e)};return Object(l.createElement)(m.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(l.createElement)(m.Button,Object(i.a)({},e,{ref:t,icon:n?pm:em.a,"aria-expanded":o,"aria-haspopup":"true",onClick:c
76
+ /* translators: button label text should, if possible, be under 16 characters. */,label:Object(k.__)("Modes")}))},position:"bottom right",renderContent:function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.NavigableMenu,{role:"menu","aria-label":Object(k.__)("Modes")},Object(l.createElement)(m.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(l.createElement)(l.Fragment,null,Object(l.createElement)(ra.a,{icon:em.a}),Object(k.__)("Edit"))},{value:"select",label:Object(l.createElement)(l.Fragment,null,pm,Object(k.__)("Select"))}]})),Object(l.createElement)("div",{className:"block-editor-tool-selector__help"},Object(k.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),vm=n(246),Om=n(410);var gm=function(e){Object(Oa.a)(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Object(ha.a)(t);if(n){var o=Object(ha.a)(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Object(ga.a)(this,e)});function o(){var e;return Object(pa.a)(this,o),(e=r.apply(this,arguments)).toggle=e.toggle.bind(Object(va.a)(e)),e.submitLink=e.submitLink.bind(Object(va.a)(e)),e.state={expanded:!1},e}return Object(ma.a)(o,[{key:"toggle",value:function(){this.setState({expanded:!this.state.expanded})}},{key:"submitLink",value:function(e){e.preventDefault(),this.toggle()}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.onChange,r=this.state.expanded,o=t?Object(k.__)("Edit link"):Object(k.__)("Insert link");return Object(l.createElement)("div",{className:"block-editor-url-input__button"},Object(l.createElement)(m.Button,{icon:vm.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(l.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(l.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(l.createElement)(m.Button,{className:"block-editor-url-input__back",icon:Om.a,label:Object(k.__)("Close"),onClick:this.toggle}),Object(l.createElement)(Cp,{value:t||"",onChange:n}),Object(l.createElement)(m.Button,{icon:jp.a,label:Object(k.__)("Submit"),type:"submit"}))))}}]),o}(l.Component),hm=n(168),jm=["noreferrer","noopener"],ym=Object(l.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(m.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(l.createElement)(m.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),Object(l.createElement)(m.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),km=function(e){var t=e.linkDestination,n=e.onChangeUrl,r=e.url,o=e.mediaType,c=void 0===o?"image":o,i=e.mediaUrl,a=e.mediaLink,s=e.linkTarget,u=e.linkClass,b=e.rel,f=Object(l.useState)(!1),p=Object(Co.a)(f,2),v=p[0],O=p[1],g=Object(l.useCallback)((function(){O(!0)})),h=Object(l.useState)(!1),j=Object(Co.a)(h,2),y=j[0],_=j[1],E=Object(l.useState)(null),w=Object(Co.a)(E,2),C=w[0],S=w[1],B=Object(l.useRef)(null),I=Object(l.useCallback)((function(){"media"!==t&&"attachment"!==t||S(""),_(!0)})),x=Object(l.useCallback)((function(){_(!1)})),P=Object(l.useCallback)((function(){S(null),x(),O(!1)})),T=function(e){var t=e;return void 0===e||Object(d.isEmpty)(t)||Object(d.isEmpty)(t)||(Object(d.each)(jm,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(d.isEmpty)(t)&&(t=void 0)),t},N=Object(l.useCallback)((function(){return function(e){var t=B.current;t&&t.contains(e.target)||(O(!1),S(null),x())}})),D=Object(l.useCallback)((function(){return function(e){if(C){var t,r=(null===(t=L().find((function(e){return e.url===C})))||void 0===t?void 0:t.linkDestination)||"custom";n({href:C,linkDestination:r})}x(),S(null),e.preventDefault()}})),A=Object(l.useCallback)((function(){n({linkDestination:"none",href:""})})),L=function(){var e=[{linkDestination:"media",title:Object(k.__)("Media File"),url:"image"===c?i:void 0,icon:ym}];return"image"===c&&a&&e.push({linkDestination:"attachment",title:Object(k.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(l.createElement)(m.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)(m.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(l.createElement)(m.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),e},R=Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.ToggleControl,{label:Object(k.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||b?T(b):void 0}}(e);n(t)},checked:"_blank"===s}),Object(l.createElement)(m.TextControl,{label:Object(k.__)("Link Rel"),value:T(b)||"",onChange:function(e){n({rel:e})}}),Object(l.createElement)(m.TextControl,{label:Object(k.__)("Link CSS Class"),value:u||"",onChange:function(e){n({linkClass:e})}})),M=null!==C?C:r,F=(Object(d.find)(L(),["linkDestination",t])||{}).title;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.ToolbarButton,{icon:vm.a,className:"components-toolbar__control",label:r?Object(k.__)("Edit link"):Object(k.__)("Insert link"),"aria-expanded":v,onClick:g}),v&&Object(l.createElement)(rm,{onFocusOutside:N(),onClose:P,renderSettings:function(){return R},additionalControls:!M&&Object(l.createElement)(m.NavigableMenu,null,Object(d.map)(L(),(function(e){return Object(l.createElement)(m.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;S(null),t=e.url,o=L(),r=t?(Object(d.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),x()}},e.title)})))},(!r||y)&&Object(l.createElement)(rm.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:M,onChangeInputValue:S,onSubmit:D(),autocompleteRef:B}),r&&!y&&Object(l.createElement)(l.Fragment,null,Object(l.createElement)(rm.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:r,onEditLinkClick:I,urlLabel:F}),Object(l.createElement)(m.Button,{icon:hm.a,label:Object(k.__)("Remove link"),onClick:A}))))},_m=n(154);function Em(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;if(Object(b.useViewportMatch)("small","<"))return null;var a={className:u()(n,"block-editor-post-preview__dropdown-content"),position:"bottom left"},s={isTertiary:!0,className:"block-editor-post-preview__button-toggle",disabled:!o,
77
  /* translators: button label text should, if possible, be under 16 characters. */
78
+ children:Object(k.__)("Preview")};return Object(l.createElement)(m.DropdownMenu,{className:"block-editor-post-preview__dropdown",popoverProps:a,toggleProps:s,icon:null},(function(){return Object(l.createElement)(l.Fragment,null,Object(l.createElement)(m.MenuGroup,null,Object(l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&_m.a},Object(k.__)("Desktop")),Object(l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&_m.a},Object(k.__)("Tablet")),Object(l.createElement)(m.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&_m.a},Object(k.__)("Mobile"))),t)}))}var wm=n(357),Cm=/\((min|max)-width:[^\(]*?\)/g;function Sm(e){return!!e.media&&!!e.media.mediaText.match(Cm)}function Bm(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function Im(e,t){return e.replace(Cm,(function(e){return Object(wm.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function xm(e,t){Object(l.useEffect)((function(){if(t){var n,r,o,c="undefined"==typeof window?[]:Object(d.filter)(null!==(n=null===(r=window)||void 0===r||null===(o=r.document)||void 0===o?void 0:o.styleSheets)&&void 0!==n?n:[],(function(e){return!!e.href&&Object(Su.getProtocol)(e.href)===window.location.protocol&&Object(Su.getAuthority)(e.href)===window.location.host})),i=[];return c.forEach((function(n,r){for(var o=!1,c=0;c<n.cssRules.length;++c){var a=n.cssRules[c];if((a.type===window.CSSRule.STYLE_RULE||a.type===window.CSSRule.MEDIA_RULE)&&(!o&&a.cssText.match(new RegExp("#start-".concat(e)))&&(o=!0),o&&a.cssText.match(new RegExp("#end-".concat(e)))&&(o=!1),o&&Sm(a))){var l=a.cssText;i[r]||(i[r]=[]),i[r][c]=l,Bm(n,Im(l,t),c)}}})),function(){i.forEach((function(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];r&&Bm(c[t],r,n)}}))}}}),[t])}function Pm(e,t){var n=Object(l.useState)(window.innerWidth),r=Object(Co.a)(n,2),o=r[0],c=r[1];Object(l.useEffect)((function(){if("Desktop"!==e){var t=function(){return c(window.innerWidth)};return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]);var i=function(e){var t;switch(e){case"Tablet":t=780;break;case"Mobile":t=360;break;default:return null}return t<o?t:o};return xm("resizable-editor-section",t?null:i(e)),function(e){var t="Mobile"===e?"768px":"1024px";switch(e){case"Tablet":case"Mobile":return{width:i(e),margin:(window.innerHeight<800?36:72)+"px auto",height:t,borderRadius:"2px",border:"1px solid #ddd",overflowY:"auto"};default:return null}}(e)}var Tm=Object(v.withSelect)((function(e){return{selectedBlockClientId:e(yr).getBlockSelectionStart()}}))((function(e){var t=e.selectedBlockClientId;return t?Object(l.createElement)(m.Button,{isSecondary:!0,className:"block-editor-skip-to-selected-block",onClick:function(){Sc(t,document).focus()}},Object(k.__)("Skip to the selected block")):null})),Nm=n(159),Dm=Object(v.withSelect)((function(e){return{blocks:(0,e(yr).getMultiSelectedBlocks)()}}))((function(e){var t=e.blocks,n=Object(Nm.count)(Object(p.serialize)(t),"words");return Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card"},Object(l.createElement)(hl,{icon:pd,showColors:!0}),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-content"},Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-title"},Object(k.sprintf)(
79
  /* translators: %d: number of blocks */
80
  Object(k._n)("%d block","%d blocks",t.length),t.length)),Object(l.createElement)("div",{className:"block-editor-multi-selection-inspector__card-description"},Object(k.sprintf)(
81
  /* translators: %d: number of words */
82
+ Object(k._n)("%d word","%d words",n),n))))}));function Am(e){var t=e.blockName,n=Object(v.useSelect)((function(e){var n,r,o=e(yr).getSettings().__experimentalPreferredStyleVariations;return{preferredStyle:null==o||null===(n=o.value)||void 0===n?void 0:n[t],onUpdatePreferredStyleVariations:null!==(r=null==o?void 0:o.onChange)&&void 0!==r?r:null,styles:e(p.store).getBlockStyles(t)}}),[t]),r=n.preferredStyle,o=n.onUpdatePreferredStyleVariations,c=n.styles,i=Object(l.useMemo)((function(){return[{label:Object(k.__)("Not set"),value:""}].concat(Object(y.a)(c.map((function(e){return{label:e.label,value:e.name}}))))}),[c]),a=Object(l.useCallback)((function(e){o(t,e)}),[t,o]);return o&&Object(l.createElement)(m.SelectControl,{options:i,value:r||"",label:Object(k.__)("Default Style"),onChange:a})}var Lm=function(e){var t=e.clientId,n=e.blockName,r=e.hasBlockStyles,o=e.bubblesVirtually,c=Cl(t);return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(Ks,c),Object(l.createElement)(xf,{blockClientId:t}),r&&Object(l.createElement)("div",null,Object(l.createElement)(m.PanelBody,{title:Object(k.__)("Styles")},Object(l.createElement)(kd,{clientId:t}),Object(p.hasBlockSupport)(n,"defaultStylePicker",!0)&&Object(l.createElement)(Am,{blockName:n}))),Object(l.createElement)(po.Slot,{bubblesVirtually:o}),Object(l.createElement)("div",null,Object(l.createElement)(Rm,{slotName:lo.slotName,bubblesVirtually:o})),Object(l.createElement)(Tm,{key:"back"}))},Rm=function(e){var t=e.slotName,n=e.bubblesVirtually,r=Object(m.__experimentalUseSlot)(t);return Boolean(r.fills&&r.fills.length)?Object(l.createElement)(m.PanelBody,{className:"block-editor-block-inspector__advanced",title:Object(k.__)("Advanced"),initialOpen:!1},Object(l.createElement)(lo.Slot,{bubblesVirtually:n})):null},Mm=function(e){var t=e.showNoBlockSelectedMessage,n=void 0===t||t,r=e.bubblesVirtually,o=void 0===r||r,c=Object(v.useSelect)((function(e){var t=e(yr),n=t.getSelectedBlockClientId,r=t.getSelectedBlockCount,o=t.getBlockName,c=e(p.store).getBlockStyles,i=n(),a=i&&o(i),l=a&&Object(p.getBlockType)(a),s=a&&c(a);return{count:r(),selectedBlockClientId:i,selectedBlockName:a,blockType:l,hasBlockStyles:s&&s.length>0}}),[]),i=c.count,a=c.hasBlockStyles,s=c.selectedBlockName,u=c.selectedBlockClientId,d=c.blockType;if(i>1)return Object(l.createElement)("div",{className:"block-editor-block-inspector"},Object(l.createElement)(Dm,null),Object(l.createElement)(po.Slot,{bubblesVirtually:o}));var b=s===Object(p.getUnregisteredTypeHandlerName)();return d&&u&&!b?Object(l.createElement)(Lm,{clientId:u,blockName:d.name,hasBlockStyles:a,bubblesVirtually:o}):n?Object(l.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(k.__)("No block selected.")):null};function Fm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fm(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Hm=Object(l.forwardRef)((function(e,t){var n=e.children,r=e.tagName,o=void 0===r?"div":r,c=Object(j.a)(e,["children","tagName"]);Ft()("wp.blockEditor.__experimentalBlock",{since:"5.6",alternative:"wp.blockEditor.useBlockProps"});var i=Tb(Vm(Vm({},c),{},{ref:t}));return Object(l.createElement)(o,i,n)})),zm=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"].reduce((function(e,t){return e[t]=Object(l.forwardRef)((function(e,n){return Object(l.createElement)(Hm,Object(i.a)({},e,{ref:n,tagName:t}))})),e}),Hm);function Gm(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(v.useSelect)((function(e){var t=e(yr),n=t.hasSelectedBlock,r=t.hasMultiSelection;return n()||r()})),n=Object(v.useDispatch)(yr),r=n.clearSelectedBlock;return Object(b.useRefEffect)((function(n){if(t)return n.addEventListener("mousedown",o),function(){n.removeEventListener("mousedown",o)};function o(t){t.target.closest(".wp-block")||e&&t.target!==n||r()}}),[t,r])}function Um(e){return Object(l.createElement)("div",Object(i.a)({ref:Gm()},e))}var Wm=n(358),Km=n.n(Wm),qm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function $m(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Ym=n(224),Xm=n.n(Ym),Qm=Zm;function Zm(e){this.options=e||{}}Zm.prototype.emit=function(e){return e},Zm.prototype.visit=function(e){return this[e.type](e)},Zm.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r<o;r++)n+=this.visit(e[r]),t&&r<o-1&&(n+=this.emit(t));return n};var Jm=ev;function ev(e){Qm.call(this,e)}Xm()(ev,Qm),ev.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")},ev.prototype.comment=function(e){return this.emit("",e.position)},ev.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},ev.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ev.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ev.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},ev.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},ev.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ev.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")},ev.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")},ev.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},ev.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")},ev.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")},ev.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},ev.prototype.rule=function(e){var t=e.declarations;return t.length?this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}"):""},ev.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")};var tv=nv;function nv(e){e=e||{},Qm.call(this,e),this.indentation=e.indent}Xm()(nv,Qm),nv.prototype.compile=function(e){return this.stylesheet(e)},nv.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")},nv.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)},nv.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)},nv.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},nv.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},nv.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)},nv.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)},nv.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},nv.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")},nv.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")},nv.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},nv.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")},nv.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")},nv.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)},nv.prototype.rule=function(e){var t=this.indent(),n=e.declarations;return n.length?this.emit(e.selectors.map((function(e){return t+e})).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(n,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}"):""},nv.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")},nv.prototype.indent=function(e){return this.level=this.level||1,null!==e?(this.level+=e,""):Array(this.level).join(this.indentation||" ")};var rv=function(e,t){try{var n=function(e,t){t=t||{};var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function c(){var e={line:n,column:r};return function(t){return t.position=new i(e),f(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;var a=[];function l(o){var c=new Error(t.source+":"+n+":"+r+": "+o);if(c.reason=o,c.filename=t.source,c.line=n,c.column=r,c.source=e,!t.silent)throw c;a.push(c)}function s(){return b(/^{\s*/)}function u(){return b(/^}/)}function d(){var t,n,r,o=[];for(f(),p(o);e.length&&"}"!==e.charAt(0)&&(t=w()||(n=void 0,r=void 0,n=c(),(r=v())?(p(),n({type:"rule",selectors:r,declarations:g()})):l("selector missing")));)!1!==t&&(o.push(t),p(o));return o}function b(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){b(/^\s*/)}function p(e){var t;for(e=e||[];t=m();)!1!==t&&e.push(t);return e}function m(){var t=c();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var i=e.slice(2,n-2);return r+=2,o(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function v(){var e=b(/^([^{]+)/);if(e)return $m(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function O(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=$m(t[0]),!b(/^:\s*/))return l("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(qm,""),value:n?$m(n[0]).replace(qm,""):""});return b(/^[;\s]*/),r}}function g(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=O();)!1!==e&&(t.push(e),p(t));return u()?t:l("missing '}'")}function h(){for(var e,t=[],n=c();e=b(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),b(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var j,y=E("import"),k=E("charset"),_=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=c(),r=b(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function w(){if("@"===e[0])return function(){var e=c(),t=b(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=b(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!s())return l("@keyframes missing '{'");for(var i=p();r=h();)i.push(r),i=i.concat(p());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):l("@keyframes missing '}'")}}()||function(){var e=c(),t=b(/^@media *([^{]+)/);if(t){var n=$m(t[1]);if(!s())return l("@media missing '{'");var r=p().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=c(),t=b(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:$m(t[1]),media:$m(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=$m(t[1]);if(!s())return l("@supports missing '{'");var r=p().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||y()||k()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=$m(t[1]),r=$m(t[2]);if(!s())return l("@document missing '{'");var o=p().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=c();if(b(/^@page */)){var t=v()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=O();)r.push(n),r=r.concat(p());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=c();if(b(/^@host\s*/)){if(!s())return l("@host missing '{'");var t=p().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=c();if(b(/^@font-face\s*/)){if(!s())return l("@font-face missing '{'");for(var t,n=p();t=O();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}return function e(t,n){var r=t&&"string"==typeof t.type,o=r?t:n;for(var c in t){var i=t[c];Array.isArray(i)?i.forEach((function(t){e(t,o)})):i&&"object"===Object(H.a)(i)&&e(i,o)}return r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null}),t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))}(e);return r=Km.a.map(n,(function(e){if(!e)return e;var n=t(e);return this.update(n)})),((o=o||{}).compress?new Jm(o):new tv(o)).compile(r)}catch(e){return console.warn("Error while traversing the CSS: "+e),null}var r,o};function ov(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ov(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iv(e){return 0!==e.value.indexOf("data:")&&0!==e.value.indexOf("#")&&(t=e.value,!/^\/(?!\/)/.test(t)&&!function(e){return/^(?:https?:)?\/\//.test(e)}(e.value));var t}function av(e,t){return new URL(e,t).toString()}var lv=function(e){return function(t){if("declaration"===t.type){var n=function(e){for(var t,n=/url\((\s*)(['"]?)(.+?)\2(\s*)\)/g,r=[];null!==(t=n.exec(e));){var o={source:t[0],before:t[1],quote:t[2],value:t[3],after:t[4]};iv(o)&&r.push(o)}return r}(t.value).map((c=e,function(e){return cv(cv({},e),{},{newUrl:"url("+e.before+e.quote+av(e.value,c)+e.quote+e.after+")"})}));return cv(cv({},t),{},{value:(r=t.value,o=n,o.forEach((function(e){r=r.replace(e.source,e.newUrl)})),r)})}var r,o,c;return t}};function sv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sv(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dv=/^(body|html|:root).*$/,bv=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?uv(uv({},n),{},{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(dv)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},fv=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(d.map)(e,(function(e){var n=e.css,r=e.baseURL,o=e.__experimentalNoWrapper,c=[];return t&&!(void 0!==o&&o)&&c.push(bv(t)),r&&c.push(lv(r)),c.length?rv(n,Object(b.compose)(c)):n}))};function pv(e){return Object(l.useCallback)((function(e){if(e){var t=e.ownerDocument,n=t.defaultView,r=t.body,o=t.querySelector(".editor-styles-wrapper"),c=n.getComputedStyle(o,null).getPropertyValue("background-color");Bo()(c).getLuminance()>.5?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}}),[e])}function mv(e){var t=e.styles;return Object(l.createElement)(l.Fragment,null,Object(l.createElement)("style",{ref:pv(t)}),fv(t,".editor-styles-wrapper").map((function(e,t){return Object(l.createElement)("style",{key:t},e)})))}var vv=function(e){var t=e.rootClientId,n=e.clientId,r=e.isAppender,o=e.showInserterHelpPanel,c=e.showMostUsedBlocks,i=void 0!==c&&c,a=e.__experimentalInsertionIndex,s=e.onSelect,u=void 0===s?d.noop:s,b=e.shouldFocusBlock,f=void 0!==b&&b,p=Object(v.useSelect)((function(e){var r=e(yr).getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(l.createElement)(Hu,{onSelect:u,rootClientId:p,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalInsertionIndex:a,shouldFocusBlock:f})};function Ov(){var e=Object(v.useSelect)((function(e){var t=e(yr),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(Co.a)(c,1)[0];return{clientIds:c,rootBlocksClientIds:r(),rootClientId:o(i)}}),[]),t=e.clientIds,n=e.rootBlocksClientIds,r=e.rootClientId,o=Object(v.useDispatch)(yr),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,p=o.moveBlocksDown;return Object(Vl.useShortcut)("core/block-editor/move-up",Object(l.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/move-down",Object(l.useCallback)((function(e){e.preventDefault(),p(t,r)}),[t,p]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/duplicate",Object(l.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/remove",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/insert-after",Object(l.useCallback)((function(e){e.preventDefault(),a(Object(d.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/insert-before",Object(l.useCallback)((function(e){e.preventDefault(),s(Object(d.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(Vl.useShortcut)("core/block-editor/delete-multi-selection",Object(l.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<2}),Object(Vl.useShortcut)("core/block-editor/select-all",Object(l.useCallback)((function(e){e.preventDefault(),u(Object(d.first)(n),Object(d.last)(n))}),[n,u])),Object(Vl.useShortcut)("core/block-editor/unselect",Object(l.useCallback)((function(e){e.preventDefault(),b(),e.target.ownerDocument.defaultView.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}Ov.Register=function(){var e=Object(v.useDispatch)(Vl.store).registerShortcut;return Object(l.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(k.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(k.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(k.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:Object(k.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:Object(k.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(k.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:Object(k.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(k.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(k.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(k.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var gv=Ov;function hv(){return Ft()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in."}),null}var jv=new Set([li.UP,li.RIGHT,li.DOWN,li.LEFT,li.ENTER,li.BACKSPACE]);function yv(){var e=Object(v.useSelect)((function(e){return e(yr).isTyping()})),t=Object(v.useDispatch)(yr).stopTyping;return Object(b.useRefEffect)((function(n){if(e){var r,o,c=n.ownerDocument;return c.addEventListener("mousemove",i),function(){c.removeEventListener("mousemove",i)}}function i(e){var n=e.clientX,c=e.clientY;r&&o&&(r!==n||o!==c)&&t(),r=n,o=c}}),[e,t])}function kv(){var e=Object(v.useSelect)((function(e){return e(yr).isTyping()})),t=Object(v.useDispatch)(yr),n=t.startTyping,r=t.stopTyping,o=yv(),c=Object(b.useRefEffect)((function(t){var o=t.ownerDocument,c=o.defaultView;if(e){var i;function a(e){var t=e.target;i=c.setTimeout((function(){Object(Wl.isTextField)(t)||r()}))}function l(e){var t=e.keyCode;t!==li.ESCAPE&&t!==li.TAB||r()}function s(){var e=c.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||r()}return t.addEventListener("focus",a),t.addEventListener("keydown",l),o.addEventListener("selectionchange",s),function(){c.clearTimeout(i),t.removeEventListener("focus",a),t.removeEventListener("keydown",l),o.removeEventListener("selectionchange",s)}}function u(e){var r=e.type,o=e.target;Object(Wl.isTextField)(o)&&t.contains(o)&&("keydown"!==r||function(e){var t=e.keyCode;return!e.shiftKey&&jv.has(t)}(e))&&n()}return t.addEventListener("keypress",u),t.addEventListener("keydown",u),function(){t.removeEventListener("keypress",u),t.removeEventListener("keydown",u)}}),[e,n,r]);return Object(b.useMergeRefs)([o,c])}var _v=function(e){var t=e.children;return Object(l.createElement)("div",{ref:kv()},t)};function Ev(){return Ft()("PreserveScrollInReorder component",{since:"5.4",hint:"This behavior is now built-in the block list"}),null}var wv=-1!==window.navigator.userAgent.indexOf("Trident"),Cv=new Set([li.UP,li.DOWN,li.LEFT,li.RIGHT]);function Sv(){var e=Object(v.useSelect)((function(e){return e(yr).hasSelectedBlock()}));return Object(b.useRefEffect)((function(t){if(e){var n,r,o,c=t.ownerDocument,i=c.defaultView;return i.addEventListener("scroll",a,!0),i.addEventListener("resize",a,!0),t.addEventListener("keydown",l),t.addEventListener("keyup",s),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),function(){i.removeEventListener("scroll",a,!0),i.removeEventListener("resize",a,!0),t.removeEventListener("keydown",l),t.removeEventListener("keyup",s),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),c.removeEventListener("selectionchange",d),i.cancelAnimationFrame(n),i.cancelAnimationFrame(r)}}function a(){n||(n=i.requestAnimationFrame((function(){b(),n=null})))}function l(e){r&&i.cancelAnimationFrame(r),r=i.requestAnimationFrame((function(){s(e),r=null}))}function s(e){var n=e.keyCode;if(f()){var r=Object(Wl.computeCaretRect)(i);if(r)if(o)if(Cv.has(n))o=r;else{var a=r.top-o.top;if(0!==a){var l=Object(Wl.getScrollContainer)(t);if(l){var s=l===c.body,u=s?i.scrollY:l.scrollTop,d=s?0:l.getBoundingClientRect().top,b=s?o.top/i.innerHeight:(o.top-d)/(i.innerHeight-d);if(0===u&&b<.75&&(p=t.querySelectorAll('[contenteditable="true"]'))[p.length-1]===c.activeElement)o=r;else{var p,m=s?i.innerHeight:l.clientHeight;o.top+o.height>d+m||o.top<d?o=r:s?i.scrollBy(0,a):l.scrollTop+=a}}}}else o=r}}function u(){c.addEventListener("selectionchange",d)}function d(){c.removeEventListener("selectionchange",d),b()}function b(){f()&&(o=Object(Wl.computeCaretRect)(i))}function f(){return t.contains(c.activeElement)&&c.activeElement.isContentEditable}}),[e])}var Bv=wv?function(e){return e.children}:function(e){var t=e.children;return Object(l.createElement)("div",{ref:Sv(),className:"block-editor__typewriter"},t)},Iv=Object(d.overEvery)([Wl.isTextField,Wl.focus.tabbable.isTabbableIndex]);function xv(){return Object(b.useRefEffect)((function(e){function t(t){if(t.target===e){var n=Wl.focus.focusable.find(e),r=Object(d.findLast)(n,Iv);r&&(Object(Wl.placeCaretAtHorizontalEdge)(r,!0),t.preventDefault())}}return e.addEventListener("mousedown",t),function(){e.addEventListener("mousedown",t)}}),[])}function Pv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tv(e){e.dir=document.dir,e.body.className="editor-styles-wrapper";var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pv(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pv(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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 c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}(document.body.classList);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith("admin-color-")&&e.body.classList.add(r)}}catch(e){n.e(e)}finally{n.f()}}var Nv=Object(l.forwardRef)((function(e,t){var n=e.contentRef,r=e.children,o=e.head,c=e.headHTML,a=Object(j.a)(e,["contentRef","children","head","headHTML"]),s=Object(l.useState)(),u=Object(Co.a)(s,2),d=u[0],f=u[1],p=Object(l.useCallback)((function(e){function t(){var t,r=e.contentDocument,o=r.readyState,i=r.body;return("interactive"===o||"complete"===o)&&("function"==typeof n?n(i):n&&(n.current=i),function(e,t){e.head.innerHTML="<style>body{margin:0}</style>"+t}(r,c),Tv(r),t=r,Array.from(document.styleSheets).forEach((function(e){try{e.cssRules}catch(e){return}var n=e.ownerNode,r=e.cssRules;r&&Array.from(r).find((function(e){var t=e.selectorText;return t&&(t.includes(".".concat("editor-styles-wrapper"))||t.includes(".".concat("wp-block")))}))&&!t.getElementById(n.id)&&t.head.appendChild(n.cloneNode(!0))})),function(e){var t=e.defaultView,n=t.frameElement;function r(e){var r=Object.getPrototypeOf(e).constructor.name,o=window[r],c={};for(var i in e)c[i]=e[i];if(e instanceof t.MouseEvent){var a=n.getBoundingClientRect();c.clientX+=a.left,c.clientY+=a.top}var l=new o(e.type,c);!n.dispatchEvent(l)&&e.preventDefault()}for(var o=0,c=["keydown","keypress","dragover"];o<c.length;o++){var i=c[o];e.addEventListener(i,r)}}(r),Tv(r),f(r),!0)}e&&(t()||e.addEventListener("load",(function(){t()})))}),[]);return Object(l.createElement)("iframe",Object(i.a)({},a,{ref:Object(b.useMergeRefs)([t,p]),tabIndex:"0",title:Object(k.__)("Editor canvas"),name:"editor-canvas"}),d&&Object(l.createPortal)(Object(l.createElement)(m.__experimentalStyleProvider,{document:d},r),d.body),d&&Object(l.createPortal)(o,d.head))}));function Dv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Av(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dv(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lv=Object(l.createContext)({});function Rv(e){var t,n=Object(l.useContext)(Lv),r=h().name,o=Boolean(null===(t=n[r])||void 0===t?void 0:t.has(e)),c=Object(l.useMemo)((function(){return function(e,t,n){var r=Av(Av({},e),{},Object(a.a)({},t,e[t]?new Set(e[t]):new Set));return r[t].add(n),r}(n,r,e)}),[n,r,e]);return[o,Object(l.useCallback)((function(e){var t=e.children;return Object(l.createElement)(Lv.Provider,{value:c},t)}),[c])]}function Mv(e){if(void 0===e)e=E.colors;else{var t=e.filter((function(e){return e.color}));0===t.length?e=E.colors:t.length<e.length&&(e=t)}return e}function Fv(e){if(void 0===e)e=E.gradients;else{var t=e.filter((function(e){return e.gradient}));0===t.length?e=E.gradients:t.length<e.length&&(e=t)}return e}},55:function(e,t){e.exports=window.wp.a11y},58:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},59:function(e,t,n){var r;!function(o){var c=/^\s+/,i=/\s+$/,a=0,l=o.round,s=o.min,u=o.max,d=o.random;function b(e,t){if(t=t||{},(e=e||"")instanceof b)return e;if(!(this instanceof b))return new b(e,t);var n=function(e){var t,n,r,a={r:0,g:0,b:0},l=1,d=null,b=null,f=null,p=!1,m=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(i,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=G.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=G.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=G.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=G.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=G.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=G.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=G.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:F(t[4]),format:n?"name":"hex8"}:(t=G.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:n?"name":"hex"}:(t=G.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=G.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(t=e.r,n=e.g,r=e.b,a={r:255*N(t,255),g:255*N(n,255),b:255*N(r,255)},p=!0,m="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(d=R(e.s),b=R(e.v),a=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),c=e-r,i=n*(1-t),a=n*(1-c*t),l=n*(1-(1-c)*t),s=r%6;return{r:255*[n,a,i,i,l,n][s],g:255*[l,n,n,a,i,i][s],b:255*[i,i,l,n,n,a][s]}}(e.h,d,b),p=!0,m="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(d=R(e.s),f=R(e.l),a=function(e,t,n){var r,o,c;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=c=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),c=i(l,a,e-1/3)}return{r:255*r,g:255*o,b:255*c}}(e.h,d,f),p=!0,m="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=T(l),{ok:p,format:e.format||m,r:s(255,u(a.r,0)),g:s(255,u(a.g,0)),b:s(255,u(a.b,0)),a:l}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function f(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=(c+i)/2;if(c==i)r=o=0;else{var l=c-i;switch(o=a>.5?l/(2-c-i):l/(c+i),c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:a}}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,c=u(e,t,n),i=s(e,t,n),a=c,l=c-i;if(o=0===c?0:l/c,c==i)r=0;else{switch(c){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:a}}function m(e,t,n,r){var o=[L(l(e).toString(16)),L(l(t).toString(16)),L(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function v(e,t,n,r){return[L(M(r)),L(l(e).toString(16)),L(l(t).toString(16)),L(l(n).toString(16))].join("")}function O(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=D(n.s),b(n)}function g(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=D(n.s),b(n)}function h(e){return b(e).desaturate(100)}function j(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=D(n.l),b(n)}function y(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=u(0,s(255,n.r-l(-t/100*255))),n.g=u(0,s(255,n.g-l(-t/100*255))),n.b=u(0,s(255,n.b-l(-t/100*255))),b(n)}function k(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=D(n.l),b(n)}function _(e,t){var n=b(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,b(n)}function E(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function w(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function S(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function B(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),o=360/n,c=[b(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,c.push(b(r));return c}function I(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,o=n.s,c=n.v,i=[],a=1/t;t--;)i.push(b({h:r,s:o,v:c})),c=(c+a)%1;return i}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var c=[L(l(e).toString(16)),L(l(t).toString(16)),L(l(n).toString(16)),L(M(r))];return o&&c[0].charAt(0)==c[0].charAt(1)&&c[1].charAt(0)==c[1].charAt(1)&&c[2].charAt(0)==c[2].charAt(1)&&c[3].charAt(0)==c[3].charAt(1)?c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0):c.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return b(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(j,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(O,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(h,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(B,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},b.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:R(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:d(),g:d(),b:d()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r=b(e).toRgb(),o=b(t).toRgb(),c=n/100;return b({r:(o.r-r.r)*c+r.r,g:(o.g-r.g)*c+r.g,b:(o.b-r.b)*c+r.b,a:(o.a-r.a)*c+r.a})},b.readability=function(e,t){var n=b(e),r=b(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},b.isReadable=function(e,t,n){var r,o,c,i,a,l=b.readability(e,t);switch(o=!1,(c=n,"AA"!==(i=((c=c||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(a=(c.size||"small").toLowerCase())&&"large"!==a&&(a="small"),r={level:i,size:a}).level+r.size){case"AAsmall":case"AAAlarge":o=l>=4.5;break;case"AAlarge":o=l>=3;break;case"AAAsmall":o=l>=7}return o},b.mostReadable=function(e,t,n){var r,o,c,i,a=null,l=0;o=(n=n||{}).includeFallbackColors,c=n.level,i=n.size;for(var s=0;s<t.length;s++)(r=b.readability(e,t[s]))>l&&(l=r,a=b(t[s]));return b.isReadable(e,a,{level:c,size:i})||!o?a:(n.includeFallbackColors=!1,b.mostReadable(e,["#fff","#000"],n))};var x=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=s(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return s(1,u(0,e))}function A(e){return parseInt(e,16)}function L(e){return 1==e.length?"0"+e:""+e}function R(e){return e<=1&&(e=100*e+"%"),e}function M(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return A(e)/255}var V,H,z,G=(H="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",z="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},62:function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},63: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)}n.d(t,"a",(function(){return r}))},7:function(e,t){e.exports=window.wp.primitives},71:function(e,t){e.exports=window.wp.htmlEntities},75:function(e,t){e.exports=window.wp.isShallowEqual},77:function(e,t,n){e.exports=function(e,t){var n,r,o=0;function c(){var c,i,a=n,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(i=0;i<l;i++)if(a.args[i]!==arguments[i]){a=a.next;continue e}return a!==n&&(a===r&&(r=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=n,a.prev=null,n.prev=a,n=a),a.val}a=a.next}for(c=new Array(l),i=0;i<l;i++)c[i]=arguments[i];return a={args:c,val:e.apply(null,c)},n?(n.prev=a,a.next=n):r=a,o===t.maxSize?(r=r.prev).next=null:o++,n=a,a.val}return t=t||{},c.clear=function(){n=null,r=null,o=0},c}},8:function(e,t){e.exports=window.React},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(39),o=n(30),c=n(40);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(_n=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}(e,t)||Object(o.a)(e,t)||Object(c.a)()}}});
build/data/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'a256ec7854bd7e097babd0b14148d6a1');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'fbc1925ed78b7385598b162db9b8f8a0');
build/data/index.js CHANGED
@@ -1 +1 @@
1
- window.wp=window.wp||{},window.wp.data=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=553)}({0:function(e,t){e.exports=window.wp.element},10:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},131:function(e,t,r){"use strict";function n(e){return(n="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,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){var r=e._map,n=e._arrayTreeMap,o=e._objectTreeMap;if(r.has(t))return r.get(t);for(var i=Object.keys(t).sort(),u=Array.isArray(t)?n:o,c=0;c<i.length;c++){var a=i[c];if(void 0===(u=u.get(a)))return;var s=t[a];if(void 0===(u=u.get(s)))return}var f=u.get("_ekm_value");return f?(r.delete(f[0]),f[0]=t,u.set("_ekm_value",f),r.set(t,f),f):void 0}var u=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clear(),t instanceof e){var r=[];t.forEach((function(e,t){r.push([t,e])})),t=r}if(null!=t)for(var n=0;n<t.length;n++)this.set(t[n][0],t[n][1])}var t,r;return t=e,(r=[{key:"set",value:function(t,r){if(null===t||"object"!==n(t))return this._map.set(t,r),this;for(var o=Object.keys(t).sort(),i=[t,r],u=Array.isArray(t)?this._arrayTreeMap:this._objectTreeMap,c=0;c<o.length;c++){var a=o[c];u.has(a)||u.set(a,new e),u=u.get(a);var s=t[a];u.has(s)||u.set(s,new e),u=u.get(s)}var f=u.get("_ekm_value");return f&&this._map.delete(f[0]),u.set("_ekm_value",i),this._map.set(t,i),this}},{key:"get",value:function(e){if(null===e||"object"!==n(e))return this._map.get(e);var t=i(this,e);return t?t[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==n(e)?this._map.has(e):void 0!==i(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(o,i){null!==i&&"object"===n(i)&&(o=o[1]),e.call(r,o,i,t)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&o(t.prototype,r),e}();e.exports=u},14:function(e,t){e.exports=window.wp.compose},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(25),o=r(44),i=r(30);function u(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.")}()}},16:function(e,t){e.exports=window.regeneratorRuntime},161:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(8);function o(e,t){var r=Object(n.useState)((function(){return{inputs:t,result:e()}}))[0],o=Object(n.useRef)(r),i=Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Object(n.useEffect)((function(){o.current=i}),[i]),i.result}},169:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},191:function(e,t){e.exports=window.wp.priorityQueue},192:function(e,t){function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=r,e.exports.default=r},2:function(e,t){e.exports=window.lodash},221:function(e,t){e.exports=function(e){var t,r=Object.keys(e);return t=function(){var e,t,n;for(e="return {",t=0;t<r.length;t++)e+=(n=JSON.stringify(r[t]))+":r["+n+"](s["+n+"],a),";return e+="}",new Function("r,s,a",e)}(),function(n,o){var i,u,c;if(void 0===n)return t(e,{},o);for(i=t(e,n,o),u=r.length;u--;)if(n[c=r[u]]!==i[c])return i;return n}}},25:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},267:function(e,t,r){"use strict";(function(e,n){var o,i=r(372);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:n;var u=Object(i.a)(o);t.a=u}).call(this,r(169),r(522)(e))},30:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(25);function o(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},371:function(e,t){e.exports=window.wp.reduxRoutine},372:function(e,t,r){"use strict";function n(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}r.d(t,"a",(function(){return n}))},39:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},40:function(e,t,r){"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.")}r.d(t,"a",(function(){return n}))},41:function(e,t){e.exports=window.wp.deprecated},44:function(e,t,r){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},46:function(e,t,r){"use strict";function n(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"throw",e)}c(void 0)}))}}r.d(t,"a",(function(){return o}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},522:function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},553:function(e,t,r){"use strict";r.r(t),r.d(t,"withSelect",(function(){return Ue})),r.d(t,"withDispatch",(function(){return Ve})),r.d(t,"withRegistry",(function(){return Fe})),r.d(t,"RegistryProvider",(function(){return Ne})),r.d(t,"RegistryConsumer",(function(){return Ie})),r.d(t,"useRegistry",(function(){return ke})),r.d(t,"useSelect",(function(){return Me})),r.d(t,"useDispatch",(function(){return Ge})),r.d(t,"AsyncModeProvider",(function(){return Le})),r.d(t,"createRegistry",(function(){return ue})),r.d(t,"createRegistrySelector",(function(){return P})),r.d(t,"createRegistryControl",(function(){return T})),r.d(t,"controls",(function(){return A})),r.d(t,"createReduxStore",(function(){return $})),r.d(t,"plugins",(function(){return i})),r.d(t,"combineReducers",(function(){return c.a})),r.d(t,"select",(function(){return He})),r.d(t,"resolveSelect",(function(){return Ke})),r.d(t,"dispatch",(function(){return Xe})),r.d(t,"subscribe",(function(){return Je})),r.d(t,"registerGenericStore",(function(){return We})),r.d(t,"registerStore",(function(){return Ye})),r.d(t,"use",(function(){return qe})),r.d(t,"register",(function(){return ze}));var n={};r.r(n),r.d(n,"getIsResolving",(function(){return F})),r.d(n,"hasStartedResolution",(function(){return G})),r.d(n,"hasFinishedResolution",(function(){return H})),r.d(n,"isResolving",(function(){return K})),r.d(n,"getCachedResolvers",(function(){return X}));var o={};r.r(o),r.d(o,"startResolution",(function(){return J})),r.d(o,"finishResolution",(function(){return W})),r.d(o,"invalidateResolution",(function(){return Y})),r.d(o,"invalidateResolutionForStore",(function(){return q})),r.d(o,"invalidateResolutionForStoreSelector",(function(){return z}));var i={};r.r(i),r.d(i,"controls",(function(){return pe})),r.d(i,"persistence",(function(){return je}));var u=r(221),c=r.n(u),a=r(9),s=r(5),f=r(2),l=r(46),p=r(16),b=r.n(p),d=r(267),v={INIT:"@@redux/INIT"+Math.random().toString(36).substring(7).split("").join("."),REPLACE:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")},y="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},O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function h(e,t,r){var n;if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(h)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,u=[],c=u,a=!1;function s(){c===u&&(c=u.slice())}function f(){if(a)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function l(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(a)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return s(),c.push(e),function(){if(t){if(a)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,s();var r=c.indexOf(e);c.splice(r,1)}}}function p(e){if(!function(e){if("object"!==(void 0===e?"undefined":y(e))||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(a)throw new Error("Reducers may not dispatch actions.");try{a=!0,i=o(i,e)}finally{a=!1}for(var t=u=c,r=0;r<t.length;r++)(0,t[r])();return e}return p({type:v.INIT}),(n={dispatch:p,subscribe:l,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");o=e,p({type:v.REPLACE})}})[d.a]=function(){var e,t=l;return(e={subscribe:function(e){if("object"!==(void 0===e?"undefined":y(e))||null===e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(f())}return r(),{unsubscribe:t(r)}}})[d.a]=function(){return this},e},n}function g(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function j(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];var i=e.apply(void 0,n),u=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},c={getState:i.getState,dispatch:function(){return u.apply(void 0,arguments)}},a=t.map((function(e){return e(c)}));return u=g.apply(void 0,a)(i.dispatch),O({},i,{dispatch:u})}}}var w,m=r(131),S=r.n(m),E=r(371),R=r.n(E),_=r(15);function P(e){var t=function t(){return e(t.registry.select).apply(void 0,arguments)};return t.isRegistrySelector=!0,t}function T(e){return e.isRegistryControl=!0,e}var x="@@data/SELECT",A={select:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return{type:x,storeKey:e,selectorName:t,args:n}},resolveSelect:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return{type:"@@data/RESOLVE_SELECT",storeKey:e,selectorName:t,args:n}},dispatch:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return{type:"@@data/DISPATCH",storeKey:e,actionName:t,args:n}}},I=(w={},Object(s.a)(w,x,T((function(e){return function(t){var r,n=t.storeKey,o=t.selectorName,i=t.args;return(r=e.select(n))[o].apply(r,Object(_.a)(i))}}))),Object(s.a)(w,"@@data/RESOLVE_SELECT",T((function(e){return function(t){var r,n=t.storeKey,o=t.selectorName,i=t.args,u=e.select(n)[o].hasResolver?"resolveSelect":"select";return(r=e[u](n))[o].apply(r,Object(_.a)(i))}}))),Object(s.a)(w,"@@data/DISPATCH",T((function(e){return function(t){var r,n=t.storeKey,o=t.actionName,i=t.args;return(r=e.dispatch(n))[o].apply(r,Object(_.a)(i))}}))),w),N=r(192),k=r.n(N),D=function(){return function(e){return function(t){return k()(t)?t.then((function(t){if(t)return e(t)})):e(t)}}},L=function(e,t){return function(){return function(r){return function(n){var o=e.select("core/data").getCachedResolvers(t);return Object.entries(o).forEach((function(r){var o=Object(a.a)(r,2),i=o[0],u=o[1],c=Object(f.get)(e.stores,[t,"resolvers",i]);c&&c.shouldInvalidate&&u.forEach((function(r,o){!1===r&&c.shouldInvalidate.apply(c,[n].concat(Object(_.a)(o)))&&e.dispatch("core/data").invalidateResolution(t,i,o)}))})),r(n)}}}};function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var U=("selectorName",function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=r.selectorName;if(void 0===n)return t;var o=e(t[n],r);return o===t[n]?t:M(M({},t),{},Object(s.a)({},n,o))}})((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new S.a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var r="START_RESOLUTION"===t.type,n=new S.a(e);return n.set(t.args,r),n;case"INVALIDATE_RESOLUTION":var o=new S.a(e);return o.delete(t.args),o}return e})),V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(f.has)(e,[t.selectorName])?Object(f.omit)(e,[t.selectorName]):e;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return U(e,t)}return e};function F(e,t,r){var n=Object(f.get)(e,[t]);if(n)return n.get(r)}function G(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return void 0!==F(e,t,r)}function H(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!1===F(e,t,r)}function K(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!0===F(e,t,r)}function X(e){return e}function J(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function W(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function Y(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function q(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function z(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $(e,t){return{name:e,instantiate:function(r){var i,u,a=t.reducer,s=function(e,t,r,n){var o,i=B(B({},t.controls),I),u=Object(f.mapValues)(i,(function(e){return e.isRegistryControl?e(r):e})),a=[L(r,e),D,R()(u)];t.__experimentalUseThunks&&a.push((o=n,function(){return function(e){return function(t){return"function"==typeof t?t(o):e(t)}}}));var s=[j.apply(void 0,a)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&s.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e}));var l=t.reducer,p=t.initialState;return h(c()({metadata:V,root:l}),{root:p},Object(f.flowRight)(s))}(e,t,r,{registry:r,get dispatch(){return Object.assign((function(e){return s.dispatch(e)}),w())},get select(){return Object.assign((function(e){return e(s.__unstableOriginalGetState())}),g())},get resolveSelect(){return m()}}),p=(i={},{isRunning:function(e,t){return i[e]&&i[e].get(t)},clear:function(e,t){i[e]&&i[e].delete(t)},markAsRunning:function(e,t){i[e]||(i[e]=new S.a),i[e].set(t,!0)}}),d=function(e,t){return Object(f.mapValues)(e,(function(e){return function(){return Promise.resolve(t.dispatch(e.apply(void 0,arguments)))}}))}(B(B({},o),t.actions),s),v=function(e,t){return Object(f.mapValues)(e,(function(e){var r=function(){var r=arguments.length,n=new Array(r+1);n[0]=t.__unstableOriginalGetState();for(var o=0;o<r;o++)n[o+1]=arguments[o];return e.apply(void 0,n)};return r.hasResolver=!1,r}))}(B(B({},Object(f.mapValues)(n,(function(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return e.apply(void 0,[t.metadata].concat(n))}}))),Object(f.mapValues)(t.selectors,(function(e){return e.isRegistrySelector&&(e.registry=r),function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return e.apply(void 0,[t.root].concat(n))}}))),s);if(t.resolvers){var y=function(e,t,r,n){var o=Object(f.mapValues)(e,(function(e){return e.fulfill?e:B(B({},e),{},{fulfill:e})}));return{resolvers:o,selectors:Object(f.mapValues)(t,(function(t,i){var u=e[i];if(!u)return t.hasResolver=!1,t;var c=function(){for(var e=arguments.length,c=new Array(e),a=0;a<e;a++)c[a]=arguments[a];function s(){return f.apply(this,arguments)}function f(){return(f=Object(l.a)(b.a.mark((function e(){var t;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.getState(),!(n.isRunning(i,c)||"function"==typeof u.isFulfilled&&u.isFulfilled.apply(u,[t].concat(c)))){e.next=3;break}return e.abrupt("return");case 3:if(!G(r.__unstableOriginalGetState().metadata,i,c)){e.next=6;break}return e.abrupt("return");case 6:n.markAsRunning(i,c),setTimeout(Object(l.a)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.clear(i,c),r.dispatch(J(i,c)),e.next=4,Z.apply(void 0,[r,o,i].concat(c));case 4:r.dispatch(W(i,c));case 5:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return s.apply(void 0,c),t.apply(void 0,c)};return c.hasResolver=!0,c}))}}(t.resolvers,v,s,p);u=y.resolvers,v=y.selectors}var O=function(e,t){return Object(f.mapValues)(Object(f.omit)(e,["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"]),(function(r,n){return function(){for(var o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];return new Promise((function(o){var u=function(){return e.hasFinishedResolution(n,i)},c=function(){return r.apply(null,i)},a=c();if(u())return o(a);var s=t.subscribe((function(){u()&&(s(),o(c()))}))}))}}))}(v,s),g=function(){return v},w=function(){return d},m=function(){return O};s.__unstableOriginalGetState=s.getState,s.getState=function(){return s.__unstableOriginalGetState().root};var E=s&&function(e){var t=s.__unstableOriginalGetState();return s.subscribe((function(){var r=s.__unstableOriginalGetState(),n=r!==t;t=r,n&&e()}))};return{reducer:a,store:s,actions:d,selectors:v,resolvers:u,getSelectors:g,getResolveSelectors:m,getActions:w,subscribe:E}}}}function Z(_x,e,t){return ee.apply(this,arguments)}function ee(){return(ee=Object(l.a)(b.a.mark((function e(t,r,n){var o,i,u,c,a,s=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Object(f.get)(r,[n])){e.next=3;break}return e.abrupt("return");case 3:for(i=s.length,u=new Array(i>3?i-3:0),c=3;c<i;c++)u[c-3]=s[c];if(!(a=o.fulfill.apply(o,u))){e.next=8;break}return e.next=8,t.dispatch(a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=function(e){return{getSelectors:function(){return["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].reduce((function(t,r){return re(re({},t),{},Object(s.a)({},r,function(t){return function(r){for(var n,o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];return(n=e.select(r))[t].apply(n,i)}}(r)))}),{})},getActions:function(){return["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].reduce((function(t,r){return re(re({},t),{},Object(s.a)({},r,function(t){return function(r){for(var n,o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];return(n=e.dispatch(r))[t].apply(n,i)}}(r)))}),{})},subscribe:function(){return function(){}}}};function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r={},n=[],o=new Set;function i(){n.forEach((function(e){return e()}))}var u=function(e){return n.push(e),function(){n=Object(f.without)(n,e)}};function c(e){var n=Object(f.isObject)(e)?e.name:e;o.add(n);var i=r[n];return i?i.getSelectors():t&&t.select(n)}function s(e,t){o.clear();var r=e.call(this);return t.current=Array.from(o),r}function l(e){var n=Object(f.isObject)(e)?e.name:e;o.add(n);var i=r[n];return i?i.getResolveSelectors():t&&t.resolveSelect(n)}function p(e){var n=Object(f.isObject)(e)?e.name:e,o=r[n];return o?o.getActions():t&&t.dispatch(n)}function b(e){return Object(f.mapValues)(e,(function(e,t){return"function"!=typeof e?e:function(){return O[t].apply(null,arguments)}}))}function d(e,t){if("function"!=typeof t.getSelectors)throw new TypeError("config.getSelectors must be a function");if("function"!=typeof t.getActions)throw new TypeError("config.getActions must be a function");if("function"!=typeof t.subscribe)throw new TypeError("config.subscribe must be a function");r[e]=t,t.subscribe(i)}function v(e){d(e.name,e.instantiate(O))}function y(e,n){return e in r?r[e].subscribe(n):t?t.__experimentalSubscribeStore(e,n):u(n)}var O={registerGenericStore:d,stores:r,namespaces:r,subscribe:u,select:c,resolveSelect:l,dispatch:p,use:h,register:v,__experimentalMarkListeningStores:s,__experimentalSubscribeStore:y};function h(e,t){return O=ie(ie({},O),e(O,t))}return O.registerStore=function(e,t){if(!t.reducer)throw new TypeError("Must specify store reducer");var r=$(e,t).instantiate(O);return d(e,r),r.store},d("core/data",ne(O)),Object.entries(e).forEach((function(e){var t=Object(a.a)(e,2),r=t[0],n=t[1];return O.registerStore(r,n)})),t&&t.subscribe(i),b(O)}var ce,ae,se=ue(),fe=r(41),le=r.n(fe),pe=function(e){return le()("wp.data.plugins.controls",{since:"5.4",hint:"The controls plugins is now baked-in."}),e},be={getItem:function(e){return ce&&ce[e]?ce[e]:null},setItem:function(e,t){ce||be.clear(),ce[e]=String(t)},clear:function(){ce=Object.create(null)}},de=be;try{(ae=window.localStorage).setItem("__wpDataTestLocalStorage",""),ae.removeItem("__wpDataTestLocalStorage")}catch(e){ae=de}function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Oe=ae;function he(e){var t,r=e.storage,n=void 0===r?Oe:r,o=e.storageKey,i=void 0===o?"WP_DATA":o;return{get:function(){if(void 0===t){var e=n.getItem(i);if(null===e)t={};else try{t=JSON.parse(e)}catch(e){t={}}}return t},set:function(e,r){t=ye(ye({},t),{},Object(s.a)({},e,r)),n.setItem(i,JSON.stringify(t))}}}function ge(e,t){var r=he(t);return{registerStore:function(t,n){if(!n.persist)return e.registerStore(t,n);var o=r.get()[t];if(void 0!==o){var i=n.reducer(n.initialState,{type:"@@WP/PERSISTENCE_RESTORE"});i=Object(f.isPlainObject)(i)&&Object(f.isPlainObject)(o)?Object(f.merge)({},i,o):o,n=ye(ye({},n),{},{initialState:i})}var u=e.registerStore(t,n);return u.subscribe(function(e,t,n){var o,i;if(Array.isArray(n)){var u=n.reduce((function(e,t){return Object.assign(e,Object(s.a)({},t,(function(e,r){return r.nextState[t]})))}),{});i=c()(u),o=function(e,t){return t.nextState===e?e:i(e,t)}}else o=function(e,t){return t.nextState};var a=o(void 0,{nextState:e()});return function(){var n=o(a,{nextState:e()});n!==a&&(r.set(t,n),a=n)}}(u.getState,t,n.persist)),u}}}ge.__unstableMigrate=function(e){var t,r,n=he(e),o=n.get(),i=null===(t=o["core/editor"])||void 0===t||null===(r=t.preferences)||void 0===r?void 0:r.insertUsage;if(i){var u,c,a=null===(u=o["core/block-editor"])||void 0===u||null===(c=u.preferences)||void 0===c?void 0:c.insertUsage;n.set("core/block-editor",{preferences:{insertUsage:ye(ye({},i),a)}})}var s=o["core/edit-post"],l=Object.keys(o).length>0,p=Object(f.has)(o,["core/edit-post","preferences","features","fullscreenMode"]);l&&!p&&(s=Object(f.merge)({},s,{preferences:{features:{fullscreenMode:!1}}}));var b=Object(f.get)(o,["core/nux","preferences","areTipsEnabled"]),d=Object(f.has)(o,["core/edit-post","preferences","features","welcomeGuide"]);void 0===b||d||(s=Object(f.merge)({},s,{preferences:{features:{welcomeGuide:b}}})),s!==o["core/edit-post"]&&n.set("core/edit-post",s)};var je=ge,we=r(10),me=r(0),Se=r(14),Ee=r(161),Re=r(191),_e=r(75),Pe=r.n(_e),Te=Object(me.createContext)(se),xe=Te.Consumer,Ae=Te.Provider,Ie=xe,Ne=Ae;function ke(){return Object(me.useContext)(Te)}var De=Object(me.createContext)(!1),Le=(De.Consumer,De.Provider),Ce=Object(Re.createQueue)();function Me(e,t){var r,n=Object(me.useCallback)(e,t),o=ke(),i=Object(me.useContext)(De),u=Object(Ee.a)((function(){return{queue:!0}}),[o]),c=Object(me.useReducer)((function(e){return e+1}),0),s=Object(a.a)(c,2)[1],f=Object(me.useRef)(),l=Object(me.useRef)(i),p=Object(me.useRef)(),b=Object(me.useRef)(),d=Object(me.useRef)(),v=Object(me.useRef)([]),y=Object(me.useCallback)((function(e){return o.__experimentalMarkListeningStores(e,v)}),[o]),O=Object(me.useMemo)((function(){return{}}),t||[]);try{r=f.current!==n||b.current?y((function(){return n(o.select,o)})):p.current}catch(e){var h="An error occurred while running 'mapSelect': ".concat(e.message);if(b.current)throw h+="\nThe error may be correlated with this previous error:\n",h+="".concat(b.current.stack,"\n\n"),h+="Original stack trace:",new Error(h);console.error(h)}return Object(Se.useIsomorphicLayoutEffect)((function(){f.current=n,p.current=r,b.current=void 0,d.current=!0,l.current!==i&&(l.current=i,Ce.flush(u))})),Object(Se.useIsomorphicLayoutEffect)((function(){var e=function(){if(d.current){try{var e=y((function(){return f.current(o.select,o)}));if(Pe()(p.current,e))return;p.current=e}catch(e){b.current=e}s()}};l.current?Ce.add(u,e):e();var t=function(){l.current?Ce.add(u,e):e()},r=v.current.map((function(e){return o.__experimentalSubscribeStore(e,t)}));return function(){d.current=!1,r.forEach((function(e){return null==e?void 0:e()})),Ce.flush(u)}}),[o,y,O]),r}var Ue=function(e){return Object(Se.createHigherOrderComponent)((function(t){return Object(Se.pure)((function(r){var n=Me((function(t,n){return e(t,r,n)}));return Object(me.createElement)(t,Object(we.a)({},r,n))}))}),"withSelect")},Ve=function(e){return Object(Se.createHigherOrderComponent)((function(t){return function(r){var n=function(e,t){var r=ke(),n=Object(me.useRef)(e);return Object(Se.useIsomorphicLayoutEffect)((function(){n.current=e})),Object(me.useMemo)((function(){var e=n.current(r.dispatch,r);return Object(f.mapValues)(e,(function(e,t){return"function"!=typeof e&&console.warn("Property ".concat(t," returned from dispatchMap in useDispatchWithMap must be a function.")),function(){var e;return(e=n.current(r.dispatch,r))[t].apply(e,arguments)}}))}),[r].concat(Object(_.a)(t)))}((function(t,n){return e(t,r,n)}),[]);return Object(me.createElement)(t,Object(we.a)({},r,n))}}),"withDispatch")},Fe=Object(Se.createHigherOrderComponent)((function(e){return function(t){return Object(me.createElement)(Ie,null,(function(r){return Object(me.createElement)(e,Object(we.a)({},t,{registry:r}))}))}}),"withRegistry"),Ge=function(e){var t=ke().dispatch;return void 0===e?t:t(e)},He=se.select,Ke=se.resolveSelect,Xe=se.dispatch,Je=se.subscribe,We=se.registerGenericStore,Ye=se.registerStore,qe=se.use,ze=se.register},75:function(e,t){e.exports=window.wp.isShallowEqual},8:function(e,t){e.exports=window.React},9:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(39),o=r(30),i=r(40);function u(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],_n=!0,n=!1,o=void 0;try{for(var i,u=e[Symbol.iterator]();!(_n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);_n=!0);}catch(e){n=!0,o=e}finally{try{_n||null==u.return||u.return()}finally{if(n)throw o}}return r}}(e,t)||Object(o.a)(e,t)||Object(i.a)()}}});
1
+ window.wp=window.wp||{},window.wp.data=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=553)}({0:function(e,t){e.exports=window.wp.element},10:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},131:function(e,t,r){"use strict";function n(e){return(n="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,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){var r=e._map,n=e._arrayTreeMap,o=e._objectTreeMap;if(r.has(t))return r.get(t);for(var i=Object.keys(t).sort(),u=Array.isArray(t)?n:o,c=0;c<i.length;c++){var a=i[c];if(void 0===(u=u.get(a)))return;var s=t[a];if(void 0===(u=u.get(s)))return}var f=u.get("_ekm_value");return f?(r.delete(f[0]),f[0]=t,u.set("_ekm_value",f),r.set(t,f),f):void 0}var u=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clear(),t instanceof e){var r=[];t.forEach((function(e,t){r.push([t,e])})),t=r}if(null!=t)for(var n=0;n<t.length;n++)this.set(t[n][0],t[n][1])}var t,r;return t=e,(r=[{key:"set",value:function(t,r){if(null===t||"object"!==n(t))return this._map.set(t,r),this;for(var o=Object.keys(t).sort(),i=[t,r],u=Array.isArray(t)?this._arrayTreeMap:this._objectTreeMap,c=0;c<o.length;c++){var a=o[c];u.has(a)||u.set(a,new e),u=u.get(a);var s=t[a];u.has(s)||u.set(s,new e),u=u.get(s)}var f=u.get("_ekm_value");return f&&this._map.delete(f[0]),u.set("_ekm_value",i),this._map.set(t,i),this}},{key:"get",value:function(e){if(null===e||"object"!==n(e))return this._map.get(e);var t=i(this,e);return t?t[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==n(e)?this._map.has(e):void 0!==i(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(o,i){null!==i&&"object"===n(i)&&(o=o[1]),e.call(r,o,i,t)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&o(t.prototype,r),e}();e.exports=u},14:function(e,t){e.exports=window.wp.compose},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(25),o=r(44),i=r(30);function u(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.")}()}},16:function(e,t){e.exports=window.regeneratorRuntime},161:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(8);function o(e,t){var r=Object(n.useState)((function(){return{inputs:t,result:e()}}))[0],o=Object(n.useRef)(r),i=Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(t,o.current.inputs))?o.current:{inputs:t,result:e()};return Object(n.useEffect)((function(){o.current=i}),[i]),i.result}},169:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},191:function(e,t){e.exports=window.wp.priorityQueue},192:function(e,t){function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=r,e.exports.default=r},2:function(e,t){e.exports=window.lodash},221:function(e,t){e.exports=function(e){var t,r=Object.keys(e);return t=function(){var e,t,n;for(e="return {",t=0;t<r.length;t++)e+=(n=JSON.stringify(r[t]))+":r["+n+"](s["+n+"],a),";return e+="}",new Function("r,s,a",e)}(),function(n,o){var i,u,c;if(void 0===n)return t(e,{},o);for(i=t(e,n,o),u=r.length;u--;)if(n[c=r[u]]!==i[c])return i;return n}}},25:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.d(t,"a",(function(){return n}))},267:function(e,t,r){"use strict";(function(e,n){var o,i=r(372);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:n;var u=Object(i.a)(o);t.a=u}).call(this,r(169),r(522)(e))},30:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(25);function o(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Object(n.a)(e,t):void 0}}},371:function(e,t){e.exports=window.wp.reduxRoutine},372:function(e,t,r){"use strict";function n(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}r.d(t,"a",(function(){return n}))},39:function(e,t,r){"use strict";function n(e){if(Array.isArray(e))return e}r.d(t,"a",(function(){return n}))},40:function(e,t,r){"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.")}r.d(t,"a",(function(){return n}))},41:function(e,t){e.exports=window.wp.deprecated},44:function(e,t,r){"use strict";function n(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},46:function(e,t,r){"use strict";function n(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"throw",e)}c(void 0)}))}}r.d(t,"a",(function(){return o}))},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},522:function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},553:function(e,t,r){"use strict";r.r(t),r.d(t,"withSelect",(function(){return Ue})),r.d(t,"withDispatch",(function(){return Ve})),r.d(t,"withRegistry",(function(){return Fe})),r.d(t,"RegistryProvider",(function(){return Ne})),r.d(t,"RegistryConsumer",(function(){return Ie})),r.d(t,"useRegistry",(function(){return ke})),r.d(t,"useSelect",(function(){return Me})),r.d(t,"useDispatch",(function(){return Ge})),r.d(t,"AsyncModeProvider",(function(){return Le})),r.d(t,"createRegistry",(function(){return ue})),r.d(t,"createRegistrySelector",(function(){return P})),r.d(t,"createRegistryControl",(function(){return T})),r.d(t,"controls",(function(){return A})),r.d(t,"createReduxStore",(function(){return $})),r.d(t,"plugins",(function(){return i})),r.d(t,"combineReducers",(function(){return c.a})),r.d(t,"select",(function(){return He})),r.d(t,"resolveSelect",(function(){return Ke})),r.d(t,"dispatch",(function(){return Xe})),r.d(t,"subscribe",(function(){return Je})),r.d(t,"registerGenericStore",(function(){return We})),r.d(t,"registerStore",(function(){return Ye})),r.d(t,"use",(function(){return qe})),r.d(t,"register",(function(){return ze}));var n={};r.r(n),r.d(n,"getIsResolving",(function(){return F})),r.d(n,"hasStartedResolution",(function(){return G})),r.d(n,"hasFinishedResolution",(function(){return H})),r.d(n,"isResolving",(function(){return K})),r.d(n,"getCachedResolvers",(function(){return X}));var o={};r.r(o),r.d(o,"startResolution",(function(){return J})),r.d(o,"finishResolution",(function(){return W})),r.d(o,"invalidateResolution",(function(){return Y})),r.d(o,"invalidateResolutionForStore",(function(){return q})),r.d(o,"invalidateResolutionForStoreSelector",(function(){return z}));var i={};r.r(i),r.d(i,"controls",(function(){return pe})),r.d(i,"persistence",(function(){return je}));var u=r(221),c=r.n(u),a=r(9),s=r(5),f=r(2),l=r(46),p=r(16),b=r.n(p),d=r(267),v={INIT:"@@redux/INIT"+Math.random().toString(36).substring(7).split("").join("."),REPLACE:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")},y="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},O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function h(e,t,r){var n;if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(h)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var o=e,i=t,u=[],c=u,a=!1;function s(){c===u&&(c=u.slice())}function f(){if(a)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function l(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(a)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return s(),c.push(e),function(){if(t){if(a)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,s();var r=c.indexOf(e);c.splice(r,1)}}}function p(e){if(!function(e){if("object"!==(void 0===e?"undefined":y(e))||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(a)throw new Error("Reducers may not dispatch actions.");try{a=!0,i=o(i,e)}finally{a=!1}for(var t=u=c,r=0;r<t.length;r++)(0,t[r])();return e}return p({type:v.INIT}),(n={dispatch:p,subscribe:l,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");o=e,p({type:v.REPLACE})}})[d.a]=function(){var e,t=l;return(e={subscribe:function(e){if("object"!==(void 0===e?"undefined":y(e))||null===e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(f())}return r(),{unsubscribe:t(r)}}})[d.a]=function(){return this},e},n}function g(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function j(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];var i=e.apply(void 0,n),u=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},c={getState:i.getState,dispatch:function(){return u.apply(void 0,arguments)}},a=t.map((function(e){return e(c)}));return u=g.apply(void 0,a)(i.dispatch),O({},i,{dispatch:u})}}}var w,m=r(131),S=r.n(m),E=r(371),R=r.n(E),_=r(15);function P(e){var t=function t(){return e(t.registry.select).apply(void 0,arguments)};return t.isRegistrySelector=!0,t}function T(e){return e.isRegistryControl=!0,e}var x="@@data/SELECT",A={select:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return{type:x,storeKey:e,selectorName:t,args:n}},resolveSelect:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return{type:"@@data/RESOLVE_SELECT",storeKey:e,selectorName:t,args:n}},dispatch:function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return{type:"@@data/DISPATCH",storeKey:e,actionName:t,args:n}}},I=(w={},Object(s.a)(w,x,T((function(e){return function(t){var r,n=t.storeKey,o=t.selectorName,i=t.args;return(r=e.select(n))[o].apply(r,Object(_.a)(i))}}))),Object(s.a)(w,"@@data/RESOLVE_SELECT",T((function(e){return function(t){var r,n=t.storeKey,o=t.selectorName,i=t.args,u=e.select(n)[o].hasResolver?"resolveSelect":"select";return(r=e[u](n))[o].apply(r,Object(_.a)(i))}}))),Object(s.a)(w,"@@data/DISPATCH",T((function(e){return function(t){var r,n=t.storeKey,o=t.actionName,i=t.args;return(r=e.dispatch(n))[o].apply(r,Object(_.a)(i))}}))),w),N=r(192),k=r.n(N),D=function(){return function(e){return function(t){return k()(t)?t.then((function(t){if(t)return e(t)})):e(t)}}},L=function(e,t){return function(){return function(r){return function(n){var o=e.select("core/data").getCachedResolvers(t);return Object.entries(o).forEach((function(r){var o=Object(a.a)(r,2),i=o[0],u=o[1],c=Object(f.get)(e.stores,[t,"resolvers",i]);c&&c.shouldInvalidate&&u.forEach((function(r,o){!1===r&&c.shouldInvalidate.apply(c,[n].concat(Object(_.a)(o)))&&e.dispatch("core/data").invalidateResolution(t,i,o)}))})),r(n)}}}};function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var U=("selectorName",function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=r.selectorName;if(void 0===n)return t;var o=e(t[n],r);return o===t[n]?t:M(M({},t),{},Object(s.a)({},n,o))}})((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new S.a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var r="START_RESOLUTION"===t.type,n=new S.a(e);return n.set(t.args,r),n;case"INVALIDATE_RESOLUTION":var o=new S.a(e);return o.delete(t.args),o}return e})),V=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(f.has)(e,[t.selectorName])?Object(f.omit)(e,[t.selectorName]):e;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return U(e,t)}return e};function F(e,t,r){var n=Object(f.get)(e,[t]);if(n)return n.get(r)}function G(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return void 0!==F(e,t,r)}function H(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!1===F(e,t,r)}function K(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!0===F(e,t,r)}function X(e){return e}function J(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function W(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function Y(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function q(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function z(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $(e,t){return{name:e,instantiate:function(r){var i,u,a=t.reducer,s=function(e,t,r,n){var o,i=B(B({},t.controls),I),u=Object(f.mapValues)(i,(function(e){return e.isRegistryControl?e(r):e})),a=[L(r,e),D,R()(u)];t.__experimentalUseThunks&&a.push((o=n,function(){return function(e){return function(t){return"function"==typeof t?t(o):e(t)}}}));var s=[j.apply(void 0,a)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&s.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e}));var l=t.reducer,p=t.initialState;return h(c()({metadata:V,root:l}),{root:p},Object(f.flowRight)(s))}(e,t,r,{registry:r,get dispatch(){return Object.assign((function(e){return s.dispatch(e)}),w())},get select(){return Object.assign((function(e){return e(s.__unstableOriginalGetState())}),g())},get resolveSelect(){return m()}}),p=(i={},{isRunning:function(e,t){return i[e]&&i[e].get(t)},clear:function(e,t){i[e]&&i[e].delete(t)},markAsRunning:function(e,t){i[e]||(i[e]=new S.a),i[e].set(t,!0)}}),d=function(e,t){return Object(f.mapValues)(e,(function(e){return function(){return Promise.resolve(t.dispatch(e.apply(void 0,arguments)))}}))}(B(B({},o),t.actions),s),v=function(e,t){return Object(f.mapValues)(e,(function(e){var r=function(){var r=arguments.length,n=new Array(r+1);n[0]=t.__unstableOriginalGetState();for(var o=0;o<r;o++)n[o+1]=arguments[o];return e.apply(void 0,n)};return r.hasResolver=!1,r}))}(B(B({},Object(f.mapValues)(n,(function(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return e.apply(void 0,[t.metadata].concat(n))}}))),Object(f.mapValues)(t.selectors,(function(e){return e.isRegistrySelector&&(e.registry=r),function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return e.apply(void 0,[t.root].concat(n))}}))),s);if(t.resolvers){var y=function(e,t,r,n){var o=Object(f.mapValues)(e,(function(e){return e.fulfill?e:B(B({},e),{},{fulfill:e})}));return{resolvers:o,selectors:Object(f.mapValues)(t,(function(t,i){var u=e[i];if(!u)return t.hasResolver=!1,t;var c=function(){for(var e=arguments.length,c=new Array(e),a=0;a<e;a++)c[a]=arguments[a];function s(){return f.apply(this,arguments)}function f(){return(f=Object(l.a)(b.a.mark((function e(){var t;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.getState(),!(n.isRunning(i,c)||"function"==typeof u.isFulfilled&&u.isFulfilled.apply(u,[t].concat(c)))){e.next=3;break}return e.abrupt("return");case 3:if(!G(r.__unstableOriginalGetState().metadata,i,c)){e.next=6;break}return e.abrupt("return");case 6:n.markAsRunning(i,c),setTimeout(Object(l.a)(b.a.mark((function e(){return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.clear(i,c),r.dispatch(J(i,c)),e.next=4,Z.apply(void 0,[r,o,i].concat(c));case 4:r.dispatch(W(i,c));case 5:case"end":return e.stop()}}),e)}))));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return s.apply(void 0,c),t.apply(void 0,c)};return c.hasResolver=!0,c}))}}(t.resolvers,v,s,p);u=y.resolvers,v=y.selectors}var O=function(e,t){return Object(f.mapValues)(Object(f.omit)(e,["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"]),(function(r,n){return function(){for(var o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];return new Promise((function(o){var u=function(){return e.hasFinishedResolution(n,i)},c=function(){return r.apply(null,i)},a=c();if(u())return o(a);var s=t.subscribe((function(){u()&&(s(),o(c()))}))}))}}))}(v,s),g=function(){return v},w=function(){return d},m=function(){return O};s.__unstableOriginalGetState=s.getState,s.getState=function(){return s.__unstableOriginalGetState().root};var E=s&&function(e){var t=s.__unstableOriginalGetState();return s.subscribe((function(){var r=s.__unstableOriginalGetState(),n=r!==t;t=r,n&&e()}))};return{reducer:a,store:s,actions:d,selectors:v,resolvers:u,getSelectors:g,getResolveSelectors:m,getActions:w,subscribe:E}}}}function Z(_x,e,t){return ee.apply(this,arguments)}function ee(){return(ee=Object(l.a)(b.a.mark((function e(t,r,n){var o,i,u,c,a,s=arguments;return b.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Object(f.get)(r,[n])){e.next=3;break}return e.abrupt("return");case 3:for(i=s.length,u=new Array(i>3?i-3:0),c=3;c<i;c++)u[c-3]=s[c];if(!(a=o.fulfill.apply(o,u))){e.next=8;break}return e.next=8,t.dispatch(a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=function(e){return{getSelectors:function(){return["getIsResolving","hasStartedResolution","hasFinishedResolution","isResolving","getCachedResolvers"].reduce((function(t,r){return re(re({},t),{},Object(s.a)({},r,function(t){return function(r){for(var n,o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];return(n=e.select(r))[t].apply(n,i)}}(r)))}),{})},getActions:function(){return["startResolution","finishResolution","invalidateResolution","invalidateResolutionForStore","invalidateResolutionForStoreSelector"].reduce((function(t,r){return re(re({},t),{},Object(s.a)({},r,function(t){return function(r){for(var n,o=arguments.length,i=new Array(o>1?o-1:0),u=1;u<o;u++)i[u-1]=arguments[u];return(n=e.dispatch(r))[t].apply(n,i)}}(r)))}),{})},subscribe:function(){return function(){}}}};function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r={},n=[],o=new Set;function i(){n.forEach((function(e){return e()}))}var u=function(e){return n.push(e),function(){n=Object(f.without)(n,e)}};function c(e){var n=Object(f.isObject)(e)?e.name:e;o.add(n);var i=r[n];return i?i.getSelectors():t&&t.select(n)}function s(e,t){o.clear();var r=e.call(this);return t.current=Array.from(o),r}function l(e){var n=Object(f.isObject)(e)?e.name:e;o.add(n);var i=r[n];return i?i.getResolveSelectors():t&&t.resolveSelect(n)}function p(e){var n=Object(f.isObject)(e)?e.name:e,o=r[n];return o?o.getActions():t&&t.dispatch(n)}function b(e){return Object(f.mapValues)(e,(function(e,t){return"function"!=typeof e?e:function(){return O[t].apply(null,arguments)}}))}function d(e,t){if("function"!=typeof t.getSelectors)throw new TypeError("config.getSelectors must be a function");if("function"!=typeof t.getActions)throw new TypeError("config.getActions must be a function");if("function"!=typeof t.subscribe)throw new TypeError("config.subscribe must be a function");r[e]=t,t.subscribe(i)}function v(e){d(e.name,e.instantiate(O))}function y(e,n){return e in r?r[e].subscribe(n):t?t.__experimentalSubscribeStore(e,n):u(n)}var O={registerGenericStore:d,stores:r,namespaces:r,subscribe:u,select:c,resolveSelect:l,dispatch:p,use:h,register:v,__experimentalMarkListeningStores:s,__experimentalSubscribeStore:y};function h(e,t){return O=ie(ie({},O),e(O,t))}return O.registerStore=function(e,t){if(!t.reducer)throw new TypeError("Must specify store reducer");var r=$(e,t).instantiate(O);return d(e,r),r.store},d("core/data",ne(O)),Object.entries(e).forEach((function(e){var t=Object(a.a)(e,2),r=t[0],n=t[1];return O.registerStore(r,n)})),t&&t.subscribe(i),b(O)}var ce,ae,se=ue(),fe=r(41),le=r.n(fe),pe=function(e){return le()("wp.data.plugins.controls",{since:"5.4",hint:"The controls plugins is now baked-in."}),e},be={getItem:function(e){return ce&&ce[e]?ce[e]:null},setItem:function(e,t){ce||be.clear(),ce[e]=String(t)},clear:function(){ce=Object.create(null)}},de=be;try{(ae=window.localStorage).setItem("__wpDataTestLocalStorage",""),ae.removeItem("__wpDataTestLocalStorage")}catch(e){ae=de}function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){Object(s.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Oe=ae;function he(e){var t,r=e.storage,n=void 0===r?Oe:r,o=e.storageKey,i=void 0===o?"WP_DATA":o;return{get:function(){if(void 0===t){var e=n.getItem(i);if(null===e)t={};else try{t=JSON.parse(e)}catch(e){t={}}}return t},set:function(e,r){t=ye(ye({},t),{},Object(s.a)({},e,r)),n.setItem(i,JSON.stringify(t))}}}function ge(e,t){var r=he(t);return{registerStore:function(t,n){if(!n.persist)return e.registerStore(t,n);var o=r.get()[t];if(void 0!==o){var i=n.reducer(n.initialState,{type:"@@WP/PERSISTENCE_RESTORE"});i=Object(f.isPlainObject)(i)&&Object(f.isPlainObject)(o)?Object(f.merge)({},i,o):o,n=ye(ye({},n),{},{initialState:i})}var u=e.registerStore(t,n);return u.subscribe(function(e,t,n){var o,i;if(Array.isArray(n)){var u=n.reduce((function(e,t){return Object.assign(e,Object(s.a)({},t,(function(e,r){return r.nextState[t]})))}),{});i=c()(u),o=function(e,t){return t.nextState===e?e:i(e,t)}}else o=function(e,t){return t.nextState};var a=o(void 0,{nextState:e()});return function(){var n=o(a,{nextState:e()});n!==a&&(r.set(t,n),a=n)}}(u.getState,t,n.persist)),u}}}ge.__unstableMigrate=function(e){var t,r,n=he(e),o=n.get(),i=null===(t=o["core/editor"])||void 0===t||null===(r=t.preferences)||void 0===r?void 0:r.insertUsage;if(i){var u,c,a=null===(u=o["core/block-editor"])||void 0===u||null===(c=u.preferences)||void 0===c?void 0:c.insertUsage;n.set("core/block-editor",{preferences:{insertUsage:ye(ye({},i),a)}})}var s=o["core/edit-post"],l=Object.keys(o).length>0,p=Object(f.has)(o,["core/edit-post","preferences","features","fullscreenMode"]);l&&!p&&(s=Object(f.merge)({},s,{preferences:{features:{fullscreenMode:!1}}}));var b=Object(f.get)(o,["core/nux","preferences","areTipsEnabled"]),d=Object(f.has)(o,["core/edit-post","preferences","features","welcomeGuide"]);void 0===b||d||(s=Object(f.merge)({},s,{preferences:{features:{welcomeGuide:b}}})),s!==o["core/edit-post"]&&n.set("core/edit-post",s)};var je=ge,we=r(10),me=r(0),Se=r(14),Ee=r(161),Re=r(191),_e=r(75),Pe=r.n(_e),Te=Object(me.createContext)(se),xe=Te.Consumer,Ae=Te.Provider,Ie=xe,Ne=Ae;function ke(){return Object(me.useContext)(Te)}var De=Object(me.createContext)(!1),Le=(De.Consumer,De.Provider),Ce=Object(Re.createQueue)();function Me(e,t){var r="function"!=typeof e;r&&(t=[]);var n,o=Object(me.useCallback)(e,t),i=ke(),u=Object(me.useContext)(De),c=Object(Ee.a)((function(){return{queue:!0}}),[i]),s=Object(me.useReducer)((function(e){return e+1}),0),f=Object(a.a)(s,2)[1],l=Object(me.useRef)(),p=Object(me.useRef)(u),b=Object(me.useRef)(),d=Object(me.useRef)(),v=Object(me.useRef)(),y=Object(me.useRef)([]),O=Object(me.useCallback)((function(e){return i.__experimentalMarkListeningStores(e,y)}),[i]),h=Object(me.useMemo)((function(){return{}}),t||[]);if(!r)try{n=l.current!==o||d.current?O((function(){return o(i.select,i)})):b.current}catch(e){var g="An error occurred while running 'mapSelect': ".concat(e.message);if(d.current)throw g+="\nThe error may be correlated with this previous error:\n",g+="".concat(d.current.stack,"\n\n"),g+="Original stack trace:",new Error(g);console.error(g)}return Object(Se.useIsomorphicLayoutEffect)((function(){r||(l.current=o,b.current=n,d.current=void 0,v.current=!0,p.current!==u&&(p.current=u,Ce.flush(c)))})),Object(Se.useIsomorphicLayoutEffect)((function(){if(!r){var e=function(){if(v.current){try{var e=O((function(){return l.current(i.select,i)}));if(Pe()(b.current,e))return;b.current=e}catch(e){d.current=e}f()}};p.current?Ce.add(c,e):e();var t=function(){p.current?Ce.add(c,e):e()},n=y.current.map((function(e){return i.__experimentalSubscribeStore(e,t)}));return function(){v.current=!1,n.forEach((function(e){return null==e?void 0:e()})),Ce.flush(c)}}}),[i,O,h,r]),r?i.select(e):n}var Ue=function(e){return Object(Se.createHigherOrderComponent)((function(t){return Object(Se.pure)((function(r){var n=Me((function(t,n){return e(t,r,n)}));return Object(me.createElement)(t,Object(we.a)({},r,n))}))}),"withSelect")},Ve=function(e){return Object(Se.createHigherOrderComponent)((function(t){return function(r){var n=function(e,t){var r=ke(),n=Object(me.useRef)(e);return Object(Se.useIsomorphicLayoutEffect)((function(){n.current=e})),Object(me.useMemo)((function(){var e=n.current(r.dispatch,r);return Object(f.mapValues)(e,(function(e,t){return"function"!=typeof e&&console.warn("Property ".concat(t," returned from dispatchMap in useDispatchWithMap must be a function.")),function(){var e;return(e=n.current(r.dispatch,r))[t].apply(e,arguments)}}))}),[r].concat(Object(_.a)(t)))}((function(t,n){return e(t,r,n)}),[]);return Object(me.createElement)(t,Object(we.a)({},r,n))}}),"withDispatch")},Fe=Object(Se.createHigherOrderComponent)((function(e){return function(t){return Object(me.createElement)(Ie,null,(function(r){return Object(me.createElement)(e,Object(we.a)({},t,{registry:r}))}))}}),"withRegistry"),Ge=function(e){var t=ke().dispatch;return void 0===e?t:t(e)},He=se.select,Ke=se.resolveSelect,Xe=se.dispatch,Je=se.subscribe,We=se.registerGenericStore,Ye=se.registerStore,qe=se.use,ze=se.register},75:function(e,t){e.exports=window.wp.isShallowEqual},8:function(e,t){e.exports=window.React},9:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(39),o=r(30),i=r(40);function u(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],_n=!0,n=!1,o=void 0;try{for(var i,u=e[Symbol.iterator]();!(_n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);_n=!0);}catch(e){n=!0,o=e}finally{try{_n||null==u.return||u.return()}finally{if(n)throw o}}return r}}(e,t)||Object(o.a)(e,t)||Object(i.a)()}}});
build/edit-post/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => 'a0dfc6b3da96ecd07d512e5d3c5fb4d3');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '4e98ab0223f8e9238ae2f3962a1b16d4');
build/edit-post/index.js CHANGED
@@ -14,7 +14,7 @@ actions:Object(K.__)("Publish"),
14
  /* translators: accessibility text for the footer landmark region. */
15
  footer:Object(K.__)("Footer")}),s);return Object(y.createElement)("div",{ref:Object(_.useMergeRefs)([t,m]),className:C()(l,"interface-interface-skeleton",p,!!r&&"has-footer")},!!u&&Object(y.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":d.drawer},u),Object(y.createElement)("div",{className:"interface-interface-skeleton__editor"},!!n&&Object(y.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":d.header,tabIndex:"-1"},n),Object(y.createElement)("div",{className:"interface-interface-skeleton__body"},!!o&&Object(y.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":d.secondarySidebar,tabIndex:"-1"},o),Object(y.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":d.body,tabIndex:"-1"},a),!!i&&Object(y.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":d.sidebar,tabIndex:"-1"},i),!!c&&Object(y.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":d.actions,tabIndex:"-1"},c))),!!r&&Object(y.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":d.footer,tabIndex:"-1"},r))}))},49:function(e,t,r){"use strict";var n,i;function o(e){return[e]}function a(){var e={clear:function(){e.head=null}};return e}function u(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n={},i="undefined"!=typeof WeakMap,t.a=function(e,t){var r,c;function s(){r=i?new WeakMap:a()}function l(){var r,n,i,o,a,s=arguments.length;for(o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];for(a=t.apply(null,o),(r=c(a)).isUniqueByDependants||(r.lastDependants&&!u(a,r.lastDependants,0)&&r.clear(),r.lastDependants=a),n=r.head;n;){if(u(n.args,o,1))return n!==r.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=r.head,n.prev=null,r.head.prev=n,r.head=n),n.val;n=n.next}return n={val:e.apply(null,o)},o[0]=null,n.args=o,r.head&&(r.head.prev=n,n.next=r.head),r.head=n,n.val}return t||(t=o),c=i?function(e){var t,i,o,u,c,s=r,l=!0;for(t=0;t<e.length;t++){if(!(c=i=e[t])||"object"!=typeof c){l=!1;break}s.has(i)?s=s.get(i):(o=new WeakMap,s.set(i,o),s=o)}return s.has(n)||((u=a()).isUniqueByDependants=l,s.set(n,u)),s.get(n)}:function(){return r},l.getDependants=t,l.clear=s,s(),l}},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},50:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}r.d(t,"a",(function(){return n}))},518:function(e,t,r){"use strict";var n=r(0),i=r(7),o=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.a=o},543:function(e,t,r){"use strict";r.r(t),r.d(t,"store",(function(){return C.a})),r.d(t,"reinitializeEditor",(function(){return Nc})),r.d(t,"initializeEditor",(function(){return Tc})),r.d(t,"PluginBlockSettingsMenuItem",(function(){return Wc})),r.d(t,"PluginDocumentSettingPanel",(function(){return oc.a})),r.d(t,"PluginMoreMenuItem",(function(){return Pc})),r.d(t,"PluginPostPublishPanel",(function(){return jc})),r.d(t,"PluginPostStatusInfo",(function(){return Pu})),r.d(t,"PluginPrePublishPanel",(function(){return wc})),r.d(t,"PluginSidebar",(function(){return ac})),r.d(t,"PluginSidebarMoreMenuItem",(function(){return Dc})),r.d(t,"__experimentalFullscreenModeClose",(function(){return eu})),r.d(t,"__experimentalMainDashboardButton",(function(){return Cu}));var n=r(0),i=r(19),o=r(6),a=r(36),u=r(84),c=r(32),s=r(86);Object(c.addFilter)("editor.MediaUpload","core/edit-post/replace-media-upload",(function(){return s.MediaUpload}));var l=r(10),A=r(13),m=r(2),p=r(11),d=r(3),v=r(4),q=r(1),g=r(14),b=Object(g.compose)(Object(v.withSelect)((function(e,t){if(Object(p.hasBlockSupport)(t.name,"multiple",!0))return{};var r=e("core/block-editor").getBlocks(),n=Object(m.find)(r,(function(e){var r=e.name;return t.name===r}));return{originalBlockClientId:n&&n.clientId!==t.clientId&&n.clientId}})),Object(v.withDispatch)((function(e,t){var r=t.originalBlockClientId;return{selectFirst:function(){return e("core/block-editor").selectBlock(r)}}}))),f=Object(g.createHigherOrderComponent)((function(e){return b((function(t){var r=t.originalBlockClientId,i=t.selectFirst,a=Object(A.a)(t,["originalBlockClientId","selectFirst"]);if(!r)return Object(n.createElement)(e,a);var u,c,s=Object(p.getBlockType)(a.name),m=(u=a.name,(c=Object(p.findTransform)(Object(p.getBlockTransforms)("to",u),(function(e){var t=e.type,r=e.blocks;return"block"===t&&1===r.length})))?Object(p.getBlockType)(c.blocks[0]):null);return[Object(n.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},Object(n.createElement)(e,Object(l.a)({key:"block-edit"},a))),Object(n.createElement)(o.Warning,{key:"multiple-use-warning",actions:[Object(n.createElement)(d.Button,{key:"find-original",isSecondary:!0,onClick:i},Object(q.__)("Find original")),Object(n.createElement)(d.Button,{key:"remove",isSecondary:!0,onClick:function(){return a.onReplace([])}},Object(q.__)("Remove")),m&&Object(n.createElement)(d.Button,{key:"transform",isSecondary:!0,onClick:function(){return a.onReplace(Object(p.createBlock)(m.name,a.attributes))}},Object(q.__)("Transform into:")," ",m.title)]},Object(n.createElement)("strong",null,s.title,": "),Object(q.__)("This block can only be used once."))]}))}),"withMultipleValidation");Object(c.addFilter)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",f);var h=r(518),O=r(69),I=r(31),y=r(45);function j(){var e=Object(v.useDispatch)(y.store).createNotice,t=Object(v.useSelect)((function(e){return function(){return e(a.store).getEditedPostAttribute("content")}}),[]),r=Object(g.useCopyToClipboard)(t,(function(){e("info",Object(q.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return Object(n.createElement)(d.MenuItem,{ref:r},Object(q.__)("Copy all content"))}var C=r(27),E=Object(v.withDispatch)((function(e){return{openModal:e(C.a).openModal}}))((function(e){var t=e.openModal;return Object(n.createElement)(d.MenuItem,{onClick:function(){t("edit-post/manage-blocks")}},Object(q.__)("Block Manager"))})),K=r(17),S=Object(v.withDispatch)((function(e){return{openModal:e(C.a).openModal}}))((function(e){var t=e.openModal;return Object(n.createElement)(d.MenuItem,{onClick:function(){t("edit-post/keyboard-shortcut-help")},shortcut:K.displayShortcut.access("h")},Object(q.__)("Keyboard shortcuts"))})),w=Object(d.createSlotFill)("ToolsMoreMenuGroup"),M=w.Fill,z=w.Slot;M.Slot=function(e){var t=e.fillProps;return Object(n.createElement)(z,{fillProps:t},(function(e){return!Object(m.isEmpty)(e)&&Object(n.createElement)(d.MenuGroup,{label:Object(q.__)("Tools")},e)}))};var Z=M;function B(){var e=Object(v.useDispatch)(C.a).toggleFeature;return Object(n.createElement)(d.MenuItem,{onClick:function(){return e("welcomeGuide")}},Object(q.__)("Welcome Guide"))}Object(O.registerPlugin)("edit-post",{render:function(){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Z,null,(function(e){var t=e.onClose;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(E,{onSelect:t}),Object(n.createElement)(d.MenuItem,{role:"menuitem",href:Object(I.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(q.__)("Manage Reusable blocks")),Object(n.createElement)(S,{onSelect:t}),Object(n.createElement)(B,null),Object(n.createElement)(j,null),Object(n.createElement)(d.MenuItem,{role:"menuitem",icon:h.a,href:Object(q.__)("https://wordpress.org/support/article/wordpress-editor/"),target:"_blank",rel:"noopener noreferrer"},Object(q.__)("Help"),Object(n.createElement)(d.VisuallyHidden,{as:"span"},
16
  /* translators: accessibility text */
17
- Object(q.__)("(opens in a new tab)"))))})))}});var G=r(15),k=r(5),Y={"t a l e s o f g u t e n b e r g":function(e){var t=e.target.ownerDocument;(t.activeElement.classList.contains("edit-post-visual-editor")||t.activeElement===t.body)&&(e.preventDefault(),window.wp.data.dispatch("core/block-editor").insertBlock(window.wp.blocks.createBlock("core/paragraph",{content:"🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️"})))}},x=r(9),L=r(12),Q=r.n(L),W=r(48),P=r(168),D=r(47),N=Object(g.compose)(Object(v.withSelect)((function(e){return{isRichEditingEnabled:e("core/editor").getEditorSettings().richEditingEnabled}})),Object(v.withDispatch)((function(e){return{onExit:function(){e(C.a).switchEditorMode("visual")}}})))((function(e){var t=e.onExit,r=e.isRichEditingEnabled;return Object(n.createElement)("div",{className:"edit-post-text-editor"},r&&Object(n.createElement)("div",{className:"edit-post-text-editor__toolbar"},Object(n.createElement)("h2",null,Object(q.__)("Editing code")),Object(n.createElement)(d.Button,{isTertiary:!0,onClick:t,shortcut:K.displayShortcut.secondary("m")},Object(q.__)("Exit code editor")),Object(n.createElement)(a.TextEditorGlobalKeyboardShortcuts,null)),Object(n.createElement)("div",{className:"edit-post-text-editor__body"},Object(n.createElement)(a.PostTitle,null),Object(n.createElement)(a.PostTextEditor,null)))})),T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function J(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var R=function(){return(R=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function H(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function F(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function U(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e}Object.create,Object.create;var X=r(8),V=r.n(X),_=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},$={measureLayout:_(["layout","layoutId","drag"]),animation:_(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:_(["exit"]),drag:_(["drag","dragControls"]),focus:_(["whileFocus"]),hover:_(["whileHover","onHoverStart","onHoverEnd"]),tap:_(["whileTap","onTap","onTapStart","onTapCancel"]),pan:_(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:_(["layout","layoutId"])},ee=r(79),te=Object(X.createContext)({strict:!1}),re=Object.keys($),ne=re.length,ie=Object(X.createContext)({transformPagePoint:function(e){return e},isStatic:!1}),oe=Object(X.createContext)({}),ae=Object(X.createContext)(null);function ue(e){var t=Object(X.useRef)(null);return null===t.current&&(t.current=e()),t.current}function ce(){var e=Object(X.useContext)(ae);if(null===e)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,i=Ae();return Object(X.useEffect)((function(){return n(i)}),[]),!t&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}var se=0,le=function(){return se++},Ae=function(){return ue(le)},me=Object(X.createContext)(null),pe="undefined"!=typeof window,de=pe?X.useLayoutEffect:X.useEffect;function ve(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function qe(e){return Array.isArray(e)}function ge(e){return"string"==typeof e||qe(e)}function be(e,t,r,n,i){var o;return void 0===n&&(n={}),void 0===i&&(i={}),"string"==typeof t&&(t=null===(o=e.variants)||void 0===o?void 0:o[t]),"function"==typeof t?t(null!=r?r:e.custom,n,i):t}function fe(e,t,r){var n=e.getProps();return be(n,t,null!=r?r:n.custom,function(e){var t={};return e.forEachValue((function(e,r){return t[r]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,r){return t[r]=e.getVelocity()})),t}(e))}function he(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||ge(e.initial)||ge(e.animate)||ge(e.whileHover)||ge(e.whileDrag)||ge(e.whileTap)||ge(e.whileFocus)||ge(e.exit)}function Oe(e){return Boolean(he(e)||e.variants)}function Ie(e){return Array.isArray(e)?e.join(" "):e}function ye(e){var t=e.preloadedFeatures,r=e.createVisualElement,n=e.useRender,i=e.useVisualState,o=e.Component;return t&&function(e){for(var t in e){var r=e[t];null!==r&&($[t].Component=r)}}(t),Object(X.forwardRef)((function(e,t){var a=Object(X.useContext)(ie).isStatic,u=null,c=function(e,t){var r=function(e,t){if(he(e)){var r=e.initial,n=e.animate;return{initial:!1===r||ge(r)?r:void 0,animate:ge(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,Object(X.useContext)(oe)),n=r.initial,i=r.animate;return Object(X.useMemo)((function(){return{initial:n,animate:i}}),t?[Ie(n),Ie(i)]:[])}(e,a),s=i(e,a);return!a&&pe&&(c.visualElement=function(e,t,r,n){var i=Object(X.useContext)(ie),o=Object(X.useContext)(te),a=Object(X.useContext)(oe).visualElement,u=Object(X.useContext)(ae),c=function(e){var t=e.layoutId,r=Object(X.useContext)(me);return r&&void 0!==t?r+"-"+t:t}(r),s=Object(X.useRef)(void 0);n||(n=o.renderer),!s.current&&n&&(s.current=n(e,{visualState:t,parent:a,props:R(R({},r),{layoutId:c}),presenceId:null==u?void 0:u.id,blockInitialAnimation:!1===(null==u?void 0:u.initial)}));var l=s.current;return de((function(){var e;l&&(l.setProps(R(R(R({},i),r),{layoutId:c})),l.isPresent=null===(e=u)||e.isPresent,l.isPresenceRoot=!a||a.presenceId!==(null==u?void 0:u.id),l.syncRender())})),Object(X.useEffect)((function(){var e;l&&(null===(e=l.animationState)||void 0===e||e.animateChanges())})),de((function(){return function(){return null==l?void 0:l.notifyUnmount()}}),[]),l}(o,s,e,r),u=function(e,t,r){var n=[];if(Object(X.useContext)(te),!t)return null;for(var i=0;i<ne;i++){var o=re[i],a=$[o],u=a.isEnabled,c=a.Component;u(e)&&c&&n.push(X.createElement(c,R({key:o},e,{visualElement:t})))}return n}(e,c.visualElement)),X.createElement(X.Fragment,null,X.createElement(oe.Provider,{value:c},n(o,e,function(e,t,r){return Object(X.useCallback)((function(n){var i;n&&(null===(i=e.mount)||void 0===i||i.call(e,n)),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):ve(r)&&(r.current=n))}),[t])}(s,c.visualElement,t),s,a)),u)}))}function je(e){function t(t,r){return void 0===r&&(r={}),ye(e(t,r))}var r=new Map;return new Proxy(t,{get:function(e,n){return r.has(n)||r.set(n,t(n)),r.get(n)}})}var Ce=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Ee(e){return"string"==typeof e&&!e.includes("-")&&!!(Ce.indexOf(e)>-1||/[A-Z]/.test(e))}var Ke={},Se=["","X","Y","Z"],we=["transformPerspective","x","y","z"];function Me(e,t){return we.indexOf(e)-we.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return Se.forEach((function(t){return we.push(e+t)}))}));var ze=new Set(we);function Ze(e){return ze.has(e)}var Be=new Set(["originX","originY","originZ"]);function Ge(e){return Be.has(e)}function ke(e,t){var r=t.layout,n=t.layoutId;return Ze(e)||Ge(e)||(r||void 0!==n)&&(!!Ke[e]||"opacity"===e)}var Ye=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},xe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Le(e){return e.startsWith("--")}var Qe=function(e,t){return t&&"number"==typeof e?t.transform(e):e},We=function(e,t){return function(r){return Math.max(Math.min(r,t),e)}},Pe=function(e){return e%1?Number(e.toFixed(5)):e},De=/(-)?([\d]*\.?[\d])+/g,Ne=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Te=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Je(e){return"string"==typeof e}var Re=function(e){return{test:function(t){return Je(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},He=Re("deg"),Fe=Re("%"),Ue=Re("px"),Xe=Re("vh"),Ve=Re("vw"),_e=R(R({},Fe),{parse:function(e){return Fe.parse(e)/100},transform:function(e){return Fe.transform(100*e)}}),$e={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},et=R(R({},$e),{transform:We(0,1)}),tt=R(R({},$e),{default:1}),rt=R(R({},$e),{transform:Math.round}),nt={borderWidth:Ue,borderTopWidth:Ue,borderRightWidth:Ue,borderBottomWidth:Ue,borderLeftWidth:Ue,borderRadius:Ue,radius:Ue,borderTopLeftRadius:Ue,borderTopRightRadius:Ue,borderBottomRightRadius:Ue,borderBottomLeftRadius:Ue,width:Ue,maxWidth:Ue,height:Ue,maxHeight:Ue,size:Ue,top:Ue,right:Ue,bottom:Ue,left:Ue,padding:Ue,paddingTop:Ue,paddingRight:Ue,paddingBottom:Ue,paddingLeft:Ue,margin:Ue,marginTop:Ue,marginRight:Ue,marginBottom:Ue,marginLeft:Ue,rotate:He,rotateX:He,rotateY:He,rotateZ:He,scale:tt,scaleX:tt,scaleY:tt,scaleZ:tt,skew:He,skewX:He,skewY:He,distance:Ue,translateX:Ue,translateY:Ue,translateZ:Ue,x:Ue,y:Ue,z:Ue,perspective:Ue,transformPerspective:Ue,opacity:et,originX:_e,originY:_e,originZ:Ue,zIndex:rt,fillOpacity:et,strokeOpacity:et,numOctaves:rt};function it(e,t,r,n,i,o,a,u){var c,s=e.style,l=e.vars,A=e.transform,m=e.transformKeys,p=e.transformOrigin;m.length=0;var d=!1,v=!1,q=!0;for(var g in t){var b=t[g];if(Le(g))l[g]=b;else{var f=nt[g],h=Qe(b,f);if(Ze(g)){if(d=!0,A[g]=h,m.push(g),!q)continue;b!==(null!==(c=f.default)&&void 0!==c?c:0)&&(q=!1)}else if(Ge(g))p[g]=h,v=!0;else if(n&&r&&n.isHydrated&&Ke[g]){var O=Ke[g].process(b,n,r),I=Ke[g].applyTo;if(I)for(var y=I.length,j=0;j<y;j++)s[I[j]]=O;else s[g]=O}else s[g]=h}}n&&r&&a&&u?(s.transform=a(n.deltaFinal,n.treeScale,d?A:void 0),o&&(s.transform=o(A,s.transform)),s.transformOrigin=u(n)):(d&&(s.transform=function(e,t,r,n){var i=e.transform,o=e.transformKeys,a=t.enableHardwareAcceleration,u=void 0===a||a,c=t.allowTransformNone,s=void 0===c||c,l="";o.sort(Me);for(var A=!1,m=o.length,p=0;p<m;p++){var d=o[p];l+=(xe[d]||d)+"("+i[d]+") ","z"===d&&(A=!0)}return!A&&u?l+="translateZ(0)":l=l.trim(),n?l=n(i,r?"":l):s&&r&&(l="none"),l}(e,i,q,o)),v&&(s.transformOrigin=function(e){var t=e.originX,r=void 0===t?"50%":t,n=e.originY,i=void 0===n?"50%":n,o=e.originZ;return r+" "+i+" "+(void 0===o?0:o)}(p)))}function ot(e,t,r){for(var n in t)Ye(t[n])||ke(n,r)||(e[n]=t[n])}function at(e,t,r){var n={},i=function(e,t,r){var n={};return ot(n,e.style||{},e),Object.assign(n,function(e,t,r){var n=e.transformTemplate;return Object(X.useMemo)((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};it(e,t,void 0,void 0,{enableHardwareAcceleration:!r},n);var i=e.style;return R(R({},e.vars),i)}),[t])}(e,t,r)),e.transformValues&&(n=e.transformValues(n)),n}(e,t,r);return Boolean(e.drag)&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),n.style=i,n}var ut=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function ct(e){return ut.has(e)}var st=function(e){return!ct(e)};try{var lt=r(223).default;st=function(e){return e.startsWith("on")?!ct(e):lt(e)}}catch(e){}function At(e,t,r){return"string"==typeof e?e:Ue.transform(t+r*e)}var mt=function(e,t){return Ue.transform(e*t)},pt={offset:"stroke-dashoffset",array:"stroke-dasharray"},dt={offset:"strokeDashoffset",array:"strokeDasharray"};function vt(e,t,r,n,i,o,a,u){var c=t.attrX,s=t.attrY,l=t.originX,A=t.originY,m=t.pathLength,p=t.pathSpacing,d=void 0===p?1:p,v=t.pathOffset,q=void 0===v?0:v;it(e,H(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,n,i,o,a,u),e.attrs=e.style,e.style={};var g=e.attrs,b=e.style,f=e.dimensions,h=e.totalPathLength;g.transform&&(f&&(b.transform=g.transform),delete g.transform),f&&(void 0!==l||void 0!==A||b.transform)&&(b.transformOrigin=function(e,t,r){return At(t,e.x,e.width)+" "+At(r,e.y,e.height)}(f,void 0!==l?l:.5,void 0!==A?A:.5)),void 0!==c&&(g.x=c),void 0!==s&&(g.y=s),void 0!==h&&void 0!==m&&function(e,t,r,n,i,o){void 0===n&&(n=1),void 0===i&&(i=0),void 0===o&&(o=!0);var a=o?pt:dt;e[a.offset]=mt(-i,t);var u=mt(r,t),c=mt(n,t);e[a.array]=u+" "+c}(g,h,m,d,q,!1)}var qt=function(){return R(R({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function gt(e,t){var r=Object(X.useMemo)((function(){var r=qt();return vt(r,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),R(R({},r.attrs),{style:R({},r.style)})}),[t]);if(e.style){var n={};ot(n,e.style,e),r.style=R(R({},n),r.style)}return r}function bt(e){return void 0===e&&(e=!1),function(t,r,n,i,o){var a=i.latestValues,u=(Ee(t)?gt:at)(r,a,o),c=function(e,t,r){var n={};for(var i in e)(st(i)||!0===r&&ct(i)||!t&&!ct(i))&&(n[i]=e[i]);return n}(r,"string"==typeof t,e),s=R(R(R({},c),u),{ref:n});return Object(X.createElement)(t,s)}}var ft=/([a-z])([A-Z])/g,ht=function(e){return e.replace(ft,"$1-$2").toLowerCase()};function Ot(e,t){var r=t.style,n=t.vars;for(var i in Object.assign(e.style,r),n)e.style.setProperty(i,n[i])}var It=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]);function yt(e,t){for(var r in Ot(e,t),t.attrs)e.setAttribute(It.has(r)?r:ht(r),t.attrs[r])}function jt(e){var t=e.style,r={};for(var n in t)(Ye(t[n])||ke(n,e))&&(r[n]=t[n]);return r}function Ct(e){var t=jt(e);for(var r in e)Ye(e[r])&&(t["x"===r||"y"===r?"attr"+r.toUpperCase():r]=e[r]);return t}function Et(e){return"object"==typeof e&&"function"==typeof e.start}var Kt=function(e){return Array.isArray(e)};function St(e,t,r,n){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,a=e.onMount,u={latestValues:Mt(t,r,n,i),renderState:o()};return a&&(u.mount=function(e){return a(t,e,u)}),u}var wt=function(e){return function(t,r){var n=Object(X.useContext)(oe),i=Object(X.useContext)(ae);return r?St(e,t,n,i):ue((function(){return St(e,t,n,i)}))}};function Mt(e,t,r,n){var i,o,a,u={},c=!1===(null==r?void 0:r.initial),s=n(e);for(var l in s)u[l]=(i=s[l],o=void 0,a=void 0,a=Ye(i)?i.get():i,o=a,Boolean(o&&"object"==typeof o&&o.mix&&o.toValue)?a.toValue():a);var A=e.initial,m=e.animate,p=he(e),d=Oe(e);t&&d&&!p&&!1!==e.inherit&&(null!=A||(A=t.initial),null!=m||(m=t.animate));var v=c||!1===A?m:A;return v&&"boolean"!=typeof v&&!Et(v)&&(Array.isArray(v)?v:[v]).forEach((function(t){var r=be(e,t);if(r){var n=r.transitionEnd;r.transition;var i=H(r,["transitionEnd","transition"]);for(var o in i)u[o]=i[o];for(var o in n)u[o]=n[o]}})),u}var zt,Zt={useVisualState:wt({scrapeMotionValuesFromProps:Ct,createRenderState:qt,onMount:function(e,t,r){var n=r.renderState,i=r.latestValues;try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}"path"===t.tagName&&(n.totalPathLength=t.getTotalLength()),vt(n,i,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),yt(t,n)}})},Bt={useVisualState:wt({scrapeMotionValuesFromProps:jt,createRenderState:function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}}})};function Gt(e,t,r,n){return e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r,n)}}function kt(e,t,r,n){Object(X.useEffect)((function(){var i=e.current;if(r&&i)return Gt(i,t,r,n)}),[e,t,r,n])}function Yt(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function xt(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"}(zt||(zt={}));var Lt={pageX:0,pageY:0};function Qt(e,t){void 0===t&&(t="page");var r=e.touches[0]||e.changedTouches[0]||Lt;return{x:r[t+"X"],y:r[t+"Y"]}}function Wt(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Pt(e,t){return void 0===t&&(t="page"),{point:xt(e)?Qt(e,t):Wt(e,t)}}function Dt(e){return Pt(e,"client")}var Nt=function(e,t){void 0===t&&(t=!1);var r,n=function(t){return e(t,Pt(t))};return t?(r=n,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&r(e)}):n},Tt={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jt={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Rt(e){return pe&&null===window.onpointerdown?e:pe&&null===window.ontouchstart?Jt[e]:pe&&null===window.onmousedown?Tt[e]:e}function Ht(e,t,r,n){return Gt(e,Rt(t),Nt(r,"pointerdown"===t),n)}function Ft(e,t,r,n){return kt(e,Rt(t),r&&Nt(r,"pointerdown"===t),n)}function Ut(e,t,r){return function(n,i){var o;Yt(n)&&e.isHoverEventsEnabled&&(null==r||r(n,i),null===(o=e.animationState)||void 0===o||o.setActive(zt.Hover,t))}}var Xt=function(e,t){return!!t&&(e===t||Xt(e,t.parentElement))};function Vt(e){return Object(X.useEffect)((function(){return function(){return e()}}),[])}var _t=function(e,t){return function(r){return t(e(r))}},$t=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(_t)};function er(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var tr=er("dragHorizontal"),rr=er("dragVertical");function nr(e){var t=!1;if("y"===e)t=rr();else if("x"===e)t=tr();else{var r=tr(),n=rr();r&&n?t=function(){r(),n()}:(r&&r(),n&&n())}return t}var ir=function(e){return function(t){return e(t),null}},or={tap:ir((function(e){var t=e.onTap,r=e.onTapStart,n=e.onTapCancel,i=e.whileTap,o=e.visualElement,a=t||r||n||i,u=Object(X.useRef)(!1),c=Object(X.useRef)(null);function s(){var e;null===(e=c.current)||void 0===e||e.call(c),c.current=null}function l(){var e,t;return s(),u.current=!1,null===(e=o.animationState)||void 0===e||e.setActive(zt.Tap,!1),!(!(t=nr(!0))||(t(),0))}function A(e,r){l()&&(Xt(o.getInstance(),e.target)?null==t||t(e,r):null==n||n(e,r))}function m(e,t){l()&&(null==n||n(e,t))}Ft(o,"pointerdown",a?function(e,t){var n;s(),u.current||(u.current=!0,c.current=$t(Ht(window,"pointerup",A),Ht(window,"pointercancel",m)),null==r||r(e,t),null===(n=o.animationState)||void 0===n||n.setActive(zt.Tap,!0))}:void 0),Vt(s)})),focus:ir((function(e){var t=e.whileFocus,r=e.visualElement;kt(r,"focus",t?function(){var e;null===(e=r.animationState)||void 0===e||e.setActive(zt.Focus,!0)}:void 0),kt(r,"blur",t?function(){var e;null===(e=r.animationState)||void 0===e||e.setActive(zt.Focus,!1)}:void 0)})),hover:ir((function(e){var t=e.onHoverStart,r=e.onHoverEnd,n=e.whileHover,i=e.visualElement;Ft(i,"pointerenter",t||n?Ut(i,!0,t):void 0),Ft(i,"pointerleave",r||n?Ut(i,!1,r):void 0)}))};function ar(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var ur=function(e,t,r){return Math.min(Math.max(r,e),t)};function cr(e,t){return e*Math.sqrt(1-t*t)}var sr=["duration","bounce"],lr=["stiffness","damping","mass"];function Ar(e,t){return t.some((function(t){return void 0!==e[t]}))}function mr(e){var t=e.from,r=void 0===t?0:t,n=e.to,i=void 0===n?1:n,o=e.restSpeed,a=void 0===o?2:o,u=e.restDelta,c=H(e,["from","to","restSpeed","restDelta"]),s={done:!1,value:r},l=function(e){var t=R({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Ar(e,lr)&&Ar(e,sr)){var r=function(e){var t,r,n=e.duration,i=void 0===n?800:n,o=e.bounce,a=void 0===o?.25:o,u=e.velocity,c=void 0===u?0:u,s=e.mass,l=void 0===s?1:s;Object(ee.b)(i<=1e4,"Spring duration must be 10 seconds or less");var A=1-a;A=ur(.05,1,A),i=ur(.01,10,i/1e3),A<1?(t=function(e){var t=e*A,r=t*i;return.001-(t-c)/cr(e,A)*Math.exp(-r)},r=function(e){var r=e*A*i,n=r*c+c,o=Math.pow(A,2)*Math.pow(e,2)*i,a=Math.exp(-r),u=cr(Math.pow(e,2),A);return(.001-t(e)>0?-1:1)*((n-o)*a)/u}):(t=function(e){return Math.exp(-e*i)*((e-c)*i+1)-.001},r=function(e){return Math.exp(-e*i)*(i*i*(c-e))});var m=function(e,t,r){for(var n=r,i=1;i<12;i++)n-=e(n)/t(n);return n}(t,r,5/i);if(isNaN(m))return{stiffness:100,damping:10};var p=Math.pow(m,2)*l;return{stiffness:p,damping:2*A*Math.sqrt(l*p)}}(e);(t=R(R(R({},t),r),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(c),A=l.stiffness,m=l.damping,p=l.mass,d=l.velocity,v=l.isResolvedFromDuration,q=pr,g=pr;function b(){var e=d?-d/1e3:0,t=i-r,n=m/(2*Math.sqrt(A*p)),o=Math.sqrt(A/p)/1e3;if(null!=u||(u=Math.abs(i-r)<=1?.01:.4),n<1){var a=cr(o,n);q=function(r){var u=Math.exp(-n*o*r);return i-u*((e+n*o*t)/a*Math.sin(a*r)+t*Math.cos(a*r))},g=function(r){var i=Math.exp(-n*o*r);return n*o*i*(Math.sin(a*r)*(e+n*o*t)/a+t*Math.cos(a*r))-i*(Math.cos(a*r)*(e+n*o*t)-a*t*Math.sin(a*r))}}else if(1===n)q=function(r){return i-Math.exp(-o*r)*(t+(e+o*t)*r)};else{var c=o*Math.sqrt(n*n-1);q=function(r){var a=Math.exp(-n*o*r),u=Math.min(c*r,300);return i-a*((e+n*o*t)*Math.sinh(u)+c*t*Math.cosh(u))/c}}}return b(),{next:function(e){var t=q(e);if(v)s.done=e>=c.duration;else{var r=1e3*g(e),n=Math.abs(r)<=a,o=Math.abs(i-t)<=u;s.done=n&&o}return s.value=s.done?i:t,s},flipTarget:function(){var e;d=-d,r=(e=[i,r])[0],i=e[1],b()}}}mr.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var pr=function(e){return 0},dr=function(e,t,r){var n=t-e;return 0===n?1:(r-e)/n},vr=function(e,t,r){return-r*e+r*t+e},qr=function(e,t){return function(r){return Boolean(Je(r)&&Te.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t))}},gr=function(e,t,r){return function(n){var i;if(!Je(n))return n;var o=n.match(De),a=o[0],u=o[1],c=o[2],s=o[3];return(i={})[e]=parseFloat(a),i[t]=parseFloat(u),i[r]=parseFloat(c),i.alpha=void 0!==s?parseFloat(s):1,i}},br=We(0,255),fr=R(R({},$e),{transform:function(e){return Math.round(br(e))}}),hr={test:qr("rgb","red"),parse:gr("red","green","blue"),transform:function(e){var t=e.red,r=e.green,n=e.blue,i=e.alpha,o=void 0===i?1:i;return"rgba("+fr.transform(t)+", "+fr.transform(r)+", "+fr.transform(n)+", "+Pe(et.transform(o))+")"}},Or={test:qr("#"),parse:function(e){var t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:hr.transform},Ir={test:qr("hsl","hue"),parse:gr("hue","saturation","lightness"),transform:function(e){var t=e.hue,r=e.saturation,n=e.lightness,i=e.alpha,o=void 0===i?1:i;return"hsla("+Math.round(t)+", "+Fe.transform(Pe(r))+", "+Fe.transform(Pe(n))+", "+Pe(et.transform(o))+")"}},yr=function(e,t,r){var n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},jr=[Or,hr,Ir],Cr=function(e){return jr.find((function(t){return t.test(e)}))},Er=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},Kr=function(e,t){var r=Cr(e),n=Cr(t);Object(ee.a)(!!r,Er(e)),Object(ee.a)(!!n,Er(t)),Object(ee.a)(r.transform===n.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var i=r.parse(e),o=n.parse(t),a=R({},i),u=r===Ir?vr:yr;return function(e){for(var t in a)"alpha"!==t&&(a[t]=u(i[t],o[t],e));return a.alpha=vr(i.alpha,o.alpha,e),r.transform(a)}},Sr={test:function(e){return hr.test(e)||Or.test(e)||Ir.test(e)},parse:function(e){return hr.test(e)?hr.parse(e):Ir.test(e)?Ir.parse(e):Or.parse(e)},transform:function(e){return Je(e)?e:e.hasOwnProperty("red")?hr.transform(e):Ir.transform(e)}};function wr(e){var t=[],r=0,n=e.match(Ne);n&&(r=n.length,e=e.replace(Ne,"${c}"),t.push.apply(t,n.map(Sr.parse)));var i=e.match(De);return i&&(e=e.replace(De,"${n}"),t.push.apply(t,i.map($e.parse))),{values:t,numColors:r,tokenised:e}}function Mr(e){return wr(e).values}function zr(e){var t=wr(e),r=t.values,n=t.numColors,i=t.tokenised,o=r.length;return function(e){for(var t=i,r=0;r<o;r++)t=t.replace(r<n?"${c}":"${n}",r<n?Sr.transform(e[r]):Pe(e[r]));return t}}var Zr=function(e){return"number"==typeof e?0:e},Br={test:function(e){var t,r,n,i;return isNaN(e)&&Je(e)&&(null!==(r=null===(t=e.match(De))||void 0===t?void 0:t.length)&&void 0!==r?r:0)+(null!==(i=null===(n=e.match(Ne))||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0},parse:Mr,createTransformer:zr,getAnimatableNone:function(e){var t=Mr(e);return zr(e)(t.map(Zr))}},Gr=function(e){return"number"==typeof e};function kr(e,t){return Gr(e)?function(r){return vr(e,t,r)}:Sr.test(e)?Kr(e,t):Qr(e,t)}var Yr=function(e,t){var r=U([],e),n=r.length,i=e.map((function(e,r){return kr(e,t[r])}));return function(e){for(var t=0;t<n;t++)r[t]=i[t](e);return r}},xr=function(e,t){var r=R(R({},e),t),n={};for(var i in r)void 0!==e[i]&&void 0!==t[i]&&(n[i]=kr(e[i],t[i]));return function(e){for(var t in n)r[t]=n[t](e);return r}};function Lr(e){for(var t=Br.parse(e),r=t.length,n=0,i=0,o=0,a=0;a<r;a++)n||"number"==typeof t[a]?n++:void 0!==t[a].hue?o++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:o}}var Qr=function(e,t){var r=Br.createTransformer(t),n=Lr(e),i=Lr(t);return Object(ee.a)(n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),$t(Yr(n.parsed,i.parsed),r)},Wr=function(e,t){return function(r){return vr(e,t,r)}};function Pr(e,t,r){var n=void 0===r?{}:r,i=n.clamp,o=void 0===i||i,a=n.ease,u=n.mixer,c=e.length;Object(ee.a)(c===t.length,"Both input and output ranges must be the same length"),Object(ee.a)(!a||!Array.isArray(a)||a.length===c-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[c-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var s=function(e,t,r){for(var n,i=[],o=r||("number"==typeof(n=e[0])?Wr:"string"==typeof n?Sr.test(n)?Kr:Qr:Array.isArray(n)?Yr:"object"==typeof n?xr:void 0),a=e.length-1,u=0;u<a;u++){var c=o(e[u],e[u+1]);if(t){var s=Array.isArray(t)?t[u]:t;c=$t(s,c)}i.push(c)}return i}(t,a,u),l=2===c?function(e,t){var r=e[0],n=e[1],i=t[0];return function(e){return i(dr(r,n,e))}}(e,s):function(e,t){var r=e.length,n=r-1;return function(i){var o=0,a=!1;if(i<=e[0]?a=!0:i>=e[n]&&(o=n-1,a=!0),!a){for(var u=1;u<r&&!(e[u]>i||u===n);u++);o=u-1}var c=dr(e[o],e[o+1],i);return t[o](c)}}(e,s);return o?function(t){return l(ur(e[0],e[c-1],t))}:l}var Dr,Nr=function(e){return function(t){return 1-e(1-t)}},Tr=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},Jr=function(e){return function(t){return t*t*((e+1)*t-e)}},Rr=function(e){return e},Hr=(2,function(e){return Math.pow(e,2)}),Fr=Nr(Hr),Ur=Tr(Hr),Xr=function(e){return 1-Math.sin(Math.acos(e))},Vr=Nr(Xr),_r=Tr(Vr),$r=Jr(1.525),en=Nr($r),tn=Tr($r),rn=(Dr=Jr(1.525),function(e){return(e*=2)<1?.5*Dr(e):.5*(2-Math.pow(2,-10*(e-1)))}),nn=function(e){if(1===e||0===e)return e;var t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72},on=Nr(nn);function an(e,t){return e.map((function(){return t||Ur})).splice(0,e.length-1)}function un(e){var t=e.from,r=void 0===t?0:t,n=e.to,i=void 0===n?1:n,o=e.ease,a=e.offset,u=e.duration,c=void 0===u?300:u,s={done:!1,value:r},l=Array.isArray(i)?i:[r,i],A=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===l.length?a:function(e){var t=e.length;return e.map((function(e,r){return 0!==r?r/(t-1):0}))}(l),c);function m(){return Pr(A,l,{ease:Array.isArray(o)?o:an(l,o)})}var p=m();return{next:function(e){return s.value=p(e),s.done=e>=c,s},flipTarget:function(){l.reverse(),p=m()}}}var cn={keyframes:un,spring:mr,decay:function(e){var t=e.velocity,r=void 0===t?0:t,n=e.from,i=void 0===n?0:n,o=e.power,a=void 0===o?.8:o,u=e.timeConstant,c=void 0===u?350:u,s=e.restDelta,l=void 0===s?.5:s,A=e.modifyTarget,m={done:!1,value:i},p=a*r,d=i+p,v=void 0===A?d:A(d);return v!==d&&(p=v-i),{next:function(e){var t=-p*Math.exp(-e/c);return m.done=!(t>l||t<-l),m.value=m.done?v:v+t,m},flipTarget:function(){}}}},sn="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},ln="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(sn())}),1/60*1e3)},An=!0,mn=!1,pn=!1,dn={delta:0,timestamp:0},vn=["read","update","preRender","render","postRender"],qn=vn.reduce((function(e,t){return e[t]=function(e){var t=[],r=[],n=0,i=!1,o=new WeakSet,a={schedule:function(e,a,u){void 0===a&&(a=!1),void 0===u&&(u=!1);var c=u&&i,s=c?t:r;return a&&o.add(e),-1===s.indexOf(e)&&(s.push(e),c&&i&&(n=t.length)),e},cancel:function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1),o.delete(e)},process:function(u){var c;if(i=!0,t=(c=[r,t])[0],(r=c[1]).length=0,n=t.length)for(var s=0;s<n;s++){var l=t[s];l(u),o.has(l)&&(a.schedule(l),e())}i=!1}};return a}((function(){return mn=!0})),e}),{}),gn=vn.reduce((function(e,t){var r=qn[t];return e[t]=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!1),mn||In(),r.schedule(e,t,n)},e}),{}),bn=vn.reduce((function(e,t){return e[t]=qn[t].cancel,e}),{}),fn=vn.reduce((function(e,t){return e[t]=function(){return qn[t].process(dn)},e}),{}),hn=function(e){return qn[e].process(dn)},On=function(e){mn=!1,dn.delta=An?1/60*1e3:Math.max(Math.min(e-dn.timestamp,40),1),dn.timestamp=e,pn=!0,vn.forEach(hn),pn=!1,mn&&(An=!1,ln(On))},In=function(){mn=!0,An=!0,pn||ln(On)},yn=function(){return dn},jn=gn;function Cn(e,t,r){return void 0===r&&(r=0),e-t-r}var En=function(e){var t=function(t){var r=t.delta;return e(r)};return{start:function(){return jn.update(t,!0)},stop:function(){return bn.update(t)}}};function Kn(e){var t,r,n,i,o,a=e.from,u=e.autoplay,c=void 0===u||u,s=e.driver,l=void 0===s?En:s,A=e.elapsed,m=void 0===A?0:A,p=e.repeat,d=void 0===p?0:p,v=e.repeatType,q=void 0===v?"loop":v,g=e.repeatDelay,b=void 0===g?0:g,f=e.onPlay,h=e.onStop,O=e.onComplete,I=e.onRepeat,y=e.onUpdate,j=H(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),C=j.to,E=0,K=j.duration,S=!1,w=!0,M=function(e){if(Array.isArray(e.to))return un;if(cn[e.type])return cn[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?un:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?mr:un}(j);(null===(r=(t=M).needsInterpolation)||void 0===r?void 0:r.call(t,a,C))&&(o=Pr([0,100],[a,C],{clamp:!1}),a=0,C=100);var z=M(R(R({},j),{from:a,to:C}));return c&&(null==f||f(),(n=l((function(e){if(w||(e=-e),m+=e,!S){var t=z.next(Math.max(0,m));i=t.value,o&&(i=o(i)),S=w?t.done:m<=0}null==y||y(i),S&&(0===E&&(null!=K||(K=m)),E<d?function(e,t,r,n){return n?e>=t+r:e<=-r}(m,K,b,w)&&(E++,"reverse"===q?m=function(e,t,r,n){return void 0===r&&(r=0),void 0===n&&(n=!0),n?Cn(t+-e,t,r):t-(e-t)+r}(m,K,b,w=E%2==0):(m=Cn(m,K,b),"mirror"===q&&z.flipTarget()),S=!1,I&&I()):(n.stop(),O&&O()))}))).start()),{stop:function(){null==h||h(),n.stop()}}}function Sn(e,t){return t?e*(1e3/t):0}var wn=function(e){return 1e3*e},Mn=function(e,t){return 1-3*t+3*e},zn=function(e,t){return 3*t-6*e},Zn=function(e){return 3*e},Bn=function(e,t,r){return((Mn(t,r)*e+zn(t,r))*e+Zn(t))*e},Gn=function(e,t,r){return 3*Mn(t,r)*e*e+2*zn(t,r)*e+Zn(t)};function kn(e,t,r,n){if(e===t&&r===n)return Rr;for(var i=new Float32Array(11),o=0;o<11;++o)i[o]=Bn(.1*o,e,r);return function(o){return 0===o||1===o?o:Bn(function(t){for(var n=0,o=1;10!==o&&i[o]<=t;++o)n+=.1;--o;var a=n+(t-i[o])/(i[o+1]-i[o])*.1,u=Gn(a,e,r);return u>=.001?function(e,t,r,n){for(var i=0;i<8;++i){var o=Gn(t,r,n);if(0===o)return t;t-=(Bn(t,r,n)-e)/o}return t}(t,a,e,r):0===u?a:function(e,t,r,n,i){var o,a,u=0;do{(o=Bn(a=t+(r-t)/2,n,i)-e)>0?r=a:t=a}while(Math.abs(o)>1e-7&&++u<10);return a}(t,n,n+.1,e,r)}(o),t,n)}}var Yn={linear:Rr,easeIn:Hr,easeInOut:Ur,easeOut:Fr,circIn:Xr,circInOut:_r,circOut:Vr,backIn:$r,backInOut:tn,backOut:en,anticipate:rn,bounceIn:on,bounceInOut:function(e){return e<.5?.5*(1-nn(1-2*e)):.5*nn(2*e-1)+.5},bounceOut:nn},xn=function(e){if(Array.isArray(e)){Object(ee.a)(4===e.length,"Cubic bezier arrays must contain four numerical values.");var t=F(e,4);return kn(t[0],t[1],t[2],t[3])}return"string"==typeof e?(Object(ee.a)(void 0!==Yn[e],"Invalid easing type '"+e+"'"),Yn[e]):e},Ln=function(e,t){return!("zIndex"===e||"number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!Br.test(t)||t.startsWith("url(")))},Qn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Wn=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Pn=function(){return{type:"keyframes",ease:"linear",duration:.3}},Dn=function(e){return{type:"keyframes",duration:.8,values:e}},Nn={x:Qn,y:Qn,z:Qn,rotate:Qn,rotateX:Qn,rotateY:Qn,rotateZ:Qn,scaleX:Wn,scaleY:Wn,scale:Wn,opacity:Pn,backgroundColor:Pn,color:Pn,default:Wn},Tn=new Set(["brightness","contrast","saturate","opacity"]);function Jn(e){var t=e.slice(0,-1).split("("),r=t[0],n=t[1];if("drop-shadow"===r)return e;var i=(n.match(De)||[])[0];if(!i)return e;var o=n.replace(i,""),a=Tn.has(r)?1:0;return i!==n&&(a*=100),r+"("+a+o+")"}var Rn=/([a-z-]*)\(.*?\)/g,Hn=R(R({},Br),{getAnimatableNone:function(e){var t=e.match(Rn);return t?t.map(Jn).join(" "):e}}),Fn=R(R({},nt),{color:Sr,backgroundColor:Sr,outlineColor:Sr,fill:Sr,stroke:Sr,borderColor:Sr,borderTopColor:Sr,borderRightColor:Sr,borderBottomColor:Sr,borderLeftColor:Sr,filter:Hn,WebkitFilter:Hn}),Un=function(e){return Fn[e]};function Xn(e,t){var r,n=Un(e);return n!==Hn&&(n=Br),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,t)}var Vn=!1;function $n(e,t,r){var n,i,o,a;return Array.isArray(t.to)&&(null!==(n=e.duration)&&void 0!==n||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=U([],F(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=H(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=R(R({},e),(i=r,o=t.to,a=Kt(o)?Dn:Nn[i]||Nn.default,R({to:o},a(o))))),R(R({},t),function(e){var t=e.ease,r=e.times,n=e.yoyo,i=e.flip,o=e.loop,a=H(e,["ease","times","yoyo","flip","loop"]),u=R({},a);return r&&(u.offset=r),a.duration&&(u.duration=wn(a.duration)),a.repeatDelay&&(u.repeatDelay=wn(a.repeatDelay)),t&&(u.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(xn):xn(t)),"tween"===a.type&&(u.type="keyframes"),(n||o||i)&&(Object(ee.b)(!Vn,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),Vn=!0,n?u.repeatType="reverse":o?u.repeatType="loop":i&&(u.repeatType="mirror"),u.repeat=o||n||i||a.repeat),"spring"!==a.type&&(u.type="keyframes"),u}(e))}function ei(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function ti(e){return"number"==typeof e?0:Xn("",e)}function ri(e,t){return e[t]||e.default||e}function ni(e,t,r,n){return void 0===n&&(n={}),t.start((function(i){var o,a,u=function(e,t,r,n,i){var o,a=ri(n,e),u=null!==(o=a.from)&&void 0!==o?o:t.get(),c=Ln(e,r);"none"===u&&c&&"string"==typeof r?u=Xn(e,r):ei(u)&&"string"==typeof r?u=ti(r):!Array.isArray(r)&&ei(r)&&"string"==typeof u&&(r=ti(u));var s=Ln(e,u);return Object(ee.b)(s===c,"You are trying to animate "+e+' from "'+u+'" to "'+r+'". '+u+" is not an animatable value - to enable this animation set "+u+" to a value animatable to "+r+" via the `style` property."),s&&c&&!1!==a.type?function(){var n={from:u,to:r,velocity:t.getVelocity(),onComplete:i,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function(e){var t,r=e.from,n=void 0===r?0:r,i=e.velocity,o=void 0===i?0:i,a=e.min,u=e.max,c=e.power,s=void 0===c?.8:c,l=e.timeConstant,A=void 0===l?750:l,m=e.bounceStiffness,p=void 0===m?500:m,d=e.bounceDamping,v=void 0===d?10:d,q=e.restDelta,g=void 0===q?1:q,b=e.modifyTarget,f=e.driver,h=e.onUpdate,O=e.onComplete;function I(e){return void 0!==a&&e<a||void 0!==u&&e>u}function y(e){return void 0===a?u:void 0===u||Math.abs(a-e)<Math.abs(u-e)?a:u}function j(e){null==t||t.stop(),t=Kn(R(R({},e),{driver:f,onUpdate:function(t){var r;null==h||h(t),null===(r=e.onUpdate)||void 0===r||r.call(e,t)},onComplete:O}))}function C(e){j(R({type:"spring",stiffness:p,damping:v,restDelta:g},e))}if(I(n))C({from:n,velocity:o,to:y(n)});else{var E=s*o+n;void 0!==b&&(E=b(E));var K,S,w=y(E),M=w===a?-1:1;j({type:"decay",from:n,velocity:o,timeConstant:A,power:s,restDelta:g,modifyTarget:b,onUpdate:I(E)?function(e){K=S,S=e,o=Sn(e-K,yn().delta),(1===M&&e>w||-1===M&&e<w)&&C({from:e,to:w,velocity:o})}:void 0})}return{stop:function(){return null==t?void 0:t.stop()}}}(R(R({},n),a)):Kn(R(R({},$n(a,n,e)),{onUpdate:function(e){var t;n.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;n.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e;return t.set(r),i(),null===(e=null==a?void 0:a.onComplete)||void 0===e||e.call(a),{stop:function(){}}}}(e,t,r,n,i),c=function(e,t){var r;return null!==(r=(ri(e,t)||{}).delay)&&void 0!==r?r:0}(n,e),s=function(){return a=u()};return c?o=setTimeout(s,wn(c)):s(),function(){clearTimeout(o),null==a||a.stop()}}))}function ii(e,t){-1===e.indexOf(t)&&e.push(t)}function oi(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1)}var ai=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return ii(this.subscriptions,e),function(){return oi(t.subscriptions,e)}},e.prototype.notify=function(e,t,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(var i=0;i<n;i++){var o=this.subscriptions[i];o&&o(e,t,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),ui=function(){function e(e){var t,r=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ai,this.velocityUpdateSubscribers=new ai,this.renderSubscribers=new ai,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),r.prev=r.current,r.current=e;var n=yn(),i=n.delta,o=n.timestamp;r.lastUpdated!==o&&(r.timeDelta=i,r.lastUpdated=o,jn.postRender(r.scheduleVelocityCheck)),r.prev!==r.current&&r.updateSubscribers.notify(r.current),r.velocityUpdateSubscribers.getSize()&&r.velocityUpdateSubscribers.notify(r.getVelocity()),t&&r.renderSubscribers.notify(r.current)},this.scheduleVelocityCheck=function(){return jn.postRender(r.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==r.lastUpdated&&(r.prev=r.current,r.velocityUpdateSubscribers.notify(r.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?Sn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(r){t.hasAnimated=!0,t.stopAnimation=e(r)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function ci(e){return new ui(e)}var si=function(e){return function(t){return t.test(e)}},li=[$e,Ue,Fe,He,Ve,Xe,{test:function(e){return"auto"===e},parse:function(e){return e}}],Ai=function(e){return li.find(si(e))},mi=U(U([],F(li)),[Sr,Br]);function pi(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ci(r))}function di(e,t){if(t)return(t[e]||t.default||t).from}function vi(e,t,r){var n;void 0===r&&(r={});var i=fe(e,t,r.custom),o=(i||{}).transition,a=void 0===o?e.getDefaultTransition()||{}:o;r.transitionOverride&&(a=r.transitionOverride);var u=i?function(){return qi(e,i,r)}:function(){return Promise.resolve()},c=(null===(n=e.variantChildren)||void 0===n?void 0:n.size)?function(n){void 0===n&&(n=0);var i=a.delayChildren,o=void 0===i?0:i,u=a.staggerChildren,c=a.staggerDirection;return function(e,t,r,n,i,o){void 0===r&&(r=0),void 0===n&&(n=0),void 0===i&&(i=1);var a=[],u=(e.variantChildren.size-1)*n,c=1===i?function(e){return void 0===e&&(e=0),e*n}:function(e){return void 0===e&&(e=0),u-e*n};return Array.from(e.variantChildren).sort(gi).forEach((function(e,n){a.push(vi(e,t,R(R({},o),{delay:r+c(n)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(a)}(e,t,o+n,u,c,r)}:function(){return Promise.resolve()},s=a.when;if(s){var l=F("beforeChildren"===s?[u,c]:[c,u],2),A=l[0],m=l[1];return A().then(m)}return Promise.all([u(),c(r.delay)])}function qi(e,t,r){var n,i=void 0===r?{}:r,o=i.delay,a=void 0===o?0:o,u=i.transitionOverride,c=i.type,s=e.makeTargetAnimatable(t),l=s.transition,A=void 0===l?e.getDefaultTransition():l,m=s.transitionEnd,p=H(s,["transition","transitionEnd"]);u&&(A=u);var d=[],v=c&&(null===(n=e.animationState)||void 0===n?void 0:n.getState()[c]);for(var q in p){var g=e.getValue(q),b=p[q];if(!(!g||void 0===b||v&&bi(v,q))){var f=ni(q,g,b,R({delay:a},A));d.push(f)}}return Promise.all(d).then((function(){m&&function(e,t){var r=fe(e,t),n=r?e.makeTargetAnimatable(r,!1):{},i=n.transitionEnd,o=void 0===i?{}:i;n.transition;var a,u=H(n,["transitionEnd","transition"]);for(var c in u=R(R({},u),o))pi(e,c,(a=u[c],Kt(a)?a[a.length-1]||0:a))}(e,m)}))}function gi(e,t){return e.sortNodePosition(t)}function bi(e,t){var r=e.protectedKeys,n=e.needsAnimating,i=r.hasOwnProperty(t)&&!0!==n[t];return n[t]=!1,i}var fi=[zt.Animate,zt.Hover,zt.Tap,zt.Drag,zt.Focus,zt.Exit],hi=U([],F(fi)).reverse(),Oi=fi.length;function Ii(e){var t,r=function(e){return function(t){return Promise.all(t.map((function(t){var r=t.animation,n=t.options;return function(e,t,r){var n;if(void 0===r&&(r={}),e.notifyAnimationStart(),Array.isArray(t)){var i=t.map((function(t){return vi(e,t,r)}));n=Promise.all(i)}else if("string"==typeof t)n=vi(e,t,r);else{var o="function"==typeof t?fe(e,t,r.custom):t;n=qi(e,o,r)}return n.then((function(){return e.notifyAnimationComplete(t)}))}(e,r,n)})))}}(e),n=((t={})[zt.Animate]=yi(!0),t[zt.Hover]=yi(),t[zt.Tap]=yi(),t[zt.Drag]=yi(),t[zt.Focus]=yi(),t[zt.Exit]=yi(),t),i={},o=!0,a=function(t,r){var n=fe(e,r);if(n){n.transition;var i=n.transitionEnd,o=H(n,["transition","transitionEnd"]);t=R(R(R({},t),o),i)}return t};function u(t,u){for(var c,s=e.getProps(),l=e.getVariantContext(!0)||{},A=[],m=new Set,p={},d=1/0,v=function(r){var i=hi[r],v=n[i],q=null!==(c=s[i])&&void 0!==c?c:l[i],g=ge(q),b=i===u?v.isActive:null;!1===b&&(d=r);var f=q===l[i]&&q!==s[i]&&g;if(f&&o&&e.manuallyAnimateOnMount&&(f=!1),v.protectedKeys=R({},p),!v.isActive&&null===b||!q&&!v.prevProp||Et(q)||"boolean"==typeof q)return"continue";var h=function(e,t){return"string"==typeof t?t!==e:!!qe(t)&&!ar(t,e)}(v.prevProp,q)||i===u&&v.isActive&&!f&&g||r>d&&g,O=Array.isArray(q)?q:[q],I=O.reduce(a,{});!1===b&&(I={});var y=v.prevResolvedValues,j=void 0===y?{}:y,C=R(R({},j),I),E=function(e){h=!0,m.delete(e),v.needsAnimating[e]=!0};for(var K in C){var S=I[K],w=j[K];p.hasOwnProperty(K)||(S!==w?Kt(S)&&Kt(w)?ar(S,w)?v.protectedKeys[K]=!0:E(K):void 0!==S?E(K):m.add(K):void 0!==S&&m.has(K)?E(K):v.protectedKeys[K]=!0)}v.prevProp=q,v.prevResolvedValues=I,v.isActive&&(p=R(R({},p),I)),o&&e.blockInitialAnimation&&(h=!1),h&&!f&&A.push.apply(A,U([],F(O.map((function(e){return{animation:e,options:R({type:i},t)}})))))},q=0;q<Oi;q++)v(q);if(i=R({},p),m.size){var g={};m.forEach((function(t){var r=e.getBaseTarget(t);void 0!==r&&(g[t]=r)})),A.push({animation:g})}var b=Boolean(A.length);return o&&!1===s.initial&&!e.manuallyAnimateOnMount&&(b=!1),o=!1,b?r(A):Promise.resolve()}return{isAnimated:function(e){return void 0!==i[e]},animateChanges:u,setActive:function(t,r,i){var o;return n[t].isActive===r?Promise.resolve():(null===(o=e.variantChildren)||void 0===o||o.forEach((function(e){var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r,u(i,t))},setAnimateFunction:function(t){r=t(e)},getState:function(){return n}}}function yi(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var ji={animation:ir((function(e){var t=e.visualElement,r=e.animate;t.animationState||(t.animationState=Ii(t)),Et(r)&&Object(X.useEffect)((function(){return r.subscribe(t)}),[r])})),exit:ir((function(e){var t=e.custom,r=e.visualElement,n=F(ce(),2),i=n[0],o=n[1],a=Object(X.useContext)(ae);Object(X.useEffect)((function(){var e,n,u=null===(e=r.animationState)||void 0===e?void 0:e.setActive(zt.Exit,!i,{custom:null!==(n=null==a?void 0:a.custom)&&void 0!==n?n:t});!i&&(null==u||u.then(o))}),[i])}))},Ci=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Ei=function(e){return Ci(e)&&e.hasOwnProperty("z")},Ki=function(e,t){return Math.abs(e-t)};function Si(e,t){if(Gr(e)&&Gr(t))return Ki(e,t);if(Ci(e)&&Ci(t)){var r=Ki(e.x,t.x),n=Ki(e.y,t.y),i=Ei(e)&&Ei(t)?Ki(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(i,2))}}var wi=function(){function e(e,t,r){var n=this,i=(void 0===r?{}:r).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(n.lastMoveEvent&&n.lastMoveEventInfo){var e=Zi(n.lastMoveEventInfo,n.history),t=null!==n.startEvent,r=Si(e.offset,{x:0,y:0})>=3;if(t||r){var i=e.point,o=yn().timestamp;n.history.push(R(R({},i),{timestamp:o}));var a=n.handlers,u=a.onStart,c=a.onMove;t||(u&&u(n.lastMoveEvent,e),n.startEvent=n.lastMoveEvent),c&&c(n.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){n.lastMoveEvent=e,n.lastMoveEventInfo=Mi(t,n.transformPagePoint),Yt(e)&&0===e.buttons?n.handlePointerUp(e,t):jn.update(n.updatePoint,!0)},this.handlePointerUp=function(e,t){n.end();var r=n.handlers.onEnd;if(r&&n.startEvent){var i=Zi(Mi(t,n.transformPagePoint),n.history);r&&r(e,i)}},!(xt(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var o=Mi(Pt(e),this.transformPagePoint),a=o.point,u=yn().timestamp;this.history=[R(R({},a),{timestamp:u})];var c=t.onSessionStart;c&&c(e,Zi(o,this.history)),this.removeListeners=$t(Ht(window,"pointermove",this.handlePointerMove),Ht(window,"pointerup",this.handlePointerUp),Ht(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),bn.update(this.updatePoint)},e}();function Mi(e,t){return t?{point:t(e.point)}:e}function zi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zi(e,t){var r=e.point;return{point:r,delta:zi(r,Gi(t)),offset:zi(r,Bi(t)),velocity:ki(t,.1)}}function Bi(e){return e[0]}function Gi(e){return e[e.length-1]}function ki(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,i=Gi(e);r>=0&&(n=e[r],!(i.timestamp-n.timestamp>wn(t)));)r--;if(!n)return{x:0,y:0};var o=(i.timestamp-n.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Yi(e){return e}function xi(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var Li={translate:0,scale:1,origin:0,originPoint:0};function Qi(){return{x:R({},Li),y:R({},Li)}}function Wi(e){return[e("x"),e("y")]}function Pi(e,t,r){var n=t.min,i=t.max;return void 0!==n&&e<n?e=r?vr(n,e,r.min):Math.max(e,n):void 0!==i&&e>i&&(e=r?vr(i,e,r.max):Math.min(e,i)),e}function Di(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function Ni(e,t){var r,n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=(r=F([i,n],2))[0],i=r[1]),{min:e.min+n,max:e.min+i}}function Ti(e,t,r){return{min:Ji(e,t),max:Ji(e,r)}}function Ji(e,t){var r;return"number"==typeof e?e:null!==(r=e[t])&&void 0!==r?r:0}function Ri(e,t){return xi(function(e,t){var r=e.top,n=e.left,i=e.bottom,o=e.right;void 0===t&&(t=Yi);var a=t({x:n,y:r}),u=t({x:o,y:i});return{top:a.y,left:a.x,bottom:u.y,right:u.x}}(e.getBoundingClientRect(),t))}function Hi(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=.01),Si(e,t)<r}function Fi(e){return e.max-e.min}function Ui(e,t,r,n){void 0===n&&(n=.5),e.origin=n,e.originPoint=vr(t.min,t.max,e.origin),e.scale=Fi(r)/Fi(t),Hi(e.scale,1,1e-4)&&(e.scale=1),e.translate=vr(r.min,r.max,e.origin)-e.originPoint,Hi(e.translate)&&(e.translate=0)}function Xi(e,t,r,n){Ui(e.x,t.x,r.x,Vi(n.originX)),Ui(e.y,t.y,r.y,Vi(n.originY))}function Vi(e){return"number"==typeof e?e:.5}function _i(e,t,r){e.min=r.min+t.min,e.max=e.min+Fi(t)}var $i,eo=new WeakMap,to=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),eo.set(t,this)}return e.prototype.start=function(e,t){var r=this,n=void 0===t?{}:t,i=n.snapToCursor,o=void 0!==i&&i,a=n.cursorProgress;o&&this.snapToCursor(e);var u=this.props.transformPagePoint;this.panSession=new wi(e,{onSessionStart:function(){r.stopMotion()},onStart:function(e,t){var n,i,o,u=r.props,c=u.drag,s=u.dragPropagation;if(!c||s||(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=nr(c),r.openGlobalLock)){r.prepareBoundingBox(),r.visualElement.lockProjectionTarget(),r.resolveDragConstraints();var l=Dt(e).point;Wi((function(e){var t=r.visualElement.projection.target[e],n=t.min,i=t.max;r.cursorProgress[e]=a?a[e]:dr(n,i,l[e]);var o=r.getAxisMotionValue(e);o&&(r.originPoint[e]=o.get())})),r.isDragging=!0,r.currentDirection=null,null===(i=(n=r.props).onDragStart)||void 0===i||i.call(n,e,t),null===(o=r.visualElement.animationState)||void 0===o||o.setActive(zt.Drag,!0)}},onMove:function(e,t){var n,i,o,a,u=r.props,c=u.dragPropagation,s=u.dragDirectionLock;if(c||r.openGlobalLock){var l=t.offset;if(s&&null===r.currentDirection)return r.currentDirection=function(e,t){void 0===t&&(t=10);var r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(l),void(null!==r.currentDirection&&(null===(i=(n=r.props).onDirectionLock)||void 0===i||i.call(n,r.currentDirection)));r.updateAxis("x",e,l),r.updateAxis("y",e,l),null===(a=(o=r.props).onDrag)||void 0===a||a.call(o,e,t),$i=e}},onEnd:function(e,t){return r.stop(e,t)}},{transformPagePoint:u})},e.prototype.prepareBoundingBox=function(){var e=this.visualElement;e.withoutTransform((function(){e.updateLayoutMeasurement()})),e.rebaseProjectionTarget(!0,e.measureViewportBox(!1))},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,r=t.dragConstraints,n=t.dragElastic;this.constraints=!!r&&(ve(r)?this.resolveRefConstraints(this.visualElement.getLayoutState().layout,r):function(e,t){var r=t.top,n=t.left,i=t.bottom,o=t.right;return{x:Di(e.x,n,o),y:Di(e.y,r,i)}}(this.visualElement.getLayoutState().layout,r)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:Ti(e,"left","right"),y:Ti(e,"top","bottom")}}(n),this.constraints&&!this.hasMutatedConstraints&&Wi((function(t){var r,n,i;e.getAxisMotionValue(t)&&(e.constraints[t]=(r=e.visualElement.getLayoutState().layout[t],i={},void 0!==(n=e.constraints[t]).min&&(i.min=n.min-r.min),void 0!==n.max&&(i.max=n.max-r.min),i))}))},e.prototype.resolveRefConstraints=function(e,t){var r=this.props,n=r.onMeasureDragConstraints,i=r.transformPagePoint,o=t.current;Object(ee.a)(null!==o,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."),this.constraintsBox=Ri(o,i);var a=function(e,t){return{x:Ni(e.x,t.x),y:Ni(e.y,t.y)}}(e,this.constraintsBox);if(n){var u=n(function(e){var t=e.x,r=e.y;return{top:r.min,bottom:r.max,left:t.min,right:t.max}}(a));this.hasMutatedConstraints=!!u,u&&(a=xi(u))}return a},e.prototype.cancelDrag=function(){var e;this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(zt.Drag,!1)},e.prototype.stop=function(e,t){var r;this.visualElement.unlockProjectionTarget(),null===(r=this.panSession)||void 0===r||r.end(),this.panSession=null;var n=this.isDragging;if(this.cancelDrag(),n){var i=this.props,o=i.dragMomentum,a=i.onDragEnd;if(o||this.elastic){var u=t.velocity;this.animateDragEnd(u)}null==a||a(e,t)}},e.prototype.snapToCursor=function(e){var t=this;this.prepareBoundingBox(),Wi((function(r){if(ro(r,t.props.drag,t.currentDirection)){var n=t.getAxisMotionValue(r);if(n){var i=Dt(e).point,o=t.visualElement.getLayoutState().layout,a=o[r].max-o[r].min,u=o[r].min+a/2,c=i[r]-u;t.originPoint[r]=i[r],n.set(c)}else t.cursorProgress[r]=.5,t.updateVisualElementAxis(r,e)}}))},e.prototype.updateAxis=function(e,t,r){if(ro(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,r):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var r=this.getAxisMotionValue(e);if(t&&r){var n=this.originPoint[e]+t[e],i=this.constraints?Pi(n,this.constraints[e],this.elastic[e]):n;r.set(i)}},e.prototype.updateVisualElementAxis=function(e,t){var r,n=this.visualElement.getLayoutState().layout[e],i=n.max-n.min,o=this.cursorProgress[e],a=function(e,t,r,n,i){var o=e-t*r;return n?Pi(o,n,i):o}(Dt(t).point[e],i,o,null===(r=this.constraints)||void 0===r?void 0:r[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+i)},e.prototype.setProps=function(e){var t=e.drag,r=void 0!==t&&t,n=e.dragDirectionLock,i=void 0!==n&&n,o=e.dragPropagation,a=void 0!==o&&o,u=e.dragConstraints,c=void 0!==u&&u,s=e.dragElastic,l=void 0===s?.35:s,A=e.dragMomentum,m=void 0===A||A,p=H(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=R({drag:r,dragDirectionLock:i,dragPropagation:a,dragConstraints:c,dragElastic:l,dragMomentum:m},p)},e.prototype.getAxisMotionValue=function(e){var t=this.props,r=t.layout,n=t.layoutId,i="_drag"+e.toUpperCase();return this.props[i]?this.props[i]:r||void 0!==n?void 0:this.visualElement.getValue(e,0)},e.prototype.animateDragEnd=function(e){var t=this,r=this.props,n=r.drag,i=r.dragMomentum,o=r.dragElastic,a=r.dragTransition,u=Wi((function(r){if(ro(r,n,t.currentDirection)){var u=t.constraints?t.constraints[r]:{},c=o?200:1e6,s=o?40:1e7,l=R(R({type:"inertia",velocity:i?e[r]:0,bounceStiffness:c,bounceDamping:s,timeConstant:750,restDelta:1,restSpeed:10},a),u);return t.getAxisMotionValue(r)?t.startAxisValueAnimation(r,l):t.visualElement.startLayoutAnimation(r,l)}}));return Promise.all(u).then((function(){var e,r;null===(r=(e=t.props).onDragTransitionEnd)||void 0===r||r.call(e)}))},e.prototype.stopMotion=function(){var e=this;Wi((function(t){var r=e.getAxisMotionValue(t);r?r.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var r=this.getAxisMotionValue(e);if(r){var n=r.get();return r.set(n),r.set(n),ni(e,r,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,r=t.drag;if(ve(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var n={x:0,y:0};Wi((function(t){var r,i,o,a,u;n[t]=(r=e.visualElement.projection.target[t],i=e.constraintsBox[t],o=.5,a=Fi(r),(u=Fi(i))>a?o=dr(i.min,i.max-a,r.min):a>u&&(o=dr(r.min,r.max-u,i.min)),ur(0,1,o))})),this.prepareBoundingBox(),this.resolveDragConstraints(),Wi((function(t){if(ro(t,r,null)){var i=function(e,t,r){var n=e.max-e.min,i=vr(t.min,t.max-n,r);return{min:i,max:i+n}}(e.visualElement.projection.target[t],e.constraintsBox[t],n[t]),o=i.min,a=i.max;e.visualElement.setProjectionTargetAxis(t,o,a)}}))}},e.prototype.mount=function(e){var t=this,r=Ht(e.getInstance(),"pointerdown",(function(e){var r=t.props,n=r.drag,i=r.dragListener;n&&(void 0===i||i)&&t.start(e)})),n=Gt(window,"resize",(function(){t.scalePoint()})),i=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),o=e.prevDragCursor;return o&&this.start($i,{cursorProgress:o}),function(){null==r||r(),null==n||n(),null==i||i(),t.cancelDrag()}},e}();function ro(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}var no,io,oo={pan:ir((function(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,a=t||r||n||i,u=Object(X.useRef)(null),c=Object(X.useContext)(ie).transformPagePoint,s={onSessionStart:i,onStart:r,onMove:t,onEnd:function(e,t){u.current=null,n&&n(e,t)}};Object(X.useEffect)((function(){null!==u.current&&u.current.updateHandlers(s)})),Ft(o,"pointerdown",a&&function(e){u.current=new wi(e,s,{transformPagePoint:c})}),Vt((function(){return u.current&&u.current.end()}))})),drag:ir((function(e){var t=e.dragControls,r=e.visualElement,n=Object(X.useContext)(ie).transformPagePoint,i=ue((function(){return new to({visualElement:r})}));i.setProps(R(R({},e),{transformPagePoint:n})),Object(X.useEffect)((function(){return t&&t.subscribe(i)}),[i]),Object(X.useEffect)((function(){return i.mount(r)}),[])}))};function ao(e,t){return{min:t.min-e.min,max:t.max-e.min}}function uo(e,t){return{x:ao(e.x,t.x),y:ao(e.y,t.y)}}function co(e,t){var r=e.getLayoutId(),n=t.getLayoutId();return r!==n||void 0===n&&e!==t}function so(e){return"string"==typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(no||(no={})),function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"}(io||(io={}));var lo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Ao(e,t,r){void 0===r&&(r=1),Object(ee.a)(r<=4,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var n=F(function(e){var t=lo.exec(e);if(!t)return[,];var r=F(t,3);return[r[1],r[2]]}(e),2),i=n[0],o=n[1];if(i){var a=window.getComputedStyle(t).getPropertyValue(i);return a?a.trim():so(o)?Ao(o,t,r+1):o}}function mo(e,t){return e/(t.max-t.min)*100}var po={process:function(e,t,r){var n=r.target;if("string"==typeof e){if(!Ue.test(e))return e;e=parseFloat(e)}return mo(e,n.x)+"% "+mo(e,n.y)+"%"}},vo={borderRadius:R(R({},po),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:po,borderTopRightRadius:po,borderBottomLeftRadius:po,borderBottomRightRadius:po,boxShadow:{process:function(e,t){var r=t.delta,n=t.treeScale,i=e,o=e.includes("var("),a=[];o&&(e=e.replace(lo,(function(e){return a.push(e),"_$css"})));var u=Br.parse(e);if(u.length>5)return i;var c=Br.createTransformer(e),s="number"!=typeof u[0]?1:0,l=r.x.scale*n.x,A=r.y.scale*n.y;u[0+s]/=l,u[1+s]/=A;var m=vr(l,A,.5);"number"==typeof u[2+s]&&(u[2+s]/=m),"number"==typeof u[3+s]&&(u[3+s]/=m);var p=c(u);if(o){var d=0;p=p.replace("_$css",(function(){var e=a[d];return d++,e}))}return p}}},qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,r,n){void 0===n&&(n={});var i=n.originBox,o=n.targetBox,a=n.visibilityAction,u=n.shouldStackAnimate,c=n.onComplete,s=n.prevParent,l=H(n,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),A=t.props,m=A.visualElement,p=A.layout;if(!1===u)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===u){u&&(t.isAnimatingTree=!0),r=i||r,e=o||e;var d=!1,v=m.getProjectionParent();if(v){var q=v.prevViewportBox,g=v.getLayoutState().layout;s&&(o&&(g=s.getLayoutState().layout),i&&!co(s,v)&&s.prevViewportBox&&(q=s.prevViewportBox)),q&&(d=!0,r=uo(q,r),e=uo(g,e))}var b=go(r,e),f=Wi((function(n){if("position"===p){var i=e[n].max-e[n].min;r[n].max=r[n].min+i}if(!m.projection.isTargetLocked)return void 0===a?b?t.animateAxis(n,e[n],r[n],R(R({},l),{isRelative:d})):m.setProjectionTargetAxis(n,e[n].min,e[n].max,d):void m.setVisibility(a===io.Show)}));return m.syncRender(),Promise.all(f).then((function(){t.isAnimatingTree=!1,c&&c(),m.notifyLayoutAnimationComplete()}))}},t}return J(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=ni,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)Ke[t]=e[t]}(vo)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),Wi((function(t){var r,n;return null===(n=(r=e.stopAxisAnimation)[t])||void 0===n?void 0:n.call(r)}))},t.prototype.animateAxis=function(e,t,r,n){var i,o,a=this,u=void 0===n?{}:n,c=u.transition,s=u.isRelative;if(!this.isAnimating[e]||!ho(t,this.currentAnimationTarget[e])){null===(o=(i=this.stopAxisAnimation)[e])||void 0===o||o.call(i),this.isAnimating[e]=!0;var l=this.props.visualElement,A=this.frameTarget[e],m=l.getProjectionAnimationProgress()[e];m.clearListeners(),m.set(0),m.set(0);var p=function(){var n=m.get()/1e3;!function(e,t,r,n){e.min=vr(t.min,r.min,n),e.max=vr(t.max,r.max,n)}(A,r,t,n),l.setProjectionTargetAxis(e,A.min,A.max,s)};p();var d=m.onChange(p);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,m.stop(),d()},this.currentAnimationTarget[e]=t;var v=c||l.getDefaultTransition()||Oo;return ni("x"===e?"layoutX":"layoutY",m,1e3,v&&ri(v,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(X.Component);function go(e,t){return!(fo(e)||fo(t)||ho(e.x,t.x)&&ho(e.y,t.y))}var bo={min:0,max:0};function fo(e){return ho(e.x,bo)&&ho(e.y,bo)}function ho(e,t){return e.min===t.min&&e.max===t.max}var Oo={duration:.45,ease:[.4,0,.1,1]},Io=function(e,t){return e.depth-t.depth},yo={measureLayout:function(e){return e.updateLayoutMeasurement()},layoutReady:function(e){return e.notifyLayoutReady()}};function jo(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var r=void 0===t?yo:t,n=r.measureLayout,i=r.layoutReady,o=r.parent,a=Array.from(e).sort(Io),u=function(){a.forEach((function(e){return e.resetTransform()})),a.forEach(n)};o?o.withoutTransform(u):u(),a.forEach(i),a.forEach((function(e){e.isPresent&&(e.presence=no.Present)})),fn.preRender(),fn.render(),e.clear()}}}var Co=Object(X.createContext)(jo()),Eo=Object(X.createContext)(jo());function Ko(e){return!!e.forceUpdate}var So=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,r=e.framerSyncLayout,n=e.visualElement;Ko(t)&&t.register(n),Ko(r)&&r.register(n),n.onUnmount((function(){Ko(t)&&t.remove(n),Ko(r)&&r.remove(n)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,r=e.visualElement;return Ko(t)?t.syncUpdate():(r.snapshotViewportBox(),t.add(r)),null},t.prototype.componentDidUpdate=function(){var e=this.props,t=e.syncLayout,r=e.visualElement;Ko(t)||t.flush(),r.rebaseProjectionTarget()},t.prototype.render=function(){return null},t}(V.a.Component),wo={measureLayout:function(e){var t=Object(X.useContext)(Co),r=Object(X.useContext)(Eo);return V.a.createElement(So,R({},e,{syncLayout:t,framerSyncLayout:r}))},layoutAnimation:function(e){var t=F(ce(),2)[1];return X.createElement(qo,R({},e,{safeToRemove:t}))}};function Mo(e,t){e.min=t.min,e.max=t.max}function zo(e,t,r){return r+t*(e-r)}function Zo(e,t,r,n,i){return void 0!==i&&(e=zo(e,i,n)),zo(e,r,n)+t}function Bo(e,t,r,n,i){void 0===t&&(t=0),void 0===r&&(r=1),e.min=Zo(e.min,t,r,n,i),e.max=Zo(e.max,t,r,n,i)}function Go(e,t){var r=t.x,n=t.y;Bo(e.x,r.translate,r.scale,r.originPoint),Bo(e.y,n.translate,n.scale,n.originPoint)}function ko(e,t,r,n){var i=F(n,3),o=i[0],a=i[1],u=i[2];e.min=t.min,e.max=t.max;var c=void 0!==r[u]?r[u]:.5,s=vr(t.min,t.max,c);Bo(e,r[o],r[a],s,r.scale)}var Yo=["x","scaleX","originX"],xo=["y","scaleY","originY"];function Lo(e,t,r,n,i){return e=zo(e-=t,1/r,n),void 0!==i&&(e=zo(e,1/i,n)),e}function Qo(e,t,r){var n=F(r,3),i=n[0],o=n[1],a=n[2];!function(e,t,r,n,i){void 0===t&&(t=0),void 0===r&&(r=1),void 0===n&&(n=.5);var o=vr(e.min,e.max,n)-t;e.min=Lo(e.min,t,r,o,i),e.max=Lo(e.max,t,r,o,i)}(e,t[i],t[o],t[a],t.scale)}function Wo(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:Qi(),deltaFinal:Qi(),deltaTransform:""}}var Po=Wo();function Do(e,t,r){var n=e.x,i=e.y,o="translate3d("+n.translate/t.x+"px, "+i.translate/t.y+"px, 0) ";if(r){var a=r.rotate,u=r.rotateX,c=r.rotateY;a&&(o+="rotate("+a+") "),u&&(o+="rotateX("+u+") "),c&&(o+="rotateY("+c+") ")}return o+="scale("+n.scale+", "+i.scale+")",r||o!==To?o:""}function No(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var To=Do(Po.delta,Po.treeScale,{x:1,y:1}),Jo=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Ro=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){ii(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){oi(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(Io);for(var t=this.children.length,r=0;r<t;r++)e(this.children[r])},e}(),Ho=function(e){var t=e.treeType,r=void 0===t?"":t,n=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,a=e.measureViewportBox,u=e.render,c=e.readValueFromInstance,s=e.resetTransform,l=e.restoreTransform,A=e.removeValueFromRenderState,m=e.sortNodePosition,p=e.scrapeMotionValuesFromProps;return function(e,t){var d=e.parent,v=e.props,q=e.presenceId,g=e.blockInitialAnimation,b=e.visualState;void 0===t&&(t={});var f,h,O,I,y,j,C=b.latestValues,E=b.renderState,K=function(){var e=Jo.map((function(){return new ai})),t={},r={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){return Jo.forEach((function(n){var i;null===(i=t[n])||void 0===i||i.call(t);var o="on"+n,a=e[o];a&&(t[n]=r[o](a))}))}};return e.forEach((function(e,t){r["on"+Jo[t]]=function(t){return e.add(t)},r["notify"+Jo[t]]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.notify.apply(e,U([],F(t)))}})),r}(),S={isEnabled:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},w=S,M=C,z=Wo(),Z=!1,B=new Map,G=new Map,k={},Y=R({},C);function x(){var e,t,r;f&&(S.isEnabled&&z.isHydrated&&(e=w.targetFinal,t=w.target,r=M,ko(e.x,t.x,r,Yo),ko(e.y,t.y,r,xo),Xi(z.deltaFinal,z.layoutCorrected,w.targetFinal,C)),L(),u(f,E))}function L(){var e=C;if(I&&I.isActive()){var r=I.getCrossfadeState(H);r&&(e=r)}n(H,E,e,w,z,t,v)}function Q(){K.notifyUpdate(C)}function W(){H.layoutTree.forEach(Uo)}var P=p(v);for(var D in P){var N=P[D];void 0!==C[D]&&Ye(N)&&N.set(C[D],!1)}var T=he(v),J=Oe(v),H=R(R({treeType:r,current:null,depth:d?d.depth+1:0,path:d?U(U([],F(d.path)),[d]):[],layoutTree:d?d.layoutTree:new Ro,presenceId:q,projection:S,variantChildren:J?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==d?void 0:d.isMounted()),blockInitialAnimation:g,isHoverEventsEnabled:!0,isMounted:function(){return Boolean(f)},mount:function(e){f=H.current=e,H.pointTo(H),J&&d&&!T&&(j=null==d?void 0:d.addVariantChild(H))},unmount:function(){bn.update(Q),bn.render(x),bn.preRender(H.updateLayoutProjection),G.forEach((function(e){return e()})),H.stopLayoutAnimation(),H.layoutTree.remove(H),null==j||j(),null==O||O(),K.clearAllListeners()},addVariantChild:function(e){var t,r=H.getClosestVariantNode();if(r)return null===(t=r.variantChildren)||void 0===t||t.add(e),function(){return r.variantChildren.delete(e)}},sortNodePosition:function(e){return m&&r===e.treeType?m(H.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return J?H:null==d?void 0:d.getClosestVariantNode()},scheduleUpdateLayoutProjection:d?d.scheduleUpdateLayoutProjection:function(){return jn.preRender(H.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return v.layoutId},getInstance:function(){return f},getStaticValue:function(e){return C[e]},setStaticValue:function(e,t){return C[e]=t},getLatestValues:function(){return C},setVisibility:function(e){H.isVisible!==e&&(H.isVisible=e,H.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),o(H,e,v,t)},suspendHoverEvents:function(){H.isHoverEventsEnabled=!1,jn.postRender((function(){return setTimeout((function(){return H.isHoverEventsEnabled=!0}),10)}))},addValue:function(e,t){H.hasValue(e)&&H.removeValue(e),B.set(e,t),C[e]=t.get(),function(e,t){var r=t.onChange((function(t){C[e]=t,v.onUpdate&&jn.update(Q,!1,!0)})),n=t.onRenderRequest(H.scheduleRender);G.set(e,(function(){r(),n()}))}(e,t)},removeValue:function(e){var t;B.delete(e),null===(t=G.get(e))||void 0===t||t(),G.delete(e),delete C[e],A(e,E)},hasValue:function(e){return B.has(e)},getValue:function(e,t){var r=B.get(e);return void 0===r&&void 0!==t&&(r=ci(t),H.addValue(e,r)),r},forEachValue:function(e){return B.forEach(e)},readValue:function(e){var r;return null!==(r=C[e])&&void 0!==r?r:c(f,e,t)},setBaseTarget:function(e,t){Y[e]=t},getBaseTarget:function(e){if(i){var t=i(v,e);if(void 0!==t&&!Ye(t))return t}return Y[e]}},K),{build:function(){return L(),E},scheduleRender:function(){jn.render(x,!1,!0)},syncRender:x,setProps:function(e){v=e,K.updatePropListeners(e),k=function(e,t,r){var n;for(var i in t){var o=t[i],a=r[i];if(Ye(o))e.addValue(i,o);else if(Ye(a))e.addValue(i,ci(o));else if(a!==o)if(e.hasValue(i)){var u=e.getValue(i);!u.hasAnimated&&u.set(o)}else e.addValue(i,ci(null!==(n=e.getStaticValue(i))&&void 0!==n?n:o))}for(var i in r)void 0===t[i]&&e.removeValue(i);return t}(H,p(v),k)},getProps:function(){return v},getVariant:function(e){var t;return null===(t=v.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return v.transition},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null==d?void 0:d.getVariantContext();if(!T){var t=(null==d?void 0:d.getVariantContext())||{};return void 0!==v.initial&&(t.initial=v.initial),t}for(var r={},n=0;n<_o;n++){var i=Vo[n],o=v[i];(ge(o)||!1===o)&&(r[i]=o)}return r},enableLayoutProjection:function(){S.isEnabled=!0,H.layoutTree.add(H)},lockProjectionTarget:function(){S.isTargetLocked=!0},unlockProjectionTarget:function(){H.stopLayoutAnimation(),S.isTargetLocked=!1},snapshotViewportBox:function(){H.prevViewportBox=H.measureViewportBox(!1),H.rebaseProjectionTarget(!1,H.prevViewportBox)},getLayoutState:function(){return z},setCrossfader:function(e){I=e},startLayoutAnimation:function(e,t){var r=H.getProjectionAnimationProgress()[e],n=S.target[e],i=n.min,o=n.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(t){return H.setProjectionTargetAxis(e,t,t+o)})),H.animateMotionValue(e,r,0,t)},stopLayoutAnimation:function(){Wi((function(e){return H.getProjectionAnimationProgress()[e].stop()}))},measureViewportBox:function(e){void 0===e&&(e=!0);var r,n,i=a(f,t);return e||(n=C,Qo((r=i).x,n,Yo),Qo(r.y,n,xo)),i},updateLayoutMeasurement:function(){var e;H.notifyBeforeLayoutMeasure(z.layout),z.isHydrated=!0,z.layout=H.measureViewportBox(),z.layoutCorrected=(e=z.layout,{x:R({},e.x),y:R({},e.y)}),H.notifyLayoutMeasure(z.layout,H.prevViewportBox||z.layout),jn.update((function(){return H.rebaseProjectionTarget()}))},getProjectionAnimationProgress:function(){return y||(y={x:ci(0),y:ci(0)}),y},setProjectionTargetAxis:function(e,t,r,n){var i;void 0===n&&(n=!1),n?(S.relativeTarget||(S.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),i=S.relativeTarget[e]):(S.relativeTarget=void 0,i=S.target[e]),i.min=t,i.max=r,Z=!0,K.notifySetAxisTarget()},rebaseProjectionTarget:function(e,t){void 0===t&&(t=z.layout);var r=H.getProjectionAnimationProgress(),n=r.x,i=r.y,o=!(S.relativeTarget||S.isTargetLocked||n.isAnimating()||i.isAnimating());(e||o)&&Wi((function(e){var r=t[e],n=r.min,i=r.max;H.setProjectionTargetAxis(e,n,i)}))},notifyLayoutReady:function(e){H.notifyLayoutUpdate(z.layout,H.prevViewportBox||z.layout,e)},resetTransform:function(){return s(H,f,v)},withoutTransform:function(e){var t=S.isEnabled;t&&H.resetTransform(),d?d.withoutTransform(e):e(),t&&l(f,E)},updateLayoutProjection:function(){var e=z.delta,t=z.treeScale,r=t.x,n=t.x,i=z.deltaTransform;(function(e,t,r,n){var i,o,a=e.delta,u=e.layout,c=e.layoutCorrected,s=e.treeScale,l=t.target;o=u,Mo((i=c).x,o.x),Mo(i.y,o.y),function(e,t,r){var n=r.length;if(n){t.x=t.y=1;for(var i=0;i<n;i++){var o=r[i].getLayoutState().delta;t.x*=o.x.scale,t.y*=o.y.scale,Go(e,o)}}}(c,s,r),Xi(a,c,l,n)})(z,w,H.path,C),Z&&H.notifyViewportBoxUpdate(w.target,e),Z=!1;var o=Do(e,t);o===i&&r===t.x&&n===t.y||H.scheduleRender(),z.deltaTransform=o},updateTreeLayoutProjection:function(){H.layoutTree.forEach(Fo),jn.preRender(W,!1,!0)},getProjectionParent:function(){if(void 0===h){for(var e=!1,t=H.path.length-1;t>=0;t--){var r=H.path[t];if(r.projection.isEnabled){e=r;break}}h=e}return h},resolveRelativeTargetBox:function(){if(S.relativeTarget){var e=H.getProjectionParent();e&&function(e,t){_i(e.target.x,e.relativeTarget.x,t.target.x),_i(e.target.y,e.relativeTarget.y,t.target.y)}(S,e.projection)}},pointTo:function(e){w=e.projection,M=e.getLatestValues(),null==O||O(),O=$t(e.onSetAxisTarget(H.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;H.isPresent?H.presence=no.Present:null===(e=H.layoutSafeToRemove)||void 0===e||e.call(H)})))},isPresent:!0,presence:no.Entering});return H}};function Fo(e){e.resolveRelativeTargetBox()}function Uo(e){e.updateLayoutProjection()}var Xo,Vo=U(["initial"],F(fi)),_o=Vo.length,$o=new Set(["width","height","top","left","right","bottom","x","y"]),ea=function(e){return $o.has(e)},ta=function(e,t){e.set(t,!1),e.set(t)},ra=function(e){return e===$e||e===Ue};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Xo||(Xo={}));var na=function(e,t){return parseFloat(e.split(", ")[t])},ia=function(e,t){return function(r,n){var i=n.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return na(o[1],t);var a=i.match(/^matrix\((.+)\)$/);return a?na(a[1],e):0}},oa=new Set(["x","y","z"]),aa=we.filter((function(e){return!oa.has(e)})),ua={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var r=t.top;return parseFloat(r)},left:function(e,t){var r=t.left;return parseFloat(r)},bottom:function(e,t){var r=e.y,n=t.top;return parseFloat(n)+(r.max-r.min)},right:function(e,t){var r=e.x,n=t.left;return parseFloat(n)+(r.max-r.min)},x:ia(4,13),y:ia(5,14)};function ca(e,t,r,n){return function(e){return Object.keys(e).some(ea)}(t)?function(e,t,r,n){void 0===r&&(r={}),void 0===n&&(n={}),t=R({},t),n=R({},n);var i=Object.keys(t).filter(ea),o=[],a=!1,u=[];if(i.forEach((function(i){var c=e.getValue(i);if(e.hasValue(i)){var s,l=r[i],A=t[i],m=Ai(l);if(Kt(A))for(var p=A.length,d=null===A[0]?1:0;d<p;d++)s?Object(ee.a)(Ai(A[d])===s,"All keyframes must be of the same type"):(s=Ai(A[d]),Object(ee.a)(s===m||ra(m)&&ra(s),"Keyframes must be of the same dimension as the current value"));else s=Ai(A);if(m!==s)if(ra(m)&&ra(s)){var v=c.get();"string"==typeof v&&c.set(parseFloat(v)),"string"==typeof A?t[i]=parseFloat(A):Array.isArray(A)&&s===Ue&&(t[i]=A.map(parseFloat))}else(null==m?void 0:m.transform)&&(null==s?void 0:s.transform)&&(0===l||0===A)?0===l?c.set(s.transform(l)):t[i]=m.transform(A):(a||(o=function(e){var t=[];return aa.forEach((function(r){var n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),a=!0),u.push(i),n[i]=void 0!==n[i]?n[i]:t[i],ta(c,A))}})),u.length){var c=function(e,t,r){var n=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),a=o.display,u={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===a&&t.setStaticValue("display",e.display||"block"),t.syncRender();var c=t.measureViewportBox();return r.forEach((function(r){var i=t.getValue(r);ta(i,ua[r](n,u)),e[r]=ua[r](c,o)})),e}(t,e,u);return o.length&&o.forEach((function(t){var r=F(t,2),n=r[0],i=r[1];e.getValue(n).set(i)})),e.syncRender(),{target:c,transitionEnd:n}}return{target:t,transitionEnd:n}}(e,t,r,n):{target:t,transitionEnd:n}}var sa={treeType:"dom",readValueFromInstance:function(e,t){if(Ze(t)){var r=Un(t);return r&&r.default||0}var n,i=(n=e,window.getComputedStyle(n));return(Le(t)?i.getPropertyValue(t):i[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var r;return null===(r=e.style)||void 0===r?void 0:r[t]},measureViewportBox:function(e,t){return Ri(e,t.transformPagePoint)},resetTransform:function(e,t,r){e.suspendHoverEvents();var n=r.transformTemplate;t.style.transform=n?n({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,n=t.style;delete r[e],delete n[e]},makeTargetAnimatable:function(e,t,r,n){var i=r.transformValues;void 0===n&&(n=!0);var o=t.transition,a=t.transitionEnd,u=H(t,["transition","transitionEnd"]),c=function(e,t,r){var n,i,o={};for(var a in e)o[a]=null!==(n=di(a,t))&&void 0!==n?n:null===(i=r.getValue(a))||void 0===i?void 0:i.get();return o}(u,o||{},e);if(i&&(a&&(a=i(a)),u&&(u=i(u)),c&&(c=i(c))),n){!function(e,t,r){var n,i,o,a,u,c=Object.keys(t).filter((function(t){return!e.hasValue(t)})),s=c.length;if(s)for(var l=0;l<s;l++){var A=c[l],m=t[A],p=null;Array.isArray(m)&&(p=m[0]),null===p&&(p=null!==(i=null!==(n=r[A])&&void 0!==n?n:e.readValue(A))&&void 0!==i?i:t[A]),null!=p&&("string"==typeof p&&/^\-?\d*\.?\d+$/.test(p)?p=parseFloat(p):(u=p,!mi.find(si(u))&&Br.test(m)&&(p=Xn(A,m))),e.addValue(A,ci(p)),null!==(o=(a=r)[A])&&void 0!==o||(a[A]=p),e.setBaseTarget(A,p))}}(e,u,c);var s=function(e,t,r,n){var i=function(e,t,r){var n,i=H(t,[]),o=e.getInstance();if(!(o instanceof HTMLElement))return{target:i,transitionEnd:r};for(var a in r&&(r=R({},r)),e.forEachValue((function(e){var t=e.get();if(so(t)){var r=Ao(t,o);r&&e.set(r)}})),i){var u=i[a];if(so(u)){var c=Ao(u,o);c&&(i[a]=c,r&&(null!==(n=r[a])&&void 0!==n||(r[a]=u)))}}return{target:i,transitionEnd:r}}(e,t,n);return ca(e,t=i.target,r,n=i.transitionEnd)}(e,u,c,a);a=s.transitionEnd,u=s.target}return R({transition:o,transitionEnd:a},u)},scrapeMotionValuesFromProps:jt,build:function(e,t,r,n,i,o,a){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden");var u=n.isEnabled&&i.isHydrated;it(t,r,n,i,o,a.transformTemplate,u?Do:void 0,u?No:void 0)},render:Ot},la=Ho(sa),Aa=Ho(R(R({},sa),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return Ze(t)?(null===(r=Un(t))||void 0===r?void 0:r.default)||0:(t=It.has(t)?t:ht(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Ct,build:function(e,t,r,n,i,o,a){var u=n.isEnabled&&i.isHydrated;vt(t,r,n,i,o,a.transformTemplate,u?Do:void 0,u?No:void 0)},render:yt})),ma=function(e,t){return Ee(e)?Aa(t,{enableHardwareAcceleration:!1}):la(t,{enableHardwareAcceleration:!0})},pa=R(R(R(R({},ji),or),oo),wo),da=je((function(e,t){return function(e,t,r,n){var i=t.forwardMotionProps,o=void 0!==i&&i,a=Ee(e)?Zt:Bt;return R(R({},a),{preloadedFeatures:r,useRender:bt(o),createVisualElement:n,Component:e})}(e,t,pa,ma)})),va=0;function qa(){var e=va;return va++,e}var ga=function(e){var t=e.children,r=e.initial,n=e.isPresent,i=e.onExitComplete,o=e.custom,a=e.presenceAffectsLayout,u=ue(ba),c=ue(qa),s=Object(X.useMemo)((function(){return{id:c,initial:r,isPresent:n,custom:o,onExitComplete:function(e){u.set(e,!0);var t=!0;u.forEach((function(e){e||(t=!1)})),t&&(null==i||i())},register:function(e){return u.set(e,!1),function(){return u.delete(e)}}}}),a?void 0:[n]);return Object(X.useMemo)((function(){u.forEach((function(e,t){return u.set(t,!1)}))}),[n]),X.useEffect((function(){!n&&!u.size&&(null==i||i())}),[n]),X.createElement(ae.Provider,{value:s},t)};function ba(){return new Map}function fa(e){return e.key||""}var ha=function(e){var t=e.children,r=e.custom,n=e.initial,i=void 0===n||n,o=e.onExitComplete,a=e.exitBeforeEnter,u=e.presenceAffectsLayout,c=void 0===u||u,s=function(){var e=Object(X.useRef)(!1),t=F(Object(X.useState)(0),2),r=t[0],n=t[1];return Vt((function(){return e.current=!0})),Object(X.useCallback)((function(){!e.current&&n(r+1)}),[r])}(),l=Object(X.useContext)(Co);Ko(l)&&(s=l.forceUpdate);var A=Object(X.useRef)(!0),m=function(e){var t=[];return X.Children.forEach(e,(function(e){Object(X.isValidElement)(e)&&t.push(e)})),t}(t),p=Object(X.useRef)(m),d=Object(X.useRef)(new Map).current,v=Object(X.useRef)(new Set).current;if(function(e,t){e.forEach((function(e){var r=fa(e);t.set(r,e)}))}(m,d),A.current)return A.current=!1,X.createElement(X.Fragment,null,m.map((function(e){return X.createElement(ga,{key:fa(e),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:c},e)})));for(var q=U([],F(m)),g=p.current.map(fa),b=m.map(fa),f=g.length,h=0;h<f;h++){var O=g[h];-1===b.indexOf(O)?v.add(O):v.delete(O)}return a&&v.size&&(q=[]),v.forEach((function(e){if(-1===b.indexOf(e)){var t=d.get(e);if(t){var n=g.indexOf(e);q.splice(n,0,X.createElement(ga,{key:fa(t),isPresent:!1,onExitComplete:function(){d.delete(e),v.delete(e);var t=p.current.findIndex((function(t){return t.key===e}));p.current.splice(t,1),v.size||(p.current=m,s(),o&&o())},custom:r,presenceAffectsLayout:c},t))}}})),q=q.map((function(e){var t=e.key;return v.has(t)?e:X.createElement(ga,{key:fa(e),isPresent:!0,presenceAffectsLayout:c},e)})),p.current=q,X.createElement(X.Fragment,null,v.size?q:q.map((function(e){return Object(X.cloneElement)(e)})))},Oa=r(410),Ia=r(55),ya=function(e){var t=e.onClick,r=void 0===t?m.noop:t,i=e.small,o=void 0!==i&&i,a=Object(v.useSelect)((function(e){return{shortcut:e(D.store).getShortcutRepresentation("core/edit-post/toggle-sidebar"),areAdvancedSettingsOpened:"edit-post/block"===e(C.a).getActiveGeneralSidebarName()}}),[]),u=a.shortcut,c=a.areAdvancedSettingsOpened,s=Object(v.useDispatch)(C.a),l=s.openGeneralSidebar,A=s.closeGeneralSidebar,p=c?Object(q.__)("Hide more settings"):Object(q.__)("Show more settings");return Object(n.createElement)(d.MenuItem,{onClick:function(){c?A():(l("edit-post/block"),c?Object(Ia.speak)(Object(q.__)("Block settings closed")):Object(Ia.speak)(Object(q.__)("Additional settings are now available in the Editor block settings sidebar")),r())},shortcut:u},!o&&p)};function ja(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ca(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ja(Object(r),!0).forEach((function(t){Object(k.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ja(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ea(e){var t=e.styles,r=Object(n.useRef)(),i=Object(v.useSelect)((function(e){var t=e(C.a),r=t.isEditingTemplate;return{deviceType:(0,t.__experimentalGetPreviewDeviceType)(),isTemplateMode:r()}}),[]),u=i.deviceType,c=i.isTemplateMode,s=Object(v.useSelect)((function(e){return e(C.a).hasMetaBoxes()}),[]),l=Object(v.useSelect)((function(e){return(0,e(o.store).getSettings)().supportsLayout}),[]),A=Object(v.useDispatch)(C.a).setIsEditingTemplate,m={height:"100%",width:"100%",margin:0,paddingBottom:s?null:"40vh"},p=Ca(Ca({},m),{},{borderRadius:"2px",border:"1px solid #ddd",paddingBottom:null}),b=Object(o.__experimentalUseResizeCanvas)(u),f=Object(o.__experimentalUseEditorFeature)("layout"),h=f||{},O=h.contentSize,I=h.wideSize,y=O||I?["wide","full"]:["left","center","right"],j=c?p:m;b&&(j=b);var E=Object(g.useMergeRefs)([r,Object(o.__unstableUseClipboardHandler)(),Object(o.__unstableUseCanvasClickRedirect)(),Object(o.__unstableUseTypewriter)(),Object(o.__unstableUseTypingObserver)(),Object(o.__unstableUseBlockSelectionClearer)()]),K=Object(o.__unstableUseBlockSelectionClearer)(!0);return Object(n.createElement)(da.div,{className:Q()("edit-post-visual-editor",{"is-template-mode":c}),animate:c?{padding:"48px"}:{padding:0},ref:K},l&&Object(n.createElement)(o.__experimentalLayoutStyle,{selector:".edit-post-visual-editor__post-title-wrapper, .block-editor-block-list__layout.is-root-container",layout:f}),Object(n.createElement)(o.__unstableEditorStyles,{styles:t}),Object(n.createElement)(a.VisualEditorGlobalKeyboardShortcuts,null),Object(n.createElement)(d.Popover.Slot,{name:"block-toolbar"}),c&&Object(n.createElement)(d.Button,{className:"edit-post-visual-editor__exit-template-mode",icon:Oa.a,onClick:function(){return A(!1)}},Object(q.__)("Back")),Object(n.createElement)(da.div,{ref:E,className:"editor-styles-wrapper",animate:j,initial:m},Object(n.createElement)(ha,null,Object(n.createElement)(da.div,{key:c?"template":"post",initial:{opacity:0},animate:{opacity:1}},Object(n.createElement)(o.WritingFlow,null,!c&&Object(n.createElement)("div",{className:"edit-post-visual-editor__post-title-wrapper"},Object(n.createElement)(a.PostTitle,null)),Object(n.createElement)(o.BlockList,{__experimentalLayout:l?{type:"default",alignments:l?y:void 0}:void 0}))))),Object(n.createElement)(o.__experimentalBlockSettingsMenuFirstItem,null,(function(e){var t=e.onClose;return Object(n.createElement)(ya,{onClick:t})})))}var Ka=function(){var e=Object(v.useSelect)((function(e){var t=e("core/editor").getEditorSettings();return{getBlockSelectionStart:e("core/block-editor").getBlockSelectionStart,getEditorMode:e(C.a).getEditorMode,isEditorSidebarOpened:e(C.a).isEditorSidebarOpened,richEditingEnabled:t.richEditingEnabled,codeEditingEnabled:t.codeEditingEnabled}})),t=e.getBlockSelectionStart,r=e.getEditorMode,i=e.isEditorSidebarOpened,o=e.richEditingEnabled,a=e.codeEditingEnabled,u=Object(v.useDispatch)(C.a),c=u.switchEditorMode,s=u.openGeneralSidebar,l=u.closeGeneralSidebar,A=u.toggleFeature,m=Object(v.useDispatch)(D.store).registerShortcut;return Object(n.useEffect)((function(){m({name:"core/edit-post/toggle-mode",category:"global",description:Object(q.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),m({name:"core/edit-post/toggle-fullscreen",category:"global",description:Object(q.__)("Toggle fullscreen mode."),keyCombination:{modifier:"secondary",character:"f"}}),m({name:"core/edit-post/toggle-block-navigation",category:"global",description:Object(q.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}}),m({name:"core/edit-post/toggle-sidebar",category:"global",description:Object(q.__)("Show or hide the settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),m({name:"core/edit-post/next-region",category:"global",description:Object(q.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),m({name:"core/edit-post/previous-region",category:"global",description:Object(q.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]}),m({name:"core/edit-post/keyboard-shortcuts",category:"main",description:Object(q.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}})}),[]),Object(D.useShortcut)("core/edit-post/toggle-mode",(function(){c("visual"===r()?"text":"visual")}),{bindGlobal:!0,isDisabled:!o||!a}),Object(D.useShortcut)("core/edit-post/toggle-fullscreen",(function(){A("fullscreenMode")}),{bindGlobal:!0}),Object(D.useShortcut)("core/edit-post/toggle-sidebar",(function(e){if(e.preventDefault(),i())l();else{var r=t()?"edit-post/block":"edit-post/document";s(r)}}),{bindGlobal:!0}),null},Sa=[{keyCombination:{modifier:"primary",character:"b"},description:Object(q.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:Object(q.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:Object(q.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:Object(q.__)("Remove a link.")},{keyCombination:{modifier:"primary",character:"u"},description:Object(q.__)("Underline the selected text.")}];function wa(e){var t=e.keyCombination,r=e.forceAriaLabel,i=t.modifier?K.displayShortcutList[t.modifier](t.character):t.character,o=t.modifier?K.shortcutAriaLabel[t.modifier](t.character):t.character;return Object(n.createElement)("kbd",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":r||o},Object(m.castArray)(i).map((function(e,t){return"+"===e?Object(n.createElement)(n.Fragment,{key:t},e):Object(n.createElement)("kbd",{key:t,className:"edit-post-keyboard-shortcut-help-modal__shortcut-key"},e)})))}var Ma=function(e){var t=e.description,r=e.keyCombination,i=e.aliases,o=void 0===i?[]:i,a=e.ariaLabel;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-description"},t),Object(n.createElement)("div",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-term"},Object(n.createElement)(wa,{keyCombination:r,forceAriaLabel:a}),o.map((function(e,t){return Object(n.createElement)(wa,{keyCombination:e,forceAriaLabel:a,key:t})}))))},za=function(e){var t=e.name,r=Object(v.useSelect)((function(e){var r=e(D.store),n=r.getShortcutKeyCombination,i=r.getShortcutDescription,o=r.getShortcutAliases;return{keyCombination:n(t),aliases:o(t),description:i(t)}})),i=r.keyCombination,o=r.description,a=r.aliases;return i?Object(n.createElement)(Ma,{keyCombination:i,description:o,aliases:a}):null},Za="edit-post/keyboard-shortcut-help",Ba=function(e){var t=e.shortcuts;return Object(n.createElement)("ul",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-list",role:"list"},t.map((function(e,t){return Object(n.createElement)("li",{className:"edit-post-keyboard-shortcut-help-modal__shortcut",key:t},Object(m.isString)(e)?Object(n.createElement)(za,{name:e}):Object(n.createElement)(Ma,e))})))},Ga=function(e){var t=e.title,r=e.shortcuts,i=e.className;return Object(n.createElement)("section",{className:Q()("edit-post-keyboard-shortcut-help-modal__section",i)},!!t&&Object(n.createElement)("h2",{className:"edit-post-keyboard-shortcut-help-modal__section-title"},t),Object(n.createElement)(Ba,{shortcuts:r}))},ka=function(e){var t=e.title,r=e.categoryName,i=e.additionalShortcuts,o=void 0===i?[]:i,a=Object(v.useSelect)((function(e){return e(D.store).getCategoryShortcuts(r)}),[r]);return Object(n.createElement)(Ga,{title:t,shortcuts:a.concat(o)})},Ya=Object(g.compose)([Object(v.withSelect)((function(e){return{isModalActive:e(C.a).isModalActive(Za)}})),Object(v.withDispatch)((function(e,t){var r=t.isModalActive,n=e(C.a),i=n.openModal,o=n.closeModal;return{toggleModal:function(){return r?o():i(Za)}}}))])((function(e){var t=e.isModalActive,r=e.toggleModal;return Object(D.useShortcut)("core/edit-post/keyboard-shortcuts",r,{bindGlobal:!0}),t?Object(n.createElement)(d.Modal,{className:"edit-post-keyboard-shortcut-help-modal",title:Object(q.__)("Keyboard shortcuts"),closeLabel:Object(q.__)("Close"),onRequestClose:r},Object(n.createElement)(Ga,{className:"edit-post-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-post/keyboard-shortcuts"]}),Object(n.createElement)(ka,{title:Object(q.__)("Global shortcuts"),categoryName:"global"}),Object(n.createElement)(ka,{title:Object(q.__)("Selection shortcuts"),categoryName:"selection"}),Object(n.createElement)(ka,{title:Object(q.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:Object(q.__)("Change the block type after adding a new paragraph."),
18
  /* translators: The forward-slash character. e.g. '/'. */
19
  ariaLabel:Object(q.__)("Forward-slash")}]}),Object(n.createElement)(Ga,{title:Object(q.__)("Text formatting"),shortcuts:Sa})):null})),xa=function(e){var t=e.blockTypes,r=e.value,i=e.onItemChange;return Object(n.createElement)("ul",{className:"edit-post-manage-blocks-modal__checklist"},t.map((function(e){return Object(n.createElement)("li",{key:e.name,className:"edit-post-manage-blocks-modal__checklist-item"},Object(n.createElement)(d.CheckboxControl,{label:Object(n.createElement)(n.Fragment,null,e.title,Object(n.createElement)(o.BlockIcon,{icon:e.icon})),checked:r.includes(e.name),onChange:Object(m.partial)(i,e.name)}))})))},La=Object(n.createContext)({}),Qa=Object(g.compose)([g.withInstanceId,Object(v.withSelect)((function(e){return{hiddenBlockTypes:(0,e(C.a).getPreference)("hiddenBlockTypes")}})),Object(v.withDispatch)((function(e,t){var r=e(C.a),n=r.showBlockTypes,i=r.hideBlockTypes;return{toggleVisible:function(e,t){t?n(e):i(e)},toggleAllVisible:function(e){var r=Object(m.map)(t.blockTypes,"name");e?n(r):i(r)}}}))])((function(e){var t=e.instanceId,r=e.title,i=e.blockTypes,o=e.hiddenBlockTypes,a=e.toggleVisible,u=e.toggleAllVisible,c=Object(n.useContext)(La).allowedBlockTypes,s=Object(n.useMemo)((function(){return!0===c?i:i.filter((function(e){var t=e.name;return Object(m.includes)(c||[],t)}))}),[c,i]);if(!s.length)return null;var l,A=m.without.apply(void 0,[Object(m.map)(s,"name")].concat(Object(G.a)(o))),p="edit-post-manage-blocks-modal__category-title-"+t,v=A.length===s.length;return l=v?"true":A.length>0?"mixed":"false",Object(n.createElement)("div",{role:"group","aria-labelledby":p,className:"edit-post-manage-blocks-modal__category"},Object(n.createElement)(d.CheckboxControl,{checked:v,onChange:u,className:"edit-post-manage-blocks-modal__category-title","aria-checked":l,label:Object(n.createElement)("span",{id:p},r)}),Object(n.createElement)(xa,{blockTypes:s,value:A,onItemChange:a}))})),Wa=Object(g.compose)([Object(g.withState)({search:""}),Object(v.withSelect)((function(e){var t=e(p.store),r=t.getBlockTypes,n=t.getCategories,i=t.hasBlockSupport,o=t.isMatchingSearchTerm,a=(0,e(C.a).getPreference)("hiddenBlockTypes"),u=Object(m.isArray)(a)&&a.length;return{blockTypes:r(),categories:n(),hasBlockSupport:i,isMatchingSearchTerm:o,numberOfHiddenBlocks:u}}))])((function(e){var t=e.search,r=e.setState,i=e.blockTypes,o=e.categories,a=e.hasBlockSupport,u=e.isMatchingSearchTerm,c=e.numberOfHiddenBlocks;return i=i.filter((function(e){return a(e,"inserter",!0)&&(!t||u(e,t))&&(!e.parent||Object(m.includes)(e.parent,"core/post-content"))})),Object(n.createElement)("div",{className:"edit-post-manage-blocks-modal__content"},Object(n.createElement)(d.TextControl,{type:"search",label:Object(q.__)("Search for a block"),value:t,onChange:function(e){return r({search:e})},className:"edit-post-manage-blocks-modal__search"}),!!c&&Object(n.createElement)("div",{className:"edit-post-manage-blocks-modal__disabled-blocks-count"},Object(q.sprintf)(
20
  /* translators: %d: number of blocks. */
14
  /* translators: accessibility text for the footer landmark region. */
15
  footer:Object(K.__)("Footer")}),s);return Object(y.createElement)("div",{ref:Object(_.useMergeRefs)([t,m]),className:C()(l,"interface-interface-skeleton",p,!!r&&"has-footer")},!!u&&Object(y.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":d.drawer},u),Object(y.createElement)("div",{className:"interface-interface-skeleton__editor"},!!n&&Object(y.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":d.header,tabIndex:"-1"},n),Object(y.createElement)("div",{className:"interface-interface-skeleton__body"},!!o&&Object(y.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":d.secondarySidebar,tabIndex:"-1"},o),Object(y.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":d.body,tabIndex:"-1"},a),!!i&&Object(y.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":d.sidebar,tabIndex:"-1"},i),!!c&&Object(y.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":d.actions,tabIndex:"-1"},c))),!!r&&Object(y.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":d.footer,tabIndex:"-1"},r))}))},49:function(e,t,r){"use strict";var n,i;function o(e){return[e]}function a(){var e={clear:function(){e.head=null}};return e}function u(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n={},i="undefined"!=typeof WeakMap,t.a=function(e,t){var r,c;function s(){r=i?new WeakMap:a()}function l(){var r,n,i,o,a,s=arguments.length;for(o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];for(a=t.apply(null,o),(r=c(a)).isUniqueByDependants||(r.lastDependants&&!u(a,r.lastDependants,0)&&r.clear(),r.lastDependants=a),n=r.head;n;){if(u(n.args,o,1))return n!==r.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=r.head,n.prev=null,r.head.prev=n,r.head=n),n.val;n=n.next}return n={val:e.apply(null,o)},o[0]=null,n.args=o,r.head&&(r.head.prev=n,n.next=r.head),r.head=n,n.val}return t||(t=o),c=i?function(e){var t,i,o,u,c,s=r,l=!0;for(t=0;t<e.length;t++){if(!(c=i=e[t])||"object"!=typeof c){l=!1;break}s.has(i)?s=s.get(i):(o=new WeakMap,s.set(i,o),s=o)}return s.has(n)||((u=a()).isUniqueByDependants=l,s.set(n,u)),s.get(n)}:function(){return r},l.getDependants=t,l.clear=s,s(),l}},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},50:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}r.d(t,"a",(function(){return n}))},518:function(e,t,r){"use strict";var n=r(0),i=r(7),o=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.a=o},543:function(e,t,r){"use strict";r.r(t),r.d(t,"store",(function(){return C.a})),r.d(t,"reinitializeEditor",(function(){return Nc})),r.d(t,"initializeEditor",(function(){return Tc})),r.d(t,"PluginBlockSettingsMenuItem",(function(){return Wc})),r.d(t,"PluginDocumentSettingPanel",(function(){return oc.a})),r.d(t,"PluginMoreMenuItem",(function(){return Pc})),r.d(t,"PluginPostPublishPanel",(function(){return jc})),r.d(t,"PluginPostStatusInfo",(function(){return Pu})),r.d(t,"PluginPrePublishPanel",(function(){return wc})),r.d(t,"PluginSidebar",(function(){return ac})),r.d(t,"PluginSidebarMoreMenuItem",(function(){return Dc})),r.d(t,"__experimentalFullscreenModeClose",(function(){return eu})),r.d(t,"__experimentalMainDashboardButton",(function(){return Cu}));var n=r(0),i=r(19),o=r(6),a=r(36),u=r(84),c=r(32),s=r(86);Object(c.addFilter)("editor.MediaUpload","core/edit-post/replace-media-upload",(function(){return s.MediaUpload}));var l=r(10),A=r(13),m=r(2),p=r(11),d=r(3),v=r(4),q=r(1),g=r(14),b=Object(g.compose)(Object(v.withSelect)((function(e,t){if(Object(p.hasBlockSupport)(t.name,"multiple",!0))return{};var r=e("core/block-editor").getBlocks(),n=Object(m.find)(r,(function(e){var r=e.name;return t.name===r}));return{originalBlockClientId:n&&n.clientId!==t.clientId&&n.clientId}})),Object(v.withDispatch)((function(e,t){var r=t.originalBlockClientId;return{selectFirst:function(){return e("core/block-editor").selectBlock(r)}}}))),f=Object(g.createHigherOrderComponent)((function(e){return b((function(t){var r=t.originalBlockClientId,i=t.selectFirst,a=Object(A.a)(t,["originalBlockClientId","selectFirst"]);if(!r)return Object(n.createElement)(e,a);var u,c,s=Object(p.getBlockType)(a.name),m=(u=a.name,(c=Object(p.findTransform)(Object(p.getBlockTransforms)("to",u),(function(e){var t=e.type,r=e.blocks;return"block"===t&&1===r.length})))?Object(p.getBlockType)(c.blocks[0]):null);return[Object(n.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},Object(n.createElement)(e,Object(l.a)({key:"block-edit"},a))),Object(n.createElement)(o.Warning,{key:"multiple-use-warning",actions:[Object(n.createElement)(d.Button,{key:"find-original",isSecondary:!0,onClick:i},Object(q.__)("Find original")),Object(n.createElement)(d.Button,{key:"remove",isSecondary:!0,onClick:function(){return a.onReplace([])}},Object(q.__)("Remove")),m&&Object(n.createElement)(d.Button,{key:"transform",isSecondary:!0,onClick:function(){return a.onReplace(Object(p.createBlock)(m.name,a.attributes))}},Object(q.__)("Transform into:")," ",m.title)]},Object(n.createElement)("strong",null,s.title,": "),Object(q.__)("This block can only be used once."))]}))}),"withMultipleValidation");Object(c.addFilter)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",f);var h=r(518),O=r(69),I=r(31),y=r(45);function j(){var e=Object(v.useDispatch)(y.store).createNotice,t=Object(v.useSelect)((function(e){return function(){return e(a.store).getEditedPostAttribute("content")}}),[]),r=Object(g.useCopyToClipboard)(t,(function(){e("info",Object(q.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return Object(n.createElement)(d.MenuItem,{ref:r},Object(q.__)("Copy all content"))}var C=r(27),E=Object(v.withDispatch)((function(e){return{openModal:e(C.a).openModal}}))((function(e){var t=e.openModal;return Object(n.createElement)(d.MenuItem,{onClick:function(){t("edit-post/manage-blocks")}},Object(q.__)("Block Manager"))})),K=r(17),S=Object(v.withDispatch)((function(e){return{openModal:e(C.a).openModal}}))((function(e){var t=e.openModal;return Object(n.createElement)(d.MenuItem,{onClick:function(){t("edit-post/keyboard-shortcut-help")},shortcut:K.displayShortcut.access("h")},Object(q.__)("Keyboard shortcuts"))})),w=Object(d.createSlotFill)("ToolsMoreMenuGroup"),M=w.Fill,z=w.Slot;M.Slot=function(e){var t=e.fillProps;return Object(n.createElement)(z,{fillProps:t},(function(e){return!Object(m.isEmpty)(e)&&Object(n.createElement)(d.MenuGroup,{label:Object(q.__)("Tools")},e)}))};var Z=M;function B(){var e=Object(v.useDispatch)(C.a).toggleFeature;return Object(n.createElement)(d.MenuItem,{onClick:function(){return e("welcomeGuide")}},Object(q.__)("Welcome Guide"))}Object(O.registerPlugin)("edit-post",{render:function(){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Z,null,(function(e){var t=e.onClose;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(E,{onSelect:t}),Object(n.createElement)(d.MenuItem,{role:"menuitem",href:Object(I.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(q.__)("Manage Reusable blocks")),Object(n.createElement)(S,{onSelect:t}),Object(n.createElement)(B,null),Object(n.createElement)(j,null),Object(n.createElement)(d.MenuItem,{role:"menuitem",icon:h.a,href:Object(q.__)("https://wordpress.org/support/article/wordpress-editor/"),target:"_blank",rel:"noopener noreferrer"},Object(q.__)("Help"),Object(n.createElement)(d.VisuallyHidden,{as:"span"},
16
  /* translators: accessibility text */
17
+ Object(q.__)("(opens in a new tab)"))))})))}});var G=r(15),k=r(5),Y={"t a l e s o f g u t e n b e r g":function(e){var t=e.target.ownerDocument;(t.activeElement.classList.contains("edit-post-visual-editor")||t.activeElement===t.body)&&(e.preventDefault(),window.wp.data.dispatch("core/block-editor").insertBlock(window.wp.blocks.createBlock("core/paragraph",{content:"🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️"})))}},x=r(9),L=r(12),Q=r.n(L),W=r(48),P=r(168),D=r(47),N=Object(g.compose)(Object(v.withSelect)((function(e){return{isRichEditingEnabled:e("core/editor").getEditorSettings().richEditingEnabled}})),Object(v.withDispatch)((function(e){return{onExit:function(){e(C.a).switchEditorMode("visual")}}})))((function(e){var t=e.onExit,r=e.isRichEditingEnabled;return Object(n.createElement)("div",{className:"edit-post-text-editor"},r&&Object(n.createElement)("div",{className:"edit-post-text-editor__toolbar"},Object(n.createElement)("h2",null,Object(q.__)("Editing code")),Object(n.createElement)(d.Button,{isTertiary:!0,onClick:t,shortcut:K.displayShortcut.secondary("m")},Object(q.__)("Exit code editor")),Object(n.createElement)(a.TextEditorGlobalKeyboardShortcuts,null)),Object(n.createElement)("div",{className:"edit-post-text-editor__body"},Object(n.createElement)(a.PostTitle,null),Object(n.createElement)(a.PostTextEditor,null)))})),T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function J(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}var R=function(){return(R=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function H(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function F(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function U(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e}Object.create,Object.create;var X=r(8),V=r.n(X),_=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},$={measureLayout:_(["layout","layoutId","drag"]),animation:_(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:_(["exit"]),drag:_(["drag","dragControls"]),focus:_(["whileFocus"]),hover:_(["whileHover","onHoverStart","onHoverEnd"]),tap:_(["whileTap","onTap","onTapStart","onTapCancel"]),pan:_(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:_(["layout","layoutId"])},ee=r(79),te=Object(X.createContext)({strict:!1}),re=Object.keys($),ne=re.length,ie=Object(X.createContext)({transformPagePoint:function(e){return e},isStatic:!1}),oe=Object(X.createContext)({}),ae=Object(X.createContext)(null);function ue(e){var t=Object(X.useRef)(null);return null===t.current&&(t.current=e()),t.current}function ce(){var e=Object(X.useContext)(ae);if(null===e)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,i=Ae();return Object(X.useEffect)((function(){return n(i)}),[]),!t&&r?[!1,function(){return null==r?void 0:r(i)}]:[!0]}var se=0,le=function(){return se++},Ae=function(){return ue(le)},me=Object(X.createContext)(null),pe="undefined"!=typeof window,de=pe?X.useLayoutEffect:X.useEffect;function ve(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function qe(e){return Array.isArray(e)}function ge(e){return"string"==typeof e||qe(e)}function be(e,t,r,n,i){var o;return void 0===n&&(n={}),void 0===i&&(i={}),"string"==typeof t&&(t=null===(o=e.variants)||void 0===o?void 0:o[t]),"function"==typeof t?t(null!=r?r:e.custom,n,i):t}function fe(e,t,r){var n=e.getProps();return be(n,t,null!=r?r:n.custom,function(e){var t={};return e.forEachValue((function(e,r){return t[r]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,r){return t[r]=e.getVelocity()})),t}(e))}function he(e){var t;return"function"==typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||ge(e.initial)||ge(e.animate)||ge(e.whileHover)||ge(e.whileDrag)||ge(e.whileTap)||ge(e.whileFocus)||ge(e.exit)}function Oe(e){return Boolean(he(e)||e.variants)}function Ie(e){return Array.isArray(e)?e.join(" "):e}function ye(e){var t=e.preloadedFeatures,r=e.createVisualElement,n=e.useRender,i=e.useVisualState,o=e.Component;return t&&function(e){for(var t in e){var r=e[t];null!==r&&($[t].Component=r)}}(t),Object(X.forwardRef)((function(e,t){var a=Object(X.useContext)(ie).isStatic,u=null,c=function(e,t){var r=function(e,t){if(he(e)){var r=e.initial,n=e.animate;return{initial:!1===r||ge(r)?r:void 0,animate:ge(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,Object(X.useContext)(oe)),n=r.initial,i=r.animate;return Object(X.useMemo)((function(){return{initial:n,animate:i}}),t?[Ie(n),Ie(i)]:[])}(e,a),s=i(e,a);return!a&&pe&&(c.visualElement=function(e,t,r,n){var i=Object(X.useContext)(ie),o=Object(X.useContext)(te),a=Object(X.useContext)(oe).visualElement,u=Object(X.useContext)(ae),c=function(e){var t=e.layoutId,r=Object(X.useContext)(me);return r&&void 0!==t?r+"-"+t:t}(r),s=Object(X.useRef)(void 0);n||(n=o.renderer),!s.current&&n&&(s.current=n(e,{visualState:t,parent:a,props:R(R({},r),{layoutId:c}),presenceId:null==u?void 0:u.id,blockInitialAnimation:!1===(null==u?void 0:u.initial)}));var l=s.current;return de((function(){var e;l&&(l.setProps(R(R(R({},i),r),{layoutId:c})),l.isPresent=null===(e=u)||e.isPresent,l.isPresenceRoot=!a||a.presenceId!==(null==u?void 0:u.id),l.syncRender())})),Object(X.useEffect)((function(){var e;l&&(null===(e=l.animationState)||void 0===e||e.animateChanges())})),de((function(){return function(){return null==l?void 0:l.notifyUnmount()}}),[]),l}(o,s,e,r),u=function(e,t,r){var n=[];if(Object(X.useContext)(te),!t)return null;for(var i=0;i<ne;i++){var o=re[i],a=$[o],u=a.isEnabled,c=a.Component;u(e)&&c&&n.push(X.createElement(c,R({key:o},e,{visualElement:t})))}return n}(e,c.visualElement)),X.createElement(X.Fragment,null,X.createElement(oe.Provider,{value:c},n(o,e,function(e,t,r){return Object(X.useCallback)((function(n){var i;n&&(null===(i=e.mount)||void 0===i||i.call(e,n)),t&&(n?t.mount(n):t.unmount()),r&&("function"==typeof r?r(n):ve(r)&&(r.current=n))}),[t])}(s,c.visualElement,t),s,a)),u)}))}function je(e){function t(t,r){return void 0===r&&(r={}),ye(e(t,r))}var r=new Map;return new Proxy(t,{get:function(e,n){return r.has(n)||r.set(n,t(n)),r.get(n)}})}var Ce=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Ee(e){return"string"==typeof e&&!e.includes("-")&&!!(Ce.indexOf(e)>-1||/[A-Z]/.test(e))}var Ke={},Se=["","X","Y","Z"],we=["transformPerspective","x","y","z"];function Me(e,t){return we.indexOf(e)-we.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return Se.forEach((function(t){return we.push(e+t)}))}));var ze=new Set(we);function Ze(e){return ze.has(e)}var Be=new Set(["originX","originY","originZ"]);function Ge(e){return Be.has(e)}function ke(e,t){var r=t.layout,n=t.layoutId;return Ze(e)||Ge(e)||(r||void 0!==n)&&(!!Ke[e]||"opacity"===e)}var Ye=function(e){return null!==e&&"object"==typeof e&&e.getVelocity},xe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Le(e){return e.startsWith("--")}var Qe=function(e,t){return t&&"number"==typeof e?t.transform(e):e},We=function(e,t){return function(r){return Math.max(Math.min(r,t),e)}},Pe=function(e){return e%1?Number(e.toFixed(5)):e},De=/(-)?([\d]*\.?[\d])+/g,Ne=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Te=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Je(e){return"string"==typeof e}var Re=function(e){return{test:function(t){return Je(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},He=Re("deg"),Fe=Re("%"),Ue=Re("px"),Xe=Re("vh"),Ve=Re("vw"),_e=R(R({},Fe),{parse:function(e){return Fe.parse(e)/100},transform:function(e){return Fe.transform(100*e)}}),$e={test:function(e){return"number"==typeof e},parse:parseFloat,transform:function(e){return e}},et=R(R({},$e),{transform:We(0,1)}),tt=R(R({},$e),{default:1}),rt=R(R({},$e),{transform:Math.round}),nt={borderWidth:Ue,borderTopWidth:Ue,borderRightWidth:Ue,borderBottomWidth:Ue,borderLeftWidth:Ue,borderRadius:Ue,radius:Ue,borderTopLeftRadius:Ue,borderTopRightRadius:Ue,borderBottomRightRadius:Ue,borderBottomLeftRadius:Ue,width:Ue,maxWidth:Ue,height:Ue,maxHeight:Ue,size:Ue,top:Ue,right:Ue,bottom:Ue,left:Ue,padding:Ue,paddingTop:Ue,paddingRight:Ue,paddingBottom:Ue,paddingLeft:Ue,margin:Ue,marginTop:Ue,marginRight:Ue,marginBottom:Ue,marginLeft:Ue,rotate:He,rotateX:He,rotateY:He,rotateZ:He,scale:tt,scaleX:tt,scaleY:tt,scaleZ:tt,skew:He,skewX:He,skewY:He,distance:Ue,translateX:Ue,translateY:Ue,translateZ:Ue,x:Ue,y:Ue,z:Ue,perspective:Ue,transformPerspective:Ue,opacity:et,originX:_e,originY:_e,originZ:Ue,zIndex:rt,fillOpacity:et,strokeOpacity:et,numOctaves:rt};function it(e,t,r,n,i,o,a,u){var c,s=e.style,l=e.vars,A=e.transform,m=e.transformKeys,p=e.transformOrigin;m.length=0;var d=!1,v=!1,q=!0;for(var g in t){var b=t[g];if(Le(g))l[g]=b;else{var f=nt[g],h=Qe(b,f);if(Ze(g)){if(d=!0,A[g]=h,m.push(g),!q)continue;b!==(null!==(c=f.default)&&void 0!==c?c:0)&&(q=!1)}else if(Ge(g))p[g]=h,v=!0;else if(n&&r&&n.isHydrated&&Ke[g]){var O=Ke[g].process(b,n,r),I=Ke[g].applyTo;if(I)for(var y=I.length,j=0;j<y;j++)s[I[j]]=O;else s[g]=O}else s[g]=h}}n&&r&&a&&u?(s.transform=a(n.deltaFinal,n.treeScale,d?A:void 0),o&&(s.transform=o(A,s.transform)),s.transformOrigin=u(n)):(d&&(s.transform=function(e,t,r,n){var i=e.transform,o=e.transformKeys,a=t.enableHardwareAcceleration,u=void 0===a||a,c=t.allowTransformNone,s=void 0===c||c,l="";o.sort(Me);for(var A=!1,m=o.length,p=0;p<m;p++){var d=o[p];l+=(xe[d]||d)+"("+i[d]+") ","z"===d&&(A=!0)}return!A&&u?l+="translateZ(0)":l=l.trim(),n?l=n(i,r?"":l):s&&r&&(l="none"),l}(e,i,q,o)),v&&(s.transformOrigin=function(e){var t=e.originX,r=void 0===t?"50%":t,n=e.originY,i=void 0===n?"50%":n,o=e.originZ;return r+" "+i+" "+(void 0===o?0:o)}(p)))}function ot(e,t,r){for(var n in t)Ye(t[n])||ke(n,r)||(e[n]=t[n])}function at(e,t,r){var n={},i=function(e,t,r){var n={};return ot(n,e.style||{},e),Object.assign(n,function(e,t,r){var n=e.transformTemplate;return Object(X.useMemo)((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};it(e,t,void 0,void 0,{enableHardwareAcceleration:!r},n);var i=e.style;return R(R({},e.vars),i)}),[t])}(e,t,r)),e.transformValues&&(n=e.transformValues(n)),n}(e,t,r);return Boolean(e.drag)&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),n.style=i,n}var ut=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function ct(e){return ut.has(e)}var st=function(e){return!ct(e)};try{var lt=r(223).default;st=function(e){return e.startsWith("on")?!ct(e):lt(e)}}catch(e){}function At(e,t,r){return"string"==typeof e?e:Ue.transform(t+r*e)}var mt=function(e,t){return Ue.transform(e*t)},pt={offset:"stroke-dashoffset",array:"stroke-dasharray"},dt={offset:"strokeDashoffset",array:"strokeDasharray"};function vt(e,t,r,n,i,o,a,u){var c=t.attrX,s=t.attrY,l=t.originX,A=t.originY,m=t.pathLength,p=t.pathSpacing,d=void 0===p?1:p,v=t.pathOffset,q=void 0===v?0:v;it(e,H(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),r,n,i,o,a,u),e.attrs=e.style,e.style={};var g=e.attrs,b=e.style,f=e.dimensions,h=e.totalPathLength;g.transform&&(f&&(b.transform=g.transform),delete g.transform),f&&(void 0!==l||void 0!==A||b.transform)&&(b.transformOrigin=function(e,t,r){return At(t,e.x,e.width)+" "+At(r,e.y,e.height)}(f,void 0!==l?l:.5,void 0!==A?A:.5)),void 0!==c&&(g.x=c),void 0!==s&&(g.y=s),void 0!==h&&void 0!==m&&function(e,t,r,n,i,o){void 0===n&&(n=1),void 0===i&&(i=0),void 0===o&&(o=!0);var a=o?pt:dt;e[a.offset]=mt(-i,t);var u=mt(r,t),c=mt(n,t);e[a.array]=u+" "+c}(g,h,m,d,q,!1)}var qt=function(){return R(R({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function gt(e,t){var r=Object(X.useMemo)((function(){var r=qt();return vt(r,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),R(R({},r.attrs),{style:R({},r.style)})}),[t]);if(e.style){var n={};ot(n,e.style,e),r.style=R(R({},n),r.style)}return r}function bt(e){return void 0===e&&(e=!1),function(t,r,n,i,o){var a=i.latestValues,u=(Ee(t)?gt:at)(r,a,o),c=function(e,t,r){var n={};for(var i in e)(st(i)||!0===r&&ct(i)||!t&&!ct(i))&&(n[i]=e[i]);return n}(r,"string"==typeof t,e),s=R(R(R({},c),u),{ref:n});return Object(X.createElement)(t,s)}}var ft=/([a-z])([A-Z])/g,ht=function(e){return e.replace(ft,"$1-$2").toLowerCase()};function Ot(e,t){var r=t.style,n=t.vars;for(var i in Object.assign(e.style,r),n)e.style.setProperty(i,n[i])}var It=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox"]);function yt(e,t){for(var r in Ot(e,t),t.attrs)e.setAttribute(It.has(r)?r:ht(r),t.attrs[r])}function jt(e){var t=e.style,r={};for(var n in t)(Ye(t[n])||ke(n,e))&&(r[n]=t[n]);return r}function Ct(e){var t=jt(e);for(var r in e)Ye(e[r])&&(t["x"===r||"y"===r?"attr"+r.toUpperCase():r]=e[r]);return t}function Et(e){return"object"==typeof e&&"function"==typeof e.start}var Kt=function(e){return Array.isArray(e)};function St(e,t,r,n){var i=e.scrapeMotionValuesFromProps,o=e.createRenderState,a=e.onMount,u={latestValues:Mt(t,r,n,i),renderState:o()};return a&&(u.mount=function(e){return a(t,e,u)}),u}var wt=function(e){return function(t,r){var n=Object(X.useContext)(oe),i=Object(X.useContext)(ae);return r?St(e,t,n,i):ue((function(){return St(e,t,n,i)}))}};function Mt(e,t,r,n){var i,o,a,u={},c=!1===(null==r?void 0:r.initial),s=n(e);for(var l in s)u[l]=(i=s[l],o=void 0,a=void 0,a=Ye(i)?i.get():i,o=a,Boolean(o&&"object"==typeof o&&o.mix&&o.toValue)?a.toValue():a);var A=e.initial,m=e.animate,p=he(e),d=Oe(e);t&&d&&!p&&!1!==e.inherit&&(null!=A||(A=t.initial),null!=m||(m=t.animate));var v=c||!1===A?m:A;return v&&"boolean"!=typeof v&&!Et(v)&&(Array.isArray(v)?v:[v]).forEach((function(t){var r=be(e,t);if(r){var n=r.transitionEnd;r.transition;var i=H(r,["transitionEnd","transition"]);for(var o in i)u[o]=i[o];for(var o in n)u[o]=n[o]}})),u}var zt,Zt={useVisualState:wt({scrapeMotionValuesFromProps:Ct,createRenderState:qt,onMount:function(e,t,r){var n=r.renderState,i=r.latestValues;try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}"path"===t.tagName&&(n.totalPathLength=t.getTotalLength()),vt(n,i,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),yt(t,n)}})},Bt={useVisualState:wt({scrapeMotionValuesFromProps:jt,createRenderState:function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}}})};function Gt(e,t,r,n){return e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r,n)}}function kt(e,t,r,n){Object(X.useEffect)((function(){var i=e.current;if(r&&i)return Gt(i,t,r,n)}),[e,t,r,n])}function Yt(e){return"undefined"!=typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function xt(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"}(zt||(zt={}));var Lt={pageX:0,pageY:0};function Qt(e,t){void 0===t&&(t="page");var r=e.touches[0]||e.changedTouches[0]||Lt;return{x:r[t+"X"],y:r[t+"Y"]}}function Wt(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Pt(e,t){return void 0===t&&(t="page"),{point:xt(e)?Qt(e,t):Wt(e,t)}}function Dt(e){return Pt(e,"client")}var Nt=function(e,t){void 0===t&&(t=!1);var r,n=function(t){return e(t,Pt(t))};return t?(r=n,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&r(e)}):n},Tt={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Jt={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Rt(e){return pe&&null===window.onpointerdown?e:pe&&null===window.ontouchstart?Jt[e]:pe&&null===window.onmousedown?Tt[e]:e}function Ht(e,t,r,n){return Gt(e,Rt(t),Nt(r,"pointerdown"===t),n)}function Ft(e,t,r,n){return kt(e,Rt(t),r&&Nt(r,"pointerdown"===t),n)}function Ut(e,t,r){return function(n,i){var o;Yt(n)&&e.isHoverEventsEnabled&&(null==r||r(n,i),null===(o=e.animationState)||void 0===o||o.setActive(zt.Hover,t))}}var Xt=function(e,t){return!!t&&(e===t||Xt(e,t.parentElement))};function Vt(e){return Object(X.useEffect)((function(){return function(){return e()}}),[])}var _t=function(e,t){return function(r){return t(e(r))}},$t=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(_t)};function er(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var tr=er("dragHorizontal"),rr=er("dragVertical");function nr(e){var t=!1;if("y"===e)t=rr();else if("x"===e)t=tr();else{var r=tr(),n=rr();r&&n?t=function(){r(),n()}:(r&&r(),n&&n())}return t}var ir=function(e){return function(t){return e(t),null}},or={tap:ir((function(e){var t=e.onTap,r=e.onTapStart,n=e.onTapCancel,i=e.whileTap,o=e.visualElement,a=t||r||n||i,u=Object(X.useRef)(!1),c=Object(X.useRef)(null);function s(){var e;null===(e=c.current)||void 0===e||e.call(c),c.current=null}function l(){var e,t;return s(),u.current=!1,null===(e=o.animationState)||void 0===e||e.setActive(zt.Tap,!1),!(!(t=nr(!0))||(t(),0))}function A(e,r){l()&&(Xt(o.getInstance(),e.target)?null==t||t(e,r):null==n||n(e,r))}function m(e,t){l()&&(null==n||n(e,t))}Ft(o,"pointerdown",a?function(e,t){var n;s(),u.current||(u.current=!0,c.current=$t(Ht(window,"pointerup",A),Ht(window,"pointercancel",m)),null==r||r(e,t),null===(n=o.animationState)||void 0===n||n.setActive(zt.Tap,!0))}:void 0),Vt(s)})),focus:ir((function(e){var t=e.whileFocus,r=e.visualElement;kt(r,"focus",t?function(){var e;null===(e=r.animationState)||void 0===e||e.setActive(zt.Focus,!0)}:void 0),kt(r,"blur",t?function(){var e;null===(e=r.animationState)||void 0===e||e.setActive(zt.Focus,!1)}:void 0)})),hover:ir((function(e){var t=e.onHoverStart,r=e.onHoverEnd,n=e.whileHover,i=e.visualElement;Ft(i,"pointerenter",t||n?Ut(i,!0,t):void 0),Ft(i,"pointerleave",r||n?Ut(i,!1,r):void 0)}))};function ar(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var ur=function(e,t,r){return Math.min(Math.max(r,e),t)};function cr(e,t){return e*Math.sqrt(1-t*t)}var sr=["duration","bounce"],lr=["stiffness","damping","mass"];function Ar(e,t){return t.some((function(t){return void 0!==e[t]}))}function mr(e){var t=e.from,r=void 0===t?0:t,n=e.to,i=void 0===n?1:n,o=e.restSpeed,a=void 0===o?2:o,u=e.restDelta,c=H(e,["from","to","restSpeed","restDelta"]),s={done:!1,value:r},l=function(e){var t=R({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Ar(e,lr)&&Ar(e,sr)){var r=function(e){var t,r,n=e.duration,i=void 0===n?800:n,o=e.bounce,a=void 0===o?.25:o,u=e.velocity,c=void 0===u?0:u,s=e.mass,l=void 0===s?1:s;Object(ee.b)(i<=1e4,"Spring duration must be 10 seconds or less");var A=1-a;A=ur(.05,1,A),i=ur(.01,10,i/1e3),A<1?(t=function(e){var t=e*A,r=t*i;return.001-(t-c)/cr(e,A)*Math.exp(-r)},r=function(e){var r=e*A*i,n=r*c+c,o=Math.pow(A,2)*Math.pow(e,2)*i,a=Math.exp(-r),u=cr(Math.pow(e,2),A);return(.001-t(e)>0?-1:1)*((n-o)*a)/u}):(t=function(e){return Math.exp(-e*i)*((e-c)*i+1)-.001},r=function(e){return Math.exp(-e*i)*(i*i*(c-e))});var m=function(e,t,r){for(var n=r,i=1;i<12;i++)n-=e(n)/t(n);return n}(t,r,5/i);if(isNaN(m))return{stiffness:100,damping:10};var p=Math.pow(m,2)*l;return{stiffness:p,damping:2*A*Math.sqrt(l*p)}}(e);(t=R(R(R({},t),r),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(c),A=l.stiffness,m=l.damping,p=l.mass,d=l.velocity,v=l.isResolvedFromDuration,q=pr,g=pr;function b(){var e=d?-d/1e3:0,t=i-r,n=m/(2*Math.sqrt(A*p)),o=Math.sqrt(A/p)/1e3;if(null!=u||(u=Math.abs(i-r)<=1?.01:.4),n<1){var a=cr(o,n);q=function(r){var u=Math.exp(-n*o*r);return i-u*((e+n*o*t)/a*Math.sin(a*r)+t*Math.cos(a*r))},g=function(r){var i=Math.exp(-n*o*r);return n*o*i*(Math.sin(a*r)*(e+n*o*t)/a+t*Math.cos(a*r))-i*(Math.cos(a*r)*(e+n*o*t)-a*t*Math.sin(a*r))}}else if(1===n)q=function(r){return i-Math.exp(-o*r)*(t+(e+o*t)*r)};else{var c=o*Math.sqrt(n*n-1);q=function(r){var a=Math.exp(-n*o*r),u=Math.min(c*r,300);return i-a*((e+n*o*t)*Math.sinh(u)+c*t*Math.cosh(u))/c}}}return b(),{next:function(e){var t=q(e);if(v)s.done=e>=c.duration;else{var r=1e3*g(e),n=Math.abs(r)<=a,o=Math.abs(i-t)<=u;s.done=n&&o}return s.value=s.done?i:t,s},flipTarget:function(){var e;d=-d,r=(e=[i,r])[0],i=e[1],b()}}}mr.needsInterpolation=function(e,t){return"string"==typeof e||"string"==typeof t};var pr=function(e){return 0},dr=function(e,t,r){var n=t-e;return 0===n?1:(r-e)/n},vr=function(e,t,r){return-r*e+r*t+e},qr=function(e,t){return function(r){return Boolean(Je(r)&&Te.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t))}},gr=function(e,t,r){return function(n){var i;if(!Je(n))return n;var o=n.match(De),a=o[0],u=o[1],c=o[2],s=o[3];return(i={})[e]=parseFloat(a),i[t]=parseFloat(u),i[r]=parseFloat(c),i.alpha=void 0!==s?parseFloat(s):1,i}},br=We(0,255),fr=R(R({},$e),{transform:function(e){return Math.round(br(e))}}),hr={test:qr("rgb","red"),parse:gr("red","green","blue"),transform:function(e){var t=e.red,r=e.green,n=e.blue,i=e.alpha,o=void 0===i?1:i;return"rgba("+fr.transform(t)+", "+fr.transform(r)+", "+fr.transform(n)+", "+Pe(et.transform(o))+")"}},Or={test:qr("#"),parse:function(e){var t="",r="",n="",i="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),i=e.substr(4,1),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:hr.transform},Ir={test:qr("hsl","hue"),parse:gr("hue","saturation","lightness"),transform:function(e){var t=e.hue,r=e.saturation,n=e.lightness,i=e.alpha,o=void 0===i?1:i;return"hsla("+Math.round(t)+", "+Fe.transform(Pe(r))+", "+Fe.transform(Pe(n))+", "+Pe(et.transform(o))+")"}},yr=function(e,t,r){var n=e*e,i=t*t;return Math.sqrt(Math.max(0,r*(i-n)+n))},jr=[Or,hr,Ir],Cr=function(e){return jr.find((function(t){return t.test(e)}))},Er=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},Kr=function(e,t){var r=Cr(e),n=Cr(t);Object(ee.a)(!!r,Er(e)),Object(ee.a)(!!n,Er(t)),Object(ee.a)(r.transform===n.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var i=r.parse(e),o=n.parse(t),a=R({},i),u=r===Ir?vr:yr;return function(e){for(var t in a)"alpha"!==t&&(a[t]=u(i[t],o[t],e));return a.alpha=vr(i.alpha,o.alpha,e),r.transform(a)}},Sr={test:function(e){return hr.test(e)||Or.test(e)||Ir.test(e)},parse:function(e){return hr.test(e)?hr.parse(e):Ir.test(e)?Ir.parse(e):Or.parse(e)},transform:function(e){return Je(e)?e:e.hasOwnProperty("red")?hr.transform(e):Ir.transform(e)}};function wr(e){var t=[],r=0,n=e.match(Ne);n&&(r=n.length,e=e.replace(Ne,"${c}"),t.push.apply(t,n.map(Sr.parse)));var i=e.match(De);return i&&(e=e.replace(De,"${n}"),t.push.apply(t,i.map($e.parse))),{values:t,numColors:r,tokenised:e}}function Mr(e){return wr(e).values}function zr(e){var t=wr(e),r=t.values,n=t.numColors,i=t.tokenised,o=r.length;return function(e){for(var t=i,r=0;r<o;r++)t=t.replace(r<n?"${c}":"${n}",r<n?Sr.transform(e[r]):Pe(e[r]));return t}}var Zr=function(e){return"number"==typeof e?0:e},Br={test:function(e){var t,r,n,i;return isNaN(e)&&Je(e)&&(null!==(r=null===(t=e.match(De))||void 0===t?void 0:t.length)&&void 0!==r?r:0)+(null!==(i=null===(n=e.match(Ne))||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0},parse:Mr,createTransformer:zr,getAnimatableNone:function(e){var t=Mr(e);return zr(e)(t.map(Zr))}},Gr=function(e){return"number"==typeof e};function kr(e,t){return Gr(e)?function(r){return vr(e,t,r)}:Sr.test(e)?Kr(e,t):Qr(e,t)}var Yr=function(e,t){var r=U([],e),n=r.length,i=e.map((function(e,r){return kr(e,t[r])}));return function(e){for(var t=0;t<n;t++)r[t]=i[t](e);return r}},xr=function(e,t){var r=R(R({},e),t),n={};for(var i in r)void 0!==e[i]&&void 0!==t[i]&&(n[i]=kr(e[i],t[i]));return function(e){for(var t in n)r[t]=n[t](e);return r}};function Lr(e){for(var t=Br.parse(e),r=t.length,n=0,i=0,o=0,a=0;a<r;a++)n||"number"==typeof t[a]?n++:void 0!==t[a].hue?o++:i++;return{parsed:t,numNumbers:n,numRGB:i,numHSL:o}}var Qr=function(e,t){var r=Br.createTransformer(t),n=Lr(e),i=Lr(t);return Object(ee.a)(n.numHSL===i.numHSL&&n.numRGB===i.numRGB&&n.numNumbers>=i.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),$t(Yr(n.parsed,i.parsed),r)},Wr=function(e,t){return function(r){return vr(e,t,r)}};function Pr(e,t,r){var n=void 0===r?{}:r,i=n.clamp,o=void 0===i||i,a=n.ease,u=n.mixer,c=e.length;Object(ee.a)(c===t.length,"Both input and output ranges must be the same length"),Object(ee.a)(!a||!Array.isArray(a)||a.length===c-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[c-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var s=function(e,t,r){for(var n,i=[],o=r||("number"==typeof(n=e[0])?Wr:"string"==typeof n?Sr.test(n)?Kr:Qr:Array.isArray(n)?Yr:"object"==typeof n?xr:void 0),a=e.length-1,u=0;u<a;u++){var c=o(e[u],e[u+1]);if(t){var s=Array.isArray(t)?t[u]:t;c=$t(s,c)}i.push(c)}return i}(t,a,u),l=2===c?function(e,t){var r=e[0],n=e[1],i=t[0];return function(e){return i(dr(r,n,e))}}(e,s):function(e,t){var r=e.length,n=r-1;return function(i){var o=0,a=!1;if(i<=e[0]?a=!0:i>=e[n]&&(o=n-1,a=!0),!a){for(var u=1;u<r&&!(e[u]>i||u===n);u++);o=u-1}var c=dr(e[o],e[o+1],i);return t[o](c)}}(e,s);return o?function(t){return l(ur(e[0],e[c-1],t))}:l}var Dr,Nr=function(e){return function(t){return 1-e(1-t)}},Tr=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},Jr=function(e){return function(t){return t*t*((e+1)*t-e)}},Rr=function(e){return e},Hr=(2,function(e){return Math.pow(e,2)}),Fr=Nr(Hr),Ur=Tr(Hr),Xr=function(e){return 1-Math.sin(Math.acos(e))},Vr=Nr(Xr),_r=Tr(Vr),$r=Jr(1.525),en=Nr($r),tn=Tr($r),rn=(Dr=Jr(1.525),function(e){return(e*=2)<1?.5*Dr(e):.5*(2-Math.pow(2,-10*(e-1)))}),nn=function(e){if(1===e||0===e)return e;var t=e*e;return e<4/11?7.5625*t:e<8/11?9.075*t-9.9*e+3.4:e<.9?4356/361*t-35442/1805*e+16061/1805:10.8*e*e-20.52*e+10.72},on=Nr(nn);function an(e,t){return e.map((function(){return t||Ur})).splice(0,e.length-1)}function un(e){var t=e.from,r=void 0===t?0:t,n=e.to,i=void 0===n?1:n,o=e.ease,a=e.offset,u=e.duration,c=void 0===u?300:u,s={done:!1,value:r},l=Array.isArray(i)?i:[r,i],A=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===l.length?a:function(e){var t=e.length;return e.map((function(e,r){return 0!==r?r/(t-1):0}))}(l),c);function m(){return Pr(A,l,{ease:Array.isArray(o)?o:an(l,o)})}var p=m();return{next:function(e){return s.value=p(e),s.done=e>=c,s},flipTarget:function(){l.reverse(),p=m()}}}var cn={keyframes:un,spring:mr,decay:function(e){var t=e.velocity,r=void 0===t?0:t,n=e.from,i=void 0===n?0:n,o=e.power,a=void 0===o?.8:o,u=e.timeConstant,c=void 0===u?350:u,s=e.restDelta,l=void 0===s?.5:s,A=e.modifyTarget,m={done:!1,value:i},p=a*r,d=i+p,v=void 0===A?d:A(d);return v!==d&&(p=v-i),{next:function(e){var t=-p*Math.exp(-e/c);return m.done=!(t>l||t<-l),m.value=m.done?v:v+t,m},flipTarget:function(){}}}},sn="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},ln="undefined"!=typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(sn())}),1/60*1e3)},An=!0,mn=!1,pn=!1,dn={delta:0,timestamp:0},vn=["read","update","preRender","render","postRender"],qn=vn.reduce((function(e,t){return e[t]=function(e){var t=[],r=[],n=0,i=!1,o=new WeakSet,a={schedule:function(e,a,u){void 0===a&&(a=!1),void 0===u&&(u=!1);var c=u&&i,s=c?t:r;return a&&o.add(e),-1===s.indexOf(e)&&(s.push(e),c&&i&&(n=t.length)),e},cancel:function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1),o.delete(e)},process:function(u){var c;if(i=!0,t=(c=[r,t])[0],(r=c[1]).length=0,n=t.length)for(var s=0;s<n;s++){var l=t[s];l(u),o.has(l)&&(a.schedule(l),e())}i=!1}};return a}((function(){return mn=!0})),e}),{}),gn=vn.reduce((function(e,t){var r=qn[t];return e[t]=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!1),mn||In(),r.schedule(e,t,n)},e}),{}),bn=vn.reduce((function(e,t){return e[t]=qn[t].cancel,e}),{}),fn=vn.reduce((function(e,t){return e[t]=function(){return qn[t].process(dn)},e}),{}),hn=function(e){return qn[e].process(dn)},On=function(e){mn=!1,dn.delta=An?1/60*1e3:Math.max(Math.min(e-dn.timestamp,40),1),dn.timestamp=e,pn=!0,vn.forEach(hn),pn=!1,mn&&(An=!1,ln(On))},In=function(){mn=!0,An=!0,pn||ln(On)},yn=function(){return dn},jn=gn;function Cn(e,t,r){return void 0===r&&(r=0),e-t-r}var En=function(e){var t=function(t){var r=t.delta;return e(r)};return{start:function(){return jn.update(t,!0)},stop:function(){return bn.update(t)}}};function Kn(e){var t,r,n,i,o,a=e.from,u=e.autoplay,c=void 0===u||u,s=e.driver,l=void 0===s?En:s,A=e.elapsed,m=void 0===A?0:A,p=e.repeat,d=void 0===p?0:p,v=e.repeatType,q=void 0===v?"loop":v,g=e.repeatDelay,b=void 0===g?0:g,f=e.onPlay,h=e.onStop,O=e.onComplete,I=e.onRepeat,y=e.onUpdate,j=H(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),C=j.to,E=0,K=j.duration,S=!1,w=!0,M=function(e){if(Array.isArray(e.to))return un;if(cn[e.type])return cn[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?un:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?mr:un}(j);(null===(r=(t=M).needsInterpolation)||void 0===r?void 0:r.call(t,a,C))&&(o=Pr([0,100],[a,C],{clamp:!1}),a=0,C=100);var z=M(R(R({},j),{from:a,to:C}));return c&&(null==f||f(),(n=l((function(e){if(w||(e=-e),m+=e,!S){var t=z.next(Math.max(0,m));i=t.value,o&&(i=o(i)),S=w?t.done:m<=0}null==y||y(i),S&&(0===E&&(null!=K||(K=m)),E<d?function(e,t,r,n){return n?e>=t+r:e<=-r}(m,K,b,w)&&(E++,"reverse"===q?m=function(e,t,r,n){return void 0===r&&(r=0),void 0===n&&(n=!0),n?Cn(t+-e,t,r):t-(e-t)+r}(m,K,b,w=E%2==0):(m=Cn(m,K,b),"mirror"===q&&z.flipTarget()),S=!1,I&&I()):(n.stop(),O&&O()))}))).start()),{stop:function(){null==h||h(),n.stop()}}}function Sn(e,t){return t?e*(1e3/t):0}var wn=function(e){return 1e3*e},Mn=function(e,t){return 1-3*t+3*e},zn=function(e,t){return 3*t-6*e},Zn=function(e){return 3*e},Bn=function(e,t,r){return((Mn(t,r)*e+zn(t,r))*e+Zn(t))*e},Gn=function(e,t,r){return 3*Mn(t,r)*e*e+2*zn(t,r)*e+Zn(t)};function kn(e,t,r,n){if(e===t&&r===n)return Rr;for(var i=new Float32Array(11),o=0;o<11;++o)i[o]=Bn(.1*o,e,r);return function(o){return 0===o||1===o?o:Bn(function(t){for(var n=0,o=1;10!==o&&i[o]<=t;++o)n+=.1;--o;var a=n+(t-i[o])/(i[o+1]-i[o])*.1,u=Gn(a,e,r);return u>=.001?function(e,t,r,n){for(var i=0;i<8;++i){var o=Gn(t,r,n);if(0===o)return t;t-=(Bn(t,r,n)-e)/o}return t}(t,a,e,r):0===u?a:function(e,t,r,n,i){var o,a,u=0;do{(o=Bn(a=t+(r-t)/2,n,i)-e)>0?r=a:t=a}while(Math.abs(o)>1e-7&&++u<10);return a}(t,n,n+.1,e,r)}(o),t,n)}}var Yn={linear:Rr,easeIn:Hr,easeInOut:Ur,easeOut:Fr,circIn:Xr,circInOut:_r,circOut:Vr,backIn:$r,backInOut:tn,backOut:en,anticipate:rn,bounceIn:on,bounceInOut:function(e){return e<.5?.5*(1-nn(1-2*e)):.5*nn(2*e-1)+.5},bounceOut:nn},xn=function(e){if(Array.isArray(e)){Object(ee.a)(4===e.length,"Cubic bezier arrays must contain four numerical values.");var t=F(e,4);return kn(t[0],t[1],t[2],t[3])}return"string"==typeof e?(Object(ee.a)(void 0!==Yn[e],"Invalid easing type '"+e+"'"),Yn[e]):e},Ln=function(e,t){return!("zIndex"===e||"number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!Br.test(t)||t.startsWith("url(")))},Qn=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Wn=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Pn=function(){return{type:"keyframes",ease:"linear",duration:.3}},Dn=function(e){return{type:"keyframes",duration:.8,values:e}},Nn={x:Qn,y:Qn,z:Qn,rotate:Qn,rotateX:Qn,rotateY:Qn,rotateZ:Qn,scaleX:Wn,scaleY:Wn,scale:Wn,opacity:Pn,backgroundColor:Pn,color:Pn,default:Wn},Tn=new Set(["brightness","contrast","saturate","opacity"]);function Jn(e){var t=e.slice(0,-1).split("("),r=t[0],n=t[1];if("drop-shadow"===r)return e;var i=(n.match(De)||[])[0];if(!i)return e;var o=n.replace(i,""),a=Tn.has(r)?1:0;return i!==n&&(a*=100),r+"("+a+o+")"}var Rn=/([a-z-]*)\(.*?\)/g,Hn=R(R({},Br),{getAnimatableNone:function(e){var t=e.match(Rn);return t?t.map(Jn).join(" "):e}}),Fn=R(R({},nt),{color:Sr,backgroundColor:Sr,outlineColor:Sr,fill:Sr,stroke:Sr,borderColor:Sr,borderTopColor:Sr,borderRightColor:Sr,borderBottomColor:Sr,borderLeftColor:Sr,filter:Hn,WebkitFilter:Hn}),Un=function(e){return Fn[e]};function Xn(e,t){var r,n=Un(e);return n!==Hn&&(n=Br),null===(r=n.getAnimatableNone)||void 0===r?void 0:r.call(n,t)}var Vn=!1;function $n(e,t,r){var n,i,o,a;return Array.isArray(t.to)&&(null!==(n=e.duration)&&void 0!==n||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=U([],F(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=H(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=R(R({},e),(i=r,o=t.to,a=Kt(o)?Dn:Nn[i]||Nn.default,R({to:o},a(o))))),R(R({},t),function(e){var t=e.ease,r=e.times,n=e.yoyo,i=e.flip,o=e.loop,a=H(e,["ease","times","yoyo","flip","loop"]),u=R({},a);return r&&(u.offset=r),a.duration&&(u.duration=wn(a.duration)),a.repeatDelay&&(u.repeatDelay=wn(a.repeatDelay)),t&&(u.ease=function(e){return Array.isArray(e)&&"number"!=typeof e[0]}(t)?t.map(xn):xn(t)),"tween"===a.type&&(u.type="keyframes"),(n||o||i)&&(Object(ee.b)(!Vn,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),Vn=!0,n?u.repeatType="reverse":o?u.repeatType="loop":i&&(u.repeatType="mirror"),u.repeat=o||n||i||a.repeat),"spring"!==a.type&&(u.type="keyframes"),u}(e))}function ei(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function ti(e){return"number"==typeof e?0:Xn("",e)}function ri(e,t){return e[t]||e.default||e}function ni(e,t,r,n){return void 0===n&&(n={}),t.start((function(i){var o,a,u=function(e,t,r,n,i){var o,a=ri(n,e),u=null!==(o=a.from)&&void 0!==o?o:t.get(),c=Ln(e,r);"none"===u&&c&&"string"==typeof r?u=Xn(e,r):ei(u)&&"string"==typeof r?u=ti(r):!Array.isArray(r)&&ei(r)&&"string"==typeof u&&(r=ti(u));var s=Ln(e,u);return Object(ee.b)(s===c,"You are trying to animate "+e+' from "'+u+'" to "'+r+'". '+u+" is not an animatable value - to enable this animation set "+u+" to a value animatable to "+r+" via the `style` property."),s&&c&&!1!==a.type?function(){var n={from:u,to:r,velocity:t.getVelocity(),onComplete:i,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function(e){var t,r=e.from,n=void 0===r?0:r,i=e.velocity,o=void 0===i?0:i,a=e.min,u=e.max,c=e.power,s=void 0===c?.8:c,l=e.timeConstant,A=void 0===l?750:l,m=e.bounceStiffness,p=void 0===m?500:m,d=e.bounceDamping,v=void 0===d?10:d,q=e.restDelta,g=void 0===q?1:q,b=e.modifyTarget,f=e.driver,h=e.onUpdate,O=e.onComplete;function I(e){return void 0!==a&&e<a||void 0!==u&&e>u}function y(e){return void 0===a?u:void 0===u||Math.abs(a-e)<Math.abs(u-e)?a:u}function j(e){null==t||t.stop(),t=Kn(R(R({},e),{driver:f,onUpdate:function(t){var r;null==h||h(t),null===(r=e.onUpdate)||void 0===r||r.call(e,t)},onComplete:O}))}function C(e){j(R({type:"spring",stiffness:p,damping:v,restDelta:g},e))}if(I(n))C({from:n,velocity:o,to:y(n)});else{var E=s*o+n;void 0!==b&&(E=b(E));var K,S,w=y(E),M=w===a?-1:1;j({type:"decay",from:n,velocity:o,timeConstant:A,power:s,restDelta:g,modifyTarget:b,onUpdate:I(E)?function(e){K=S,S=e,o=Sn(e-K,yn().delta),(1===M&&e>w||-1===M&&e<w)&&C({from:e,to:w,velocity:o})}:void 0})}return{stop:function(){return null==t?void 0:t.stop()}}}(R(R({},n),a)):Kn(R(R({},$n(a,n,e)),{onUpdate:function(e){var t;n.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;n.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e;return t.set(r),i(),null===(e=null==a?void 0:a.onComplete)||void 0===e||e.call(a),{stop:function(){}}}}(e,t,r,n,i),c=function(e,t){var r;return null!==(r=(ri(e,t)||{}).delay)&&void 0!==r?r:0}(n,e),s=function(){return a=u()};return c?o=setTimeout(s,wn(c)):s(),function(){clearTimeout(o),null==a||a.stop()}}))}function ii(e,t){-1===e.indexOf(t)&&e.push(t)}function oi(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1)}var ai=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return ii(this.subscriptions,e),function(){return oi(t.subscriptions,e)}},e.prototype.notify=function(e,t,r){var n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,r);else for(var i=0;i<n;i++){var o=this.subscriptions[i];o&&o(e,t,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),ui=function(){function e(e){var t,r=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ai,this.velocityUpdateSubscribers=new ai,this.renderSubscribers=new ai,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),r.prev=r.current,r.current=e;var n=yn(),i=n.delta,o=n.timestamp;r.lastUpdated!==o&&(r.timeDelta=i,r.lastUpdated=o,jn.postRender(r.scheduleVelocityCheck)),r.prev!==r.current&&r.updateSubscribers.notify(r.current),r.velocityUpdateSubscribers.getSize()&&r.velocityUpdateSubscribers.notify(r.getVelocity()),t&&r.renderSubscribers.notify(r.current)},this.scheduleVelocityCheck=function(){return jn.postRender(r.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==r.lastUpdated&&(r.prev=r.current,r.velocityUpdateSubscribers.notify(r.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?Sn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(r){t.hasAnimated=!0,t.stopAnimation=e(r)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function ci(e){return new ui(e)}var si=function(e){return function(t){return t.test(e)}},li=[$e,Ue,Fe,He,Ve,Xe,{test:function(e){return"auto"===e},parse:function(e){return e}}],Ai=function(e){return li.find(si(e))},mi=U(U([],F(li)),[Sr,Br]);function pi(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ci(r))}function di(e,t){if(t)return(t[e]||t.default||t).from}function vi(e,t,r){var n;void 0===r&&(r={});var i=fe(e,t,r.custom),o=(i||{}).transition,a=void 0===o?e.getDefaultTransition()||{}:o;r.transitionOverride&&(a=r.transitionOverride);var u=i?function(){return qi(e,i,r)}:function(){return Promise.resolve()},c=(null===(n=e.variantChildren)||void 0===n?void 0:n.size)?function(n){void 0===n&&(n=0);var i=a.delayChildren,o=void 0===i?0:i,u=a.staggerChildren,c=a.staggerDirection;return function(e,t,r,n,i,o){void 0===r&&(r=0),void 0===n&&(n=0),void 0===i&&(i=1);var a=[],u=(e.variantChildren.size-1)*n,c=1===i?function(e){return void 0===e&&(e=0),e*n}:function(e){return void 0===e&&(e=0),u-e*n};return Array.from(e.variantChildren).sort(gi).forEach((function(e,n){a.push(vi(e,t,R(R({},o),{delay:r+c(n)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(a)}(e,t,o+n,u,c,r)}:function(){return Promise.resolve()},s=a.when;if(s){var l=F("beforeChildren"===s?[u,c]:[c,u],2),A=l[0],m=l[1];return A().then(m)}return Promise.all([u(),c(r.delay)])}function qi(e,t,r){var n,i=void 0===r?{}:r,o=i.delay,a=void 0===o?0:o,u=i.transitionOverride,c=i.type,s=e.makeTargetAnimatable(t),l=s.transition,A=void 0===l?e.getDefaultTransition():l,m=s.transitionEnd,p=H(s,["transition","transitionEnd"]);u&&(A=u);var d=[],v=c&&(null===(n=e.animationState)||void 0===n?void 0:n.getState()[c]);for(var q in p){var g=e.getValue(q),b=p[q];if(!(!g||void 0===b||v&&bi(v,q))){var f=ni(q,g,b,R({delay:a},A));d.push(f)}}return Promise.all(d).then((function(){m&&function(e,t){var r=fe(e,t),n=r?e.makeTargetAnimatable(r,!1):{},i=n.transitionEnd,o=void 0===i?{}:i;n.transition;var a,u=H(n,["transitionEnd","transition"]);for(var c in u=R(R({},u),o))pi(e,c,(a=u[c],Kt(a)?a[a.length-1]||0:a))}(e,m)}))}function gi(e,t){return e.sortNodePosition(t)}function bi(e,t){var r=e.protectedKeys,n=e.needsAnimating,i=r.hasOwnProperty(t)&&!0!==n[t];return n[t]=!1,i}var fi=[zt.Animate,zt.Hover,zt.Tap,zt.Drag,zt.Focus,zt.Exit],hi=U([],F(fi)).reverse(),Oi=fi.length;function Ii(e){var t,r=function(e){return function(t){return Promise.all(t.map((function(t){var r=t.animation,n=t.options;return function(e,t,r){var n;if(void 0===r&&(r={}),e.notifyAnimationStart(),Array.isArray(t)){var i=t.map((function(t){return vi(e,t,r)}));n=Promise.all(i)}else if("string"==typeof t)n=vi(e,t,r);else{var o="function"==typeof t?fe(e,t,r.custom):t;n=qi(e,o,r)}return n.then((function(){return e.notifyAnimationComplete(t)}))}(e,r,n)})))}}(e),n=((t={})[zt.Animate]=yi(!0),t[zt.Hover]=yi(),t[zt.Tap]=yi(),t[zt.Drag]=yi(),t[zt.Focus]=yi(),t[zt.Exit]=yi(),t),i={},o=!0,a=function(t,r){var n=fe(e,r);if(n){n.transition;var i=n.transitionEnd,o=H(n,["transition","transitionEnd"]);t=R(R(R({},t),o),i)}return t};function u(t,u){for(var c,s=e.getProps(),l=e.getVariantContext(!0)||{},A=[],m=new Set,p={},d=1/0,v=function(r){var i=hi[r],v=n[i],q=null!==(c=s[i])&&void 0!==c?c:l[i],g=ge(q),b=i===u?v.isActive:null;!1===b&&(d=r);var f=q===l[i]&&q!==s[i]&&g;if(f&&o&&e.manuallyAnimateOnMount&&(f=!1),v.protectedKeys=R({},p),!v.isActive&&null===b||!q&&!v.prevProp||Et(q)||"boolean"==typeof q)return"continue";var h=function(e,t){return"string"==typeof t?t!==e:!!qe(t)&&!ar(t,e)}(v.prevProp,q)||i===u&&v.isActive&&!f&&g||r>d&&g,O=Array.isArray(q)?q:[q],I=O.reduce(a,{});!1===b&&(I={});var y=v.prevResolvedValues,j=void 0===y?{}:y,C=R(R({},j),I),E=function(e){h=!0,m.delete(e),v.needsAnimating[e]=!0};for(var K in C){var S=I[K],w=j[K];p.hasOwnProperty(K)||(S!==w?Kt(S)&&Kt(w)?ar(S,w)?v.protectedKeys[K]=!0:E(K):void 0!==S?E(K):m.add(K):void 0!==S&&m.has(K)?E(K):v.protectedKeys[K]=!0)}v.prevProp=q,v.prevResolvedValues=I,v.isActive&&(p=R(R({},p),I)),o&&e.blockInitialAnimation&&(h=!1),h&&!f&&A.push.apply(A,U([],F(O.map((function(e){return{animation:e,options:R({type:i},t)}})))))},q=0;q<Oi;q++)v(q);if(i=R({},p),m.size){var g={};m.forEach((function(t){var r=e.getBaseTarget(t);void 0!==r&&(g[t]=r)})),A.push({animation:g})}var b=Boolean(A.length);return o&&!1===s.initial&&!e.manuallyAnimateOnMount&&(b=!1),o=!1,b?r(A):Promise.resolve()}return{isAnimated:function(e){return void 0!==i[e]},animateChanges:u,setActive:function(t,r,i){var o;return n[t].isActive===r?Promise.resolve():(null===(o=e.variantChildren)||void 0===o||o.forEach((function(e){var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r,u(i,t))},setAnimateFunction:function(t){r=t(e)},getState:function(){return n}}}function yi(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var ji={animation:ir((function(e){var t=e.visualElement,r=e.animate;t.animationState||(t.animationState=Ii(t)),Et(r)&&Object(X.useEffect)((function(){return r.subscribe(t)}),[r])})),exit:ir((function(e){var t=e.custom,r=e.visualElement,n=F(ce(),2),i=n[0],o=n[1],a=Object(X.useContext)(ae);Object(X.useEffect)((function(){var e,n,u=null===(e=r.animationState)||void 0===e?void 0:e.setActive(zt.Exit,!i,{custom:null!==(n=null==a?void 0:a.custom)&&void 0!==n?n:t});!i&&(null==u||u.then(o))}),[i])}))},Ci=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},Ei=function(e){return Ci(e)&&e.hasOwnProperty("z")},Ki=function(e,t){return Math.abs(e-t)};function Si(e,t){if(Gr(e)&&Gr(t))return Ki(e,t);if(Ci(e)&&Ci(t)){var r=Ki(e.x,t.x),n=Ki(e.y,t.y),i=Ei(e)&&Ei(t)?Ki(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(i,2))}}var wi=function(){function e(e,t,r){var n=this,i=(void 0===r?{}:r).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(n.lastMoveEvent&&n.lastMoveEventInfo){var e=Zi(n.lastMoveEventInfo,n.history),t=null!==n.startEvent,r=Si(e.offset,{x:0,y:0})>=3;if(t||r){var i=e.point,o=yn().timestamp;n.history.push(R(R({},i),{timestamp:o}));var a=n.handlers,u=a.onStart,c=a.onMove;t||(u&&u(n.lastMoveEvent,e),n.startEvent=n.lastMoveEvent),c&&c(n.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){n.lastMoveEvent=e,n.lastMoveEventInfo=Mi(t,n.transformPagePoint),Yt(e)&&0===e.buttons?n.handlePointerUp(e,t):jn.update(n.updatePoint,!0)},this.handlePointerUp=function(e,t){n.end();var r=n.handlers.onEnd;if(r&&n.startEvent){var i=Zi(Mi(t,n.transformPagePoint),n.history);r&&r(e,i)}},!(xt(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var o=Mi(Pt(e),this.transformPagePoint),a=o.point,u=yn().timestamp;this.history=[R(R({},a),{timestamp:u})];var c=t.onSessionStart;c&&c(e,Zi(o,this.history)),this.removeListeners=$t(Ht(window,"pointermove",this.handlePointerMove),Ht(window,"pointerup",this.handlePointerUp),Ht(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),bn.update(this.updatePoint)},e}();function Mi(e,t){return t?{point:t(e.point)}:e}function zi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zi(e,t){var r=e.point;return{point:r,delta:zi(r,Gi(t)),offset:zi(r,Bi(t)),velocity:ki(t,.1)}}function Bi(e){return e[0]}function Gi(e){return e[e.length-1]}function ki(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,i=Gi(e);r>=0&&(n=e[r],!(i.timestamp-n.timestamp>wn(t)));)r--;if(!n)return{x:0,y:0};var o=(i.timestamp-n.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Yi(e){return e}function xi(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var Li={translate:0,scale:1,origin:0,originPoint:0};function Qi(){return{x:R({},Li),y:R({},Li)}}function Wi(e){return[e("x"),e("y")]}function Pi(e,t,r){var n=t.min,i=t.max;return void 0!==n&&e<n?e=r?vr(n,e,r.min):Math.max(e,n):void 0!==i&&e>i&&(e=r?vr(i,e,r.max):Math.min(e,i)),e}function Di(e,t,r){return{min:void 0!==t?e.min+t:void 0,max:void 0!==r?e.max+r-(e.max-e.min):void 0}}function Ni(e,t){var r,n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=(r=F([i,n],2))[0],i=r[1]),{min:e.min+n,max:e.min+i}}function Ti(e,t,r){return{min:Ji(e,t),max:Ji(e,r)}}function Ji(e,t){var r;return"number"==typeof e?e:null!==(r=e[t])&&void 0!==r?r:0}function Ri(e,t){return xi(function(e,t){var r=e.top,n=e.left,i=e.bottom,o=e.right;void 0===t&&(t=Yi);var a=t({x:n,y:r}),u=t({x:o,y:i});return{top:a.y,left:a.x,bottom:u.y,right:u.x}}(e.getBoundingClientRect(),t))}function Hi(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=.01),Si(e,t)<r}function Fi(e){return e.max-e.min}function Ui(e,t,r,n){void 0===n&&(n=.5),e.origin=n,e.originPoint=vr(t.min,t.max,e.origin),e.scale=Fi(r)/Fi(t),Hi(e.scale,1,1e-4)&&(e.scale=1),e.translate=vr(r.min,r.max,e.origin)-e.originPoint,Hi(e.translate)&&(e.translate=0)}function Xi(e,t,r,n){Ui(e.x,t.x,r.x,Vi(n.originX)),Ui(e.y,t.y,r.y,Vi(n.originY))}function Vi(e){return"number"==typeof e?e:.5}function _i(e,t,r){e.min=r.min+t.min,e.max=e.min+Fi(t)}var $i,eo=new WeakMap,to=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),eo.set(t,this)}return e.prototype.start=function(e,t){var r=this,n=void 0===t?{}:t,i=n.snapToCursor,o=void 0!==i&&i,a=n.cursorProgress;o&&this.snapToCursor(e);var u=this.props.transformPagePoint;this.panSession=new wi(e,{onSessionStart:function(){r.stopMotion()},onStart:function(e,t){var n,i,o,u=r.props,c=u.drag,s=u.dragPropagation;if(!c||s||(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=nr(c),r.openGlobalLock)){r.prepareBoundingBox(),r.visualElement.lockProjectionTarget(),r.resolveDragConstraints();var l=Dt(e).point;Wi((function(e){var t=r.visualElement.projection.target[e],n=t.min,i=t.max;r.cursorProgress[e]=a?a[e]:dr(n,i,l[e]);var o=r.getAxisMotionValue(e);o&&(r.originPoint[e]=o.get())})),r.isDragging=!0,r.currentDirection=null,null===(i=(n=r.props).onDragStart)||void 0===i||i.call(n,e,t),null===(o=r.visualElement.animationState)||void 0===o||o.setActive(zt.Drag,!0)}},onMove:function(e,t){var n,i,o,a,u=r.props,c=u.dragPropagation,s=u.dragDirectionLock;if(c||r.openGlobalLock){var l=t.offset;if(s&&null===r.currentDirection)return r.currentDirection=function(e,t){void 0===t&&(t=10);var r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}(l),void(null!==r.currentDirection&&(null===(i=(n=r.props).onDirectionLock)||void 0===i||i.call(n,r.currentDirection)));r.updateAxis("x",e,l),r.updateAxis("y",e,l),null===(a=(o=r.props).onDrag)||void 0===a||a.call(o,e,t),$i=e}},onEnd:function(e,t){return r.stop(e,t)}},{transformPagePoint:u})},e.prototype.prepareBoundingBox=function(){var e=this.visualElement;e.withoutTransform((function(){e.updateLayoutMeasurement()})),e.rebaseProjectionTarget(!0,e.measureViewportBox(!1))},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,r=t.dragConstraints,n=t.dragElastic;this.constraints=!!r&&(ve(r)?this.resolveRefConstraints(this.visualElement.getLayoutState().layout,r):function(e,t){var r=t.top,n=t.left,i=t.bottom,o=t.right;return{x:Di(e.x,n,o),y:Di(e.y,r,i)}}(this.visualElement.getLayoutState().layout,r)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:Ti(e,"left","right"),y:Ti(e,"top","bottom")}}(n),this.constraints&&!this.hasMutatedConstraints&&Wi((function(t){var r,n,i;e.getAxisMotionValue(t)&&(e.constraints[t]=(r=e.visualElement.getLayoutState().layout[t],i={},void 0!==(n=e.constraints[t]).min&&(i.min=n.min-r.min),void 0!==n.max&&(i.max=n.max-r.min),i))}))},e.prototype.resolveRefConstraints=function(e,t){var r=this.props,n=r.onMeasureDragConstraints,i=r.transformPagePoint,o=t.current;Object(ee.a)(null!==o,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."),this.constraintsBox=Ri(o,i);var a=function(e,t){return{x:Ni(e.x,t.x),y:Ni(e.y,t.y)}}(e,this.constraintsBox);if(n){var u=n(function(e){var t=e.x,r=e.y;return{top:r.min,bottom:r.max,left:t.min,right:t.max}}(a));this.hasMutatedConstraints=!!u,u&&(a=xi(u))}return a},e.prototype.cancelDrag=function(){var e;this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(zt.Drag,!1)},e.prototype.stop=function(e,t){var r;this.visualElement.unlockProjectionTarget(),null===(r=this.panSession)||void 0===r||r.end(),this.panSession=null;var n=this.isDragging;if(this.cancelDrag(),n){var i=this.props,o=i.dragMomentum,a=i.onDragEnd;if(o||this.elastic){var u=t.velocity;this.animateDragEnd(u)}null==a||a(e,t)}},e.prototype.snapToCursor=function(e){var t=this;this.prepareBoundingBox(),Wi((function(r){if(ro(r,t.props.drag,t.currentDirection)){var n=t.getAxisMotionValue(r);if(n){var i=Dt(e).point,o=t.visualElement.getLayoutState().layout,a=o[r].max-o[r].min,u=o[r].min+a/2,c=i[r]-u;t.originPoint[r]=i[r],n.set(c)}else t.cursorProgress[r]=.5,t.updateVisualElementAxis(r,e)}}))},e.prototype.updateAxis=function(e,t,r){if(ro(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,r):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var r=this.getAxisMotionValue(e);if(t&&r){var n=this.originPoint[e]+t[e],i=this.constraints?Pi(n,this.constraints[e],this.elastic[e]):n;r.set(i)}},e.prototype.updateVisualElementAxis=function(e,t){var r,n=this.visualElement.getLayoutState().layout[e],i=n.max-n.min,o=this.cursorProgress[e],a=function(e,t,r,n,i){var o=e-t*r;return n?Pi(o,n,i):o}(Dt(t).point[e],i,o,null===(r=this.constraints)||void 0===r?void 0:r[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+i)},e.prototype.setProps=function(e){var t=e.drag,r=void 0!==t&&t,n=e.dragDirectionLock,i=void 0!==n&&n,o=e.dragPropagation,a=void 0!==o&&o,u=e.dragConstraints,c=void 0!==u&&u,s=e.dragElastic,l=void 0===s?.35:s,A=e.dragMomentum,m=void 0===A||A,p=H(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=R({drag:r,dragDirectionLock:i,dragPropagation:a,dragConstraints:c,dragElastic:l,dragMomentum:m},p)},e.prototype.getAxisMotionValue=function(e){var t=this.props,r=t.layout,n=t.layoutId,i="_drag"+e.toUpperCase();return this.props[i]?this.props[i]:r||void 0!==n?void 0:this.visualElement.getValue(e,0)},e.prototype.animateDragEnd=function(e){var t=this,r=this.props,n=r.drag,i=r.dragMomentum,o=r.dragElastic,a=r.dragTransition,u=Wi((function(r){if(ro(r,n,t.currentDirection)){var u=t.constraints?t.constraints[r]:{},c=o?200:1e6,s=o?40:1e7,l=R(R({type:"inertia",velocity:i?e[r]:0,bounceStiffness:c,bounceDamping:s,timeConstant:750,restDelta:1,restSpeed:10},a),u);return t.getAxisMotionValue(r)?t.startAxisValueAnimation(r,l):t.visualElement.startLayoutAnimation(r,l)}}));return Promise.all(u).then((function(){var e,r;null===(r=(e=t.props).onDragTransitionEnd)||void 0===r||r.call(e)}))},e.prototype.stopMotion=function(){var e=this;Wi((function(t){var r=e.getAxisMotionValue(t);r?r.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var r=this.getAxisMotionValue(e);if(r){var n=r.get();return r.set(n),r.set(n),ni(e,r,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,r=t.drag;if(ve(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var n={x:0,y:0};Wi((function(t){var r,i,o,a,u;n[t]=(r=e.visualElement.projection.target[t],i=e.constraintsBox[t],o=.5,a=Fi(r),(u=Fi(i))>a?o=dr(i.min,i.max-a,r.min):a>u&&(o=dr(r.min,r.max-u,i.min)),ur(0,1,o))})),this.prepareBoundingBox(),this.resolveDragConstraints(),Wi((function(t){if(ro(t,r,null)){var i=function(e,t,r){var n=e.max-e.min,i=vr(t.min,t.max-n,r);return{min:i,max:i+n}}(e.visualElement.projection.target[t],e.constraintsBox[t],n[t]),o=i.min,a=i.max;e.visualElement.setProjectionTargetAxis(t,o,a)}}))}},e.prototype.mount=function(e){var t=this,r=Ht(e.getInstance(),"pointerdown",(function(e){var r=t.props,n=r.drag,i=r.dragListener;n&&(void 0===i||i)&&t.start(e)})),n=Gt(window,"resize",(function(){t.scalePoint()})),i=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),o=e.prevDragCursor;return o&&this.start($i,{cursorProgress:o}),function(){null==r||r(),null==n||n(),null==i||i(),t.cancelDrag()}},e}();function ro(e,t,r){return!(!0!==t&&t!==e||null!==r&&r!==e)}var no,io,oo={pan:ir((function(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,i=e.onPanSessionStart,o=e.visualElement,a=t||r||n||i,u=Object(X.useRef)(null),c=Object(X.useContext)(ie).transformPagePoint,s={onSessionStart:i,onStart:r,onMove:t,onEnd:function(e,t){u.current=null,n&&n(e,t)}};Object(X.useEffect)((function(){null!==u.current&&u.current.updateHandlers(s)})),Ft(o,"pointerdown",a&&function(e){u.current=new wi(e,s,{transformPagePoint:c})}),Vt((function(){return u.current&&u.current.end()}))})),drag:ir((function(e){var t=e.dragControls,r=e.visualElement,n=Object(X.useContext)(ie).transformPagePoint,i=ue((function(){return new to({visualElement:r})}));i.setProps(R(R({},e),{transformPagePoint:n})),Object(X.useEffect)((function(){return t&&t.subscribe(i)}),[i]),Object(X.useEffect)((function(){return i.mount(r)}),[])}))};function ao(e,t){return{min:t.min-e.min,max:t.max-e.min}}function uo(e,t){return{x:ao(e.x,t.x),y:ao(e.y,t.y)}}function co(e,t){var r=e.getLayoutId(),n=t.getLayoutId();return r!==n||void 0===n&&e!==t}function so(e){return"string"==typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(no||(no={})),function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"}(io||(io={}));var lo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Ao(e,t,r){void 0===r&&(r=1),Object(ee.a)(r<=4,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var n=F(function(e){var t=lo.exec(e);if(!t)return[,];var r=F(t,3);return[r[1],r[2]]}(e),2),i=n[0],o=n[1];if(i){var a=window.getComputedStyle(t).getPropertyValue(i);return a?a.trim():so(o)?Ao(o,t,r+1):o}}function mo(e,t){return e/(t.max-t.min)*100}var po={process:function(e,t,r){var n=r.target;if("string"==typeof e){if(!Ue.test(e))return e;e=parseFloat(e)}return mo(e,n.x)+"% "+mo(e,n.y)+"%"}},vo={borderRadius:R(R({},po),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:po,borderTopRightRadius:po,borderBottomLeftRadius:po,borderBottomRightRadius:po,boxShadow:{process:function(e,t){var r=t.delta,n=t.treeScale,i=e,o=e.includes("var("),a=[];o&&(e=e.replace(lo,(function(e){return a.push(e),"_$css"})));var u=Br.parse(e);if(u.length>5)return i;var c=Br.createTransformer(e),s="number"!=typeof u[0]?1:0,l=r.x.scale*n.x,A=r.y.scale*n.y;u[0+s]/=l,u[1+s]/=A;var m=vr(l,A,.5);"number"==typeof u[2+s]&&(u[2+s]/=m),"number"==typeof u[3+s]&&(u[3+s]/=m);var p=c(u);if(o){var d=0;p=p.replace("_$css",(function(){var e=a[d];return d++,e}))}return p}}},qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,r,n){void 0===n&&(n={});var i=n.originBox,o=n.targetBox,a=n.visibilityAction,u=n.shouldStackAnimate,c=n.onComplete,s=n.prevParent,l=H(n,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),A=t.props,m=A.visualElement,p=A.layout;if(!1===u)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===u){u&&(t.isAnimatingTree=!0),r=i||r,e=o||e;var d=!1,v=m.getProjectionParent();if(v){var q=v.prevViewportBox,g=v.getLayoutState().layout;s&&(o&&(g=s.getLayoutState().layout),i&&!co(s,v)&&s.prevViewportBox&&(q=s.prevViewportBox)),q&&(d=!0,r=uo(q,r),e=uo(g,e))}var b=go(r,e),f=Wi((function(n){if("position"===p){var i=e[n].max-e[n].min;r[n].max=r[n].min+i}if(!m.projection.isTargetLocked)return void 0===a?b?t.animateAxis(n,e[n],r[n],R(R({},l),{isRelative:d})):m.setProjectionTargetAxis(n,e[n].min,e[n].max,d):void m.setVisibility(a===io.Show)}));return m.syncRender(),Promise.all(f).then((function(){t.isAnimatingTree=!1,c&&c(),m.notifyLayoutAnimationComplete()}))}},t}return J(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=ni,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)Ke[t]=e[t]}(vo)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),Wi((function(t){var r,n;return null===(n=(r=e.stopAxisAnimation)[t])||void 0===n?void 0:n.call(r)}))},t.prototype.animateAxis=function(e,t,r,n){var i,o,a=this,u=void 0===n?{}:n,c=u.transition,s=u.isRelative;if(!this.isAnimating[e]||!ho(t,this.currentAnimationTarget[e])){null===(o=(i=this.stopAxisAnimation)[e])||void 0===o||o.call(i),this.isAnimating[e]=!0;var l=this.props.visualElement,A=this.frameTarget[e],m=l.getProjectionAnimationProgress()[e];m.clearListeners(),m.set(0),m.set(0);var p=function(){var n=m.get()/1e3;!function(e,t,r,n){e.min=vr(t.min,r.min,n),e.max=vr(t.max,r.max,n)}(A,r,t,n),l.setProjectionTargetAxis(e,A.min,A.max,s)};p();var d=m.onChange(p);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,m.stop(),d()},this.currentAnimationTarget[e]=t;var v=c||l.getDefaultTransition()||Oo;return ni("x"===e?"layoutX":"layoutY",m,1e3,v&&ri(v,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(X.Component);function go(e,t){return!(fo(e)||fo(t)||ho(e.x,t.x)&&ho(e.y,t.y))}var bo={min:0,max:0};function fo(e){return ho(e.x,bo)&&ho(e.y,bo)}function ho(e,t){return e.min===t.min&&e.max===t.max}var Oo={duration:.45,ease:[.4,0,.1,1]},Io=function(e,t){return e.depth-t.depth},yo={measureLayout:function(e){return e.updateLayoutMeasurement()},layoutReady:function(e){return e.notifyLayoutReady()}};function jo(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var r=void 0===t?yo:t,n=r.measureLayout,i=r.layoutReady,o=r.parent,a=Array.from(e).sort(Io),u=function(){a.forEach((function(e){return e.resetTransform()})),a.forEach(n)};o?o.withoutTransform(u):u(),a.forEach(i),a.forEach((function(e){e.isPresent&&(e.presence=no.Present)})),fn.preRender(),fn.render(),e.clear()}}}var Co=Object(X.createContext)(jo()),Eo=Object(X.createContext)(jo());function Ko(e){return!!e.forceUpdate}var So=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,r=e.framerSyncLayout,n=e.visualElement;Ko(t)&&t.register(n),Ko(r)&&r.register(n),n.onUnmount((function(){Ko(t)&&t.remove(n),Ko(r)&&r.remove(n)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,r=e.visualElement;return Ko(t)?t.syncUpdate():(r.snapshotViewportBox(),t.add(r)),null},t.prototype.componentDidUpdate=function(){var e=this.props,t=e.syncLayout,r=e.visualElement;Ko(t)||t.flush(),r.rebaseProjectionTarget()},t.prototype.render=function(){return null},t}(V.a.Component),wo={measureLayout:function(e){var t=Object(X.useContext)(Co),r=Object(X.useContext)(Eo);return V.a.createElement(So,R({},e,{syncLayout:t,framerSyncLayout:r}))},layoutAnimation:function(e){var t=F(ce(),2)[1];return X.createElement(qo,R({},e,{safeToRemove:t}))}};function Mo(e,t){e.min=t.min,e.max=t.max}function zo(e,t,r){return r+t*(e-r)}function Zo(e,t,r,n,i){return void 0!==i&&(e=zo(e,i,n)),zo(e,r,n)+t}function Bo(e,t,r,n,i){void 0===t&&(t=0),void 0===r&&(r=1),e.min=Zo(e.min,t,r,n,i),e.max=Zo(e.max,t,r,n,i)}function Go(e,t){var r=t.x,n=t.y;Bo(e.x,r.translate,r.scale,r.originPoint),Bo(e.y,n.translate,n.scale,n.originPoint)}function ko(e,t,r,n){var i=F(n,3),o=i[0],a=i[1],u=i[2];e.min=t.min,e.max=t.max;var c=void 0!==r[u]?r[u]:.5,s=vr(t.min,t.max,c);Bo(e,r[o],r[a],s,r.scale)}var Yo=["x","scaleX","originX"],xo=["y","scaleY","originY"];function Lo(e,t,r,n,i){return e=zo(e-=t,1/r,n),void 0!==i&&(e=zo(e,1/i,n)),e}function Qo(e,t,r){var n=F(r,3),i=n[0],o=n[1],a=n[2];!function(e,t,r,n,i){void 0===t&&(t=0),void 0===r&&(r=1),void 0===n&&(n=.5);var o=vr(e.min,e.max,n)-t;e.min=Lo(e.min,t,r,o,i),e.max=Lo(e.max,t,r,o,i)}(e,t[i],t[o],t[a],t.scale)}function Wo(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:Qi(),deltaFinal:Qi(),deltaTransform:""}}var Po=Wo();function Do(e,t,r){var n=e.x,i=e.y,o="translate3d("+n.translate/t.x+"px, "+i.translate/t.y+"px, 0) ";if(r){var a=r.rotate,u=r.rotateX,c=r.rotateY;a&&(o+="rotate("+a+") "),u&&(o+="rotateX("+u+") "),c&&(o+="rotateY("+c+") ")}return o+="scale("+n.scale+", "+i.scale+")",r||o!==To?o:""}function No(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var To=Do(Po.delta,Po.treeScale,{x:1,y:1}),Jo=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];var Ro=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){ii(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){oi(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(Io);for(var t=this.children.length,r=0;r<t;r++)e(this.children[r])},e}(),Ho=function(e){var t=e.treeType,r=void 0===t?"":t,n=e.build,i=e.getBaseTarget,o=e.makeTargetAnimatable,a=e.measureViewportBox,u=e.render,c=e.readValueFromInstance,s=e.resetTransform,l=e.restoreTransform,A=e.removeValueFromRenderState,m=e.sortNodePosition,p=e.scrapeMotionValuesFromProps;return function(e,t){var d=e.parent,v=e.props,q=e.presenceId,g=e.blockInitialAnimation,b=e.visualState;void 0===t&&(t={});var f,h,O,I,y,j,C=b.latestValues,E=b.renderState,K=function(){var e=Jo.map((function(){return new ai})),t={},r={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){return Jo.forEach((function(n){var i;null===(i=t[n])||void 0===i||i.call(t);var o="on"+n,a=e[o];a&&(t[n]=r[o](a))}))}};return e.forEach((function(e,t){r["on"+Jo[t]]=function(t){return e.add(t)},r["notify"+Jo[t]]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.notify.apply(e,U([],F(t)))}})),r}(),S={isEnabled:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},w=S,M=C,z=Wo(),Z=!1,B=new Map,G=new Map,k={},Y=R({},C);function x(){var e,t,r;f&&(S.isEnabled&&z.isHydrated&&(e=w.targetFinal,t=w.target,r=M,ko(e.x,t.x,r,Yo),ko(e.y,t.y,r,xo),Xi(z.deltaFinal,z.layoutCorrected,w.targetFinal,C)),L(),u(f,E))}function L(){var e=C;if(I&&I.isActive()){var r=I.getCrossfadeState(H);r&&(e=r)}n(H,E,e,w,z,t,v)}function Q(){K.notifyUpdate(C)}function W(){H.layoutTree.forEach(Uo)}var P=p(v);for(var D in P){var N=P[D];void 0!==C[D]&&Ye(N)&&N.set(C[D],!1)}var T=he(v),J=Oe(v),H=R(R({treeType:r,current:null,depth:d?d.depth+1:0,path:d?U(U([],F(d.path)),[d]):[],layoutTree:d?d.layoutTree:new Ro,presenceId:q,projection:S,variantChildren:J?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==d?void 0:d.isMounted()),blockInitialAnimation:g,isHoverEventsEnabled:!0,isMounted:function(){return Boolean(f)},mount:function(e){f=H.current=e,H.pointTo(H),J&&d&&!T&&(j=null==d?void 0:d.addVariantChild(H))},unmount:function(){bn.update(Q),bn.render(x),bn.preRender(H.updateLayoutProjection),G.forEach((function(e){return e()})),H.stopLayoutAnimation(),H.layoutTree.remove(H),null==j||j(),null==O||O(),K.clearAllListeners()},addVariantChild:function(e){var t,r=H.getClosestVariantNode();if(r)return null===(t=r.variantChildren)||void 0===t||t.add(e),function(){return r.variantChildren.delete(e)}},sortNodePosition:function(e){return m&&r===e.treeType?m(H.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return J?H:null==d?void 0:d.getClosestVariantNode()},scheduleUpdateLayoutProjection:d?d.scheduleUpdateLayoutProjection:function(){return jn.preRender(H.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return v.layoutId},getInstance:function(){return f},getStaticValue:function(e){return C[e]},setStaticValue:function(e,t){return C[e]=t},getLatestValues:function(){return C},setVisibility:function(e){H.isVisible!==e&&(H.isVisible=e,H.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),o(H,e,v,t)},suspendHoverEvents:function(){H.isHoverEventsEnabled=!1,jn.postRender((function(){return setTimeout((function(){return H.isHoverEventsEnabled=!0}),10)}))},addValue:function(e,t){H.hasValue(e)&&H.removeValue(e),B.set(e,t),C[e]=t.get(),function(e,t){var r=t.onChange((function(t){C[e]=t,v.onUpdate&&jn.update(Q,!1,!0)})),n=t.onRenderRequest(H.scheduleRender);G.set(e,(function(){r(),n()}))}(e,t)},removeValue:function(e){var t;B.delete(e),null===(t=G.get(e))||void 0===t||t(),G.delete(e),delete C[e],A(e,E)},hasValue:function(e){return B.has(e)},getValue:function(e,t){var r=B.get(e);return void 0===r&&void 0!==t&&(r=ci(t),H.addValue(e,r)),r},forEachValue:function(e){return B.forEach(e)},readValue:function(e){var r;return null!==(r=C[e])&&void 0!==r?r:c(f,e,t)},setBaseTarget:function(e,t){Y[e]=t},getBaseTarget:function(e){if(i){var t=i(v,e);if(void 0!==t&&!Ye(t))return t}return Y[e]}},K),{build:function(){return L(),E},scheduleRender:function(){jn.render(x,!1,!0)},syncRender:x,setProps:function(e){v=e,K.updatePropListeners(e),k=function(e,t,r){var n;for(var i in t){var o=t[i],a=r[i];if(Ye(o))e.addValue(i,o);else if(Ye(a))e.addValue(i,ci(o));else if(a!==o)if(e.hasValue(i)){var u=e.getValue(i);!u.hasAnimated&&u.set(o)}else e.addValue(i,ci(null!==(n=e.getStaticValue(i))&&void 0!==n?n:o))}for(var i in r)void 0===t[i]&&e.removeValue(i);return t}(H,p(v),k)},getProps:function(){return v},getVariant:function(e){var t;return null===(t=v.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return v.transition},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null==d?void 0:d.getVariantContext();if(!T){var t=(null==d?void 0:d.getVariantContext())||{};return void 0!==v.initial&&(t.initial=v.initial),t}for(var r={},n=0;n<_o;n++){var i=Vo[n],o=v[i];(ge(o)||!1===o)&&(r[i]=o)}return r},enableLayoutProjection:function(){S.isEnabled=!0,H.layoutTree.add(H)},lockProjectionTarget:function(){S.isTargetLocked=!0},unlockProjectionTarget:function(){H.stopLayoutAnimation(),S.isTargetLocked=!1},snapshotViewportBox:function(){H.prevViewportBox=H.measureViewportBox(!1),H.rebaseProjectionTarget(!1,H.prevViewportBox)},getLayoutState:function(){return z},setCrossfader:function(e){I=e},startLayoutAnimation:function(e,t){var r=H.getProjectionAnimationProgress()[e],n=S.target[e],i=n.min,o=n.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(t){return H.setProjectionTargetAxis(e,t,t+o)})),H.animateMotionValue(e,r,0,t)},stopLayoutAnimation:function(){Wi((function(e){return H.getProjectionAnimationProgress()[e].stop()}))},measureViewportBox:function(e){void 0===e&&(e=!0);var r,n,i=a(f,t);return e||(n=C,Qo((r=i).x,n,Yo),Qo(r.y,n,xo)),i},updateLayoutMeasurement:function(){var e;H.notifyBeforeLayoutMeasure(z.layout),z.isHydrated=!0,z.layout=H.measureViewportBox(),z.layoutCorrected=(e=z.layout,{x:R({},e.x),y:R({},e.y)}),H.notifyLayoutMeasure(z.layout,H.prevViewportBox||z.layout),jn.update((function(){return H.rebaseProjectionTarget()}))},getProjectionAnimationProgress:function(){return y||(y={x:ci(0),y:ci(0)}),y},setProjectionTargetAxis:function(e,t,r,n){var i;void 0===n&&(n=!1),n?(S.relativeTarget||(S.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),i=S.relativeTarget[e]):(S.relativeTarget=void 0,i=S.target[e]),i.min=t,i.max=r,Z=!0,K.notifySetAxisTarget()},rebaseProjectionTarget:function(e,t){void 0===t&&(t=z.layout);var r=H.getProjectionAnimationProgress(),n=r.x,i=r.y,o=!(S.relativeTarget||S.isTargetLocked||n.isAnimating()||i.isAnimating());(e||o)&&Wi((function(e){var r=t[e],n=r.min,i=r.max;H.setProjectionTargetAxis(e,n,i)}))},notifyLayoutReady:function(e){H.notifyLayoutUpdate(z.layout,H.prevViewportBox||z.layout,e)},resetTransform:function(){return s(H,f,v)},withoutTransform:function(e){var t=S.isEnabled;t&&H.resetTransform(),d?d.withoutTransform(e):e(),t&&l(f,E)},updateLayoutProjection:function(){var e=z.delta,t=z.treeScale,r=t.x,n=t.x,i=z.deltaTransform;(function(e,t,r,n){var i,o,a=e.delta,u=e.layout,c=e.layoutCorrected,s=e.treeScale,l=t.target;o=u,Mo((i=c).x,o.x),Mo(i.y,o.y),function(e,t,r){var n=r.length;if(n){t.x=t.y=1;for(var i=0;i<n;i++){var o=r[i].getLayoutState().delta;t.x*=o.x.scale,t.y*=o.y.scale,Go(e,o)}}}(c,s,r),Xi(a,c,l,n)})(z,w,H.path,C),Z&&H.notifyViewportBoxUpdate(w.target,e),Z=!1;var o=Do(e,t);o===i&&r===t.x&&n===t.y||H.scheduleRender(),z.deltaTransform=o},updateTreeLayoutProjection:function(){H.layoutTree.forEach(Fo),jn.preRender(W,!1,!0)},getProjectionParent:function(){if(void 0===h){for(var e=!1,t=H.path.length-1;t>=0;t--){var r=H.path[t];if(r.projection.isEnabled){e=r;break}}h=e}return h},resolveRelativeTargetBox:function(){if(S.relativeTarget){var e=H.getProjectionParent();e&&function(e,t){_i(e.target.x,e.relativeTarget.x,t.target.x),_i(e.target.y,e.relativeTarget.y,t.target.y)}(S,e.projection)}},pointTo:function(e){w=e.projection,M=e.getLatestValues(),null==O||O(),O=$t(e.onSetAxisTarget(H.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;H.isPresent?H.presence=no.Present:null===(e=H.layoutSafeToRemove)||void 0===e||e.call(H)})))},isPresent:!0,presence:no.Entering});return H}};function Fo(e){e.resolveRelativeTargetBox()}function Uo(e){e.updateLayoutProjection()}var Xo,Vo=U(["initial"],F(fi)),_o=Vo.length,$o=new Set(["width","height","top","left","right","bottom","x","y"]),ea=function(e){return $o.has(e)},ta=function(e,t){e.set(t,!1),e.set(t)},ra=function(e){return e===$e||e===Ue};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Xo||(Xo={}));var na=function(e,t){return parseFloat(e.split(", ")[t])},ia=function(e,t){return function(r,n){var i=n.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return na(o[1],t);var a=i.match(/^matrix\((.+)\)$/);return a?na(a[1],e):0}},oa=new Set(["x","y","z"]),aa=we.filter((function(e){return!oa.has(e)})),ua={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var r=t.top;return parseFloat(r)},left:function(e,t){var r=t.left;return parseFloat(r)},bottom:function(e,t){var r=e.y,n=t.top;return parseFloat(n)+(r.max-r.min)},right:function(e,t){var r=e.x,n=t.left;return parseFloat(n)+(r.max-r.min)},x:ia(4,13),y:ia(5,14)};function ca(e,t,r,n){return function(e){return Object.keys(e).some(ea)}(t)?function(e,t,r,n){void 0===r&&(r={}),void 0===n&&(n={}),t=R({},t),n=R({},n);var i=Object.keys(t).filter(ea),o=[],a=!1,u=[];if(i.forEach((function(i){var c=e.getValue(i);if(e.hasValue(i)){var s,l=r[i],A=t[i],m=Ai(l);if(Kt(A))for(var p=A.length,d=null===A[0]?1:0;d<p;d++)s?Object(ee.a)(Ai(A[d])===s,"All keyframes must be of the same type"):(s=Ai(A[d]),Object(ee.a)(s===m||ra(m)&&ra(s),"Keyframes must be of the same dimension as the current value"));else s=Ai(A);if(m!==s)if(ra(m)&&ra(s)){var v=c.get();"string"==typeof v&&c.set(parseFloat(v)),"string"==typeof A?t[i]=parseFloat(A):Array.isArray(A)&&s===Ue&&(t[i]=A.map(parseFloat))}else(null==m?void 0:m.transform)&&(null==s?void 0:s.transform)&&(0===l||0===A)?0===l?c.set(s.transform(l)):t[i]=m.transform(A):(a||(o=function(e){var t=[];return aa.forEach((function(r){var n=e.getValue(r);void 0!==n&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),a=!0),u.push(i),n[i]=void 0!==n[i]?n[i]:t[i],ta(c,A))}})),u.length){var c=function(e,t,r){var n=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),a=o.display,u={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===a&&t.setStaticValue("display",e.display||"block"),t.syncRender();var c=t.measureViewportBox();return r.forEach((function(r){var i=t.getValue(r);ta(i,ua[r](n,u)),e[r]=ua[r](c,o)})),e}(t,e,u);return o.length&&o.forEach((function(t){var r=F(t,2),n=r[0],i=r[1];e.getValue(n).set(i)})),e.syncRender(),{target:c,transitionEnd:n}}return{target:t,transitionEnd:n}}(e,t,r,n):{target:t,transitionEnd:n}}var sa={treeType:"dom",readValueFromInstance:function(e,t){if(Ze(t)){var r=Un(t);return r&&r.default||0}var n,i=(n=e,window.getComputedStyle(n));return(Le(t)?i.getPropertyValue(t):i[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var r;return null===(r=e.style)||void 0===r?void 0:r[t]},measureViewportBox:function(e,t){return Ri(e,t.transformPagePoint)},resetTransform:function(e,t,r){e.suspendHoverEvents();var n=r.transformTemplate;t.style.transform=n?n({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,n=t.style;delete r[e],delete n[e]},makeTargetAnimatable:function(e,t,r,n){var i=r.transformValues;void 0===n&&(n=!0);var o=t.transition,a=t.transitionEnd,u=H(t,["transition","transitionEnd"]),c=function(e,t,r){var n,i,o={};for(var a in e)o[a]=null!==(n=di(a,t))&&void 0!==n?n:null===(i=r.getValue(a))||void 0===i?void 0:i.get();return o}(u,o||{},e);if(i&&(a&&(a=i(a)),u&&(u=i(u)),c&&(c=i(c))),n){!function(e,t,r){var n,i,o,a,u,c=Object.keys(t).filter((function(t){return!e.hasValue(t)})),s=c.length;if(s)for(var l=0;l<s;l++){var A=c[l],m=t[A],p=null;Array.isArray(m)&&(p=m[0]),null===p&&(p=null!==(i=null!==(n=r[A])&&void 0!==n?n:e.readValue(A))&&void 0!==i?i:t[A]),null!=p&&("string"==typeof p&&/^\-?\d*\.?\d+$/.test(p)?p=parseFloat(p):(u=p,!mi.find(si(u))&&Br.test(m)&&(p=Xn(A,m))),e.addValue(A,ci(p)),null!==(o=(a=r)[A])&&void 0!==o||(a[A]=p),e.setBaseTarget(A,p))}}(e,u,c);var s=function(e,t,r,n){var i=function(e,t,r){var n,i=H(t,[]),o=e.getInstance();if(!(o instanceof HTMLElement))return{target:i,transitionEnd:r};for(var a in r&&(r=R({},r)),e.forEachValue((function(e){var t=e.get();if(so(t)){var r=Ao(t,o);r&&e.set(r)}})),i){var u=i[a];if(so(u)){var c=Ao(u,o);c&&(i[a]=c,r&&(null!==(n=r[a])&&void 0!==n||(r[a]=u)))}}return{target:i,transitionEnd:r}}(e,t,n);return ca(e,t=i.target,r,n=i.transitionEnd)}(e,u,c,a);a=s.transitionEnd,u=s.target}return R({transition:o,transitionEnd:a},u)},scrapeMotionValuesFromProps:jt,build:function(e,t,r,n,i,o,a){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden");var u=n.isEnabled&&i.isHydrated;it(t,r,n,i,o,a.transformTemplate,u?Do:void 0,u?No:void 0)},render:Ot},la=Ho(sa),Aa=Ho(R(R({},sa),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return Ze(t)?(null===(r=Un(t))||void 0===r?void 0:r.default)||0:(t=It.has(t)?t:ht(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Ct,build:function(e,t,r,n,i,o,a){var u=n.isEnabled&&i.isHydrated;vt(t,r,n,i,o,a.transformTemplate,u?Do:void 0,u?No:void 0)},render:yt})),ma=function(e,t){return Ee(e)?Aa(t,{enableHardwareAcceleration:!1}):la(t,{enableHardwareAcceleration:!0})},pa=R(R(R(R({},ji),or),oo),wo),da=je((function(e,t){return function(e,t,r,n){var i=t.forwardMotionProps,o=void 0!==i&&i,a=Ee(e)?Zt:Bt;return R(R({},a),{preloadedFeatures:r,useRender:bt(o),createVisualElement:n,Component:e})}(e,t,pa,ma)})),va=0;function qa(){var e=va;return va++,e}var ga=function(e){var t=e.children,r=e.initial,n=e.isPresent,i=e.onExitComplete,o=e.custom,a=e.presenceAffectsLayout,u=ue(ba),c=ue(qa),s=Object(X.useMemo)((function(){return{id:c,initial:r,isPresent:n,custom:o,onExitComplete:function(e){u.set(e,!0);var t=!0;u.forEach((function(e){e||(t=!1)})),t&&(null==i||i())},register:function(e){return u.set(e,!1),function(){return u.delete(e)}}}}),a?void 0:[n]);return Object(X.useMemo)((function(){u.forEach((function(e,t){return u.set(t,!1)}))}),[n]),X.useEffect((function(){!n&&!u.size&&(null==i||i())}),[n]),X.createElement(ae.Provider,{value:s},t)};function ba(){return new Map}function fa(e){return e.key||""}var ha=function(e){var t=e.children,r=e.custom,n=e.initial,i=void 0===n||n,o=e.onExitComplete,a=e.exitBeforeEnter,u=e.presenceAffectsLayout,c=void 0===u||u,s=function(){var e=Object(X.useRef)(!1),t=F(Object(X.useState)(0),2),r=t[0],n=t[1];return Vt((function(){return e.current=!0})),Object(X.useCallback)((function(){!e.current&&n(r+1)}),[r])}(),l=Object(X.useContext)(Co);Ko(l)&&(s=l.forceUpdate);var A=Object(X.useRef)(!0),m=function(e){var t=[];return X.Children.forEach(e,(function(e){Object(X.isValidElement)(e)&&t.push(e)})),t}(t),p=Object(X.useRef)(m),d=Object(X.useRef)(new Map).current,v=Object(X.useRef)(new Set).current;if(function(e,t){e.forEach((function(e){var r=fa(e);t.set(r,e)}))}(m,d),A.current)return A.current=!1,X.createElement(X.Fragment,null,m.map((function(e){return X.createElement(ga,{key:fa(e),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:c},e)})));for(var q=U([],F(m)),g=p.current.map(fa),b=m.map(fa),f=g.length,h=0;h<f;h++){var O=g[h];-1===b.indexOf(O)?v.add(O):v.delete(O)}return a&&v.size&&(q=[]),v.forEach((function(e){if(-1===b.indexOf(e)){var t=d.get(e);if(t){var n=g.indexOf(e);q.splice(n,0,X.createElement(ga,{key:fa(t),isPresent:!1,onExitComplete:function(){d.delete(e),v.delete(e);var t=p.current.findIndex((function(t){return t.key===e}));p.current.splice(t,1),v.size||(p.current=m,s(),o&&o())},custom:r,presenceAffectsLayout:c},t))}}})),q=q.map((function(e){var t=e.key;return v.has(t)?e:X.createElement(ga,{key:fa(e),isPresent:!0,presenceAffectsLayout:c},e)})),p.current=q,X.createElement(X.Fragment,null,v.size?q:q.map((function(e){return Object(X.cloneElement)(e)})))},Oa=r(410),Ia=r(55),ya=function(e){var t=e.onClick,r=void 0===t?m.noop:t,i=e.small,o=void 0!==i&&i,a=Object(v.useSelect)((function(e){return{shortcut:e(D.store).getShortcutRepresentation("core/edit-post/toggle-sidebar"),areAdvancedSettingsOpened:"edit-post/block"===e(C.a).getActiveGeneralSidebarName()}}),[]),u=a.shortcut,c=a.areAdvancedSettingsOpened,s=Object(v.useDispatch)(C.a),l=s.openGeneralSidebar,A=s.closeGeneralSidebar,p=c?Object(q.__)("Hide more settings"):Object(q.__)("Show more settings");return Object(n.createElement)(d.MenuItem,{onClick:function(){c?A():(l("edit-post/block"),c?Object(Ia.speak)(Object(q.__)("Block settings closed")):Object(Ia.speak)(Object(q.__)("Additional settings are now available in the Editor block settings sidebar")),r())},shortcut:u},!o&&p)};function ja(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ca(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ja(Object(r),!0).forEach((function(t){Object(k.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ja(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ea(e){var t=e.styles,r=Object(n.useRef)(),i=Object(v.useSelect)((function(e){var t=e(C.a),r=t.isEditingTemplate;return{deviceType:(0,t.__experimentalGetPreviewDeviceType)(),isTemplateMode:r()}}),[]),u=i.deviceType,c=i.isTemplateMode,s=Object(v.useSelect)((function(e){return e(C.a).hasMetaBoxes()}),[]),l=Object(v.useSelect)((function(e){return(0,e(o.store).getSettings)().supportsLayout}),[]),A=Object(v.useDispatch)(C.a).setIsEditingTemplate,m={height:"100%",width:"100%",margin:0,paddingBottom:s?null:"40vh"},p=Ca(Ca({},m),{},{borderRadius:"2px",border:"1px solid #ddd",paddingBottom:null}),b=Object(o.__experimentalUseResizeCanvas)(u),f=Object(o.__experimentalUseEditorFeature)("layout"),h=f||{},O=h.contentSize,I=h.wideSize,y=O||I?["wide","full"]:["left","center","right"],j=c?p:m;b&&(j=b);var E=Object(g.useMergeRefs)([r,Object(o.__unstableUseClipboardHandler)(),Object(o.__unstableUseCanvasClickRedirect)(),Object(o.__unstableUseTypewriter)(),Object(o.__unstableUseTypingObserver)(),Object(o.__unstableUseBlockSelectionClearer)()]),K=Object(o.__unstableUseBlockSelectionClearer)(!0);return Object(n.createElement)(da.div,{className:Q()("edit-post-visual-editor",{"is-template-mode":c}),animate:c?{padding:"48px"}:{padding:0},ref:K},l&&Object(n.createElement)(o.__experimentalLayoutStyle,{selector:".edit-post-visual-editor__post-title-wrapper, .block-editor-block-list__layout.is-root-container",layout:f}),Object(n.createElement)(o.__unstableEditorStyles,{styles:t}),Object(n.createElement)(a.VisualEditorGlobalKeyboardShortcuts,null),Object(n.createElement)(d.Popover.Slot,{name:"block-toolbar"}),c&&Object(n.createElement)(d.Button,{className:"edit-post-visual-editor__exit-template-mode",icon:Oa.a,onClick:function(){return A(!1)}},Object(q.__)("Back")),Object(n.createElement)(da.div,{ref:E,className:"editor-styles-wrapper",animate:j,initial:m},Object(n.createElement)(ha,null,Object(n.createElement)(da.div,{key:c?"template":"post",initial:{opacity:0},animate:{opacity:1}},Object(n.createElement)(o.WritingFlow,null,!c&&Object(n.createElement)("div",{className:"edit-post-visual-editor__post-title-wrapper"},Object(n.createElement)(a.PostTitle,null)),Object(n.createElement)(o.BlockList,{__experimentalLayout:l?{type:"default",alignments:l?y:void 0}:void 0}))))),Object(n.createElement)(o.__experimentalBlockSettingsMenuFirstItem,null,(function(e){var t=e.onClose;return Object(n.createElement)(ya,{onClick:t})})))}var Ka=function(){var e=Object(v.useSelect)("core/block-editor").getBlockSelectionStart,t=Object(v.useSelect)(C.a),r=t.getEditorMode,i=t.isEditorSidebarOpened,o=Object(v.useSelect)((function(e){var t=e("core/editor").getEditorSettings(),r=t.richEditingEnabled,n=t.codeEditingEnabled;return!r||!n}),[]),a=Object(v.useDispatch)(C.a),u=a.switchEditorMode,c=a.openGeneralSidebar,s=a.closeGeneralSidebar,l=a.toggleFeature,A=Object(v.useDispatch)(D.store).registerShortcut;return Object(n.useEffect)((function(){A({name:"core/edit-post/toggle-mode",category:"global",description:Object(q.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),A({name:"core/edit-post/toggle-fullscreen",category:"global",description:Object(q.__)("Toggle fullscreen mode."),keyCombination:{modifier:"secondary",character:"f"}}),A({name:"core/edit-post/toggle-block-navigation",category:"global",description:Object(q.__)("Open the block list view."),keyCombination:{modifier:"access",character:"o"}}),A({name:"core/edit-post/toggle-sidebar",category:"global",description:Object(q.__)("Show or hide the settings sidebar."),keyCombination:{modifier:"primaryShift",character:","}}),A({name:"core/edit-post/next-region",category:"global",description:Object(q.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),A({name:"core/edit-post/previous-region",category:"global",description:Object(q.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"}]}),A({name:"core/edit-post/keyboard-shortcuts",category:"main",description:Object(q.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}})}),[]),Object(D.useShortcut)("core/edit-post/toggle-mode",(function(){u("visual"===r()?"text":"visual")}),{bindGlobal:!0,isDisabled:o}),Object(D.useShortcut)("core/edit-post/toggle-fullscreen",(function(){l("fullscreenMode")}),{bindGlobal:!0}),Object(D.useShortcut)("core/edit-post/toggle-sidebar",(function(t){if(t.preventDefault(),i())s();else{var r=e()?"edit-post/block":"edit-post/document";c(r)}}),{bindGlobal:!0}),null},Sa=[{keyCombination:{modifier:"primary",character:"b"},description:Object(q.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:Object(q.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:Object(q.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:Object(q.__)("Remove a link.")},{keyCombination:{modifier:"primary",character:"u"},description:Object(q.__)("Underline the selected text.")}];function wa(e){var t=e.keyCombination,r=e.forceAriaLabel,i=t.modifier?K.displayShortcutList[t.modifier](t.character):t.character,o=t.modifier?K.shortcutAriaLabel[t.modifier](t.character):t.character;return Object(n.createElement)("kbd",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":r||o},Object(m.castArray)(i).map((function(e,t){return"+"===e?Object(n.createElement)(n.Fragment,{key:t},e):Object(n.createElement)("kbd",{key:t,className:"edit-post-keyboard-shortcut-help-modal__shortcut-key"},e)})))}var Ma=function(e){var t=e.description,r=e.keyCombination,i=e.aliases,o=void 0===i?[]:i,a=e.ariaLabel;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-description"},t),Object(n.createElement)("div",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-term"},Object(n.createElement)(wa,{keyCombination:r,forceAriaLabel:a}),o.map((function(e,t){return Object(n.createElement)(wa,{keyCombination:e,forceAriaLabel:a,key:t})}))))},za=function(e){var t=e.name,r=Object(v.useSelect)((function(e){var r=e(D.store),n=r.getShortcutKeyCombination,i=r.getShortcutDescription,o=r.getShortcutAliases;return{keyCombination:n(t),aliases:o(t),description:i(t)}})),i=r.keyCombination,o=r.description,a=r.aliases;return i?Object(n.createElement)(Ma,{keyCombination:i,description:o,aliases:a}):null},Za="edit-post/keyboard-shortcut-help",Ba=function(e){var t=e.shortcuts;return Object(n.createElement)("ul",{className:"edit-post-keyboard-shortcut-help-modal__shortcut-list",role:"list"},t.map((function(e,t){return Object(n.createElement)("li",{className:"edit-post-keyboard-shortcut-help-modal__shortcut",key:t},Object(m.isString)(e)?Object(n.createElement)(za,{name:e}):Object(n.createElement)(Ma,e))})))},Ga=function(e){var t=e.title,r=e.shortcuts,i=e.className;return Object(n.createElement)("section",{className:Q()("edit-post-keyboard-shortcut-help-modal__section",i)},!!t&&Object(n.createElement)("h2",{className:"edit-post-keyboard-shortcut-help-modal__section-title"},t),Object(n.createElement)(Ba,{shortcuts:r}))},ka=function(e){var t=e.title,r=e.categoryName,i=e.additionalShortcuts,o=void 0===i?[]:i,a=Object(v.useSelect)((function(e){return e(D.store).getCategoryShortcuts(r)}),[r]);return Object(n.createElement)(Ga,{title:t,shortcuts:a.concat(o)})},Ya=Object(g.compose)([Object(v.withSelect)((function(e){return{isModalActive:e(C.a).isModalActive(Za)}})),Object(v.withDispatch)((function(e,t){var r=t.isModalActive,n=e(C.a),i=n.openModal,o=n.closeModal;return{toggleModal:function(){return r?o():i(Za)}}}))])((function(e){var t=e.isModalActive,r=e.toggleModal;return Object(D.useShortcut)("core/edit-post/keyboard-shortcuts",r,{bindGlobal:!0}),t?Object(n.createElement)(d.Modal,{className:"edit-post-keyboard-shortcut-help-modal",title:Object(q.__)("Keyboard shortcuts"),closeLabel:Object(q.__)("Close"),onRequestClose:r},Object(n.createElement)(Ga,{className:"edit-post-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/edit-post/keyboard-shortcuts"]}),Object(n.createElement)(ka,{title:Object(q.__)("Global shortcuts"),categoryName:"global"}),Object(n.createElement)(ka,{title:Object(q.__)("Selection shortcuts"),categoryName:"selection"}),Object(n.createElement)(ka,{title:Object(q.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:Object(q.__)("Change the block type after adding a new paragraph."),
18
  /* translators: The forward-slash character. e.g. '/'. */
19
  ariaLabel:Object(q.__)("Forward-slash")}]}),Object(n.createElement)(Ga,{title:Object(q.__)("Text formatting"),shortcuts:Sa})):null})),xa=function(e){var t=e.blockTypes,r=e.value,i=e.onItemChange;return Object(n.createElement)("ul",{className:"edit-post-manage-blocks-modal__checklist"},t.map((function(e){return Object(n.createElement)("li",{key:e.name,className:"edit-post-manage-blocks-modal__checklist-item"},Object(n.createElement)(d.CheckboxControl,{label:Object(n.createElement)(n.Fragment,null,e.title,Object(n.createElement)(o.BlockIcon,{icon:e.icon})),checked:r.includes(e.name),onChange:Object(m.partial)(i,e.name)}))})))},La=Object(n.createContext)({}),Qa=Object(g.compose)([g.withInstanceId,Object(v.withSelect)((function(e){return{hiddenBlockTypes:(0,e(C.a).getPreference)("hiddenBlockTypes")}})),Object(v.withDispatch)((function(e,t){var r=e(C.a),n=r.showBlockTypes,i=r.hideBlockTypes;return{toggleVisible:function(e,t){t?n(e):i(e)},toggleAllVisible:function(e){var r=Object(m.map)(t.blockTypes,"name");e?n(r):i(r)}}}))])((function(e){var t=e.instanceId,r=e.title,i=e.blockTypes,o=e.hiddenBlockTypes,a=e.toggleVisible,u=e.toggleAllVisible,c=Object(n.useContext)(La).allowedBlockTypes,s=Object(n.useMemo)((function(){return!0===c?i:i.filter((function(e){var t=e.name;return Object(m.includes)(c||[],t)}))}),[c,i]);if(!s.length)return null;var l,A=m.without.apply(void 0,[Object(m.map)(s,"name")].concat(Object(G.a)(o))),p="edit-post-manage-blocks-modal__category-title-"+t,v=A.length===s.length;return l=v?"true":A.length>0?"mixed":"false",Object(n.createElement)("div",{role:"group","aria-labelledby":p,className:"edit-post-manage-blocks-modal__category"},Object(n.createElement)(d.CheckboxControl,{checked:v,onChange:u,className:"edit-post-manage-blocks-modal__category-title","aria-checked":l,label:Object(n.createElement)("span",{id:p},r)}),Object(n.createElement)(xa,{blockTypes:s,value:A,onItemChange:a}))})),Wa=Object(g.compose)([Object(g.withState)({search:""}),Object(v.withSelect)((function(e){var t=e(p.store),r=t.getBlockTypes,n=t.getCategories,i=t.hasBlockSupport,o=t.isMatchingSearchTerm,a=(0,e(C.a).getPreference)("hiddenBlockTypes"),u=Object(m.isArray)(a)&&a.length;return{blockTypes:r(),categories:n(),hasBlockSupport:i,isMatchingSearchTerm:o,numberOfHiddenBlocks:u}}))])((function(e){var t=e.search,r=e.setState,i=e.blockTypes,o=e.categories,a=e.hasBlockSupport,u=e.isMatchingSearchTerm,c=e.numberOfHiddenBlocks;return i=i.filter((function(e){return a(e,"inserter",!0)&&(!t||u(e,t))&&(!e.parent||Object(m.includes)(e.parent,"core/post-content"))})),Object(n.createElement)("div",{className:"edit-post-manage-blocks-modal__content"},Object(n.createElement)(d.TextControl,{type:"search",label:Object(q.__)("Search for a block"),value:t,onChange:function(e){return r({search:e})},className:"edit-post-manage-blocks-modal__search"}),!!c&&Object(n.createElement)("div",{className:"edit-post-manage-blocks-modal__disabled-blocks-count"},Object(q.sprintf)(
20
  /* translators: %d: number of blocks. */
build/edit-site/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => '9aa14d5be8483be1fcd40742c842297e');
1
+ <?php return array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => 'ca6beed72e398dbb9b78aa3e55fe8ba3');
build/edit-site/index.js CHANGED
@@ -12,11 +12,11 @@ sidebar:Object(P.__)("Settings"),
12
  /* translators: accessibility text for the publish landmark region. */
13
  actions:Object(P.__)("Publish"),
14
  /* translators: accessibility text for the footer landmark region. */
15
- footer:Object(P.__)("Footer")}),s);return Object(h.createElement)("div",{ref:Object($.useMergeRefs)([t,b]),className:w()(u,"interface-interface-skeleton",d,!!n&&"has-footer")},!!i&&Object(h.createElement)("div",{className:"interface-interface-skeleton__drawer",role:"region","aria-label":m.drawer},i),Object(h.createElement)("div",{className:"interface-interface-skeleton__editor"},!!r&&Object(h.createElement)("div",{className:"interface-interface-skeleton__header",role:"region","aria-label":m.header,tabIndex:"-1"},r),Object(h.createElement)("div",{className:"interface-interface-skeleton__body"},!!a&&Object(h.createElement)("div",{className:"interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":m.secondarySidebar,tabIndex:"-1"},a),Object(h.createElement)("div",{className:"interface-interface-skeleton__content",role:"region","aria-label":m.body,tabIndex:"-1"},o),!!c&&Object(h.createElement)("div",{className:"interface-interface-skeleton__sidebar",role:"region","aria-label":m.sidebar,tabIndex:"-1"},c),!!l&&Object(h.createElement)("div",{className:"interface-interface-skeleton__actions",role:"region","aria-label":m.actions,tabIndex:"-1"},l))),!!n&&Object(h.createElement)("div",{className:"interface-interface-skeleton__footer",role:"region","aria-label":m.footer,tabIndex:"-1"},n))}))},49:function(e,t,n){"use strict";var r,c;function a(e){return[e]}function o(){var e={clear:function(){e.head=null}};return e}function i(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},c="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function s(){n=c?new WeakMap:o()}function u(){var n,r,c,a,o,s=arguments.length;for(a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];for(o=t.apply(null,a),(n=l(o)).isUniqueByDependants||(n.lastDependants&&!i(o,n.lastDependants,0)&&n.clear(),n.lastDependants=o),r=n.head;r;){if(i(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=a),l=c?function(e){var t,c,a,i,l,s=n,u=!0;for(t=0;t<e.length;t++){if(!(l=c=e[t])||"object"!=typeof l){u=!1;break}s.has(c)?s=s.get(c):(a=new WeakMap,s.set(c,a),s=a)}return s.has(r)||((i=o()).isUniqueByDependants=u,s.set(r,i)),s.get(r)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},5: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}))},50:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,c={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}n.d(t,"a",(function(){return r}))},52:function(e,t){e.exports=window.wp.apiFetch},545:function(e,t,n){"use strict";n.r(t),n.d(t,"initialize",(function(){return mr})),n.d(t,"__experimentalMainDashboardButton",(function(){return Jn})),n.d(t,"__experimentalNavigationToggle",(function(){return er}));var r={};n.r(r),n.d(r,"toggleFeature",(function(){return te})),n.d(r,"__experimentalSetPreviewDeviceType",(function(){return ne})),n.d(r,"setTemplate",(function(){return re})),n.d(r,"addTemplate",(function(){return ce})),n.d(r,"removeTemplate",(function(){return ae})),n.d(r,"setTemplatePart",(function(){return oe})),n.d(r,"setHomeTemplateId",(function(){return ie})),n.d(r,"setPage",(function(){return le})),n.d(r,"showHomepage",(function(){return se})),n.d(r,"setNavigationPanelActiveMenu",(function(){return ue})),n.d(r,"openNavigationPanelToMenu",(function(){return pe})),n.d(r,"setIsNavigationPanelOpened",(function(){return be})),n.d(r,"setIsInserterOpened",(function(){return de})),n.d(r,"updateSettings",(function(){return me})),n.d(r,"setIsListViewOpened",(function(){return fe})),n.d(r,"revertTemplate",(function(){return Oe}));var c={};n.r(c),n.d(c,"isFeatureActive",(function(){return he})),n.d(c,"__experimentalGetPreviewDeviceType",(function(){return Se})),n.d(c,"getCanUserCreateMedia",(function(){return we})),n.d(c,"getSettings",(function(){return xe})),n.d(c,"getHomeTemplateId",(function(){return Pe})),n.d(c,"getEditedPostType",(function(){return Te})),n.d(c,"getEditedPostId",(function(){return ke})),n.d(c,"getPage",(function(){return Ie})),n.d(c,"getNavigationPanelActiveMenu",(function(){return Ne})),n.d(c,"getCurrentTemplateNavigationPanelSubMenu",(function(){return Ce})),n.d(c,"isNavigationOpened",(function(){return Me})),n.d(c,"isInserterOpened",(function(){return Ae})),n.d(c,"isListViewOpened",(function(){return Be}));var a=n(0),o=n(84),i=n(19),l=n(373),s=n.n(l),u=n(3),p=n(1),b=n(69),d=n(52),m=n.n(d),f=n(7),O=Object(a.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)(f.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})),j=n(2),v=Object(u.createSlotFill)("ToolsMoreMenuGroup"),g=v.Fill,_=v.Slot;g.Slot=function(e){var t=e.fillProps;return Object(a.createElement)(_,{fillProps:t},(function(e){return!Object(j.isEmpty)(e)&&Object(a.createElement)(u.MenuGroup,{label:Object(p.__)("Tools")},e)}))};var y=g;Object(b.registerPlugin)("edit-site",{render:function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(y,null,Object(a.createElement)(u.MenuItem,{role:"menuitem",icon:O,onClick:function(){return m()({path:"/__experimental/edit-site/v1/export",parse:!1}).then((function(e){return e.blob()})).then((function(e){return s()(e,"edit-site-export.zip","application/zip")}))},info:Object(p.__)("Download your templates and template parts.")},Object(p.__)("Export"))))}});var E=n(32),h=n(86);Object(E.addFilter)("editor.MediaUpload","core/edit-site/components/media-upload",(function(){return h.MediaUpload}));var S=n(4),w=n(56),x=n(5),P={features:{}},T=[].concat(["index","singular","archive","single","page","home","404","search"],["author","category","taxonomy","date","tag","attachment","single-post","front-page"]),k=["page-home"],I=["post-","author-","single-post-","tag-"],N=["page-"],C=["front-page","single-post","page","archive","search","404","index"],M={singular:["single","page"],index:["archive","404","search","singular","home"],home:["front-page"]},A=[{area:"header",menu:"template-parts-headers",title:Object(p.__)("Headers")},{area:"footer",menu:"template-parts-footers",title:Object(p.__)("Footers")},{area:"sidebar",menu:"template-parts-sidebars",title:Object(p.__)("Sidebars")},{area:"uncategorized",menu:"template-parts-general",title:Object(p.__)("General")}];function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){Object(x.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=Object(S.combineReducers)({features:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P.features,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_FEATURE":return D(D({},e),{},Object(x.a)({},t.feature,!e[t.feature]));default:return e}}}),L=Object(S.combineReducers)({preferences:R,deviceType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Desktop",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PREVIEW_DEVICE_TYPE":return t.deviceType}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return D(D({},e),t.settings)}return e},editedPost:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE":case"SET_PAGE":return{type:"wp_template",id:t.templateId,page:t.page};case"SET_TEMPLATE_PART":return{type:"wp_template_part",id:t.templatePartId}}return e},homeTemplateId:function(e,t){switch(t.type){case"SET_HOME_TEMPLATE":return t.homeTemplateId}return e},navigationPanel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{menu:"root",isOpen:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_NAVIGATION_PANEL_ACTIVE_MENU":return D(D({},e),{},{menu:t.menu});case"OPEN_NAVIGATION_PANEL_TO_MENU":return D(D({},e),{},{isOpen:!0,menu:t.menu});case"SET_IS_NAVIGATION_PANEL_OPENED":return D(D({},e),{},{menu:t.isOpen?e.menu:"root",isOpen:t.isOpen});case"SET_IS_INSERTER_OPENED":case"SET_IS_LIST_VIEW_OPENED":return D(D({},e),{},{menu:e.isOpen&&t.isOpen?"root":e.menu,isOpen:!t.isOpen&&e.isOpen})}return e},blockInserterPanel:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_NAVIGATION_PANEL_TO_MENU":return!1;case"SET_IS_NAVIGATION_PANEL_OPENED":case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.isOpen}return e},listViewPanel:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_NAVIGATION_PANEL_TO_MENU":return!1;case"SET_IS_NAVIGATION_PANEL_OPENED":case"SET_IS_INSERTER_OPENED":return!t.isOpen&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e}}),F=n(46),V=n(16),G=n.n(V),z=n(11),U=n(31),W=n(45),H="core/edit-site";function Y(e){return!!e&&"custom"===(null==e?void 0:e.source)&&(null==e?void 0:e.has_theme_file)}function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){Object(x.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Q=G.a.mark(re),J=G.a.mark(ce),X=G.a.mark(ae),$=G.a.mark(le),Z=G.a.mark(se),ee=G.a.mark(Oe);function te(e){return{type:"TOGGLE_FEATURE",feature:e}}function ne(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}function re(e,t){var n,r;return G.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(n={templateSlug:t},t){c.next=6;break}return c.next=4,S.controls.resolveSelect("core","getEntityRecord","postType","wp_template",e);case 4:r=c.sent,n.templateSlug=null==r?void 0:r.slug;case 6:return c.abrupt("return",{type:"SET_TEMPLATE",templateId:e,page:{context:n}});case 7:case"end":return c.stop()}}),Q)}function ce(e){var t;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,S.controls.dispatch("core","saveEntityRecord","postType","wp_template",e);case 2:if(t=n.sent,!e.content){n.next=6;break}return n.next=6,S.controls.dispatch("core","editEntityRecord","postType","wp_template",t.id,{blocks:Object(z.parse)(e.content)},{undoIgnore:!0});case 6:return n.abrupt("return",{type:"SET_TEMPLATE",templateId:t.id,page:{context:{templateSlug:t.slug}}});case 7:case"end":return n.stop()}}),J)}function ae(e){var t;return G.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(w.apiFetch)({path:"/wp/v2/templates/".concat(e),method:"DELETE"});case 2:return n.next=4,S.controls.select(H,"getPage");case 4:return t=n.sent,n.next=7,S.controls.dispatch(H,"setPage",t);case 7:case"end":return n.stop()}}),X)}function oe(e){return{type:"SET_TEMPLATE_PART",templatePartId:e}}function ie(e){return{type:"SET_HOME_TEMPLATE",homeTemplateId:e}}function le(e){var t,n,r,c,a;return G.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(e.path||null===(t=e.context)||void 0===t||!t.postId){o.next=5;break}return o.next=3,S.controls.resolveSelect("core","getEntityRecord","postType",e.context.postType||"post",e.context.postId);case 3:n=o.sent,e.path=Object(U.getPathAndQueryString)(n.link);case 5:return o.next=7,S.controls.resolveSelect("core","__experimentalGetTemplateForLink",e.path);case 7:return r=o.sent,c=r.id,a=r.slug,o.next=12,{type:"SET_PAGE",page:a?q(q({},e),{},{context:q(q({},e.context),{},{templateSlug:a})}):e,templateId:c};case 12:return o.abrupt("return",c);case 13:case"end":return o.stop()}}),$)}function se(){var e,t,n,r,c,a,o;return G.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,S.controls.resolveSelect("core","getEntityRecord","root","site");case 2:return e=i.sent,t=e.show_on_front,n=e.page_on_front,i.next=7,S.controls.select(H,"getSettings");case 7:return r=i.sent,c=r.siteUrl,a={path:c,context:"page"===t?{postType:"page",postId:n}:{}},i.delegateYield(le(a),"t0",11);case 11:return o=i.t0,i.next=14,ie(o);case 14:case"end":return i.stop()}}),Z)}function ue(e){return{type:"SET_NAVIGATION_PANEL_ACTIVE_MENU",menu:e}}function pe(e){return{type:"OPEN_NAVIGATION_PANEL_TO_MENU",menu:e}}function be(e){return{type:"SET_IS_NAVIGATION_PANEL_OPENED",isOpen:e}}function de(e){return{type:"SET_IS_INSERTER_OPENED",isOpen:e}}function me(e){return{type:"UPDATE_SETTINGS",settings:e}}function fe(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}function Oe(e){var t,n,r,c,a,o,l,s,u;return G.a.wrap((function(b){for(;;)switch(b.prev=b.next){case 0:if(Y(e)){b.next=4;break}return b.next=3,S.controls.dispatch(W.store,"createErrorNotice",Object(p.__)("This template is not revertable."),{type:"snackbar"});case 3:return b.abrupt("return");case 4:return b.prev=4,b.next=7,S.controls.select(i.store,"getEntity","postType",e.type);case 7:if(n=b.sent){b.next=12;break}return b.next=11,S.controls.dispatch(W.store,"createErrorNotice",Object(p.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});case 11:return b.abrupt("return");case 12:return r=Object(U.addQueryArgs)("".concat(n.baseURL,"/").concat(e.id),{context:"edit",source:"theme"}),b.next=15,Object(w.apiFetch)({path:r});case 15:if(c=b.sent){b.next=20;break}return b.next=19,S.controls.dispatch(W.store,"createErrorNotice",Object(p.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});case 19:return b.abrupt("return");case 20:return a=function(e){var t=e.blocks,n=void 0===t?[]:t;return Object(z.__unstableSerializeAndClean)(n)},b.next=23,S.controls.select(i.store,"getEditedEntityRecord","postType","wp_template",e.id);case 23:return o=b.sent,b.next=26,S.controls.dispatch(i.store,"editEntityRecord","postType","wp_template",e.id,{content:a,blocks:o.blocks,source:"custom"},{undoIgnore:!0});case 26:return l=Object(z.parse)(null==c||null===(t=c.content)||void 0===t?void 0:t.raw),b.next=29,S.controls.dispatch(i.store,"editEntityRecord","postType","wp_template",c.id,{content:a,blocks:l,source:"theme"});case 29:return s=function(){var e=Object(F.a)(G.a.mark((function e(){return G.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(S.dispatch)(i.store).editEntityRecord("postType","wp_template",o.id,{content:a,blocks:o.blocks,source:"custom"});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b.next=32,S.controls.dispatch(W.store,"createSuccessNotice",Object(p.__)("Template reverted."),{type:"snackbar",actions:[{label:Object(p.__)("Undo"),onClick:s}]});case 32:b.next=39;break;case 34:return b.prev=34,b.t0=b.catch(4),u=b.t0.message&&"unknown_error"!==b.t0.code?b.t0.message:Object(p.__)("Template revert failed. Please reload."),b.next=39,S.controls.dispatch(W.store,"createErrorNotice",u,{type:"snackbar"});case 39:case"end":return b.stop()}}),ee,null,[[4,34]])}var je=n(13),ve=n(49);function ge(e,t,n){return!!M[e]&&("home"===e&&"posts"!==n||M[e].every((function(e){return t.includes(e)||ge(e,t,n)})))}function _e(e){return T.includes(e)?"templates":k.includes(e)?"templates-general":I.some((function(t){return e.startsWith(t)}))?"templates-posts":N.some((function(t){return e.startsWith(t)}))?"templates-pages":"templates-general"}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){Object(x.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function he(e,t){return Object(j.get)(e.preferences.features,[t],!1)}function Se(e){return e.deviceType}var we=Object(S.createRegistrySelector)((function(e){return function(){return e(i.store).canUser("create","media")}})),xe=Object(ve.a)((function(e,t){var n=Ee(Ee({},e.settings),{},{outlineMode:!0,focusMode:he(e,"focusMode"),hasFixedToolbar:he(e,"fixedToolbar"),__experimentalSetIsInserterOpened:t});return we(e)?(n.mediaUpload=function(t){var n=t.onError,r=Object(je.a)(t,["onError"]);Object(h.uploadMedia)(Ee({wpAllowedMimeTypes:e.settings.allowedMimeTypes,onError:function(e){var t=e.message;return n(t)}},r))},n):n}),(function(e){return[we(e),e.settings,he(e,"focusMode"),he(e,"fixedToolbar")]}));function Pe(e){return e.homeTemplateId}function Te(e){return e.editedPost.type}function ke(e){return e.editedPost.id}function Ie(e){return e.editedPost.page}function Ne(e){return e.navigationPanel.menu}var Ce=Object(S.createRegistrySelector)((function(e){return function(t){var n,r=Te(t),c=ke(t),a=c?e(i.store).getEntityRecord("postType",r,c):null;if(!a)return"root";if("wp_template_part"===r)return(null===(n=A.find((function(e){return e.area===(null==a?void 0:a.area)})))||void 0===n?void 0:n.menu)||"template-parts";var o=e(i.store).getEntityRecords("postType","wp_template",{per_page:-1}),l=e(i.store).getEditedEntityRecord("root","site").show_on_front;return ge(a.slug,Object(j.map)(o,"slug"),l)?"templates-unused":_e(a.slug)}}));function Me(e){return e.navigationPanel.isOpen}function Ae(e){return e.blockInserterPanel}function Be(e){return e.listViewPanel}var De={reducer:L,actions:r,selectors:c,controls:w.controls,persist:["preferences"]},Re=Object(S.createReduxStore)(H,De);Object(S.registerStore)(H,De);var Le=n(9),Fe=n(6),Ve=n(48),Ge=n(36);function ze(){var e=Object(S.useSelect)((function(e){return e(W.store).getNotices().filter((function(e){return"snackbar"===e.type}))}),[]),t=Object(S.useDispatch)(W.store).removeNotice;return Object(a.createElement)(u.SnackbarList,{className:"edit-site-notices",notices:e,onRemove:t})}var Ue=n(14),We=n(177),He=n(281),Ye=n(47),Ke=n(285),qe=n(154),Qe=n(55);function Je(e){var t=e.feature,n=e.label,r=e.info,c=e.messageActivated,o=e.messageDeactivated,i=Object(S.useSelect)((function(e){return e(Re).isFeatureActive(t)}),[]),l=Object(S.useDispatch)(Re).toggleFeature;return Object(a.createElement)(u.MenuItem,{icon:i&&qe.a,isSelected:i,onClick:Object(j.flow)(l.bind(null,t),(function(){i?Object(Qe.speak)(o||Object(p.__)("Feature deactivated")):Object(Qe.speak)(c||Object(p.__)("Feature activated"))})),role:"menuitemcheckbox",info:r},n)}var Xe={className:"edit-site-more-menu__content",position:"bottom left"},$e={tooltipPosition:"bottom"},Ze=function(){return Object(a.createElement)(u.DropdownMenu,{className:"edit-site-more-menu",icon:Ke.a,label:Object(p.__)("More tools & options"),popoverProps:Xe,toggleProps:$e},(function(e){var t=e.onClose;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(u.MenuGroup,{label:Object(p._x)("View","noun")},Object(a.createElement)(Je,{feature:"fixedToolbar",label:Object(p.__)("Top toolbar"),info:Object(p.__)("Access all block and document tools in a single place"),messageActivated:Object(p.__)("Top toolbar activated"),messageDeactivated:Object(p.__)("Top toolbar deactivated")}),Object(a.createElement)(Je,{feature:"focusMode",label:Object(p.__)("Spotlight mode"),info:Object(p.__)("Focus on one block at a time"),messageActivated:Object(p.__)("Spotlight mode activated"),messageDeactivated:Object(p.__)("Spotlight mode deactivated")}),Object(a.createElement)(Ve.a.Slot,{name:"core/edit-site/plugin-more-menu",label:Object(p.__)("Plugins"),as:u.MenuGroup,fillProps:{onClick:t}})),Object(a.createElement)(y.Slot,{fillProps:{onClose:t}}))}))};function et(e){var t=e.openEntitiesSavedStates,n=e.isEntitiesSavedStatesOpen,r=Object(S.useSelect)((function(e){var t=e(i.store),n=t.__experimentalGetDirtyEntityRecords,r=t.isSavingEntityRecord,c=n();return{isDirty:c.length>0,isSaving:Object(j.some)(c,(function(e){return r(e.kind,e.name,e.key)}))}})),c=r.isDirty,o=r.isSaving,l=!c||o;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(u.Button,{isPrimary:!0,className:"edit-site-save-button__button","aria-disabled":l,"aria-expanded":n,disabled:l,isBusy:o,onClick:l?void 0:t},Object(p.__)("Save")))}var tt=n(349),nt=n(17);function rt(){var e=Object(S.useSelect)((function(e){return e("core").hasUndo()})),t=Object(S.useDispatch)("core").undo;return Object(a.createElement)(u.Button,{icon:tt.a,label:Object(p.__)("Undo"),shortcut:nt.displayShortcut.primary("z"),"aria-disabled":!e,onClick:e?t:void 0})}var ct=n(350);function at(){var e=Object(S.useSelect)((function(e){return e("core").hasRedo()})),t=Object(S.useDispatch)("core").redo;return Object(a.createElement)(u.Button,{icon:ct.a,label:Object(p.__)("Redo"),shortcut:nt.displayShortcut.primaryShift("z"),"aria-disabled":!e,onClick:e?t:void 0})}var ot=n(12),it=n.n(ot),lt=n(240);function st(e){var t,n,r,c,o=e.entityTitle,i=e.entityLabel,l=e.children,s=(n=Object(S.useSelect)((function(e){return{activeEntityBlockId:e("core/block-editor").__experimentalGetActiveBlockIdByBlockNames(["core/template-part"]),getBlock:e("core/block-editor").getBlock}})),r=n.activeEntityBlockId,c=n.getBlock,r?{label:(t=c(r),t?Object(z.__experimentalGetBlockLabel)(Object(z.getBlockType)(t.name),t.attributes):null),isActive:!0}:{}).label,b=Object(a.useRef)();return o?Object(a.createElement)
12
  /* translators: accessibility text for the publish landmark region. */
13
  actions:Object(P.__)("Publish"),
14
  /* translators: accessibility text for the footer landmark region. */