/*! This file is auto-generated */ this.wp=this.wp||{},this.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=433)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.blocks}()},104:function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r1?t-1:0),r=1;r=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=f.startTime+s.duration;else if(s.decay)O=p+h/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-O)<.1)&&(m=O);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),k=0;km:O=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(sn){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return 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;return 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,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof h&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=F(r,o,c),i}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,n){this.calc=F(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(h);var 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,n){return new V(this,e,t,n)},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),U=0,G=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=U++}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,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;u.obj(r)&&(n.merged=o({},r,n.merged)),u.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,l=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=u.arr(l.to)||u.fun(l.to);a?setTimeout((function(){r===n.guid&&(d?n.runAsync(l,s):n.diff(l).start(s))}),a):d?n.runAsync(l,s):n.diff(l).start(s)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,L.has(t)||L.add(t),D||(D=!0,E(P||A));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,L.has(t)&&L.delete(t)),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.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=O.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;n1&&(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,Oe=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ve=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 ke={};N((function(e){return new X(e)})),I("div"),C((function(e){var t=e.output.map((function(e){return e.replace(Oe,pe)})).map((function(e){return e.replace(ve,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+")"}))}})),y(Q),k((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:ke[b]||(ke[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 ye,_e,Ee=(ye=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 M(e,(function(){var e=!1;b.current&&(e=O.fn(b.current,s.current.getAnimatedValue())),b.current&&!1!==e||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,m=s.current.getValue(),v=(m.scrollTop,m.scrollLeft,c(m,["scrollTop","scrollLeft"])),g=(p=e,!u.fun(p)||p.prototype instanceof a.Component?function(e){return b.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return a.createElement(e,o({},v,{ref:g}))}))},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]=ye(n),e}),ye)}),Se=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=A,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=R,t.useSpring=function(e){var t=u.fun(e),n=K(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=K(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),O=a.onRest,v=a.onStart,g=a.ref,h=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),j=d(),k=i.useRef(!1),y=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!k.current&&new Map,forceUpdate:j});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(y.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(y.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(y.current.instances).map((function(e){return e[1]}))}}})),y.current=function(e,t){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,O=a.trail,v=void 0===O?0:O,g=a.unique,h=a.config,j=a.order,k=void 0===j?["enter","leave","update"]:j,y=$(r),_=y.keys,E=y.items,S=o({},i.current),C=[].concat(i.deleted),w=Object.keys(S),B=new Set(w),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=-v;for(;k.length;){switch(k.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";S[e]={slot:c,originalKey:e,key:g?String(e):W++,item:o,trail:N+=v,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({},S[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=v,config:p(h,n,"leave"),to:p(f,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=l[t];S[e]=o({},S[e],{item:n,slot:"update",trail:N+=v,config:p(h,n,"update"),to:p(m,n)})}))}}var R=s.map((function(e){return S[e]}));return C.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=R.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),R=[].concat(R.slice(0,t),[r],R.slice(t))})),o({},i,{changed:x.length||P.length||T.length,first:n&&0===x.length,transitions:R,current:S,deleted:C,prevProps:t})}(y.current,r),y.current.changed&&y.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;y.current.instances.has(a)||y.current.instances.set(a,new G);var u=y.current.instances.get(a),d=o({},h,{to:r,from:n,config:c,ref:g,onRest:function(n){y.current.mounted&&(e.destroyed&&(g||s||Y(y,a),f&&f(l)),!Array.from(y.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&y.current.deleted.length>0&&Y(y),O&&O(l,t,n))},onStart:v&&function(){return v(l,t)},onFrame:m&&function(e){return m(l,t,e)},delay:i,reset:b&&"enter"===t});u.update(d),y.current.paused||u.start()})),i.useEffect((function(){return y.current.mounted=k.current=!0,function(){y.current.mounted=k.current=!1,Array.from(y.current.instances).map((function(e){return e[1].destroy()})),y.current.instances.clear()}}),[]),y.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:y.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=K},11:function(e,t,n){var r; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},140:function(e,t){!function(){e.exports=this.wp.wordcount}()},145:function(e,t){!function(){e.exports=this.wp.tokenList}()},147:function(e,t,n){"use strict";var r=n(0),o=n(6),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},148:function(e,t,n){"use strict";var r=n(0),o=n(6),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 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"}));t.a=c},15: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}))},159:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},16:function(e,t){!function(){e.exports=this.React}()},164:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}},166: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}},167: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 n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-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){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(r0?!0===i?r.scrollTop(t,h.top+j.top):!1===i?r.scrollTop(t,h.top+k.top):j.top<0?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top):c||((i=void 0===i||!!i)?r.scrollTop(t,h.top+j.top):r.scrollTop(t,h.top+k.top)),o&&(j.left<0||k.left>0?!0===a?r.scrollLeft(t,h.left+j.left):!1===a?r.scrollLeft(t,h.left+k.left):j.left<0?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left):c||((a=void 0===a||!!a)?r.scrollLeft(t,h.left+j.left):r.scrollLeft(t,h.left+k.left)))}},173:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=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}}},26: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);ne.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&&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=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},42: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;r1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t=Array.isArray(e)?e:!0===e?U:[],!r||!0===e&&!n?p.without.apply(void 0,[t].concat(G)):t}var W=Object(d.createContext)({}),q=W.Provider,$=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=Object(d.useContext)(W).isEmbedButton,r=t.name,o=n?[]:K(Object(c.getBlockSupport)(r,"align"),Object(c.hasBlockSupport)(r,"alignWide",!0));return[o.length>0&&t.isSelected&&Object(d.createElement)(w,{key:"align-controls"},Object(d.createElement)(V,{value:t.attributes.align,onChange:function(e){if(!e){var n=Object(c.getBlockType)(t.name);Object(p.get)(n,["attributes","align","default"])&&(e="")}t.setAttributes({align:e})},controls:o})),Object(d.createElement)(e,Object(s.a)({key:"edit"},t))]}}),"withToolbarControls"),Y=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=t.attributes.align,o=Object(v.useSelect)((function(e){return!!e("core/block-editor").getSettings().alignWide}),[]);if(void 0===r)return Object(d.createElement)(e,t);var i=K(Object(c.getBlockSupport)(n,"align"),Object(c.hasBlockSupport)(n,"alignWide",!0),o),a=t.wrapperProps;return i.includes(r)&&(a=z({},a,{"data-align":r})),Object(d.createElement)(e,Object(s.a)({},t,{wrapperProps:a}))}}));Object(O.addFilter)("blocks.registerBlockType","core/align/addAttribute",(function(e){return Object(p.has)(e.attributes,["align","type"])||Object(c.hasBlockSupport)(e,"align")&&(e.attributes=z({},e.attributes,{align:{type:"string"}})),e})),Object(O.addFilter)("editor.BlockListBlock","core/editor/align/with-data-align",Y),Object(O.addFilter)("editor.BlockEdit","core/editor/align/with-toolbar-controls",$),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/align/addAssignedAlign",(function(e,t,n){var r=n.align;return K(Object(c.getBlockSupport)(t,"align"),Object(c.hasBlockSupport)(t,"alignWide",!0)).includes(r)&&(e.className=f()("align".concat(r),e.className)),e}));var X=Object(g.createSlotFill)("InspectorAdvancedControls"),Q=X.Fill,Z=X.Slot;function J(e){var t=e.children;return k().isSelected?Object(d.createElement)(Q,null,t):null}J.slotName="InspectorAdvancedControls",J.Slot=Z;var ee=J;function te(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 ne=/[\s#]/g;var re=Object(m.createHigherOrderComponent)((function(e){return function(t){return Object(c.hasBlockSupport)(t.name,"anchor")&&t.isSelected?Object(d.createElement)(d.Fragment,null,Object(d.createElement)(e,t),Object(d.createElement)(ee,null,Object(d.createElement)(g.TextControl,{className:"html-anchor-control",label:Object(B.__)("HTML anchor"),help:Object(d.createElement)(d.Fragment,null,Object(B.__)("Enter a word or two — without spaces — to make a unique web address just for this heading, called an “anchor.” Then, you’ll be able to link directly to this section of your page."),Object(d.createElement)(g.ExternalLink,{href:"https://wordpress.org/support/article/page-jumps/"},Object(B.__)("Learn more about anchors"))),value:t.attributes.anchor||"",onChange:function(e){e=e.replace(ne,"-"),t.setAttributes({anchor:e})},autoComplete:"off"}))):Object(d.createElement)(e,t)}}),"withInspectorControl");function oe(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}Object(O.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return Object(p.has)(e.attributes,["anchor","type"])||Object(c.hasBlockSupport)(e,"anchor")&&(e.attributes=function(e){for(var t=1;t");var t=Object(c.parseWithAttributeSchema)(e,{type:"string",source:"attribute",selector:"[data-custom-class-name] > *",attribute:"class"});return t?t.trim().split(/\s+/):[]}Object(O.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e){return Object(c.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes=function(e){for(var t=1;t0&&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=k(),i=c.clientId,a=Object(v.useSelect)((function(e){var t=e("core/block-editor"),r=t.getBlockAttributes,c=t.getSettings,a=r(i);return{gradient:a[n],customGradient:a[o],gradients:c().gradients}}),[i,n,o]),l=a.gradients,s=a.gradient,b=a.customGradient,f=Object(v.useDispatch)("core/block-editor"),p=f.updateBlockAttributes,m=Object(d.useCallback)((function(e){var t,r,c=ge(l,e);c?p(i,(r={},Object(u.a)(r,n,c),Object(u.a)(r,o,void 0),r)):p(i,(t={},Object(u.a)(t,n,void 0),Object(u.a)(t,o,e),t))}),[l,i,p]),O=me(s);return{gradientClass:O,gradientValue:s?Oe(l,s):b,setGradient:m}}var je=function e(t){if(!Object(p.isObject)(t))return t;var n=Object(p.pickBy)(Object(p.mapValues)(t,e),p.identity);return Object(p.isEqual)(n,{})?void 0:n},ke=n(14);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}var _e=Object(B.__)("(Color: %s)"),Ee=Object(B.__)("(Gradient: %s)"),Se=["colors","disableCustomColors","gradients","disableCustomGradients"];function Ce(e){var t,n,r=e.colors,o=e.gradients,c=e.label,i=e.currentTab,a=e.colorValue,l=e.gradientValue;if("color"===i){if(a){var s=fe(r,t=a),u=s&&s.name;n=Object(B.sprintf)(_e,u||t)}}else if("gradient"===i&&l){var b=ve(o,t=l),f=b&&b.name;n=Object(B.sprintf)(Ee,f||t)}return Object(d.createElement)(d.Fragment,null,c,!!t&&Object(d.createElement)(g.ColorIndicator,{colorValue:t,"aria-label":n}))}function we(e){var t=e.colors,n=e.gradients,r=e.disableCustomColors,o=e.disableCustomGradients,c=e.className,i=e.label,a=e.onColorChange,l=e.onGradientChange,u=e.colorValue,b=e.gradientValue,m=a&&(!Object(p.isEmpty)(t)||!r),O=l&&(!Object(p.isEmpty)(n)||!o),v=Object(d.useState)(b?"gradient":!!m&&"color"),h=Object(le.a)(v,2),j=h[0],k=h[1];return m||O?Object(d.createElement)(g.BaseControl,{className:f()("block-editor-color-gradient-control",c)},Object(d.createElement)("fieldset",null,Object(d.createElement)("legend",null,Object(d.createElement)("div",{className:"block-editor-color-gradient-control__color-indicator"},Object(d.createElement)(g.BaseControl.VisualLabel,null,Object(d.createElement)(Ce,{currentTab:j,label:i,colorValue:u,gradientValue:b})))),m&&O&&Object(d.createElement)(g.ButtonGroup,{className:"block-editor-color-gradient-control__button-tabs"},Object(d.createElement)(g.Button,{isSmall:!0,isPressed:"color"===j,onClick:function(){return k("color")}},Object(B.__)("Solid")),Object(d.createElement)(g.Button,{isSmall:!0,isPressed:"gradient"===j,onClick:function(){return k("gradient")}},Object(B.__)("Gradient"))),("color"===j||!O)&&Object(d.createElement)(g.ColorPalette,Object(s.a)({value:u,onChange:O?function(e){a(e),l()}:a},{colors:t,disableCustomColors:r})),("gradient"===j||!m)&&Object(d.createElement)(g.__experimentalGradientPicker,Object(s.a)({value:b,onChange:m?function(e){l(e),a()}:l},{gradients:n,disableCustomGradients:o})))):null}function Be(e){var t=Object(v.useSelect)((function(e){var t=e("core/block-editor").getSettings();return Object(p.pick)(t,Se)}));return Object(d.createElement)(we,function(e){for(var t=1;t=24?"large":"small"})?null:Object(d.createElement)(Ve,{backgroundColor:t,textColor:i,tinyBackgroundColor:a,tinyTextColor:l})},ze=Object(g.createSlotFill)("InspectorControls"),Ue=ze.Fill,Ge=ze.Slot;function Ke(e){var t=e.children;return y()?Object(d.createElement)(Ue,null,t):null}Ke.Slot=Ge;var We=Ke;function qe(e){return document.getElementById("block-"+e)}function $e(e,t){return t.closest(".block-editor-block-list__block")===e}function Ye(e){for(;e&&e.nodeType!==window.Node.ELEMENT_NODE;)e=e.parentNode;if(e){var t=e.closest(".block-editor-block-list__block");if(t)return t.id.slice("block-".length)}}function Xe(e){var t=e.settings,n=e.clientId,r=e.enableContrastChecking,o=void 0===r||r,c=window,i=c.getComputedStyle,a=c.Node,l=Object(d.useState)(),s=Object(le.a)(l,2),u=s[0],b=s[1],f=Object(d.useState)(),p=Object(le.a)(f,2),m=p[0],O=p[1];return Object(d.useEffect)((function(){if(o){var e=qe(n);if(e){O(i(e).color);for(var t=e,r=i(t).backgroundColor;"rgba(0, 0, 0, 0)"===r&&t.parentNode&&t.parentNode.nodeType===a.ELEMENT_NODE;)t=t.parentNode,r=i(t).backgroundColor;b(r)}}})),Object(d.createElement)(We,null,Object(d.createElement)(Ae,{title:Object(B.__)("Color settings"),initialOpen:!1,settings:t},o&&Object(d.createElement)(He,{backgroundColor:u,textColor:m})))}function Qe(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 Ze(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().__experimentalDisableCustomLineHeight}));return!Object(c.hasBlockSupport)(t,"__experimentalLineHeight")||n}var bt=n(145),ft=n.n(bt),pt=function(e,t,n){if(t){var r=Object(p.find)(e,{slug:t});if(r)return r}return{size:n}};function mt(e,t){var n=Object(p.find)(e,{size:t});return n||{size:t}}function Ot(e){if(e)return"has-".concat(Object(p.kebabCase)(e),"-font-size")}var vt=Object(v.withSelect)((function(e){var t=e("core/block-editor").getSettings();return{disableCustomFontSizes:t.disableCustomFontSizes,fontSizes:t.fontSizes}}))(g.FontSizePicker);function gt(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 ht(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.name,n=kt(),r=n.length;return!Object(c.hasBlockSupport)(t,"__experimentalFontSize")||!r}var Et=Object(m.createHigherOrderComponent)((function(e){return function(t){var n,r=kt(),o=t.name,i=t.attributes,a=i.fontSize,l=i.style,s=t.wrapperProps,u=ht({},t);if(Object(c.hasBlockSupport)(o,"__experimentalFontSize")&&a&&!(null==l||null===(n=l.typography)||void 0===n?void 0:n.fontSize)){var b,f=pt(r,a,null==l||null===(b=l.typography)||void 0===b?void 0:b.fontSize).size;u.wrapperProps=ht({},s,{style:ht({fontSize:f},null==s?void 0:s.style)})}return Object(d.createElement)(e,u)}}),"withFontSizeInlineStyles");Object(O.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return Object(c.hasBlockSupport)(e,"__experimentalFontSize")?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/font/addSaveProps",jt),Object(O.addFilter)("blocks.registerBlockType","core/font/addEditProps",(function(e){if(!Object(c.hasBlockSupport)(e,"__experimentalFontSize"))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),jt(r,e,n)},e})),Object(O.addFilter)("editor.BlockListBlock","core/font-size/with-font-size-inline-styles",Et);var St=["__experimentalLineHeight","__experimentalFontSize"];function Ct(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[_t(e),dt(e)];return t.filter(Boolean).length===t.length}(e),n=wt(e.name);return t||!n?null:Object(d.createElement)(We,null,Object(d.createElement)(g.PanelBody,{title:Object(B.__)("Typography")},Object(d.createElement)(yt,e),Object(d.createElement)(ut,e)))}var wt=function(e){return"web"===d.Platform.OS&&St.some((function(t){return Object(c.hasBlockSupport)(e,t)}))};function Bt(e){var t=k().name,n="__experimentalFeatures.".concat(e);return Object(v.useSelect)((function(e){var r=(0,e("core/blocks").getBlockSupport)(t,n);if(void 0!==r)return r;var o=e("core/block-editor").getSettings;return Object(p.get)(o(),n)}),[t,n])}function It(e){var t=e.units,n=Object(ke.a)(e,["units"]),r=xt(t);return Object(d.createElement)(g.__experimentalUnitControl,Object(s.a)({units:r},n))}function xt(e){var t=Bt("__experimentalDisableCustomUnits"),n=!!t;return Array.isArray(t)?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.filter((function(t){return e.includes(t.value)}))}(t,e):!n&&e}function Pt(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 Tt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=Lt({},Rt,{lineHeight:["typography","lineHeight"],fontSize:["typography","fontSize"],background:["color","gradient"],backgroundColor:["color","background"],color:["color","text"],"--wp--style--color--link":["color","link"]}),n={};return Object.entries(t).forEach((function(t){var r=Object(se.a)(t),o=r[0],c=r.slice(1),i=Object(le.a)(c,1)[0];Object(p.has)(e,i)&&(n[o]=Vt(Object(p.get)(e,i)))})),n}(r),{},e.style),e}var zt=Object(m.createHigherOrderComponent)((function(e){return function(t){var n=t.name,r=Object(c.hasBlockSupport)(n,"__experimentalPadding");return[Object(d.createElement)(Ct,Object(s.a)({key:"typography"},t)),Object(d.createElement)(ot,Object(s.a)({key:"colors"},t)),Object(d.createElement)(e,Object(s.a)({key:"edit"},t)),r&&Object(d.createElement)(Mt,{key:"spacing"},Object(d.createElement)(Nt,t))]}}),"withToolbarControls");Object(O.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return Ft(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e})),Object(O.addFilter)("blocks.getSaveContent.extraProps","core/style/addSaveProps",Ht),Object(O.addFilter)("blocks.registerBlockType","core/style/addEditProps",(function(e){if(!Ft(e))return e;var t=e.getEditWrapperProps;return e.getEditWrapperProps=function(n){var r={};return t&&(r=t(n)),Ht(r,e,n)},e})),Object(O.addFilter)("editor.BlockEdit","core/style/with-block-controls",zt);var Ut=n(19),Gt=n(18),Kt=n(12),Wt=n(21),qt=n(15),$t=n(20);function Yt(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Xt(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 Qt(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{panelTitle:Object(B.__)("Color settings")},n=t.panelTitle,r=void 0===n?Object(B.__)("Color settings"):n,o=t.colorPanelProps,c=t.contrastCheckers,i=t.panelChildren,a=t.colorDetector,l=(a=void 0===a?{}:a).targetRef,s=a.backgroundColorTargetRef,b=void 0===s?l:s,m=a.textColorTargetRef,O=void 0===m?l:m,g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],h=k(),j=h.clientId,y=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockAttributes,r=(0,t.getSettings)().colors;return{attributes:n(j),settingsColors:r&&!0!==r?r:gn}}),[j]),_=y.attributes,E=y.settingsColors,S=Object(v.useDispatch)("core/block-editor"),C=S.updateBlockAttributes,w=Object(d.useCallback)((function(e){return C(j,e)}),[C,j]),I=Object(d.useMemo)((function(){return cn()((function(e,t,n,r,o,c){return function(i){var a,l=i.children,s=i.className,b=void 0===s?"":s,m=i.style,O=void 0===m?{}:m,v={};r?v=Object(u.a)({},t,o):c&&(v=Object(u.a)({},t,c));var g={className:f()(b,(a={},Object(u.a)(a,"has-".concat(Object(p.kebabCase)(r),"-").concat(Object(p.kebabCase)(t)),r),Object(u.a)(a,n||"has-".concat(Object(p.kebabCase)(e)),r||c),a)),style:pn({},v,{},O)};return Object(p.isFunction)(l)?l(g):d.Children.map(l,(function(e){return Object(d.cloneElement)(e,{className:f()(e.props.className,g.className),style:pn({},g.style,{},e.props.style||{})})}))}}),{maxSize:e.length})}),[e.length]),x=Object(d.useMemo)((function(){return cn()((function(e,t){return function(n){var r=t.find((function(e){return e.color===n}));w(Object(u.a)({},r?Object(p.camelCase)("custom ".concat(e)):e,void 0)),w(Object(u.a)({},r?e:Object(p.camelCase)("custom ".concat(e)),r?r.slug:n))}}),{maxSize:e.length})}),[w,e.length]),P=Object(d.useState)(),T=Object(le.a)(P,2),N=T[0],R=T[1],M=Object(d.useState)(),D=Object(le.a)(M,2),L=D[0],A=D[1];return Object(d.useEffect)((function(){if(c){var e,t=!1,n=!1,r=dn(Object(p.castArray)(c));try{for(r.s();!(e=r.n()).done;){var o=e.value,i=o.backgroundColor,a=o.textColor;if(t||(t=!0===i),n||(n=!0===a),t&&n)break}}catch(e){r.e(e)}finally{r.f()}if(n&&A(On(O.current).color),t){for(var l=b.current,s=On(l).backgroundColor;"rgba(0, 0, 0, 0)"===s&&l.parentNode&&l.parentNode.nodeType===vn.ELEMENT_NODE;)l=l.parentNode,s=On(l).backgroundColor;R(s)}}}),[e.reduce((function(e,t){return"".concat(e," | ").concat(_[t.name]," | ").concat(_[Object(p.camelCase)("custom ".concat(t.name))])}),"")].concat(Object(ae.a)(g))),Object(d.useMemo)((function(){var t={},n=e.reduce((function(e,n){"string"==typeof n&&(n={name:n});var r=pn({},n,{color:_[n.name]}),o=r.name,c=r.property,i=void 0===c?o:c,a=r.className,l=r.panelLabel,s=void 0===l?n.label||hn[o]||Object(p.startCase)(o):l,u=r.componentName,d=void 0===u?Object(p.startCase)(o).replace(/\s/g,""):u,b=r.color,f=void 0===b?n.color:b,m=r.colors,O=void 0===m?E:m,v=_[Object(p.camelCase)("custom ".concat(o))],g=v?void 0:O.find((function(e){return e.slug===f}));return e[d]=I(o,i,a,f,g&&g.color,v),e[d].displayName=d,e[d].color=v||g&&g.color,e[d].slug=f,e[d].setColor=x(o,O),t[d]={value:g?g.color:_[Object(p.camelCase)("custom ".concat(o))],onChange:e[d].setColor,label:s,colors:O},O||delete t[d].colors,e}),{}),a={title:r,initialOpen:!1,colorSettings:t,colorPanelProps:o,contrastCheckers:c,detectedBackgroundColor:N,detectedColor:L,panelChildren:i};return pn({},n,{ColorPanel:Object(d.createElement)(un,a),InspectorControlsColorPanel:Object(d.createElement)(jn,a)})}),[_,w,L,N].concat(Object(ae.a)(g)))}function yn(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 _n(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return e=(e=(e=Object(p.deburr)(e)).replace(/^\//,"")).toLowerCase(),Object(p.words)(e)},Dn=function(e,t){return Object(p.differenceWith)(e,Mn(t),(function(e,t){return t.includes(e)}))},Ln=function(e,t,n,r){var o=Mn(r);return 0===o.length?e:An(e,r,{getCategory:function(e){var n;return null===(n=Object(p.find)(t,{slug:e.category}))||void 0===n?void 0:n.title},getCollection:function(e){var t;return null===(t=n[e.name.split("/")[0]])||void 0===t?void 0:t.title},getVariations:function(e){return(e.variations||[]).map((function(e){return e.title}))}}).map((function(e){if(Object(p.isEmpty)(e.variations))return e;var t=e.variations.filter((function(e){return Object(p.intersectionWith)(o,Mn(e.title),(function(e,t){return t.includes(e)})).length>0}));return Object(p.isEmpty)(t)?e:function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=Mn(t);if(0===r.length)return e;var o=function(e){return e.title},c=function(e){return e.keywords||[]},i=function(e){return e.category},a=function(){return null},l=function(){return[]},s=n.getTitle,u=void 0===s?o:s,d=n.getKeywords,b=void 0===d?c:d,f=n.getCategory,p=void 0===f?i:f,m=n.getCollection,O=void 0===m?a:m,v=n.getVariations,g=void 0===v?l:v;return e.filter((function(e){var t=u(e),n=b(e),o=p(e),c=O(e),i=g(e),a=[t].concat(Object(ae.a)(n),[o,c],Object(ae.a)(i)).join(" ");return 0===Dn(r,a).length}))},Fn=function(e,t){var n=Object(v.useSelect)((function(t){var n=t("core/block-editor"),r=n.getInserterItems,o=n.getSettings,c=t("core/blocks"),i=c.getCategories,a=c.getCollections,l=o().__experimentalFetchReusableBlocks;return{categories:i(),collections:a(),items:r(e),fetchReusableBlocks:l}}),[e]),r=n.categories,o=n.collections,i=n.items,a=n.fetchReusableBlocks;Object(d.useEffect)((function(){a&&a()}),[]);return[i,r,o,function(e){var n=e.name,r=e.initialAttributes,o=e.innerBlocks,i=Object(c.createBlock)(n,r,function e(t){return Object(p.map)(t,(function(t){var n=Object(le.a)(t,3),r=n[0],o=n[1],i=n[2],a=void 0===i?[]:i;return Object(c.createBlock)(r,o,e(a))}))}(o));t(i)}]};function Vn(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 Hn(e){for(var t=1;t1)return function(e,t,n,r,o){var c=t+1;if(o<0&&n)return Object(B.__)("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return Object(B.__)("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return Object(B.sprintf)(Object(B._n)("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,c);if(o>0&&!r)return Object(B.sprintf)(Object(B._n)("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,c)}(e,n,r,o,c);if(r&&o)return Object(B.sprintf)(Object(B.__)("Block %s is the only block, and cannot be moved"),t);if(c>0&&!o){var u=s("down");if("down"===u)return Object(B.sprintf)(Object(B.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===u)return Object(B.sprintf)(Object(B.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===u)return Object(B.sprintf)(Object(B.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(c>0&&o){var d=s("down");if("down"===d)return Object(B.sprintf)(Object(B.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===d)return Object(B.sprintf)(Object(B.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===d)return Object(B.sprintf)(Object(B.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(c<0&&!r){var b=s("up");if("up"===b)return Object(B.sprintf)(Object(B.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===b)return Object(B.sprintf)(Object(B.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===b)return Object(B.sprintf)(Object(B.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(c<0&&r){var f=s("up");if("up"===f)return Object(B.sprintf)(Object(B.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===f)return Object(B.sprintf)(Object(B.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===f)return Object(B.sprintf)(Object(B.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}var Pr=function(e,t,n){return"up"===e?"horizontal"===t?n?Cr.a:wr.a:Br.a:"down"===e?"horizontal"===t?n?wr.a:Cr.a:Ir.a:null},Tr=function(e,t,n){return"up"===e?"horizontal"===t?n?Object(B.__)("Move right"):Object(B.__)("Move left"):Object(B.__)("Move up"):"down"===e?"horizontal"===t?n?Object(B.__)("Move left"):Object(B.__)("Move right"):Object(B.__)("Move down"):null},Nr=Object(d.forwardRef)((function(e,t){var n=e.clientIds,r=e.direction,o=e.orientation,i=Object(ke.a)(e,["clientIds","direction","orientation"]),a=Object(m.useInstanceId)(Nr),l=Object(p.castArray)(n).length,u=Object(v.useSelect)((function(e){var t=e("core/block-editor"),i=t.getBlockIndex,a=t.getBlockRootClientId,l=t.getBlockOrder,s=t.getBlock,u=t.getSettings,d=t.getBlockListSettings,b=Object(p.castArray)(n),f=Object(p.first)(b),m=a(f),O=i(f,m),v=i(Object(p.last)(b),m),g=l(m),h=s(f),j=0===O,k=v===g.length-1,y=(d(m)||{}).orientation;return{blockType:h?Object(c.getBlockType)(h.name):null,isDisabled:"up"===r?j:k,rootClientId:m,firstIndex:O,isFirst:j,isLast:k,isRTL:u().isRTL,orientation:o||y}}),[n,r]),b=u.blockType,O=u.isDisabled,h=u.rootClientId,j=u.isFirst,k=u.isLast,y=u.firstIndex,_=u.isRTL,E=u.orientation,S=void 0===E?"vertical":E,C=Object(v.useDispatch)("core/block-editor"),w=C.moveBlocksDown,B=C.moveBlocksUp,I="up"===r?B:w,x="block-editor-block-mover-button__description-".concat(a);return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.Button,Object(s.a)({ref:t,className:f()("block-editor-block-mover-button","is-".concat(r,"-button")),icon:Pr(r,S,_),label:Tr(r,S,_),"aria-describedby":x},i,{onClick:O?null:function(e){I(n,h),i.onClick&&i.onClick(e)},"aria-disabled":O})),Object(d.createElement)("span",{id:x,className:"block-editor-block-mover-button__description"},xr(l,b&&b.title,y,j,k,"up"===r?-1:1,S,_)))})),Rr=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(Nr,Object(s.a)({direction:"up",ref:t},e))})),Mr=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(Nr,Object(s.a)({direction:"down",ref:t},e))}));function Dr(e){var t=e.level,n=e.isLastRow,r=e.terminatedLevels;return Object(p.times)(t-1,(function(e){var o=e+2,c=o===t;return Object(d.createElement)("div",{key:e,"aria-hidden":"true",className:f()("block-editor-block-navigator-descender-line",{"has-item":c,"is-last-row":n,"is-terminated":r.includes(o)})})}))}var Lr=Object(d.createContext)({__experimentalFeatures:!1}),Ar=function(){return Object(d.useContext)(Lr)},Fr=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.Path,{d:"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z"}));var Vr=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(d.createElement)("div",{className:f()(t,"block-editor-warning")},Object(d.createElement)("div",{className:"block-editor-warning__contents"},Object(d.createElement)("p",{className:"block-editor-warning__message"},r),(d.Children.count(n)>0||o)&&Object(d.createElement)("div",{className:"block-editor-warning__actions"},d.Children.count(n)>0&&d.Children.map(n,(function(e,t){return Object(d.createElement)("span",{key:t,className:"block-editor-warning__action"},e)})),o&&Object(d.createElement)(g.Dropdown,{className:"block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(g.Button,{icon:Fr,label:Object(B.__)("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(d.createElement)(g.MenuGroup,null,o.map((function(e,t){return Object(d.createElement)(g.MenuItem,{onClick:e.onClick,key:t},e.title)})))}}))))},Hr=n(258),zr=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,c=e.actionText,i=e.className;return Object(d.createElement)("div",{className:i},Object(d.createElement)("div",{className:"block-editor-block-compare__content"},Object(d.createElement)("h2",{className:"block-editor-block-compare__heading"},t),Object(d.createElement)("div",{className:"block-editor-block-compare__html"},n),Object(d.createElement)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(d.createElement)("div",{className:"block-editor-block-compare__action"},Object(d.createElement)(g.Button,{isSecondary:!0,tabIndex:"0",onClick:o},c)))};var Ur=function(e){var t,n,r,o,i=e.block,a=e.onKeep,l=e.onConvert,s=e.convertor,u=e.convertButtonText,b={rawContent:i.originalContent,renderedContent:Object(c.getSaveElement)(i.name,i.attributes)},m=(t=s(i),n=Object(p.castArray)(t),r=n.map((function(e){return Object(c.getSaveContent)(e.name,e.attributes,e.innerBlocks)})),o=n.map((function(e){return Object(c.getSaveElement)(e.name,e.attributes,e.innerBlocks)})),{rawContent:r.join(""),renderedContent:o}),O=function(e,t){return Object(Hr.diffChars)(e,t).map((function(e,t){var n=f()({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return Object(d.createElement)("span",{key:t,className:n},e.value)}))}(b.rawContent,m.rawContent);return Object(d.createElement)("div",{className:"block-editor-block-compare__wrapper"},Object(d.createElement)(zr,{title:Object(B.__)("Current"),className:"block-editor-block-compare__current",action:a,actionText:Object(B.__)("Convert to HTML"),rawContent:b.rawContent,renderedContent:b.renderedContent}),Object(d.createElement)(zr,{title:Object(B.__)("After Conversion"),className:"block-editor-block-compare__converted",action:l,actionText:u,rawContent:O,renderedContent:m.renderedContent}))};function Gr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Kr=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Gr()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(e){var t;return Object(Ut.a)(this,r),(t=n.call(this,e)).state={compare:!1},t.onCompare=t.onCompare.bind(Object(Kt.a)(t)),t.onCompareClose=t.onCompareClose.bind(Object(Kt.a)(t)),t}return Object(Gt.a)(r,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,i=e.block,a=!!Object(c.getBlockType)("core/html"),l=this.state.compare,s=[{title:Object(B.__)("Convert to Classic Block"),onClick:r},{title:Object(B.__)("Attempt Block Recovery"),onClick:o}];return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Vr,{actions:[Object(d.createElement)(g.Button,{key:"convert",onClick:this.onCompare,isSecondary:a,isPrimary:!a},Object(B._x)("Resolve","imperative verb")),a&&Object(d.createElement)(g.Button,{key:"edit",onClick:t,isPrimary:!0},Object(B.__)("Convert to HTML"))],secondaryActions:s},Object(B.__)("This block contains unexpected or invalid content.")),l&&Object(d.createElement)(g.Modal,{title:Object(B.__)("Resolve Block"),onRequestClose:this.onCompareClose,className:"block-editor-block-compare"},Object(d.createElement)(Ur,{block:i,onKeep:t,onConvert:n,convertor:Wr,convertButtonText:Object(B.__)("Convert to Blocks")})))}}]),r}(d.Component),Wr=function(e){return Object(c.rawHandler)({HTML:e.originalContent})},qr=Object(m.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Object(v.withDispatch)((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return Object(c.createBlock)("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Wr(n))},attemptBlockRecovery:function(){var e,t,o,i;r(n.clientId,(t=(e=n).name,o=e.attributes,i=e.innerBlocks,Object(c.createBlock)(t,o,i)))}}}))])(Kr),$r=Object(d.createElement)(Vr,{className:"block-editor-block-list__block-crash-warning"},Object(B.__)("This block has encountered an error and cannot be previewed.")),Yr=function(){return $r};function Xr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Qr=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Xr()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).state={hasError:!1},e}return Object(Gt.a)(r,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),r}(d.Component),Zr=n(88),Jr=n.n(Zr);var eo=function(e){var t=e.clientId,n=Object(d.useState)(""),r=Object(le.a)(n,2),o=r[0],i=r[1],a=Object(v.useSelect)((function(e){return e("core/block-editor").getBlock(t)}),[t]),l=Object(v.useDispatch)("core/block-editor").updateBlock;return Object(d.useEffect)((function(){i(Object(c.getBlockContent)(a))}),[a]),Object(d.createElement)(Jr.a,{className:"block-editor-block-list__block-html-textarea",value:o,onBlur:function(){var e=Object(c.getBlockType)(a.name),n=Object(c.getBlockAttributes)(e,o,a.attributes),r=o||Object(c.getSaveContent)(e,n),s=!o||Object(c.isValidBlockContent)(e,n,r);l(t,{attributes:n,originalContent:r,isValid:s}),o||i({content:r})},onChange:function(e){return i(e.target.value)}})};function to(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 no(e){var t=e("core/block-editor"),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 ro(e,t){Array.from(e.querySelectorAll(".rich-text")).forEach((function(e){t?e.setAttribute("contenteditable",!0):e.removeAttribute("contenteditable")}))}var oo=n(286),co=[Object(d.createInterpolateElement)(Object(B.__)("While writing, you can press / to quickly insert new blocks."),{kbd:Object(d.createElement)("kbd",null)}),Object(d.createInterpolateElement)(Object(B.__)("Indent a list by pressing space at the beginning of a line."),{kbd:Object(d.createElement)("kbd",null)}),Object(d.createInterpolateElement)(Object(B.__)("Outdent a list by pressing backspace at the beginning of a line."),{kbd:Object(d.createElement)("kbd",null)}),Object(B.__)("Drag files into the editor to automatically insert media blocks."),Object(B.__)("Change a block's type by pressing the block icon on the toolbar.")];var io=function(){var e=Object(d.useState)(Math.floor(Math.random()*co.length)),t=Object(le.a)(e,1)[0];return Object(d.createElement)(g.Tip,null,co[t])},ao=n(171),lo=n(130),so=n(287);var uo=function e(t){var n=t.className,r=t.onChange,o=t.value,c=Object(m.useInstanceId)(e),i=Object(d.useRef)();return Object(d.createElement)("div",{className:f()("block-editor-inserter__search",n)},Object(d.createElement)(g.VisuallyHidden,{as:"label",htmlFor:"block-editor-inserter__search-".concat(c)},Object(B.__)("Search for a block")),Object(d.createElement)("input",{ref:i,className:"block-editor-inserter__search-input",id:"block-editor-inserter__search-".concat(c),type:"search",placeholder:Object(B.__)("Search for a block"),autoFocus:!0,onChange:function(e){return r(e.target.value)},autoComplete:"off",value:o||""}),Object(d.createElement)("div",{className:"block-editor-inserter__search-icon"},!!o&&Object(d.createElement)(g.Button,{icon:ao.a,label:Object(B.__)("Reset search"),onClick:function(){r(""),i.current.focus()}}),!o&&Object(d.createElement)(lo.a,{icon:so.a})))};var bo=function(e){var t=e.blockType;return Object(d.createElement)("div",{className:"block-editor-block-card"},Object(d.createElement)(Gn,{icon:t.icon,showColors:!0}),Object(d.createElement)("div",{className:"block-editor-block-card__content"},Object(d.createElement)("h2",{className:"block-editor-block-card__title"},t.title),Object(d.createElement)("span",{className:"block-editor-block-card__description"},t.description)))},fo={insertUsage:{}},po={alignWide:!1,colors:[{name:Object(B.__)("Black"),slug:"black",color:"#000000"},{name:Object(B.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:Object(B.__)("White"),slug:"white",color:"#ffffff"},{name:Object(B.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:Object(B.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:Object(B.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:Object(B.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:Object(B.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:Object(B.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:Object(B.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:Object(B.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:Object(B.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:Object(B._x)("Small","font size name"),size:13,slug:"small"},{name:Object(B._x)("Normal","font size name"),size:16,slug:"normal"},{name:Object(B._x)("Medium","font size name"),size:20,slug:"medium"},{name:Object(B._x)("Large","font size name"),size:36,slug:"large"},{name:Object(B._x)("Huge","font size name"),size:48,slug:"huge"}],imageSizes:[{slug:"thumbnail",name:Object(B.__)("Thumbnail")},{slug:"medium",name:Object(B.__)("Medium")},{slug:"large",name:Object(B.__)("Large")},{slug:"full",name:Object(B.__)("Full Size")}],maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,availableLegacyWidgets:{},hasPermissionsToManageWidgets:!1,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalEnableLegacyWidgetBlock:!1,__experimentalBlockDirectory:!1,__experimentalEnableFullSiteEditing:!1,__experimentalEnableFullSiteEditingDemo:!1,__mobileEnablePageTemplates:!1,gradients:[{name:Object(B.__)("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(B.__)("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(B.__)("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(B.__)("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(B.__)("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(B.__)("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(B.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:Object(B.__)("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(B.__)("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(B.__)("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(B.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:Object(B.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}]};function mo(e,t,n){return[].concat(Object(ae.a)(e.slice(0,n)),Object(ae.a)(Object(p.castArray)(t)),Object(ae.a)(e.slice(n)))}function Oo(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=Object(ae.a)(e);return o.splice(t,r),mo(o,e.slice(t,t+r),n)}function vo(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 go(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"",n=Object(u.a)({},t,[]);return e.forEach((function(e){var r=e.clientId,o=e.innerBlocks;n[t].push(r),Object.assign(n,ho(o,r))})),n}function jo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.reduce((function(e,n){return Object.assign(e,Object(u.a)({},n.clientId,t),jo(n.innerBlocks,n.clientId))}),{})}function ko(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.identity,n={},r=Object(ae.a)(e);r.length;){var o=r.shift(),c=o.innerBlocks,i=Object(ke.a)(o,["innerBlocks"]);r.push.apply(r,Object(ae.a)(c)),n[i.clientId]=t(i)}return n}function yo(e){return ko(e,(function(e){return Object(p.omit)(e,"attributes")}))}function _o(e){return ko(e,(function(e){return e.attributes}))}function Eo(e,t){return e===t?go({},e):t}function So(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&Object(p.isEqual)(e.clientIds,t.clientIds)&&(n=e.attributes,r=t.attributes,Object(p.isEqual)(Object(p.keys)(n),Object(p.keys)(r)));var n,r}var Co=function(e){return e.reduce((function(e,t){return e[t]={},e}),{})};var wo=Object(p.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=go({},t)).attributes=Object(p.mapValues)(t.attributes,(function(e,n){return"core/block"===t.byClientId[n].name&&e.ref===r?go({},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(p.mapValues)(ko(n.blocks),(function(){return{}}));break;case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":var c=Object(p.keys)(ko(n.blocks));n.rootClientId&&!t.controlledInnerBlocks[n.rootClientId]&&c.push(n.rootClientId),r.cache=go({},r.cache,{},Co(o(c)));break;case"UPDATE_BLOCK":r.cache=go({},r.cache,{},Co(o([n.clientId])));break;case"UPDATE_BLOCK_ATTRIBUTES":r.cache=go({},r.cache,{},Co(o(n.clientIds)));break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var i=Co(o(n.replacedClientIds));r.cache=go({},Object(p.omit)(r.cache,n.replacedClientIds),{},Object(p.omit)(i,n.replacedClientIds),{},Co(Object(p.keys)(ko(n.blocks))));break;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":r.cache=go({},Object(p.omit)(r.cache,n.removedClientIds),{},Co(Object(p.difference)(o(n.clientIds),n.clientIds)));break;case"MOVE_BLOCKS_TO_POSITION":var a=Object(ae.a)(n.clientIds);n.fromRootClientId&&a.push(n.fromRootClientId),n.toRootClientId&&a.push(n.toRootClientId),r.cache=go({},r.cache,{},Co(o(a)));break;case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":var l=[];n.rootClientId&&l.push(n.rootClientId),r.cache=go({},r.cache,{},Co(o(l)));break;case"SAVE_REUSABLE_BLOCK_SUCCESS":var s=Object(p.keys)(Object(p.omitBy)(r.attributes,(function(e,t){return"core/block"!==r.byClientId[t].name||e.ref!==n.updatedId})));r.cache=go({},r.cache,{},Co(o(s)))}return r}}),(function(e){return function(t,n){var r=function(e){for(var r=e,o=0;o1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(p.reduce)(t[n],(function(n,o){return r[o]?n:[].concat(Object(ae.a)(n),[o],Object(ae.a)(e(t,o)))}),[])}(t.order,"",t.controlledInnerBlocks),o=Object.keys(Object(p.pickBy)(t.controlledInnerBlocks));return go({},t,{byClientId:go({},Object(p.omit)(t.byClientId,r),{},yo(n.blocks)),attributes:go({},Object(p.omit)(t.attributes,r),{},_o(n.blocks)),order:go({},Object(p.omit)(t.order,r),{},Object(p.omit)(ho(n.blocks),o)),parents:go({},Object(p.omit)(t.parents,r),{},jo(n.blocks)),cache:go({},Object(p.omit)(t.cache,r),{},Object(p.omit)(Object(p.mapValues)(ko(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){n="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===o.type;var a=Object(p.get)(r,["isPersistentChange"],!0);return r.isPersistentChange===a?r:go({},c,{isPersistentChange:a})}return c=go({},c,{isPersistentChange:i?!n:!So(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 yo(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return go({},e,{},yo(t.blocks));case"UPDATE_BLOCK":if(!e[t.clientId])return e;var n=Object(p.omit)(t.updates,"attributes");return Object(p.isEmpty)(n)?e:go({},e,Object(u.a)({},t.clientId,go({},e[t.clientId],{},n)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?go({},Object(p.omit)(e,t.replacedClientIds),{},yo(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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 _o(t.blocks);case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":return go({},e,{},_o(t.blocks));case"UPDATE_BLOCK":return e[t.clientId]&&t.updates.attributes?go({},e,Object(u.a)({},t.clientId,go({},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 go({},n,Object(u.a)({},r,Object(p.reduce)(t.attributes,(function(t,n,o){return n!==t[o]&&((t=Eo(e[r],t))[o]=n),t}),e[r])))}),{});return t.clientIds.every((function(t){return n[t]===e[t]}))?e:go({},e,{},n);case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return t.blocks?go({},Object(p.omit)(e,t.replacedClientIds),{},_o(t.blocks)):e;case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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 ho(t.blocks);case"RECEIVE_BLOCKS":return go({},e,{},Object(p.omit)(ho(t.blocks),""));case"INSERT_BLOCKS":var n=t.rootClientId,r=void 0===n?"":n,o=e[r]||[],c=ho(t.blocks,r),i=t.index,a=void 0===i?o.length:i;return go({},e,{},c,Object(u.a)({},r,mo(o,c[r],a)));case"MOVE_BLOCKS_TO_POSITION":var l,s=t.fromRootClientId,d=void 0===s?"":s,b=t.toRootClientId,f=void 0===b?"":b,m=t.clientIds,O=t.index,v=void 0===O?e[f].length:O;if(d===f){var g=e[f],h=g.indexOf(m[0]);return go({},e,Object(u.a)({},f,Oo(e[f],h,v,m.length)))}return go({},e,(l={},Object(u.a)(l,d,p.without.apply(void 0,[e[d]].concat(Object(ae.a)(m)))),Object(u.a)(l,f,mo(e[f],m,v)),l));case"MOVE_BLOCKS_UP":var j=t.clientIds,k=t.rootClientId,y=void 0===k?"":k,_=Object(p.first)(j),E=e[y];if(!E.length||_===Object(p.first)(E))return e;var S=E.indexOf(_);return go({},e,Object(u.a)({},y,Oo(E,S,S-1,j.length)));case"MOVE_BLOCKS_DOWN":var C=t.clientIds,w=t.rootClientId,B=void 0===w?"":w,I=Object(p.first)(C),x=Object(p.last)(C),P=e[B];if(!P.length||x===Object(p.last)(P))return e;var T=P.indexOf(I);return go({},e,Object(u.a)({},B,Oo(P,T,T+1,C.length)));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":var N=t.clientIds;if(!t.blocks)return e;var R=ho(t.blocks);return Object(p.flow)([function(e){return Object(p.omit)(e,t.replacedClientIds)},function(e){return go({},e,{},Object(p.omit)(R,""))},function(e){return Object(p.mapValues)(e,(function(e){return Object(p.reduce)(e,(function(e,t){return t===N[0]?[].concat(Object(ae.a)(e),Object(ae.a)(R[""])):(-1===N.indexOf(t)&&e.push(t),e)}),[])}))}])(e);case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.flow)([function(e){return Object(p.omit)(e,t.removedClientIds)},function(e){return Object(p.mapValues)(e,(function(e){return p.without.apply(void 0,[e].concat(Object(ae.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 jo(t.blocks);case"RECEIVE_BLOCKS":return go({},e,{},jo(t.blocks));case"INSERT_BLOCKS":return go({},e,{},jo(t.blocks,t.rootClientId||""));case"MOVE_BLOCKS_TO_POSITION":return go({},e,{},t.clientIds.reduce((function(e,n){return e[n]=t.toRootClientId||"",e}),{}));case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":return go({},Object(p.omit)(e,t.replacedClientIds),{},jo(t.blocks,e[t.clientIds[0]]));case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":return Object(p.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?go({},e,Object(u.a)({},r,o)):e}});function Bo(){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];if(!r)return{};if(r.clientId===e.clientId)return e;var o={clientId:r.clientId};return"number"==typeof t.initialPosition&&(o.initialPosition=t.initialPosition),o}return e}var Io=Object(v.combineReducers)({blocks:wo,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},isDraggingBlocks: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!0;case"STOP_DRAGGING_BLOCKS":return!1}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},selectionStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset};case"RESET_SELECTION":return t.selectionStart;case"MULTI_SELECT":return{clientId:t.start}}return Bo(e,t)},selectionEnd:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SELECTION_CHANGE":return{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset};case"RESET_SELECTION":return t.selectionEnd;case"MULTI_SELECT":return{clientId:t.end}}return Bo(e,t)},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(e,t){return"REPLACE_BLOCKS"===t.type&&"number"==typeof t.initialPosition||"SELECT_BLOCK"===t.type?t.initialPosition:"REMOVE_BLOCKS"===t.type||"START_TYPING"===t.type?e:void 0},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 go({},e,Object(u.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(p.omit)(e,t.clientIds);case"UPDATE_BLOCK_LIST_SETTINGS":var n=t.clientId;return t.settings?Object(p.isEqual)(e[n],t.settings)?e:go({},e,Object(u.a)({},n,t.settings)):e.hasOwnProperty(n)?Object(p.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"SHOW_INSERTION_POINT":var n=t.rootClientId,r=t.index;return{rootClientId:n,index:r};case"HIDE_INSERTION_POINT":return null}return e},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 go({},e,{isValid:t.isValid})}return e},settings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:po,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return go({},e,{},t.settings)}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fo,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.name,o={name:n.name};return Object(c.isReusableBlock)(n)&&(o.ref=n.attributes.ref,r+="/"+n.attributes.ref),go({},e,{insertUsage:go({},e.insertUsage,Object(u.a)({},r,{time:t.time,count:e.insertUsage[r]?e.insertUsage[r].count+1:1,insert:o}))})}),e)}return e},lastBlockAttributesChange:function(e,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return Object(u.a)({},t.clientId,t.updates.attributes);case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce((function(e,n){return go({},e,Object(u.a)({},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: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"STOP_TYPING":return e}},highlightedBlock:function(e,t){var n=t.clientId,r=t.isHighlighted;if("TOGGLE_BLOCK_HIGHLIGHT"===t.type){if(r)return n;if(e===n)return null}return e}}),xo=n(104),Po=n.n(xo),To=n(257),No=n.n(To),Ro=n(40);function Mo(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function Ao(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:null;return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function lc(e){var t;return Or.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Mo("core/block-editor","getPreviousBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,ac(t,-1);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),zo)}function sc(e){var t;return Or.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Mo("core/block-editor","getNextBlockClientId",e);case 2:if(!(t=n.sent)){n.next=7;break}return n.next=6,ac(t);case 6:return n.abrupt("return",[t]);case 7:case"end":return n.stop()}}),Uo)}function uc(){return{type:"START_MULTI_SELECT"}}function dc(){return{type:"STOP_MULTI_SELECT"}}function bc(e,t){return{type:"MULTI_SELECT",start:e,end:t}}function fc(){return{type:"CLEAR_SELECTED_BLOCK"}}function pc(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}function mc(e,t){var n=Object(p.get)(t,["__experimentalPreferredStyleVariations","value"],{});return e.map((function(e){var t=e.name;if(!Object(c.hasBlockSupport)(t,"defaultStylePicker",!0))return e;if(!n[t])return e;var r=Object(p.get)(e,["attributes","className"]);if(null==r?void 0:r.includes("is-style-"))return e;var o=e.attributes,i=void 0===o?{}:o,a=n[t];return Vo({},e,{attributes:Vo({},i,{className:"".concat(r||""," is-style-").concat(a).trim()})})}))}function Oc(e,t,n,r){var o,c,i;return Or.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=Object(p.castArray)(e),a.t0=mc,a.t1=Object(p.castArray)(t),a.next=5,Mo("core/block-editor","getSettings");case 5:return a.t2=a.sent,t=(0,a.t0)(a.t1,a.t2),a.next=9,Mo("core/block-editor","getBlockRootClientId",Object(p.first)(e));case 9:o=a.sent,c=0;case 11:if(!(c1&&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,Mo("core/block-editor","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,Mo("core/block-editor","canInsertBlocks",e,n);case 17:if(!a.sent){a.next=21;break}return a.next=21,c;case 21:case"end":return a.stop()}}),Ko)}function yc(e){var t,n,r,o=arguments;return Or.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,kc([e],t,n,r);case 5:case"end":return c.stop()}}),Wo)}function _c(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Ec([e],t,n,r)}function Ec(e,t,n){var r,o,c,i,a,l=arguments;return Or.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return r=!(l.length>3&&void 0!==l[3])||l[3],s.t0=mc,s.t1=Object(p.castArray)(e),s.next=5,Mo("core/block-editor","getSettings");case 5:s.t2=s.sent,e=(0,s.t0)(s.t1,s.t2),o=[],c=Lo(e),s.prev=9,c.s();case 11:if((i=c.n()).done){s.next=19;break}return a=i.value,s.next=15,Mo("core/block-editor","canInsertBlockType",a.name,n);case 15:s.sent&&o.push(a);case 17:s.next=11;break;case 19:s.next=24;break;case 21:s.prev=21,s.t3=s.catch(9),c.e(s.t3);case 24:return s.prev=24,c.f(),s.finish(24);case 27:if(!o.length){s.next=29;break}return s.abrupt("return",{type:"INSERT_BLOCKS",blocks:o,index:t,rootClientId:n,time:Date.now(),updateSelection:r});case 29:case"end":return s.stop()}}),qo,null,[[9,21,24,27]])}function Sc(e,t){return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t}}function Cc(){return{type:"HIDE_INSERTION_POINT"}}function wc(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}function Bc(){return{type:"SYNCHRONIZE_TEMPLATE"}}function Ic(e,t){return{type:"MERGE_BLOCKS",blocks:[e,t]}}function xc(e){var t,n,r,o,c=arguments;return Or.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(p.castArray)(e),i.next=6,Mo("core/block-editor","getBlockRootClientId",e[0]);case 6:return n=i.sent,i.next=9,Mo("core/block-editor","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,lc(e[0]);case 15:r=i.sent,i.next=21;break;case 18:return i.next=20,Mo("core/block-editor","getPreviousBlockClientId",e[0]);case 20:r=i.sent;case 21:return i.next=23,{type:"REMOVE_BLOCKS",clientIds:e};case 23:return i.delegateYield(tc(),"t0",24);case 24:return o=i.t0,i.abrupt("return",[r||o]);case 26:case"end":return i.stop()}}),$o)}function Pc(e,t){return xc([e],t)}function Tc(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,time:Date.now()}}function Nc(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function Rc(){return{type:"START_TYPING"}}function Mc(){return{type:"STOP_TYPING"}}function Dc(){return{type:"START_DRAGGING_BLOCKS"}}function Lc(){return{type:"STOP_DRAGGING_BLOCKS"}}function Ac(){return{type:"ENTER_FORMATTED_TEXT"}}function Fc(){return{type:"EXIT_FORMATTED_TEXT"}}function Vc(e,t,n,r){return{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:r}}function Hc(e,t,n){var r=Object(c.getDefaultBlockName)();if(r)return _c(Object(c.createBlock)(r,e),n,t)}function zc(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function Uc(e){return{type:"UPDATE_SETTINGS",settings:e}}function Gc(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function Kc(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function Wc(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}function qc(){return{type:"MARK_AUTOMATIC_CHANGE"}}function $c(){var e,t=arguments;return Or.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(Fe.speak)(Object(B.__)("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(Fe.speak)(Object(B.__)("You are currently in edit mode. To return to the navigation mode, press Escape."));case 4:case"end":return n.stop()}}),Yo)}function Yc(){var e,t=arguments;return Or.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(Fe.speak)(Object(B.__)("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()}}),Xo)}function Xc(e){var t,n,r,o,i,a,l=arguments;return Or.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(t=!(l.length>1&&void 0!==l[1])||l[1],e||e.length){s.next=3;break}return s.abrupt("return");case 3:return s.next=5,Mo("core/block-editor","getBlocksByClientId",e);case 5:return n=s.sent,s.next=8,Mo("core/block-editor","getBlockRootClientId",e[0]);case 8:if(r=s.sent,!Object(p.some)(n,(function(e){return!e}))){s.next=11;break}return s.abrupt("return");case 11:if(o=n.map((function(e){return e.name})),!Object(p.some)(o,(function(e){return!Object(c.hasBlockSupport)(e,"multiple",!0)}))){s.next=14;break}return s.abrupt("return");case 14:return s.next=16,Mo("core/block-editor","getBlockIndex",Object(p.last)(Object(p.castArray)(e)),r);case 16:return i=s.sent,a=n.map((function(e){return Object(c.cloneBlock)(e)})),s.next=20,Ec(a,i+1,r,t);case 20:if(!(a.length>1&&t)){s.next=23;break}return s.next=23,bc(Object(p.first)(a).clientId,Object(p.last)(a).clientId);case 23:return s.abrupt("return",a.map((function(e){return e.clientId})));case 24:case"end":return s.stop()}}),Qo)}function Qc(e){var t,n;return Or.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,Mo("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,Mo("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,Mo("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Hc({},t,n);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Zo)}function Zc(e){var t,n;return Or.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,Mo("core/block-editor","getBlockRootClientId",e);case 4:return t=r.sent,r.next=7,Mo("core/block-editor","getTemplateLock",t);case 7:if(!r.sent){r.next=10;break}return r.abrupt("return");case 10:return r.next=12,Mo("core/block-editor","getBlockIndex",e,t);case 12:return n=r.sent,r.next=15,Hc({},t,n+1);case 15:return r.abrupt("return",r.sent);case 16:case"end":return r.stop()}}),Jo)}function Jc(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}function ei(e){return Or.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jc(e,!0);case 2:return t.next=4,{type:"SLEEP",duration:150};case 4:return t.next=6,Jc(e,!1);case 6:case"end":return t.stop()}}),ec)}function ti(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}var ni=n(42);function ri(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 oi(e){for(var t=1;t2&&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]})),Bi=Object(ni.a)((function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=wi(e,t,r);return Object(p.map)(Object(p.filter)(Object(p.map)(o,(function(t){return{id:t,name:ai(e,t)}})),{name:n}),(function(e){return e.id}))}),(function(e){return[e.blocks.parents]}));function Ii(e,t){var n,r=t;do{n=r,r=e.blocks.parents[r]}while(r);return n}function xi(e,t){for(var n,r=Ei(e),o=[].concat(Object(ae.a)(wi(e,t)),[t]),c=[].concat(Object(ae.a)(wi(e,r)),[r]),i=Math.min(o.length,c.length),a=0;a2&&void 0!==arguments[2]?arguments[2]:1;if(void 0===t&&(t=Ei(e)),void 0===t&&(t=n<0?Ai(e):Fi(e)),!t)return null;var r=Ci(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 Ti(e,t){return Pi(e,t,-1)}function Ni(e,t){return Pi(e,t,1)}function Ri(e){return e.initialPosition}var Mi=Object(ni.a)((function(e){var t=e.selectionStart,n=e.selectionEnd;if(void 0===t.clientId||void 0===n.clientId)return ii;if(t.clientId===n.clientId)return[t.clientId];var r=Ci(e,t.clientId);if(null===r)return ii;var o=Ki(e,r),c=o.indexOf(t.clientId),i=o.indexOf(n.clientId);return c>i?o.slice(i,c+1):o.slice(c,i+1)}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function Di(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?ii:Mi(e)}var Li=Object(ni.a)((function(e){var t=Di(e);return t.length?t.map((function(t){return ui(e,t)})):ii}),(function(e){return[].concat(Object(ae.a)(Mi.getDependants(e)),[e.blocks.byClientId,e.blocks.order,e.blocks.attributes])}));function Ai(e){return Object(p.first)(Di(e))||null}function Fi(e){return Object(p.last)(Di(e))||null}function Vi(e,t){return Ai(e)===t}function Hi(e,t){return-1!==Di(e).indexOf(t)}var zi=Object(ni.a)((function(e,t){for(var n=t,r=!1;n&&!r;)r=Hi(e,n=Ci(e,n));return r}),(function(e){return[e.blocks.order,e.selectionStart.clientId,e.selectionEnd.clientId]}));function Ui(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:t.clientId||null}function Gi(e){var t=e.selectionStart,n=e.selectionEnd;return t.clientId===n.clientId?null:n.clientId||null}function Ki(e,t){return e.blocks.order[t||""]||ii}function Wi(e,t,n){return Ki(e,n).indexOf(t)}function qi(e,t){var n=e.selectionStart,r=e.selectionEnd;return n.clientId===r.clientId&&n.clientId===t}function $i(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(p.some)(Ki(e,t),(function(t){return qi(e,t)||Hi(e,t)||n&&$i(e,t,n)}))}function Yi(e,t){if(!t)return!1;var n=Di(e),r=n.indexOf(t);return r>-1&&r2&&void 0!==arguments[2]?arguments[2]:null,r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(p.isBoolean)(e)?e:Object(p.isArray)(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n},o=Object(c.getBlockType)(t);if(!o)return!1;var i=va(e),a=i.allowedBlockTypes,l=r(a,t,!0);if(!l)return!1;var s=!!aa(e,n);if(s)return!1;var u=Oa(e,n),d=Object(p.get)(u,["allowedBlocks"]),b=r(d,t),f=o.parent,m=ai(e,n),O=r(f,m);return null!==b&&null!==O?b||O:null!==b?b:null===O||O},sa=Object(ni.a)(la,(function(e,t,n){return[e.blockListSettings[n],e.blocks.byClientId[n],e.settings.allowedBlockTypes,e.settings.templateLock]}));function ua(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t.every((function(t){return sa(e,ai(e,t),n)}))}function da(e,t){return Object(p.get)(e.preferences.insertUsage,[t],null)}var ba=function(e,t,n){return!!Object(c.hasBlockSupport)(t,"inserter",!0)&&la(e,t.name,n)},fa=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=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}},r=function(t){var r=t.name,o=!1;Object(c.hasBlockSupport)(t.name,"multiple",!0)||(o=Object(p.some)(Oi(e,pi(e)),{name:t.name}));var i=da(e,r)||{},a=i.time,l=i.count,s=void 0===l?0:l,u=t.variations.filter((function(e){var t=e.scope;return!t||t.includes("inserter")}));return{id:r,name:t.name,initialAttributes:{},title:t.title,description:t.description,icon:t.icon,category:t.category,keywords:t.keywords,variations:u,example:t.example,isDisabled:o,utility:1,frecency:n(a,s)}},o=function(t){var r,o="core/block/".concat(t.id),i=ja(e,t.id);1===i.length&&(r=Object(c.getBlockType)(i[0].name));var a=da(e,o)||{},l=a.time,s=a.count,u=n(l,void 0===s?0:s);return{id:o,name:"core/block",initialAttributes:{ref:t.id},title:t.title,icon:r?r.icon:ci,category:"reusable",keywords:[],isDisabled:!1,utility:1,frecency:u}},i=Object(c.getBlockTypes)().filter((function(n){return ba(e,n,t)})).map(r),a=la(e,"core/block",t)?_a(e).map(o):[];return[].concat(Object(ae.a)(i),Object(ae.a)(a))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.blocks.order,e.preferences.insertUsage,e.settings.allowedBlockTypes,e.settings.templateLock,_a(e),Object(c.getBlockTypes)()]})),pa=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object(p.some)(Object(c.getBlockTypes)(),(function(n){return ba(e,n,t)}));if(n)return!0;var r=la(e,"core/block",t)&&_a(e).length>0;return r}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,_a(e),Object(c.getBlockTypes)()]})),ma=Object(ni.a)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return Object(p.filter)(Object(c.getBlockTypes)(),(function(n){return ba(e,n,t)}))}),(function(e,t){return[e.blockListSettings[t],e.blocks.byClientId,e.settings.allowedBlockTypes,e.settings.templateLock,Object(c.getBlockTypes)()]}));function Oa(e,t){return e.blockListSettings[t]}function va(e){return e.settings}function ga(e){return e.blocks.isPersistentChange}var ha=Object(ni.a)((function(e,t){return Object(p.filter)(e.blockListSettings,(function(e,n){return t.includes(n)}))}),(function(e){return[e.blockListSettings]})),ja=Object(ni.a)((function(e,t){var n=Object(p.find)(_a(e),(function(e){return e.id===t}));return n?Object(c.parse)(n.content):null}),(function(e){return[_a(e)]}));function ka(e){return e.blocks.isIgnoredChange}function ya(e){return e.lastBlockAttributesChange}function _a(e){return Object(p.get)(e,["settings","__experimentalReusableBlocks"],ii)}function Ea(e){return e.isNavigationMode}function Sa(e){return e.hasBlockMovingClientId}function Ca(e){return!!e.automaticChangeStatus}function wa(e,t){return e.highlightedBlock===t}function Ba(e,t){return!!e.blocks.controlledInnerBlocks[t]}function Ia(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 xa(e){for(var t=1;t=b&&u<=f?u:u6||j.length>6,P=Object(d.useMemo)((function(){return Ln(j,k,y,l)}),[l,j,k,y]),T=Object(d.useMemo)((function(){return An(C,l)}),[l,C]),N=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().__experimentalSetIsInserterOpened}),[]);return Object(d.useEffect)((function(){N&&N(!1)}),[N]),Object(d.useEffect)((function(){if(l){var e=P.length+T.length,t=Object(B.sprintf)(Object(B._n)("%d result found.","%d results found.",e),e);c(t)}}),[l,c]),Object(d.createElement)("div",{className:"block-editor-inserter__quick-inserter",onKeyPress:Il,onKeyDown:Bl},x&&Object(d.createElement)(uo,{value:l,onChange:function(e){s(e)}}),Object(d.createElement)(xl,{blockTypes:P,blockPatterns:I?T:[],onSelectBlockPattern:w,onSelectBlockType:_,onHover:m}),N&&Object(d.createElement)(g.Button,{className:"block-editor-inserter__quick-inserter-expand",onClick:function(){return N(!0)},"aria-label":Object(B.__)("Browse all. This will open the main inserter panel in the editor toolbar.")},Object(B.__)("Browse all")))}));function Tl(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Nl=function(e){var t,n=e.onToggle,r=e.disabled,o=e.isOpen,c=e.blockTitle,i=e.hasSingleBlockType,a=e.toggleProps;return t=i?Object(B.sprintf)(Object(B._x)("Add %s","directly add the only allowed block"),c):Object(B._x)("Add block","Generic label for block inserter button"),Object(d.createElement)(g.Button,Object(s.a)({icon:oo.a,label:t,tooltipPosition:"bottom",onClick:n,className:"block-editor-inserter__toggle","aria-haspopup":!i&&"true","aria-expanded":!i&&o,disabled:r},a))},Rl=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Tl()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).onToggle=e.onToggle.bind(Object(Kt.a)(e)),e.renderToggle=e.renderToggle.bind(Object(Kt.a)(e)),e.renderContent=e.renderContent.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{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,u=void 0===s?Nl:s;return u({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,a=n.__experimentalSelectBlockOnInsert;return n.__experimentalIsQuick?Object(d.createElement)(Pl,{rootClientId:r,clientId:o,isAppender:c,selectBlockOnInsert:a}):Object(d.createElement)(wl,{onSelect:t,rootClientId:r,clientId:o,isAppender:c,showInserterHelpPanel:i,__experimentalSelectBlockOnInsert:a})}},{key:"render",value:function(){var e=this.props,t=e.position,n=e.hasSingleBlockType,r=e.insertOnlyAllowedBlock,o=e.__experimentalIsQuick;return n?this.renderToggle({onToggle:r}):Object(d.createElement)(g.Dropdown,{className:"block-editor-inserter",contentClassName:f()("block-editor-inserter__popover",{"is-quick":o}),position:t,onToggle:this.onToggle,expandOnMobile:!0,headerTitle:Object(B.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent})}}]),r}(d.Component),Ml=Object(m.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),c=o.getBlockRootClientId,i=o.hasInserterItems,a=o.__experimentalGetAllowedBlocks,l=o.getBlockSelectionEnd,s=e("core/blocks").getBlockVariations,u=a(r=r||c(n||l())||void 0),d=1===Object(p.size)(u)&&0===Object(p.size)(s(u[0].name,"inserter")),b=!1;return d&&(b=u[0]),{hasItems:i(r),hasSingleBlockType:d,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,i=t.isAppender,a=t.hasSingleBlockType,l=t.allowedBlockType,s=t.__experimentalSelectBlockOnInsert;if(a&&((0,e("core/block-editor").insertBlock)(Object(c.createBlock)(l.name),function(){var e=r("core/block-editor"),t=e.getBlockIndex,c=e.getBlockSelectionEnd,a=e.getBlockOrder;if(o)return t(o,n);var l=c();return!i&&l?t(l,n)+1:a(n).length}(),n,s),!s)){var u=Object(B.sprintf)(Object(B.__)("%s block added"),l.title);Object(Fe.speak)(u)}}}})),Object(m.ifCondition)((function(e){var t=e.hasItems,n=e.isAppender,r=e.rootClientId,o=e.clientId;return t||!n&&!r&&!o}))])(Rl),Dl=Object(d.forwardRef)((function(e,t){var n=e.selectedClientId,r=e.isReverse,o=e.containerRef,c=e.noCapture,i=e.hasMultiSelection,a=e.multiSelectionContainer,l=Object(v.useSelect)((function(e){return e("core/block-editor").isNavigationMode()})),s=Object(v.useDispatch)("core/block-editor").setNavigationMode;return Object(d.createElement)("div",{ref:t,tabIndex:l?void 0:"0",onFocus:function(){if(c.current)c.current=null;else if(n){var e=qe(n);if(r){var t=jr.focus.tabbable.find(e);(Object(p.last)(t)||e).focus()}else e.focus()}else{if(i)return void a.current.focus();s(!0);var l=jr.focus.tabbable.find(o.current);l.length&&(r?Object(p.last)(l).focus():Object(p.first)(l).focus())}},style:{position:"fixed"}})})),Ll=window,Al=Ll.getSelection,Fl=Ll.getComputedStyle,Vl=Object(p.overEvery)([jr.isTextField,jr.focus.tabbable.isTabbableIndex]);function Hl(e,t,n,r){var o,c=jr.focus.focusable.find(n);return t&&(c=Object(p.reverse)(c)),c=c.slice(c.indexOf(e)+1),r&&(o=e.getBoundingClientRect()),Object(p.find)(c,(function t(n,c,i){if(!jr.focus.tabbable.isTabbableIndex(n))return!1;if(r){var a=n.getBoundingClientRect();if(a.left>=o.right||a.right<=o.left)return!1}if(Object(jr.isTextField)(n))return!0;if(!n.classList.contains("block-editor-block-list__block"))return!1;if(function(e){return e.classList.contains("block-editor-block-list__layout")||!!e.querySelector(".block-editor-block-list__layout")}(n))return!0;if(n.contains(e))return!1;for(var l,s=1;(l=i[c+s])&&n.contains(l);s++)if(t(l,c+s,i))return!1;return!0}))}function zl(e){var t=e("core/block-editor"),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,d=t.isNavigationMode,b=t.hasBlockMovingClientId,f=t.getBlockIndex,p=t.getBlockRootClientId,m=t.getClientIdsOfDescendants,O=t.canInsertBlockType,v=t.getBlockName,g=t.isSelectionEnabled,h=t.getBlockSelectionStart,j=t.isMultiSelecting,k=t.getSettings,y=n(),_=r(),E=o();return{selectedBlockClientId:y,selectionStartClientId:_,selectionBeforeEndClientId:c(E||y),selectionAfterEndClientId:i(E||y),selectedFirstClientId:a(),selectedLastClientId:l(),hasMultiSelection:s(),blocks:u(),isNavigationMode:d(),hasBlockMovingClientId:b,getBlockIndex:f,getBlockRootClientId:p,getClientIdsOfDescendants:m,canInsertBlockType:O,getBlockName:v,isSelectionEnabled:g(),blockSelectionStart:h(),isMultiSelecting:j(),keepCaretInsideBlock:k().keepCaretInsideBlock}}function Ul(e){var t=e.children,n=Object(d.useRef)(),r=Object(d.useRef)(),o=Object(d.useRef)(),c=Object(d.useRef)(),i=Object(d.useRef)(),a=Object(d.useRef)(),l=Object(d.useRef)(),s=Object(v.useSelect)(zl,[]),u=s.selectedBlockClientId,b=s.selectionStartClientId,m=s.selectionBeforeEndClientId,O=s.selectionAfterEndClientId,g=s.selectedFirstClientId,h=s.selectedLastClientId,j=s.hasMultiSelection,k=s.blocks,y=s.isNavigationMode,_=s.hasBlockMovingClientId,E=s.isSelectionEnabled,S=s.blockSelectionStart,C=s.isMultiSelecting,w=s.getBlockIndex,I=s.getBlockRootClientId,x=s.getClientIdsOfDescendants,P=s.canInsertBlockType,T=s.getBlockName,N=s.keepCaretInsideBlock,R=Object(v.useDispatch)("core/block-editor"),M=R.multiSelect,D=R.selectBlock,L=R.clearSelectedBlock,A=R.setNavigationMode,F=R.setBlockMovingClientId,V=R.moveBlockToPosition,H=Object(d.useState)(!1),z=Object(le.a)(H,2),U=z[0],G=z[1];Object(d.useEffect)((function(){j&&!C&&c.current.focus()}),[j,C]);var K=f()("block-editor-writing-flow",{"is-navigate-mode":y,"is-block-moving-mode":!!_(),"can-insert-moving-block":U});return Object(d.createElement)("div",{className:K},Object(d.createElement)(Dl,{ref:r,selectedClientId:u,containerRef:n,noCapture:a,hasMultiSelection:j,multiSelectionContainer:c}),Object(d.createElement)("div",{ref:n,onKeyDown:function(e){var t=e.keyCode,s=e.target,d=t===it.UP,f=t===it.DOWN,v=t===it.LEFT,E=t===it.RIGHT,S=t===it.TAB,C=t===it.ESCAPE,B=t===it.ENTER,R=t===it.SPACE,H=d||v,z=v||E,U=d||f,K=z||U,W=e.shiftKey,q=W||e.ctrlKey||e.altKey||e.metaKey,$=U?jr.isVerticalEdge:jr.isHorizontalEdge;if(y){var Y,X=S&&W||d,Q=S&&!W||f,Z=v,J=E;if(X)Y=m;else if(Q)Y=O;else if(Z){var ee;Y=null!==(ee=I(u))&&void 0!==ee?ee:u}else if(J){var te;Y=null!==(te=x([u])[0])&&void 0!==te?te:u}var ne=_();if(ne&&Y&&G(P(T(ne),I(Y))),C&&ne&&(F(null),G(!1)),(B||R)&&ne){var re=I(ne),oe=I(u),ce=w(ne,re),ie=w(u,oe);cen}));if(r){var o=r.id.slice("block-".length);if(o){var c=r.getBoundingClientRect();e.clientX>c.right||e.clientX=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,c=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){i=!0,o=e},f:function(){try{c||null==r.return||r.return()}finally{if(i)throw o}}}}function os(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0}})),Object(v.withDispatch)((function(e,t){return{onTransform:function(n,r){e("core/block-editor").replaceBlocks(t.clientIds,Object(c.switchToBlockType)(n,r))}}})))(bs),ps=n(44);function ms(){var e=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]).getBlockName,t=Object(v.useSelect)((function(e){return e("core/blocks")}),[]).getBlockType,n=Object(v.useDispatch)("core/notices").createSuccessNotice;return Object(d.useCallback)((function(r,o){var c="";if(1===o.length){var i=o[0],a=t(e(i)).title;c="copy"===r?Object(B.sprintf)(Object(B.__)('Copied "%s" to clipboard.'),a):Object(B.sprintf)(Object(B.__)('Moved "%s" to clipboard.'),a)}else c="copy"===r?Object(B.sprintf)(Object(B.__)("Copied %d blocks to clipboard."),o.length):Object(B.sprintf)(Object(B.__)("Moved %d blocks to clipboard."),o.length);n(c,{type:"snackbar"})}),[])}var Os=function(e){var t=e.children,n=Object(d.useRef)(),r=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),o=r.getBlocksByClientId,i=r.getSelectedBlockClientIds,a=r.hasMultiSelection,l=r.getSettings,s=Object(v.useDispatch)("core/block-editor"),u=s.flashBlock,b=s.removeBlocks,f=s.replaceBlocks,m=ms(),O=l().__experimentalCanUserUseUnfilteredHTML,g=function(e){var t=i();if(0!==t.length){if(!a())if("copy"===e.type||"cut"===e.type?Object(jr.documentHasUncollapsedSelection)():Object(jr.documentHasSelection)())return;if(n.current.contains(e.target)){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===t.length&&u(t[0]),m(e.type,t);var r=o(t),l=Object(c.serialize)(r);e.clipboardData.setData("text/plain",l),e.clipboardData.setData("text/html",l)}if("cut"===e.type)b(t);else if("paste"===e.type){var s=function(e){var t=e.clipboardData,n=t.items,r=t.files;n=Object(p.isNil)(n)?[]:n,r=Object(p.isNil)(r)?[]:r;var o="",c="";try{o=t.getData("text/plain"),c=t.getData("text/html")}catch(e){try{c=t.getData("Text")}catch(e){return}}return r=Array.from(r),Array.from(n).forEach((function(e){if(e.getAsFile){var t=e.getAsFile();if(t){var n=t.name,o=t.type,c=t.size;Object(p.find)(r,{name:n,type:o,size:c})||r.push(t)}}})),(r=r.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)}))).length&&!c&&(c=r.map((function(e){return'')})).join(""),o=""),{html:c,plainText:o}}(e),d=s.plainText,v=s.html,g=Object(c.pasteHandler)({HTML:v,plainText:d,mode:"BLOCKS",canUserUseUnfilteredHTML:O});f(t,g,g.length-1,-1)}}}};return Object(d.createElement)("div",{ref:n,onCopy:g,onCut:g,onPaste:g},t)};function vs(e){var t=e.clientIds,n=e.children,r=e.__experimentalUpdateSelection,o=Object(v.useSelect)((function(e){return e("core/block-editor")}),[]),i=o.canInsertBlockType,a=o.getBlockRootClientId,l=o.getBlocksByClientId,s=o.getTemplateLock,u=Object(v.useSelect)((function(e){return e("core/blocks")}),[]),d=u.getDefaultBlockName,b=u.getGroupingBlockName,f=l(t),m=a(t[0]),O=Object(p.every)(f,(function(e){return!!e&&Object(c.hasBlockSupport)(e.name,"multiple",!0)&&i(e.name,m)})),g=i(d(),m),h=Object(v.useDispatch)("core/block-editor"),j=h.removeBlocks,k=h.replaceBlocks,y=h.duplicateBlocks,_=h.insertAfterBlock,E=h.insertBeforeBlock,S=h.flashBlock,C=h.setBlockMovingClientId,w=h.setNavigationMode,B=ms();return n({canDuplicate:O,canInsertDefaultBlock:g,isLocked:!!s(m),rootClientId:m,blocks:f,onDuplicate:function(){return y(t,r)},onRemove:function(){return j(t,r)},onInsertBefore:function(){E(Object(p.first)(Object(p.castArray)(t)))},onInsertAfter:function(){_(Object(p.last)(Object(p.castArray)(t)))},onMoveTo:function(){w(!0),C(t[0])},onGroup:function(){if(f.length){var e=b(),n=Object(c.switchToBlockType)(f,e);n&&k(t,n)}},onUngroup:function(){if(f.length){var e=f[0].innerBlocks;e.length&&k(t,e)}},onCopy:function(){var e=f.map((function(e){return e.clientId}));1===f.length&&S(e[0]),B("copy",e)}})}var gs=Object(m.compose)([Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockMode,a=r.getSettings,l=o(n),s=a().codeEditingEnabled;return{mode:i(n),blockType:l?Object(c.getBlockType)(l.name):null,isCodeEditingEnabled:s}})),Object(v.withDispatch)((function(e,t){var n=t.onToggle,r=void 0===n?p.noop:n,o=t.clientId;return{onToggleMode:function(){e("core/block-editor").toggleBlockMode(o),r()}}}))])((function(e){var t=e.blockType,n=e.mode,r=e.onToggleMode,o=e.small,i=void 0!==o&&o,a=e.isCodeEditingEnabled,l=void 0===a||a;if(!Object(c.hasBlockSupport)(t,"html",!0)||!l)return null;var s="visual"===n?Object(B.__)("Edit as HTML"):Object(B.__)("Edit visually");return Object(d.createElement)(g.MenuItem,{onClick:r},!i&&s)}));function hs(e){var t=e.shouldRender,n=e.onClick,r=e.small;if(!t)return null;var o=Object(B.__)("Convert to Blocks");return Object(d.createElement)(g.MenuItem,{onClick:n},!r&&o)}var js=Object(m.compose)(Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").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("core/block-editor").replaceBlocks(n.clientId,Object(c.rawHandler)({HTML:Object(c.getBlockContent)(n)}))}}})))(hs),ks=Object(m.compose)(Object(v.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock(n);return{block:r,shouldRender:r&&r.name===Object(c.getFreeformContentHandlerName)()}})),Object(v.withDispatch)((function(e,t){var n=t.block;return{onClick:function(){return e("core/block-editor").replaceBlocks(n.clientId,Object(c.rawHandler)({HTML:Object(c.serialize)(n)}))}}})))(hs),ys=Object(g.createSlotFill)("__experimentalBlockSettingsMenuFirstItem"),_s=ys.Fill,Es=ys.Slot;_s.Slot=Es;var Ss=_s;function Cs(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 ws(e){for(var t=1;tc){var a=Math.max(o-c-50,0),l=Math.max(i-c-50,0)/a;n.current=25*l}else if(e.clientY1,S=f()("block-editor-block-toolbar",y&&"is-showing-movers");return Object(d.createElement)("div",{className:S},Object(d.createElement)("div",{className:"block-editor-block-toolbar__mover-switcher-container",ref:O},!E&&Object(d.createElement)("div",{className:"block-editor-block-toolbar__block-parent-selector-wrapper"},Object(d.createElement)(Jl,{clientIds:r})),(_||E)&&Object(d.createElement)(As,{clientIds:r,cloneClassname:"block-editor-block-toolbar__drag-clone"},(function(e){var n=e.isDraggable,o=e.onDraggableStart,c=e.onDraggableEnd;return Object(d.createElement)("div",Object(s.a)({},j,{className:"block-editor-block-toolbar__block-switcher-wrapper",draggable:n&&!t,onDragStart:o,onDragEnd:c}),Object(d.createElement)(fs,{clientIds:r}),Object(d.createElement)(Zl,{clientIds:r}))}))),_&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(w.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"}),Object(d.createElement)(pr.Slot,{bubblesVirtually:!0,className:"block-editor-block-toolbar__slot"})),Object(d.createElement)(Rs,{clientIds:r}))}var Ws=function(e){var t=e.focusOnMount,n=Object(ke.a)(e,["focusOnMount"]),r=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockName,r=t.getSelectedBlockClientIds,o=e("core/blocks").getBlockType,c=r()[0];return{blockType:c&&o(n(c))}}),[]).blockType;return r&&!Object(c.hasBlockSupport)(r,"__experimentalToolbar",!0)?null:Object(d.createElement)("div",{className:"block-editor-block-contextual-toolbar-wrapper"},Object(d.createElement)(Yl,Object(s.a)({focusOnMount:t,className:"block-editor-block-contextual-toolbar","aria-label":Object(B.__)("Block tools")},n),Object(d.createElement)(Ks,null)))};function qs(e){var t=e("core/block-editor"),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 $s(e){var t=e.clientId,n=e.rootClientId,r=e.isValid,o=e.isEmptyDefaultBlock,c=e.capturingClientId,i=Object(v.useSelect)(qs,[]),a=i.isNavigationMode,s=i.isMultiSelecting,u=i.isTyping,b=i.isCaretWithinFormattedText,p=i.hasMultiSelection,O=i.hasFixedToolbar,h=i.lastClientId,j=Object(m.useViewportMatch)("medium"),k=Object(d.useState)(!1),y=Object(le.a)(k,2),_=y[0],E=y[1],S=Object(d.useState)(!1),C=Object(le.a)(S,2),w=C[0],B=C[1],I=Object(d.useContext)(Zs),x=!a&&o&&r,P=a,T=!a&&!O&&j&&!x&&!s&&(!u||b),N=!(a||T||O||o);if(Object(l.useShortcut)("core/block-editor/focus-toolbar",Object(d.useCallback)((function(){return E(!0)}),[]),{bindGlobal:!0,eventName:"keydown",isDisabled:!N}),!(P||T||_||x))return null;var R=I[t];if(c&&(R=document.getElementById("block-"+c)),!R)return null;var M=R;if(p){var D=I[h];if(!D)return null;M={top:R,bottom:D}}var L=x?"top left right":"top right left";return Object(d.createElement)(g.Popover,{noArrow:!0,animate:!1,position:L,focusOnMount:!1,anchorRef:M,className:"block-editor-block-list__block-popover",__unstableSticky:!x,__unstableSlotName:"block-toolbar",__unstableBoundaryParent:!0,__unstableObserveElement:R,onBlur:function(){return E(!1)},shouldAnchorIncludePadding:!0},(T||_)&&Object(d.createElement)("div",{onFocus:function(){B(!0)},onBlur:function(){B(!1)},tabIndex:-1,className:f()("block-editor-block-list__block-popover-inserter",{"is-visible":w})},Object(d.createElement)(Ml,{clientId:t,rootClientId:n,__experimentalIsQuick:!0})),(T||_)&&Object(d.createElement)(Ws,{focusOnMount:_}),P&&Object(d.createElement)(Wl,{clientId:t,rootClientId:n}),x&&Object(d.createElement)("div",{className:"block-editor-block-list__empty-block-inserter"},Object(d.createElement)(Ml,{position:"bottom right",rootClientId:n,clientId:t,__experimentalIsQuick:!0})))}function Ys(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getFirstMultiSelectedBlockClientId,o=t.getBlockRootClientId,i=t.__unstableGetBlockWithoutInnerBlocks,a=t.getBlockParents,l=t.__experimentalGetBlockListSettingsForBlocks,s=n()||r();if(s){var u,d=i(s)||{},b=d.name,f=d.attributes,m=void 0===f?{}:f,O=d.isValid,v=a(s),g=l(v),h=Object(p.findIndex)(g,["__experimentalCaptureToolbars",!0]);return-1!==h&&(u=v[h]),{clientId:s,rootClientId:o(s),name:b,isValid:O,isEmptyDefaultBlock:b&&Object(c.isUnmodifiedDefaultBlock)({name:b,attributes:m}),capturingClientId:u}}}function Xs(){var e=Object(v.useSelect)(Ys,[]);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(d.createElement)($s,{clientId:t,rootClientId:n,isValid:o,isEmptyDefaultBlock:c,capturingClientId:i}):null}var Qs=Object(d.createContext)(),Zs=Object(d.createContext)(),Js=Object(d.createContext)();function eu(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.hasMultiSelection;return{selectedBlockClientId:n(),hasMultiSelection:r()}}function tu(e){Ye(e.target)&&e.preventDefault()}var nu=Object(d.forwardRef)((function(e,t){var n=e.children,r=e.className,o=Object(v.useSelect)(eu,[]),c=o.selectedBlockClientId,i=o.hasMultiSelection,a=Object(v.useDispatch)("core/block-editor").selectBlock,l=function(e){var t=Object(v.useSelect)(no,[]),n=t.isSelectionEnabled,r=t.isMultiSelecting,o=t.multiSelectedBlockClientIds,c=t.hasMultiSelection,i=t.getBlockParents,a=t.selectedBlockClientId,l=Object(v.useDispatch)("core/block-editor"),s=l.startMultiSelect,u=l.stopMultiSelect,b=l.multiSelect,f=l.selectBlock,p=Object(d.useRef)(),m=Object(d.useRef)(),O=Object(d.useRef)();Object(d.useEffect)((function(){if(c&&!r){var e=o.length;if(!(e<2)){var t=o[0],n=o[e-1],i=qe(t),l=qe(n),s=window.getSelection(),u=document.createRange();i=to(i,"start"),l=to(l,"end"),u.setStartBefore(i),u.setEndAfter(l),s.removeAllRanges(),s.addRange(u)}}else{if(!a||r)return;var d=window.getSelection();if(d.rangeCount&&!d.isCollapsed){var b=qe(a),f=d.getRangeAt(0),p=f.startContainer,m=f.endContainer;!b||b.contains(p)&&b.contains(m)||d.removeAllRanges()}}}),[c,r,o,f,a]);var g=Object(d.useCallback)((function(t){var n=t.isSelectionEnd,r=window.getSelection();if(r.rangeCount&&!r.isCollapsed){var o=Ye(r.focusNode);if(m.current===o){if(f(o),n&&(ro(e.current,!0),r.rangeCount)){var c=r.getRangeAt(0).commonAncestorContainer;O.current.contains(c)&&O.current.focus()}}else{var a=[].concat(Object(ae.a)(i(m.current)),[m.current]),l=[].concat(Object(ae.a)(i(o)),[o]),s=Math.min(a.length,l.length)-1;b(a[s],l[s])}}else ro(e.current,!0)}),[f,i,b]),h=Object(d.useCallback)((function(){document.removeEventListener("selectionchange",g),window.removeEventListener("mouseup",h),p.current=window.requestAnimationFrame((function(){g({isSelectionEnd:!0}),u()}))}),[g,u]);return Object(d.useEffect)((function(){return function(){document.removeEventListener("selectionchange",g),window.removeEventListener("mouseup",h),window.cancelAnimationFrame(p.current)}}),[g,h]),Object(d.useCallback)((function(t){n&&(m.current=t,O.current=document.activeElement,s(),document.addEventListener("selectionchange",g),window.addEventListener("mouseup",h),ro(e.current,!1))}),[n,s,h])}(t),s=Object(d.useState)({}),u=Object(le.a)(s,2),b=u[0],p=u[1];return Object(d.createElement)(Kl,{hasMultiSelection:i,selectedBlockClientId:c,containerRef:t},Object(d.createElement)(Zs.Provider,{value:b},Object(d.createElement)(Xs,null),Object(d.createElement)("div",{ref:t,className:f()(r,"is-root-container"),onFocus:function(e){if(!i){var t=Ye(e.target);t&&t!==c&&a(t)}},onDragStart:tu},Object(d.createElement)(Js.Provider,{value:p},Object(d.createElement)(Qs.Provider,{value:l},n)))))})),ru=["p","div","h1","h2","h3","h4","h5","h6","ol","ul","li","figure","nav","pre","header","section","aside","footer","main"];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;t1,w=m||k,I=f()("block-editor-block-navigation-block__mover-cell",{"is-visible":w}),x=Ar().__experimentalFeatures,P=f()("block-editor-block-navigation-block__menu-cell",{"is-visible":w});return Object(d.useEffect)((function(){x&&n&&u.current.focus()}),[x,n]),Object(d.createElement)(Sr,{className:f()({"is-selected":n}),onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},onFocus:function(){return y(!0)},onBlur:function(){return y(!1)},level:c,position:o,rowCount:i,path:s},Object(d.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-block-navigation-block__contents-cell",colSpan:C?void 0:2,ref:u},(function(e){var a=e.ref,s=e.tabIndex,u=e.onFocus;return Object(d.createElement)("div",{className:"block-editor-block-navigation-block__contents-container"},Object(d.createElement)(Dr,{level:c,isLastRow:o===i,terminatedLevels:l}),Object(d.createElement)(ju,{block:t,onClick:function(){return r(t.clientId)},isSelected:n,position:o,siblingCount:S,level:c,ref:a,tabIndex:s,onFocus:u}))})),C&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.__experimentalTreeGridCell,{className:I,withoutGridItem:!0},Object(d.createElement)(g.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(d.createElement)(Rr,{__experimentalOrientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})),Object(d.createElement)(g.__experimentalTreeGridItem,null,(function(e){var t=e.ref,n=e.tabIndex,r=e.onFocus;return Object(d.createElement)(Mr,{__experimentalOrientation:"vertical",clientIds:[E],ref:t,tabIndex:n,onFocus:r})})))),x&&Object(d.createElement)(g.__experimentalTreeGridCell,{className:P},(function(e){var t=e.ref,n=e.tabIndex,o=e.onFocus;return Object(d.createElement)(Ns,{clientIds:[E],icon:gr.a,toggleProps:{ref:t,tabIndex:n,onFocus:o},disableOpenOnArrowDown:!0,__experimentalSelectBlock:r},(function(e){var t=e.onClose;return Object(d.createElement)(g.MenuGroup,null,Object(d.createElement)(g.MenuItem,{onClick:Object(vr.a)(Or.a.mark((function e(){return Or.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_(null);case 2:return e.next=4,_(E);case 4:t();case 5:case"end":return e.stop()}}),e)})))},Object(B.__)("Go to block")))}))})))}function yu(e){var t=e.parentBlockClientId,n=e.position,r=e.level,o=e.rowCount,c=e.terminatedLevels,i=e.path,a=Object(m.useInstanceId)(yu),l="block-navigation-appender-row__description_".concat(a),s=Object(B.sprintf)(Object(B.__)("Add block at position %1$d, Level %2$d"),n,r);return Object(d.createElement)(Sr,{level:r,position:n,rowCount:o,path:i},Object(d.createElement)(g.__experimentalTreeGridCell,{className:"block-editor-block-navigation-appender__cell",colSpan:"3"},(function(e){var i=e.ref,a=e.tabIndex,u=e.onFocus;return Object(d.createElement)("div",{className:"block-editor-block-navigation-appender__container"},Object(d.createElement)(Dr,{level:r,isLastRow:n===o,terminatedLevels:c}),Object(d.createElement)(Ml,{rootClientId:t,__experimentalSelectBlockOnInsert:!1,"aria-describedby":l,toggleProps:{ref:i,tabIndex:a,onFocus:u}}),Object(d.createElement)("div",{className:"block-editor-block-navigation-appender__description",id:l},s))})))}function _u(e){var t=e.blocks,n=e.selectBlock,r=e.selectedBlockClientId,o=e.showAppender,c=e.showBlockMovers,i=e.showNestedBlocks,a=e.parentBlockClientId,l=e.level,s=void 0===l?1:l,u=e.terminatedLevels,b=void 0===u?[]:u,f=e.path,m=void 0===f?[]:f,O=!a,v=Object(p.compact)(t),g=function(e){return o&&!O&&r===e},h=g(a),j=h?v.length+1:v.length,k=j;return Object(d.createElement)(d.Fragment,null,Object(p.map)(v,(function(e,t){var a=e.clientId,l=e.innerBlocks,u=t+1,f=j===u?[].concat(Object(ae.a)(b),[s]):b,p=[].concat(Object(ae.a)(m),[u]),O=i&&!!l&&!!l.length,v=g(a);return Object(d.createElement)(d.Fragment,{key:a},Object(d.createElement)(ku,{block:e,onClick:n,isSelected:r===a,level:s,position:u,rowCount:j,showBlockMovers:c,terminatedLevels:b,path:p}),(O||v)&&Object(d.createElement)(_u,{blocks:l,selectedBlockClientId:r,selectBlock:n,showAppender:o,showBlockMovers:c,showNestedBlocks:i,parentBlockClientId:a,level:s+1,terminatedLevels:f,path:p}))})),h&&Object(d.createElement)(yu,{parentBlockClientId:a,position:j,rowCount:k,level:s,terminatedLevels:b,path:[].concat(Object(ae.a)(m),[k])}))}function Eu(e){var t=e.__experimentalFeatures,n=Object(ke.a)(e,["__experimentalFeatures"]),r=Object(d.useMemo)((function(){return{__experimentalFeatures:t}}),[t]);return Object(d.createElement)(g.__experimentalTreeGrid,{className:"block-editor-block-navigation-tree","aria-label":Object(B.__)("Block navigation structure")},Object(d.createElement)(Lr.Provider,{value:r},Object(d.createElement)(_u,n)))}_u.defaultProps={selectBlock:function(){}};var Su=Object(m.compose)(Object(v.withSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientId,r=t.getBlockHierarchyRootClientId,o=t.getBlock,c=t.getBlocks,i=n();return{rootBlocks:c(),rootBlock:i?o(r(i)):null,selectedBlockClientId:i}})),Object(v.withDispatch)((function(e,t){var n=t.onSelect,r=void 0===n?p.noop:n;return{selectBlock:function(t){e("core/block-editor").selectBlock(t),r(t)}}})))((function(e){var t=e.rootBlock,n=e.rootBlocks,r=e.selectedBlockClientId,o=e.selectBlock,c=e.__experimentalFeatures;if(!n||0===n.length)return null;var i=t&&(t.clientId!==r||t.innerBlocks&&0!==t.innerBlocks.length);return Object(d.createElement)("div",{className:"block-editor-block-navigation__container"},Object(d.createElement)("p",{className:"block-editor-block-navigation__label"},Object(B.__)("Block navigation")),i&&Object(d.createElement)(Eu,{blocks:[t],selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c,showNestedBlocks:!0}),!i&&Object(d.createElement)(Eu,{blocks:n,selectedBlockClientId:r,selectBlock:o,__experimentalFeatures:c}))})),Cu=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Object(d.createElement)(g.Path,{d:"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"}));function wu(e){var t=e.isEnabled,n=e.onToggle,r=e.isOpen,o=e.innerRef,c=Object(ke.a)(e,["isEnabled","onToggle","isOpen","innerRef"]);Object(l.useShortcut)("core/edit-post/toggle-block-navigation",Object(d.useCallback)(n,[n]),{bindGlobal:!0,isDisabled:!t});var i=Object(v.useSelect)((function(e){return e("core/keyboard-shortcuts").getShortcutRepresentation("core/edit-post/toggle-block-navigation")}),[]);return Object(d.createElement)(g.Button,Object(s.a)({},c,{ref:o,icon:Cu,"aria-expanded":r,onClick:t?n:void 0,label:Object(B.__)("Block navigation"),className:"block-editor-block-navigation",shortcut:i,"aria-disabled":!t}))}var Bu=Object(d.forwardRef)((function(e,t){var n=e.isDisabled,r=e.__experimentalFeatures,o=Object(ke.a)(e,["isDisabled","__experimentalFeatures"]),c=Object(v.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[])&&!n;return Object(d.createElement)(g.Dropdown,{contentClassName:"block-editor-block-navigation__popover",position:"bottom right",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(d.createElement)(wu,Object(s.a)({},o,{innerRef:t,isOpen:n,onToggle:r,isEnabled:c}))},renderContent:function(e){var t=e.onClose;return Object(d.createElement)(Su,{onSelect:t,__experimentalFeatures:r})}})})),Iu=n(119),xu=[it.rawShortcut.primary("z"),it.rawShortcut.primaryShift("z"),it.rawShortcut.primary("y")],Pu=Object(d.createElement)(g.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.fromPairs)(xu.map((function(e){return[e,function(e){return e.preventDefault()}]})))}),Tu=function(){return Pu};function Nu(e){return e.filter((function(e){var t=e.type;return/^image\/(?:jpe?g|png|gif)$/.test(t)})).map((function(e){return'')})).join("")}var Ru={position:"bottom right",isAlternate:!0},Mu=function(){return Object(d.createElement)("div",{className:"block-editor-format-toolbar"},Object(d.createElement)(g.ToolbarGroup,null,["bold","italic","link","text-color"].map((function(e){return Object(d.createElement)(g.Slot,{name:"RichText.ToolbarControls.".concat(e),key:e})})),Object(d.createElement)(g.Slot,{name:"RichText.ToolbarControls"},(function(e){return 0!==e.length&&Object(d.createElement)(g.__experimentalToolbarItem,null,(function(t){return Object(d.createElement)(g.DropdownMenu,{icon:Ir.a,label:Object(B.__)("More rich text controls"),toggleProps:t,controls:Object(p.orderBy)(e.map((function(e){return Object(le.a)(e,1)[0].props})),"title"),popoverProps:Ru})}))}))))},Du=function(e){var t=e.inline,n=e.anchorRef;return t?Object(d.createElement)(g.Popover,{noArrow:!0,position:"top center",focusOnMount:!1,anchorRef:n,className:"block-editor-rich-text__inline-format-toolbar"},Object(d.createElement)(Mu,null)):Object(d.createElement)(pr,null,Object(d.createElement)(Mu,null))};function Lu(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 Au(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function Fu(e){var t=e.allowedFormats,n=e.formattingControls;return e.disableFormats?Fu.EMPTY_ARRAY:t||n?t||(ir()("wp.blockEditor.RichText formattingControls prop",{alternative:"allowedFormats"}),n.map((function(e){return"core/".concat(e)}))):void 0}Fu.EMPTY_ARRAY=[];var Vu=Object(d.forwardRef)((function e(t,n){var r=t.children,o=t.tagName,a=t.value,l=t.onChange,b=t.isSelected,p=t.multiline,O=t.inlineToolbar,g=t.wrapperClassName,h=t.className,j=t.autocompleters,y=t.onReplace,_=t.placeholder,E=t.keepPlaceholderOnFocus,S=t.allowedFormats,C=t.formattingControls,w=t.withoutInteractiveFormatting,B=t.onRemove,I=t.onMerge,x=t.onSplit,P=t.__unstableOnSplitAtEnd,T=t.__unstableOnSplitMiddle,N=t.identifier,R=t.start,M=t.reversed,D=t.style,L=t.preserveWhiteSpace,A=t.__unstableEmbedURLOnPaste,F=t.__unstableDisableFormats,V=t.disableLineBreaks,H=Object(ke.a)(t,["children","tagName","value","onChange","isSelected","multiline","inlineToolbar","wrapperClassName","className","autocompleters","onReplace","placeholder","keepPlaceholderOnFocus","allowedFormats","formattingControls","withoutInteractiveFormatting","onRemove","onMerge","onSplit","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","start","reversed","style","preserveWhiteSpace","__unstableEmbedURLOnPaste","__unstableDisableFormats","disableLineBreaks"]),z=Object(m.useInstanceId)(e);N=N||z;var U=Object(d.useRef)(),G=n||U,K=k(),W=K.clientId,q=K.onCaretVerticalPositionChange,$=K.isSelected,Y=Object(v.useSelect)((function(e){var t,n=e("core/block-editor"),r=n.isCaretWithinFormattedText,o=n.getSelectionStart,i=n.getSelectionEnd,a=n.getSettings,l=n.didAutomaticChange,s=n.__unstableGetBlockWithoutInnerBlocks,f=n.isMultiSelecting,p=n.hasMultiSelection,m=o(),O=i(),v=a().__experimentalUndo;void 0===b?t=m.clientId===W&&m.attributeKey===N:b&&(t=m.clientId===W);var g={};if("native"===d.Platform.OS){var h=W&&s(W);g={shouldBlurOnUnmount:h&&t&&Object(c.isUnmodifiedDefaultBlock)(h)}}return function(e){for(var t=1;t0,me=a,Oe=l;Array.isArray(a)&&(me=c.children.toHTML(a),Oe=function(e){return l(c.children.fromDOM(Object(i.__unstableCreateElement)(document,e).childNodes))});var ve=Object(d.useCallback)((function(e,t){ue(W,N,e,t)}),[W,N]),ge=Object(d.useCallback)((function(e){var t=e.value,n=e.isReverse;I&&I(!n),B&&Object(i.isEmpty)(t)&&n&&B(!n)}),[I,B]),he=Object(d.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(y&&x){var n=[],r=Object(i.split)(e),o=Object(le.a)(r,2),c=o[0],a=o[1],l=t.length>0,s=-1;l&&Object(i.isEmpty)(c)||(n.push(x(Object(i.toHTMLString)({value:c,multilineTag:be}))),s+=1),l?(n.push.apply(n,Object(ae.a)(t)),s+=t.length):T&&n.push(T()),(l||T)&&Object(i.isEmpty)(a)||n.push(x(Object(i.toHTMLString)({value:a,multilineTag:be})));var u=l?s:1,d=l?-1:null;y(n,u,d)}}),[y,x,be,T]),je=Object(d.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.shiftKey,o=y&&x;if(y){var a=Object(c.getBlockTransforms)("from").filter((function(e){return"enter"===e.type})),l=Object(c.findTransform)(a,(function(e){return e.regExp.test(t.text)}));l&&(y([l.transform({content:t.text})]),de())}if(p)r?V||n(Object(i.insert)(t,"\n")):o&&Object(i.__unstableIsEmptyLine)(t)?he(t):n(Object(i.__unstableInsertLineSeparator)(t));else{var s=t.text,u=t.start,d=t.end,b=P&&u===d&&d===s.length;r||!o&&!b?V||n(Object(i.insert)(t,"\n")):!o&&b?P():o&&he(t)}}),[y,x,de,p,he,P]),ye=Object(d.useCallback)((function(e){var t=e.value,n=e.onChange,r=e.html,a=e.plainText,l=e.files,s=e.activeFormats;if(l&&l.length&&!r){var u=Object(c.pasteHandler)({HTML:Nu(l),mode:"BLOCKS",tagName:o});return window.console.log("Received items:\n\n",l),void(y&&Object(i.isEmpty)(t)?y(u):he(t,u))}var d,b=y&&x?"AUTO":"INLINE";"AUTO"===b&&Object(i.isEmpty)(t)&&(d=a,Object(Iu.regexp)(".*").test(d))&&(b="BLOCKS"),A&&Object(i.isEmpty)(t)&&Object(vl.isURL)(a.trim())&&(b="BLOCKS");var f=Object(c.pasteHandler)({HTML:r,plainText:a,mode:b,tagName:o});if("string"==typeof f){var m=Object(i.create)({html:f});if(s.length)for(var O=m.formats.length;O--;)m.formats[O]=[].concat(Object(ae.a)(s),Object(ae.a)(m.formats[O]||[]));p&&(m=Object(i.replace)(m,/\n+/g,i.__UNSTABLE_LINE_SEPARATOR)),n(Object(i.insert)(t,m))}else f.length>0&&(y&&Object(i.isEmpty)(t)?y(f,f.length-1,-1):he(t,f))}),[o,y,x,he,A,p]),_e=Object(d.useCallback)((function(e,t){if(y){var n=e.start,r=e.text;if(" "===r.slice(n-1,n)){var o=r.slice(0,n).trim(),a=Object(c.getBlockTransforms)("from").filter((function(e){return"prefix"===e.type})),l=Object(c.findTransform)(a,(function(e){var t=e.prefix;return o===t}));if(l){var s=t(Object(i.slice)(e,n,r.length)),u=l.transform(s);y([u]),de()}}}}),[y,de]),Ee=Object(d.createElement)(i.__experimentalRichText,Object(s.a)({},H,{clientId:W,identifier:N,ref:G,value:me,onChange:Oe,selectionStart:Q,selectionEnd:Z,onSelectionChange:ve,tagName:o,className:f()("block-editor-rich-text__editable",h,{"keep-placeholder-on-focus":E}),placeholder:_,allowedFormats:fe,withoutInteractiveFormatting:w,onEnter:je,onDelete:ge,onPaste:ye,__unstableIsSelected:J,__unstableInputRule:_e,__unstableMultilineTag:be,__unstableIsCaretWithinFormattedText:X,__unstableOnEnterFormattedText:ie,__unstableOnExitFormattedText:se,__unstableOnCreateUndoLevel:ce,__unstableMarkAutomaticChange:de,__unstableDidAutomaticChange:ee,__unstableUndo:ne,__unstableDisableFormats:F,style:D,preserveWhiteSpace:L,disabled:te,start:R,reversed:M,onCaretVerticalPositionChange:q,blockIsSelected:void 0!==b?b:$,shouldBlurOnUnmount:re}),(function(e){var t=e.isSelected,n=e.value,o=e.onChange,c=e.onFocus,i=e.editableProps,a=e.editableTagName;return Object(d.createElement)(d.Fragment,null,r&&r({value:n,onChange:o,onFocus:c}),t&&pe&&Object(d.createElement)(Du,{inline:O,anchorRef:G.current}),t&&Object(d.createElement)(Tu,null),Object(d.createElement)($n,{onReplace:y,completers:j,record:n,onChange:o,isSelected:t},(function(e){var t=e.listBoxId,n=e.activeId,r=e.onKeyDown;return Object(d.createElement)(a,Object(s.a)({},i,{"aria-autocomplete":t?"list":void 0,"aria-owns":t,"aria-activedescendant":n,start:R,reversed:M,onKeyDown:function(e){r(e),i.onKeyDown(e)}}))})))}));return g?(ir()("wp.blockEditor.RichText wrapperClassName prop",{alternative:"className prop or create your own wrapper div"}),Object(d.createElement)("div",{className:f()("block-editor-rich-text",g)},Ee)):Ee}));Vu.Content=function(e){var t=e.value,n=e.tagName,r=e.multiline,o=Object(ke.a)(e,["value","tagName","multiline"]);Array.isArray(t)&&(t=c.children.toHTML(t));var i=Au(r);!t&&i&&(t="<".concat(i,">"));var a=Object(d.createElement)(d.RawHTML,null,t);return n?Object(d.createElement)(n,Object(p.omit)(o,["format"]),a):a},Vu.isEmpty=function(e){return!e||0===e.length},Vu.Content.defaultProps={format:"string",value:""};var Hu=Vu;function zu(e){var t=e.value,n=e.onChange;return Object(d.createElement)(hu,null,Object(d.createElement)(Hu,{value:t,onChange:n,placeholder:Object(B.__)("Navigation item"),keepPlaceholderOnFocus:!0,withoutInteractiveFormatting:!0,allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"]}))}var Uu=n(294);var Gu=function(e){var t=e.icon,n=void 0===t?Uu.a:t,r=e.label,o=void 0===r?Object(B.__)("Choose variation"):r,c=e.instructions,i=void 0===c?Object(B.__)("Select a variation to start with."):c,a=e.variations,l=e.onSelect,s=e.allowSkip,u=f()("block-editor-block-variation-picker",{"has-many-variations":a.length>4});return Object(d.createElement)(g.Placeholder,{icon:n,label:o,instructions:i,className:u},Object(d.createElement)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":Object(B.__)("Block variations")},a.map((function(e){return Object(d.createElement)("li",{key:e.name},Object(d.createElement)(g.Button,{isSecondary:!0,icon:e.icon,iconSize:48,onClick:function(){return l(e)},className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),Object(d.createElement)("span",{className:"block-editor-block-variation-picker__variation-label",role:"presentation"},e.title))}))),s&&Object(d.createElement)("div",{className:"block-editor-block-variation-picker__skip"},Object(d.createElement)(g.Button,{isLink:!0,onClick:function(){return l()}},Object(B.__)("Skip"))))},Ku=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(g.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),Wu=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(g.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"}));function qu(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 $u={top:{icon:Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(g.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),title:Object(B._x)("Vertically Align Top","Block vertical alignment setting")},center:{icon:Wu,title:Object(B._x)("Vertically Align Middle","Block vertical alignment setting")},bottom:{icon:Ku,title:Object(B._x)("Vertically Align Bottom","Block vertical alignment setting")}},Yu=["top","center","bottom"],Xu={isAlternate:!0};var Qu=function(e){var t=e.value,n=e.onChange,r=e.controls,o=void 0===r?Yu:r,c=e.isCollapsed,i=void 0===c||c,a=$u[t],l=$u.top;return Object(d.createElement)(g.ToolbarGroup,{popoverProps:Xu,isCollapsed:i,icon:a?a.icon:l.icon,label:Object(B._x)("Change vertical alignment","Block vertical alignment setting label"),controls:o.map((function(e){return function(e){for(var t=1;t0&&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(vl.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(B.sprintf)(Object(B._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(B.__)("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 it.UP:e.stopPropagation(),e.preventDefault();var a=r?r-1:o.length-1;this.setState({selectedSuggestion:a});break;case it.DOWN:e.stopPropagation(),e.preventDefault();var l=null===r||r===o.length-1?0:r+1;this.setState({selectedSuggestion:l});break;case it.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak(Object(B.__)("Link selected.")));break;case it.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectLink(i))}}else switch(e.keyCode){case it.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case it.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(){var e=this,t=this.props,n=t.label,r=t.instanceId,o=t.className,c=t.isFullWidth,i=t.__experimentalRenderSuggestions,a=t.placeholder,l=void 0===a?Object(B.__)("Paste URL or type to search"):a,u=t.value,b=void 0===u?"":u,m=t.autoFocus,O=void 0===m||m,v=t.__experimentalShowInitialSuggestions,h=void 0!==v&&v,j=this.state,k=j.showSuggestions,y=j.suggestions,_=j.selectedSuggestion,E=j.loading,S="url-input-control-".concat(r),C="block-editor-url-input-suggestions-".concat(r),w="block-editor-url-input-suggestion-".concat(r),I={id:C,ref:this.autocompleteRef,role:"listbox"},x=function(t,n){return{role:"option",tabIndex:"-1",id:"".concat(w,"-").concat(n),ref:e.bindSuggestionNode(n),"aria-selected":n===_}};return Object(d.createElement)(g.BaseControl,{label:n,id:S,className:f()("block-editor-url-input",o,{"is-full-width":c})},Object(d.createElement)("input",{className:"block-editor-url-input__input",autoFocus:O,type:"text","aria-label":Object(B.__)("URL"),required:!0,value:b,onChange:this.onChange,onFocus:this.onFocus,onInput:wd,placeholder:l,onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":k,"aria-autocomplete":"list","aria-owns":C,"aria-activedescendant":null!==_?"".concat(w,"-").concat(_):void 0,ref:this.inputRef}),E&&Object(d.createElement)(g.Spinner,null),Object(p.isFunction)(i)&&k&&!!y.length&&i({suggestions:y,selectedSuggestion:_,suggestionsListProps:I,buildSuggestionItemProps:x,isLoading:E,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:h&&!(b&&b.length)}),!Object(p.isFunction)(i)&&k&&!!y.length&&Object(d.createElement)(g.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},Object(d.createElement)("div",Object(s.a)({},I,{className:f()("block-editor-url-input__suggestions","".concat(o,"__suggestions"))}),y.map((function(t,n){return Object(d.createElement)(g.Button,Object(s.a)({},x(0,n),{key:t.id,className:f()("block-editor-url-input__suggestion",{"is-selected":n===_}),onClick:function(){return e.handleOnClick(t)}}),t.title)})))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r=e.disableSuggestions,o=e.__experimentalShowInitialSuggestions,c=void 0!==o&&o,i=t.showSuggestions,a=n&&n.length;return c||a||(i=!1),!0===r&&(i=!1),{showSuggestions:i}}}]),r}(d.Component),Id=Object(m.compose)(m.withSafeTimeout,g.withSpokenMessages,m.withInstanceId,Object(v.withSelect)((function(e,t){if(!Object(p.isFunction)(t.__experimentalFetchLinkSuggestions))return{__experimentalFetchLinkSuggestions:(0,e("core/block-editor").getSettings)().__experimentalFetchLinkSuggestions}})))(Bd),xd=function(e){var t=e.placeholder,n=e.value,r=e.onChange,o=e.onSelect,c=e.renderSuggestions,i=e.fetchSuggestions,a=e.showInitialSuggestions,l=e.errorMessage,s=Object(d.useState)(),u=Object(le.a)(s,2),b=u[0],f=u[1];return Object(d.createElement)("form",{onSubmit:function(e){e.preventDefault(),o(b||{url:n})}},Object(d.createElement)("div",{className:"block-editor-link-control__search-input-wrapper"},Object(d.createElement)(Id,{className:"block-editor-link-control__search-input",value:n,onChange:function(e,t){r(e),f(t)},placeholder:null!=t?t:Object(B.__)("Search or type url"),__experimentalRenderSuggestions:c,__experimentalFetchLinkSuggestions:i,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:a}),Object(d.createElement)("div",{className:"block-editor-link-control__search-actions"},Object(d.createElement)(g.Button,{type:"submit",label:Object(B.__)("Submit"),icon:_d.a,className:"block-editor-link-control__search-submit"}))),l&&Object(d.createElement)(g.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1},l))},Pd=function(e){var t=e.searchTerm,n=e.onClick,r=e.itemProps,o=e.isSelected;return t?Object(d.createElement)(g.Button,Object(s.a)({},r,{className:f()("block-editor-link-control__search-create block-editor-link-control__search-item",{"is-selected":o}),onClick:n}),Object(d.createElement)(g.Icon,{className:"block-editor-link-control__search-item-icon",icon:"insert"}),Object(d.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(d.createElement)("span",{className:"block-editor-link-control__search-item-title"},Object(d.createInterpolateElement)(Object(B.sprintf)(Object(B.__)("New page: %s"),t),{mark:Object(d.createElement)("mark",null)})))):null};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;t1&&void 0!==arguments[1]?arguments[1]:{};T(!1);var n=Nd({},t);delete n.type,delete n.id,c(Nd({},n,{},e))};return Object(d.createElement)("div",{tabIndex:-1,ref:y,className:"block-editor-link-control"},M&&Object(d.createElement)("div",{className:"block-editor-link-control__loading"},Object(d.createElement)(g.Spinner,null)," ",Object(B.__)("Creating"),"…"),(P||!n)&&!M&&Object(d.createElement)(xd,{placeholder:t,value:C,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";w(e)},onSelect:function(){var e=Object(vr.a)(Or.a.mark((function e(t){return Or.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("__CREATE__"!==t.type){e.next=5;break}return e.next=3,Y(C);case 3:e.next=6;break;case 5:(!a||Object.keys(t).length>1)&&(X(t,n),W());case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),renderSuggestions:u?function(e){var t=e.suggestionsListProps,r=e.buildSuggestionItemProps,o=e.suggestions,i=e.selectedSuggestion,a=e.isLoading,l=e.isInitialSuggestions,u=f()("block-editor-link-control__search-results",{"is-loading":a}),b=["url","mailto","tel","internal"],p=1===o.length&&b.includes(o[0].type.toLowerCase()),m=h&&!p&&!l,O="block-editor-link-control-search-results-label-".concat(_),v=l?Object(B.__)("Recently updated"):Object(B.sprintf)(Object(B.__)('Search results for "%s"'),C),j=Object(d.createElement)(l?d.Fragment:g.VisuallyHidden,{},Object(d.createElement)("span",{className:"block-editor-link-control__search-results-label",id:O},v));return Object(d.createElement)("div",{className:"block-editor-link-control__search-results-wrapper"},j,Object(d.createElement)("div",Object(s.a)({},t,{className:u,"aria-labelledby":O}),o.map((function(e,t){return m&&"__CREATE__"===e.type?Object(d.createElement)(Pd,{searchTerm:C,onClick:Object(vr.a)(Or.a.mark((function t(){return Or.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y(e.title);case 2:case"end":return t.stop()}}),t)}))),key:e.type,itemProps:r(e,t),isSelected:t===i}):"__CREATE__"===e.type?null:Object(d.createElement)(yd,{key:"".concat(e.id,"-").concat(e.type),itemProps:r(e,t),suggestion:e,index:t,onClick:function(){W(),c(Nd({},n,{},e))},isSelected:t===i,isURL:b.includes(e.type.toLowerCase()),searchTerm:C})}))))}:null,fetchSuggestions:$,showInitialSuggestions:b,errorMessage:F}),n&&!P&&!M&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)("div",{"aria-label":Object(B.__)("Currently selected"),"aria-selected":"true",className:f()("block-editor-link-control__search-item",{"is-current":!0})},Object(d.createElement)("span",{className:"block-editor-link-control__search-item-header"},Object(d.createElement)(g.ExternalLink,{className:"block-editor-link-control__search-item-title",href:n.url},n&&n.title||U),n&&n.title&&Object(d.createElement)("span",{className:"block-editor-link-control__search-item-info"},U)),Object(d.createElement)(g.Button,{isSecondary:!0,onClick:function(){return T(!0)},className:"block-editor-link-control__search-item-action"},Object(B.__)("Edit")),Object(d.createElement)(Md,{fillProps:n}))),Object(d.createElement)(jd,{value:n,settings:r,onChange:c}))}Ad.ViewerFill=Dd;var Fd=Ad,Vd=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(d.createElement)(I.Path,{d:"M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z"})),Hd=n(198),zd=Object(g.withFilters)("editor.MediaUpload")((function(){return null}));var Ud=Object(v.withSelect)((function(e){return{hasUploadPermissions:!!(0,e("core/block-editor").getSettings)().mediaUpload}}))((function(e){var t=e.hasUploadPermissions,n=e.fallback,r=void 0===n?null:n,o=e.children;return t?o:r})),Gd=Object(m.compose)([Object(v.withDispatch)((function(e){var t=e("core/notices");return{createNotice:t.createNotice,removeNotice:t.removeNotice}})),Object(g.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,l=void 0===a?p.noop:a,s=e.name,u=void 0===s?Object(B.__)("Replace"):s,b=e.createNotice,f=e.removeNotice,m=Object(d.useState)(t),O=Object(le.a)(m,2),h=O[0],j=O[1],k=Object(v.useSelect)((function(e){return e("core/block-editor").getSettings().mediaUpload}),[]),y=Object(d.createRef)(),_=Object(p.uniqueId)("block-editor/media-replace-flow/error-notice/"),E=function(e){var t=document.createElement("div");t.innerHTML=Object(d.renderToString)(e);var n=t.textContent||t.innerText||"";setTimeout((function(){b("error",n,{speak:!0,id:_,isDismissible:!0})}),1e3)},S=function(e){c(e),j(e.url),Object(Fe.speak)(Object(B.__)("The media file has been replaced")),f(_)},C=function(e){e.keyCode===it.DOWN&&(e.preventDefault(),e.stopPropagation(),e.target.click())};return Object(d.createElement)(g.Dropdown,{popoverProps:{isAlternate:!0},contentClassName:"block-editor-media-replace-flow__options",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(g.ToolbarGroup,{className:"media-replace-flow"},Object(d.createElement)(g.ToolbarButton,{ref:y,"aria-expanded":t,onClick:n,onKeyDown:C},u))},renderContent:function(e){e.onClose;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu"},Object(d.createElement)(zd,{value:n,onSelect:function(e){return S(e)},allowedTypes:r,render:function(e){var t=e.open;return Object(d.createElement)(g.MenuItem,{icon:Vd,onClick:t},Object(B.__)("Open Media Library"))}}),Object(d.createElement)(Ud,null,Object(d.createElement)(g.FormFileUpload,{onChange:function(e){!function(e){var t=e.target.files;l(t);k({allowedTypes:r,filesList:t,onFileChange:function(e){var t=Object(le.a)(e,1)[0];S(t)},onError:E})}(e)},accept:o,render:function(e){var t=e.openFileDialog;return Object(d.createElement)(g.MenuItem,{icon:Hd.a,onClick:function(){t()}},Object(B.__)("Upload"))}}))),i&&Object(d.createElement)("form",{className:"block-editor-media-flow__url-input",onKeyDown:function(e){e.stopPropagation()},onKeyPress:function(e){e.stopPropagation()}},Object(d.createElement)("span",{className:"block-editor-media-replace-flow__image-url-label"},Object(B.__)("Current media URL:")),Object(d.createElement)(Fd,{value:{url:h},settings:[],showSuggestions:!1,onChange:function(e){var t=e.url;j(t),i(t),y.current.focus()}})))}})})),Kd=n(295);function Wd(e){var t=e.url,n=e.urlLabel,r=e.className,o=f()(r,"block-editor-url-popover__link-viewer-url");return t?Object(d.createElement)(g.ExternalLink,{className:o,href:t},n||Object(vl.filterURLForDisplay)(Object(vl.safeDecodeURI)(t))):Object(d.createElement)("span",{className:o})}function qd(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var $d=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(qd()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).toggleSettingsVisibility=e.toggleSettingsVisibility.bind(Object(Kt.a)(e)),e.state={isSettingsExpanded:!1},e}return Object(Gt.a)(r,[{key:"toggleSettingsVisibility",value:function(){this.setState({isSettingsExpanded:!this.state.isSettingsExpanded})}},{key:"render",value:function(){var e=this.props,t=e.additionalControls,n=e.children,r=e.renderSettings,o=e.position,c=void 0===o?"bottom center":o,i=e.focusOnMount,a=void 0===i?"firstElement":i,l=Object(ke.a)(e,["additionalControls","children","renderSettings","position","focusOnMount"]),u=this.state.isSettingsExpanded,b=!!r&&u;return Object(d.createElement)(g.Popover,Object(s.a)({className:"block-editor-url-popover",focusOnMount:a,position:c},l),Object(d.createElement)("div",{className:"block-editor-url-popover__input-container"},Object(d.createElement)("div",{className:"block-editor-url-popover__row"},n,!!r&&Object(d.createElement)(g.Button,{className:"block-editor-url-popover__settings-toggle",icon:Ir.a,label:Object(B.__)("Link settings"),onClick:this.toggleSettingsVisibility,"aria-expanded":u})),b&&Object(d.createElement)("div",{className:"block-editor-url-popover__row block-editor-url-popover__settings"},r())),t&&!b&&Object(d.createElement)("div",{className:"block-editor-url-popover__additional-controls"},t))}}]),r}(d.Component);$d.LinkEditor=function(e){var t=e.autocompleteRef,n=e.className,r=e.onChangeInputValue,o=e.value,c=Object(ke.a)(e,["autocompleteRef","className","onChangeInputValue","value"]);return Object(d.createElement)("form",Object(s.a)({className:f()("block-editor-url-popover__link-editor",n)},c),Object(d.createElement)(Id,{value:o,onChange:r,autocompleteRef:t}),Object(d.createElement)(g.Button,{icon:_d.a,label:Object(B.__)("Apply"),type:"submit"}))},$d.LinkViewer=function(e){var t=e.className,n=e.linkClassName,r=e.onEditLinkClick,o=e.url,c=e.urlLabel,i=Object(ke.a)(e,["className","linkClassName","onEditLinkClick","url","urlLabel"]);return Object(d.createElement)("div",Object(s.a)({className:f()("block-editor-url-popover__link-viewer",t)},i),Object(d.createElement)(Wd,{url:o,urlLabel:c,className:n}),r&&Object(d.createElement)(g.Button,{icon:Kd.a,label:Object(B.__)("Edit"),onClick:r}))};var Yd=$d;function Xd(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Qd=function(e){var t=e.src,n=e.onChange,r=e.onSubmit,o=e.onClose;return Object(d.createElement)(Yd,{onClose:o},Object(d.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:r},Object(d.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":Object(B.__)("URL"),placeholder:Object(B.__)("Paste or type URL"),onChange:n,value:t}),Object(d.createElement)(g.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:_d.a,label:Object(B.__)("Apply"),type:"submit"})))},Zd=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Xd()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).state={src:"",isURLInputVisible:!1},e.onChangeSrc=e.onChangeSrc.bind(Object(Kt.a)(e)),e.onSubmitSrc=e.onSubmitSrc.bind(Object(Kt.a)(e)),e.onUpload=e.onUpload.bind(Object(Kt.a)(e)),e.onFilesUpload=e.onFilesUpload.bind(Object(Kt.a)(e)),e.openURLInput=e.openURLInput.bind(Object(Kt.a)(e)),e.closeURLInput=e.closeURLInput.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{key:"onlyAllowsImages",value:function(){var e=this.props.allowedTypes;return!!e&&Object(p.every)(e,(function(e){return"image"===e||Object(p.startsWith)(e,"image/")}))}},{key:"componentDidMount",value:function(){this.setState({src:Object(p.get)(this.props.value,["src"],"")})}},{key:"componentDidUpdate",value:function(e){Object(p.get)(e.value,["src"],"")!==Object(p.get)(this.props.value,["src"],"")&&this.setState({src:Object(p.get)(this.props.value,["src"],"")})}},{key:"onChangeSrc",value:function(e){this.setState({src:e.target.value})}},{key:"onSubmitSrc",value:function(e){e.preventDefault(),this.state.src&&this.props.onSelectURL&&(this.props.onSelectURL(this.state.src),this.closeURLInput())}},{key:"onUpload",value:function(e){this.onFilesUpload(e.target.files)}},{key:"onFilesUpload",value:function(e){var t,n=this,r=this.props,o=r.addToGallery,c=r.allowedTypes,i=r.mediaUpload,a=r.multiple,l=r.onError,s=r.onSelect,u=r.onFilesPreUpload;if((void 0===u?p.noop:u)(e),a)if(o){var d=[];t=function(e){var t=(n.props.value||[]).filter((function(e){return e.id?!d.some((function(t){var n=t.id;return Number(n)===Number(e.id)})):!d.some((function(t){var n=t.urlSlug;return e.url.includes(n)}))}));s(t.concat(e)),d=e.map((function(e){var t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else t=s;else t=function(e){var t=Object(le.a)(e,1)[0];return s(t)};i({allowedTypes:c,filesList:e,onFileChange:t,onError:l})}},{key:"openURLInput",value:function(){this.setState({isURLInputVisible:!0})}},{key:"closeURLInput",value:function(){this.setState({isURLInputVisible:!1})}},{key:"renderPlaceholder",value:function(e,t){var n=this.props,r=n.allowedTypes,o=void 0===r?[]:r,c=n.className,i=n.icon,a=n.isAppender,l=n.labels,s=void 0===l?{}:l,u=n.onDoubleClick,b=n.mediaPreview,p=n.notices,m=n.onSelectURL,O=n.mediaUpload,v=n.children,h=s.instructions,j=s.title;if(O||m||(h=Object(B.__)("To edit this block, you need permission to upload media.")),void 0===h||void 0===j){var k=1===o.length,y=k&&"audio"===o[0],_=k&&"image"===o[0],E=k&&"video"===o[0];void 0===h&&O&&(h=Object(B.__)("Upload a media file or pick one from your media library."),y?h=Object(B.__)("Upload an audio file, pick one from your media library, or add one with a URL."):_?h=Object(B.__)("Upload an image file, pick one from your media library, or add one with a URL."):E&&(h=Object(B.__)("Upload a video file, pick one from your media library, or add one with a URL."))),void 0===j&&(j=Object(B.__)("Media"),y?j=Object(B.__)("Audio"):_?j=Object(B.__)("Image"):E&&(j=Object(B.__)("Video")))}var S=f()("block-editor-media-placeholder",c,{"is-appender":a});return Object(d.createElement)(g.Placeholder,{icon:i,label:j,instructions:h,className:S,notices:p,onClick:t,onDoubleClick:u,preview:b},e,v)}},{key:"renderDropZone",value:function(){var e=this.props,t=e.disableDropZone,n=e.onHTMLDrop,r=void 0===n?p.noop:n;return t?null:Object(d.createElement)(g.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:r})}},{key:"renderCancelLink",value:function(){var e=this.props.onCancel;return e&&Object(d.createElement)(g.Button,{className:"block-editor-media-placeholder__cancel-button",title:Object(B.__)("Cancel"),isLink:!0,onClick:e},Object(B.__)("Cancel"))}},{key:"renderUrlSelectionUI",value:function(){if(!this.props.onSelectURL)return null;var e=this.state,t=e.isURLInputVisible,n=e.src;return Object(d.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},Object(d.createElement)(g.Button,{className:"block-editor-media-placeholder__button",onClick:this.openURLInput,isPressed:t,isTertiary:!0},Object(B.__)("Insert from URL")),t&&Object(d.createElement)(Qd,{src:n,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput}))}},{key:"renderMediaUploadChecked",value:function(){var e=this,t=this.props,n=t.accept,r=t.addToGallery,o=t.allowedTypes,c=void 0===o?[]:o,i=t.isAppender,a=t.mediaUpload,l=t.multiple,s=void 0!==l&&l,u=t.onSelect,b=t.value,m=void 0===b?{}:b,O=Object(d.createElement)(zd,{addToGallery:r,gallery:s&&this.onlyAllowsImages(),multiple:s,onSelect:u,allowedTypes:c,value:Object(p.isArray)(m)?m.map((function(e){return e.id})):m.id,render:function(e){var t=e.open;return Object(d.createElement)(g.Button,{isTertiary:!0,onClick:function(e){e.stopPropagation(),t()}},Object(B.__)("Media Library"))}});if(a&&i)return Object(d.createElement)(d.Fragment,null,this.renderDropZone(),Object(d.createElement)(g.FormFileUpload,{onChange:this.onUpload,accept:n,multiple:s,render:function(t){var n=t.openFileDialog,r=Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.Button,{isPrimary:!0,className:f()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button")},Object(B.__)("Upload")),O,e.renderUrlSelectionUI(),e.renderCancelLink());return e.renderPlaceholder(r,n)}}));if(a){var v=Object(d.createElement)(d.Fragment,null,this.renderDropZone(),Object(d.createElement)(g.FormFileUpload,{isPrimary:!0,className:f()("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onChange:this.onUpload,accept:n,multiple:s},Object(B.__)("Upload")),O,this.renderUrlSelectionUI(),this.renderCancelLink());return this.renderPlaceholder(v)}return this.renderPlaceholder(O)}},{key:"render",value:function(){var e=this.props,t=e.disableMediaButtons,n=e.dropZoneUIOnly;return n||t?(n&&ir()("wp.blockEditor.MediaPlaceholder dropZoneUIOnly prop",{alternative:"disableMediaButtons"}),Object(d.createElement)(Ud,null,this.renderDropZone())):Object(d.createElement)(Ud,{fallback:this.renderPlaceholder(this.renderUrlSelectionUI())},this.renderMediaUploadChecked())}}]),r}(d.Component),Jd=Object(v.withSelect)((function(e){return{mediaUpload:(0,e("core/block-editor").getSettings)().mediaUpload}})),eb=Object(m.compose)(Jd,Object(g.withFilters)("editor.MediaPlaceholder"))(Zd),tb=Object(d.forwardRef)((function(e,t){return Object(d.createElement)(Hu,Object(s.a)({ref:t},e,{__unstableDisableFormats:!0,preserveWhiteSpace:!0}))}));tb.Content=function(e){var t=e.value,n=void 0===t?"":t,r=e.tagName,o=void 0===r?"div":r,c=Object(ke.a)(e,["value","tagName"]);return Object(d.createElement)(o,c,n)};var nb=tb,rb=Object(d.forwardRef)((function(e,t){var n=e.__experimentalVersion,r=Object(ke.a)(e,["__experimentalVersion"]);if(2===n)return Object(d.createElement)(nb,Object(s.a)({ref:t},r));var o=r.className,c=r.onChange,i=Object(ke.a)(r,["className","onChange"]);return Object(d.createElement)(Jr.a,Object(s.a)({ref:t,className:f()("block-editor-plain-text",o),onChange:function(e){return c(e.target.value)}},i))}));function ob(e){var t=e.property,n=e.viewport,r=e.desc,o=Object(m.useInstanceId)(ob),c=r||Object(B.sprintf)(Object(B._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(d.createElement)(d.Fragment,null,Object(d.createElement)("span",{"aria-describedby":"rbc-desc-".concat(o)},n.label),Object(d.createElement)(g.VisuallyHidden,{as:"span",id:"rbc-desc-".concat(o)},c))}var cb=function(e){var t=e.title,n=e.property,r=e.toggleLabel,o=e.onIsResponsiveChange,c=e.renderDefaultControl,i=e.renderResponsiveControls,a=e.isResponsive,l=void 0!==a&&a,s=e.defaultLabel,u=void 0===s?{id:"all",label:Object(B.__)("All")}:s,b=e.viewports,p=void 0===b?[{id:"small",label:Object(B.__)("Small screens")},{id:"medium",label:Object(B.__)("Medium screens")},{id:"large",label:Object(B.__)("Large screens")}]:b;if(!t||!n||!c)return null;var m=r||Object(B.sprintf)(Object(B.__)("Use the same %s on all screensizes."),n),O=Object(B.__)("Toggle between using the same value for all screen sizes or using a unique value per screen size."),v=c(Object(d.createElement)(ob,{property:n,viewport:u}),u);return Object(d.createElement)("fieldset",{className:"block-editor-responsive-block-control"},Object(d.createElement)("legend",{className:"block-editor-responsive-block-control__title"},t),Object(d.createElement)("div",{className:"block-editor-responsive-block-control__inner"},Object(d.createElement)(g.ToggleControl,{className:"block-editor-responsive-block-control__toggle",label:m,checked:!l,onChange:o,help:O}),Object(d.createElement)("div",{className:f()("block-editor-responsive-block-control__group",{"is-responsive":l})},!l&&v,l&&(i?i(p):p.map((function(e){return Object(d.createElement)(d.Fragment,{key:e.id},c(Object(d.createElement)(ob,{property:n,viewport:e}),e))}))))))};function ib(e){var t=e.character,n=e.type,r=e.onUse;return Object(m.useKeyboardShortcut)(it.rawShortcut[n](t),(function(){return r(),!1}),{bindGlobal:!0}),null}function ab(e){var t,n=e.name,r=e.shortcutType,o=e.shortcutCharacter,c=Object(ke.a)(e,["name","shortcutType","shortcutCharacter"]),i="RichText.ToolbarControls";return n&&(i+=".".concat(n)),r&&o&&(t=it.displayShortcut[r](o)),Object(d.createElement)(g.Fill,{name:i},Object(d.createElement)(g.ToolbarButton,Object(s.a)({},c,{shortcut:t})))}function lb(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var sb=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(lb()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).onInput=e.onInput.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{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}}]),r}(d.Component),ub=n(296),db=Object(d.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(d.createElement)(g.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"}));var bb=Object(d.forwardRef)((function(e,t){var n=Object(v.useSelect)((function(e){return e("core/block-editor").isNavigationMode()}),[]),r=Object(v.useDispatch)("core/block-editor").setNavigationMode,o=function(e){r("edit"!==e)};return Object(d.createElement)(g.Dropdown,{renderToggle:function(r){var o=r.isOpen,c=r.onToggle;return Object(d.createElement)(g.Button,Object(s.a)({},e,{ref:t,icon:n?db:ub.a,"aria-expanded":o,onClick:c,label:Object(B.__)("Tools")}))},position:"bottom right",renderContent:function(){return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.NavigableMenu,{role:"menu","aria-label":Object(B.__)("Tools")},Object(d.createElement)(g.MenuItemsChoice,{value:n?"select":"edit",onSelect:o,choices:[{value:"edit",label:Object(d.createElement)(d.Fragment,null,ub.a,Object(B.__)("Edit"))},{value:"select",label:Object(d.createElement)(d.Fragment,null,db,Object(B.__)("Select"))}]})),Object(d.createElement)("div",{className:"block-editor-tool-selector__help"},Object(B.__)("Tools offer different interactions for block selection & editing. To select, press Escape, to go back to editing, press Enter.")))}})})),fb=n(174),pb=Object(d.createElement)(I.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(d.createElement)(I.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"}));function mb(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Ob=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(mb()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).toggle=e.toggle.bind(Object(Kt.a)(e)),e.submitLink=e.submitLink.bind(Object(Kt.a)(e)),e.state={expanded:!1},e}return Object(Gt.a)(r,[{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(B.__)("Edit link"):Object(B.__)("Insert link");return Object(d.createElement)("div",{className:"block-editor-url-input__button"},Object(d.createElement)(g.Button,{icon:fb.a,label:o,onClick:this.toggle,className:"components-toolbar__control",isPressed:!!t}),r&&Object(d.createElement)("form",{className:"block-editor-url-input__button-modal",onSubmit:this.submitLink},Object(d.createElement)("div",{className:"block-editor-url-input__button-modal-line"},Object(d.createElement)(g.Button,{className:"block-editor-url-input__back",icon:pb,label:Object(B.__)("Close"),onClick:this.toggle}),Object(d.createElement)(Id,{value:t||"",onChange:n}),Object(d.createElement)(g.Button,{icon:_d.a,label:Object(B.__)("Submit"),type:"submit"}))))}}]),r}(d.Component),vb=n(147),gb=["noreferrer","noopener"],hb=Object(d.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(g.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),Object(d.createElement)(g.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(d.createElement)(g.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),jb=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,l=e.linkTarget,s=e.linkClass,u=e.rel,b=Object(d.useState)(!1),f=Object(le.a)(b,2),m=f[0],O=f[1],v=Object(d.useCallback)((function(){O(!0)})),h=Object(d.useState)(!1),j=Object(le.a)(h,2),k=j[0],y=j[1],_=Object(d.useState)(null),E=Object(le.a)(_,2),S=E[0],C=E[1],w=Object(d.useRef)(null),I=function(e){e.stopPropagation()},x=function(e){[it.LEFT,it.DOWN,it.RIGHT,it.UP,it.BACKSPACE,it.ENTER].indexOf(e.keyCode)>-1&&e.stopPropagation()},P=Object(d.useCallback)((function(){"media"!==t&&"attachment"!==t||C(""),y(!0)})),T=Object(d.useCallback)((function(){y(!1)})),N=Object(d.useCallback)((function(){C(null),T(),O(!1)})),R=function(e){var t=e;return void 0===e||Object(p.isEmpty)(t)||Object(p.isEmpty)(t)||(Object(p.each)(gb,(function(e){var n=new RegExp("\\b"+e+"\\b","gi");t=t.replace(n,"")})),t!==e&&(t=t.trim()),Object(p.isEmpty)(t)&&(t=void 0)),t},M=Object(d.useCallback)((function(){return function(e){var t=w.current;t&&t.contains(e.target)||(O(!1),C(null),T())}})),D=Object(d.useCallback)((function(){return function(e){S&&n({href:S}),T(),C(null),e.preventDefault()}})),L=Object(d.useCallback)((function(){n({linkDestination:"none",href:""})})),A=function(){return[{linkDestination:"media",title:Object(B.__)("Media File"),url:"image"===c?i:void 0,icon:hb},{linkDestination:"attachment",title:Object(B.__)("Attachment Page"),url:"image"===c?a:void 0,icon:Object(d.createElement)(g.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(g.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),Object(d.createElement)(g.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"}))}]},F=Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.ToggleControl,{label:Object(B.__)("Open in new tab"),onChange:function(e){var t=function(e){var t=e?"_blank":void 0;return{linkTarget:t,rel:t||u?R(u):void 0}}(e);n(t)},checked:"_blank"===l}),Object(d.createElement)(g.TextControl,{label:Object(B.__)("Link Rel"),value:R(u)||"",onChange:function(e){n({rel:e})},onKeyPress:I,onKeyDown:x}),Object(d.createElement)(g.TextControl,{label:Object(B.__)("Link CSS Class"),value:s||"",onKeyPress:I,onKeyDown:x,onChange:function(e){n({linkClass:e})}})),V=null!==S?S:r,H=(Object(p.find)(A(),["linkDestination",t])||{}).title;return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.ToolbarButton,{icon:fb.a,className:"components-toolbar__control",label:r?Object(B.__)("Edit link"):Object(B.__)("Insert link"),"aria-expanded":m,onClick:v}),m&&Object(d.createElement)(Yd,{onFocusOutside:M(),onClose:N,renderSettings:function(){return F},additionalControls:!V&&Object(d.createElement)(g.NavigableMenu,null,Object(p.map)(A(),(function(e){return Object(d.createElement)(g.MenuItem,{key:e.linkDestination,icon:e.icon,onClick:function(){var t,r,o;C(null),t=e.url,o=A(),r=t?(Object(p.find)(o,(function(e){return e.url===t}))||{linkDestination:"custom"}).linkDestination:"none",n({linkDestination:r,href:t}),T()}},e.title)})))},(!r||k)&&Object(d.createElement)(Yd.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:V,onChangeInputValue:C,onKeyDown:x,onKeyPress:I,onSubmit:D(),autocompleteRef:w}),r&&!k&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(Yd.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",onKeyPress:I,url:r,onEditLinkClick:P,urlLabel:H}),Object(d.createElement)(g.Button,{icon:vb.a,label:Object(B.__)("Remove link"),onClick:L}))))},kb=n(148);function yb(e){var t=e.children,n=e.className,r=e.isEnabled,o=void 0===r||r,c=e.deviceType,i=e.setDeviceType;return Object(d.createElement)(g.Dropdown,{className:"block-editor-post-preview__dropdown",contentClassName:f()(n,"block-editor-post-preview__dropdown-content"),popoverProps:{role:"menu"},position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(d.createElement)(g.Button,{isTertiary:!0,onClick:n,className:"block-editor-post-preview__button-toggle","aria-expanded":t,disabled:!o},Object(B.__)("Preview"))},renderContent:function(){return Object(d.createElement)(d.Fragment,null,Object(d.createElement)(g.MenuGroup,null,Object(d.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Desktop")},icon:"Desktop"===c&&kb.a},Object(B.__)("Desktop")),Object(d.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Tablet")},icon:"Tablet"===c&&kb.a},Object(B.__)("Tablet")),Object(d.createElement)(g.MenuItem,{className:"block-editor-post-preview__button-resize",onClick:function(){return i("Mobile")},icon:"Mobile"===c&&kb.a},Object(B.__)("Mobile"))),t)}})}var _b=n(259),Eb=/\((min|max)-width:[^\(]*?\)/g;function Sb(e){return!!e.media&&!!e.media.mediaText.match(Eb)}function Cb(e,t,n){e.deleteRule(n),e.insertRule(t,n)}function wb(e,t){return e.replace(Eb,(function(e){return Object(_b.match)(e,{type:"screen",width:t})?"(min-width:0px)":"(min-width:999999px)"}))}function Bb(e,t){Object(d.useEffect)((function(){if(t){var n="undefined"==typeof window?[]:Object(p.filter)(Object(p.get)(window,["document","styleSheets"],[]),(function(e){return!!e.href&&Object(vl.getProtocol)(e.href)===window.location.protocol&&Object(vl.getAuthority)(e.href)===window.location.host})),r=[];return n.forEach((function(n,o){for(var c=!1,i=0;i0,selectedBlockName:l,selectedBlockClientId:a,blockType:s}}))((function(e){var t=e.blockType,n=e.count,r=e.hasBlockStyles,o=e.selectedBlockClientId,i=e.selectedBlockName,a=e.showNoBlockSelectedMessage,l=void 0===a||a;if(n>1)return Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(Tb,null),Object(d.createElement)(We.Slot,{bubblesVirtually:!0}));var s=i===Object(c.getUnregisteredTypeHandlerName)();return t&&o&&!s?Object(d.createElement)("div",{className:"block-editor-block-inspector"},Object(d.createElement)(bo,{blockType:t}),r&&Object(d.createElement)("div",null,Object(d.createElement)(g.PanelBody,{title:Object(B.__)("Styles")},Object(d.createElement)(is,{clientId:o}),Object(c.hasBlockSupport)(t.name,"defaultStylePicker",!0)&&Object(d.createElement)(Nb,{blockName:t.name}))),Object(d.createElement)(We.Slot,{bubblesVirtually:!0}),Object(d.createElement)("div",null,Object(d.createElement)(Rb,{slotName:ee.slotName})),Object(d.createElement)(xb,{key:"back"})):l?Object(d.createElement)("span",{className:"block-editor-block-inspector__no-blocks"},Object(B.__)("No block selected.")):null}));function Db(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var Lb=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(Db()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).bindContainer=e.bindContainer.bind(Object(Kt.a)(e)),e.clearSelectionIfFocusTarget=e.clearSelectionIfFocusTarget.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{key:"bindContainer",value:function(e){this.container=e}},{key:"clearSelectionIfFocusTarget",value:function(e){var t=this.props,n=t.hasSelectedBlock,r=t.hasMultiSelection,o=t.clearSelectedBlock,c=n||r;e.target===this.container&&c&&o()}},{key:"render",value:function(){return Object(d.createElement)("div",Object(s.a)({tabIndex:-1,onFocus:this.clearSelectionIfFocusTarget,ref:this.bindContainer},Object(p.omit)(this.props,["clearSelectedBlock","hasSelectedBlock","hasMultiSelection"])))}}]),r}(d.Component),Ab=Object(m.compose)([Object(v.withSelect)((function(e){var t=e("core/block-editor"),n=t.hasSelectedBlock,r=t.hasMultiSelection;return{hasSelectedBlock:n(),hasMultiSelection:r()}})),Object(v.withDispatch)((function(e){return{clearSelectedBlock:e("core/block-editor").clearSelectedBlock}}))])(Lb),Fb=n(260),Vb=n.n(Fb),Hb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zb=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=[];for(f(),p(n);e.length&&"}"!==e.charAt(0)&&(t=S()||C());)!1!==t&&(n.push(t),p(n));return n}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 O(){var e=b(/^([^{]+)/);if(e)return Ub(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 v(){var e=c(),t=b(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){if(t=Ub(t[0]),!b(/^:\s*/))return l("property missing ':'");var n=b(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:t.replace(Hb,""),value:n?Ub(n[0]).replace(Hb,""):""});return b(/^[;\s]*/),r}}function g(){var e,t=[];if(!s())return l("missing '{'");for(p(t);e=v();)!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,k=E("import"),y=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 S(){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=Ub(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:Ub(t[1]),media:Ub(t[2])})}()||function(){var e=c(),t=b(/^@supports *([^{]+)/);if(t){var n=Ub(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 '}'")}}()||k()||y()||_()||function(){var e=c(),t=b(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Ub(t[1]),r=Ub(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=O()||[];if(!s())return l("@page missing '{'");for(var n,r=p();n=v();)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=v();)n.push(t),n=n.concat(p());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function C(){var e=c(),t=O();return t?(p(),e({type:"rule",selectors:t,declarations:g()})):l("selector 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(Ro.a)(i)&&e(i,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((j=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:j,parsingErrors:a}}))};function Ub(e){return e?e.replace(/^\s+|\s+$/g,""):""}var Gb=n(159),Kb=n.n(Gb),Wb=qb;function qb(e){this.options=e||{}}qb.prototype.emit=function(e){return e},qb.prototype.visit=function(e){return this[e.type](e)},qb.prototype.mapVisit=function(e,t){var n="";t=t||"";for(var r=0,o=e.length;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){return"rule"===n.type?cf({},n,{selectors:n.selectors.map((function(n){return t.includes(n.trim())?n:n.match(af)?n.replace(/^(body|html|:root)/,e):e+" "+n}))}):n}},sf=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object(p.map)(e,(function(e){var n=e.css,r=e.baseURL,o=[];return t&&o.push(lf(t)),r&&o.push(rf(r)),o.length?Zb(n,Object(m.compose)(o)):n}))};var uf=function(e){var t=e.styles;return Object(d.useEffect)((function(){var e=sf(t,".editor-styles-wrapper"),n=Object(p.map)(Object(p.compact)(e),(function(e){var t=document.createElement("style");return t.innerHTML=e,document.body.appendChild(t),t}));return function(){return n.forEach((function(e){return document.body.removeChild(e)}))}}),[t]),null};var df=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.__experimentalSelectBlockOnInsert,l=e.onSelect,s=void 0===l?p.noop:l,u=Object(v.useSelect)((function(e){var r=e("core/block-editor").getBlockRootClientId;return t||r(n)||void 0}),[n,t]);return Object(d.createElement)(wl,{onSelect:s,rootClientId:u,clientId:n,isAppender:r,showInserterHelpPanel:o,showMostUsedBlocks:i,__experimentalSelectBlockOnInsert:a})};function bf(){var e=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getSelectedBlockClientIds,r=t.getBlockOrder,o=t.getBlockRootClientId,c=n(),i=Object(le.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)("core/block-editor"),c=o.duplicateBlocks,i=o.removeBlocks,a=o.insertAfterBlock,s=o.insertBeforeBlock,u=o.multiSelect,b=o.clearSelectedBlock,f=o.moveBlocksUp,m=o.moveBlocksDown;return Object(l.useShortcut)("core/block-editor/move-up",Object(d.useCallback)((function(e){e.preventDefault(),f(t,r)}),[t,f]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/move-down",Object(d.useCallback)((function(e){e.preventDefault(),m(t,r)}),[t,m]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/duplicate",Object(d.useCallback)((function(e){e.preventDefault(),c(t)}),[t,c]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/remove",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-after",Object(d.useCallback)((function(e){e.preventDefault(),a(Object(p.last)(t))}),[t,a]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/insert-before",Object(d.useCallback)((function(e){e.preventDefault(),s(Object(p.first)(t))}),[t,s]),{bindGlobal:!0,isDisabled:0===t.length}),Object(l.useShortcut)("core/block-editor/delete-multi-selection",Object(d.useCallback)((function(e){e.preventDefault(),i(t)}),[t,i]),{isDisabled:t.length<1}),Object(l.useShortcut)("core/block-editor/select-all",Object(d.useCallback)((function(e){e.preventDefault(),u(Object(p.first)(n),Object(p.last)(n))}),[n,u])),Object(l.useShortcut)("core/block-editor/unselect",Object(d.useCallback)((function(e){e.preventDefault(),b(),window.getSelection().removeAllRanges()}),[t,b]),{isDisabled:t.length<2}),null}bf.Register=function(){var e=Object(v.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(d.useEffect)((function(){e({name:"core/block-editor/duplicate",category:"block",description:Object(B.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:Object(B.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/insert-before",category:"block",description:Object(B.__)("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(B.__)("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(B.__)("Remove multiple selected blocks."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:Object(B.__)("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(B.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:Object(B.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:Object(B.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:Object(B.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}})}),[e]),null};var ff=bf;function pf(){var e=Object(v.useSelect)((function(e){var t=e("core/block-editor"),n=t.getBlockSelectionEnd,r=t.hasMultiSelection,o=t.isMultiSelecting;return{selectionEnd:n(),isMultiSelection:r(),isMultiSelecting:o()}}),[]),t=e.isMultiSelection,n=e.selectionEnd,r=e.isMultiSelecting;return Object(d.useEffect)((function(){if(n&&!r&&t){var e=qe(n);if(e){var o=Object(jr.getScrollContainer)(e);o&&Sd()(e,o,{onlyScrollIfNeeded:!0})}}}),[t,n,r]),null}var mf=[it.UP,it.RIGHT,it.DOWN,it.LEFT,it.ENTER,it.BACKSPACE];var Of=Object(m.withSafeTimeout)((function(e){var t=e.children,n=e.setTimeout,r=Object(d.useRef)(),o=Object(d.useRef)(),c=Object(v.useSelect)((function(e){return e("core/block-editor").isTyping()})),i=Object(v.useDispatch)("core/block-editor"),a=i.startTyping,l=i.stopTyping;function s(e){var t=e?"addEventListener":"removeEventListener";document[t]("selectionchange",b),document[t]("mousemove",u)}function u(e){var t=e.clientX,n=e.clientY;if(o.current){var r=o.current,c=r.clientX,i=r.clientY;c===t&&i===n||l()}o.current={clientX:t,clientY:n}}function b(){var e=window.getSelection();e.rangeCount>0&&e.getRangeAt(0).collapsed||l()}function f(e){var t=e.type,n=e.target;!c&&Object(jr.isTextField)(n)&&r.current.contains(n)&&("keydown"!==t||function(e){var t=e.keyCode;return!e.shiftKey&&mf.includes(t)}(e))&&a()}return Object(d.useEffect)((function(){return s(c),function(){return s(!1)}}),[c]),Object(d.createElement)("div",{ref:r,onFocus:function(e){var t=e.target;n((function(){c&&!Object(jr.isTextField)(t)&&l()}))},onKeyPress:f,onKeyDown:Object(p.over)([f,function(e){!c||e.keyCode!==it.ESCAPE&&e.keyCode!==it.TAB||l()}])},t)}));function vf(){return ir()("PreserveScrollInReorder component",{hint:"This behavior is now built-in the block list"}),null}function gf(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}var hf=-1!==window.navigator.userAgent.indexOf("Trident"),jf=new Set([it.UP,it.DOWN,it.LEFT,it.RIGHT]),kf=function(e){Object($t.a)(r,e);var t,n=(t=r,function(){var e,n=Object(qt.a)(t);if(gf()){var r=Object(qt.a)(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return Object(Wt.a)(this,e)});function r(){var e;return Object(Ut.a)(this,r),(e=n.apply(this,arguments)).ref=Object(d.createRef)(),e.onKeyDown=e.onKeyDown.bind(Object(Kt.a)(e)),e.addSelectionChangeListener=e.addSelectionChangeListener.bind(Object(Kt.a)(e)),e.computeCaretRectOnSelectionChange=e.computeCaretRectOnSelectionChange.bind(Object(Kt.a)(e)),e.maintainCaretPosition=e.maintainCaretPosition.bind(Object(Kt.a)(e)),e.computeCaretRect=e.computeCaretRect.bind(Object(Kt.a)(e)),e.onScrollResize=e.onScrollResize.bind(Object(Kt.a)(e)),e.isSelectionEligibleForScroll=e.isSelectionEligibleForScroll.bind(Object(Kt.a)(e)),e}return Object(Gt.a)(r,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScrollResize,!0),window.addEventListener("resize",this.onScrollResize,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this.onScrollResize,!0),window.removeEventListener("resize",this.onScrollResize,!0),document.removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.onScrollResize.rafId&&window.cancelAnimationFrame(this.onScrollResize.rafId),this.onKeyDown.rafId&&window.cancelAnimationFrame(this.onKeyDown.rafId)}},{key:"computeCaretRect",value:function(){this.isSelectionEligibleForScroll()&&(this.caretRect=Object(jr.computeCaretRect)())}},{key:"computeCaretRectOnSelectionChange",value:function(){document.removeEventListener("selectionchange",this.computeCaretRectOnSelectionChange),this.computeCaretRect()}},{key:"onScrollResize",value:function(){var e=this;this.onScrollResize.rafId||(this.onScrollResize.rafId=window.requestAnimationFrame((function(){e.computeCaretRect(),delete e.onScrollResize.rafId})))}},{key:"isSelectionEligibleForScroll",value:function(){return this.props.selectedBlockClientId&&this.ref.current.contains(document.activeElement)&&document.activeElement.isContentEditable}},{key:"isLastEditableNode",value:function(){var e=this.ref.current.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===document.activeElement}},{key:"maintainCaretPosition",value:function(e){var t=e.keyCode;if(this.isSelectionEligibleForScroll()){var n=Object(jr.computeCaretRect)();if(n)if(this.caretRect)if(jf.has(t))this.caretRect=n;else{var r=n.top-this.caretRect.top;if(0!==r){var o=Object(jr.getScrollContainer)(this.ref.current);if(o){var c=o===document.body,i=c?window.scrollY:o.scrollTop,a=c?0:o.getBoundingClientRect().top,l=c?this.caretRect.top/window.innerHeight:(this.caretRect.top-a)/(window.innerHeight-a);if(0===i&&l<.75&&this.isLastEditableNode())this.caretRect=n;else{var s=c?window.innerHeight:o.clientHeight;this.caretRect.top+this.caretRect.height>a+s||this.caretRect.top1&&(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,r,l),d=!0,b="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=T(n),{ok:d,format:e.format||b,r:s(255,u(t.r,0)),g:s(255,u(t.g,0)),b:s(255,u(t.b,0)),a:n}}(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>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=[D(l(e).toString(16)),D(l(t).toString(16)),D(l(n).toString(16)),D(A(r))];if(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))return c[0].charAt(0)+c[1].charAt(0)+c[2].charAt(0)+c[3].charAt(0);return 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="#"+O(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+O(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(k,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(v,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(w,arguments)},triad:function(){return this._applyCombination(S,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]:L(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=b.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=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;sl&&(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 R(e){return s(1,u(0,e))}function M(e){return parseInt(e,16)}function D(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function A(e){return o.round(255*parseFloat(e)).toString(16)}function F(e){return M(e)/255}var V,H,z,U=(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 G(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=b:void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r)}(Math)},6:function(e,t){!function(){e.exports=this.wp.primitives}()},62:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},72:function(e,t){!function(){e.exports=this.wp.viewport}()},8:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t