!function(){var e={77:function(e){"use strict";var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,o=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,s="";function u(e){return e?e.replace(c,s):s}e.exports=function(e,c){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];c=c||{};var p=1,d=1;function m(e){var t=e.match(o);t&&(p+=t.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function f(){var e={line:p,column:d};return function(t){return t.position=new b(e),g(),t}}function b(e){this.start=e,this.end={line:p,column:d},this.source=c.source}function y(t){var o=new Error(c.source+":"+p+":"+d+": "+t);if(o.reason=t,o.filename=c.source,o.line=p,o.column=d,o.source=e,!c.silent)throw o}function h(t){var o=t.exec(e);if(o){var n=o[0];return m(n),e=e.slice(n.length),o}}function g(){h(n)}function _(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var o=2;s!=e.charAt(o)&&("*"!=e.charAt(o)||"/"!=e.charAt(o+1));)++o;if(o+=2,s===e.charAt(o-1))return y("End of comment missing");var n=e.slice(2,o-2);return d+=2,m(n),e=e.slice(o),d+=2,t({type:"comment",comment:n})}}function k(){var e=f(),o=h(r);if(o){if(v(),!h(l))return y("property missing ':'");var n=h(i),c=e({type:"declaration",property:u(o[0].replace(t,s)),value:n?u(n[0].replace(t,s)):s});return h(a),c}}return b.prototype.content=e,g(),function(){var e,t=[];for(_(t);e=k();)!1!==e&&(t.push(e),_(t));return t}()}},112:function(e){var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},o=Object.keys(t).join("|"),n=new RegExp(o,"g"),r=new RegExp(o,"");function l(e){return t[e]}var i=function(e){return e.replace(n,l)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i},133:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let o=null;if(!e||"string"!=typeof e)return o;const n=(0,r.default)(e),l="function"==typeof t;return n.forEach(e=>{if("declaration"!==e.type)return;const{property:n,value:r}=e;l?t(n,r,e):r&&(o=o||{},o[n]=r)}),o};const r=n(o(77))},141:function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var l=o(413),i=o(957);r(o(957),t);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,o){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(o=t,t=a),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:a,this.elementCB=null!=o?o:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var o=this.options.xmlMode?l.ElementType.Tag:void 0,n=new i.Element(e,t,void 0,o);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===l.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var o=new i.Text(e);this.addNode(o),this.lastNode=o}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===l.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var o=new i.ProcessingInstruction(e,t);this.addNode(o)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],o=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),o&&(e.prev=o,o.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},151:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],o=0;o<e.length;o++)t.push(255&e.charCodeAt(o));return t},bytesToString:function(e){for(var t=[],o=0;o<e.length;o++)t.push(String.fromCharCode(e[o]));return t.join("")}}};e.exports=t},206:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},210:function(e,t,o){"use strict";function n(e,t,o,n,r,l,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{r[e]=new n(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{r[e]=new n(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{r[e]=new n(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{r[e]=new n(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{r[e]=new n(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{r[e]=new n(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{r[e]=new n(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{r[e]=new n(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{r[e]=new n(e,5,!1,e.toLowerCase(),null,!1,!1)});const l=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(l,i);r[t]=new n(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(l,i);r[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(l,i);r[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{r[e]=new n(e,1,!1,e.toLowerCase(),null,!1,!1)});r.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{r[e]=new n(e,1,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:a,SAME:c,possibleStandardNames:s}=o(811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(s).reduce((e,t)=>{const o=s[t];return o===c?e[t]=t:o===a?e[t.toLowerCase()]=t:e[t]=o,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},229:function(e,t,o){"use strict";var n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(o(133)),r=o(917);function l(e,t){var o={};return e&&"string"==typeof e?((0,n.default)(e,function(e,n){e&&n&&(o[(0,r.camelCase)(e,t)]=n)}),o):o}l.default=l,e.exports=l},252:function(e){"use strict";e.exports=function e(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var n,r,l;if(Array.isArray(t)){if((n=t.length)!=o.length)return!1;for(r=n;0!==r--;)if(!e(t[r],o[r]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],o.get(r[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((n=t.length)!=o.length)return!1;for(r=n;0!==r--;)if(t[r]!==o[r])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if((n=(l=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(r=n;0!==r--;)if(!Object.prototype.hasOwnProperty.call(o,l[r]))return!1;for(r=n;0!==r--;){var i=l[r];if(!e(t[i],o[i]))return!1}return!0}return t!=t&&o!=o}},270:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")},308:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,o){void 0===o&&(o={});for(var n=[],r="function"==typeof o.replace,s=o.transform||i.returnFirstArg,u=o.library||a,p=u.cloneElement,d=u.createElement,m=u.isValidElement,f=t.length,b=0;b<f;b++){var y=t[b];if(r){var h=o.replace(y,b);if(m(h)){f>1&&(h=p(h,{key:h.key||b})),n.push(s(h,y,b));continue}}if("text"!==y.type){var g=y,_={};c(g)?((0,i.setStyleProp)(g.attribs.style,g.attribs),_=g.attribs):g.attribs&&(_=(0,l.default)(g.attribs,g.name));var v=void 0;switch(y.type){case"script":case"style":y.children[0]&&(_.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?_.defaultValue=y.children[0].data:y.children&&y.children.length&&(v=e(y.children,o));break;default:continue}f>1&&(_.key=b),n.push(s(d(y.name,_,v),y,b))}else{var k=!y.data.trim().length;if(k&&y.parent&&!(0,i.canTextBeChildOfNode)(y.parent))continue;if(o.trim&&k)continue;n.push(s(y.data,y,b))}}return 1===n.length?n[0]:n};var r=o(486),l=n(o(840)),i=o(958),a={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function c(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}},413:function(e,t){"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(o=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===o.Tag||e.type===o.Script||e.type===o.Style},t.Root=o.Root,t.Text=o.Text,t.Directive=o.Directive,t.Comment=o.Comment,t.Script=o.Script,t.Style=o.Style,t.Tag=o.Tag,t.CDATA=o.CDATA,t.Doctype=o.Doctype},442:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||c),t)};var r=n(o(471));t.htmlToDOM=r.default;var l=n(o(840));t.attributesToProps=l.default;var i=n(o(308));t.domToReact=i.default;var a=o(141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return a.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return a.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return a.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return a.Text}});var c={lowerCaseAttributeNames:!1}},471:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),o=t?t[1]:void 0;return(0,l.formatDOM)((0,r.default)(e),null,o)};var r=n(o(496)),l=o(731),i=/<(![a-zA-Z\s]+)>/},486:function(e){"use strict";e.exports=window.React},496:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,o,d=(e=(0,n.escapeSpecialCharacters)(e)).match(a),m=d&&d[1]?d[1].toLowerCase():"";switch(m){case r:var f=p(e);if(!c.test(e))null===(t=null==(h=f.querySelector(l))?void 0:h.parentNode)||void 0===t||t.removeChild(h);if(!s.test(e))null===(o=null==(h=f.querySelector(i))?void 0:h.parentNode)||void 0===o||o.removeChild(h);return f.querySelectorAll(r);case l:case i:var y=u(e).querySelectorAll(m);return s.test(e)&&c.test(e)?y[0].parentNode.childNodes:y;default:return b?b(e):(h=u(e,i).querySelector(i)).childNodes;var h}};var n=o(731),r="html",l="head",i="body",a=/<([a-zA-Z]+[0-9]?)/,c=/<head[^]*>/i,s=/<body[^]*>/i,u=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},p=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},d="object"==typeof window&&window.DOMParser;if("function"==typeof d){var m=new d;u=p=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),m.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();u=function(e,t){if(t){var o=f.documentElement.querySelector(t);return o&&(o.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var b,y="object"==typeof document&&document.createElement("template");y&&y.content&&(b=function(e){return y.innerHTML=e,y.content.childNodes})},503:function(e,t,o){var n,r,l,i,a;n=o(939),r=o(151).utf8,l=o(206),i=o(151).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?i.stringToBytes(e):r.stringToBytes(e):l(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var o=n.bytesToWords(e),c=8*e.length,s=1732584193,u=-271733879,p=-1732584194,d=271733878,m=0;m<o.length;m++)o[m]=16711935&(o[m]<<8|o[m]>>>24)|4278255360&(o[m]<<24|o[m]>>>8);o[c>>>5]|=128<<c%32,o[14+(c+64>>>9<<4)]=c;var f=a._ff,b=a._gg,y=a._hh,h=a._ii;for(m=0;m<o.length;m+=16){var g=s,_=u,v=p,k=d;s=f(s,u,p,d,o[m+0],7,-680876936),d=f(d,s,u,p,o[m+1],12,-389564586),p=f(p,d,s,u,o[m+2],17,606105819),u=f(u,p,d,s,o[m+3],22,-1044525330),s=f(s,u,p,d,o[m+4],7,-176418897),d=f(d,s,u,p,o[m+5],12,1200080426),p=f(p,d,s,u,o[m+6],17,-1473231341),u=f(u,p,d,s,o[m+7],22,-45705983),s=f(s,u,p,d,o[m+8],7,1770035416),d=f(d,s,u,p,o[m+9],12,-1958414417),p=f(p,d,s,u,o[m+10],17,-42063),u=f(u,p,d,s,o[m+11],22,-1990404162),s=f(s,u,p,d,o[m+12],7,1804603682),d=f(d,s,u,p,o[m+13],12,-40341101),p=f(p,d,s,u,o[m+14],17,-1502002290),s=b(s,u=f(u,p,d,s,o[m+15],22,1236535329),p,d,o[m+1],5,-165796510),d=b(d,s,u,p,o[m+6],9,-1069501632),p=b(p,d,s,u,o[m+11],14,643717713),u=b(u,p,d,s,o[m+0],20,-373897302),s=b(s,u,p,d,o[m+5],5,-701558691),d=b(d,s,u,p,o[m+10],9,38016083),p=b(p,d,s,u,o[m+15],14,-660478335),u=b(u,p,d,s,o[m+4],20,-405537848),s=b(s,u,p,d,o[m+9],5,568446438),d=b(d,s,u,p,o[m+14],9,-1019803690),p=b(p,d,s,u,o[m+3],14,-187363961),u=b(u,p,d,s,o[m+8],20,1163531501),s=b(s,u,p,d,o[m+13],5,-1444681467),d=b(d,s,u,p,o[m+2],9,-51403784),p=b(p,d,s,u,o[m+7],14,1735328473),s=y(s,u=b(u,p,d,s,o[m+12],20,-1926607734),p,d,o[m+5],4,-378558),d=y(d,s,u,p,o[m+8],11,-2022574463),p=y(p,d,s,u,o[m+11],16,1839030562),u=y(u,p,d,s,o[m+14],23,-35309556),s=y(s,u,p,d,o[m+1],4,-1530992060),d=y(d,s,u,p,o[m+4],11,1272893353),p=y(p,d,s,u,o[m+7],16,-155497632),u=y(u,p,d,s,o[m+10],23,-1094730640),s=y(s,u,p,d,o[m+13],4,681279174),d=y(d,s,u,p,o[m+0],11,-358537222),p=y(p,d,s,u,o[m+3],16,-722521979),u=y(u,p,d,s,o[m+6],23,76029189),s=y(s,u,p,d,o[m+9],4,-640364487),d=y(d,s,u,p,o[m+12],11,-421815835),p=y(p,d,s,u,o[m+15],16,530742520),s=h(s,u=y(u,p,d,s,o[m+2],23,-995338651),p,d,o[m+0],6,-198630844),d=h(d,s,u,p,o[m+7],10,1126891415),p=h(p,d,s,u,o[m+14],15,-1416354905),u=h(u,p,d,s,o[m+5],21,-57434055),s=h(s,u,p,d,o[m+12],6,1700485571),d=h(d,s,u,p,o[m+3],10,-1894986606),p=h(p,d,s,u,o[m+10],15,-1051523),u=h(u,p,d,s,o[m+1],21,-2054922799),s=h(s,u,p,d,o[m+8],6,1873313359),d=h(d,s,u,p,o[m+15],10,-30611744),p=h(p,d,s,u,o[m+6],15,-1560198380),u=h(u,p,d,s,o[m+13],21,1309151649),s=h(s,u,p,d,o[m+4],6,-145523070),d=h(d,s,u,p,o[m+11],10,-1120210379),p=h(p,d,s,u,o[m+2],15,718787259),u=h(u,p,d,s,o[m+9],21,-343485551),s=s+g>>>0,u=u+_>>>0,p=p+v>>>0,d=d+k>>>0}return n.endian([s,u,p,d])})._ff=function(e,t,o,n,r,l,i){var a=e+(t&o|~t&n)+(r>>>0)+i;return(a<<l|a>>>32-l)+t},a._gg=function(e,t,o,n,r,l,i){var a=e+(t&n|o&~n)+(r>>>0)+i;return(a<<l|a>>>32-l)+t},a._hh=function(e,t,o,n,r,l,i){var a=e+(t^o^n)+(r>>>0)+i;return(a<<l|a>>>32-l)+t},a._ii=function(e,t,o,n,r,l,i){var a=e+(o^(t|~n))+(r>>>0)+i;return(a<<l|a>>>32-l)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var o=n.wordsToBytes(a(e,t));return t&&t.asBytes?o:t&&t.asString?i.bytesToString(o):n.bytesToHex(o)}},604:function(e,t,o){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function l(e){return function(e,t){var o,n,i,a,c,s,u,p,d,m=1,f=e.length,b="";for(n=0;n<f;n++)if("string"==typeof e[n])b+=e[n];else if("object"==typeof e[n]){if((a=e[n]).keys)for(o=t[m],i=0;i<a.keys.length;i++){if(null==o)throw new Error(l('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[i],a.keys[i-1]));o=o[a.keys[i]]}else o=a.param_no?t[a.param_no]:t[m++];if(r.not_type.test(a.type)&&r.not_primitive.test(a.type)&&o instanceof Function&&(o=o()),r.numeric_arg.test(a.type)&&"number"!=typeof o&&isNaN(o))throw new TypeError(l("[sprintf] expecting number but found %T",o));switch(r.number.test(a.type)&&(p=o>=0),a.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,a.width?parseInt(a.width):0);break;case"e":o=a.precision?parseFloat(o).toExponential(a.precision):parseFloat(o).toExponential();break;case"f":o=a.precision?parseFloat(o).toFixed(a.precision):parseFloat(o);break;case"g":o=a.precision?String(Number(o.toPrecision(a.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=a.precision?o.substring(0,a.precision):o;break;case"t":o=String(!!o),o=a.precision?o.substring(0,a.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=a.precision?o.substring(0,a.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=a.precision?o.substring(0,a.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?b+=o:(!r.number.test(a.type)||p&&!a.sign?d="":(d=p?"+":"-",o=o.toString().replace(r.sign,"")),s=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(d+o).length,c=a.width&&u>0?s.repeat(u):"",b+=a.align?d+o+c:"0"===s?d+c+o:c+d+o)}return b}(function(e){if(a[e])return a[e];var t,o=e,n=[],l=0;for(;o;){if(null!==(t=r.text.exec(o)))n.push(t[0]);else if(null!==(t=r.modulo.exec(o)))n.push("%");else{if(null===(t=r.placeholder.exec(o)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){l|=1;var i=[],c=t[2],s=[];if(null===(s=r.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(i.push(s[1]);""!==(c=c.substring(s[0].length));)if(null!==(s=r.key_access.exec(c)))i.push(s[1]);else{if(null===(s=r.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");i.push(s[1])}t[2]=i}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}o=o.substring(t[0].length)}return a[e]=n}(e),arguments)}function i(e,t){return l.apply(null,[e].concat(t||[]))}var a=Object.create(null);"undefined"!=typeof window&&(window.sprintf=l,window.vsprintf=i,void 0===(n=function(){return{sprintf:l,vsprintf:i}}.call(t,o,t,e))||(e.exports=n))}()},731:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=l,t.escapeSpecialCharacters=function(e){return e.replace(r.CARRIAGE_RETURN_REGEX,r.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=a,t.formatDOM=function e(t,o,r){void 0===o&&(o=null);for(var c,s=[],u=0,p=t.length;u<p;u++){var d=t[u];switch(d.nodeType){case 1:var m=i(d.nodeName);(c=new n.Element(m,l(d.attributes))).children=e("template"===m?d.content.childNodes:d.childNodes,c);break;case 3:c=new n.Text(a(d.nodeValue));break;case 8:c=new n.Comment(d.nodeValue);break;default:continue}var f=s[u-1]||null;f&&(f.next=c),c.parent=o,c.prev=f,c.next=null,s.push(c)}r&&((c=new n.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=s[0]||null,c.parent=o,s.unshift(c),s[1]&&(s[1].prev=s[0]));return s};var n=o(141),r=o(270);function l(e){for(var t={},o=0,n=e.length;o<n;o++){var r=e[o];t[r.name]=r.value}return t}function i(e){var t=function(e){return r.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase());return t||e}function a(e){return e.replace(r.CARRIAGE_RETURN_PLACEHOLDER_REGEX,r.CARRIAGE_RETURN)}},811:function(e,t){t.SAME=0;t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},840:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var o={},s=Boolean(e.type&&a[e.type]);for(var u in e){var p=e[u];if((0,n.isCustomAttribute)(u))o[u]=p;else{var d=u.toLowerCase(),m=c(d);if(m){var f=(0,n.getPropertyInfo)(m);switch(l.includes(m)&&i.includes(t)&&!s&&(m=c("default"+d)),o[m]=p,f&&f.type){case n.BOOLEAN:o[m]=!0;break;case n.OVERLOADED_BOOLEAN:""===p&&(o[m]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(o[u]=p)}}return(0,r.setStyleProp)(e.style,o),o};var n=o(210),r=o(958),l=["checked","value"],i=["input","select","textarea"],a={reset:!0,submit:!0};function c(e){return n.possibleStandardNames[e]}},917:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var o=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||o.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,c):e.replace(l,c)).replace(n,a))}},939:function(e){var t,o;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&o.rotl(e,8)|4278255360&o.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=o.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],o=0,n=0;o<e.length;o++,n+=8)t[n>>>5]|=e[o]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],o=0;o<32*e.length;o+=8)t.push(e[o>>>5]>>>24-o%32&255);return t},bytesToHex:function(e){for(var t=[],o=0;o<e.length;o++)t.push((e[o]>>>4).toString(16)),t.push((15&e[o]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],o=0;o<e.length;o+=2)t.push(parseInt(e.substr(o,2),16));return t},bytesToBase64:function(e){for(var o=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],l=0;l<4;l++)8*n+6*l<=8*e.length?o.push(t.charAt(r>>>6*(3-l)&63)):o.push("=");return o.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&o.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(n))>>>6-2*r);return o}},e.exports=o},942:function(e,t){var o;
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=i(e,l(o)))}return e}function l(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)n.call(e,o)&&e[o]&&(t=i(t,o));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},957:function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=this&&this.__assign||function(){return l=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var i=o(413),a=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),w(this,e)},e}();t.Node=a;var c=function(e){function t(t){var o=e.call(this)||this;return o.data=t,o}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(a);t.DataNode=c;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Text,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(c);t.Text=s;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Comment,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(c);t.Comment=u;var p=function(e){function t(t,o){var n=e.call(this,o)||this;return n.name=t,n.type=i.ElementType.Directive,n}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(c);t.ProcessingInstruction=p;var d=function(e){function t(t){var o=e.call(this)||this;return o.children=t,o}return r(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(a);t.NodeWithChildren=d;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=m;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var b=function(e){function t(t,o,n,r){void 0===n&&(n=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var l=e.call(this,n)||this;return l.name=t,l.attribs=o,l.type=r,l}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var o,n;return{name:t,value:e.attribs[t],namespace:null===(o=e["x-attribsNamespace"])||void 0===o?void 0:o[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}})},enumerable:!1,configurable:!0}),t}(d);function y(e){return(0,i.isTag)(e)}function h(e){return e.type===i.ElementType.CDATA}function g(e){return e.type===i.ElementType.Text}function _(e){return e.type===i.ElementType.Comment}function v(e){return e.type===i.ElementType.Directive}function k(e){return e.type===i.ElementType.Root}function w(e,t){var o;if(void 0===t&&(t=!1),g(e))o=new s(e.data);else if(_(e))o=new u(e.data);else if(y(e)){var n=t?C(e.children):[],r=new b(e.name,l({},e.attribs),n);n.forEach(function(e){return e.parent=r}),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=l({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=l({},e["x-attribsPrefix"])),o=r}else if(h(e)){n=t?C(e.children):[];var i=new m(n);n.forEach(function(e){return e.parent=i}),o=i}else if(k(e)){n=t?C(e.children):[];var a=new f(n);n.forEach(function(e){return e.parent=a}),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),o=a}else{if(!v(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new p(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),o=c}return o.startIndex=e.startIndex,o.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(o.sourceCodeLocation=e.sourceCodeLocation),o}function C(e){for(var t=e.map(function(e){return w(e,!0)}),o=1;o<t.length;o++)t[o].prev=t[o-1],t[o-1].next=t[o];return t}t.Element=b,t.isTag=y,t.isCDATA=h,t.isText=g,t.isComment=_,t.isDirective=v,t.isDocument=k,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=w},958:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){if(!e.includes("-"))return Boolean(t&&"string"==typeof t.is);if(i.has(e))return!1;return!0},t.setStyleProp=function(e,t){if("string"!=typeof e)return;if(!e.trim())return void(t.style={});try{t.style=(0,l.default)(e,a)}catch(e){t.style={}}};var r=o(486),l=n(o(229)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var a={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)};t.returnFirstArg=function(e){return e}}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var l=t[n]={exports:{}};return e[n].call(l.exports,l,l.exports,o),l.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var o=function(t,o){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,o||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"==e(o)?o:o+""}function n(e,o,n){return(o=t(o))in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,e}var r=window.wp.element,l=window.wp.i18n,i=window.wp.blocks,a=window.wp.blockEditor,c=window.wp.components,s=window.wp.coreData;function u(e){e.parentNode,e.parentNode.removeChild(e)}function p(e){e=function(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const o=t.getElementsByTagName("*");let n=o.length;for(;n--;){const e=o[n];if("SCRIPT"===e.tagName)u(e);else{let t=e.attributes.length;for(;t--;){const{name:o}=e.attributes[t];o.startsWith("on")&&e.removeAttribute(o)}}}return t.innerHTML}(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}const d=function(e){return!!e&&("wp"===e.provider?"featured_image"===e.id||"author_avatar"===e.id||"archive_image"===e.id||"term_image"===e.id:"image"===e.type)},m=function(e){return!!e&&("wp"!==e.provider&&"woo"!==e.provider)},f={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"};function b(e){return function(e){return!e||"center center"===e||"center"===e}(e)?"":f[e]}function y(e){return p(e=e.replace(/<br>/g,"\n")).trim().replace(/\n\n+/g,"\n\n")}var h=function({breadcrumbs:e,postId:t,postType:o}){if(!e||!e.render)return(0,r.createElement)(c.Spinner,null);const[n=""]=(0,s.useEntityProp)("postType",o,"title",t);return(0,r.createElement)("span",{dangerouslySetInnerHTML:{__html:e.render.replace("__BLOCKSY_BREADCRUMBS_POST_TITLE__",y(n))}})};function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},g.apply(null,arguments)}var _=function({label:e,resetAll:t,panelId:o,settings:n,skipToolsPanel:l=!1,containerProps:i={}}){const s=(0,a.__experimentalUseMultipleOriginColorsAndGradients)();return l?(0,r.createElement)(a.__experimentalColorGradientSettingsDropdown,g({__experimentalIsRenderedInSidebar:!0,__experimentalHasMultipleOrigins:!0,__experimentalGroup:"bg",settings:n,panelId:o,disableCustomGradients:!0},i,s)):(0,r.createElement)(c.__experimentalToolsPanel,{label:e,resetAll:t,panelId:o,hasInnerWrapper:!0,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,r.createElement)("div",{className:"color-block-support-panel__inner-wrapper"},(0,r.createElement)(a.__experimentalColorGradientSettingsDropdown,g({__experimentalIsRenderedInSidebar:!0,__experimentalHasMultipleOrigins:!0,__experimentalGroup:"bg",settings:n,panelId:o,disableCustomGradients:!0},i,s))))},v=window.wp.data,k=window.wp.editor;function w(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)o=l[n],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}const C=function(){const e={};return e.promise=new Promise(function(t,o){e.resolve=t,e.reject=o}),e};var O=o(503),x=o.n(O);function E(e){if(Array.isArray(e))return`[${e.map(function(e){return E(e)}).join(",")}]`;if("object"==typeof e&&null!==e){let t="";const o=Object.keys(e).sort();t+=`{${JSON.stringify(o)}`;for(let n=0;n<o.length;n++)t+=`${E(e[o[n]])},`;return`${t}}`}return`${JSON.stringify(e)}`}const P=function(e){return x()(E(e))},S=["fetcherName"];function j(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function I(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?j(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):j(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const T=0,D=1,A=2;let B={cacheKey:{state:T,response:null,payoad:{}}},H={};const N=new class{parseOptions(e){const{fetcherName:t=null}=e;return{args:{fetcherName:t},inputFetchOptions:w(e,S)}}fetch(e,t,o){const{args:n}=this.parseOptions(o),r=P(I(I({},t),{},{url:e}));if(B[r]||(B[r]={state:T,response:null,payload:{waitingForResponse:[]}},n.fetcherName&&H[n.fetcherName]&&(H[n.fetcherName].forEach(function(e){e.abort()}),H[n.fetcherName]=[])),B[r].state===A){const e=C();return e.resolve(B[r].response.clone()),e.promise}if(B[r].state===D)return this.fetchLoadingState(r,e,t,o);if(B[r].state===T)return this.fetchEmptyState(r,e,t,o);throw new Error("Invalid state",{cacheEntry:B[r]})}fetchLoadingState(e,t,o,n){const r=C();return B[e].payload.waitingForResponse.push(r),r.promise}fetchEmptyState(e,t,o,n){const{args:r,inputFetchOptions:l}=this.parseOptions(n);B[e].state=D;let i=new AbortController;r.fetcherName&&(H[r.fetcherName]||(H[r.fetcherName]=[]),H[r.fetcherName].push(i));const a=C(),c=I({method:"POST",headers:{"Content-Type":"application/json"},signal:i.signal},l);return"POST"===c.method&&(c.body=JSON.stringify(o)),fetch(t,c).then(function(t){B[e].response=t.clone(),[a,...B[e].payload.waitingForResponse].forEach(function(t){t.resolve(B[e].response.clone())}),B[e].payload={waitingForResponse:[]},B[e].state=A,r.fetcherName&&(H[r.fetcherName]=[])}).catch(function(t){[a,...B[e].payload.waitingForResponse].forEach(function(t){t.reject(B[e].response)}),B[e].payload={waitingForResponse:[]},B[e].state=T}),a.promise}};var R=function(e,t,o={}){return N.fetch(e,t,o)};var z=function({postId:e,postType:t}){const[o,n]=(0,r.useState)(null),{taxonomies:l}=(0,v.useSelect)(function(e){return{taxonomies:e(s.store).getEntityRecords("root","taxonomy",{per_page:-1})}},[]),i=(null!=l?l:[]).filter(function(e){var o;return e.types.includes(t)&&(null===(o=e.visibility)||void 0===o?void 0:o.show_ui)}),a=(0,v.useSelect)(function(e){const{getEditedPostAttribute:t}=e(k.store);return i.reduce(function(e,o){const n=t(o.rest_base);return e[o.slug]=n,e},{})},[i]);return(0,r.useEffect)(function(){e&&R(`${wp.ajax.settings.url}?action=blocksy_blocks_retrieve_breadcrumbs_data_descriptor`,{post_id:e,taxonomyTerms:a}).then(function(e){return e.json()}).then(function({success:e,data:t}){n(t)})},[e,a]),{breadcrumbs:o}};var M=(0,a.withColors)({textColor:"color"},{linkColor:"color"},{linkHoverColor:"color"})(function({clientId:e,textColor:t,setTextColor:o,linkColor:n,setLinkColor:i,linkHoverColor:c,setLinkHoverColor:s,className:u,context:{postId:p,postType:d}}){const{breadcrumbs:m}=z({postId:p,postType:d}),f=(0,r.useRef)(),b=(0,a.useBlockProps)({ref:f,className:{"ct-breadcrumbs":!0,className:u},style:{color:null==t?void 0:t.color,"--theme-link-initial-color":null==n?void 0:n.color,"--theme-link-hover-color":null==c?void 0:c.color}});return(0,r.createElement)(React.Fragment,null,(0,r.createElement)("div",b,(0,r.createElement)(h,{breadcrumbs:m,postId:p,postType:d}),(0,r.createElement)(a.InspectorControls,{group:"styles"},(0,r.createElement)(_,{label:(0,l.__)("Text Color","blocksy-companion"),resetAll:function(){o(""),i(""),s("")},panelId:e,settings:[{colorValue:t.color,enableAlpha:!0,label:(0,l.__)("Text","blocksy-companion"),onColorChange:o},{colorValue:n.color,enableAlpha:!0,label:(0,l.__)("Link Initial","blocksy-companion"),onColorChange:i},{colorValue:c.color,enableAlpha:!0,label:(0,l.__)("Link Hover","blocksy-companion"),onColorChange:s}]}))))}),F=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/breadcrumbs","category":"blocksy-blocks","attributes":{"textColor":{"type":"string"},"customTextColor":{"type":"string"},"linkColor":{"type":"string"},"customLinkColor":{"type":"string"},"linkHoverColor":{"type":"string"},"customLinkHoverColor":{"type":"string"}},"supports":{"className":false,"spacing":{"margin":true,"__experimentalDefaultControls":{"margin":true}}},"providesContext":{"textColor":"textColor","linkColor":"linkColor","linkHoverColor":"linkHoverColor"}}');function V(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function L(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?V(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}(0,i.registerBlockType)("blocksy/breadcrumbs",L(L({},F),{},{title:(0,l.__)("Breadcrumbs","blocksy-companion"),description:(0,l.__)("Display navigational links, showing users their path within the site.","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M4,10.5h6v3H4V10.5z M12,13.5h3v-3h-3V13.5z M17,10.5v3h3v-3H17z"}))},edit:function(e){return(0,r.createElement)(M,e)},save:function(){return null},usesContext:["postId","postType"]}));const $=function({attributes:e,previewedPostId:t}){const[o,n]=(0,r.useState)(null);return(0,r.useEffect)(function(){const o=new URLSearchParams(window.location.search);R(`${wp.ajax.settings.url}?action=blocksy_get_posts_block_data${o.get("lang")?"&lang="+o.get("lang"):""}`,{attributes:e,previewedPostId:t},{fetcherName:`posts-block-data-${e.uniqueId}`,headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then(function(e){return e.json()}).then(function({success:e,data:t}){e&&n(t)}).catch(function(e){})},[e,t]),{blockData:o}};var U=window.blocksyOptions;const q=function({isSlideshow:e,attributes:t,context:o,toWatch:n}){const[l,i]=(0,r.useState)(null),a=(0,r.useRef)(),[c,s]=(0,r.useState)(null);let u={},p=[];return(0,r.useEffect)(function(){l&&l.scheduleSliderRecalculation()},[t,o]),(0,r.useEffect)(function(){l&&!e&&l.destroy(),l&&e&&setTimeout(function(){l.refreshActivation()},50)},[e,l,n]),(0,r.useEffect)(function(){return function(){l&&l.destroy()}},[]),e&&(u.ref=a,u.onMouseOver=function(){l||(0,U.mountFlexy)().then(function({mount:e,Flexy:t}){i(e(function(){return a.current},{flexyOptions:{dragAndDropOptions:{mountDragAndDropEventListener:!1},arrowsOptions:{mountListeners:!1},onRender:function(e,t){s(t)}}}))})}),c&&(Object.keys(c.flexyAttributeElAttr).map(function(e){u[e]=c.flexyAttributeElAttr[e]}),p=c.elementsDescriptor),{flexyInstance:l,flexyContainerAttr:u,elementsDescriptor:p,elementDescriptorForIndex:function(e){return p&&p.length>0&&p[e]?p[e]:p&&p.length>0&&!p[e]?p[0]:null},arrowsDescritor:{left:{onClick:function(e){e.preventDefault(),l&&l.sliderArrows.navigate("left")}},right:{onClick:function(e){e.preventDefault(),l&&l.sliderArrows.navigate("right")}}}}};function G(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}const W=function(e,t=[]){let o="";const l=((e=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&o[e]];return t})(),i={cacheId:l,initialStyleTagsDescriptor:[{readStyles:function(){return""},persistStyles:function(e){o=e}}]};U.syncHelpers.getStyleTagsWithAst(i);e.map(function(e){let t=U.syncHelpers.getUpdateAstsForStyleDescriptor(function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?G(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):G(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({variableDescriptor:e.variables,value:e.value,fullValue:{}},i));U.syncHelpers.persistNewAsts(l,t)});let a=o?(0,r.createElement)("style",null,o):null;return t=[(window.ct_localizations||window.ct_customizer_localizations).backend_dynamic_styles_urls.flexy],(0,r.createElement)(r.Fragment,null,a,t.map(function(e){return(0,r.createElement)("link",{key:e,rel:"stylesheet",href:e})}))};var Z=o(942),X=o.n(Z),K=o(442),J=K.default||K;const Y=["className"],Q=["className"];function ee(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function te(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ee(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var oe=function({attributes:e,postId:t,uniqueId:o}){const{blockData:n}=$({attributes:e,previewedPostId:t}),i="yes"===e.has_slideshow,a=q({isSlideshow:i,attributes:e,toWatch:n?n.customizer_preview:{}}),s=W([]);return n?n.customizer_preview?(0,r.createElement)(React.Fragment,null,function({isSlideshow:e,sliderDescriptor:t,blockData:o}){if(!e)return(0,r.createElement)(r.RawHTML,null,o.customizer_preview);const n={replace:function({attribs:e,children:o,name:l},i){if(e&&e.class&&e.class.includes("flexy-container"))return(0,r.createElement)("div",g({},(0,K.attributesToProps)(e),t.flexyContainerAttr),(0,K.domToReact)(o,n));if(e&&e.class&&e.class.includes("flexy-arrow-")){const i=l,a=e.class.includes("flexy-arrow-next")?t.arrowsDescritor.right:t.arrowsDescritor.left;return(0,r.createElement)(i,g({},(0,K.attributesToProps)(e),a),(0,K.domToReact)(o,n))}if((e&&e.class?e.class.split(" "):[]).includes("flexy-item")){let l=t.elementDescriptorForIndex(i);l&&(l=l.attr);let a=(0,K.attributesToProps)(e),{className:c}=a,s=w(a,Y);if(l){const{className:e}=l,t=w(l,Q);c=X()(c,e),s=te(te({},s),t)}return(0,r.createElement)("div",g({className:X()(c)},s),(0,K.domToReact)(o,n))}}};return J(o.customizer_preview,n)}({isSlideshow:i,sliderDescriptor:a,blockData:n}),s):(0,r.createElement)("p",null,(0,l.__)("No results found.","blocksy-companion")):(0,r.createElement)(c.Spinner,null)};const ne=function(e){return e.split("-")[0]};const re=function({attributes:e,clientId:t,setAttributes:o,blockType:n}){(0,r.useEffect)(function(){e.uniqueId&&!function({attributes:e,blockType:t}){const o=document.querySelectorAll("iframe");return[document,...Array.from(o).filter(function(e){return!e.closest(".block-editor-block-preview__container")}).map(function(e){return e.contentDocument}).filter(function(e){return e})].flatMap(function(o){return[...o.querySelectorAll(`[data-id="${e.uniqueId}"][data-type="${t}"]`)]}).length>1}({attributes:e,clientId:t,blockType:n})||o({uniqueId:ne(t)})},[t]);let l=e.uniqueId||ne(t);return{uniqueId:l,props:{"data-id":l}}};var le=function({clientId:e,setAttributes:t,setIsPatternSelectionModalOpen:o}){const{replaceInnerBlocks:n}=(0,v.useDispatch)(a.store);return(0,r.createElement)("div",{className:"components-placeholder is-large"},(0,r.createElement)("div",{className:"components-placeholder__label"},(0,r.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"})),(0,l.__)("Advanced Posts","blocksy-companion")),(0,r.createElement)("fieldset",{className:"components-placeholder__fieldset"},(0,r.createElement)("legend",{className:"components-placeholder__instructions"},(0,l.__)("Inherit the Customizer layout, start with a pattern or create a custom layout","blocksy-companion")),(0,r.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),t({design:"default"})}},(0,l.__)("Inherit From Customizer","blocksy-companion")),(0,r.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),o(!0)}},(0,l.__)("Choose Pattern","blocksy-companion")),(0,r.createElement)("button",{className:"components-button is-primary",onClick:function(t){t.preventDefault(),n(e,(0,i.createBlocksFromInnerBlocksTemplate)([["blocksy/post-template",{},[["blocksy/dynamic-data",{tagName:"h2",field:"wp:title",has_field_link:"yes"}],["blocksy/dynamic-data",{field:"wp:date"}],["blocksy/dynamic-data",{field:"wp:excerpt"}]]]]),!1)}},(0,l.__)("Create Custom Layout","blocksy-companion"))))},ie=o(486),ae=window.wp.primitives;var ce=(0,ie.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ie.createElement)(ae.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"}));var se=(0,ie.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ie.createElement)(ae.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var ue=(0,ie.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ie.createElement)(ae.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),pe=window.wp.a11y;var de=function({items:e,selectedItems:t,onItemClick:o,label:n,resetAll:i}){const a=t.length>0;return(0,r.createElement)(c.__experimentalHStack,null,(0,r.createElement)(c.__experimentalHeading,{style:{margin:0},level:2},n),(0,r.createElement)(c.DropdownMenu,{icon:0===t.length?ce:se,label:(0,l.__)("Parameters options","blocksy-companion"),toggleProps:{isSmall:!0,describedBy:0===t.length?(0,l.__)("All options are currently hidden","blocksy-companion"):void 0}},function(){return(0,r.createElement)(React.Fragment,null,e.map(function(e,n){return(0,r.createElement)(c.MenuGroup,{key:n,label:e.label},e.items.map(function(e,n){const l=t.includes(e.label);return(0,r.createElement)(c.MenuItem,{key:n,icon:l?ue:null,isSelected:l,onClick:function(){return o(e.label)}},e.label)}))}),(0,r.createElement)(c.MenuGroup,null,(0,r.createElement)(c.MenuItem,{"aria-disabled":!a,variant:"tertiary",onClick:function(){a&&(i(),(0,pe.speak)((0,l.__)("All options reset","blocksy-companion"),"assertive"))}},(0,l.__)("Reset all","blocksy-companion"))))}))};var me=function({className:e,attributes:t,setAttributes:o,resetAll:n,items:l,label:i}){const a=l.reduce(function(e,t){return[...e,...t.items.filter(function(e){return e.hasValue()}).map(function(e){return e.label})]},[]),[c,s]=(0,r.useState)([]),u=[...new Set([...c,...a])];return(0,r.createElement)("div",{className:X()("ct-tools-panel",e)},(0,r.createElement)(de,{label:i,resetAll:function(){s([]),n()},items:l,selectedItems:u,attributes:t,setAttributes:o,onItemClick:function(e){if(!u.includes(e))return void s([...c,e]);const t=l.reduce(function(e,t){return[...e,...t.items]},[]).find(function(t){return t.label===e});s(c.filter(function(t){return t!==e})),t.reset()}}),(0,r.createElement)("div",{className:"ct-tools-panel-items"},l.reduce(function(e,t){return[...e,...t.items]},[]).filter(function(e){return u.includes(e.label)}).map(function(e){return e.render()})))};function fe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function be(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):fe(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const ye=["wp_pattern_category","nav_menu"],he=function(e,t){const o=e.map(function(e){return(0,i.cloneBlock)(e)}),n=[],r=[...o];for(;r.length>0;){var l;const e=r.shift();"blocksy/query"===e.name&&(e.attributes.uniqueId="",n.push(e.clientId)),null===(l=e.innerBlocks)||void 0===l||l.forEach(function(e){r.push(e)})}return{newBlocks:o,queryClientIds:n}};const ge=function(e){return(0,v.useSelect)(function(t){const{getTaxonomies:o}=t(s.store);return(o({type:e,per_page:-1,context:"view"})||[]).filter(function({slug:e}){return!ye.includes(e)})},[e])};var _e=window.wp.compose;function ve(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function ke(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ve(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const we=[],Ce={order:"asc",_fields:"id,name,slug",context:"view"},Oe=function(e,t){var o,n;const r=(null==t?void 0:t.slug)||(null==e||null===(o=e.find(function(e){return e.name===t}))||void 0===o?void 0:o.slug);if(r)return r;const l=t.toLocaleLowerCase();return null==e||null===(n=e.find(function(e){return e.name.toLocaleLowerCase()===l}))||void 0===n?void 0:n.slug};function xe({taxonomy:e,termIds:t,onChange:o,label:n=!1}){const[i,a]=(0,r.useState)(""),[u,p]=(0,r.useState)(we),[d,m]=(0,r.useState)(we),f=(0,_e.useDebounce)(a,250),{searchResults:b,searchHasResolved:y}=(0,v.useSelect)(function(t){if(!i)return{searchResults:we,searchHasResolved:!0};const{getEntityRecords:o,hasFinishedResolution:n}=t(s.store),r=["taxonomy",e.slug,ke(ke({},Ce),{},{search:i,orderby:"name",per_page:20})];return{searchResults:o(...r),searchHasResolved:n("getEntityRecords",r)}},[i,t]),h=(0,v.useSelect)(function(o){if(null==t||!t.length)return we;const{getEntityRecords:n}=o(s.store);return n("taxonomy",e.slug,ke(ke({},Ce),{},{slug:t,per_page:t.length}))},[t]);(0,r.useEffect)(function(){if(null!=t&&t.length||p(we),null==h||!h.length)return;const e=t.reduce(function(e,t){const o=h.find(function(e){return e.slug===t});return o&&e.push({id:t,slug:t,value:o.name}),e},[]);p(e)},[t,h]),(0,r.useEffect)(function(){y&&m(b.map(function(e){return e.name}))},[b,y]);return(0,r.createElement)(c.FormTokenField,{label:n,value:u,onInputChange:f,suggestions:d,onChange:function(e){const t=new Set;for(const o of e){const e=Oe(b,o);e&&t.add(e)}m(we),o(Array.from(t))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,placeholder:(0,l.__)("Search for a term","blocksy-companion")})}function Ee(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Pe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ee(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function Se(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}const je=function({taxonomy:e,attributes:t,setAttributes:o,previewedPostMatchesType:n}){return{label:(0,l.sprintf)((0,l.__)("Include %s","blocksy-companion"),e.name),hasValue:function(){return t.include_term_ids[e.slug]},reset:function(){const n=t.include_term_ids||{},r=e.slug,{[r]:l}=n,i=w(n,[r].map(Se));o({include_term_ids:i})},render:function(){const i=t.include_term_ids[e.slug]||{strategy:"all",terms:[]};return(0,r.createElement)("div",null,(0,r.createElement)(c.__experimentalToggleGroupControl,{label:(0,l.sprintf)((0,l.__)("Include %s","blocksy-companion"),e.name),value:i.strategy,isBlock:!0,onChange:function(n){o({include_term_ids:Pe(Pe({},t.include_term_ids),{},{[e.slug]:Pe(Pe({},i),{},{strategy:n})})})}},(0,r.createElement)(c.__experimentalToggleGroupControlOption,{value:"all",label:(0,l.__)("All","blocksy-companion")}),(0,r.createElement)(c.__experimentalToggleGroupControlOption,{value:"specific",label:(0,l.__)("Specific","blocksy-companion")}),n&&(0,r.createElement)(c.__experimentalToggleGroupControlOption,{value:"related",label:(0,l.__)("Related","blocksy-companion")})),"specific"===i.strategy&&(0,r.createElement)(xe,{taxonomy:e,termIds:i.terms,onChange:function(n){o({include_term_ids:Pe(Pe({},t.include_term_ids),{},{[e.slug]:Pe(Pe({},i),{},{terms:n})})})}}))}}},Ie=function({taxonomy:e,attributes:t,setAttributes:o}){return{label:(0,l.sprintf)((0,l.__)("Exclude %s","blocksy-companion"),e.name),hasValue:function(){return t.exclude_term_ids[e.slug]},reset:function(){const n=t.exclude_term_ids||{},r=e.slug,{[r]:l}=n,i=w(n,[r].map(Se));o({exclude_term_ids:i})},render:function(){const n=t.exclude_term_ids[e.slug]||{strategy:"specific",terms:[]};return(0,r.createElement)(xe,{label:(0,l.sprintf)((0,l.__)("Exclude %s","blocksy-companion"),e.name),taxonomy:e,termIds:n.terms,onChange:function(r){o({exclude_term_ids:Pe(Pe({},t.exclude_term_ids),{},{[e.slug]:Pe(Pe({},n),{},{terms:r})})})}})}}},Te=function({attributes:e,attributes:{taxonomy:t},setAttributes:o}){const n=function(e){return(0,v.useSelect)(function(t){const{getTaxonomy:o}=t(s.store);return o(e)},[e])}(t);if(!n)return{taxonomiesGroup:null};const r=[je({taxonomy:n,attributes:e,setAttributes:o}),Ie({taxonomy:n,attributes:e,setAttributes:o})];return{taxonomiesGroup:r.length>0?{label:(0,l.__)("Taxonomies","blocksy-companion"),items:r}:null}};var De=function({context:e,attributes:t,attributes:{post_type:o},setAttributes:n}){const{taxonomiesGroup:i}=function({attributes:e,attributes:{post_type:t},previewedPostMatchesType:o,setAttributes:n}){const r=ge(t);let i=[];return r&&r.length>0&&(i=[...r.map(function(t){return je({taxonomy:t,attributes:e,setAttributes:n,previewedPostMatchesType:o})}),...r.map(function(t){return Ie({taxonomy:t,attributes:e,setAttributes:n})})]),{taxonomiesGroup:i.length>0?{label:(0,l.__)("Taxonomies","blocksy-companion"),items:i}:null}}({attributes:t,setAttributes:n,previewedPostMatchesType:t.post_type===e.postType});return(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(me,{className:"ct-query-parameters-component",attributes:t,setAttributes:n,resetAll:function(){n({offset:0,sticky_posts:"include",orderby:"post_date",order:"desc",include_term_ids:{},exclude_term_ids:{}})},items:[{label:(0,l.__)("General","blocksy-companion"),items:[{label:(0,l.__)("Offset","blocksy-companion"),hasValue:function(){return 0!==t.offset},reset:function(){n({offset:0})},render:function(){return(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{offset:{type:"ct-number",label:(0,l.__)("Offset","blocksy-companion"),value:"",min:0,max:500}},value:t,hasRevertButton:!1})}},{label:(0,l.__)("Order by","blocksy-companion"),hasValue:function(){return"post_date"!==t.orderby},reset:function(){n({orderby:"post_date"})},render:function(){return(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{orderby:{type:"ct-select",label:(0,l.__)("Order by","blocksy-companion"),value:"",choices:[{key:"title",value:(0,l.__)("Title","blocksy-companion")},{key:"post_date",value:(0,l.__)("Publish Date","blocksy-companion")},{key:"modified",value:(0,l.__)("Modified Date","blocksy-companion")},{key:"comment_count",value:(0,l.__)("Most commented","blocksy-companion")},{key:"author",value:(0,l.__)("Author","blocksy-companion")},{key:"rand",value:(0,l.__)("Random","blocksy-companion")},{key:"menu_order",value:(0,l.__)("Menu Order","blocksy-companion")}]}},value:t,hasRevertButton:!1})}},{label:(0,l.__)("Order","blocksy-companion"),hasValue:function(){return"desc"!==t.order},reset:function(){n({order:"desc"})},render:function(){return(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{order:{type:"ct-select",label:(0,l.__)("Order","blocksy-companion"),value:"",choices:[{key:"DESC",value:(0,l.__)("Descending","blocksy-companion")},{key:"ASC",value:(0,l.__)("Ascending","blocksy-companion")}]}},value:t,hasRevertButton:!1})}},{label:(0,l.__)("Sticky Posts","blocksy-companion"),hasValue:function(){return"include"!==t.sticky_posts},reset:function(){n({sticky_posts:"include"})},render:function(){return(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{sticky_posts:{type:"ct-select",label:(0,l.__)("Sticky Posts","blocksy-companion"),value:"include",choices:[{key:"include",value:(0,l.__)("Include","blocksy-companion")},{key:"exclude",value:(0,l.__)("Exclude","blocksy-companion")},{key:"only",value:(0,l.__)("Only","blocksy-companion")}]}},value:t,hasRevertButton:!1})}}]},...i?[i]:[]],label:(0,l.__)("Parameters","blocksy-companion")}))};function Ae(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Be(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ae(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}let He=null,Ne=new AbortController;var Re=o(112),ze=o.n(Re);function Me(e=""){return e=(e=ze()(e)).trim().toLowerCase()}function Fe(e,t){const o=Me(t),n=Me(e.title);let r=0;if(o===n)r+=30;else if(n.startsWith(o))r+=20;else{o.split(" ").every(function(e){return n.includes(e)})&&(r+=10)}return r}function Ve(e=[],t=""){if(!t)return e;const o=e.map(function(e){return[e,Fe(e,t)]}).filter(function([,e]){return e>0});return o.sort(function([,e],[,t]){return t-e}),o.map(function([e]){return e})}var Le=function({clientId:e,attributes:t,setIsPatternSelectionModalOpen:o,postType:n}){const[s,u]=(0,r.useState)(""),{replaceBlock:p,selectBlock:d}=(0,v.useDispatch)(a.store),[m,f]=(0,r.useState)([]);(0,r.useEffect)(function(){new Promise(function(e){He?e(He):fetch(`${wp.ajax.settings.url}?action=blocksy_get_posts_block_patterns`,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({}),signal:Ne.signal}).then(function(e){return e.json()}).then(function({success:t,data:o}){t&&(He=o.patterns.map(function(e){return Be(Be({},e),{},{blocks:(0,i.parse)(e.content,{__unstableSkipMigrationLogs:!0})})}),e(He))})}).then(function(e){f(e)})},[]);const b=(0,r.useMemo)(function(){return{previewPostType:n}},[n]),y=(0,r.useMemo)(function(){return Ve(m,s)},[m,s]),h=(0,_e.useAsyncList)(y);return(0,r.createElement)(c.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,l.__)("Choose a pattern","blocksy-companion"),onRequestClose:function(){return o(!1)},isFullScreen:!0},(0,r.createElement)("div",{className:"block-library-query-pattern__selection-content"},(0,r.createElement)("div",{className:"block-library-query-pattern__selection-search"},(0,r.createElement)(c.SearchControl,{__nextHasNoMarginBottom:!0,onChange:u,value:s,label:(0,l.__)("Search for patterns","blocksy-companion"),placeholder:(0,l.__)("Search","blocksy-companion")})),(0,r.createElement)(a.BlockContextProvider,{value:b},(0,r.createElement)(a.__experimentalBlockPatternsList,{blockPatterns:y,shownPatterns:h,onClickPattern:function(t,o){const{newBlocks:n,queryClientIds:r}=he(o);p(e,n),r[0]&&d(r[0])}}))))};function $e(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Ue(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):$e(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var qe=function({clientId:e,className:t,attributes:o,setAttributes:n,context:i}){const u=(0,a.useInnerBlocksProps)({},{}),p=(0,v.useSelect)(function(t){return!!t(a.store).getBlocks(e).length},[e]),d=!p&&"default"!==o.design,{postTypesSelectOptions:m}=function(e={}){let{hasPages:t=!1}=e;const o=(0,v.useSelect)(function(e){var o;const{getPostTypes:n}=e(s.store),r=["attachment","product",...t?[]:["page"]];return null===(o=n({per_page:-1}))||void 0===o?void 0:o.filter(function({viewable:e,slug:t}){return e&&!r.includes(t)&&!t.includes("ct_")&&!t.includes("blc-")})},[t]);return{postTypesTaxonomiesMap:(0,r.useMemo)(function(){if(null!=o&&o.length)return o.reduce(function(e,t){return e[t.slug]=t.taxonomies,e},{})},[o]),postTypesSelectOptions:(0,r.useMemo)(function(){return(o||[]).reduce(function(e,t){return be(be({},e),{},{[t.slug]:t.labels.singular_name})},{})},[o])}}({hasPages:p}),{uniqueId:f,props:b}=re({attributes:o,setAttributes:n,clientId:e,blockType:"blocksy/query"}),{postId:y,postType:h}=i,_=(0,r.useRef)(),[k,w]=(0,r.useState)(null),C=(0,a.__experimentalUseBorderProps)(o),O=(0,a.useBlockProps)({ref:_,className:t,style:Ue({},C.style)}),[x,E]=(0,r.useState)(!1);return(0,r.createElement)(React.Fragment,null,x&&(0,r.createElement)(Le,{clientId:e,attributes:o,setIsPatternSelectionModalOpen:E,postType:o.post_type}),d?(0,r.createElement)("div",g({},O,b),(0,r.createElement)(le,{setIsPatternSelectionModalOpen:E,attributes:o,setAttributes:n,clientId:e})):(0,r.createElement)("div",g({},O,b),"default"===o.design&&(0,r.createElement)(oe,{uniqueId:f,attributes:o,postId:y}),p&&(0,r.createElement)("div",u)),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,null,(0,r.createElement)(c.ToolbarButton,{className:"components-toolbar__control",icon:"layout",label:(0,l.__)("Reset layout","blocksy-companion"),disabled:d,onClick:function(){p?(0,v.dispatch)("core/block-editor").replaceInnerBlocks(e,[],!1):(0,v.dispatch)("core/block-editor").updateBlockAttributes(e,{design:""})}}))),!d&&(0,r.createElement)(React.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n(Ue({[e]:t},"post_type"===e?{include_term_ids:{},exclude_term_ids:{},include_post_ids:{ids:[],current_post:!1},exclude_post_ids:{ids:[],current_post:!1}}:{}))},options:{post_type:{type:"ct-select",label:(0,l.__)("Post Type","blocksy-companion"),value:"",defaultToFirstItem:!1,choices:m,purpose:"default"},limit:{type:"ct-number",label:(0,l.__)("Limit","blocksy-companion"),value:"",min:1,max:100},has_slideshow:{type:"ct-switch",label:(0,l.__)("Slideshow","blocksy-companion"),value:""},has_slideshow_condition:{type:"ct-condition",condition:{has_slideshow:"yes"},options:{has_slideshow_arrows:{type:"ct-switch",label:(0,l.__)("Arrows","blocksy-companion"),value:""},has_slideshow_autoplay:{type:"ct-switch",label:(0,l.__)("Autoplay","blocksy-companion"),value:""},has_slideshow_autoplay_condition:{type:"ct-condition",condition:{has_slideshow_autoplay:"yes"},options:{has_slideshow_autoplay_speed:{type:"ct-number",label:(0,l.__)("Autoplay Speed","blocksy-companion"),value:"",min:1,max:100}}}}},has_pagination_condition:{type:"ct-condition",condition:{has_slideshow:"no"},options:{has_pagination:{type:"ct-switch",label:(0,l.__)("Pagination","blocksy-companion"),value:""}}}},value:o,hasRevertButton:!1}))),(0,r.createElement)(De,{attributes:o,setAttributes:n,context:i})),(0,r.createElement)(a.InspectorControls,{group:"advanced"},(0,r.createElement)(c.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,l.__)("Block ID","blocksy-companion"),value:f,onChange:function(e){},onFocus:function(e){e.target.select()},help:(0,l.__)("Please look at the documentation for more information on why this is useful.","blocksy-companion")})))};var Ge=function(e){const t=a.useBlockProps.save(),o=a.useInnerBlocksProps.save(t);return(0,r.createElement)("div",o)},We=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/query","category":"blocksy-blocks","attributes":{"uniqueId":{"type":"string","default":""},"type":{"type":"string","default":"post"},"post_type":{"type":"string","default":"post"},"limit":{"type":"number","default":5},"include_term_ids":{"type":"object","default":{}},"exclude_term_ids":{"type":"object","default":{}},"include_post_ids":{"type":"object","default":{"ids":[],"current_post":false}},"exclude_post_ids":{"type":"object","default":{"ids":[],"current_post":false}},"order":{"type":"string","default":"desc"},"orderby":{"type":"string","default":"post_date"},"orderby_custom":{"type":"string","default":""},"offset":{"type":"number","default":0},"design":{"type":"string","default":""},"has_pagination":{"type":"string","default":"no"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"linkColor":{"type":"string"},"customLinkColor":{"type":"string"},"linkHoverColor":{"type":"string"},"customLinkHoverColor":{"type":"string"},"sticky_posts":{"type":"string","default":"include"},"has_slideshow":{"type":"string","default":"no"},"has_slideshow_arrows":{"type":"string","default":"yes"},"has_slideshow_autoplay":{"type":"string","default":"no"},"has_slideshow_autoplay_speed":{"type":"number","default":3}},"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"color":{"gradients":true,"link":false,"__experimentalDefaultControls":{"text":false,"background":true,"link":false}}},"usesContext":["postId","postType"],"providesContext":{"uniqueId":"uniqueId","post_type":"post_type","limit":"limit","order":"order","orderby":"orderby","sticky_posts":"sticky_posts","orderby_custom":"orderby_custom","offset":"offset","has_slideshow":"has_slideshow","has_slideshow_arrows":"has_slideshow_arrows","has_slideshow_autoplay":"has_slideshow_autoplay","has_slideshow_autoplay_speed":"has_slideshow_autoplay_speed","has_pagination":"has_pagination","include_term_ids":"include_term_ids","exclude_term_ids":"exclude_term_ids"}}');function Ze(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Xe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ze(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}(0,i.registerBlockType)("blocksy/query",Xe(Xe({},We),{},{title:(0,l.__)("Advanced Posts","blocksy-companion"),description:(0,l.__)("Create advanced queries based on your specified criterias.","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"}))},edit:function(e){return(0,r.createElement)(qe,e)},save:function(){return(0,r.createElement)(Ge,null)}}));const Ke=function({attributes:e}){const[t,o]=(0,r.useState)(null);return(0,r.useEffect)(function(){const t=new URLSearchParams(window.location.search);R(`${wp.ajax.settings.url}?action=blocksy_get_tax_block_data${t.get("lang")?"&lang="+t.get("lang"):""}`,{attributes:e},{fetcherName:`tax-block-data-${e.uniqueId}`,headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then(function(e){return e.json()}).then(function({success:e,data:t}){e&&o(t)}).catch(function(e){})},[e]),{blockData:t}};var Je=function({attributes:e}){const{blockData:t}=Ke({attributes:e});if(!t||!t.block)return(0,r.createElement)(c.Spinner,null);const o="yes"===e.has_slideshow;return(0,r.createElement)(React.Fragment,null,(0,r.createElement)(r.RawHTML,null,t.block),t&&t.dynamic_styles&&(0,r.createElement)("style",null,t.dynamic_styles),t&&"yes"===e.has_pagination&&!o&&t.pagination_output&&(0,r.createElement)(r.RawHTML,null,t.pagination_output))};var Ye=function({clientId:e,setAttributes:t,setIsPatternSelectionModalOpen:o}){const{replaceInnerBlocks:n}=(0,v.useDispatch)(a.store);return(0,r.createElement)("div",{className:"components-placeholder is-large"},(0,r.createElement)("div",{className:"components-placeholder__label"},(0,r.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"})),(0,l.__)("Advanced Taxonomies","blocksy-companion")),(0,r.createElement)("fieldset",{className:"components-placeholder__fieldset"},(0,r.createElement)("legend",{className:"components-placeholder__instructions"},(0,l.__)("Start with a pattern or create a custom layout","blocksy-companion")),(0,r.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),o(!0)}},(0,l.__)("Choose Pattern","blocksy-companion")),(0,r.createElement)("button",{className:"components-button is-primary",onClick:function(t){t.preventDefault(),n(e,(0,i.createBlocksFromInnerBlocksTemplate)([["blocksy/tax-template",{},[["blocksy/dynamic-data",{tagName:"h2",field:"wp:term_title",has_field_link:"yes"}],["blocksy/dynamic-data",{field:"wp:term_description"}]]]]),!1)}},(0,l.__)("Create Custom Layout","blocksy-companion"))))};function Qe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function et(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Qe(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}let tt=null,ot=new AbortController;var nt=function({clientId:e,attributes:t,setIsPatternSelectionModalOpen:o,postType:n}){const[s,u]=(0,r.useState)(""),{replaceBlock:p,selectBlock:d}=(0,v.useDispatch)(a.store),[m,f]=(0,r.useState)([]);(0,r.useEffect)(function(){new Promise(function(e){tt?e(tt):fetch(`${wp.ajax.settings.url}?action=blocksy_get_terms_block_patterns`,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({}),signal:ot.signal}).then(function(e){return e.json()}).then(function({success:t,data:o}){t&&(tt=o.patterns.map(function(e){return et(et({},e),{},{blocks:(0,i.parse)(e.content,{__unstableSkipMigrationLogs:!0})})}),e(tt))})}).then(function(e){f(e)})},[]);const b=(0,r.useMemo)(function(){return{previewPostType:n}},[n]),y=(0,r.useMemo)(function(){return Ve(m,s)},[m,s]),h=(0,_e.useAsyncList)(y);return(0,r.createElement)(c.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,l.__)("Choose a pattern","blocksy-companion"),onRequestClose:function(){return o(!1)},isFullScreen:!0},(0,r.createElement)("div",{className:"block-library-query-pattern__selection-content"},(0,r.createElement)("div",{className:"block-library-query-pattern__selection-search"},(0,r.createElement)(c.SearchControl,{__nextHasNoMarginBottom:!0,onChange:u,value:s,label:(0,l.__)("Search for patterns","blocksy-companion"),placeholder:(0,l.__)("Search","blocksy-companion")})),(0,r.createElement)(a.BlockContextProvider,{value:b},(0,r.createElement)(a.__experimentalBlockPatternsList,{blockPatterns:y,shownPatterns:h,onClickPattern:function(t,o){const{newBlocks:n,queryClientIds:r}=he(o);p(e,n),r[0]&&d(r[0])}}))))};var rt=function({context:e,attributes:t,attributes:{post_type:o},setAttributes:n}){const{taxonomiesGroup:i}=Te({attributes:t,setAttributes:n});return(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(me,{className:"ct-query-parameters-component",attributes:t,setAttributes:n,resetAll:function(){n({level:"all",hide_empty:"yes",offset:0,orderby:"none",order:"desc",include_term_ids:{},exclude_term_ids:{}})},items:[{label:(0,l.__)("General","blocksy-companion"),items:[{label:(0,l.__)("Offset","blocksy-companion"),hasValue:function(){return 0!==t.offset},reset:function(){n({offset:0})},render:function(){return(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{offset:{type:"ct-number",label:(0,l.__)("Offset","blocksy-companion"),value:"",min:0,max:500}},value:t,hasRevertButton:!1})}},{label:(0,l.__)("Order by","blocksy-companion"),hasValue:function(){return"none"!==t.orderby},reset:function(){n({orderby:"none"})},render:function(){return(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{orderby:{type:"ct-select",label:(0,l.__)("Order by","blocksy-companion"),value:"",choices:[{key:"id",value:(0,l.__)("ID","blocksy-companion")},{key:"name",value:(0,l.__)("Name","blocksy-companion")},{key:"count",value:(0,l.__)("Count","blocksy-companion")},{key:"rand",value:(0,l.__)("Random","blocksy-companion")}]}},value:t,hasRevertButton:!1})}},{label:(0,l.__)("Order","blocksy-companion"),hasValue:function(){return"desc"!==t.order},reset:function(){n({order:"desc"})},render:function(){return(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{order:{type:"ct-select",label:(0,l.__)("Order","blocksy-companion"),value:"",choices:[{key:"DESC",value:(0,l.__)("Descending","blocksy-companion")},{key:"ASC",value:(0,l.__)("Ascending","blocksy-companion")}]}},value:t,hasRevertButton:!1})}},{label:(0,l.__)("Level","blocksy-companion"),hasValue:function(){return"all"!==t.level},reset:function(){n({level:"all"})},render:function(){return(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{level:{type:"ct-select",label:(0,l.__)("Level","blocksy-companion"),value:"",choices:[{key:"all",value:(0,l.__)("All Taxonomies","blocksy-companion")},{key:"parent",value:(0,l.__)("Only Parent Taxonomies","blocksy-companion")},{key:"relevant",value:(0,l.__)("Relevant Taxonomies","blocksy-companion")}]}},value:t,hasRevertButton:!1})}},{label:(0,l.__)("Taxonomies Visibility","blocksy-companion"),hasValue:function(){return"no"===t.hide_empty},reset:function(){n({hide_empty:"yes"})},render:function(){return(0,r.createElement)(c.__experimentalToggleGroupControl,{label:(0,l.__)("Hide Empty Taxonomies","blocksy-companion"),value:t.hide_empty,isBlock:!0,onChange:function(e){n({hide_empty:e})}},(0,r.createElement)(c.__experimentalToggleGroupControlOption,{value:"no",label:(0,l.__)("No","blocksy-companion")}),(0,r.createElement)(c.__experimentalToggleGroupControlOption,{value:"yes",label:(0,l.__)("Yes","blocksy-companion")}))}}]},...i?[i]:[]],label:(0,l.__)("Parameters","blocksy-companion")}))};function lt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function it(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):lt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var at=function({clientId:e,className:t,attributes:o,setAttributes:n,context:i}){const s=(0,a.useInnerBlocksProps)({},{}),u=(0,v.useSelect)(function(t){return!!t(a.store).getBlocks(e).length},[e]),p=!u&&"default"!==o.design,d=(ge()||[]).reduce(function(e,t){return e[t.slug]=t.name,e},{}),{uniqueId:m,props:f}=re({attributes:o,setAttributes:n,clientId:e,blockType:"blocksy/tax-query"}),{postId:b}=i,y=(0,r.useRef)(),h=(0,a.__experimentalUseBorderProps)(o),_=(0,a.useBlockProps)({ref:y,className:t,style:it({},h.style)}),[k,w]=(0,r.useState)(!1);return(0,r.createElement)(React.Fragment,null,k&&(0,r.createElement)(nt,{clientId:e,attributes:o,setIsPatternSelectionModalOpen:w,postType:o.taxonomy}),p?(0,r.createElement)("div",g({},_,f),(0,r.createElement)(Ye,{setIsPatternSelectionModalOpen:w,attributes:o,setAttributes:n,clientId:e})):(0,r.createElement)("div",g({},_,f),"default"===o.design&&(0,r.createElement)(Je,{uniqueId:m,attributes:o,postId:b}),u&&(0,r.createElement)("div",s)),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,null,(0,r.createElement)(c.ToolbarButton,{className:"components-toolbar__control",icon:"layout",label:(0,l.__)("Reset layout","blocksy-companion"),disabled:p,onClick:function(){u?(0,v.dispatch)("core/block-editor").replaceInnerBlocks(e,[],!1):(0,v.dispatch)("core/block-editor").updateBlockAttributes(e,{design:""})}}))),!p&&(0,r.createElement)(React.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n({[e]:t})},options:{taxonomy:{type:"ct-select",label:(0,l.__)("Taxonomy","blocksy-companion"),value:"",defaultToFirstItem:!1,choices:d,purpose:"default"},limit:{type:"ct-number",label:(0,l.__)("Limit","blocksy-companion"),value:"",min:1,max:200},has_slideshow:{type:"ct-switch",label:(0,l.__)("Slideshow","blocksy-companion"),value:""},has_slideshow_condition:{type:"ct-condition",condition:{has_slideshow:"yes"},options:{has_slideshow_arrows:{type:"ct-switch",label:(0,l.__)("Arrows","blocksy-companion"),value:""},has_slideshow_autoplay:{type:"ct-switch",label:(0,l.__)("Autoplay","blocksy-companion"),value:""},has_slideshow_autoplay_condition:{type:"ct-condition",condition:{has_slideshow_autoplay:"yes"},options:{has_slideshow_autoplay_speed:{type:"ct-number",label:(0,l.__)("Autoplay Speed","blocksy-companion"),value:"",min:1,max:100}}}}},has_pagination_condition:{type:"ct-condition",condition:{has_slideshow:"no"},options:{has_pagination:{type:"ct-switch",label:(0,l.__)("Pagination","blocksy-companion"),value:""}}}},value:o,hasRevertButton:!1}))),(0,r.createElement)(rt,{attributes:o,setAttributes:n,context:i})),(0,r.createElement)(a.InspectorControls,{group:"advanced"},(0,r.createElement)(c.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,l.__)("Block ID","blocksy-companion"),value:m,onChange:function(e){},onFocus:function(e){e.target.select()},help:(0,l.__)("Please look at the documentation for more information on why this is useful.","blocksy-companion")})))};var ct=function(e){const t=a.useBlockProps.save(),o=a.useInnerBlocksProps.save(t);return(0,r.createElement)("div",o)},st=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/tax-query","category":"blocksy-blocks","attributes":{"uniqueId":{"type":"string","default":""},"taxonomy":{"type":"string","default":"category"},"level":{"type":"string","default":"all"},"limit":{"type":"number","default":5},"hide_empty":{"type":"string","default":"yes"},"include_term_ids":{"type":"object","default":{}},"exclude_term_ids":{"type":"object","default":{}},"order":{"type":"string","default":"desc"},"orderby":{"type":"string","default":"none"},"offset":{"type":"number","default":0},"design":{"type":"string","default":""},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"linkColor":{"type":"string"},"customLinkColor":{"type":"string"},"linkHoverColor":{"type":"string"},"customLinkHoverColor":{"type":"string"},"has_slideshow":{"type":"string","default":"no"},"has_slideshow_arrows":{"type":"string","default":"yes"},"has_slideshow_autoplay":{"type":"string","default":"no"},"has_slideshow_autoplay_speed":{"type":"number","default":3},"has_pagination":{"type":"string","default":"no"}},"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"color":{"gradients":true,"link":false,"__experimentalDefaultControls":{"text":false,"background":true,"link":false}}},"usesContext":["postId","postType"],"providesContext":{"uniqueId":"uniqueId","taxonomy":"taxonomy","level":"level","limit":"limit","hide_empty":"hide_empty","order":"order","orderby":"orderby","offset":"offset","include_term_ids":"include_term_ids","exclude_term_ids":"exclude_term_ids","has_slideshow":"has_slideshow","has_slideshow_arrows":"has_slideshow_arrows","has_slideshow_autoplay":"has_slideshow_autoplay","has_slideshow_autoplay_speed":"has_slideshow_autoplay_speed","has_pagination":"has_pagination"}}');function ut(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function pt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ut(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}(0,i.registerBlockType)("blocksy/tax-query",pt(pt({},st),{},{title:(0,l.__)("Advanced Taxonomies","blocksy-companion"),description:(0,l.__)("Create advanced queries based on your specified criterias.","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"}))},edit:function(e){return(0,r.createElement)(at,e)},save:function(){return(0,r.createElement)(ct,null)},deprecated:[{isEligible:function({taxonomy:e}){return"product_brands"===e},migrate:function(){return{taxonomy:"product_brand"}}}]}));var dt=(0,ie.createElement)(ae.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,ie.createElement)(ae.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"}));var mt=(0,ie.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ie.createElement)(ae.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"}));var ft=function({label:e,onChange:t,value:o}){return(0,r.createElement)(c.BaseControl,{label:e},(0,r.createElement)(c.Flex,{gap:4},(0,r.createElement)(c.FlexItem,{isBlock:!0},(0,r.createElement)(c.__experimentalNumberControl,{size:"__unstable-large",onChange:function(e){return t(+e)},value:o,min:1,label:e,hideLabelFromVision:!0})),(0,r.createElement)(c.FlexItem,{isBlock:!0},(0,r.createElement)(c.RangeControl,{value:parseInt(o,10),onChange:function(e){return t(+e)},min:1,max:6,withInputField:!1,label:e,hideLabelFromVision:!0}))))};const bt=["className"],yt=["className"];function ht(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function gt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ht(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const _t=[];function vt({isSlideshow:e,elementDescriptor:t}){const o=(0,a.useInnerBlocksProps)({className:"wp-block-post is-layout-flow"},{template:_t,__unstableDisableLayoutClassNames:!0});if(e){const e=(null==t?void 0:t.attr)||{},{className:n}=e,l=w(e,bt);return(0,r.createElement)("div",g({className:X()("flexy-item",n)},l),(0,r.createElement)("article",o))}return(0,r.createElement)("article",o)}const kt=(0,r.memo)(function({blocks:e,blockContextId:t,isHidden:o,isSlideshow:n,elementDescriptor:l,setActiveBlockContextId:i}){const c=(0,a.__experimentalUseBlockPreview)({blocks:e,props:{className:"wp-block-post is-layout-flow"}}),s=function(){i(t)};if(o)return null;if(n){const e=(null==l?void 0:l.attr)||{},{className:t}=e,o=w(e,yt);return(0,r.createElement)("div",g({className:X()("flexy-item",t)},o),(0,r.createElement)("article",g({tabIndex:0},c,{role:"button",onClick:s,onKeyPress:s})))}return(0,r.createElement)("article",g({},c,{tabIndex:0,role:"button",onClick:s,onKeyPress:s}))}),wt=function({has_slideshow_arrows:e,sliderDescriptor:t}){return e?(0,r.createElement)(React.Fragment,null,(0,r.createElement)("span",g({class:"flexy-arrow-prev"},t.arrowsDescritor.left),(0,r.createElement)("svg",{width:"16",height:"10",fill:"currentColor",viewBox:"0 0 16 10"},(0,r.createElement)("path",{d:"M15.3 4.3h-13l2.8-3c.3-.3.3-.7 0-1-.3-.3-.6-.3-.9 0l-4 4.2-.2.2v.6c0 .1.1.2.2.2l4 4.2c.3.4.6.4.9 0 .3-.3.3-.7 0-1l-2.8-3h13c.2 0 .4-.1.5-.2s.2-.3.2-.5-.1-.4-.2-.5c-.1-.1-.3-.2-.5-.2z"}))),(0,r.createElement)("span",g({class:"flexy-arrow-next"},t.arrowsDescritor.right),(0,r.createElement)("svg",{width:"16",height:"10",fill:"currentColor",viewBox:"0 0 16 10"},(0,r.createElement)("path",{d:"M.2 4.5c-.1.1-.2.3-.2.5s.1.4.2.5c.1.1.3.2.5.2h13l-2.8 3c-.3.3-.3.7 0 1 .3.3.6.3.9 0l4-4.2.2-.2V5v-.3c0-.1-.1-.2-.2-.2l-4-4.2c-.3-.4-.6-.4-.9 0-.3.3-.3.7 0 1l2.8 3H.7c-.2 0-.4.1-.5.2z"})))):null};var Ct=function({clientId:e,className:t,attributes:o,attributes:{layout:n,verticalAlignment:i},setAttributes:s,context:u,__unstableLayoutClassNames:p}){const{postId:d,has_slideshow:m,has_slideshow_arrows:f,uniqueId:b}=u,[y,h]=(0,r.useState)(),{type:_,columnCount:k=3}=n||{},w="grid"===_,C=null!==k,O="yes"===m,x=W(function({attributes:e,context:t}){const{style:o,layout:n,verticalAlignment:r}=e,{has_slideshow:l,uniqueId:i}=t,{type:c,columnCount:s=3}=n||{},u="grid"===c,p=null!==s,d="yes"===l;let m="";o&&o.spacing&&o.spacing.blockGap&&(m=(0,a.getSpacingPresetCssVar)(o.spacing.blockGap)),m||(m="CT_CSS_SKIP_RULE");let f=[],b={desktop:1,tablet:1,mobile:1};if(u&&r&&f.push({variables:{selector:`[data-id='${i}']`,variable:"align-items"},value:"top"===r?"flex-start":"bottom"===r?"flex-end":"center"}),u&&r&&f.push({variables:{selector:`[data-id='${i}']`,variable:"align-items"},value:"top"===r?"flex-start":"bottom"===r?"flex-end":"center"}),u&&p){b={desktop:s,tablet:e.tabletColumns,mobile:e.mobileColumns},f.push({variables:{selector:`[data-id='${i}']`,variable:"grid-columns-gap",unit:""},value:m});let t={desktop:s,tablet:e.tabletColumns,mobile:e.mobileColumns};d&&(t={desktop:`${(100/s).toFixed(2)}%`,tablet:`${(100/e.tabletColumns).toFixed(2)}%`,mobile:`${(100/e.mobileColumns).toFixed(2)}%`}),f.push({variables:{selector:`[data-id='${i}']`,variable:"grid-columns-width",unit:"",responsive:!0},value:t})}else d||f.push({variables:{selector:`[data-id='${i}'] :where(.wp-block-post)`,variableType:"property",variable:"margin-block-end",unit:"",responsive:!0},value:m});if(d){const e={desktop:"",tablet:"",mobile:""};Object.keys(e).forEach(function(t){e[t]=[`[data-id='${i}']`,'[data-flexy="no"]',`.flexy-item:nth-child(n + ${parseFloat(b[t])+1})`].join(" ")}),f.push({variables:{selector:e,variable:"height",responsive:!0},value:"1px"})}return f}({attributes:o,context:u})),E=(0,a.useBlockProps)({className:X()(p,{"ct-query-template-grid":w&&!O,"ct-query-template-default":!w&&!O,"is-layout-flow":!w&&!O,"ct-query-template":O,"is-layout-slider":O}),"data-id":b}),{blockData:P}=$({attributes:u,previewedPostId:d}),S=q({isSlideshow:O,context:u,attributes:o,toWatch:P?P.all_posts:{}}),{blocks:j}=(0,v.useSelect)(function(t){const{getBlocks:o}=t(a.store);return{blocks:o(e)}},[e]);if(!P)return(0,r.createElement)("p",E,(0,r.createElement)(c.Spinner,null));let I=P.all_posts.map(function(e){return{postId:e.ID,postType:e.post_type}});const T=[{icon:dt,title:(0,l.__)("List view"),onClick:function(){s({layout:{type:"default"},tabletColumns:2,mobileColumns:1})},isActive:!w},{icon:mt,title:(0,l.__)("Grid view"),onClick:function(){s({layout:{type:"grid",columnCount:3},tabletColumns:2,mobileColumns:1})},isActive:w}],D=function({isSlideshow:e,elementDescriptorForIndex:t}){return(0,r.createElement)(React.Fragment,null,0===I.length&&(0,r.createElement)("p",null,(0,l.__)("No results found.","blocksy-companion")),I.length>0&&I.map(function(o,n){var l,i;return(0,r.createElement)(a.BlockContextProvider,{key:o.postId,value:o},o.postId===(y||(null===(l=I[0])||void 0===l?void 0:l.postId))?(0,r.createElement)(vt,{isSlideshow:e,elementDescriptor:t?t(n):null}):null,(0,r.createElement)(kt,{blocks:j,blockContextId:o.postId,setActiveBlockContextId:h,isSlideshow:e,elementDescriptor:t?t(n):null,isHidden:o.postId===(y||(null===(i=I[0])||void 0===i?void 0:i.postId))}))}))};return(0,r.createElement)(React.Fragment,null,(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,{controls:T}),w?(0,r.createElement)(a.BlockVerticalAlignmentToolbar,{onChange:function(e){s({verticalAlignment:e})},value:i}):null),(0,r.createElement)(a.InspectorControls,null,w&&C?(0,r.createElement)(c.PanelBody,{title:(0,l.__)("Layout","blocksy-companion"),initialOpen:!0},(0,r.createElement)(ft,{label:(0,l.__)("Desktop Columns","blocksy-companion"),onChange:function(e){return s({layout:gt(gt({},n),{},{columnCount:e})})},value:k}),(0,r.createElement)(ft,{label:(0,l.__)("Tablet Columns","blocksy-companion"),onChange:function(e){return s({tabletColumns:e})},value:null==o?void 0:o.tabletColumns}),(0,r.createElement)(ft,{label:(0,l.__)("Mobile Columns","blocksy-companion"),onChange:function(e){return s({mobileColumns:e})},value:null==o?void 0:o.mobileColumns})):null,(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){s({[e]:t})},options:{has_item_link:{type:"ct-switch",label:(0,l.__)("Link to post","blocksy-companion"),value:""}},value:o,hasRevertButton:!1}))),(0,r.createElement)("div",E,O?(0,r.createElement)("div",g({class:"flexy-container","data-flexy":"no"},S.flexyContainerAttr),(0,r.createElement)("div",{class:"flexy"},(0,r.createElement)("div",{class:"flexy-view","data-flexy-view":"boxed"},(0,r.createElement)("div",{class:"flexy-items"},D({isSlideshow:O,elementDescriptorForIndex:S.elementDescriptorForIndex}))),(0,r.createElement)(wt,{has_slideshow_arrows:"yes"===f,sliderDescriptor:S}))):D({isSlideshow:O})),P&&"yes"===u.has_pagination&&!O&&(0,r.createElement)(r.RawHTML,null,P.pagination_output),x||null)};var Ot=function(){return(0,r.createElement)(a.InnerBlocks.Content,null)},xt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/post-template","parent":["blocksy/query"],"title":"Post Template","category":"theme","description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","supports":{"reusable":false,"html":false,"layout":false,"spacing":{"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true}}},"attributes":{"tabletColumns":{"type":"number","default":2},"mobileColumns":{"type":"number","default":1},"verticalAlignment":{"type":"string"},"layout":{"type":"object"},"has_item_link":{"type":"string","default":"no"}},"usesContext":["uniqueId","post_type","limit","order","orderby","orderby_custom","offset","postId","postType","has_slideshow","has_slideshow_arrows","has_slideshow_autoplay","has_slideshow_autoplay_speed","has_pagination","include_term_ids","exclude_term_ids","sticky_posts"],"providesContext":{"has_item_link":"has_item_link"}}');function Et(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Pt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Et(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Et(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}(0,i.registerBlockType)("blocksy/post-template",Pt(Pt({},xt),{},{title:(0,l.__)("Post Template","blocksy-companion"),description:(0,l.__)("Post Template","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},edit:function(e){return(0,r.createElement)(Ct,e)},save:Ot}));const St=["className"],jt=["className"];function It(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Tt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?It(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):It(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const Dt=[];function At({isSlideshow:e,termId:t,elementDescriptor:o}){const n=(0,a.useInnerBlocksProps)({className:X()("wp-block-term is-layout-flow",[])},{template:Dt,__unstableDisableLayoutClassNames:!0});if(e){const e=(null==o?void 0:o.attr)||{},{className:t}=e,l=w(e,St);return(0,r.createElement)("div",g({className:X()("flexy-item",t)},l),(0,r.createElement)("article",n))}return(0,r.createElement)("div",n)}const Bt=(0,r.memo)(function({blocks:e,blockContextId:t,isHidden:o,isSlideshow:n,elementDescriptor:l,setActiveBlockContextId:i,termId:c}){const s=(0,a.__experimentalUseBlockPreview)({blocks:e,props:{className:X()("wp-block-term is-layout-flow",[])}}),u=function(){i(t)};if(o)return null;if(n){const e=(null==l?void 0:l.attr)||{},{className:t}=e,o=w(e,jt);return(0,r.createElement)("div",g({className:X()("flexy-item",t)},o),(0,r.createElement)("div",g({tabIndex:0},s,{role:"button",onClick:u,onKeyPress:u})))}return(0,r.createElement)("div",g({},s,{tabIndex:0,role:"button",onClick:u,onKeyPress:u}))});var Ht=function({clientId:e,attributes:{layout:t,verticalAlignment:o,style:n},attributes:i,setAttributes:s,context:u,__unstableLayoutClassNames:p}){const{postId:d,has_slideshow:m,has_slideshow_arrows:f,uniqueId:b}=u,[y,h]=(0,r.useState)(),{type:_,columnCount:k=3}=t||{},w="grid"===_,C="yes"===m,O=W(function({attributes:e,context:t}){const{style:o,layout:n}=e,{has_slideshow:r,uniqueId:l}=t,{type:i,columnCount:c=3}=n||{},s="grid"===i,u=null!==c,p="yes"===r;let d="";o&&o.spacing&&o.spacing.blockGap&&(d=(0,a.getSpacingPresetCssVar)(o.spacing.blockGap)),d||(d="CT_CSS_SKIP_RULE");let m=[],f={desktop:1,tablet:1,mobile:1};if(s&&u){f={desktop:c,tablet:e.tabletColumns,mobile:e.mobileColumns},m.push({variables:{selector:`[data-id='${l}']`,variable:"grid-columns-gap",unit:""},value:d});let t={desktop:c,tablet:e.tabletColumns,mobile:e.mobileColumns};p&&(t={desktop:`${(100/c).toFixed(2)}%`,tablet:`${(100/e.tabletColumns).toFixed(2)}%`,mobile:`${(100/e.mobileColumns).toFixed(2)}%`}),m.push({variables:{selector:`[data-id='${l}']`,variable:"grid-columns-width",unit:"",responsive:!0},value:t})}else p||m.push({variables:{selector:`[data-id='${l}'] :where(.wp-block-term)`,variableType:"property",variable:"margin-block-end",unit:""},value:d});if(p){const e={desktop:"",tablet:"",mobile:""};Object.keys(e).forEach(function(t){e[t]=[`[data-id='${l}']`,'[data-flexy="no"]',`.flexy-item:nth-child(n + ${parseFloat(f[t])+1})`].join(" ")}),m.push({variables:{selector:e,variable:"height",responsive:!0},value:"1px"})}return m}({attributes:i,context:u})),x=(0,a.useBlockProps)({className:X()(p,{"ct-query-template-grid":w&&!C,"ct-query-template-default":!w&&!C,"is-layout-flow":!w&&!C,"ct-query-template":C,"is-layout-slider":C}),"data-id":b}),{blockData:E}=Ke({attributes:u,previewedPostId:d}),P=q({isSlideshow:C,attributes:i,context:u,toWatch:E?E.all_terms:{}}),{blocks:S}=(0,v.useSelect)(function(t){const{getBlocks:o}=t(a.store);return{blocks:o(e)}},[e]);if(!E)return(0,r.createElement)("p",x,(0,r.createElement)(c.Spinner,null));let j=E.all_terms.map(function(e){return{termId:e.term_id,termIcon:null==e?void 0:e.icon,termImage:null==e?void 0:e.image}});const I=[{icon:dt,title:(0,l.__)("List view"),onClick:function(){s({layout:{type:"default"},tabletColumns:2,mobileColumns:1})},isActive:!w},{icon:mt,title:(0,l.__)("Grid view"),onClick:function(){s({layout:{type:"grid",columnCount:3},tabletColumns:2,mobileColumns:1})},isActive:w}],T=function({isSlideshow:e,elementDescriptorForIndex:t}){return(0,r.createElement)(React.Fragment,null,0===j.length&&(0,r.createElement)("p",null,(0,l.__)("No results found.","blocksy-companion")),j.length>0&&j.map(function(o,n){var l,i;return(0,r.createElement)(a.BlockContextProvider,{key:o.termId,value:o},o.termId===(y||(null===(l=j[0])||void 0===l?void 0:l.termId))?(0,r.createElement)(At,{isSlideshow:e,termId:o.termId,elementDescriptor:t?t(n):null}):null,(0,r.createElement)(Bt,{blocks:S,blockContextId:o.termId,setActiveBlockContextId:h,isSlideshow:e,termId:o.termId,elementDescriptor:t?t(n):null,isHidden:o.termId===(y||(null===(i=j[0])||void 0===i?void 0:i.termId))}))}))};return(0,r.createElement)(React.Fragment,null,(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,{controls:I}),w?(0,r.createElement)(a.BlockVerticalAlignmentToolbar,{onChange:function(e){s({verticalAlignment:e})},value:o}):null),(0,r.createElement)(a.InspectorControls,null,w?(0,r.createElement)(c.PanelBody,{title:"Layout",initialOpen:!0},(0,r.createElement)(ft,{label:(0,l.__)("Desktop Columns","blocksy-companion"),onChange:function(e){return s({layout:Tt(Tt({},t),{},{columnCount:e})})},value:k}),(0,r.createElement)(ft,{label:(0,l.__)("Tablet Columns","blocksy-companion"),onChange:function(e){return s({tabletColumns:e})},value:null==i?void 0:i.tabletColumns}),(0,r.createElement)(ft,{label:(0,l.__)("Mobile Columns","blocksy-companion"),onChange:function(e){return s({mobileColumns:e})},value:null==i?void 0:i.mobileColumns})):null,(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){s({[e]:t})},options:{has_item_link:{type:"ct-switch",label:(0,l.__)("Link to archive page","blocksy-companion"),value:""}},value:i,hasRevertButton:!1}))),(0,r.createElement)("div",x,C?(0,r.createElement)("div",g({class:"flexy-container","data-flexy":"no"},P.flexyContainerAttr),(0,r.createElement)("div",{class:"flexy"},(0,r.createElement)("div",{class:"flexy-view","data-flexy-view":"boxed"},(0,r.createElement)("div",{class:"flexy-items"},T({isSlideshow:C,elementDescriptorForIndex:P.elementDescriptorForIndex}))),(0,r.createElement)(wt,{has_slideshow_arrows:"yes"===f,sliderDescriptor:P}))):T({isSlideshow:C})),E&&"yes"===u.has_pagination&&!C&&(0,r.createElement)(r.RawHTML,null,E.pagination_output),O||null)};var Nt=function(){return(0,r.createElement)(a.InnerBlocks.Content,null)},Rt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/tax-template","parent":["blocksy/tax-query"],"title":"Tax Template","category":"theme","description":"Contains the block elements used to render a taxonomy, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","supports":{"reusable":false,"html":false,"layout":false,"spacing":{"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true}}},"attributes":{"tabletColumns":{"type":"number","default":2},"mobileColumns":{"type":"number","default":1},"verticalAlignment":{"type":"string"},"layout":{"type":"object"},"has_item_link":{"type":"string","default":"no"}},"usesContext":["uniqueId","taxonomy","level","limit","hide_empty","order","orderby","offset","include_term_ids","exclude_term_ids","has_slideshow","has_slideshow_arrows","has_slideshow_autoplay","has_slideshow_autoplay_speed","has_pagination"],"providesContext":{"has_item_link":"has_item_link"}}');function zt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Mt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?zt(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):zt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}(0,i.registerBlockType)("blocksy/tax-template",Mt(Mt({},Rt),{},{title:(0,l.__)("Taxonomy Template","blocksy-companion"),description:(0,l.__)("Taxonomy Template","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},edit:function(e){return(0,r.createElement)(Ht,e)},save:Nt}));const Ft={};var Vt=function(e,t,o){const[n,l]=(0,r.useState)([]),[i,a]=(0,r.useState)([]),c=(0,r.useCallback)(async function(){const r=new FormData,i=JSON.stringify(t);var c;(r.append("action","blocksy_get_dynamic_block_view"),r.append("block",e),r.append("attributes",i),Ft[i])?(l(o(Ft[i])),a(!1)):(n||a(!0),fetch((null===(c=window.ct_localizations||ct_customizer_localizations)||void 0===c?void 0:c.ajax_url)||wp.ajax.settings.url,{method:"POST",body:r}).then(function(e){return e.json()}).then(function({data:{content:e}}){l(o(e)),a(!1),Ft[i]=e}))},[t,n]);return(0,r.useEffect)(function(){c()},[t]),{isLoading:i,preview:n}};const Lt=function(e){return Object.keys(e).reduce(function(t,o){return t[o]={type:"string",default:e[o]},t},{})},$t={textColor:"",customTextColor:"",textHoverColor:"",customTextHoverColor:"",iconsColor:"",customIconsColor:"",iconsHoverColor:"",customIconsHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},Ut=Lt($t);function qt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Gt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?qt(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):qt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const Wt=Gt({about_alignment:"center",avatar_shape:"round",about_avatar_size:"small",post_widget_thumb_size:"default",about_social_type:"rounded",about_social_icons_fill:"outline",about_social_icons_color:"official",about_text:"Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua tincidunt tortor aliquam.",about_name:"John Doe",about_items_spacing:"",about_social_icons_size:""},$t);var Zt=function({attributes:e,setAttributes:t}){const o=(0,r.useRef)({image:"",socials:""}),{about_name:n,about_text:l,about_source:i,about_alignment:s,avatar_shape:u,about_avatar_size:p,about_social_type:d,about_social_icons_fill:m,about_items_spacing:f,about_social_icons_size:b,about_social_icons_color:y}=e,h=(0,r.useCallback)(function(e){const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector(".ct-about-me-block");if(n){n.querySelector("div").dataset.alignment=s;const e=n.querySelector(".ct-media-container");e&&(e.dataset.shape=u,e.dataset.size=p);const t=n.querySelector(".ct-social-box");var r;if(t&&(t.dataset.iconsType="simple"===d?d:`${d}:${m}`,t.dataset.color=y),"custom"===i)o.current={image:(null===(r=n.querySelector(".ct-media-container"))||void 0===r?void 0:r.outerHTML)||"",socials:(null==t?void 0:t.outerHTML)||""}}return n.innerHTML},[s,u,i,p,d,m,b,f,y]),{isLoading:g,preview:_}=Vt("about-me",Gt(Gt({},e),Wt),h);return g?(0,r.createElement)(c.Spinner,null):"from_wp"===i?(0,r.createElement)(r.RawHTML,null,_):(0,r.createElement)("div",{"data-alignment":s},(0,r.createElement)(r.RawHTML,null,o.current.image),(0,r.createElement)("div",{className:"ct-about-me-name"},(0,r.createElement)(a.RichText,{tagName:"span",value:n,placeholder:"User Name",onChange:function(e){return t({about_name:e})}})),(0,r.createElement)(a.RichText,{tagName:"div",className:"ct-about-me-text",value:l,placeholder:"User Description",onChange:function(e){return t({about_text:e})}}),(0,r.createElement)(r.RawHTML,null,o.current.socials))};var Xt=function({attributes:e,setAttributes:t,options:o}){return(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,o){t({[e]:o})},options:o,value:e,hasRevertButton:!1})))};function Kt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Jt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Kt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var Yt=(0,a.withColors)({textColor:"color"},{textHoverColor:"color"},{iconsColor:"color"},{iconsHoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})(function({attributes:e,setAttributes:t,clientId:o,className:n,textColor:i,setTextColor:c,textHoverColor:s,setTextHoverColor:u,iconsColor:p,setIconsColor:d,iconsHoverColor:m,setIconsHoverColor:f,backgroundColor:b,setBackgroundColor:y,backgroundHoverColor:h,setBackgroundHoverColor:g,borderColor:v,setBorderColor:k,borderHoverColor:w,setBorderHoverColor:C}){const{about_alignment:O="center",about_items_spacing:x="",about_social_icons_size:E="",about_social_type:P="simple",about_social_icons_fill:S="outline",about_social_icons_color:j="default"}=e,I=(0,r.useRef)(),T=(0,a.useBlockProps)({ref:I,className:{"ct-about-me-block":!0,className:n},"data-alignment":O,style:Jt(Jt({"--theme-block-text-color":null==i?void 0:i.color,"--theme-link-hover-color":null==i?void 0:i.color,"--theme-icon-color":null==p?void 0:p.color,"--theme-icon-hover-color":null==m?void 0:m.color,"--background-color":"solid"===S?null==b?void 0:b.color:null==v?void 0:v.color,"--background-hover-color":"solid"===S?null==h?void 0:h.color:null==w?void 0:w.color},E?{"--theme-icon-size":`${E}px`}:{}),x?{"--items-spacing":`${x}px`}:{})});return(0,r.createElement)("div",T,(0,r.createElement)(Zt,{attributes:e,setAttributes:t}),(0,r.createElement)(Xt,{attributes:e,setAttributes:t,options:to}),(0,r.createElement)(a.InspectorControls,{group:"styles"},(0,r.createElement)(_,{label:(0,l.__)("Text Color","blocksy-companion"),resetAll:function(){c($t.textColor),u($t.textHoverColor)},panelId:o,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return c(e||$t.textColor)}},{colorValue:s.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return u(e||$t.textHoverColor)}}]}),"default"===j?(0,r.createElement)(_,{label:(0,l.__)("Icons Color","blocksy-companion"),resetAll:function(){d($t.iconsColor),f($t.iconsHoverColor)},panelId:o,settings:[{colorValue:p.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return d(e||$t.iconsColor)}},{colorValue:m.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return f(e||$t.iconsHoverColor)}}]}):null,"simple"!==P&&"default"===j&&("solid"===S?(0,r.createElement)(_,{label:(0,l.__)("Icons Background Color","blocksy-companion"),resetAll:function(){y($t.backgroundColor),g($t.backgroundHoverColor)},panelId:o,settings:[{colorValue:b.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return y(e||$t.backgroundColor)}},{colorValue:h.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return g(e||$t.backgroundHoverColor)}}]}):(0,r.createElement)(_,{label:(0,l.__)("Icons Border Color","blocksy-companion"),resetAll:function(){k($t.borderColor),C($t.borderHoverColor)},panelId:o,settings:[{colorValue:v.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return k(e||$t.borderColor)}},{colorValue:w.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return C(e||$t.borderHoverColor)}}]}))))});function Qt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function eo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Qt(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const to=(0,U.getOptionsForBlock)("about_me"),oo=(0,U.getAttributesFromOptions)(to);(0,i.registerBlockType)("blocksy/about-me",{apiVersion:3,title:(0,l.__)("About Me Controls","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{d:"M5.8 13H4.2v-1c0-1.5 1.2-2.8 2.8-2.8h4c1.5 0 2.8 1.2 2.8 2.8v1h-1.5v-1c0-.7-.6-1.2-1.2-1.2H7c-.7 0-1.2.6-1.2 1.2v1zM4 21h9v-1.5H4V21zm0-5.5V17h16v-1.5H4zm2.5-10C6.5 4.1 7.6 3 9 3s2.5 1.1 2.5 2.5S10.4 8 9 8 6.5 6.9 6.5 5.5zm1.5 0c0 .6.4 1 1 1s1-.4 1-1-.4-1-1-1-1 .4-1 1z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:eo(eo({},oo),Ut),edit:function(e){return(0,r.createElement)(Yt,e)},save:function(){return(0,r.createElement)("div",null,"Blocksy: About Me")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-about-me",title:(0,l.__)("About Me","blocksy-companion"),description:(0,l.__)("Showcase your personal information across your website.","blocksy-companion"),attributes:{heading:(0,l.__)("About Me","blocksy-companion"),block:"blocksy/about-me"},isDefault:!0,isActive:function(e){return"blocksy/about-me"===e.block},icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{d:"M5.8 13H4.2v-1c0-1.5 1.2-2.8 2.8-2.8h4c1.5 0 2.8 1.2 2.8 2.8v1h-1.5v-1c0-.7-.6-1.2-1.2-1.2H7c-.7 0-1.2.6-1.2 1.2v1zM4 21h9v-1.5H4V21zm0-5.5V17h16v-1.5H4zm2.5-10C6.5 4.1 7.6 3 9 3s2.5 1.1 2.5 2.5S10.4 8 9 8 6.5 6.9 6.5 5.5zm1.5 0c0 .6.4 1 1 1s1-.4 1-1-.4-1-1-1-1 .4-1 1z"}))}});const no={textColor:"",customTextColor:"",textInitialColor:"",customTextInitialColor:"",textHoverColor:"",customTextHoverColor:"",iconsColor:"",customIconsColor:"",iconsHoverColor:"",customIconsHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},ro=Lt(no);function lo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function io(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):lo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const ao=io({contacts_icons_size:20,contacts_items_spacing:"",contacts_icon_shape:"rounded",contacts_icon_fill_type:"outline",contact_link_target:"no",contact_text:"",contacts_items_direction:"column",link_icons:"no"},no);var co=function({attributes:e}){const{contacts_icons_size:t=20,contacts_items_spacing:o="",contacts_icon_shape:n="rounded",contacts_icon_fill_type:l="outline",contact_link_target:i="no",contacts_items_direction:a="column"}=e,s=(0,r.useCallback)(function(e){const t=document.createElement("div");t.innerHTML=e;const o=t.querySelector(".ct-contact-info-block ul"),n=t.querySelectorAll("a");return n&&n.forEach(function(e){e.target="yes"===i?"_blank":"_self"}),o.innerHTML},[t,n,l,i,a,o]),{isLoading:u,preview:p}=Vt("contact-info",io(io({},e),ao),s);return u?(0,r.createElement)(c.Spinner,null):(0,r.createElement)("ul",{"data-icons-type":"simple"===n?n:`${n}:${l}`,dangerouslySetInnerHTML:{__html:p}})};function so(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function uo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?so(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):so(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var po,mo=(0,a.withColors)({textColor:"color"},{textInitialColor:"color"},{textHoverColor:"color"},{iconsColor:"color"},{iconsHoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})(function({attributes:e,setAttributes:t,clientId:o,className:n,textColor:i,setTextColor:c,textInitialColor:s,setTextInitialColor:u,textHoverColor:p,setTextHoverColor:d,iconsColor:m,setIconsColor:f,iconsHoverColor:b,setIconsHoverColor:y,backgroundColor:h,setBackgroundColor:g,backgroundHoverColor:v,setBackgroundHoverColor:k,borderColor:w,setBorderColor:C,borderHoverColor:O,setBorderHoverColor:x}){const{contacts_items_direction:E="column",contacts_icons_size:P=20,contacts_items_spacing:S="",contacts_icon_shape:j="rounded",contacts_icon_fill_type:I="outline"}=e,T=(0,r.useRef)(),D=(0,a.useBlockProps)({ref:T,className:{"ct-contact-info-block":!0,className:n},style:uo(uo(uo({"--theme-block-text-color":null==i?void 0:i.color,"--theme-link-initial-color":null==s?void 0:s.color,"--theme-link-hover-color":null==p?void 0:p.color,"--theme-icon-color":null==m?void 0:m.color,"--theme-icon-hover-color":null==b?void 0:b.color,"--background-color":"solid"===I?null==h?void 0:h.color:null==w?void 0:w.color,"--background-hover-color":"solid"===I?null==v?void 0:v.color:null==O?void 0:O.color},P?{"--theme-icon-size":`${P}px`}:{}),S?{"--items-spacing":`${S}px`}:{}),"column"===E?{"--items-direction":E}:{})});return(0,r.createElement)("div",D,(0,r.createElement)(co,{attributes:e,setAttributes:t}),(0,r.createElement)(Xt,{attributes:e,setAttributes:t,options:yo}),(0,r.createElement)(a.InspectorControls,{group:"styles"},(0,r.createElement)(_,{label:(0,l.__)("Text Color","blocksy-companion"),resetAll:function(){c(no.textColor),u(no.textInitialColor),d(no.textHoverColor)},panelId:o,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,l.__)("Text","blocksy-companion"),onColorChange:function(e){return c(e||no.textColor)}},{colorValue:s.color,enableAlpha:!0,label:(0,l.__)("Link Initial","blocksy-companion"),onColorChange:function(e){return u(e||no.textInitialColor)}},{colorValue:p.color,enableAlpha:!0,label:(0,l.__)("Link Hover","blocksy-companion"),onColorChange:function(e){return d(e||no.textHoverColor)}}]}),(0,r.createElement)(_,{label:(0,l.__)("Icons Color","blocksy-companion"),resetAll:function(){f(no.iconsColor),y(no.iconsHoverColor)},panelId:o,settings:[{colorValue:m.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return f(e||no.iconsColor)}},{colorValue:b.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return y(e||no.iconsHoverColor)}}]}),"simple"!==j&&("solid"===I?(0,r.createElement)(_,{label:(0,l.__)("Icons Background Color","blocksy-companion"),resetAll:function(){g(no.backgroundColor),k(no.backgroundHoverColor)},panelId:o,settings:[{colorValue:h.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return g(e||no.backgroundColor)}},{colorValue:v.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return k(e||no.backgroundHoverColor)}}]}):(0,r.createElement)(_,{label:(0,l.__)("Icons Border Color","blocksy-companion"),resetAll:function(){C(no.borderColor),x(no.borderHoverColor)},panelId:o,settings:[{colorValue:w.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return C(e||no.borderColor)}},{colorValue:O.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return x(e||no.borderHoverColor)}}]}))))});function fo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function bo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fo(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):fo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const yo=(0,U.getOptionsForBlock)("contact_info"),ho=(0,U.getAttributesFromOptions)(yo);(0,i.registerBlockType)("blocksy/contact-info",{apiVersion:3,title:(0,l.__)("Contact Info Controls","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}))},supports:{html:!1,inserter:!1,lock:!1,typography:{fontSize:!0}},parent:["blocksy/widgets-wrapper"],attributes:bo(bo({},ho),ro),edit:function(e){return(0,r.createElement)(mo,e)},save:function(){return(0,r.createElement)("div",null,"Blocksy: Contact Info")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-contact-info",title:(0,l.__)("Contact Info","blocksy-companion"),description:(0,l.__)("Display essential contact details to your visitors.","blocksy-companion"),attributes:{heading:(0,l.__)("Contact Info","blocksy-companion"),block:"blocksy/contact-info",hasDescription:!0,description:(null==ho||null===(po=ho.contact_text)||void 0===po?void 0:po.default)||""},isActive:function(e){return"blocksy/contact-info"===e.block},icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}))}});const go={initialColor:"",customInitialColor:"",hoverColor:"",customHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},_o=Lt(go);function vo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function ko(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?vo(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):vo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const wo=ko({link_nofollow:"no",link_target:"no",social_icons_color:"official",social_icons_fill:"outline",social_icons_size:"",items_spacing:"",social_type:"simple"},go),Co={left:"flex-start",center:"center",right:"flex-end","space-between":"space-between"};var Oo=function({attributes:e}){const{justifyContent:t,social_icons_color:o,social_icons_size:n,social_type:l,social_icons_fill:i,items_spacing:a}=e,s=(0,r.useCallback)(function(e){const t=document.createElement("div");return t.innerHTML=e,t.querySelector(".ct-social-box").innerHTML},[o,n,l,i,a]),{isLoading:u,preview:p}=Vt("socials",ko(ko({},e),wo),s);return u?(0,r.createElement)(c.Spinner,null):(0,r.createElement)(r.RawHTML,{className:"ct-social-box",style:ko({},"left"!==t?{justifyContent:Co[t]}:{}),"data-icons-type":"simple"===l?l:`${l}:${i}`,"data-color":o},p)};function xo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Eo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?xo(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):xo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const Po=(0,U.getOptionsForBlock)("socials");var So=(0,a.withColors)({initialColor:"color"},{hoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})(function({attributes:e,setAttributes:t,clientId:o,className:n,initialColor:i,setInitialColor:c,hoverColor:s,setHoverColor:u,backgroundColor:p,setBackgroundColor:d,backgroundHoverColor:m,setBackgroundHoverColor:f,borderColor:b,setBorderColor:y,borderHoverColor:h,setBorderHoverColor:g}){const{items_spacing:v="",social_icons_size:k="",social_type:w="simple",social_icons_fill:C="outline",social_icons_color:O="default"}=e,x=(0,r.useRef)(),E=(0,a.useBlockProps)({ref:x,className:{"ct-socials-block":!0,className:n},style:Eo(Eo({"--theme-icon-color":null==i?void 0:i.color,"--theme-icon-hover-color":null==s?void 0:s.color,"--background-color":"solid"===C?null==p?void 0:p.color:null==b?void 0:b.color,"--background-hover-color":"solid"===C?null==m?void 0:m.color:null==h?void 0:h.color},k?{"--theme-icon-size":`${k}px`}:{}),v?{"--items-spacing":`${v}px`}:{})});return(0,r.createElement)("div",E,(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(a.JustifyContentControl,{label:(0,l.__)("Alignment","blocksy-companion"),value:e.justifyContent,onChange:function(e){return t({justifyContent:e})}})),(0,r.createElement)(Oo,{attributes:e,setAttributes:t}),(0,r.createElement)(Xt,{attributes:e,setAttributes:t,options:Po}),"default"===O?(0,r.createElement)(a.InspectorControls,{group:"styles"},(0,r.createElement)(_,{label:(0,l.__)("Icon Color","blocksy-companion"),resetAll:function(){c(go.initialColor),u(go.hoverColor)},panelId:o,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return c(e||go.initialColor)}},{colorValue:s.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return u(e||go.hoverColor)}}]}),"simple"!==w&&("solid"===C?(0,r.createElement)(_,{label:(0,l.__)("Icons Background Colors","blocksy-companion"),resetAll:function(){d(go.backgroundColor),f(go.backgroundHoverColor)},panelId:o,settings:[{colorValue:p.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return d(e||go.backgroundColor)}},{colorValue:m.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return f(e||go.backgroundHoverColor)}}]}):(0,r.createElement)(_,{label:(0,l.__)("Icons Border Colors","blocksy-companion"),resetAll:function(){y(go.borderColor),g(go.borderHoverColor)},panelId:o,settings:[{colorValue:b.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return y(e||go.borderColor)}},{colorValue:h.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return g(e||go.borderHoverColor)}}]}))):null)});function jo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Io(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?jo(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):jo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const To=(0,U.getOptionsForBlock)("socials"),Do=(0,U.getAttributesFromOptions)(To);(0,i.registerBlockType)("blocksy/socials",{apiVersion:3,title:(0,l.__)("Socials Controls","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{d:"M16.4 14.2c-.8 0-1.5.3-2.1.9l-3.9-2.3c.1-.3.1-.5.1-.8 0-.3-.1-.5-.1-.8L14.3 9c.5.5 1.3.9 2.1.9 1.6 0 2.9-1.3 2.9-2.9S18 4 16.4 4s-2.9 1.3-2.9 2.9c0 .3.1.5.1.8L9.7 10c-.5-.6-1.3-.9-2.1-.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9.8 0 1.5-.3 2.1-.9l3.9 2.3c-.1.3-.1.5-.1.8 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.6-1.3-2.9-2.9-2.9zm0-8.7c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5.7-1.5 1.5-1.5zm-8.8 8c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm8.8 5c-.8 0-1.5-.7-1.5-1.5 0-.3.1-.5.2-.7.3-.4.7-.7 1.2-.7.8 0 1.5.7 1.5 1.5s-.6 1.4-1.4 1.4z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:Io(Io({justifyContent:{type:"string",default:"left"}},Do),_o),edit:function(e){return(0,r.createElement)(So,e)},save:function(){return(0,r.createElement)("div",null,"Blocksy: Socials")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-socials",title:(0,l.__)("Socials","blocksy-companion"),description:(0,l.__)("Display your social media profiles and boost the site engagement.","blocksy-companion"),attributes:{heading:(0,l.__)("Socials","blocksy-companion"),block:"blocksy/socials"},isActive:function(e){return"blocksy/socials"===e.block},icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{d:"M16.4 14.2c-.8 0-1.5.3-2.1.9l-3.9-2.3c.1-.3.1-.5.1-.8 0-.3-.1-.5-.1-.8L14.3 9c.5.5 1.3.9 2.1.9 1.6 0 2.9-1.3 2.9-2.9S18 4 16.4 4s-2.9 1.3-2.9 2.9c0 .3.1.5.1.8L9.7 10c-.5-.6-1.3-.9-2.1-.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9.8 0 1.5-.3 2.1-.9l3.9 2.3c-.1.3-.1.5-.1.8 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.6-1.3-2.9-2.9-2.9zm0-8.7c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5.7-1.5 1.5-1.5zm-8.8 8c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm8.8 5c-.8 0-1.5-.7-1.5-1.5 0-.3.1-.5.2-.7.3-.4.7-.7 1.2-.7.8 0 1.5.7 1.5 1.5s-.6 1.4-1.4 1.4z"}))}});const Ao={initialColor:"",customInitialColor:"",hoverColor:"",customHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},Bo=Lt(Ao);function Ho(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function No(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ho(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ho(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const Ro=No({link_nofollow:"no",share_icons_size:"",items_spacing:""},Ao);var zo=function({attributes:e}){const{share_icons_color:t,share_icons_size:o,share_type:n,share_icons_fill:l,items_spacing:i}=e,a=(0,r.useCallback)(function(e){const t=document.createElement("div");return t.innerHTML=e,t.querySelector(".ct-share-box").innerHTML},[t,o,n,l,i]),{isLoading:s,preview:u}=Vt("share-box",No(No({},e),Ro),a);return s?(0,r.createElement)(c.Spinner,null):(0,r.createElement)(r.RawHTML,{className:"ct-share-box","data-type":"type-3"},u)};function Mo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Fo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Mo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const Vo=(0,U.getOptionsForBlock)("share_box");var Lo=(0,a.withColors)({initialColor:"color"},{hoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})(function({attributes:e,setAttributes:t,clientId:o,className:n,initialColor:i,setInitialColor:c,hoverColor:s,setHoverColor:u,backgroundColor:p,setBackgroundColor:d,backgroundHoverColor:m,setBackgroundHoverColor:f,borderColor:b,setBorderColor:y,borderHoverColor:h,setBorderHoverColor:g}){const{items_spacing:v="",share_icons_size:k="",share_type:w="simple",share_icons_fill:C="outline",share_icons_color:O="default"}=e,x=(0,r.useRef)(),E=(0,a.useBlockProps)({ref:x,className:{"ct-shares-block":!0,className:n},style:Fo(Fo({"--theme-icon-color":null==i?void 0:i.color,"--theme-icon-hover-color":null==s?void 0:s.color,"--background-color":"solid"===C?null==p?void 0:p.color:null==b?void 0:b.color,"--background-hover-color":"solid"===C?null==m?void 0:m.color:null==h?void 0:h.color},k?{"--theme-icon-size":`${k}px`}:{}),v?{"--items-spacing":`${v}px`}:{})});return(0,r.createElement)("div",E,(0,r.createElement)(zo,{attributes:e,setAttributes:t}),(0,r.createElement)(Xt,{attributes:e,setAttributes:t,options:Vo}),"default"===O?(0,r.createElement)(a.InspectorControls,{group:"styles"},(0,r.createElement)(_,{label:(0,l.__)("Icon Color","blocksy-companion"),resetAll:function(){c(Ao.initialColor),u(Ao.hoverColor)},panelId:o,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return c(e||Ao.initialColor)}},{colorValue:s.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return u(e||Ao.hoverColor)}}]}),"simple"!==w&&("solid"===C?(0,r.createElement)(_,{label:(0,l.__)("Icons Background Colors","blocksy-companion"),resetAll:function(){d(Ao.backgroundColor),f(Ao.backgroundHoverColor)},panelId:o,settings:[{colorValue:p.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return d(e||Ao.backgroundColor)}},{colorValue:m.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return f(e||Ao.backgroundHoverColor)}}]}):(0,r.createElement)(_,{label:(0,l.__)("Icons Border Colors","blocksy-companion"),resetAll:function(){y(Ao.borderColor),g(Ao.borderHoverColor)},panelId:o,settings:[{colorValue:b.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return y(e||Ao.borderColor)}},{colorValue:h.color,enableAlpha:!0,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return g(e||Ao.borderHoverColor)}}]}))):null)});function $o(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Uo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?$o(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):$o(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const qo=["facebook","twitter","pinterest","linkedin"],Go=["facebook","twitter","pinterest","linkedin","reddit","hacker_news","vk","ok","telegram","viber","whatsapp","flipboard","line","email","clipboard"];var Wo=[{apiVersion:3,isEligible:function(e){return!e.share_networks},migrate:function(e){const t=Go.reduce(function(t,o){return e[`share_${o}`]?("yes"===e[`share_${o}`]&&t.push({id:o,enabled:!0}),t):(qo.includes(o)&&t.push({id:o,enabled:!0}),t)},[]);return Uo(Uo({},Object.keys(e).reduce(function(t,o){return Go.includes(o.replace("share_",""))||(t[o]=e[o]),t},{})),{},{share_networks:t})},attributes:{title:{type:"string",default:"Share Icons"},share_facebook:{type:"string",default:"yes"},share_twitter:{type:"string",default:"yes"},share_pinterest:{type:"string",default:"yes"},share_linkedin:{type:"string",default:"yes"},share_reddit:{type:"string",default:"no"},share_hacker_news:{type:"string",default:"no"},share_vk:{type:"string",default:"no"},share_ok:{type:"string",default:"no"},share_telegram:{type:"string",default:"no"},share_viber:{type:"string",default:"no"},share_whatsapp:{type:"string",default:"no"},share_flipboard:{type:"string",default:"no"},share_line:{type:"string",default:"no"},share_email:{type:"string",default:"no"},share_clipboard:{type:"string",default:"no"},share_item_tooltip:{type:"string",default:"no"},link_nofollow:{type:"string",default:"no"},share_icons_size:{type:"string",default:""},items_spacing:{type:"string",default:""},share_icons_color:{type:"string",default:"default"},share_type:{type:"string",default:"simple"},share_icons_fill:{type:"string",default:"outline"},initialColor:{type:"string",default:""},customInitialColor:{type:"string",default:""},hoverColor:{type:"string",default:""},customHoverColor:{type:"string",default:""},borderColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},customBorderColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},borderHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},customBorderHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},backgroundColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},customBackgroundColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},backgroundHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},customBackgroundHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"}},save:function(e){return(0,r.createElement)("div",null,"Blocksy: Share Box")}}];function Zo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Xo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Zo(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Zo(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const Ko=(0,U.getOptionsForBlock)("share_box"),Jo=(0,U.getAttributesFromOptions)(Ko);(0,i.registerBlockType)("blocksy/share-box",{apiVersion:3,title:(0,l.__)("Share Box Controls","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{d:"M20 14.6c-.2-.3-.5-.6-.9-.8.1-1.2-.1-2.4-.6-3.5s-1.3-2.1-2.3-2.9c-.4-.3-.8-.5-1.3-.8 0-.6-.2-1.2-.5-1.6-.3-.5-.8-.9-1.4-1.1-1-.4-2.4-.1-3.2.8-.5.5-.8 1.2-.8 2-1 .4-1.8 1-2.5 1.8-.8 1-1.4 2.1-1.6 3.3-.1.6-.1 1.3-.1 2-.7.4-1.2 1-1.4 1.7-.3 1.2.1 2.4 1 3.2s2.3.8 3.3.2c.9.6 1.9 1.1 3 1.2.4.1.8.1 1.2.1.9 0 1.9-.2 2.7-.5.5-.2.9-.5 1.4-.8.2.1.4.2.7.3 1.1.3 2.4-.1 3.1-1 .1-.1.2-.3.3-.4v-.1c.7-.9.6-2.2-.1-3.1zm-9.6-8.1c0-.1 0-.2.1-.3 0 0 0-.1.1-.2 0-.1.1-.2.2-.3l.1-.1s.1-.1.1-.2h.1s.1 0 .1-.1c0 0 .1 0 .1-.1h.1c.1 0 .2-.1.3-.1h.7c.1 0 .1 0 .2.1.1 0 .1.1.2.1 0 0 .1 0 .1.1 0 0 .1 0 .1.1l.1.1.2.2v.1l.1.1s0 .1.1.1V7c0 .1 0 .2-.1.3 0 0 0 .1-.1.1 0 0 0 .1-.1.1 0 0-.1.1-.1.2l-.1.1-.1.1h-.1c-.1 0-.1.1-.2.1h-.2c-.1 0-.2.1-.3.1h-1l.1-.1s-.1 0-.1-.1l-.1-.1-.1-.1-.1-.1v-.1l-.1-.1s0-.1-.1-.1v-.1c0-.1-.1-.2-.1-.3V6.6c-.1 0-.1 0-.1-.1zM8 16.6c0 .1-.1.3-.1.4 0 .1-.1.1-.1.2s-.1.1-.1.1l-.1.1-.3.3-.1.1H7v.1c-.1 0-.2.1-.3.1h-.8c-.1 0-.2 0-.3-.1 0 0-.1 0-.1-.1 0 0-.1 0-.1-.1l-.1-.1h-.1l-.1-.1-.1-.1v-.1c.1-.1 0-.2-.1-.3v-.2c0-.1 0-.2-.1-.2V16.3c0-.1 0-.2.1-.2 0 0 0-.1.1-.2 0-.1.1-.2.1-.2l.1-.1.2-.2.1-.1c.1 0 .1-.1.2-.1h.2c.1 0 .2-.1.3-.1h.6c.1 0 .1 0 .2.1l.3-.2s.1 0 .1.1l.2.2c0 .1.1.1.1.1 0 .1.1.1.1.2v.1c.1.2.2.3.2.5v.4c0-.1 0 0 0 0zm7.1 1.4c-.3.2-.5.3-.8.4h-.1l-.2.1c-.1 0-.3.1-.4.1-.3.1-.5.1-.8.2H11.1l-.2-.1c-.1 0-.3-.1-.4-.1-.3-.1-.5-.2-.8-.3-.1-.1-.2-.1-.3-.2-.1-.1-.3-.1-.4-.2 0 .2 0 .1-.1.1.5-.8.6-1.9.3-2.7-.3-.6-.7-1.1-1.2-1.4-.5-.3-1.1-.5-1.7-.4v-1c0-.3.1-.5.2-.8 0-.1.1-.3.1-.4l.1-.3c.1-.2.2-.5.4-.7.1-.1.1-.2.2-.3l.1-.1.1-.1c.1-.4.3-.6.5-.8l.3-.3.1-.1.1-.1c.2-.1.5-.3.7-.4 0 0 .1 0 .1-.1 0 0 0 .1.1.1.3.5.7.9 1.3 1.2.6.3 1.2.4 1.9.3.9-.1 1.7-.8 2.2-1.6.2.1.4.3.7.5l.2.1c.1.1.2.2.3.2.2.2.4.4.5.6l.1.1s0 .1.1.1c.1.1.2.2.2.3.1.2.3.4.4.7 0 .1.1.1.1.2v.1c0 .1.1.2.1.4.1.3.1.5.2.8v1.3c-.4 0-.8 0-1.1.1-1.2.4-2.1 1.6-2 2.9 0 .6.2 1.1.5 1.6zm1.7-3.3zm2.4 1.8v.2c0 .1 0 .2-.1.3v.1c0 .1 0 .1-.1.1 0 0-.1.1-.1.2l-.2.2-.1.1c-.1.1-.2.1-.3.2h-.1c-.1 0-.2.1-.3.1h-.7c-.1 0-.2-.1-.3-.2h-.1l-.1-.1-.1-.1c-.1-.1-.1-.2-.2-.3v-.2c0-.1-.1-.2-.1-.4v-.4c0-.1 0-.2.1-.3l.1-.2v-.1c0-.1.1-.2.2-.3l.1-.1.1-.1c.1-.1.2-.1.3-.2h.2c.1 0 .2-.1.3-.1H18.7c.1 0 .2.1.3.2l.1.1.2.2c.1.1.1.2.2.3v.2c0 .1.1.2.1.3v.1c-.4 0-.4.1-.4.2z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:Xo(Xo({},Jo),Bo),edit:function(e){return(0,r.createElement)(Lo,e)},save:function(){return(0,r.createElement)("div",null,"Blocksy: Share Box")},deprecated:Wo}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-share-box",title:(0,l.__)("Share Box","blocksy-companion"),description:(0,l.__)("Share content on social media, boosting visibility & engagement.","blocksy-companion"),attributes:{heading:(0,l.__)("Share Box","blocksy-companion"),block:"blocksy/share-box"},isActive:function(e){return"blocksy/share-box"===e.block},icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{d:"M20 14.6c-.2-.3-.5-.6-.9-.8.1-1.2-.1-2.4-.6-3.5s-1.3-2.1-2.3-2.9c-.4-.3-.8-.5-1.3-.8 0-.6-.2-1.2-.5-1.6-.3-.5-.8-.9-1.4-1.1-1-.4-2.4-.1-3.2.8-.5.5-.8 1.2-.8 2-1 .4-1.8 1-2.5 1.8-.8 1-1.4 2.1-1.6 3.3-.1.6-.1 1.3-.1 2-.7.4-1.2 1-1.4 1.7-.3 1.2.1 2.4 1 3.2s2.3.8 3.3.2c.9.6 1.9 1.1 3 1.2.4.1.8.1 1.2.1.9 0 1.9-.2 2.7-.5.5-.2.9-.5 1.4-.8.2.1.4.2.7.3 1.1.3 2.4-.1 3.1-1 .1-.1.2-.3.3-.4v-.1c.7-.9.6-2.2-.1-3.1zm-9.6-8.1c0-.1 0-.2.1-.3 0 0 0-.1.1-.2 0-.1.1-.2.2-.3l.1-.1s.1-.1.1-.2h.1s.1 0 .1-.1c0 0 .1 0 .1-.1h.1c.1 0 .2-.1.3-.1h.7c.1 0 .1 0 .2.1.1 0 .1.1.2.1 0 0 .1 0 .1.1 0 0 .1 0 .1.1l.1.1.2.2v.1l.1.1s0 .1.1.1V7c0 .1 0 .2-.1.3 0 0 0 .1-.1.1 0 0 0 .1-.1.1 0 0-.1.1-.1.2l-.1.1-.1.1h-.1c-.1 0-.1.1-.2.1h-.2c-.1 0-.2.1-.3.1h-1l.1-.1s-.1 0-.1-.1l-.1-.1-.1-.1-.1-.1v-.1l-.1-.1s0-.1-.1-.1v-.1c0-.1-.1-.2-.1-.3V6.6c-.1 0-.1 0-.1-.1zM8 16.6c0 .1-.1.3-.1.4 0 .1-.1.1-.1.2s-.1.1-.1.1l-.1.1-.3.3-.1.1H7v.1c-.1 0-.2.1-.3.1h-.8c-.1 0-.2 0-.3-.1 0 0-.1 0-.1-.1 0 0-.1 0-.1-.1l-.1-.1h-.1l-.1-.1-.1-.1v-.1c.1-.1 0-.2-.1-.3v-.2c0-.1 0-.2-.1-.2V16.3c0-.1 0-.2.1-.2 0 0 0-.1.1-.2 0-.1.1-.2.1-.2l.1-.1.2-.2.1-.1c.1 0 .1-.1.2-.1h.2c.1 0 .2-.1.3-.1h.6c.1 0 .1 0 .2.1l.3-.2s.1 0 .1.1l.2.2c0 .1.1.1.1.1 0 .1.1.1.1.2v.1c.1.2.2.3.2.5v.4c0-.1 0 0 0 0zm7.1 1.4c-.3.2-.5.3-.8.4h-.1l-.2.1c-.1 0-.3.1-.4.1-.3.1-.5.1-.8.2H11.1l-.2-.1c-.1 0-.3-.1-.4-.1-.3-.1-.5-.2-.8-.3-.1-.1-.2-.1-.3-.2-.1-.1-.3-.1-.4-.2 0 .2 0 .1-.1.1.5-.8.6-1.9.3-2.7-.3-.6-.7-1.1-1.2-1.4-.5-.3-1.1-.5-1.7-.4v-1c0-.3.1-.5.2-.8 0-.1.1-.3.1-.4l.1-.3c.1-.2.2-.5.4-.7.1-.1.1-.2.2-.3l.1-.1.1-.1c.1-.4.3-.6.5-.8l.3-.3.1-.1.1-.1c.2-.1.5-.3.7-.4 0 0 .1 0 .1-.1 0 0 0 .1.1.1.3.5.7.9 1.3 1.2.6.3 1.2.4 1.9.3.9-.1 1.7-.8 2.2-1.6.2.1.4.3.7.5l.2.1c.1.1.2.2.3.2.2.2.4.4.5.6l.1.1s0 .1.1.1c.1.1.2.2.2.3.1.2.3.4.4.7 0 .1.1.1.1.2v.1c0 .1.1.2.1.4.1.3.1.5.2.8v1.3c-.4 0-.8 0-1.1.1-1.2.4-2.1 1.6-2 2.9 0 .6.2 1.1.5 1.6zm1.7-3.3zm2.4 1.8v.2c0 .1 0 .2-.1.3v.1c0 .1 0 .1-.1.1 0 0-.1.1-.1.2l-.2.2-.1.1c-.1.1-.2.1-.3.2h-.1c-.1 0-.2.1-.3.1h-.7c-.1 0-.2-.1-.3-.2h-.1l-.1-.1-.1-.1c-.1-.1-.1-.2-.2-.3v-.2c0-.1-.1-.2-.1-.4v-.4c0-.1 0-.2.1-.3l.1-.2v-.1c0-.1.1-.2.2-.3l.1-.1.1-.1c.1-.1.2-.1.3-.2h.2c.1 0 .2-.1.3-.1H18.7c.1 0 .2.1.3.2l.1.1.2.2c.1.1.1.2.2.3v.2c0 .1.1.2.1.3v.1c-.4 0-.4.1-.4.2z"}))}});var Yo=function({attributes:{has_field_link:e,has_field_link_wrap_content:t},postId:o,postType:n}){const[l="",i,a]=(0,s.useEntityProp)("postType",n,"title",o);return o?l?"yes"===e&&"no"===t?(0,r.createElement)("a",{href:"#",rel:"noopener noreferrer"},y(l)):y(l):null:"Title"};const Qo=function(e){if(!e)return"";const t=(new window.DOMParser).parseFromString(e,"text/html");return t.body.textContent||t.body.innerText||""};var en=function({attributes:{excerpt_length:e},postId:t,postType:o,fallback:n}){const[l,i,{rendered:a,protected:c}={}]=(0,s.useEntityProp)("postType",o,"excerpt",t),[u,p,{rendered:d}={}]=(0,s.useEntityProp)("postType",o,"content",t),m=(l||Qo(a)||Qo(d)).trim();let f=l?m:m.split(" ",e).join(" ");const b=f!==m?"...":"";return t?f?(0,r.createElement)(r.RawHTML,null,f,b):n:"Excerpt"},tn=window.wp.date;var on=function({postId:e,postType:t,attributes:{date_type:o,default_format:n,date_format:l,custom_date_format:i,has_field_link:a,has_field_link_wrap_content:c}}){const[u]=(0,s.useEntityProp)("postType",t,"published"===o?"date":"modified",e),p="yes"===n?(0,tn.getSettings)().formats.date:"custom"!==l?l:i;let d=(0,r.createElement)("span",null,(0,tn.format)(p,u));return e?("yes"===a&&"no"===c&&(d=(0,r.createElement)("a",{href:"#"},d)),d):"Date"},nn=window.wp.apiFetch,rn=o.n(nn),ln=window.wp.url;const an={};var cn=function({postId:e}){const[t,o]=(0,r.useState)(null);return(0,r.useEffect)(function(){an[e]&&o(an[e]),an[e]||rn()({path:(0,ln.addQueryArgs)("/wp/v2/comments",{post:e,_fields:"id"}),method:"HEAD",parse:!1}).then(function(t){const n={total:parseInt(t.headers.get("X-WP-Total"))};o(n),an[e]=n})},[e]),{commentsData:t}};var sn=function({postId:e,postType:t,attributes:{has_field_link:o,has_field_link_wrap_content:n,zero_text:l,single_text:i,multiple_text:a}}){const{commentsData:c}=cn({postId:e}),s=c&&c.total?c.total:0,u=0===s?l:1===s?i:a;return"yes"===o&&"no"===n?(0,r.createElement)("a",{href:"#",rel:"noopener noreferrer"},u.replace("%",s)):u.replace("%",s)};const un=function(e,t){switch(t){case"email":return(null==e?void 0:e.email)||"";case"nicename":return(null==e?void 0:e.nickname)||"";case"display_name":return(null==e?void 0:e.name)||"";case"first_name":return(null==e?void 0:e.first_name)||"";case"last_name":return(null==e?void 0:e.last_name)||"";case"description":return(null==e?void 0:e.description)||"";case"user_url":return(null==e?void 0:e.url)||""}};var pn=function({postId:e,postType:t,attributes:{has_field_link:o,author_field:n},fallback:l,fieldsDescriptor:i}){const{authorId:a,authorDetails:c}=(0,v.useSelect)(function(o){var n;const{getEditedEntityRecord:r,getUser:l,getUsers:i}=o(s.store),a=null===(n=r("postType",t,e))||void 0===n?void 0:n.author;return{authorId:a,authorDetails:a?l(a):null}},[t,e]);return e?c?"yes"===o?(0,r.createElement)("a",{href:"#",rel:"noopener noreferrer"},un(c,n)||l):un(c,n)||l:null:`Author: ${n}`};var dn=function({postId:e,postType:t,fallback:o,attributes:n,attributes:{has_field_link:l,taxonomy:i,separator:a},fieldsDescriptor:c}){var s;const u=ge(t),{terms:p}=(0,v.useSelect)(function(t){return{terms:t("core").getEntityRecords("taxonomy",i||(u&&u.length>0?u[0].slug:""),{per_page:-1,post:e})||[]}}),d=(null===(s=u.find(function(e){return e.slug===i}))||void 0===s?void 0:s.name)||"Category";if(!e)return`${d}`;if(0===p.length)return o||`${d}`;let m="span",f={};return"yes"===l&&(m="a",f.href="#",f.rel="noopener noreferrer"),p.map(function(e,t){return(0,r.createElement)(React.Fragment,null,(0,r.createElement)(m,g({},f,{className:X()({[`ct-term-${e.id}`]:"yes"===n.termAccentColor},n.termClass),dangerouslySetInnerHTML:{__html:e.name}})),t!==p.length-1?a.replace(/ /g," "):"")})};const mn={x:.5,y:.5};function fn({x:e,y:t}=mn){return`${Math.round(100*e)}% ${Math.round(100*t)}%`}var bn=function({attributes:e,url:t}){const{hasParallax:o,focalPoint:n,alt:l}=e,i=t?`url(${t})`:void 0,a=fn(n);return t?o?(0,r.createElement)("div",{role:l?"img":void 0,"aria-label":l||void 0,className:X()("wp-block-cover__image-background",{"has-parallax":o}),style:{backgroundImage:i,backgroundPosition:a}}):(0,r.createElement)("img",{alt:l,className:X()("wp-block-cover__image-background",{"has-parallax":o}),src:t,style:{objectPosition:n?fn(n):void 0}}):(0,r.createElement)("div",{className:X()("ct-dynamic-data-placeholder",{})},(0,r.createElement)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",className:"ct-dynamic-data-placeholder-illustration","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})))};var yn=function(){return yn=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},yn.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function hn(e){return e.toLowerCase()}var gn=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],_n=/[^A-Z0-9]+/gi;function vn(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(e,t){return e.replace(t,o)},e)}function kn(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var o=t.splitRegexp,n=void 0===o?gn:o,r=t.stripRegexp,l=void 0===r?_n:r,i=t.transform,a=void 0===i?hn:i,c=t.delimiter,s=void 0===c?" ":c,u=vn(vn(e,n,"$1\0$2"),l,"\0"),p=0,d=u.length;"\0"===u.charAt(p);)p++;for(;"\0"===u.charAt(d-1);)d--;return u.slice(p,d).split("\0").map(a).join(s)}(e,yn({delimiter:"."},t))}var wn=window.wp.styleEngine;const Cn=["additionalRules"];function On(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function xn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?On(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):On(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function En(e,t={}){const{additionalRules:o}=t,n=w(t,Cn),r=[...(0,wn.getCSSRules)(e,n),...o||[]];if(null==n||!n.selector){const e=[];return r.forEach(function(t){e.push(`${Sn(t.key)}: ${t.value};`)}),e.join(" ")}const l=r.reduce(function(e,t){const{selector:o}=t;return o?(e[o]||(e[o]=[]),e[o].push(t),e):e},{});return Object.keys(l).reduce(function(e,t){return e.push(`${t} { ${l[t].map(function(e){return`${Sn(e.key)}: ${e.value};`}).join(" ")} }`),e},[]).join("\n")}function Pn(e,t){const[o,n,l,i,c,s,u,p,d,m,f,b,y,h,g,_,v,k,w,C,O,x,E,P,S,j,I,T,D,A,B,H,N,R,z,M,F,V,L,$,U,q,G,W,Z,X,K,J,Y,Q,ee,te,oe,ne,re,le]=(0,a.useSettings)("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return(0,r.useMemo)(function(){return{background:{backgroundImage:o,backgroundSize:n},color:{palette:{custom:F,theme:L,default:$},gradients:{custom:X,theme:K,default:J},duotone:{custom:G,theme:W,default:Z},defaultGradients:Y,defaultPalette:U,defaultDuotone:q,custom:M,customGradient:Q,customDuotone:V,background:ee,link:te,heading:ne,button:re,text:oe},typography:{fontFamilies:{custom:l,default:i,theme:c},fontSizes:{custom:u,default:p,theme:d},customFontSize:m,defaultFontSizes:s,fontStyle:f,fontWeight:b,lineHeight:y,textAlign:h,textColumns:g,textDecoration:_,textTransform:k,letterSpacing:w,writingMode:v},spacing:{spacingSizes:{custom:S,default:j,theme:I},customSpacingSize:P,defaultSpacingSizes:E,padding:C,margin:O,blockGap:x,units:T},border:{color:H,radius:N,style:R,width:z},dimensions:{aspectRatio:D,minHeight:A},layout:B,parentLayout:t,shadow:le}},[o,n,l,i,c,s,u,p,d,m,f,b,y,h,g,_,k,w,v,C,O,x,E,P,S,j,I,T,D,A,B,t,H,N,R,z,M,F,V,L,$,U,q,G,W,Z,X,K,J,Y,Q,ee,te,oe,ne,re,le])}function Sn(e){var t,o;let n=null!==(t=null==e||null===(o=e.toString)||void 0===o?void 0:o.call(e))&&void 0!==t?t:"";return n=n.replace(/['\u2019]/,""),function(e,t){return void 0===t&&(t={}),kn(e,yn({delimiter:"-"},t))}(n,{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}function jn(e,t){if(e&&t)return`has-${Sn(t)}-${e}`}const In=function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map(function([e,t]){return[e,In(t)]}).filter(function([,e]){return void 0!==e});return t.length?Object.fromEntries(t):void 0};function Tn(e={}){const t={};return(0,wn.getCSSRules)(e).forEach(function(e){t[e.key]=e.value}),t}const Dn={link:"a",overlay:".wp-block-cover__background"};function An(e,t){if(!e||!t)return t;const o=e.split(","),n=t.split(","),r=[];return o.forEach(function(e){n.forEach(function(t){r.push(`${e.trim()} ${t.trim()}`)})}),r.join(", ")}const Bn=function({fieldType:e,attributes:t,uniqueClass:o}){const[n,l,i]=(0,a.useSettings)("color.palette.custom","color.palette.theme","color.palette.default"),{style:c}=((0,r.useMemo)(function(){return[...n||[],...l||[],...i||[]]},[n,l,i]),t),s=function(e,t,o,n){const l=[{elementType:"link",pseudo:[":hover"]}];"image"===o&&l.push({elementType:"overlay",additionalRules:function(e,t){return[{selector:e,key:"opacity",value:parseFloat(t.dimRatio)/100}]}});const i=`.${n}`,a=null==e?void 0:e.elements;return{className:n,styles:(0,r.useMemo)(function(){if(!a)return;const e=[];return l.forEach(function({elementType:o,pseudo:n,elements:r,additionalRules:l}){const c=null==a?void 0:a[o];if(c){const r=An(i,Dn[o]),a=En(c,{selector:r,additionalRules:l?l(r,t):[]});e.push(a),n&&n.forEach(function(t){c[t]&&e.push(En(c[t],{selector:An(i,`${Dn[o]}${t}`)}))})}}),e.length>0?e.join(""):void 0},[i,a,t])}}(c,t,e,o);if("text"===e){var u,p,d,m,f;let{backgroundColor:e,textColor:o}=t;const n=jn("background-color",e),r=jn("color",o),l=e||(null==c||null===(u=c.color)||void 0===u?void 0:u.background);e||(null==c||null===(p=c.color)||void 0===p||p.background);return{className:X()(r,s.className,{[n]:!!n,"has-background":l,"has-text-color":o||(null==c||null===(d=c.color)||void 0===d?void 0:d.text),"has-link-color":null==c||null===(m=c.elements)||void 0===m||null===(f=m.link)||void 0===f?void 0:f.color}),style:Tn(c),css:s.styles}}return{className:X()(s.className,{}),style:"",css:s.styles}};function Hn(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Nn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Hn(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const Rn=function(){return(0,r.createElement)("span",{className:"ct-video-indicator"},(0,r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"#fff"},(0,r.createElement)("path",{className:"ct-play-path",d:"M20,0C8.9,0,0,8.9,0,20s8.9,20,20,20s20-9,20-20S31,0,20,0z M16,29V11l12,9L16,29z"})))};var zn=function({media:e,url:t,attributes:o,attributes:{aspectRatio:n,imageFit:l,width:i,height:c,imageAlign:s,image_hover_effect:u,videoThumbnail:p,minimumHeight:d,contentPosition:m,viewType:f,hasParallax:y,gradient:h,customGradient:_}}){const v=(0,a.__experimentalUseBorderProps)(o),[k]=(0,a.useSettings)("color.gradients","color.customGradient"),w=_||(0,a.getGradientValueBySlug)(k,h),C=(0,a.__experimentalGetGradientClass)(h),O=(0,a.useBlockProps)({className:X()("ct-dynamic-media",{[`align${s}`]:s,"wp-block-cover":"cover"===f,"has-parallax":"cover"===f&&y,[b(m)]:"cover"===f&&m,"has-custom-content-position":"cover"===f&&m}),style:{width:i,height:c}}),x=O.className.split(" ").find(function(e){return e.startsWith("wp-elements-")}),E=Bn({fieldType:"image",attributes:o,uniqueClass:x}),P={height:n?"100%":c,width:!!n&&"100%",objectFit:l,aspectRatio:n},{allowCustomContentAndWideSize:S,contentSize:j,wideSize:I}=o,T=(0,a.useInnerBlocksProps)({className:X()("wp-block-cover__inner-container",{"is-layout-constrained":S,"wp-block-cover-is-layout-constrained":S,"is-layout-flow":!S,"wp-block-cover-is-layout-flow":!S})},{template:[["core/paragraph",{align:"center",placeholder:"Add text…"}]],templateInsertUpdatesSelection:!1}),D=(null==e?void 0:e.has_video)&&"yes"===p||"none"!==u;if("cover"===f)return(0,r.createElement)("div",g({},O,{style:Nn(Nn(Nn(Nn({},O.style||{}),v.style||{}),"auto"!==n?{aspectRatio:n}:{}),{},{minHeight:d||("auto"!==n?"unset":void 0)}),className:X()(O.className,v.className,E.className)}),(0,r.createElement)("style",null,`\n\t\t\t\t\t\t\t${j?`#${O.id} > .wp-block-cover__inner-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {\n\t\t\t\t\t\t\t\t\t\tmax-width: ${j};\n\t\t\t\t\t\t\t\t\t}`:""}\n\n\t\t\t\t\t\t\t${I?`#${O.id} > .wp-block-cover__inner-container > .alignwide {\n\t\t\t\t\t\t\t\t\t\t\tmax-width: ${I};\n\t\t\t\t\t\t\t\t\t\t}`:""}\n\t\t\t\t\t\t`,E.css),(0,r.createElement)(bn,{attributes:o,url:t}),(0,r.createElement)("span",{"aria-hidden":"true",className:X()("wp-block-cover__background",{"wp-block-cover__gradient-background":!!w,"has-background-gradient":!!w,[C]:!!C}),style:{background:w}}),(0,r.createElement)("div",T));let A=(0,r.createElement)("img",{className:D?"":v.className,style:Nn(Nn({},D?{}:v.style),P),src:t,loading:"lazy"});return t||(A=(0,r.createElement)("div",{className:X()("ct-dynamic-data-placeholder",{[v.className]:!D}),style:Nn(Nn({},D?{}:v.style),P)},(0,r.createElement)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",className:"ct-dynamic-data-placeholder-illustration","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})))),D&&(A=(0,r.createElement)("span",{"data-hover":u,className:`ct-dynamic-media-inner ${v.className}`,style:Nn({},v.style)},A,null!=e&&e.has_video&&"yes"===p?(0,r.createElement)(Rn,null):null)),(0,r.createElement)("figure",O,A,null!=e&&e.has_video&&"yes"===p?(0,r.createElement)(Rn,null):null)};o(604);!function(e,t){var o,n,r=0;function l(){var l,i,a=o,c=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(i=0;i<c;i++)if(a.args[i]!==arguments[i]){a=a.next;continue e}return a!==o&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=o,a.prev=null,o.prev=a,o=a),a.val}a=a.next}for(l=new Array(c),i=0;i<c;i++)l[i]=arguments[i];return a={args:l,val:e.apply(null,l)},o?(o.prev=a,a.next=o):n=a,r===t.maxSize?(n=n.prev).next=null:r++,o=a,a.val}t=t||{},l.clear=function(){o=null,n=null,r=0}}(console.error);var Mn,Fn,Vn,Ln;Mn={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},Fn=["(","?"],Vn={")":["("],":":["?","?:"]},Ln=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var $n={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,o){if(e)throw t;return o}};function Un(e){var t=function(e){for(var t,o,n,r,l=[],i=[];t=e.match(Ln);){for(o=t[0],(n=e.substr(0,t.index).trim())&&l.push(n);r=i.pop();){if(Vn[o]){if(Vn[o][0]===r){o=Vn[o][1]||o;break}}else if(Fn.indexOf(r)>=0||Mn[r]<Mn[o]){i.push(r);break}l.push(r)}Vn[o]||i.push(o),e=e.substr(t.index+o.length)}return(e=e.trim())&&l.push(e),l.concat(i.reverse())}(e);return function(e){return function(e,t){var o,n,r,l,i,a,c=[];for(o=0;o<e.length;o++){if(i=e[o],l=$n[i]){for(n=l.length,r=Array(n);n--;)r[n]=c.pop();try{a=l.apply(null,r)}catch(e){return e}}else a=t.hasOwnProperty(i)?t[i]:+i;c.push(a)}return c[0]}(t,e)}}var qn={contextDelimiter:"",onMissingKey:null};function Gn(e,t){var o;for(o in this.data=e,this.pluralForms={},this.options={},qn)this.options[o]=void 0!==t&&o in t?t[o]:qn[o]}Gn.prototype.getPluralForm=function(e,t){var o,n,r,l=this.pluralForms[e];return l||("function"!=typeof(r=(o=this.data[e][""])["Plural-Forms"]||o["plural-forms"]||o.plural_forms)&&(n=function(e){var t,o,n;for(t=e.split(";"),o=0;o<t.length;o++)if(0===(n=t[o].trim()).indexOf("plural="))return n.substr(7)}(o["Plural-Forms"]||o["plural-forms"]||o.plural_forms),r=function(e){var t=Un(e);return function(e){return+t({n:e})}}(n)),l=this.pluralForms[e]=r),l(t)},Gn.prototype.dcnpgettext=function(e,t,o,n,r){var l,i,a;return l=void 0===r?0:this.getPluralForm(e,r),i=o,t&&(i=t+this.options.contextDelimiter+o),(a=this.data[e][i])&&a[l]?a[l]:(this.options.onMissingKey&&this.options.onMissingKey(o,e),0===l?o:n)};const Wn={plural_forms:e=>1===e?0:1},Zn=/^i18n\.(n?gettext|has_translation)(_|$)/;const Xn=((e,t,o)=>{const n=new Gn({}),r=new Set,l=()=>{r.forEach(e=>e())},i=(e,t="default")=>{n.data[t]={...n.data[t],...e},n.data[t][""]={...Wn,...n.data[t]?.[""]},delete n.pluralForms[t]},a=(e,t)=>{i(e,t),l()},c=(e="default",t,o,r,l)=>(n.data[e]||i(void 0,e),n.dcnpgettext(e,t,o,r,l)),s=(e="default")=>e,u=(e,t,n)=>{let r=c(n,t,e);return o?(r=o.applyFilters("i18n.gettext_with_context",r,e,t,n),o.applyFilters("i18n.gettext_with_context_"+s(n),r,e,t,n)):r};if(e&&a(e,t),o){const e=e=>{Zn.test(e)&&l()};o.addAction("hookAdded","core/i18n",e),o.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>n.data[e],setLocaleData:a,addLocaleData:(e,t="default")=>{n.data[t]={...n.data[t],...e,"":{...Wn,...n.data[t]?.[""],...e?.[""]}},delete n.pluralForms[t],l()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},a(e,t)},subscribe:e=>(r.add(e),()=>r.delete(e)),__:(e,t)=>{let n=c(t,void 0,e);return o?(n=o.applyFilters("i18n.gettext",n,e,t),o.applyFilters("i18n.gettext_"+s(t),n,e,t)):n},_x:u,_n:(e,t,n,r)=>{let l=c(r,void 0,e,t,n);return o?(l=o.applyFilters("i18n.ngettext",l,e,t,n,r),o.applyFilters("i18n.ngettext_"+s(r),l,e,t,n,r)):l},_nx:(e,t,n,r,l)=>{let i=c(l,r,e,t,n);return o?(i=o.applyFilters("i18n.ngettext_with_context",i,e,t,n,r,l),o.applyFilters("i18n.ngettext_with_context_"+s(l),i,e,t,n,r,l)):i},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,r)=>{const l=t?t+""+e:e;let i=!!n.data?.[null!=r?r:"default"]?.[l];return o&&(i=o.applyFilters("i18n.has_translation",i,e,t,r),i=o.applyFilters("i18n.has_translation_"+s(r),i,e,t,r)),i}}})(void 0,void 0,window.wp.hooks.defaultHooks);Xn.getLocaleData.bind(Xn),Xn.setLocaleData.bind(Xn),Xn.resetLocaleData.bind(Xn),Xn.subscribe.bind(Xn);const Kn=Xn.__.bind(Xn);Xn._x.bind(Xn),Xn._n.bind(Xn),Xn._nx.bind(Xn),Xn.isRTL.bind(Xn),Xn.hasTranslation.bind(Xn);function Jn({postId:e,postType:t}){const{authorDetails:o}=(0,v.useSelect)(function(o){var n;const{getEditedEntityRecord:r,getUser:l}=o(s.store),i=null===(n=r("postType",t,e))||void 0===n?void 0:n.author;return{authorDetails:i?l(i):null}},[t,e]),n=null!=o&&o.avatar_urls?Object.values(o.avatar_urls):null,r=(null!=o&&o.avatar_urls&&Object.keys(o.avatar_urls),function(){const{avatarURL:e}=(0,v.useSelect)(function(e){const{getSettings:t}=e(a.store),{__experimentalDiscussionSettings:o}=t();return o});return e}());return{src:n?n[n.length-1]:r}}function Yn(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Qn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Yn(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Yn(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var er=function({postId:e,postType:t,attributes:o,attributes:{avatar_size:n,imageAlign:l,has_field_link:i}}){const c=(0,a.useBlockProps)({className:X()("ct-dynamic-media",{[`align${l}`]:l}),style:{}}),s=(0,a.__experimentalUseBorderProps)(o),u=Jn({postId:e,postType:t});const p=(0,ln.addQueryArgs)((0,ln.removeQueryArgs)(u.src,["s"]),{s:2*n}),d=Qn({},s.style);let m=(0,r.createElement)("img",{style:Qn(Qn({},d),{},{width:`${n}px`,height:`${n}px`}),src:p,className:X()("avatar","avatar-"+n,"photo",s.className)});return i&&(m=(0,r.createElement)("a",{href:"#"},m)),(0,r.createElement)("figure",c,m)};const tr={"wp:term_title":(0,l.__)("Term Title","blocksy-companion"),"wp:term_description":(0,l.__)("Term Description","blocksy-companion"),"wp:term_count":(0,l.__)("Term Count","blocksy-companion")},or={"wp:term_title":"name","wp:term_description":"description","wp:term_count":"count"};var nr=function({termId:e,taxonomy:t,attributes:o,attributes:{has_field_link:n,has_field_link_wrap_content:l},fieldsDescriptor:i}){const{terms:a}=(0,v.useSelect)(function(o){return{terms:o("core").getEntityRecords("taxonomy",t,{per_page:1,include:[e]})||[]}});if(!a.length)return tr[o.field]||tr["wp:term_title"];let c="span",s={};"yes"===n&&"no"===l&&(c="a",s.href="#",s.rel="noopener noreferrer");const u=a[0][or[o.field]];return(0,r.createElement)(c,g({},s,{className:X()({[`ct-term-${a[0].id}`]:"yes"===o.termAccentColor},o.termClass),dangerouslySetInnerHTML:{__html:u}}))};var rr=function({termImage:e,termIcon:t,attributes:o,attributes:{sizeSlug:n,imageSource:l}}){const i="icon"===l?null==t?void 0:t.attachment_id:null==e?void 0:e.attachment_id,{media:a}=(0,v.useSelect)(function(e){const{getMedia:t}=e(s.store);return{media:i&&t(i,{context:"view"})}},[i]),c=function(e,t){var o,n,r;return(null==e||null===(o=e.media_details)||void 0===o||null===(n=o.sizes)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.source_url)||(null==e?void 0:e.source_url)}(a,n);return(0,r.createElement)(zn,{attributes:o,url:c})};var lr=function({postType:e,postId:t,attributes:o,attributes:{sizeSlug:n}}){const[l,i]=(0,s.useEntityProp)("postType",e,"featured_media",t),{media:a}=(0,v.useSelect)(function(e){const{getMedia:t}=e(s.store);return{media:l&&t(l,{context:"view"})}},[l]),c=function(e,t){var o,n,r;return(null==e||null===(o=e.media_details)||void 0===o||null===(n=o.sizes)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.source_url)||(null==e?void 0:e.source_url)}(a,n);return(0,r.createElement)(zn,{attributes:o,url:c,media:a})};const ir=["tagName","children","before","after","withLink"];var ar=function(e){let{tagName:t,children:o,before:n,after:l,withLink:i}=e,a=w(e,ir);const[c,s]=(0,r.useState)(null),u=n||"",p=l||"",d=(0,r.useRef)(null),m=-1!==u.indexOf("<")||-1!==p.indexOf("<");return(0,r.useEffect)(function(){m&&s(Math.random())},[n,l]),m?i?(0,r.createElement)("a",{href:"#",rel:"noopener noreferrer"},(0,r.createElement)("span",g({ref:d,dangerouslySetInnerHTML:{__html:`${n}<span></span>${l}`}},a)),d.current&&d.current.querySelector("span")&&(0,r.createPortal)(o,d.current.querySelector("span"))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",g({ref:d,dangerouslySetInnerHTML:{__html:`${n}<span></span>${l}`}},a)),d.current&&d.current.querySelector("span")&&(0,r.createPortal)(o,d.current.querySelector("span"))):i?(0,r.createElement)("a",{href:"#",rel:"noopener noreferrer"},u,o,p):(0,r.createElement)(r.Fragment,null,u,o,p)};function cr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function sr(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):cr(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const ur=function({fieldDescriptor:e,fieldsDescriptor:t,attributes:o,attributes:{align:n,tagName:i,before:c,after:s,fallback:u,has_field_link:p,has_field_link_wrap_content:d},postId:m,postType:f,termId:b,taxonomy:y}){const[h,_]=(0,r.useState)(!1),v=(0,r.useRef)(null),k=((0,r.useRef)(null),(0,a.useBlockProps)({className:X()("ct-dynamic-data",{[`has-text-align-${n}`]:n}),ref:v})),w=k.className.split(" ").find(function(e){return e.startsWith("wp-elements-")}),C=Bn({fieldType:"text",attributes:o,uniqueClass:w}),O=(0,a.__experimentalUseBorderProps)(o);let x=null;"archive_title"===e.id&&(x=function(){return(0,l.__)("Archive Title","blocksy-companion")}),"archive_description"===e.id&&(x=function(){return(0,l.__)("Archive Description","blocksy-companion")}),"term_title"!==e.id&&"term_description"!==e.id&&"term_count"!==e.id||(x=nr),"title"===e.id&&(x=Yo),"excerpt"===e.id&&(x=en),"date"===e.id&&(x=on),"comments"===e.id&&(x=sn),"terms"===e.id&&(x=dn),"author"===e.id&&(x=pn);let E="";return t&&t.dynamic_styles&&(E=t.dynamic_styles),C.css&&(E+=C.css),x?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i,g({},k,O,{style:sr(sr(sr({},k.style||{}),O.style||{}),C.style||{}),className:X()(k.className,O.className,C.className)}),E&&(0,r.createElement)("style",null,E),(0,r.createElement)(ar,{before:c,after:s,withLink:"yes"===p&&"yes"===d},(0,r.createElement)(x,{attributes:o,postId:m,postType:f,termId:b,taxonomy:y,fallback:u,fieldsDescriptor:t})))):null};var pr=function(e){const{fieldDescriptor:t}=e;return"featured_image"===t.id?(0,r.createElement)(lr,e):"author_avatar"===t.id?(0,r.createElement)(er,e):"term_image"===t.id?(0,r.createElement)(rr,e):"archive_image"===t.id?(0,r.createElement)(zn,e):(0,r.createElement)(ur,e)};const dr=["provider","id","attributes"];function mr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function fr(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):mr(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var br=function({fieldsContext:e,fieldDescriptor:t}){const[o,n]=(0,r.useState)({}),{type:l,post_type:i,post_id:a}=e,{provider:c,id:s,attributes:u}=t,p=(w(t,dr),(0,r.useMemo)(function(){const e=`${wp.ajax.settings.url}?action=blocksy_dynamic_data_block_custom_field_data`,t={context:{type:l,post_type:i,post_id:a},field_provider:c,field_id:s,attributes:u};return{url:e,body:t,cacheKey:P(fr(fr({},t),{},{url:e}))}},[l,i,a,c,s,u]));(0,r.useEffect)(function(){R(p.url,p.body).then(function(e){return e.json()}).then(function({success:e,data:t}){e&&n(function(e){return fr(fr({},e),{},{[p.cacheKey]:t.field_data})})})},[p]);let d=null;return o[p.cacheKey]&&(d=o[p.cacheKey]),{fieldData:d}};function yr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function hr(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?yr(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):yr(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var gr=function({fieldDescriptor:e,attributes:t,attributes:{align:o,tagName:n,before:l,after:i,fallback:c,has_field_link:s,has_field_link_wrap_content:u},fieldData:p}){const d=(0,a.useBlockProps)({className:X()("ct-dynamic-data",{[`has-text-align-${o}`]:o})}),m=d.className.split(" ").find(function(e){return e.startsWith("wp-elements-")}),f=Bn({fieldType:"text",attributes:t,uniqueClass:m}),b=(0,a.__experimentalUseBorderProps)(t);let y=!1,h=p||"";"yes"===s&&"no"===u&&(h=`<a href="#" rel="noopener noreferrer">${h}</a>`),h||(y=!0,h=c||`Dynamic data: ${null==e?void 0:e.label}`),!y&&h&&"string"==typeof h&&(h=l+h+i),"yes"===s&&"yes"===u&&(h=`<a href="#" rel="noopener noreferrer">${h}</a>`);let _="";return f.css&&(_+=f.css),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(n,g({},d,b,{style:hr(hr(hr({},d.style||{}),b.style||{}),f.style||{}),className:X()(d.className,b.className,f.className),dangerouslySetInnerHTML:{__html:h}})),_&&(0,r.createElement)("style",null,_))};var _r=function({fieldData:e,attributes:t,attributes:{sizeSlug:o}}){var n;let l=null==e?void 0:e.url;return null!=e&&e.full_url&&(l=e.full_url),null!=e&&null!==(n=e.sizes)&&void 0!==n&&n[o]&&(l="string"==typeof e.sizes[o]?e.sizes[o]:e.sizes[o].url),(0,r.createElement)(zn,{attributes:t,url:l})};var vr=function({fieldDescriptor:e,fieldsContext:t,attributes:o}){const{fieldData:n}=br({fieldDescriptor:e,fieldsContext:t});return"image"===e.type?(0,r.createElement)(_r,{fieldData:n,fieldDescriptor:e,attributes:o}):(0,r.createElement)(gr,{fieldData:n,fieldDescriptor:e,attributes:o})};var kr=function({product:e}){return(0,r.createElement)(r.RawHTML,null,null==e?void 0:e.price_html)};var wr=function({product:e}){return null!=e&&e.is_in_stock?(0,l.__)("In Stock","blocksy-companion"):(0,l.__)("Out of Stock","blocksy-companion")};var Cr=function({product:e}){const t=parseFloat(null==e?void 0:e.average_rating)/5*100+"%";return(0,r.createElement)("div",{className:"star-rating",role:"img","aria-label":"Rated 2.15 out of 5"},(0,r.createElement)("span",{style:{width:t}},(0,l.sprintf)((0,l.__)("Rated %s out of 5","blocksy-companion"),null==e?void 0:e.average_rating)))};var Or=function({product:e}){return(null==e?void 0:e.sku)||""};var xr=function({postId:e,attributes:t}){const{fieldData:o}=br({fieldsContext:{type:"post",post_type:"product",post_id:e},fieldDescriptor:{provider:"woo",id:"brands"}});return(0,r.createElement)("div",{className:"ct-product-brands",style:{"--product-brand-logo-size":`${t.brands_size}px`,"--product-brands-gap":`${t.brands_gap}px`}},o&&o.map(function(e){return e.image&&e.image.url?(0,r.createElement)("span",{key:e.slug,className:"ct-media-container"},(0,r.createElement)("img",{src:e.image.url,alt:e.name})):(0,r.createElement)("span",{key:e.slug,dangerouslySetInnerHTML:{__html:e.name}})}))};var Er=function({postId:e,fallback:t,attributes:o,attributes:{attribute:n,separator:l},fieldsDescriptor:i}){const{fieldData:a}=br({fieldsContext:{type:"post",post_type:"product",post_id:e},fieldDescriptor:{provider:"woo",id:"attributes",attributes:o}}),c=`Attributes: ${n}`;if(!e||!a)return`${c}`;if(0===a.length)return t||`${c}`;return a.map(function(e,t){return(0,r.createElement)(React.Fragment,null,(0,r.createElement)("span",{className:X()({[`ct-term-${e.term_id}`]:"yes"===o.termAccentColor},o.termClass),dangerouslySetInnerHTML:{__html:e.name}}),t!==a.length-1?l.replace(/ /g," "):"")})};function Pr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Sr(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Pr(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const jr=function({fieldDescriptor:e,fieldsDescriptor:t,attributes:o,attributes:{align:n,tagName:l,before:i,after:s,fallback:u},postId:p,postType:d,termId:m,taxonomy:f,colors:b}){const y=(0,r.useRef)(null),{product:h,isLoading:_}=((0,r.useRef)(null),wc.wcBlocksSharedContext.useProductDataContext()),v=(0,a.useBlockProps)({className:X()("ct-dynamic-data",{[`has-text-align-${n}`]:n}),ref:y}),k=v.className.split(" ").find(function(e){return e.startsWith("wp-elements-")}),w=Bn({fieldType:"text",attributes:o,uniqueClass:k}),C=(0,a.__experimentalUseBorderProps)(o);if(_)return(0,r.createElement)(c.Spinner,null);let O=null;"price"===e.id&&(O=kr),"stock_status"===e.id&&(O=wr),"brands"===e.id&&(O=xr),"rating"===e.id&&(O=Cr),"sku"===e.id&&(O=Or),"attributes"===e.id&&(O=Er);let x="";return w.css&&(x+=w.css),O?(0,r.createElement)(l,g({},v,C,{style:Sr(Sr(Sr({},v.style||{}),C.style||{}),w.style||{}),className:X()(v.className,C.className,w.className)}),x&&(0,r.createElement)("style",null,x),(0,r.createElement)(ar,{before:i,after:s},(0,r.createElement)(O,{attributes:o,postId:p,postType:d,termId:m,taxonomy:f,fallback:u,fieldsDescriptor:t,product:h}))):null};var Ir=function(e){const{fieldDescriptor:t,postId:o}=e,{withProductDataContext:n}=wc.wcBlocksSharedHocs;return n(jr)(Sr(Sr({},e),{},{productId:o}))};var Tr=function({fieldDescriptor:e,fieldsDescriptor:t,isFieldMissing:o,postId:n,postType:i,termId:c,taxonomy:s,fieldsContext:u,termIcon:p,termImage:d,attributes:m,attributes:{tagName:f,align:b,field:y,before:h,after:g,fallback:_},colors:v}){if(o){const e=(0,a.useBlockProps)({className:"ct-block-notice components-notice is-warning"});return(0,r.createElement)("div",e,(0,l.__)("Field not found","blocksy-companion"))}return e?"woo"===e.provider?(0,r.createElement)(Ir,{fieldDescriptor:e,attributes:m,postId:n,postType:i,colors:v}):"wp"===e.provider?(0,r.createElement)(pr,{fieldsDescriptor:t,fieldDescriptor:e,attributes:m,postId:n,postType:i,termId:c,taxonomy:s,termImage:d,termIcon:p,colors:v}):(0,r.createElement)(vr,{fieldDescriptor:e,fieldsContext:u,attributes:m}):null};function Dr({level:e,isPressed:t=!1}){const o={h1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",h2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",h3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",h4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",h5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",h6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z",p:"M6.2 15V5h3.2c1.2 0 2 .1 2.4.2.6.2 1 .5 1.4 1 .4.5.6 1.1.6 1.9 0 .6-.1 1.1-.3 1.6-.2.4-.5.8-.9 1-.3.2-.7.4-1 .5-.5.1-1.2.1-2.1.1H8.2V15h-2zm2-8.3v2.8h1.1c.8 0 1.3 0 1.6-.2.3-.1.5-.3.6-.5.2-.2.2-.5.2-.8 0-.4-.1-.7-.3-.9-.2-.2-.5-.4-.8-.4-.2 0-.7-.1-1.5-.1.1.1-.9.1-.9.1z",span:"M8.2 12c.2 1 .9 1.4 2 1.4s1.6-.4 1.6-1.2c0-.8-.5-1.1-2.1-1.5-2.7-.6-3.3-1.5-3.3-2.9C6.4 6.2 7.6 5 9.9 5c2.6 0 3.6 1.4 3.7 2.8h-2.1c-.1-.6-.4-1.2-1.7-1.2-.9 0-1.4.4-1.4 1 0 .7.4.9 2 1.3 2.9.7 3.6 1.7 3.6 3.1 0 1.8-1.3 3-3.9 3-2.5 0-3.8-1.2-4-3h2.1z",div:"M5.8 5h3.7c.8 0 1.5.1 1.9.2.6.2 1.1.5 1.5.9.4.4.7 1 1 1.6.2.6.3 1.4.3 2.4 0 .8-.1 1.5-.3 2.1-.3.7-.6 1.3-1.1 1.8-.3.3-.8.6-1.4.8-.4.1-1 .2-1.8.2H5.8V5zm2 1.7v6.6h1.5c.6 0 1 0 1.2-.1.3-.1.6-.2.8-.4.2-.2.4-.5.5-1 .1-.4.2-1.1.2-1.8 0-.8-.1-1.4-.2-1.8-.1-.4-.3-.7-.6-1-.2-.2-.6-.4-.9-.5-.3-.1-.8-.1-1.6-.1l-.9.1z"};return o.hasOwnProperty(e)?(0,r.createElement)(c.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:t},(0,r.createElement)(c.Path,{d:o[e]})):null}function Ar({tagName:e,onChange:t}){return(0,r.createElement)(c.ToolbarDropdownMenu,{popoverProps:{className:"block-library-heading-level-dropdown"},icon:(0,r.createElement)(Dr,{level:e}),label:(0,l.__)("Change heading level","blocksy-companion"),controls:["h1","h2","h3","h4","h5","h6","p","span","div"].map(function(o){{const n=o===e;return{icon:(0,r.createElement)(Dr,{level:o,isPressed:n}),label:o,title:{h1:(0,l.__)("Heading 1","blocksy-companion"),h2:(0,l.__)("Heading 2","blocksy-companion"),h3:(0,l.__)("Heading 3","blocksy-companion"),h4:(0,l.__)("Heading 4","blocksy-companion"),h5:(0,l.__)("Heading 5","blocksy-companion"),h6:(0,l.__)("Heading 6","blocksy-companion"),p:(0,l.__)("Paragraph","blocksy-companion"),span:(0,l.__)("Span","blocksy-companion"),div:(0,l.__)("Div","blocksy-companion")}[o],isActive:n,onClick(){t(o)},role:"menuitemradio"}}})})}var Br=function({fieldDescriptor:e,attributes:t,attributes:{name:o,style:n,align:l,imageAlign:i,contentPosition:c,minimumHeight:s,viewType:u},setAttributes:p}){var m,f,b,y,h,_,v,k,w,C,O,x,E;const[P,S]=(0,r.useState)(""),j="100vh"===s,I=Pn(),T=[...null!==(m=null===(f=I.color.duotone)||void 0===f?void 0:f.custom)&&void 0!==m?m:[],...null!==(b=null===(y=I.color.duotone)||void 0===y?void 0:y.theme)&&void 0!==b?b:[],...null!==(h=null===(_=I.color.duotone)||void 0===_?void 0:_.default)&&void 0!==h?h:[]],D=(v=null===(k=I.color.palette)||void 0===k?void 0:k.custom,w=null===(C=I.color.palette)||void 0===C?void 0:C.theme,O=null===(x=I.color.palette)||void 0===x?void 0:x.default,null==n||null===(E=n.color)||void 0===E?void 0:E.duotone);Array.isArray(D)||function(e,t){if(!e)return;const o=null==t?void 0:t.find(function({slug:t}){return e===`var:preset|duotone|${t}`});o&&o.colors}(D,T);return(0,r.createElement)(a.BlockControls,{group:"block"},d(e)?(0,r.createElement)(React.Fragment,null,(0,r.createElement)(a.BlockAlignmentControl,g({},"wp"===e.provider&&"author_avatar"===e.id?{controls:["none","left","center","right"]}:{},{value:i,onChange:function(e){return p({imageAlign:e})}})),null,"cover"===u?(0,r.createElement)(React.Fragment,null,(0,r.createElement)(a.__experimentalBlockAlignmentMatrixControl,{label:Kn("Change content position"),value:c,onChange:function(e){return p({contentPosition:e})}}),(0,r.createElement)(a.__experimentalBlockFullHeightAligmentControl,{isActive:j,onToggle:function(){j?p({minimumHeight:P}):(S(s),p({minimumHeight:"100vh",aspectRatio:"auto"}))}})):null):(0,r.createElement)(React.Fragment,null,(0,r.createElement)(a.AlignmentControl,{value:l,onChange:function(e){return p({align:e})}}),(0,r.createElement)(Ar,{tagName:t.tagName,onChange:function(e){return p({tagName:e})}})))};const Hr=function({termId:e,postId:t,postType:o}){return(0,r.useMemo)(function(){return function({termId:e,postId:t,postType:o}){const n=["ct_thank_you_page","ct_content_block","ct_product_tab","ct_size_guide"];let r={type:"all"};t&&(r={type:"post",post_id:t,post_type:o});const l=([...document.body.classList].find(function(e){return e.startsWith("post-type-")})||"").replace("post-type-","");l&&n.includes(l)&&o===l&&(r={type:"all"},"ct_product_tab"!==o&&"ct_size_guide"!==o||(r={type:"post_type",post_type:"product"}));return e&&(r={type:"term",term_id:e}),r}({termId:e,postId:t,postType:o})},[e,t,o])},Nr=(0,U.getOptionsForBlock)("dynamic-data"),Rr=function(e={}){const{fieldsContext:t}=e;let o=[];return"term"===t.type&&(o=[{id:"term_title",label:(0,l.__)("Term Title","blocksy-companion")},{id:"term_description",label:(0,l.__)("Term Description","blocksy-companion")},{id:"term_image",label:(0,l.__)("Term Image","blocksy-companion")},{id:"term_count",label:(0,l.__)("Term Count","blocksy-companion")}]),"all"!==t.type&&"post"!==t.type||(o=[{id:"title",label:(0,l.__)("Title","blocksy-companion")},{id:"excerpt",label:(0,l.__)("Excerpt","blocksy-companion")},{id:"date",label:(0,l.__)("Post Date","blocksy-companion")},{id:"comments",label:(0,l.__)("Comments","blocksy-companion")},{id:"terms",label:(0,l.__)("Terms","blocksy-companion")},{id:"author",label:(0,l.__)("Author","blocksy-companion")},{id:"featured_image",label:(0,l.__)("Featured Image","blocksy-companion")},{id:"author_avatar",label:(0,l.__)("Author Avatar","blocksy-companion")}]),"all"===t.type&&(o=[...o,{id:"archive_title",label:(0,l.__)("Archive Title","blocksy-companion")},{id:"archive_description",label:(0,l.__)("Archive Description","blocksy-companion")},{id:"archive_image",label:(0,l.__)("Archive Image","blocksy-companion")}]),{provider:"wp",provider_label:"WordPress",fields:o}};var zr=function({postId:e,postType:t,termId:o,taxonomy:n}){const[i,a]=(0,r.useState)([]),[c,s]=(0,r.useState)(!1),u=Hr({postId:e,postType:t,termId:o});let p=t;"post_type"===u.type&&u.post_type&&(p=u.post_type),"post"===u.type&&u.post_type&&(p=u.post_type);const d=ge(p);(0,r.useEffect)(function(){R(`${wp.ajax.settings.url}?action=blocksy_blocks_retrieve_dynamic_data_descriptor`,{context:u}).then(function(e){return e.json()}).then(function({success:e,data:t}){a(t.fields),s(!0)})},[u]);const m={fields:[Rr({fieldsContext:u})]},f=function({fieldsContext:e,taxonomies:t=[]}){if(void 0===window.wc)return null;if(!("post"===e.type&&"product"===e.post_type||"post_type"===e.type&&"product"===e.post_type))return null;const o=(t||[]).find(function({slug:e}){return"product_brand"===e});return{provider:"woo",provider_label:"WooCommerce",fields:[{id:"price",label:(0,l.__)("Price","blocksy-companion")},{id:"rating",label:(0,l.__)("Rating","blocksy-companion")},{id:"stock_status",label:(0,l.__)("Stock Status","blocksy-companion")},{id:"sku",label:(0,l.__)("SKU","blocksy-companion")},{id:"attributes",label:(0,l.__)("Attributes","blocksy-companion")},...o?[{id:"brands",label:(0,l.__)("Brands","blocksy-companion")}]:[]]}}({fieldsContext:u,taxonomies:d});f&&m.fields.push(f),i.length>0&&(m.fields=[...m.fields,...i]);return{fullDescriptorLoaded:c,fieldsDescriptor:m,linkFieldsChoices:i.flatMap(function(e){return e.fields.filter(function(e){return"text"===e.type}).map(function(t){return{group:e.provider_label,key:`${e.provider}:${t.id}`,value:t.label}})}),options:Nr,fieldsChoices:m.fields.reduce(function(e,t){return[...e,...t.fields.filter(function(e){return"wp"!==t.provider||"terms"!==e.id||d&&d.length>0}).map(function(e){return{group:t.provider_label,key:`${t.provider}:${e.id}`,value:e.label}})]},[])}};var Mr=function({sizeSlug:e,onChange:t,clientId:o}){const n=(0,v.useSelect)(function(e){return e(a.store).getSettings().imageSizes},[]).map(function({name:e,slug:t}){return{value:t,label:e}});return n.length?(0,r.createElement)(c.__experimentalToolsPanelItem,{hasValue:function(){return!!e},label:(0,l.__)("Resolution","blocksy-companion"),onDeselect:function(){return t(void 0)},resetAllFilter:function(){return{sizeSlug:void 0}},isShownByDefault:!1,key:o},(0,r.createElement)(c.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Resolution","blocksy-companion"),value:e||"full",options:n,onChange:function(e){return t(e)},help:(0,l.__)("Select the size of the source image.","blocksy-companion")})):null};var Fr=function({clientId:e,attributes:{aspectRatio:t,imageFit:o,width:n,height:i,sizeSlug:s,viewType:u,minimumHeight:p},setAttributes:d}){const m=(0,c.__experimentalUseCustomUnits)({availableUnits:(0,a.useSetting)("spacing.units")||["px","%","vw","em","rem"]}),f=function(e,t){const o=parseFloat(t);isNaN(o)&&t||d({[e]:o<0?"0":t})};return(0,r.createElement)(c.__experimentalToolsPanel,{label:"cover"===u?(0,l.__)("Block Settings","blocksy-companion"):(0,l.__)("Image Settings","blocksy-companion"),resetAll:function(){d({aspectRatio:"auto",width:void 0,height:void 0,sizeSlug:void 0,minimumHeight:void 0})}},(0,r.createElement)(c.__experimentalToolsPanelItem,{hasValue:function(){return!!t},label:(0,l.__)("Aspect Ratio","blocksy-companion"),onDeselect:function(){return d({aspectRatio:void 0})},resetAllFilter:function(){return{aspectRatio:"auto"}},isShownByDefault:!0,key:e},(0,r.createElement)(c.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Aspect Ratio","blocksy-companion"),value:t,options:[{label:(0,l.__)("Original","blocksy-companion"),value:"auto"},{label:(0,l.__)("Square","blocksy-companion"),value:"1"},{label:(0,l.__)("16:9","blocksy-companion"),value:"16/9"},{label:(0,l.__)("4:3","blocksy-companion"),value:"4/3"},{label:(0,l.__)("3:2","blocksy-companion"),value:"3/2"},{label:(0,l.__)("9:16","blocksy-companion"),value:"9/16"},{label:(0,l.__)("3:4","blocksy-companion"),value:"3/4"},{label:(0,l.__)("2:3","blocksy-companion"),value:"2/3"}],onChange:function(e){return d({aspectRatio:e,minimumHeight:void 0})}})),"cover"!==u?(0,r.createElement)(React.Fragment,null,(0,r.createElement)(c.__experimentalToolsPanelItem,{style:{"grid-column":"span 1 / auto"},hasValue:function(){return!!n},label:(0,l.__)("Width","blocksy-companion"),onDeselect:function(){return d({width:void 0})},resetAllFilter:function(){return{width:void 0}},isShownByDefault:!0,key:e},(0,r.createElement)(c.__experimentalUnitControl,{label:(0,l.__)("Width","blocksy-companion"),labelPosition:"top",value:n||"",min:0,onChange:function(e){return f("width",e)},units:m})),(0,r.createElement)(c.__experimentalToolsPanelItem,{style:{"grid-column":"span 1 / auto"},hasValue:function(){return!!i},label:(0,l.__)("Height","blocksy-companion"),onDeselect:function(){return d({height:void 0})},resetAllFilter:function(){return{height:void 0}},isShownByDefault:!0,key:e},(0,r.createElement)(c.__experimentalUnitControl,{label:(0,l.__)("Height","blocksy-companion"),labelPosition:"top",value:i||"",min:0,onChange:function(e){return f("height",e)},units:m})),(0,r.createElement)(c.__experimentalToolsPanelItem,{hasValue:function(){return!!o},label:(0,l.__)("Scale","blocksy-companion"),onDeselect:function(){return d({imageFit:void 0})},resetAllFilter:function(){return{imageFit:"cover"}},isShownByDefault:!0,key:e},(0,r.createElement)(c.__experimentalToggleGroupControl,{label:(0,l.__)("Scale","blocksy-companion"),value:o,isBlock:!0,onChange:function(e){return d({imageFit:e})}},(0,r.createElement)(c.__experimentalToggleGroupControlOption,{key:"cover",value:"cover",label:(0,l.__)("Cover","blocksy-companion")}),(0,r.createElement)(c.__experimentalToggleGroupControlOption,{key:"contain",value:"contain",label:(0,l.__)("Contain","blocksy-companion")})))):null,"cover"===u?(0,r.createElement)(c.__experimentalToolsPanelItem,{hasValue:function(){return!!p},label:(0,l.__)("Minimum height"),onDeselect:function(){return d({minimumHeight:void 0})},isShownByDefault:!0},(0,r.createElement)(c.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,l.__)("Minimum height"),labelPosition:"top",value:p||"",onChange:function(e){e=0>parseFloat(e)?"0":e,d({minimumHeight:e,aspectRatio:"auto"})},units:m})):(0,r.createElement)(Mr,{sizeSlug:s,onChange:function(e){return d({sizeSlug:e})},clientId:e}))};function Vr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}const Lr=function(){return(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"}))},$r=function(){return(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,r.createElement)("path",{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"}))},Ur=function({clientId:e,postType:t,postId:o,attributes:l,setAttributes:i}){const{focalPoint:u,hasParallax:p,isRepeated:d,sizeSlug:m,allowCustomContentAndWideSize:f,contentSize:b,wideSize:y}=l,[h,g]=(0,s.useEntityProp)("postType",t,"featured_media",o),{media:_}=(0,v.useSelect)(function(e){const{getMedia:t}=e(s.store);return{media:h&&t(h,{context:"view"})}},[h]),k=function(e,t){var o,n,r;return(null==e||null===(o=e.media_details)||void 0===o||null===(n=o.sizes)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.source_url)||(null==e?void 0:e.source_url)}(_,m),w=!p,C=(0,c.__experimentalUseCustomUnits)({availableUnits:(0,a.useSetting)("spacing.units")||["px","%","vw","em","rem"]});return"cover"!==l.viewType?null:(0,r.createElement)(React.Fragment,null,(0,r.createElement)(c.__experimentalToolsPanel,{label:Kn("Layout"),resetAll:function(){i({hasParallax:!1,focalPoint:void 0,isRepeated:!1})}},(0,r.createElement)(c.__experimentalToolsPanelItem,{label:Kn("Layout"),isShownByDefault:!0,hasValue:function(){return!f},onDeselect:function(){return i({allowCustomContentAndWideSize:!0,contentSize:void 0,wideSize:void 0})}},(0,r.createElement)(c.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained"},(0,r.createElement)(c.ToggleControl,{label:Kn("Inner blocks use content width"),checked:f,onChange:function(){i({allowCustomContentAndWideSize:!f})},help:Kn(f?"Nested blocks use content width with options for full and wide widths.":"Nested blocks will fill the width of this container. Toggle to constrain.")}),f&&(0,r.createElement)(React.Fragment,null,(0,r.createElement)(c.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:Kn("Content width"),labelPosition:"top",value:b||y||"",onChange:function(e){e=0>parseFloat(e)?"0":e,i({contentSize:e})},units:C,prefix:(0,r.createElement)(c.__experimentalInputControlPrefixWrapper,{variant:"icon"},(0,r.createElement)(Lr,null))}),(0,r.createElement)(c.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:Kn("Wide width"),labelPosition:"top",value:y||b||"",onChange:function(e){e=0>parseFloat(e)?"0":e,i({wideSize:e})},units:C,prefix:(0,r.createElement)(c.__experimentalInputControlPrefixWrapper,{variant:"icon"},(0,r.createElement)($r,null))}),(0,r.createElement)("p",{className:"block-editor-hooks__layout-constrained-helptext"},Kn("Customize the width for all elements that are assigned to the center or wide columns.")))))),(0,r.createElement)(c.__experimentalToolsPanel,{label:Kn("Image Settings","blocksy-companion"),resetAll:function(){i({hasParallax:!1,focalPoint:void 0,isRepeated:!1})}},w&&(0,r.createElement)(c.__experimentalToolsPanelItem,{label:Kn("Focal point"),isShownByDefault:!0,hasValue:function(){return!!u},onDeselect:function(){return i({focalPoint:void 0})}},(0,r.createElement)(c.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:Kn("Focal point"),url:k,value:u,onDragStart:function(e){return i({focalPoint:e})},onDrag:function(e){return i({focalPoint:e})},onChange:function(e){return i({focalPoint:e})}})),(0,r.createElement)(c.__experimentalToolsPanelItem,{label:Kn("Fixed background"),isShownByDefault:!0,hasValue:function(){return p},onDeselect:function(){return i({hasParallax:!1,focalPoint:void 0})}},(0,r.createElement)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:Kn("Fixed background"),checked:p,onChange:function(){i(function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Vr(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({hasParallax:!p},p?{}:{focalPoint:void 0}))}})),(0,r.createElement)(c.__experimentalToolsPanelItem,{label:Kn("Repeated background"),isShownByDefault:!0,hasValue:function(){return d},onDeselect:function(){return i({isRepeated:!1})}},(0,r.createElement)(c.ToggleControl,{__nextHasNoMarginBottom:!0,label:Kn("Repeated background"),checked:d,onChange:function(){i({isRepeated:!d})}})),(0,r.createElement)(Mr,{sizeSlug:m,onChange:function(e){return i({sizeSlug:e})},clientId:e})))};o(252);function qr(e,t={}){if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:o,rootSizeValue:n,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},l=r?.join("|"),i=new RegExp(`^(\\d*\\.?\\d+)(${l}){1,1}$`),a=e.match(i);if(!a||a.length<3)return null;let[,c,s]=a,u=parseFloat(c);return"px"!==o||"em"!==s&&"rem"!==s||(u*=n,s=o),"px"!==s||"em"!==o&&"rem"!==o||(u/=n,s=o),"em"!==o&&"rem"!==o||"em"!==s&&"rem"!==s||(s=o),{value:Gr(u,3),unit:s}}function Gr(e,t=3){const o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}function Wr(e,t){const{size:o}=e;if(!o||"0"===o||!1===e?.fluid)return o;if(!Zr(t?.typography)&&!Zr(e))return o;let n=function(e){const t=e?.typography,o=e?.layout,n=qr(o?.wideSize)?o?.wideSize:null;return Zr(t)&&n?{fluid:{maxViewportWidth:n,...t.fluid}}:{fluid:t?.fluid}}(t);n="object"==typeof n?.fluid?n?.fluid:{};const r=function({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:n="320px",maximumViewportWidth:r="1600px",scaleFactor:l=1,minimumFontSizeLimit:i}){if(i=qr(i)?i:"14px",o){const n=qr(o);if(!n?.unit)return null;const r=qr(i,{coerceTo:n.unit});if(r?.value&&!e&&!t&&n?.value<=r?.value)return null;if(t||(t=`${n.value}${n.unit}`),!e){const t="px"===n.unit?n.value:16*n.value,o=Math.min(Math.max(1-.075*Math.log2(t),.25),.75),l=Gr(n.value*o,3);e=r?.value&&l<r?.value?`${r.value}${r.unit}`:`${l}${n.unit}`}}const a=qr(e),c=a?.unit||"rem",s=qr(t,{coerceTo:c});if(!a||!s)return null;const u=qr(e,{coerceTo:"rem"}),p=qr(r,{coerceTo:c}),d=qr(n,{coerceTo:c});if(!p||!d||!u)return null;const m=p.value-d.value;if(!m)return null;const f=Gr(d.value/100,3),b=Gr(f,3)+c,y=Gr(((s.value-a.value)/m*100||1)*l,3);return`clamp(${e}, ${u.value}${u.unit} + ((1vw - ${b}) * ${y}), ${t})`}({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:o,minimumFontSizeLimit:n?.minFontSize,maximumViewportWidth:n?.maxViewportWidth,minimumViewportWidth:n?.minViewportWidth});return r||o}function Zr(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}const Xr=(e,t,o)=>{const n=Array.isArray(t)?t:t.split(".");let r=e;return n.forEach(e=>{r=r?.[e]}),r??o};const Kr=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Wr(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}];function Jr(e,t,o,n,r){const l=[Xr(e,["blocks",t,...o]),Xr(e,o)];for(const i of l)if(i){const l=["custom","theme","default"];for(const a of l){const l=i[a];if(l){const i=l.find(e=>e[n]===r);if(i){if("slug"===n)return i;return Jr(e,t,o,"slug",i.slug)[n]===i[n]?i:void 0}}}}}function Yr(e,t,o){if(!o||"string"!=typeof o){if("string"!=typeof o?.ref)return o;if(!(o=Xr(e,o.ref))||o?.ref)return o}const n="var:",r="var(--wp--";let l;if(o.startsWith(n))l=o.slice(4).split("|");else{if(!o.startsWith(r)||!o.endsWith(")"))return o;l=o.slice(10,-1).split("--")}const[i,...a]=l;return"preset"===i?function(e,t,o,[n,r]){const l=Kr.find(e=>e.cssVarInfix===n);if(!l)return o;const i=Jr(e.settings,t,l.path,"slug",r);if(i){const{valueKey:o}=l;return Yr(e,t,i[o])}return o}(e,t,o,a):"custom"===i?function(e,t,o,n){const r=Xr(e.settings,["blocks",t,"custom",...n])??Xr(e.settings,["custom",...n]);return r?Yr(e,t,r):o}(e,t,o,a):o}const Qr=["link"];function el(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function tl(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?el(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):el(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function ol(e,t,o){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:tl({},e);const n=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:tl({},t)}return r[n]=o,e}const nl=function(e){return function(e){var t,o,n,r,l,i,a;return xn(xn({},e.style),{},{color:xn(xn({},null===(t=e.style)||void 0===t?void 0:t.color),{},{text:e.textColor?"var:preset|color|"+e.textColor:null===(o=e.style)||void 0===o||null===(n=o.color)||void 0===n?void 0:n.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:null===(r=e.style)||void 0===r||null===(l=r.color)||void 0===l?void 0:l.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:null===(i=e.style)||void 0===i||null===(a=i.color)||void 0===a?void 0:a.gradient})})}({style:e.style,textColor:e.textColor})};var rl=function({fieldDescriptor:e,fieldsDescriptor:t,linkFieldsChoices:o,attributes:n,setAttributes:i,options:s,fieldsChoices:u,clientId:p,name:f,__unstableParentLayout:b,taxonomies:y,postId:h,postType:g}){var k,C,O,x,E,P,S,j,I,T,D,A,B,H,N,R;const{replaceInnerBlocks:z}=(0,v.useDispatch)("core/block-editor"),M=nl(n),F=Pn(0,b),V=function(e){return Yr({settings:F},"",e)},L=function(e){var t,o,n,i,a,c,s;const u=null==e||null===(t=e.color)||void 0===t||null===(o=t.palette)||void 0===o?void 0:o.custom,p=null==e||null===(n=e.color)||void 0===n||null===(i=n.palette)||void 0===i?void 0:i.theme,d=null==e||null===(a=e.color)||void 0===a||null===(c=a.palette)||void 0===c?void 0:c.default,m=null==e||null===(s=e.color)||void 0===s?void 0:s.defaultPalette;return(0,r.useMemo)(function(){const e=[];return p&&p.length&&e.push({name:(0,l._x)("Theme","Indicates this palette comes from the theme."),colors:p}),m&&d&&d.length&&e.push({name:(0,l._x)("Default","Indicates this palette comes from WordPress."),colors:d}),u&&u.length&&e.push({name:(0,l._x)("Custom","Indicates this palette is created by the user."),colors:u}),e},[u,p,d,m])}(F),$=function(e){var t,o,n,i,a,c,s;const u=null==e||null===(t=e.color)||void 0===t||null===(o=t.gradients)||void 0===o?void 0:o.custom,p=null==e||null===(n=e.color)||void 0===n||null===(i=n.gradients)||void 0===i?void 0:i.theme,d=null==e||null===(a=e.color)||void 0===a||null===(c=a.gradients)||void 0===c?void 0:c.default,m=null==e||null===(s=e.color)||void 0===s?void 0:s.defaultGradients;return(0,r.useMemo)(function(){const e=[];return p&&p.length&&e.push({name:(0,l._x)("Theme","Indicates this palette comes from the theme."),gradients:p}),m&&d&&d.length&&e.push({name:(0,l._x)("Default","Indicates this palette comes from WordPress."),gradients:d}),u&&u.length&&e.push({name:(0,l._x)("Custom","Indicates this palette is created by the user."),gradients:u}),e},[u,p,d,m])}(F),q=function(e){const t=L.flatMap(function({colors:e}){return e}).find(function({color:t}){return t===e});return t?"var:preset|color|"+t.slug:e},G=function(e){const t=$.flatMap(function({gradients:e}){return e}).find(function({gradient:t}){return t===e});return t?"var:preset|gradient|"+t.slug:e},W=function(e){i(function(e){var t,o,n;const r=null==e||null===(t=e.color)||void 0===t?void 0:t.text,l=null!=r&&r.startsWith("var:preset|color|")?r.substring(17):void 0,i=null==e||null===(o=e.color)||void 0===o?void 0:o.background,a=null!=i&&i.startsWith("var:preset|color|")?i.substring(17):void 0,c=null==e||null===(n=e.color)||void 0===n?void 0:n.gradient,s=null!=c&&c.startsWith("var:preset|gradient|")?c.substring(20):void 0,u=xn({},e);return u.color=xn(xn({},u.color),{},{text:l?void 0:r,background:a?void 0:i,gradient:s?void 0:c}),{style:In(u),textColor:l,backgroundColor:a,gradient:s}}(e))},Z=V(null==M||null===(k=M.elements)||void 0===k||null===(C=k.link)||void 0===C||null===(O=C.color)||void 0===O?void 0:O.text),X=V(null==M||null===(x=M.elements)||void 0===x||null===(E=x.link)||void 0===E||null===(P=E[":hover"])||void 0===P||null===(S=P.color)||void 0===S?void 0:S.text),K=V(null==n||null===(j=n.style)||void 0===j||null===(I=j.elements)||void 0===I||null===(T=I.overlay)||void 0===T||null===(D=T.color)||void 0===D?void 0:D.background),J=V(null==n||null===(A=n.style)||void 0===A||null===(B=A.elements)||void 0===B||null===(H=B.overlay)||void 0===H||null===(N=H.color)||void 0===N?void 0:N.gradient);let Y=null;const Q=function(e){if(Y||(Y="color"),"gradient"===Y)return void(Y=null);let t=ol(M,["elements","overlay","color","background"],q(e));e&&(t=ol(t,["elements","overlay","color","gradient"],G(void 0))),W(t)},ee=V(null==M||null===(R=M.color)||void 0===R?void 0:R.text),te=function(e){let t=ol(M,["color","text"],q(e));ee===Z&&(t=ol(t,["elements","link","color","text"],q(e))),W(t)},oe=function(e){W(ol(M,["elements","link","color","text"],q(e)))},ne=function(e){W(ol(M,["elements","link",":hover","color","text"],q(e)))},re="default"!==n.viewType&&d(e)?[{colorValue:J?void 0:K,gradientValue:J,label:(0,l.__)("Overlay","blocksy-companion"),enableAlpha:!0,onColorChange:Q,onGradientChange:function(e){!function(e){if(Y||(Y="gradient"),"color"===Y)return;let t=ol(M,["elements","overlay","color","gradient"],G(e));e&&(t=ol(t,["elements","overlay","color","background"],q(void 0))),W(t)}(e)},isShownByDefault:!0,clearable:!0}]:[..."yes"===n.has_field_link?[{colorValue:Z,label:(0,l.__)("Link","blocksy-companion"),enableAlpha:!0,onColorChange:oe},{colorValue:X,label:(0,l.__)("Link Hover","blocksy-companion"),enableAlpha:!0,onColorChange:ne}]:[{colorValue:ee,label:(0,l.__)("Text","blocksy-companion"),enableAlpha:!0,onColorChange:te}]];return e?(0,r.createElement)(React.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t}),"viewType"!==e||K||setTimeout(function(){Q("#000000")},50),"viewType"!==e&&("field"!==e||d(t)&&"wp:author_avatar"!==n.field)||z(p,[],!1)},options:tl(tl(tl(tl(tl(tl({field:{type:"ct-select",label:(0,l.__)("Content Source","blocksy-companion"),value:"",search:!0,searchPlaceholder:(0,l.__)("Search for field","blocksy-companion"),defaultToFirstItem:!1,choices:u,purpose:"default"}},"wp:archive_title"===n.field?{has_archive_prefix:{type:"ct-switch",label:(0,l.__)("Show archive label","blocksy-companion"),value:"no"}}:{}),m(e)?tl({has_field_link:{type:"ct-switch",label:(0,l.__)("Enable field link","blocksy-companion"),value:"no"}},"yes"===n.has_field_link?tl({link_source:{type:"ct-select",label:(0,l.__)("Link Source","blocksy-companion"),value:"",search:!0,searchPlaceholder:(0,l.__)("Search for field","blocksy-companion"),defaultToFirstItem:!1,choices:o,purpose:"default"}},null!=n&&n.link_source&&""!==n.link_source?{has_field_link_new_tab:{type:"ct-switch",label:(0,l.__)("Open in new tab","blocksy-companion"),value:"no"},has_field_link_rel:{type:"text",label:(0,l.__)("Link Rel","blocksy-companion"),value:""}}:{}):{}):{}),"wp:author_avatar"!==n.field&&d(e)?{viewType:{type:"ct-radio",label:(0,l.__)("View Type","blocksy-companion"),value:n.viewType,design:"inline",purpose:"gutenberg",divider:"bottom:full",choices:{default:(0,l.__)("Image","blocksy-companion"),cover:(0,l.__)("Cover","blocksy-companion")}}}:{}),"wp:terms"===n.field&&y&&y.length>0?{taxonomy:{type:"ct-select",label:(0,l.__)("Taxonomy","blocksy-companion"),value:"",design:"inline",purpose:"default",choices:y.map(function({name:e,slug:t}){return{key:t,value:e}})}}:{}),"wp:term_image"===n.field?{imageSource:{type:"ct-radio",label:(0,l.__)("Image Source","blocksy-companion"),value:n.imageSource,design:"inline",purpose:"gutenberg",divider:"bottom",choices:{featured:(0,l.__)("Image","blocksy-companion"),icon:(0,l.__)("Icon/Logo","blocksy-companion")}}}:{}),s),value:tl(tl({},n),t&&t.has_taxonomies_customization?{has_taxonomies_customization:"yes"}:{}),hasRevertButton:!1}),d(e)&&"wp:author_avatar"!==n.field&&"wp:archive_image"!==n.field&&"default"===n.viewType&&(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t})},options:tl(tl({lightbox_condition:{type:"ct-condition",condition:{has_field_link:"no"},options:{lightbox:{type:"ct-switch",label:(0,l.__)("Expand on click","blocksy-companion"),value:"no"}}}},"wp:featured_image"===n.field?{videoThumbnail:{type:"ct-switch",label:(0,l.__)("Video thumbnail","blocksy-companion"),value:"no"}}:{}),{},{image_hover_effect:{label:(0,l.__)("Image Hover Effect","blocksy-companion"),type:"ct-select",value:"none",view:"text",design:"inline",divider:"top:full",choices:{none:(0,l.__)("None","blocksy-companion"),"zoom-in":(0,l.__)("Zoom In","blocksy-companion"),"zoom-out":(0,l.__)("Zoom Out","blocksy-companion")}}}),value:n,hasRevertButton:!1})),d(e)&&"wp:author_avatar"!==n.field&&(0,r.createElement)(React.Fragment,null,(0,r.createElement)(Ur,{attributes:n,setAttributes:i,postId:h,postType:g}),(0,r.createElement)(Fr,{clientId:p,attributes:n,setAttributes:i})),"wp:author_avatar"===n.field&&(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(c.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,l.__)("Image size","blocksy-companion"),onChange:function(e){return i({avatar_size:e})},min:5,max:500,initialPosition:null==n?void 0:n.avatar_size,value:null==n?void 0:n.avatar_size})),"woo:brands"===n.field&&(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(c.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,l.__)("Logo Size","blocksy-companion"),onChange:function(e){return i({brands_size:e})},min:5,max:500,initialPosition:null==n?void 0:n.brands_size,value:null==n?void 0:n.brands_size}),(0,r.createElement)(c.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,l.__)("Logo Gap","blocksy-companion"),onChange:function(e){return i({brands_gap:e})},min:5,max:500,initialPosition:null==n?void 0:n.brands_gap,value:null==n?void 0:n.brands_gap})),!d(e)&&"woo:brands"!==n.field&&(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t})},options:tl(tl({before:{type:"text",label:(0,l.__)("Before","blocksy-companion"),value:""},after:{type:"text",label:(0,l.__)("After","blocksy-companion"),value:""}},"wp"!==e.provider||"wp"===e.provider&&("excerpt"===e.id||"terms"===e.id||"author"===e.id)?{fallback:{type:"text",label:(0,l.__)("Fallback","blocksy-companion"),value:(0,l.__)("Custom field fallback","blocksy-companion")}}:{}),{},{has_field_link_wrap_content_condition:{type:"ct-condition",condition:{has_field_link:"yes"},options:{has_field_link_wrap_content:{type:"ct-switch",label:(0,l.__)("Include Before/After in link","blocksy-companion"),value:"no"}}}}),value:n,hasRevertButton:!1}))),(0,r.createElement)(a.InspectorControls,{group:"color",resetAllFilter:function(){const t=d(e)?"image":"text";"text"===t&&(te(),oe(),ne(),setTimeout(function(){var e;const t=null==n||null===(e=n.style)||void 0===e?void 0:e.elements,{link:o}=t,r=w(t,Qr),l=tl(tl({},n.style),{},{elements:r});i({textColor:void 0,style:l})})),"image"===t&&setTimeout(function(){Q("#000000")},50)}},(0,r.createElement)(_,{label:(0,l.__)("Colors","blocksy-companion"),panelId:p,settings:re,skipToolsPanel:!0,containerProps:{"data-field-type":d(e)?`image:${n.viewType}`:"text"}}),d(e)&&"default"!==n.viewType?(0,r.createElement)(c.__experimentalToolsPanelItem,{hasValue:function(){return void 0!==n.dimRatio&&50!==n.dimRatio},label:(0,l.__)("Overlay opacity"),onDeselect:function(){return i({dimRatio:50})},resetAllFilter:function(){return{dimRatio:50}},isShownByDefault:!0,panelId:p},(0,r.createElement)(c.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Overlay opacity"),value:n.dimRatio,onChange:function(e){return i({dimRatio:e})},min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})):null),"wp:terms"===n.field&&(0,r.createElement)(a.InspectorControls,{group:"advanced"},(0,r.createElement)(c.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,l.__)("Term additional class","blocksy-companion"),value:n.termClass,onChange:function(e){i({termClass:e})},help:(0,l.__)("Additional class for term items. Useful for styling.","blocksy-companion")}))):(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(U.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i({[e]:t}),"viewType"!==e||K||setTimeout(function(){Q("#000000")},50),"viewType"!==e&&("field"!==e||d(t)&&"wp:author_avatar"!==n.field)||z(p,[],!1)},options:{field:{type:"ct-select",label:(0,l.__)("Content Source","blocksy-companion"),value:"",search:!0,searchPlaceholder:(0,l.__)("Search for field","blocksy-companion"),defaultToFirstItem:!1,choices:u,purpose:"default"}},value:tl({},n),hasRevertButton:!1})))};function ll(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function il(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ll(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ll(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var al=function({clientId:e,attributes:t,setAttributes:o,context:n,name:l,__unstableParentLayout:i}){const{postType:a,taxonomy:c}=n,{fieldsDescriptor:s,linkFieldsChoices:u,options:p,fieldsChoices:d,fullDescriptorLoaded:m}=zr(n),f=ge(a),b=(0,r.useMemo)(function(){if(!t.field||!s)return null;const[e,o]=t.field.split(":"),n=s.fields.find(function({provider:t}){return t===e});if(!n)return null;const r=n.fields.find(function({id:e}){return e===o});return r?il(il({},r),{},{provider:n.provider}):null},[t.field,s]),y=(0,r.useMemo)(function(){if(!t.field||!s)return!1;const[e,o]=t.field.split(":");let n=s.fields.find(function({provider:t}){return t===e});if(n){return!n.fields.find(function({id:e}){return e===o})}if(!m)return!1;if(n=s.fields.find(function({provider:t}){return t===e}),!n)return!0;return!n.fields.find(function({id:e}){return e===o})},[t.field,b,m]);y&&console.warn("Field is missing:",t.field),(0,r.useEffect)(function(){"wp:title"===t.field&&c&&o({field:"wp:term_title"})},[c,t.field]);const h=Hr(n);return(0,r.createElement)(React.Fragment,null,(0,r.createElement)(Br,{fieldDescriptor:b,attributes:t,setAttributes:o}),(0,r.createElement)(Tr,g({attributes:t,fieldsDescriptor:s,isFieldMissing:y,fieldDescriptor:b,fieldsContext:h},n)),(0,r.createElement)(rl,g({options:p,fieldDescriptor:b,attributes:t,setAttributes:o,fieldsChoices:d,clientId:e,fieldsDescriptor:s,linkFieldsChoices:u,taxonomies:f},n,{name:l,__unstableParentLayout:i})))},cl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/dynamic-data","category":"blocksy-blocks","attributes":{"tagName":{"type":"string","default":"div"},"field":{"type":"string","default":"wp:title"},"has_archive_prefix":{"type":"string","default":"no"},"has_field_link":{"type":"string","default":"no"},"has_field_link_wrap_content":{"type":"string","default":"no"},"link_source":{"type":"string","default":""},"before":{"type":"string","default":""},"after":{"type":"string","default":""},"fallback":{"type":"string","default":""},"align":{"type":"string"},"imageAlign":{"type":"string"},"aspectRatio":{"type":"string","default":"auto"},"imageFit":{"type":"string","default":"cover"},"width":{"type":"string"},"height":{"type":"string"},"sizeSlug":{"type":"string"},"alt_text":{"type":"string","default":""},"avatar_size":{"type":"number","default":96},"avatarIsLink":{"type":"boolean","default":false},"avatarLinkTarget":{"type":"string","default":"_self"},"featuredIsLink":{"type":"boolean","default":false},"featuredLinkTarget":{"type":"string","default":"_self"},"taxonomy":{"type":"string","default":""},"attribute":{"type":"string","default":""},"lightbox":{"type":"string","default":"no"},"videoThumbnail":{"type":"string","default":"no"},"image_hover_effect":{"type":"string","default":"none"},"termClass":{"type":"string","default":""},"termAccentColor":{"type":"string","default":"yes"},"brands_size":{"type":"number","default":100},"brands_gap":{"type":"number","default":10},"imageSource":{"type":"string","default":"featured"},"viewType":{"type":"string","default":"default"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"dimRatio":{"type":"number","default":50},"style":{"type":"object","default":{"elements":{"overlay":{"color":{"background":"#000000"}}}}}},"supports":{"color":{"text":false,"background":false,"__experimentalSkipSerialization":["link","heading","button","gradients"]},"className":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}}},"usesContext":["postId","postType","queryId","taxonomy","termId","termIcon","termImage","has_item_link"]}'),sl=JSON.parse('{"u":{"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"isUserOverlayColor":{"type":"boolean"},"focalPoint":{"type":"object"},"minHeight":{"type":"number"},"minHeightUnit":{"type":"string"},"contentPosition":{"type":"string"},"isDark":{"type":"boolean","default":true},"allowedBlocks":{"type":"array"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]},"tagName":{"type":"string","default":"div"},"allowCustomContentAndWideSize":{"type":"boolean","default":true},"contentSize":{"type":"string","default":""},"wideSize":{"type":"string","default":""},"minimumHeight":{"type":"string","default":""}}}');const ul=(0,U.getColorsDefaults)({textColor:"",customTextColor:"",backgroundColor:"",customBackgroundColor:"",linkColor:"",customLinkColor:"",linkHoverColor:"",customLinkHoverColor:"",overlayColor:"",customOverlayColor:"#000000"});function pl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function dl(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?pl(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):pl(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const ml=(0,U.getOptionsForBlock)("dynamic-data"),fl=(0,U.getAttributesFromOptions)(ml);(0,i.registerBlockType)("blocksy/dynamic-data",dl(dl({},cl),{},{title:(0,l.__)("Dynamic Data","blocksy-companion"),description:(0,l.__)("Fetch and display content from various sources.","blocksy-companion"),attributes:dl(dl(dl(dl({},cl.attributes),sl.u),fl),ul),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M17.9 10.5c-.1-.3-.4-.4-.7-.4h-3.7V4.6c0-.4-.2-.7-.6-.8h-.2c-.3 0-.5.1-.7.4l-5.7 8.6c-.2.3-.2.6 0 .8 0 .2.3.4.6.4h3.7v5.5c0 .4.2.7.6.8h.2c.3 0 .5-.1.7-.4l5.7-8.6c.2-.2.2-.6.1-.8zm-5.9 7v-4.4c0-.3-.3-.6-.6-.6H7.9l4.1-6v4.4c0 .3.3.6.6.6h3.5l-4.1 6z"}))},edit:function(e){return(0,r.createElement)(al,e)},save:function(){return(0,r.createElement)(a.InnerBlocks.Content,null)},__experimentalLabel:function(e){return"wp:title"===e.field?(0,l.__)("Dynamic Title","blocksy-companion"):"wp:excerpt"===e.field?(0,l.__)("Dynamic Excerpt","blocksy-companion"):"wp:date"===e.field?(0,l.__)("Dynamic Post Date","blocksy-companion"):"wp:comments"===e.field?(0,l.__)("Dynamic Comments","blocksy-companion"):"wp:terms"===e.field?(0,l.__)("Dynamic Terms","blocksy-companion"):"wp:author"===e.field?(0,l.__)("Dynamic Author","blocksy-companion"):"wp:featured_image"===e.field?(0,l.__)("Dynamic Featured Image","blocksy-companion"):"wp:author_avatar"===e.field?(0,l.__)("Dynamic Author Avatar","blocksy-companion"):"woo:price"===e.field?(0,l.__)("Dynamic Price","blocksy-companion"):"woo:stock_status"===e.field?(0,l.__)("Dynamic Stock Status","blocksy-companion"):"woo:attributes"===e.field?(0,l.__)("Dynamic Attributes","blocksy-companion"):"woo:brands"===e.field?(0,l.__)("Dynamic Brands","blocksy-companion"):"woo:sku"===e.field?(0,l.__)("Dynamic SKU","blocksy-companion"):"woo:rating"===e.field?(0,l.__)("Dynamic Rating","blocksy-companion"):"wp:term_title"===e.field?(0,l.__)("Dynamic Term Title","blocksy-companion"):"wp:term_description"===e.field?(0,l.__)("Dynamic Term Description","blocksy-companion"):"wp:term_count"===e.field?(0,l.__)("Dynamic Term Count","blocksy-companion"):"wp:term_image"===e.field?(0,l.__)("Dynamic Term Image","blocksy-companion"):"wp:archive_image"===e.field?(0,l.__)("Dynamic Archive Image","blocksy-companion"):"wp:archive_title"===e.field?(0,l.__)("Dynamic Archive Title","blocksy-companion"):"wp:archive_description"===e.field?(0,l.__)("Dynamic Archive Description","blocksy-companion"):(0,l.__)("Dynamic Data","blocksy-companion")}}));const bl={inputFontColor:"",customInputFontColor:"",inputFontColorFocus:"",customInputFontColorFocus:"",inputIconColor:"",customInputIconColor:"",inputIconColorFocus:"",customInputIconColorFocus:"",inputBorderColor:"",customInputBorderColor:"",inputBorderColorFocus:"",customInputBorderColorFocus:"",inputBackgroundColor:"",customInputBackgroundColor:"",inputBackgroundColorFocus:"",customInputBackgroundColorFocus:"",buttonBackgroundColor:"",customButtonBackgroundColor:"",buttonBackgroundColorHover:"",customButtonBackgroundColorHover:"",dropdownTextInitialColor:"",customDropdownTextInitialColor:"",dropdownTextHoverColor:"",customDropdownTextHoverColor:"",dropdownBackgroundColor:"",customDropdownBackgroundColor:"",shadowColor:"",customShadowColor:""},yl=Lt(bl);function hl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function gl(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?hl(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):hl(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const _l=gl({enable_live_results:"no",live_results_images:"yes",searchBoxHeight:"",searchProductPrice:"no",searchProductStatus:"no",search_box_placeholder:(0,l.__)("Search","blocksy-companion"),taxonomy_filter_label:(0,l.__)("Select category","blocksy-companion"),search_through:{post:!0,page:!0,product:!0,custom:!0},taxonomy_filter_visibility:{desktop:!0,tablet:!0,mobile:!1}},bl);var vl=function({attributes:e,setAttributes:t,buttonStyles:o}){const[n,l]=(0,r.useState)(!1),{search_box_button_text:i,search_box_placeholder:s,taxonomy_filter_label:u,buttonPosition:p,has_taxonomy_filter:d,buttonUseText:m,taxonomy_filter_visibility:f}=e,b=(0,r.useRef)({taxonomy:"",icon:""}),y=(0,r.useCallback)(function(e){const t=document.createElement("div");t.innerHTML=e;const o=t.querySelector('[type="search"]');o&&o.setAttribute("placeholder",s);return t.querySelector(".ct-search-box").style="",t.querySelector(".ct-select-taxonomy")&&(b.current=gl(gl({},b.current),{},{taxonomy:t.querySelector(".ct-select-taxonomy").outerHTML})),t.querySelector(".ct-icon")&&(b.current=gl(gl({},b.current),{},{icon:t.querySelector(".ct-icon").outerHTML})),t.innerHTML},[s,p,o]),{isLoading:h}=Vt("search",gl(gl({},e),_l),y);return(0,r.useEffect)(function(){l(!0),setTimeout(function(){l(!1)},100)},[e]),h?(0,r.createElement)(c.Spinner,null):(0,r.createElement)("form",{role:"search",method:"get",className:"ct-search-form","data-form-controls":p,"data-taxonomy-filter":"yes"===d?"true":"false","data-submit-button":"yes"===m?"text":"icon","data-updating":n?"yes":"no"},(0,r.createElement)("input",{type:"search",value:s,onChange:function(e){t({search_box_placeholder:e.target.value})},placeholder:"Search",name:"s",autoComplete:"off",title:"Search for...","aria-label":"Search for..."}),(0,r.createElement)("div",{className:"ct-search-form-controls"},"yes"===d?(0,r.createElement)("span",{className:X()("ct-fake-select-container",{"ct-hidden-lg":!f.desktop,"ct-hidden-md":!f.tablet,"ct-hidden-sm":!f.mobile})},(0,r.createElement)("select",{className:"ct-select-taxonomy"}),(0,r.createElement)(a.RichText,{tagName:"span",className:"ct-fake-select",value:u,placeholder:"Select Category",allowedFormats:[],onChange:function(e){return t({taxonomy_filter_label:e})}})):null,(0,r.createElement)("div",{className:"wp-element-button","data-button":`${p}:${"yes"===m?"text":"icon"}`,"aria-label":"Search button",style:o},"yes"===m?(0,r.createElement)(a.RichText,{tagName:"span",value:i,placeholder:"Search",allowedFormats:[],onChange:function(e){return t({search_box_button_text:e})}}):(0,r.createElement)(r.RawHTML,null,b.current.icon),(0,r.createElement)("span",{className:"ct-ajax-loader"},(0,r.createElement)("svg",{viewBox:"0 0 24 24"},(0,r.createElement)("circle",{cx:"12",cy:"12",r:"10",opacity:"0.2",fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"}),(0,r.createElement)("path",{d:"m12,2c5.52,0,10,4.48,10,10",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2"},(0,r.createElement)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"0.6s",from:"0 12 12",to:"360 12 12",repeatCount:"indefinite"})))))))};const kl=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(c.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"9.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(c.Rect,{x:"16",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),wl=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(c.Rect,{x:"4.75",y:"7.75",width:"14.5",height:"8.5",rx:"1.25",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,r.createElement)(c.Rect,{x:"8",y:"11",width:"8",height:"2",fill:"currentColor"}));function Cl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Ol(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Cl(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Cl(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var xl=(0,a.withColors)({textColor:"color"},{inputFontColor:"color"},{inputFontColorFocus:"color"},{inputIconColor:"color"},{inputIconColorFocus:"color"},{inputBorderColor:"color"},{inputBorderColorFocus:"color"},{inputBackgroundColor:"color"},{inputBackgroundColorFocus:"color"},{buttonBackgroundColor:"color"},{buttonBackgroundColorHover:"color"},{dropdownTextInitialColor:"color"},{dropdownTextHoverColor:"color"},{dropdownBackgroundColor:"color"},{shadowColor:"color"})(function({attributes:e,setAttributes:t,clientId:o,className:n,inputFontColor:i,setInputFontColor:s,inputFontColorFocus:u,setInputFontColorFocus:p,inputIconColor:d,setInputIconColor:m,inputIconColorFocus:f,setInputIconColorFocus:b,inputBorderColor:y,setInputBorderColor:h,inputBorderColorFocus:g,setInputBorderColorFocus:v,inputBackgroundColor:k,setInputBackgroundColor:w,inputBackgroundColorFocus:C,setInputBackgroundColorFocus:O,buttonBackgroundColor:x,setButtonBackgroundColor:E,buttonBackgroundColorHover:P,setButtonBackgroundColorHover:S,dropdownTextInitialColor:j,setDropdownTextInitialColor:I,dropdownTextHoverColor:T,setDropdownTextHoverColor:D,dropdownBackgroundColor:A,setDropdownBackgroundColor:B,shadowColor:H,setShadowColor:N}){var R,z;const{buttonUseText:M="no",buttonPosition:F,enable_live_results:V}=e,L=null==e||null===(R=e.style)||void 0===R||null===(z=R.border)||void 0===z?void 0:z.radius,$=(0,r.useRef)(),U=(0,a.useBlockProps)({ref:$,className:{"ct-search-box":!0,className:n},style:Ol(Ol(Ol({"--theme-form-text-initial-color":null==i?void 0:i.color,"--theme-form-text-focus-color":null==u?void 0:u.color,"--theme-form-field-border-initial-color":null==y?void 0:y.color,"--theme-form-field-border-focus-color":null==g?void 0:g.color,"--theme-form-field-background-initial-color":null==k?void 0:k.color,"--theme-form-field-background-focus-color":null==C?void 0:C.color},L?{"--theme-form-field-border-radius":`${"string"==typeof L?L:`${L.topLeft} ${L.topRight} ${L.bottomLeft} ${L.bottomRight}`}`}:{}),null!=e&&e.searchBoxHeight?{"--theme-form-field-height":`${e.searchBoxHeight}px`}:{}),"yes"===V?{"--theme-link-initial-color":null==j?void 0:j.color,"--theme-link-hover-color":null==T?void 0:T.color,"--search-dropdown-background":null==A?void 0:A.color,"--search-dropdown-box-shadow-color":null==H?void 0:H.color}:{})});return(0,r.createElement)("div",U,(0,r.createElement)(vl,{blockProps:U,attributes:e,setAttributes:t,buttonStyles:Ol(Ol(Ol({},null!=d&&d.color?{"--theme-button-text-initial-color":d.color}:{}),null!=f&&f.color?{"--theme-button-text-hover-color":f.color}:{}),"outside"===F?Ol(Ol({},null!=x&&x.color?{"--theme-button-background-initial-color":x.color}:{}),null!=P&&P.color?{"--theme-button-background-hover-color":P.color}:{}):{})}),(0,r.createElement)(Xt,{attributes:e,setAttributes:t,options:Sl}),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(c.ToolbarGroup,null,(0,r.createElement)(c.ToolbarButton,{title:(0,l.__)("Button Outside"),icon:kl,onClick:function(){t({buttonPosition:"outside"===F?"inside":"outside"})},className:"outside"===F?"is-pressed":void 0}),(0,r.createElement)(c.ToolbarButton,{title:(0,l.__)("Use button with text"),icon:wl,onClick:function(){t({buttonUseText:"no"===M?"yes":"no"})},className:"yes"===M?"is-pressed":void 0}))),(0,r.createElement)(a.InspectorControls,{group:"styles"},(0,r.createElement)(_,{label:(0,l.__)("Input Font Color","blocksy-companion"),resetAll:function(){s(bl.inputFontColor),p(bl.inputFontColorFocus)},panelId:o,settings:[{colorValue:i.color,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return s(e||bl.inputFontColor)}},{colorValue:u.color,label:(0,l.__)("Focus","blocksy-companion"),onColorChange:function(e){return p(e||bl.inputFontColorFocus)}}]}),(0,r.createElement)(_,{label:(0,l.__)("Input Border Color","blocksy-companion"),resetAll:function(){h(bl.inputBorderColor),v(bl.inputBorderColorFocus)},panelId:o,settings:[{colorValue:y.color,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return h(e||bl.inputBorderColor)}},{colorValue:g.color,label:(0,l.__)("Focus","blocksy-companion"),onColorChange:function(e){return v(e||bl.inputBorderColorFocus)}}]}),(0,r.createElement)(_,{label:(0,l.__)("Input Background Color","blocksy-companion"),resetAll:function(){w(bl.inputBackgroundColor),O(bl.inputBackgroundColorFocus)},panelId:o,settings:[{colorValue:k.color,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return w(e||bl.inputBackgroundColor)}},{colorValue:C.color,label:(0,l.__)("Focus","blocksy-companion"),onColorChange:function(e){return O(e||bl.inputBackgroundColorFocus)}}]}),(0,r.createElement)(_,{label:"yes"===M?(0,l.__)("Button Text Color","blocksy-companion"):(0,l.__)("Button Icon Color","blocksy-companion"),resetAll:function(){m(bl.inputIconColor),b(bl.inputIconColorFocus)},panelId:o,settings:[{colorValue:d.color,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return m(e||bl.inputIconColor)}},{colorValue:f.color,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return b(e||bl.inputIconColorFocus)}}]}),"outside"===F?(0,r.createElement)(_,{label:(0,l.__)("Button Background Color","blocksy-companion"),resetAll:function(){E(bl.buttonBackgroundColor),S(bl.buttonBackgroundColorHover)},panelId:o,settings:[{colorValue:x.color,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return E(e||bl.buttonBackgroundColor)}},{colorValue:P.color,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return S(e||bl.buttonBackgroundColorHover)}}]}):null,"yes"===V?(0,r.createElement)(React.Fragment,null,(0,r.createElement)(_,{label:(0,l.__)("Dropdown Text Color","blocksy-companion"),resetAll:function(){I(bl.dropdownTextInitialColor),D(bl.dropdownTextHoverColor)},panelId:o,settings:[{colorValue:j.color,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return I(e||bl.dropdownTextInitialColor)}},{colorValue:T.color,label:(0,l.__)("Hover","blocksy-companion"),onColorChange:function(e){return D(e||bl.dropdownTextHoverColor)}}]}),(0,r.createElement)(_,{label:(0,l.__)("Dropdown Background Color","blocksy-companion"),resetAll:function(){B(bl.dropdownBackgroundColor)},panelId:o,settings:[{colorValue:A.color,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return B(e||bl.dropdownBackgroundColor)}}]}),(0,r.createElement)(_,{label:(0,l.__)("Dropdown Shadow Color","blocksy-companion"),resetAll:function(){N(bl.shadowColor)},panelId:o,settings:[{colorValue:H.color,enableAlpha:!0,label:(0,l.__)("Initial","blocksy-companion"),onColorChange:function(e){return N(e||bl.shadowColor)}}]})):null))});function El(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function Pl(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?El(Object(o),!0).forEach(function(t){n(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):El(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}const Sl=(0,U.getOptionsForBlock)("search"),jl=(0,U.getAttributesFromOptions)(Sl);(0,i.registerBlockType)("blocksy/search",{apiVersion:3,title:(0,l.__)("Advanced Search","blocksy-companion"),description:(0,l.__)("Quickly find specific content on your site.","blocksy-companion"),icon:{src:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,r.createElement)("path",{d:"m19.7 18.5-3-2.9c1-1.3 1.6-2.8 1.6-4.5 0-3.9-3.2-7.2-7.2-7.2S4 7.2 4 11.2s3.2 7.2 7.2 7.2c1.7 0 3.3-.6 4.5-1.6l3 3c.1.1.3.2.5.2s.4-.1.5-.2c.3-.4.3-1 0-1.3zM5.6 11.2c0-3.1 2.5-5.5 5.5-5.5s5.6 2.4 5.6 5.5-2.5 5.5-5.5 5.5-5.6-2.5-5.6-5.5z"}))},category:"blocksy-blocks",attributes:Pl(Pl({},jl),yl),supports:{spacing:{margin:!0,__experimentalDefaultControls:{margin:!0}},__experimentalBorder:{color:!1,radius:!0,width:!1,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!1,radius:!0,width:!1}}},edit:function(e){return(0,r.createElement)(xl,e)},save:function(){return(0,r.createElement)("div",null,"Blocksy: Search Block")}})}()}();