(()=>{var u=Object.create;var m=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var k=e=>m(e,"__esModule",{value:!0});var $=(e,o)=>()=>(o||e((o={exports:{}}).exports,o),o.exports);var D=(e,o,s,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of w(o))!y.call(e,a)&&(s||a!=="default")&&m(e,a,{get:()=>o[a],enumerable:!(l=v(o,a))||l.enumerable});return e},P=(e,o)=>D(k(m(e!=null?u(h(e)):{},"default",!o&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var g=$((A,_)=>{_.exports=window.jQuery});var t=P(g());(0,t.default)(function(){let e=window.wp,o=(0,t.default)(document.body).hasClass("block-editor-page")&&e&&e.data&&e.data.subscribe;function s(i){(0,t.default)("#x-meta-box-quote, #x-meta-box-link, #x-meta-box-video, #x-meta-box-audio").css("display","none"),i&&(0,t.default)(`#x-meta-box-${i}`).css("display","block")}var l=(0,t.default)('#post-formats-select input[type=radio][name="post_format"]');l.length>0&&(s((0,t.default)('#post-formats-select input[type=radio][name="post_format"]:checked').val()),l.change(function(){s((0,t.default)(this).val())})),o&&(s(),e.data.subscribe(()=>{let i=e.data.select("core/editor").getEditedPostAttribute("format");i&&s(i)}));let a=["template-blank-7.php","template-blank-3.php","template-blank-8.php","template-blank-6.php"];function n(i){(0,t.default)("#x-meta-box-page-icon").toggle((i||"").indexOf("template-blank")===0),(0,t.default)("#x-meta-box-portfolio").toggle(i==="template-layout-portfolio.php"),(0,t.default)("#x-meta-box-slider-above, #x-meta-box-slider-below").toggle(!a.includes(i))}let p=(0,t.default)("#page_template");if(p.length>0&&(n(p.val()),p.on("change",function(){n(p.val())})),o){n();let i="";e.data.subscribe(()=>{let b=e.data.select("core/editor").getEditedPostAttribute("template");i!==b&&(n(b),i=b)})}var x=(0,t.default)("#_x_slider_above"),d=x.parents("tr").siblings();(0,t.default)("#_x_slider_above option:selected").text()==="Deactivated"&&d.css("display","none"),x.change(function(){(0,t.default)("#_x_slider_above option:selected").text()==="Deactivated"?d.css("display","none"):d.css("display","table-row")});var f=(0,t.default)("#_x_slider_below"),r=f.parents("tr").siblings();(0,t.default)("#_x_slider_below option:selected").text()==="Deactivated"&&r.css("display","none"),f.change(function(){(0,t.default)("#_x_slider_below option:selected").text()==="Deactivated"?r.css("display","none"):r.css("display","table-row")});var c=(0,t.default)("#x-meta-box-portfolio-item-video");(0,t.default)('input[name*="_x_portfolio_media"][value="Video"]').is(":checked")||c.css("display","none"),(0,t.default)('input[name*="_x_portfolio_media"]').change(function(){(0,t.default)('input[name*="_x_portfolio_media"][value="Video"]').is(":checked")?c.css("display","block"):c.css("display","none")}),(0,t.default)(".wp-color-picker").wpColorPicker()});})();
