(self.blocksyJsonP=self.blocksyJsonP||[]).push([[450],{8123:function(e){"use strict"; /*! * arr-flatten * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function t(e,r){for(var n,o=0,a=e.length;o1)}},8222:function(e,t,r){"use strict";function n(e,t){let r=null,n=!1;const o=function(){clearTimeout(r),e.removeEventListener("transitionend",a),n||(n=!0,t())},a=function(t){t.target===e&&o()},i=1e3*parseFloat(getComputedStyle(e).transitionDuration);e.addEventListener("transitionend",a),r=setTimeout((function(){o()}),i)}r.d(t,{k:function(){return n}})},4450:function(e,t,r){"use strict";r.r(t),r.d(t,{mount:function(){return b}});var n=r(439),o=r(4184),a=r.n(o),i=r(2248),l=r(9257),s=r(8222);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.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:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const f=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t=function(e){for(var t=1;t-1?"&":"?"}${f.toString()}`};function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};const r=function(r){"modal"!==d({mode:"inline"},t).mode&&(e.contains(r.target)||w(e.querySelector(".ct-search-results")))},o=e.querySelector('input[type="search"]'),a=d({postType:"any",mode:"inline",perPage:5},t);if(!o||!window.fetch)return;let c=(u=async function(t){if(document.removeEventListener("click",r),document.addEventListener("click",r),0===t.target.value.trim().length){w(e.querySelector(".ct-search-results"));let t=e.querySelector("[aria-live]");return void(t&&(t.innerHTML=ct_localizations.search_live_no_result))}e.classList.add("ct-searching");const o=f({formEl:e,inputValue:t.target.value,perPage:a.perPage}),c=e.querySelector(".ct-live-results-nonce");try{const r=await function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return y&&(y.abort("New request"),y=null),g[e]?new Promise((function(t){t(g[e]),g[e]=g[e].clone()})):("AbortController"in window&&(y=new AbortController),fetch(e,{signal:y.signal,headers:{"X-WP-Nonce":t}}).then((function(t){return g[e]=t.clone(),y=null,t})))}(o,c?c.value:"");let u=parseInt(r.headers.get("X-WP-Total"),10);await(0,i.Xr)(ct_localizations.dynamic_styles.search_lazy);const f=await r.json();if(m)return;m=!0,e.classList.remove("ct-searching");let p=!!e.querySelector(".ct-search-results"),d=e.querySelector(".ct-search-results"),{height:h}=d?d.getBoundingClientRect():0;d&&0!==t.target.value.trim().length&&0!==f.length?d&&e.removeChild(d):0!==t.target.value.trim().length&&0!==f.length||w(d);let b=ct_localizations.search_live_no_result;f.length>0&&t.target.value.trim().length>0&&(b=(f.length>1?ct_localizations.search_live_many_results:ct_localizations.search_live_one_result).replace("%s",f.length));let _=e.querySelector("[aria-live]");if(_&&(_.innerHTML=b),f.length>0&&t.target.value.trim().length>0){let r=(0,n.h)("div",{class:"ct-search-results",role:"listbox","aria-label":ct_localizations.search_live_results},f.filter((function(e){return null==e?void 0:e.id})).map((function(t){return v({post:t,hasThumbs:(e.dataset.liveResults||"").indexOf("thumbs")>-1})})),u>a.perPage?(0,n.h)("a",{className:"ct-search-more",role:"option",href:ct_localizations.search_url.replace(/QUERY_STRING/,t.target.value)},ct_localizations.show_more_text):[]);if(e.appendChild(r),p){let t=e.querySelector(".ct-search-results"),{height:r}=t.getBoundingClientRect();h!==r&&(t.style.height=`${h}px`,t.classList.add("ct-slide"),requestAnimationFrame((function(){t.style.height=`${r}px`,(0,s.k)(t,(function(){t.removeAttribute("style"),t.classList.remove("ct-slide")}))})))}else!function(e){e.classList.add("ct-fade-enter");let{height:t}=e.getBoundingClientRect();e.classList.add("ct-fade-leave"),e.style.height=0,e.closest("form").classList.add("ct-has-dropdown"),requestAnimationFrame((function(){e.style.height=`${t}px`,e.classList.remove("ct-fade-enter"),e.classList.add("ct-fade-enter-active"),(0,s.k)(e,(function(){return e.removeAttribute("style")}))}))}(e.querySelector(".ct-search-results"));e.querySelector(".ct-search-more")&&e.querySelector(".ct-search-more").addEventListener("click",(function(t){t.preventDefault(),e.submit()})),(0,l.O)()&&"modal"===a.mode&&window.scrollTo(0,0)}m=!1}catch(e){if("New request"===e.message)return;console.error("Error fetching search results",e)}},p=300,function(){if(!p)return u.apply(this,arguments);var e=this,t=arguments;clearTimeout(h),h=setTimeout((function(){return h=null,u.apply(e,t)}),p)});var u,p,h;o.addEventListener("input",c),o.addEventListener("keydown",(function(e){"Escape"===e.key&&e.preventDefault()})),o.addEventListener("focus",(function(e){c(e)})),o.value.length>0&&c({target:o})};function w(e){if(!e)return;let{height:t}=e.getBoundingClientRect();e.classList.add("ct-fade-leave"),e.style.height=`${t}px`,e.closest("form").classList.remove("ct-has-dropdown"),requestAnimationFrame((function(){e.classList.remove("ct-fade-leave"),e.classList.add("ct-fade-leave-active"),e.style.height=0,(0,s.k)(e,(function(){return e.parentNode&&e.parentNode.removeChild(e)}))}))}function _(e){var t=[];if("object"==typeof e||"function"==typeof e){for(var r=Object.keys(e),n=r.length,o=0;o!i.includes(e))),s=e=>(e=>l.includes(e))(e)?document.createElementNS("http://www.w3.org/2000/svg",e):e===DocumentFragment?document.createDocumentFragment():document.createElement(e),c=(e,t,r)=>{null!=r&&(/^xlink[AHRST]/.test(t)?e.setAttributeNS("http://www.w3.org/1999/xlink",t.replace("xlink","xlink:").toLowerCase(),r):e.setAttribute(t,r))},u=(e,t,r)=>{const n=s(e);return Object.keys(t).forEach((e=>{const r=t[e];if("class"===e||"className"===e)c(n,"class",r);else if("style"===e)((e,t)=>{Object.keys(t).forEach((r=>{let n=t[r];"number"!=typeof n||a.test(r)||(n+="px"),e.style[r]=n}))})(n,r);else if(0===e.indexOf("on")){const t=e.slice(2).toLowerCase();n.addEventListener(t,r)}else"dangerouslySetInnerHTML"===e?n.innerHTML=r.__html:"key"!==e&&!1!==r&&c(n,e,!0===r?"":r)})),t.dangerouslySetInnerHTML||n.appendChild(r),n};function f(e,t){const r=[].slice.apply(arguments,[2]),n=document.createDocumentFragment();return o(r).forEach((e=>{e instanceof Node?n.appendChild(e):"boolean"!=typeof e&&null!=e&&n.appendChild(document.createTextNode(e))})),u(e,t||{},n)}const p={createElement:f,Fragment:"function"==typeof DocumentFragment?DocumentFragment:()=>{}};e.exports=p,e.exports.h=f,e.exports.default=p},4979:function(e){"use strict";e.exports=JSON.parse('["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","animation","audio","canvas","circle","clipPath","color-profile","cursor","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","handler","hatch","hatchpath","hkern","iframe","image","line","linearGradient","listener","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","prefetch","radialGradient","rect","script","set","solidColor","solidcolor","stop","style","svg","switch","symbol","tbreak","text","textArea","textPath","title","tref","tspan","unknown","use","video","view","vkern"]')}}]);