(()=>{"use strict";var e={n:n=>{var o=n&&n.__esModule?()=>n.default:()=>n;return e.d(o,{a:o}),o},d:(n,o)=>{for(var t in o)e.o(o,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:o[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)};const n=window.jQuery;var o=e.n(n);const t=window.wp.compose;var i=window,r=i.ajaxurl,a=i.VPAdminVariables,c=o()("body");c.on("focus",'[name="vp_list_shortcode"], [name="vp_filter_shortcode"], [name="vp_sort_shortcode"]',function(){this.select()}),c.on("click",".vp-onclick-selection",function(){window.getSelection().selectAllChildren(this)}),c.on("copy cut",".vp-onclick-selection",function(e){var n=window.getSelection().toString().replace(/[\n\r]+/g,"");e.originalEvent.clipboardData.setData("text/plain",n),e.originalEvent.preventDefault()});var l=o()("#vp_format_video"),s=o()("#post-format-video"),u=null;function p(e){null!==u&&u===e||(u=e,l[e?"show":"hide"]())}l.length&&s.length&&(p(s.is(":checked")),c.on("change","[name=post_format]",function(){p(s.is(":checked"))}));var d,v,h,f,m=null,_=function(e){m=o().ajax({url:r,method:"POST",dataType:"json",data:{action:"vp_find_oembed",q:e.val(),nonce:a.nonce},complete:function(n){var o=n.responseJSON;o&&void 0!==o.html&&e.next(".vp-oembed-preview").html(o.html)}})};_=(0,t.debounce)(300,(d=_,v=[],h=null,(f=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];v=n,h||(h=requestAnimationFrame(function(){h=null,d.apply(void 0,v)}))}).cancel=function(){h&&(cancelAnimationFrame(h),h=null)},f)),c.on("change input",'.vp-input[name="_vp_format_video_url"]',function(){null!==m&&m.abort();var e=o()(this);e.next(".vp-oembed-preview").html(""),_(e)}),c.on("change","input[name='vp_general[register_portfolio_post_type]']",function(){o()(this).is(":checked")||confirm("Are you sure you want to turn off the Portfolio custom post type and related taxonomies? Make sure you don't use this post type on your site, otherwise you might see errors on the frontend.")||o()(this).prop("checked",!0)})})();