/**handles:clipboard,media-views,media-editor,media-audiovideo**/
/*! This file is auto-generated */
!function(t,e){"object"==typeof exports&amp;&amp;"object"==typeof module?module.exports=e():"function"==typeof define&amp;&amp;define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return v}});var e=n(279),e=n.n(e),o=n(370),i=n.n(o),o=n(817),c=n.n(o);function u(t){try{document.execCommand(t)}catch(t){return}}var a=function(t){t=c()(t);return u("cut"),t};var f=function(t){var e,n,o,r=1&lt;arguments.length&amp;&amp;void 0!==arguments[1]?arguments[1]:{container:document.body},i=&quot;&quot;;return&quot;string&quot;==typeof t?(e=t,n=&quot;rtl&quot;===document.documentElement.getAttribute(&quot;dir&quot;),(o=document.createElement(&quot;textarea&quot;)).style.fontSize=&quot;12pt&quot;,o.style.border=&quot;0&quot;,o.style.padding=&quot;0&quot;,o.style.margin=&quot;0&quot;,o.style.position=&quot;absolute&quot;,o.style[n?&quot;right&quot;:&quot;left&quot;]=&quot;-9999px&quot;,n=window.pageYOffset||document.documentElement.scrollTop,o.style.top=&quot;&quot;.concat(n,&quot;px&quot;),o.setAttribute(&quot;readonly&quot;,&quot;&quot;),o.value=e,n=o,r.container.appendChild(n),i=c()(n),u(&quot;copy&quot;),n.remove()):(i=c()(t),u(&quot;copy&quot;)),i};function r(t){return(r=&quot;function&quot;==typeof Symbol&amp;&amp;&quot;symbol&quot;==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&amp;&amp;&quot;function&quot;==typeof Symbol&amp;&amp;t.constructor===Symbol&amp;&amp;t!==Symbol.prototype?&quot;symbol&quot;:typeof t})(t)}var l=function(){var t=0&lt;arguments.length&amp;&amp;void 0!==arguments[0]?arguments[0]:{},e=t.action,e=void 0===e?&quot;copy&quot;:e,n=t.container,o=t.target,t=t.text;if(&quot;copy&quot;!==e&amp;&amp;&quot;cut&quot;!==e)throw new Error(&#039;Invalid &quot;action&quot; value, use either &quot;copy&quot; or &quot;cut&quot;&#039;);if(void 0!==o){if(!o||&quot;object&quot;!==r(o)||1!==o.nodeType)throw new Error(&#039;Invalid &quot;target&quot; value, use a valid Element&#039;);if(&quot;copy&quot;===e&amp;&amp;o.hasAttribute(&quot;disabled&quot;))throw new Error(&#039;Invalid &quot;target&quot; attribute. Please use &quot;readonly&quot; instead of &quot;disabled&quot; attribute&#039;);if(&quot;cut&quot;===e&amp;&amp;(o.hasAttribute(&quot;readonly&quot;)||o.hasAttribute(&quot;disabled&quot;)))throw new Error(&#039;Invalid &quot;target&quot; attribute. You can\&#039;t cut text from elements with &quot;readonly&quot; or &quot;disabled&quot; attributes&#039;)}return t?f(t,{container:n}):o?&quot;cut&quot;===e?a(o):f(o,{container:n}):void 0};function s(t){return(s=&quot;function&quot;==typeof Symbol&amp;&amp;&quot;symbol&quot;==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&amp;&amp;&quot;function&quot;==typeof Symbol&amp;&amp;t.constructor===Symbol&amp;&amp;t!==Symbol.prototype?&quot;symbol&quot;:typeof t})(t)}function p(t,e){for(var n=0;n&lt;e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,&quot;value&quot;in o&amp;&amp;(o.writable=!0),Object.defineProperty(t,o.key,o)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(n){var o=function(){if(&quot;undefined&quot;==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(&quot;function&quot;==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=h(n),e=(t=o?(t=h(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(!t||&quot;object&quot;!==s(t)&amp;&amp;&quot;function&quot;!=typeof t){if(void 0!==e)return e;throw new ReferenceError(&quot;this hasn&#039;t been initialised - super() hasn&#039;t been called&quot;)}return t}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){t=&quot;data-clipboard-&quot;.concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var v=function(t){var e=r;if(&quot;function&quot;!=typeof t&amp;&amp;null!==t)throw new TypeError(&quot;Super expression must either be null or a function&quot;);e.prototype=Object.create(t&amp;&amp;t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&amp;&amp;d(e,t);var n,o=y(r);function r(t,e){var n;if(this instanceof r)return(n=o.call(this)).resolveOptions(e),n.listenClick(t),n;throw new TypeError(&quot;Cannot call a class as a function&quot;)}return e=r,t=[{key:&quot;copy&quot;,value:function(t){var e=1&lt;arguments.length&amp;&amp;void 0!==arguments[1]?arguments[1]:{container:document.body};return f(t,e)}},{key:&quot;cut&quot;,value:function(t){return a(t)}},{key:&quot;isSupported&quot;,value:function(){var t=0&lt;arguments.length&amp;&amp;void 0!==arguments[0]?arguments[0]:[&quot;copy&quot;,&quot;cut&quot;],t=&quot;string&quot;==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&amp;&amp;!!document.queryCommandSupported(t)}),e}}],(n=[{key:&quot;resolveOptions&quot;,value:function(){var t=0&lt;arguments.length&amp;&amp;void 0!==arguments[0]?arguments[0]:{};this.action=&quot;function&quot;==typeof t.action?t.action:this.defaultAction,this.target=&quot;function&quot;==typeof t.target?t.target:this.defaultTarget,this.text=&quot;function&quot;==typeof t.text?t.text:this.defaultText,this.container=&quot;object&quot;===s(t.container)?t.container:document.body}},{key:&quot;listenClick&quot;,value:function(t){var e=this;this.listener=i()(t,&quot;click&quot;,function(t){return e.onClick(t)})}},{key:&quot;onClick&quot;,value:function(t){var e=t.delegateTarget||t.currentTarget,t=this.action(e)||&quot;copy&quot;,n=l({action:t,container:this.container,target:this.target(e),text:this.text(e)});this.emit(n?&quot;success&quot;:&quot;error&quot;,{action:t,text:n,trigger:e,clearSelection:function(){e&amp;&amp;e.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:&quot;defaultAction&quot;,value:function(t){return m(&quot;action&quot;,t)}},{key:&quot;defaultTarget&quot;,value:function(t){t=m(&quot;target&quot;,t);if(t)return document.querySelector(t)}},{key:&quot;defaultText&quot;,value:function(t){return m(&quot;text&quot;,t)}},{key:&quot;destroy&quot;,value:function(){this.listener.destroy()}}])&amp;&amp;p(e.prototype,n),t&amp;&amp;p(e,t),r}(e())},828:function(t){var e;&quot;undefined&quot;==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&amp;&amp;9!==t.nodeType;){if(&quot;function&quot;==typeof t.matches&amp;&amp;t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var c=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=c(t.target,n),t.delegateTarget&amp;&amp;o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return&quot;function&quot;==typeof t.addEventListener?i.apply(null,arguments):&quot;function&quot;==typeof n?i.bind(null,document).apply(null,arguments):(&quot;string&quot;==typeof t&amp;&amp;(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&amp;&amp;t instanceof HTMLElement&amp;&amp;1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&amp;&amp;(&quot;[object NodeList]&quot;===e||&quot;[object HTMLCollection]&quot;===e)&amp;&amp;&quot;length&quot;in t&amp;&amp;(0===t.length||n.node(t[0]))},n.string=function(t){return&quot;string&quot;==typeof t||t instanceof String},n.fn=function(t){return&quot;[object Function]&quot;===Object.prototype.toString.call(t)}},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&amp;&amp;!e&amp;&amp;!n)throw new Error(&quot;Missing required arguments&quot;);if(!f.string(e))throw new TypeError(&quot;Second argument must be a String&quot;);if(!f.fn(n))throw new TypeError(&quot;Third argument must be a Function&quot;);if(f.node(t))return u=e,a=n,(c=t).addEventListener(u,a),{destroy:function(){c.removeEventListener(u,a)}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(f.string(t))return l(document.body,t,e,n);throw new TypeError(&quot;First argument must be a String, HTMLElement, HTMLCollection, or NodeList&quot;);var o,r,i,c,u,a}},817:function(t){t.exports=function(t){var e,n;return t=&quot;SELECT&quot;===t.nodeName?(t.focus(),t.value):&quot;INPUT&quot;===t.nodeName||&quot;TEXTAREA&quot;===t.nodeName?((e=t.hasAttribute(&quot;readonly&quot;))||t.setAttribute(&quot;readonly&quot;,&quot;&quot;),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute(&quot;readonly&quot;),t.value):(t.hasAttribute(&quot;contenteditable&quot;)&amp;&amp;t.focus(),e=window.getSelection(),(n=document.createRange()).selectNodeContents(t),e.removeAllRanges(),e.addRange(n),e.toString())}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o&lt;r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&amp;&amp;e)for(var i=0,c=o.length;i&lt;c;i++)o[i].fn!==e&amp;&amp;o[i].fn._!==e&amp;&amp;r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&amp;&amp;t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&amp;&amp;!o.o(t,n)&amp;&amp;Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r});
/*! This file is auto-generated */
!function(){var i={1517:function(t){var s=wp.media.model.Selection,o=wp.media.controller.Library,e=o.extend({defaults:_.defaults({multiple:&quot;add&quot;,filterable:&quot;uploaded&quot;,priority:100,syncSelection:!1},o.prototype.defaults),initialize:function(){var t=this.get(&quot;collectionType&quot;);&quot;video&quot;===this.get(&quot;type&quot;)&amp;&amp;(t=&quot;video-&quot;+t),this.set(&quot;id&quot;,t+&quot;-library&quot;),this.set(&quot;toolbar&quot;,t+&quot;-add&quot;),this.set(&quot;menu&quot;,t),this.get(&quot;library&quot;)||this.set(&quot;library&quot;,wp.media.query({type:this.get(&quot;type&quot;)})),o.prototype.initialize.apply(this,arguments)},activate:function(){var t=this.get(&quot;library&quot;),e=this.get(&quot;editLibrary&quot;),i=this.frame.state(this.get(&quot;collectionType&quot;)+&quot;-edit&quot;).get(&quot;library&quot;);e&amp;&amp;e!==i&amp;&amp;t.unobserve(e),t.validator=function(t){return!!this.mirroring.get(t.cid)&amp;&amp;!i.get(t.cid)&amp;&amp;s.prototype.validator.apply(this,arguments)},t.reset(t.mirroring.models,{silent:!0}),t.observe(i),this.set(&quot;editLibrary&quot;,i),o.prototype.activate.apply(this,arguments)}});t.exports=e},1817:function(t){var e=wp.media.controller.Library,a=wp.media.view.l10n,r=jQuery,i=e.extend({defaults:{multiple:!1,sortable:!0,date:!1,searchable:!1,content:&quot;browse&quot;,describe:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,SettingsView:!1,syncSelection:!1},initialize:function(){var t=this.get(&quot;collectionType&quot;);&quot;video&quot;===this.get(&quot;type&quot;)&amp;&amp;(t=&quot;video-&quot;+t),this.set(&quot;id&quot;,t+&quot;-edit&quot;),this.set(&quot;toolbar&quot;,t+&quot;-edit&quot;),this.get(&quot;library&quot;)||this.set(&quot;library&quot;,new wp.media.model.Selection),this.get(&quot;AttachmentView&quot;)||this.set(&quot;AttachmentView&quot;,wp.media.view.Attachment.EditLibrary),e.prototype.initialize.apply(this,arguments)},activate:function(){this.get(&quot;library&quot;).props.set(&quot;type&quot;,this.get(&quot;type&quot;)),this.get(&quot;library&quot;).observe(wp.Uploader.queue),this.frame.on(&quot;content:render:browse&quot;,this.renderSettings,this),e.prototype.activate.apply(this,arguments)},deactivate:function(){this.get(&quot;library&quot;).unobserve(wp.Uploader.queue),this.frame.off(&quot;content:render:browse&quot;,this.renderSettings,this),e.prototype.deactivate.apply(this,arguments)},renderSettings:function(t){var e=this.get(&quot;library&quot;),i=this.get(&quot;collectionType&quot;),s=this.get(&quot;dragInfoText&quot;),o=this.get(&quot;SettingsView&quot;),n={};e&amp;&amp;t&amp;&amp;(e[i]=e[i]||new Backbone.Model,n[i]=new o({controller:this,model:e[i],priority:40}),t.sidebar.set(n),s&amp;&amp;t.toolbar.set(&quot;dragInfo&quot;,new wp.media.View({el:r(&#039;<div class="instructions">'+s+"</div>")[0],priority:-40})),t.toolbar.set("reverse",{text:a.reverseOrder,priority:80,click:function(){e.reset(e.toArray().reverse())}}))}});t.exports=i},2288:function(t){var i=wp.media.view.l10n,e=wp.media.controller.State.extend({defaults:{id:"cropper",title:i.cropImage,toolbar:"crop",content:"crop",router:!1,canSkipCrop:!1,doCropArgs:{}},activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},deactivate:function(){this.frame.toolbar.mode("browse")},createCropContent:function(){this.cropperView=new wp.media.view.Cropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},removeCropper:function(){this.imgSelect.cancelSelection(),this.imgSelect.setOptions({remove:!0}),this.imgSelect.update(),this.cropperView.remove()},createCropToolbar:function(){var t=this.get("canSkipCrop")||!1,e={controller:this.frame,items:{insert:{style:"primary",text:i.cropImage,priority:80,requires:{library:!1,selection:!1},click:function(){var e=this.controller,t=e.state().get("selection").first();t.set({cropDetails:e.state().imgSelect.getSelection()}),this.$el.text(i.cropping),this.$el.attr("disabled",!0),e.state().doCrop(t).done(function(t){e.trigger("cropped",t),e.close()}).fail(function(){e.trigger("content:error:crop")})}}}};t&amp;&amp;_.extend(e.items,{skip:{style:"secondary",text:i.skipCropping,priority:70,requires:{library:!1,selection:!1},click:function(){var t=this.controller.state().get("selection").first();this.controller.state().cropperView.remove(),this.controller.trigger("skippedcrop",t),this.controller.close()}}}),this.frame.toolbar.set(new wp.media.view.Toolbar(e))},doCrop:function(t){return wp.ajax.post("custom-header-crop",_.extend({},this.defaults.doCropArgs,{nonce:t.get("nonces").edit,id:t.get("id"),cropDetails:t.get("cropDetails")}))}});t.exports=e},6934:function(t){var e=wp.media.controller.Cropper.extend({doCrop:function(t){var e=t.get("cropDetails"),i=this.get("control"),s=e.width/e.height;return i.params.flex_width&amp;&amp;i.params.flex_height?(e.dst_width=e.width,e.dst_height=e.height):(e.dst_width=i.params.flex_width?i.params.height*s:i.params.width,e.dst_height=i.params.flex_height?i.params.width/s:i.params.height),wp.ajax.post("crop-image",{wp_customize:"on",nonce:t.get("nonces").edit,id:t.get("id"),context:i.id,cropDetails:e})}});t.exports=e},7658:function(t){var s=wp.media.view.l10n,e=wp.media.controller.State.extend({defaults:{id:"edit-image",title:s.editImage,menu:!1,toolbar:"edit-image",content:"edit-image",url:""},activate:function(){this.frame.on("toolbar:render:edit-image",_.bind(this.toolbar,this))},deactivate:function(){this.frame.off("toolbar:render:edit-image")},toolbar:function(){var t=this.frame,e=t.lastState(),i=e&amp;&amp;e.id;t.toolbar.set(new wp.media.view.Toolbar({controller:t,items:{back:{style:"primary",text:s.back,priority:20,click:function(){i?t.setState(i):t.close()}}}}))}});t.exports=e},9067:function(t){var e=wp.media.view.l10n,a=Backbone.$,e=wp.media.controller.State.extend({defaults:{id:"embed",title:e.insertFromUrlTitle,content:"embed",menu:"default",toolbar:"main-embed",priority:120,type:"link",url:"",metadata:{}},sensitivity:400,initialize:function(t){this.metadata=t.metadata,this.debouncedScan=_.debounce(_.bind(this.scan,this),this.sensitivity),this.props=new Backbone.Model(this.metadata||{url:""}),this.props.on("change:url",this.debouncedScan,this),this.props.on("change:url",this.refresh,this),this.on("scan",this.scanImage,this)},scan:function(){var t,e=this,i={type:"link",scanners:[]};this.props.get("url")&amp;&amp;this.trigger("scan",i),i.scanners.length?(t=i.scanners=a.when.apply(a,i.scanners)).always(function(){e.get("scanners")===t&amp;&amp;e.set("loading",!1)}):i.scanners=null,i.loading=!!i.scanners,this.set(i)},scanImage:function(t){var e=this.frame,i=this,s=this.props.get("url"),o=new Image,n=a.Deferred();t.scanners.push(n.promise()),o.onload=function(){n.resolve(),i===e.state()&amp;&amp;s===i.props.get("url")&amp;&amp;(i.set({type:"image"}),i.props.set({width:o.width,height:o.height}))},o.onerror=n.reject,o.src=s},refresh:function(){this.frame.toolbar.get().refresh()},reset:function(){this.props.clear().set({url:""}),this.active&amp;&amp;this.refresh()}});t.exports=e},5095:function(t){var s=wp.media.model.Attachment,e=wp.media.controller.Library,i=wp.media.view.l10n,i=e.extend({defaults:_.defaults({id:"featured-image",title:i.setFeaturedImageTitle,multiple:!1,filterable:"uploaded",toolbar:"featured-image",priority:60,syncSelection:!0},e.prototype.defaults),initialize:function(){var t,o;this.get("library")||this.set("library",wp.media.query({type:"image"})),e.prototype.initialize.apply(this,arguments),t=this.get("library"),o=t.comparator,t.comparator=function(t,e){var i=!!this.mirroring.get(t.cid),s=!!this.mirroring.get(e.cid);return!i&amp;&amp;s?-1:i&amp;&amp;!s?1:o.apply(this,arguments)},t.observe(this.get("selection"))},activate:function(){this.frame.on("open",this.updateSelection,this),e.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("open",this.updateSelection,this),e.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var t,e=this.get("selection"),i=wp.media.view.settings.post.featuredImageId;""!==i&amp;&amp;-1!==i&amp;&amp;(t=s.get(i)).fetch(),e.reset(t?[t]:[])}});t.exports=i},7323:function(t){var i=wp.media.model.Selection,s=wp.media.controller.Library,e=wp.media.view.l10n,e=s.extend({defaults:_.defaults({id:"gallery-library",title:e.addToGalleryTitle,multiple:"add",filterable:"uploaded",menu:"gallery",toolbar:"gallery-add",priority:100,syncSelection:!1},s.prototype.defaults),initialize:function(){this.get("library")||this.set("library",wp.media.query({type:"image"})),s.prototype.initialize.apply(this,arguments)},activate:function(){var t=this.get("library"),e=this.frame.state("gallery-edit").get("library");this.editLibrary&amp;&amp;this.editLibrary!==e&amp;&amp;t.unobserve(this.editLibrary),t.validator=function(t){return!!this.mirroring.get(t.cid)&amp;&amp;!e.get(t.cid)&amp;&amp;i.prototype.validator.apply(this,arguments)},t.reset(t.mirroring.models,{silent:!0}),t.observe(e),this.editLibrary=e,s.prototype.activate.apply(this,arguments)}});t.exports=e},6328:function(t){var e=wp.media.controller.Library,i=wp.media.view.l10n,s=e.extend({defaults:{id:"gallery-edit",title:i.editGalleryTitle,multiple:!1,searchable:!1,sortable:!0,date:!1,display:!1,content:"browse",toolbar:"gallery-edit",describe:!0,displaySettings:!0,dragInfo:!0,idealColumnWidth:170,editing:!1,priority:60,syncSelection:!1},initialize:function(){this.get("library")||this.set("library",new wp.media.model.Selection),this.get("AttachmentView")||this.set("AttachmentView",wp.media.view.Attachment.EditLibrary),e.prototype.initialize.apply(this,arguments)},activate:function(){this.get("library").props.set("type","image"),this.get("library").observe(wp.Uploader.queue),this.frame.on("content:render:browse",this.gallerySettings,this),e.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue),this.frame.off("content:render:browse",this.gallerySettings,this),e.prototype.deactivate.apply(this,arguments)},gallerySettings:function(t){var e;!this.get("displaySettings")||(e=this.get("library"))&amp;&amp;t&amp;&amp;(e.gallery=e.gallery||new Backbone.Model,t.sidebar.set({gallery:new wp.media.view.Settings.Gallery({controller:this,model:e.gallery,priority:40})}),t.toolbar.set("reverse",{text:i.reverseOrder,priority:80,click:function(){e.reset(e.toArray().reverse())}}))}});t.exports=s},3849:function(t){var e=wp.media.controller.State,i=wp.media.controller.Library,s=wp.media.view.l10n,s=e.extend({defaults:_.defaults({id:"image-details",title:s.imageDetailsTitle,content:"image-details",menu:!1,router:!1,toolbar:"image-details",editing:!1,priority:60},i.prototype.defaults),initialize:function(t){this.image=t.image,e.prototype.initialize.apply(this,arguments)},activate:function(){this.frame.modal.$el.addClass("image-details")}});t.exports=s},9024:function(t){var e=wp.media.view.l10n,i=window.getUserSetting,s=window.setUserSetting,e=wp.media.controller.State.extend({defaults:{id:"library",title:e.mediaLibraryTitle,multiple:!1,content:"upload",menu:"default",router:"browse",toolbar:"select",searchable:!0,filterable:!1,sortable:!0,autoSelect:!0,describe:!1,contentUserSetting:!0,syncSelection:!0},initialize:function(){var t=this.get("selection");this.get("library")||this.set("library",wp.media.query()),t instanceof wp.media.model.Selection||((t=t)||(t=this.get("library").props.toJSON(),t=_.omit(t,"orderby","query")),this.set("selection",new wp.media.model.Selection(null,{multiple:this.get("multiple"),props:t}))),this.resetDisplays()},activate:function(){this.syncSelection(),wp.Uploader.queue.on("add",this.uploading,this),this.get("selection").on("add remove reset",this.refreshContent,this),this.get("router")&amp;&amp;this.get("contentUserSetting")&amp;&amp;(this.frame.on("content:activate",this.saveContentMode,this),this.set("content",i("libraryContent",this.get("content"))))},deactivate:function(){this.recordSelection(),this.frame.off("content:activate",this.saveContentMode,this),this.get("selection").off(null,null,this),wp.Uploader.queue.off(null,null,this)},reset:function(){this.get("selection").reset(),this.resetDisplays(),this.refreshContent()},resetDisplays:function(){var t=wp.media.view.settings.defaultProps;this._displays=[],this._defaultDisplaySettings={align:i("align",t.align)||"none",size:i("imgsize",t.size)||"medium",link:i("urlbutton",t.link)||"none"}},display:function(t){var e=this._displays;return e[t.cid]||(e[t.cid]=new Backbone.Model(this.defaultDisplaySettings(t))),e[t.cid]},defaultDisplaySettings:function(t){var e=_.clone(this._defaultDisplaySettings);return e.canEmbed=this.canEmbed(t),e.canEmbed?e.link="embed":this.isImageAttachment(t)||"none"!==e.link||(e.link="file"),e},isImageAttachment:function(t){return t.get("uploading")?/\.(jpe?g|png|gif|webp)$/i.test(t.get("filename")):"image"===t.get("type")},canEmbed:function(t){if(!t.get("uploading")){var e=t.get("type");if("audio"!==e&amp;&amp;"video"!==e)return!1}return _.contains(wp.media.view.settings.embedExts,t.get("filename").split(".").pop())},refreshContent:function(){var t=this.get("selection"),e=this.frame,i=e.router.get(),e=e.content.mode();this.active&amp;&amp;!t.length&amp;&amp;i&amp;&amp;!i.get(e)&amp;&amp;this.frame.content.render(this.get("content"))},uploading:function(t){"upload"===this.frame.content.mode()&amp;&amp;this.frame.content.mode("browse"),this.get("autoSelect")&amp;&amp;(this.get("selection").add(t),this.frame.trigger("library:selection:add"))},saveContentMode:function(){var t,e;"browse"===this.get("router")&amp;&amp;(t=this.frame.content.mode(),(e=this.frame.router.get())&amp;&amp;e.get(t)&amp;&amp;s("libraryContent",t))}});_.extend(e.prototype,wp.media.selectionSync),t.exports=e},3742:function(t){var e=wp.media.controller.Library,i=e.extend({defaults:_.defaults({filterable:"uploaded",displaySettings:!1,priority:80,syncSelection:!1},e.prototype.defaults),initialize:function(t){this.media=t.media,this.type=t.type,this.set("library",wp.media.query({type:this.type})),e.prototype.initialize.apply(this,arguments)},activate:function(){wp.media.frame.lastMime&amp;&amp;(this.set("library",wp.media.query({type:wp.media.frame.lastMime})),delete wp.media.frame.lastMime),e.prototype.activate.apply(this,arguments)}});t.exports=i},4903:function(t){function e(t){_.extend(this,_.pick(t||{},"id","view","selector"))}e.extend=Backbone.Model.extend,_.extend(e.prototype,{mode:function(t){return t?(t===this._mode||(this.trigger("deactivate"),this._mode=t,this.render(t),this.trigger("activate")),this):this._mode},render:function(t){if(t&amp;&amp;t!==this._mode)return this.mode(t);var t={view:null};return this.trigger("create",t),this.trigger("render",t=t.view),t&amp;&amp;this.set(t),this},get:function(){return this.view.views.first(this.selector)},set:function(t,e){return e&amp;&amp;(e.add=!1),this.view.views.set(this.selector,t,e)},trigger:function(t){var e,i;if(this._mode)return i=_.toArray(arguments),e=this.id+":"+t,i[0]=e+":"+this._mode,this.view.trigger.apply(this.view,i),i[0]=e,this.view.trigger.apply(this.view,i),this}}),t.exports=e},8493:function(t){var i=wp.media.controller.Library,e=wp.media.view.l10n,e=i.extend({defaults:_.defaults({id:"replace-image",title:e.replaceImageTitle,multiple:!1,filterable:"uploaded",toolbar:"replace",menu:!1,priority:60,syncSelection:!0},i.prototype.defaults),initialize:function(t){var e,o;this.image=t.image,this.get("library")||this.set("library",wp.media.query({type:"image"})),i.prototype.initialize.apply(this,arguments),e=this.get("library"),o=e.comparator,e.comparator=function(t,e){var i=!!this.mirroring.get(t.cid),s=!!this.mirroring.get(e.cid);return!i&amp;&amp;s?-1:i&amp;&amp;!s?1:o.apply(this,arguments)},e.observe(this.get("selection"))},activate:function(){this.frame.on("content:render:browse",this.updateSelection,this),i.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("content:render:browse",this.updateSelection,this),i.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var t=this.get("selection"),e=this.image.attachment;t.reset(e?[e]:[])}});t.exports=e},5274:function(t){var e=wp.media.controller.Cropper.extend({activate:function(){this.frame.on("content:create:crop",this.createCropContent,this),this.frame.on("close",this.removeCropper,this),this.set("selection",new Backbone.Collection(this.frame._selection.single))},createCropContent:function(){this.cropperView=new wp.media.view.SiteIconCropper({controller:this,attachment:this.get("selection").first()}),this.cropperView.on("image-loaded",this.createCropToolbar,this),this.frame.content.set(this.cropperView)},doCrop:function(t){var e=t.get("cropDetails"),i=this.get("control");return e.dst_width=i.params.width,e.dst_height=i.params.height,wp.ajax.post("crop-image",{nonce:t.get("nonces").edit,id:t.get("id"),context:"site-icon",cropDetails:e})}});t.exports=e},5466:function(t){function e(){return{extend:Backbone.Model.extend}}_.extend(e.prototype,Backbone.Events,{state:function(t){return this.states=this.states||new Backbone.Collection,(t=t||this._state)&amp;&amp;!this.states.get(t)&amp;&amp;this.states.add({id:t}),this.states.get(t)},setState:function(t){var e=this.state();return e&amp;&amp;t===e.id||!this.states||!this.states.get(t)||(e&amp;&amp;(e.trigger("deactivate"),this._lastState=e.id),this._state=t,this.state().trigger("activate")),this},lastState:function(){if(this._lastState)return this.state(this._lastState)}}),_.each(["on","off","trigger"],function(t){e.prototype[t]=function(){return this.states=this.states||new Backbone.Collection,this.states[t].apply(this.states,arguments),this}}),t.exports=e},5826:function(t){var i=Backbone.Model.extend({constructor:function(){this.on("activate",this._preActivate,this),this.on("activate",this.activate,this),this.on("activate",this._postActivate,this),this.on("deactivate",this._deactivate,this),this.on("deactivate",this.deactivate,this),this.on("reset",this.reset,this),this.on("ready",this._ready,this),this.on("ready",this.ready,this),Backbone.Model.apply(this,arguments),this.on("change:menu",this._updateMenu,this)},ready:function(){},activate:function(){},deactivate:function(){},reset:function(){},_ready:function(){this._updateMenu()},_preActivate:function(){this.active=!0},_postActivate:function(){this.on("change:menu",this._menu,this),this.on("change:titleMode",this._title,this),this.on("change:content",this._content,this),this.on("change:toolbar",this._toolbar,this),this.frame.on("title:render:default",this._renderTitle,this),this._title(),this._menu(),this._toolbar(),this._content(),this._router()},_deactivate:function(){this.active=!1,this.frame.off("title:render:default",this._renderTitle,this),this.off("change:menu",this._menu,this),this.off("change:titleMode",this._title,this),this.off("change:content",this._content,this),this.off("change:toolbar",this._toolbar,this)},_title:function(){this.frame.title.render(this.get("titleMode")||"default")},_renderTitle:function(t){t.$el.text(this.get("title")||"")},_router:function(){var t=this.frame.router,e=this.get("router");this.frame.$el.toggleClass("hide-router",!e),e&amp;&amp;(this.frame.router.render(e),(e=t.get())&amp;&amp;e.select&amp;&amp;e.select(this.frame.content.mode()))},_menu:function(){var t=this.frame.menu,e=this.get("menu");this.frame.$el.toggleClass("hide-menu",!e),e&amp;&amp;(t.mode(e),(e=t.get())&amp;&amp;e.select&amp;&amp;e.select(this.id))},_updateMenu:function(){var t=this.previous("menu"),e=this.get("menu");t&amp;&amp;this.frame.off("menu:render:"+t,this._renderMenu,this),e&amp;&amp;this.frame.on("menu:render:"+e,this._renderMenu,this)},_renderMenu:function(t){var e=this.get("menuItem"),i=this.get("title"),s=this.get("priority");!e&amp;&amp;i&amp;&amp;(e={text:i},s&amp;&amp;(e.priority=s)),e&amp;&amp;t.set(this.id,e)}});_.each(["toolbar","content"],function(e){i.prototype["_"+e]=function(){var t=this.get(e);t&amp;&amp;this.frame[e].render(t)}}),t.exports=i},3526:function(t){t.exports={syncSelection:function(){var t=this.get("selection"),e=this.frame._selection;this.get("syncSelection")&amp;&amp;e&amp;&amp;t&amp;&amp;(t.multiple&amp;&amp;(t.reset([],{silent:!0}),t.validateAll(e.attachments),e.difference=_.difference(e.attachments.models,t.models)),t.single(e.single))},recordSelection:function(){var t=this.get("selection"),e=this.frame._selection;this.get("syncSelection")&amp;&amp;e&amp;&amp;t&amp;&amp;(t.multiple?(e.attachments.reset(t.toArray().concat(e.difference)),e.difference=[]):e.attachments.add(t.toArray()),e.single=t._single)}}},8093:function(t){var e=wp.media.View,i=e.extend({tagName:"form",className:"compat-item",events:{submit:"preventDefault","change input":"save","change select":"save","change textarea":"save"},initialize:function(){this.listenTo(this.model,"change:compat",this.render)},dispose:function(){return this.$(":focus").length&amp;&amp;this.save(),e.prototype.dispose.apply(this,arguments)},render:function(){var t=this.model.get("compat");if(t&amp;&amp;t.item)return this.views.detach(),this.$el.html(t.item),this.views.render(),this},preventDefault:function(t){t.preventDefault()},save:function(t){var e={};t&amp;&amp;t.preventDefault(),_.each(this.$el.serializeArray(),function(t){e[t.name]=t.value}),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(e).always(_.bind(this.postSave,this))},postSave:function(){this.controller.trigger("attachment:compat:ready",["ready"])}});t.exports=i},4906:function(t){var i=jQuery,e=wp.media.View.extend({tagName:"select",className:"attachment-filters",id:"media-attachment-filters",events:{change:"change"},keys:[],initialize:function(){this.createFilters(),_.extend(this.filters,this.options.filters),this.$el.html(_.chain(this.filters).map(function(t,e){return{el:i("").val(e).html(t.text)[0],priority:t.priority||50}},this).sortBy("priority").pluck("el").value()),this.listenTo(this.model,"change",this.select),this.select()},createFilters:function(){this.filters={}},change:function(){var t=this.filters[this.el.value];t&amp;&amp;this.model.set(t.props)},select:function(){var t=this.model,i="all",s=t.toJSON();_.find(this.filters,function(t,e){if(_.all(t.props,function(t,e){return t===(_.isUndefined(s[e])?null:s[e])}))return i=e}),this.$el.val(i)}});t.exports=e},2868:function(t){var e=wp.media.view.l10n,i=wp.media.view.AttachmentFilters.extend({createFilters:function(){var i={},t=window.userSettings?parseInt(window.userSettings.uid,10):0;_.each(wp.media.view.settings.mimeTypes||{},function(t,e){i[e]={text:t,props:{status:null,type:e,uploadedTo:null,orderby:"date",order:"DESC",author:null}}}),i.all={text:e.allMediaItems,props:{status:null,type:null,uploadedTo:null,orderby:"date",order:"DESC",author:null},priority:10},wp.media.view.settings.post.id&amp;&amp;(i.uploaded={text:e.uploadedToThisPost,props:{status:null,type:null,uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC",author:null},priority:20}),i.unattached={text:e.unattached,props:{status:null,uploadedTo:0,type:null,orderby:"menuOrder",order:"ASC",author:null},priority:50},t&amp;&amp;(i.mine={text:e.mine,props:{status:null,type:null,uploadedTo:null,orderby:"date",order:"DESC",author:t},priority:50}),wp.media.view.settings.mediaTrash&amp;&amp;this.controller.isModeActive("grid")&amp;&amp;(i.trash={text:e.trash,props:{uploadedTo:null,status:"trash",type:null,orderby:"date",order:"DESC",author:null},priority:50}),this.filters=i}});t.exports=i},9663:function(t){var e=wp.media.view.l10n,i=wp.media.view.AttachmentFilters.extend({id:"media-attachment-date-filters",createFilters:function(){var i={};_.each(wp.media.view.settings.months||{},function(t,e){i[e]={text:t.text,props:{year:t.year,monthnum:t.month}}}),i.all={text:e.allDates,props:{monthnum:!1,year:!1},priority:10},this.filters=i}});t.exports=i},7040:function(t){var o=wp.media.view.l10n,e=wp.media.view.AttachmentFilters.extend({createFilters:function(){var t,e=this.model.get("type"),i=wp.media.view.settings.mimeTypes,s=window.userSettings?parseInt(window.userSettings.uid,10):0;i&amp;&amp;e&amp;&amp;(t=i[e]),this.filters={all:{text:t||o.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC",author:null},priority:10},uploaded:{text:o.uploadedToThisPost,props:{uploadedTo:wp.media.view.settings.post.id,orderby:"menuOrder",order:"ASC",author:null},priority:20},unattached:{text:o.unattached,props:{uploadedTo:0,orderby:"menuOrder",order:"ASC",author:null},priority:50}},s&amp;&amp;(this.filters.mine={text:o.mine,props:{orderby:"date",order:"DESC",author:s},priority:50})}});t.exports=e},5019:function(t){var e=wp.media.View,o=jQuery,i=e.extend({tagName:"li",className:"attachment",template:wp.template("attachment"),attributes:function(){return{tabIndex:0,role:"checkbox","aria-label":this.model.get("title"),"aria-checked":!1,"data-id":this.model.get("id")}},events:{click:"toggleSelectionHandler","change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .attachment-close":"removeFromLibrary","click .check":"checkClickHandler",keydown:"toggleSelectionHandler"},buttons:{},initialize:function(){var t=this.options.selection;_.defaults(this.options,{rerenderOnModelChange:!0}).rerenderOnModelChange?this.listenTo(this.model,"change",this.render):this.listenTo(this.model,"change:percent",this.progress),this.listenTo(this.model,"change:title",this._syncTitle),this.listenTo(this.model,"change:caption",this._syncCaption),this.listenTo(this.model,"change:artist",this._syncArtist),this.listenTo(this.model,"change:album",this._syncAlbum),this.listenTo(this.model,"add",this.select),this.listenTo(this.model,"remove",this.deselect),t&amp;&amp;(t.on("reset",this.updateSelect,this),this.listenTo(this.model,"selection:single selection:unsingle",this.details),this.details(this.model,this.controller.state().get("selection"))),this.listenTo(this.controller.states,"attachment:compat:waiting attachment:compat:ready",this.updateSave)},dispose:function(){var t=this.options.selection;return this.updateAll(),t&amp;&amp;t.off(null,null,this),e.prototype.dispose.apply(this,arguments),this},render:function(){var t=_.defaults(this.model.toJSON(),{orientation:"landscape",uploading:!1,type:"",subtype:"",icon:"",filename:"",caption:"",title:"",dateFormatted:"",width:"",height:"",compat:!1,alt:"",description:""},this.options);return t.buttons=this.buttons,t.describe=this.controller.state().get("describe"),"image"===t.type&amp;&amp;(t.size=this.imageSize()),t.can={},t.nonces&amp;&amp;(t.can.remove=!!t.nonces.delete,t.can.save=!!t.nonces.update),this.controller.state().get("allowLocalEdits")&amp;&amp;(t.allowLocalEdits=!0),t.uploading&amp;&amp;!t.percent&amp;&amp;(t.percent=0),this.views.detach(),this.$el.html(this.template(t)),this.$el.toggleClass("uploading",t.uploading),t.uploading?this.$bar=this.$(".media-progress-bar div"):delete this.$bar,this.updateSelect(),this.updateSave(),this.views.render(),this},progress:function(){this.$bar&amp;&amp;this.$bar.length&amp;&amp;this.$bar.width(this.model.get("percent")+"%")},toggleSelectionHandler:function(t){var e;if("INPUT"!==t.target.nodeName&amp;&amp;"BUTTON"!==t.target.nodeName)if(37===t.keyCode||38===t.keyCode||39===t.keyCode||40===t.keyCode)this.controller.trigger("attachment:keydown:arrow",t);else if("keydown"!==t.type||13===t.keyCode||32===t.keyCode){if(t.preventDefault(),this.controller.isModeActive("grid")){if(this.controller.isModeActive("edit"))return void this.controller.trigger("edit:attachment",this.model,t.currentTarget);this.controller.isModeActive("select")&amp;&amp;(e="toggle")}t.shiftKey?e="between":(t.ctrlKey||t.metaKey)&amp;&amp;(e="toggle"),this.toggleSelection({method:e}),this.controller.trigger("selection:toggle")}},toggleSelection:function(t){var e,i,s,o=this.collection,n=this.options.selection,a=this.model,t=t&amp;&amp;t.method;if(n)return e=n.single(),"between"===(t=_.isUndefined(t)?n.multiple:t)&amp;&amp;e&amp;&amp;n.multiple?e===a?void 0:(o=(i=o.indexOf(e))&lt;(s=o.indexOf(this.model))?o.models.slice(i,s+1):o.models.slice(s,i+1),n.add(o),void n.single(a)):&quot;toggle&quot;===t?(n[this.selected()?&quot;remove&quot;:&quot;add&quot;](a),void n.single(a)):&quot;add&quot;===t?(n.add(a),void n.single(a)):(&quot;add&quot;!==(t=t||&quot;add&quot;)&amp;&amp;(t=&quot;reset&quot;),void(this.selected()?n[e===a?&quot;remove&quot;:&quot;single&quot;](a):(n[t](a),n.single(a))))},updateSelect:function(){this[this.selected()?&quot;select&quot;:&quot;deselect&quot;]()},selected:function(){var t=this.options.selection;if(t)return!!t.get(this.model.cid)},select:function(t,e){var i=this.options.selection,s=this.controller;!i||e&amp;&amp;e!==i||this.$el.hasClass(&quot;selected&quot;)||(this.$el.addClass(&quot;selected&quot;).attr(&quot;aria-checked&quot;,!0),s.isModeActive(&quot;grid&quot;)&amp;&amp;s.isModeActive(&quot;select&quot;)||this.$(&quot;.check&quot;).attr(&quot;tabindex&quot;,&quot;0&quot;))},deselect:function(t,e){var i=this.options.selection;!i||e&amp;&amp;e!==i||this.$el.removeClass(&quot;selected&quot;).attr(&quot;aria-checked&quot;,!1).find(&quot;.check&quot;).attr(&quot;tabindex&quot;,&quot;-1&quot;)},details:function(t,e){var i=this.options.selection;i===e&amp;&amp;(e=i.single(),this.$el.toggleClass(&quot;details&quot;,e===this.model))},imageSize:function(t){var e=this.model.get(&quot;sizes&quot;),i=!1;return t=t||&quot;medium&quot;,e&amp;&amp;(e[t]?i=e[t]:e.large?i=e.large:e.thumbnail?i=e.thumbnail:e.full&amp;&amp;(i=e.full),i)?_.clone(i):{url:this.model.get(&quot;url&quot;),width:this.model.get(&quot;width&quot;),height:this.model.get(&quot;height&quot;),orientation:this.model.get(&quot;orientation&quot;)}},updateSetting:function(t){var e=o(t.target).closest(&quot;[data-setting]&quot;);e.length&amp;&amp;(e=e.data(&quot;setting&quot;),t=t.target.value,this.model.get(e)!==t&amp;&amp;this.save(e,t))},save:function(){var t=this,e=this._save=this._save||{status:&quot;ready&quot;},i=this.model.save.apply(this.model,arguments),s=e.requests?o.when(i,e.requests):i;e.savedTimer&amp;&amp;clearTimeout(e.savedTimer),this.updateSave(&quot;waiting&quot;),(e.requests=s).always(function(){e.requests===s&amp;&amp;(t.updateSave(&quot;resolved&quot;===s.state()?&quot;complete&quot;:&quot;error&quot;),e.savedTimer=setTimeout(function(){t.updateSave(&quot;ready&quot;),delete e.savedTimer},2e3))})},updateSave:function(t){var e=this._save=this._save||{status:&quot;ready&quot;};return t&amp;&amp;t!==e.status&amp;&amp;(this.$el.removeClass(&quot;save-&quot;+e.status),e.status=t),this.$el.addClass(&quot;save-&quot;+e.status),this},updateAll:function(){var t=this.$(&quot;[data-setting]&quot;),i=this.model,t=_.chain(t).map(function(t){var e=o(&quot;input, textarea, select, [value]&quot;,t);if(e.length)return t=o(t).data(&quot;setting&quot;),e=e.val(),i.get(t)!==e?[t,e]:void 0}).compact().object().value();_.isEmpty(t)||i.save(t)},removeFromLibrary:function(t){&quot;keydown&quot;===t.type&amp;&amp;13!==t.keyCode&amp;&amp;32!==t.keyCode||(t.stopPropagation(),this.collection.remove(this.model))},checkClickHandler:function(t){var e=this.options.selection;e&amp;&amp;(t.stopPropagation(),e.where({id:this.model.get(&quot;id&quot;)}).length?(e.remove(this.model),this.$el.focus()):e.add(this.model),this.controller.trigger(&quot;selection:toggle&quot;))}});_.each({caption:&quot;_syncCaption&quot;,title:&quot;_syncTitle&quot;,artist:&quot;_syncArtist&quot;,album:&quot;_syncAlbum&quot;},function(t,s){i.prototype[t]=function(t,e){var i=this.$(&#039;[data-setting=&quot;&#039;+s+&#039;&quot;]&#039;);return!i.length||e===i.find(&quot;input, textarea, select, [value]&quot;).val()?this:this.render()}}),t.exports=i},7274:function(t){var e=wp.media.view.Attachment,i=wp.media.view.l10n,o=jQuery,n=wp.i18n.__,s=e.extend({tagName:&quot;div&quot;,className:&quot;attachment-details&quot;,template:wp.template(&quot;attachment-details&quot;),attributes:{},events:{&quot;change [data-setting]&quot;:&quot;updateSetting&quot;,&quot;change [data-setting] input&quot;:&quot;updateSetting&quot;,&quot;change [data-setting] select&quot;:&quot;updateSetting&quot;,&quot;change [data-setting] textarea&quot;:&quot;updateSetting&quot;,&quot;click .delete-attachment&quot;:&quot;deleteAttachment&quot;,&quot;click .trash-attachment&quot;:&quot;trashAttachment&quot;,&quot;click .untrash-attachment&quot;:&quot;untrashAttachment&quot;,&quot;click .edit-attachment&quot;:&quot;editAttachment&quot;,keydown:&quot;toggleSelectionHandler&quot;},copyAttachmentDetailsURLClipboard:function(){var s;new ClipboardJS(&quot;.copy-attachment-url&quot;).on(&quot;success&quot;,function(t){var e=o(t.trigger),i=o(&quot;.success&quot;,e.closest(&quot;.copy-to-clipboard-container&quot;));t.clearSelection(),e.trigger(&quot;focus&quot;),clearTimeout(s),i.removeClass(&quot;hidden&quot;),s=setTimeout(function(){i.addClass(&quot;hidden&quot;)},3e3),wp.a11y.speak(n(&quot;The file URL has been copied to your clipboard&quot;))})},initialize:function(){this.options=_.defaults(this.options,{rerenderOnModelChange:!1}),e.prototype.initialize.apply(this,arguments),this.copyAttachmentDetailsURLClipboard()},getFocusableElements:function(){var t=o(&#039;li[data-id=&quot;&#039;+this.model.id+&#039;&quot;]&#039;);this.previousAttachment=t.prev(),this.nextAttachment=t.next()},moveFocus:function(){this.previousAttachment.length?this.previousAttachment.trigger(&quot;focus&quot;):this.nextAttachment.length?this.nextAttachment.trigger(&quot;focus&quot;):this.controller.uploader&amp;&amp;this.controller.uploader.$browser?this.controller.uploader.$browser.trigger(&quot;focus&quot;):this.moveFocusToLastFallback()},moveFocusToLastFallback:function(){o(&quot;.media-frame&quot;).attr(&quot;tabindex&quot;,&quot;-1&quot;).trigger(&quot;focus&quot;)},deleteAttachment:function(t){t.preventDefault(),this.getFocusableElements(),window.confirm(i.warnDelete)&amp;&amp;(this.model.destroy({wait:!0,error:function(){window.alert(i.errorDeleting)}}),this.moveFocus())},trashAttachment:function(t){var e=this.controller.library,i=this;t.preventDefault(),this.getFocusableElements(),wp.media.view.settings.mediaTrash&amp;&amp;&quot;edit-metadata&quot;===this.controller.content.mode()?(this.model.set(&quot;status&quot;,&quot;trash&quot;),this.model.save().done(function(){e._requery(!0),i.moveFocusToLastFallback()})):(this.model.destroy(),this.moveFocus())},untrashAttachment:function(t){var e=this.controller.library;t.preventDefault(),this.model.set(&quot;status&quot;,&quot;inherit&quot;),this.model.save().done(function(){e._requery(!0)})},editAttachment:function(t){var e=this.controller.states.get(&quot;edit-image&quot;);window.imageEdit&amp;&amp;e?(t.preventDefault(),e.set(&quot;image&quot;,this.model),this.controller.setState(&quot;edit-image&quot;)):this.$el.addClass(&quot;needs-refresh&quot;)},toggleSelectionHandler:function(t){if(&quot;keydown&quot;===t.type&amp;&amp;9===t.keyCode&amp;&amp;t.shiftKey&amp;&amp;t.target===this.$(&quot;:tabbable&quot;).get(0))return this.controller.trigger(&quot;attachment:details:shift-tab&quot;,t),!1},render:function(){e.prototype.render.apply(this,arguments),wp.media.mixin.removeAllPlayers(),this.$(&quot;audio, video&quot;).each(function(t,e){e=wp.media.view.MediaDetails.prepareSrc(e);new window.MediaElementPlayer(e,wp.media.mixin.mejsSettings)})}});t.exports=s},4640:function(t){var e=wp.media.view.Attachment.extend({buttons:{close:!0}});t.exports=e},1009:function(t){var e=wp.media.view.Attachment.Selection.extend({buttons:{close:!0}});t.exports=e},9254:function(t){var e=wp.media.view.Attachment.extend({buttons:{check:!0}});t.exports=e},9003:function(t){var e=wp.media.view.Attachment.extend({className:&quot;attachment selection&quot;,toggleSelection:function(){this.options.selection.single(this.model)}});t.exports=e},8408:function(t){var e=wp.media.View,n=jQuery,i=wp.media.view.settings.infiniteScrolling,s=e.extend({tagName:&quot;ul&quot;,className:&quot;attachments&quot;,attributes:{tabIndex:-1},initialize:function(){this.el.id=_.uniqueId(&quot;__attachments-view-&quot;),_.defaults(this.options,{infiniteScrolling:i||!1,refreshSensitivity:wp.media.isTouchDevice?300:200,refreshThreshold:3,AttachmentView:wp.media.view.Attachment,sortable:!1,resize:!0,idealColumnWidth:n(window).width()&lt;640?135:150}),this._viewsByCid={},this.$window=n(window),this.resizeEvent=&quot;resize.media-modal-columns&quot;,this.collection.on(&quot;add&quot;,function(t){this.views.add(this.createAttachmentView(t),{at:this.collection.indexOf(t)})},this),this.collection.on(&quot;remove&quot;,function(t){var e=this._viewsByCid[t.cid];delete this._viewsByCid[t.cid],e&amp;&amp;e.remove()},this),this.collection.on(&quot;reset&quot;,this.render,this),this.controller.on(&quot;library:selection:add&quot;,this.attachmentFocus,this),this.options.infiniteScrolling&amp;&amp;(this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value(),this.options.scrollElement=this.options.scrollElement||this.el,n(this.options.scrollElement).on(&quot;scroll&quot;,this.scroll)),this.initSortable(),_.bindAll(this,&quot;setColumns&quot;),this.options.resize&amp;&amp;(this.on(&quot;ready&quot;,this.bindEvents),this.controller.on(&quot;open&quot;,this.setColumns),_.defer(this.setColumns,this))},bindEvents:function(){this.$window.off(this.resizeEvent).on(this.resizeEvent,_.debounce(this.setColumns,50))},attachmentFocus:function(){this.columns&amp;&amp;this.$el.focus()},restoreFocus:function(){this.$(&quot;li.selected:first&quot;).focus()},arrowEvent:function(t){var e=this.$el.children(&quot;li&quot;),i=this.columns,s=e.filter(&quot;:focus&quot;).index(),o=s+1&lt;=i?1:Math.ceil((s+1)/i);if(-1!==s){if(37===t.keyCode){if(0===s)return;e.eq(s-1).focus()}if(38===t.keyCode){if(1===o)return;e.eq(s-i).focus()}if(39===t.keyCode){if(e.length===s)return;e.eq(s+1).focus()}40===t.keyCode&amp;&amp;Math.ceil(e.length/i)!==o&amp;&amp;e.eq(s+i).focus()}},dispose:function(){this.collection.props.off(null,null,this),this.options.resize&amp;&amp;this.$window.off(this.resizeEvent),e.prototype.dispose.apply(this,arguments)},setColumns:function(){var t=this.columns,e=this.$el.width();e&amp;&amp;(this.columns=Math.min(Math.round(e/this.options.idealColumnWidth),12)||1,t&amp;&amp;t===this.columns||this.$el.closest(&quot;.media-frame-content&quot;).attr(&quot;data-columns&quot;,this.columns))},initSortable:function(){var o=this.collection;this.options.sortable&amp;&amp;n.fn.sortable&amp;&amp;(this.$el.sortable(_.extend({disabled:!!o.comparator,tolerance:&quot;pointer&quot;,start:function(t,e){e.item.data(&quot;sortableIndexStart&quot;,e.item.index())},update:function(t,e){var i=o.at(e.item.data(&quot;sortableIndexStart&quot;)),s=o.comparator;delete o.comparator,o.remove(i,{silent:!0}),o.add(i,{silent:!0,at:e.item.index()}),o.comparator=s,o.trigger(&quot;reset&quot;,o),o.saveMenuOrder()}},this.options.sortable)),o.props.on(&quot;change:orderby&quot;,function(){this.$el.sortable(&quot;option&quot;,&quot;disabled&quot;,!!o.comparator)},this),this.collection.props.on(&quot;change:orderby&quot;,this.refreshSortable,this),this.refreshSortable())},refreshSortable:function(){var t;this.options.sortable&amp;&amp;n.fn.sortable&amp;&amp;(t=&quot;menuOrder&quot;===(t=this.collection).props.get(&quot;orderby&quot;)||!t.comparator,this.$el.sortable(&quot;option&quot;,&quot;disabled&quot;,!t))},createAttachmentView:function(t){var e=new this.options.AttachmentView({controller:this.controller,model:t,collection:this.collection,selection:this.options.selection});return this._viewsByCid[t.cid]=e},prepare:function(){this.collection.length?this.views.set(this.collection.map(this.createAttachmentView,this)):(this.views.unset(),this.options.infiniteScrolling&amp;&amp;this.collection.more().done(this.scroll))},ready:function(){this.options.infiniteScrolling&amp;&amp;this.scroll()},scroll:function(){var t,e=this,i=this.options.scrollElement,s=i.scrollTop;i===document&amp;&amp;(i=document.body,s=n(document).scrollTop()),n(i).is(&quot;:visible&quot;)&amp;&amp;this.collection.hasMore()&amp;&amp;(t=this.views.parent.toolbar,i.scrollHeight-(s+i.clientHeight)&lt;i.clientHeight/3&amp;&amp;t.get(&quot;spinner&quot;).show(),i.scrollHeight&lt;s+i.clientHeight*this.options.refreshThreshold&amp;&amp;this.collection.more().done(function(){e.scroll(),t.get(&quot;spinner&quot;).hide()}))}});t.exports=s},9239:function(t){var s=wp.media.View,o=wp.media.view.settings.mediaTrash,n=wp.media.view.l10n,a=jQuery,i=wp.media.view.settings.infiniteScrolling,r=wp.i18n.__,e=wp.i18n.sprintf,l=s.extend({tagName:&quot;div&quot;,className:&quot;attachments-browser&quot;,initialize:function(){_.defaults(this.options,{filters:!1,search:!0,date:!0,display:!1,sidebar:!0,AttachmentView:wp.media.view.Attachment.Library}),this.controller.on(&quot;toggle:upload:attachment&quot;,this.toggleUploader,this),this.controller.on(&quot;edit:selection&quot;,this.editSelection),this.options.sidebar&amp;&amp;&quot;errors&quot;===this.options.sidebar&amp;&amp;this.createSidebar(),this.controller.isModeActive(&quot;grid&quot;)?(this.createUploader(),this.createToolbar()):(this.createToolbar(),this.createUploader()),this.createAttachmentsHeading(),this.createAttachmentsWrapperView(),i||(this.$el.addClass(&quot;has-load-more&quot;),this.createLoadMoreView()),this.options.sidebar&amp;&amp;&quot;errors&quot;!==this.options.sidebar&amp;&amp;this.createSidebar(),this.updateContent(),i||this.updateLoadMoreView(),this.options.sidebar&amp;&amp;&quot;errors&quot;!==this.options.sidebar||(this.$el.addClass(&quot;hide-sidebar&quot;),&quot;errors&quot;===this.options.sidebar&amp;&amp;this.$el.addClass(&quot;sidebar-for-errors&quot;)),this.collection.on(&quot;add remove reset&quot;,this.updateContent,this),i||this.collection.on(&quot;add remove reset&quot;,this.updateLoadMoreView,this),this.collection.on(&quot;attachments:received&quot;,this.announceSearchResults,this)},announceSearchResults:_.debounce(function(){var t,e=r(&quot;Number of media items displayed: %d. Click load more for more results.&quot;);i&amp;&amp;(e=r(&quot;Number of media items displayed: %d. Scroll the page for more results.&quot;)),this.collection.mirroring&amp;&amp;this.collection.mirroring.args.s&amp;&amp;(0===(t=this.collection.length)?wp.a11y.speak(n.noMediaTryNewSearch):this.collection.hasMore()?wp.a11y.speak(e.replace(&quot;%d&quot;,t)):wp.a11y.speak(n.mediaFound.replace(&quot;%d&quot;,t)))},200),editSelection:function(t){t.$(&quot;.media-button-backToLibrary&quot;).focus()},dispose:function(){return this.options.selection.off(null,null,this),s.prototype.dispose.apply(this,arguments),this},createToolbar:function(){var t,e=-1!==a.inArray(this.options.filters,[&quot;uploaded&quot;,&quot;all&quot;]),i={controller:this.controller};this.controller.isModeActive(&quot;grid&quot;)&amp;&amp;(i.className=&quot;media-toolbar wp-filter&quot;),this.toolbar=new wp.media.view.Toolbar(i),this.views.add(this.toolbar),this.toolbar.set(&quot;spinner&quot;,new wp.media.view.Spinner({priority:-20})),(e||this.options.date)&amp;&amp;this.toolbar.set(&quot;filters-heading&quot;,new wp.media.view.Heading({priority:-100,text:n.filterAttachments,level:&quot;h2&quot;,className:&quot;media-attachments-filter-heading&quot;}).render()),e&amp;&amp;(this.toolbar.set(&quot;filtersLabel&quot;,new wp.media.view.Label({value:n.filterByType,attributes:{for:&quot;media-attachment-filters&quot;},priority:-80}).render()),&quot;uploaded&quot;===this.options.filters?this.toolbar.set(&quot;filters&quot;,new wp.media.view.AttachmentFilters.Uploaded({controller:this.controller,model:this.collection.props,priority:-80}).render()):(t=new wp.media.view.AttachmentFilters.All({controller:this.controller,model:this.collection.props,priority:-80}),this.toolbar.set(&quot;filters&quot;,t.render()))),this.controller.isModeActive(&quot;grid&quot;)?(i=s.extend({className:&quot;view-switch media-grid-view-switch&quot;,template:wp.template(&quot;media-library-view-switcher&quot;)}),this.toolbar.set(&quot;libraryViewSwitcher&quot;,new i({controller:this.controller,priority:-90}).render()),this.toolbar.set(&quot;dateFilterLabel&quot;,new wp.media.view.Label({value:n.filterByDate,attributes:{for:&quot;media-attachment-date-filters&quot;},priority:-75}).render()),this.toolbar.set(&quot;dateFilter&quot;,new wp.media.view.DateFilter({controller:this.controller,model:this.collection.props,priority:-75}).render()),this.toolbar.set(&quot;selectModeToggleButton&quot;,new wp.media.view.SelectModeToggleButton({text:n.bulkSelect,controller:this.controller,priority:-70}).render()),this.toolbar.set(&quot;deleteSelectedButton&quot;,new wp.media.view.DeleteSelectedButton({filters:t,style:&quot;primary&quot;,disabled:!0,text:o?n.trashSelected:n.deletePermanently,controller:this.controller,priority:-80,click:function(){var e=[],i=[],t=this.controller.state().get(&quot;selection&quot;),s=this.controller.state().get(&quot;library&quot;);!t.length||!o&amp;&amp;!window.confirm(n.warnBulkDelete)||o&amp;&amp;&quot;trash&quot;!==t.at(0).get(&quot;status&quot;)&amp;&amp;!window.confirm(n.warnBulkTrash)||(t.each(function(t){t.get(&quot;nonces&quot;).delete?o&amp;&amp;&quot;trash&quot;===t.get(&quot;status&quot;)?(t.set(&quot;status&quot;,&quot;inherit&quot;),e.push(t.save()),i.push(t)):o?(t.set(&quot;status&quot;,&quot;trash&quot;),e.push(t.save()),i.push(t)):t.destroy({wait:!0}):i.push(t)}),e.length?(t.remove(i),a.when.apply(null,e).then(_.bind(function(){s._requery(!0),this.controller.trigger(&quot;selection:action:done&quot;)},this))):this.controller.trigger(&quot;selection:action:done&quot;))}}).render()),o&amp;&amp;this.toolbar.set(&quot;deleteSelectedPermanentlyButton&quot;,new wp.media.view.DeleteSelectedPermanentlyButton({filters:t,style:&quot;link button-link-delete&quot;,disabled:!0,text:n.deletePermanently,controller:this.controller,priority:-55,click:function(){var e=[],i=[],t=this.controller.state().get(&quot;selection&quot;);t.length&amp;&amp;window.confirm(n.warnBulkDelete)&amp;&amp;(t.each(function(t){(t.get(&quot;nonces&quot;).delete?i:e).push(t)}),e.length&amp;&amp;t.remove(e),i.length&amp;&amp;a.when.apply(null,i.map(function(t){return t.destroy()})).then(_.bind(function(){this.controller.trigger(&quot;selection:action:done&quot;)},this)))}}).render())):this.options.date&amp;&amp;(this.toolbar.set(&quot;dateFilterLabel&quot;,new wp.media.view.Label({value:n.filterByDate,attributes:{for:&quot;media-attachment-date-filters&quot;},priority:-75}).render()),this.toolbar.set(&quot;dateFilter&quot;,new wp.media.view.DateFilter({controller:this.controller,model:this.collection.props,priority:-75}).render())),this.options.search&amp;&amp;(this.toolbar.set(&quot;searchLabel&quot;,new wp.media.view.Label({value:n.searchLabel,className:&quot;media-search-input-label&quot;,attributes:{for:&quot;media-search-input&quot;},priority:60}).render()),this.toolbar.set(&quot;search&quot;,new wp.media.view.Search({controller:this.controller,model:this.collection.props,priority:60}).render())),this.options.dragInfo&amp;&amp;this.toolbar.set(&quot;dragInfo&quot;,new s({el:a(&#039;<div class="instructions">'+n.dragInfo+"</div>")[0],priority:-40})),this.options.suggestedWidth&amp;&amp;this.options.suggestedHeight&amp;&amp;this.toolbar.set("suggestedDimensions",new s({el:a('<div class="instructions">'+n.suggestedDimensions.replace("%1$s",this.options.suggestedWidth).replace("%2$s",this.options.suggestedHeight)+"</div>")[0],priority:-40}))},updateContent:function(){var t=this,e=this.controller.isModeActive("grid")?t.attachmentsNoResults:t.uploader;this.collection.length?(e.$el.addClass("hidden"),t.toolbar.get("spinner").hide()):(this.toolbar.get("spinner").show(),this.dfd=this.collection.more().done(function(){t.collection.length?e.$el.addClass("hidden"):e.$el.removeClass("hidden"),t.toolbar.get("spinner").hide()}))},createUploader:function(){this.uploader=new wp.media.view.UploaderInline({controller:this.controller,status:!1,message:this.controller.isModeActive("grid")?"":n.noItemsFound,canClose:this.controller.isModeActive("grid")}),this.uploader.$el.addClass("hidden"),this.views.add(this.uploader)},toggleUploader:function(){this.uploader.$el.hasClass("hidden")?this.uploader.show():this.uploader.hide()},createAttachmentsWrapperView:function(){this.attachmentsWrapper=new wp.media.View({className:"attachments-wrapper"}),this.views.add(this.attachmentsWrapper),this.createAttachments()},createAttachments:function(){this.attachments=new wp.media.view.Attachments({controller:this.controller,collection:this.collection,selection:this.options.selection,model:this.model,sortable:this.options.sortable,scrollElement:this.options.scrollElement,idealColumnWidth:this.options.idealColumnWidth,AttachmentView:this.options.AttachmentView}),this.controller.on("attachment:keydown:arrow",_.bind(this.attachments.arrowEvent,this.attachments)),this.controller.on("attachment:details:shift-tab",_.bind(this.attachments.restoreFocus,this.attachments)),this.views.add(".attachments-wrapper",this.attachments),this.controller.isModeActive("grid")&amp;&amp;(this.attachmentsNoResults=new s({controller:this.controller,tagName:"p"}),this.attachmentsNoResults.$el.addClass("hidden no-media"),this.attachmentsNoResults.$el.html(n.noMedia),this.views.add(this.attachmentsNoResults))},createLoadMoreView:function(){var t=this;this.loadMoreWrapper=new s({controller:this.controller,className:"load-more-wrapper"}),this.loadMoreCount=new s({controller:this.controller,tagName:"p",className:"load-more-count hidden"}),this.loadMoreButton=new wp.media.view.Button({text:r("Load more"),className:"load-more hidden",style:"primary",size:"",click:function(){t.loadMoreAttachments()}}),this.loadMoreSpinner=new wp.media.view.Spinner,this.loadMoreJumpToFirst=new wp.media.view.Button({text:r("Jump to first loaded item"),className:"load-more-jump hidden",size:"",click:function(){t.jumpToFirstAddedItem()}}),this.views.add(".attachments-wrapper",this.loadMoreWrapper),this.views.add(".load-more-wrapper",this.loadMoreSpinner),this.views.add(".load-more-wrapper",this.loadMoreCount),this.views.add(".load-more-wrapper",this.loadMoreButton),this.views.add(".load-more-wrapper",this.loadMoreJumpToFirst)},updateLoadMoreView:_.debounce(function(){this.loadMoreButton.$el.addClass("hidden"),this.loadMoreCount.$el.addClass("hidden"),this.loadMoreJumpToFirst.$el.addClass("hidden").prop("disabled",!0),this.collection.getTotalAttachments()&amp;&amp;(this.collection.length&amp;&amp;(this.loadMoreCount.$el.text(e(r("Showing %1$s of %2$s media items"),this.collection.length,this.collection.getTotalAttachments())),this.loadMoreCount.$el.removeClass("hidden")),this.collection.hasMore()&amp;&amp;this.loadMoreButton.$el.removeClass("hidden"),this.firstAddedMediaItem=this.$el.find(".attachment").eq(this.firstAddedMediaItemIndex),this.firstAddedMediaItem.length&amp;&amp;(this.firstAddedMediaItem.addClass("new-media"),this.loadMoreJumpToFirst.$el.removeClass("hidden").prop("disabled",!1)),this.firstAddedMediaItem.length&amp;&amp;!this.collection.hasMore()&amp;&amp;this.loadMoreJumpToFirst.$el.trigger("focus"))},10),loadMoreAttachments:function(){var t=this;this.collection.hasMore()&amp;&amp;(this.firstAddedMediaItemIndex=this.collection.length,this.$el.addClass("more-loaded"),this.collection.each(function(t){t=t.attributes.id;a('[data-id="'+t+'"]').addClass("found-media")}),t.loadMoreSpinner.show(),this.collection.once("attachments:received",function(){t.loadMoreSpinner.hide()}),this.collection.more())},jumpToFirstAddedItem:function(){this.firstAddedMediaItem.focus()},createAttachmentsHeading:function(){this.attachmentsHeading=new wp.media.view.Heading({text:n.attachmentsList,level:"h2",className:"media-views-heading screen-reader-text"}),this.views.add(this.attachmentsHeading)},createSidebar:function(){var t=this.options.selection,e=this.sidebar=new wp.media.view.Sidebar({controller:this.controller});this.views.add(e),this.controller.uploader&amp;&amp;e.set("uploads",new wp.media.view.UploaderStatus({controller:this.controller,priority:40})),t.on("selection:single",this.createSingle,this),t.on("selection:unsingle",this.disposeSingle,this),t.single()&amp;&amp;this.createSingle()},createSingle:function(){var t=this.sidebar,e=this.options.selection.single();t.set("details",new wp.media.view.Attachment.Details({controller:this.controller,model:e,priority:80})),t.set("compat",new wp.media.view.AttachmentCompat({controller:this.controller,model:e,priority:120})),this.options.display&amp;&amp;t.set("display",new wp.media.view.Settings.AttachmentDisplay({controller:this.controller,model:this.model.display(e),attachment:e,priority:160,userSettings:this.model.get("displayUserSettings")})),"insert"===this.model.id&amp;&amp;t.$el.addClass("visible")},disposeSingle:function(){var t=this.sidebar;t.unset("details"),t.unset("compat"),t.unset("display"),t.$el.removeClass("visible")}});t.exports=l},1223:function(t){var e=wp.media.view.Attachments,i=e.extend({events:{},initialize:function(){return _.defaults(this.options,{sortable:!1,resize:!1,AttachmentView:wp.media.view.Attachment.Selection}),e.prototype.initialize.apply(this,arguments)}});t.exports=i},4094:function(t){var e=Backbone.$,i=wp.media.View.extend({tagName:"div",className:"button-group button-large media-button-group",initialize:function(){this.buttons=_.map(this.options.buttons||[],function(t){return t instanceof Backbone.View?t:new wp.media.view.Button(t).render()}),delete this.options.buttons,this.options.classes&amp;&amp;this.$el.addClass(this.options.classes)},render:function(){return this.$el.html(e(_.pluck(this.buttons,"el")).detach()),this}});t.exports=i},3157:function(t){var e=wp.media.View.extend({tagName:"button",className:"media-button",attributes:{type:"button"},events:{click:"click"},defaults:{text:"",style:"",size:"large",disabled:!1},initialize:function(){this.model=new Backbone.Model(this.defaults),_.each(this.defaults,function(t,e){var i=this.options[e];_.isUndefined(i)||(this.model.set(e,i),delete this.options[e])},this),this.listenTo(this.model,"change",this.render)},render:function(){var t=["button",this.className],e=this.model.toJSON();return e.style&amp;&amp;t.push("button-"+e.style),e.size&amp;&amp;t.push("button-"+e.size),t=_.uniq(t.concat(this.options.classes)),this.el.className=t.join(" "),this.$el.attr("disabled",e.disabled),this.$el.text(this.model.get("text")),this},click:function(t){"#"===this.attributes.href&amp;&amp;t.preventDefault(),this.options.click&amp;&amp;!this.model.get("disabled")&amp;&amp;this.options.click.apply(this,arguments)}});t.exports=e},7137:function(t){var e=wp.media.View,i=wp.media.view.UploaderStatus,s=wp.media.view.l10n,o=jQuery,n=e.extend({className:"crop-content",template:wp.template("crop-content"),initialize:function(){_.bindAll(this,"onImageLoad")},ready:function(){this.controller.frame.on("content:error:crop",this.onError,this),this.$image=this.$el.find(".crop-image"),this.$image.on("load",this.onImageLoad),o(window).on("resize.cropper",_.debounce(this.onImageLoad,250))},remove:function(){o(window).off("resize.cropper"),this.$el.remove(),this.$el.off(),e.prototype.remove.apply(this,arguments)},prepare:function(){return{title:s.cropYourImage,url:this.options.attachment.get("url")}},onImageLoad:function(){var i,t=this.controller.get("imgSelectOptions");"function"==typeof t&amp;&amp;(t=t(this.options.attachment,this.controller)),t=_.extend(t,{parent:this.$el,onInit:function(){var e=i.getOptions().aspectRatio;this.parent.children().on("mousedown touchstart",function(t){!e&amp;&amp;t.shiftKey&amp;&amp;i.setOptions({aspectRatio:"1:1"})}),this.parent.children().on("mouseup touchend",function(){i.setOptions({aspectRatio:e||!1})})}}),this.trigger("image-loaded"),i=this.controller.imgSelect=this.$image.imgAreaSelect(t)},onError:function(){var t=this.options.attachment.get("filename");this.views.add(".upload-errors",new wp.media.view.UploaderStatusError({filename:i.prototype.filename(t),message:window._wpMediaViewsL10n.cropError}),{at:0})}});t.exports=n},5970:function(t){var e=wp.media.View,i=e.extend({className:"image-editor",template:wp.template("image-editor"),initialize:function(t){this.editor=window.imageEdit,this.controller=t.controller,e.prototype.initialize.apply(this,arguments)},prepare:function(){return this.model.toJSON()},loadEditor:function(){this.editor.open(this.model.get("id"),this.model.get("nonces").edit,this)},back:function(){var t=this.controller.lastState();this.controller.setState(t)},refresh:function(){this.model.fetch()},save:function(){var t=this.controller.lastState();this.model.fetch().done(_.bind(function(){this.controller.setState(t)},this))}});t.exports=i},5138:function(t){var e=wp.media.View.extend({className:"media-embed",initialize:function(){this.url=new wp.media.view.EmbedUrl({controller:this.controller,model:this.model.props}).render(),this.views.set([this.url]),this.refresh(),this.listenTo(this.model,"change:type",this.refresh),this.listenTo(this.model,"change:loading",this.loading)},settings:function(t){this._settings&amp;&amp;this._settings.remove(),this._settings=t,this.views.add(t)},refresh:function(){var t,e=this.model.get("type");if("image"===e)t=wp.media.view.EmbedImage;else{if("link"!==e)return;t=wp.media.view.EmbedLink}this.settings(new t({controller:this.controller,model:this.model.props,priority:40}))},loading:function(){this.$el.toggleClass("embed-loading",this.model.get("loading"))}});t.exports=e},1338:function(t){var e=wp.media.view.Settings.AttachmentDisplay,i=e.extend({className:"embed-media-settings",template:wp.template("embed-image-settings"),initialize:function(){e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:url",this.updateImage)},updateImage:function(){this.$("img").attr("src",this.model.get("url"))}});t.exports=i},6959:function(t){var i=jQuery,e=wp.media.view.Settings.extend({className:"embed-link-settings",template:wp.template("embed-link-settings"),initialize:function(){this.listenTo(this.model,"change:url",this.updateoEmbed)},updateoEmbed:_.debounce(function(){var t=this.model.get("url");this.$(".embed-container").hide().find(".embed-preview").empty(),this.$(".setting").hide(),t&amp;&amp;(t.length&lt;11||!t.match(/^http(s)?:\/\//))||this.fetch()},wp.media.controller.Embed.sensitivity),fetch:function(){var t,e=this.model.get(&quot;url&quot;);i(&quot;#embed-url-field&quot;).val()===e&amp;&amp;(this.dfd&amp;&amp;&quot;pending&quot;===this.dfd.state()&amp;&amp;this.dfd.abort(),(t=/https?:\/\/www\.youtube\.com\/embed\/([^/]+)/.exec(e))&amp;&amp;(e=&quot;https://www.youtube.com/watch?v=&quot;+t[1]),this.dfd=wp.apiRequest({url:wp.media.view.settings.oEmbedProxyUrl,data:{url:e,maxwidth:this.model.get(&quot;width&quot;),maxheight:this.model.get(&quot;height&quot;)},type:&quot;GET&quot;,dataType:&quot;json&quot;,context:this}).done(function(t){this.renderoEmbed({data:{body:t.html||&quot;&quot;}})}).fail(this.renderFail))},renderFail:function(t,e){&quot;abort&quot;!==e&amp;&amp;this.$(&quot;.link-text&quot;).show()},renderoEmbed:function(t){t=t&amp;&amp;t.data&amp;&amp;t.data.body||&quot;&quot;;t?this.$(&quot;.embed-container&quot;).show().find(&quot;.embed-preview&quot;).html(t):this.renderFail()}});t.exports=e},4848:function(t){var e=wp.media.View,i=jQuery,s=wp.media.view.l10n,o=e.extend({tagName:&quot;span&quot;,className:&quot;embed-url&quot;,events:{input:&quot;url&quot;},initialize:function(){this.$input=i(&#039;').attr("aria-label",s.insertFromUrlTitle).val(this.model.get("url")),this.input=this.$input[0],this.spinner=i('<span class="spinner" />')[0],this.$el.append([this.input,this.spinner]),this.listenTo(this.model,"change:url",this.render),this.model.get("url")&amp;&amp;_.delay(_.bind(function(){this.model.trigger("change:url")},this),500)},render:function(){var t=this.$input;if(!t.is(":focus"))return this.input.value=this.model.get("url")||"http://",e.prototype.render.apply(this,arguments),this},url:function(t){t=t.target.value||"";this.model.set("url",t.trim())}});t.exports=o},6557:function(t){var o=jQuery,e=wp.media.View.extend({events:{keydown:"focusManagementMode"},initialize:function(t){this.mode=t.mode||"constrainTabbing",this.tabsAutomaticActivation=t.tabsAutomaticActivation||!1},focusManagementMode:function(t){"constrainTabbing"===this.mode&amp;&amp;this.constrainTabbing(t),"tabsNavigation"===this.mode&amp;&amp;this.tabsNavigation(t)},getTabbables:function(){return this.$(":tabbable").not('.moxie-shim input[type="file"]')},focus:function(){this.$(".media-modal").trigger("focus")},constrainTabbing:function(t){var e;if(9===t.keyCode)return(e=this.getTabbables()).last()[0]!==t.target||t.shiftKey?e.first()[0]===t.target&amp;&amp;t.shiftKey?(e.last().focus(),!1):void 0:(e.first().focus(),!1)},setAriaHiddenOnBodyChildren:function(e){var t,i=this;this.isBodyAriaHidden||(t=document.body.children,_.each(t,function(t){t!==e[0]&amp;&amp;i.elementShouldBeHidden(t)&amp;&amp;(t.setAttribute("aria-hidden","true"),i.ariaHiddenElements.push(t))}),this.isBodyAriaHidden=!0)},removeAriaHiddenFromBodyChildren:function(){_.each(this.ariaHiddenElements,function(t){t.removeAttribute("aria-hidden")}),this.ariaHiddenElements=[],this.isBodyAriaHidden=!1},elementShouldBeHidden:function(t){var e=t.getAttribute("role");return!("SCRIPT"===t.tagName||t.hasAttribute("aria-hidden")||t.hasAttribute("aria-live")||-1!==["alert","status","log","marquee","timer"].indexOf(e))},isBodyAriaHidden:!1,ariaHiddenElements:[],tabs:o(),setupAriaTabs:function(){this.tabs=this.$('[role="tab"]'),this.tabs.attr({"aria-selected":"false",tabIndex:"-1"}),this.tabs.filter(".active").removeAttr("tabindex").attr("aria-selected","true")},tabsNavigation:function(t){var e="horizontal";-1===[32,35,36,37,38,39,40].indexOf(t.which)||"horizontal"===(e="vertical"===this.$el.attr("aria-orientation")?"vertical":e)&amp;&amp;-1!==[38,40].indexOf(t.which)||"vertical"===e&amp;&amp;-1!==[37,39].indexOf(t.which)||this.switchTabs(t,this.tabs)},switchTabs:function(t){var e,i=t.which,s=this.tabs.index(o(t.target));switch(i){case 32:this.activateTab(this.tabs[s]);break;case 35:t.preventDefault(),this.activateTab(this.tabs[this.tabs.length-1]);break;case 36:t.preventDefault(),this.activateTab(this.tabs[0]);break;case 37:case 38:t.preventDefault(),e=s-1&lt;0?this.tabs.length-1:s-1,this.activateTab(this.tabs[e]);break;case 39:case 40:t.preventDefault(),e=s+1===this.tabs.length?0:s+1,this.activateTab(this.tabs[e])}},activateTab:function(t){if(t){if(t.focus(),this.tabsAutomaticActivation)return t.removeAttribute(&quot;tabindex&quot;),t.setAttribute(&quot;aria-selected&quot;,&quot;true&quot;),void t.click();o(t).on(&quot;click&quot;,function(){t.removeAttribute(&quot;tabindex&quot;),t.setAttribute(&quot;aria-selected&quot;,&quot;true&quot;)})}}});t.exports=e},3647:function(t){var e=wp.media.View.extend({initialize:function(){_.defaults(this.options,{mode:[&quot;select&quot;]}),this._createRegions(),this._createStates(),this._createModes()},_createRegions:function(){this.regions=this.regions?this.regions.slice():[],_.each(this.regions,function(t){this[t]=new wp.media.controller.Region({view:this,id:t,selector:&quot;.media-frame-&quot;+t})},this)},_createStates:function(){this.states=new Backbone.Collection(null,{model:wp.media.controller.State}),this.states.on(&quot;add&quot;,function(t){t.frame=this,t.trigger(&quot;ready&quot;)},this),this.options.states&amp;&amp;this.states.add(this.options.states)},_createModes:function(){this.activeModes=new Backbone.Collection,this.activeModes.on(&quot;add remove reset&quot;,_.bind(this.triggerModeEvents,this)),_.each(this.options.mode,function(t){this.activateMode(t)},this)},reset:function(){return this.states.invoke(&quot;trigger&quot;,&quot;reset&quot;),this},triggerModeEvents:function(t,e,i){var s,o={add:&quot;activate&quot;,remove:&quot;deactivate&quot;};_.each(i,function(t,e){t&amp;&amp;(s=e)}),_.has(o,s)&amp;&amp;(i=t.get(&quot;id&quot;)+&quot;:&quot;+o[s],this.trigger(i))},activateMode:function(t){if(!this.isModeActive(t))return this.activeModes.add([{id:t}]),this.$el.addClass(&quot;mode-&quot;+t),this},deactivateMode:function(t){return this.isModeActive(t)&amp;&amp;(this.activeModes.remove(this.activeModes.where({id:t})),this.$el.removeClass(&quot;mode-&quot;+t),this.trigger(t+&quot;:deactivate&quot;)),this},isModeActive:function(t){return Boolean(this.activeModes.where({id:t}).length)}});_.extend(e.prototype,wp.media.controller.StateMachine.prototype),t.exports=e},9142:function(t){var e=wp.media.view.MediaFrame.Select,s=wp.media.view.l10n,i=e.extend({defaults:{id:&quot;image&quot;,url:&quot;&quot;,menu:&quot;image-details&quot;,content:&quot;image-details&quot;,toolbar:&quot;image-details&quot;,type:&quot;link&quot;,title:s.imageDetailsTitle,priority:120},initialize:function(t){this.image=new wp.media.model.PostImage(t.metadata),this.options.selection=new wp.media.model.Selection(this.image.attachment,{multiple:!1}),e.prototype.initialize.apply(this,arguments)},bindHandlers:function(){e.prototype.bindHandlers.apply(this,arguments),this.on(&quot;menu:create:image-details&quot;,this.createMenu,this),this.on(&quot;content:create:image-details&quot;,this.imageDetailsContent,this),this.on(&quot;content:render:edit-image&quot;,this.editImageContent,this),this.on(&quot;toolbar:render:image-details&quot;,this.renderImageDetailsToolbar,this),this.on(&quot;toolbar:render:replace&quot;,this.renderReplaceImageToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.ImageDetails({image:this.image,editable:!1}),new wp.media.controller.ReplaceImage({id:&quot;replace-image&quot;,library:wp.media.query({type:&quot;image&quot;}),image:this.image,multiple:!1,title:s.imageReplaceTitle,toolbar:&quot;replace&quot;,priority:80,displaySettings:!0}),new wp.media.controller.EditImage({image:this.image,selection:this.options.selection})])},imageDetailsContent:function(t){t.view=new wp.media.view.ImageDetails({controller:this,model:this.state().image,attachment:this.state().image.attachment})},editImageContent:function(){var t=this.state().get(&quot;image&quot;);t&amp;&amp;(t=new wp.media.view.EditImage({model:t,controller:this}).render(),this.content.set(t),t.loadEditor())},renderImageDetailsToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{select:{style:&quot;primary&quot;,text:s.update,priority:80,click:function(){var t=this.controller,e=t.state();t.close(),e.trigger(&quot;update&quot;,t.image.toJSON()),t.setState(t.options.state),t.reset()}}}}))},renderReplaceImageToolbar:function(){var t=this,e=t.lastState(),i=e&amp;&amp;e.id;this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{back:{text:s.back,priority:80,click:function(){i?t.setState(i):t.close()}},replace:{style:&quot;primary&quot;,text:s.replace,priority:20,requires:{selection:!0},click:function(){var t=this.controller,e=t.state(),i=e.get(&quot;selection&quot;).single();t.close(),t.image.changeAttachment(i,e.display(i)),e.trigger(&quot;replace&quot;,t.image.toJSON()),t.setState(t.options.state),t.reset()}}}}))}});t.exports=i},9075:function(t){var e=wp.media.view.MediaFrame.Select,i=wp.media.controller.Library,o=wp.media.view.l10n,s=e.extend({initialize:function(){this.counts={audio:{count:wp.media.view.settings.attachmentCounts.audio,state:&quot;playlist&quot;},video:{count:wp.media.view.settings.attachmentCounts.video,state:&quot;video-playlist&quot;}},_.defaults(this.options,{multiple:!0,editing:!1,state:&quot;insert&quot;,metadata:{}}),e.prototype.initialize.apply(this,arguments),this.createIframeStates()},createStates:function(){var t=this.options;this.states.add([new i({id:&quot;insert&quot;,title:o.insertMediaTitle,priority:20,toolbar:&quot;main-insert&quot;,filterable:&quot;all&quot;,library:wp.media.query(t.library),multiple:!!t.multiple&amp;&amp;&quot;reset&quot;,editable:!0,allowLocalEdits:!0,displaySettings:!0,displayUserSettings:!0}),new i({id:&quot;gallery&quot;,title:o.createGalleryTitle,priority:40,toolbar:&quot;main-gallery&quot;,filterable:&quot;uploaded&quot;,multiple:&quot;add&quot;,editable:!1,library:wp.media.query(_.defaults({type:&quot;image&quot;},t.library))}),new wp.media.controller.Embed({metadata:t.metadata}),new wp.media.controller.EditImage({model:t.editImage}),new wp.media.controller.GalleryEdit({library:t.selection,editing:t.editing,menu:&quot;gallery&quot;}),new wp.media.controller.GalleryAdd,new i({id:&quot;playlist&quot;,title:o.createPlaylistTitle,priority:60,toolbar:&quot;main-playlist&quot;,filterable:&quot;uploaded&quot;,multiple:&quot;add&quot;,editable:!1,library:wp.media.query(_.defaults({type:&quot;audio&quot;},t.library))}),new wp.media.controller.CollectionEdit({type:&quot;audio&quot;,collectionType:&quot;playlist&quot;,title:o.editPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,library:t.selection,editing:t.editing,menu:&quot;playlist&quot;,dragInfoText:o.playlistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:&quot;audio&quot;,collectionType:&quot;playlist&quot;,title:o.addToPlaylistTitle}),new i({id:&quot;video-playlist&quot;,title:o.createVideoPlaylistTitle,priority:60,toolbar:&quot;main-video-playlist&quot;,filterable:&quot;uploaded&quot;,multiple:&quot;add&quot;,editable:!1,library:wp.media.query(_.defaults({type:&quot;video&quot;},t.library))}),new wp.media.controller.CollectionEdit({type:&quot;video&quot;,collectionType:&quot;playlist&quot;,title:o.editVideoPlaylistTitle,SettingsView:wp.media.view.Settings.Playlist,library:t.selection,editing:t.editing,menu:&quot;video-playlist&quot;,dragInfoText:o.videoPlaylistDragInfo,dragInfo:!1}),new wp.media.controller.CollectionAdd({type:&quot;video&quot;,collectionType:&quot;playlist&quot;,title:o.addToVideoPlaylistTitle})]),wp.media.view.settings.post.featuredImageId&amp;&amp;this.states.add(new wp.media.controller.FeaturedImage)},bindHandlers:function(){e.prototype.bindHandlers.apply(this,arguments),this.on(&quot;activate&quot;,this.activate,this),void 0!==_.find(this.counts,function(t){return 0===t.count})&amp;&amp;this.listenTo(wp.media.model.Attachments.all,&quot;change:type&quot;,this.mediaTypeCounts),this.on(&quot;menu:create:gallery&quot;,this.createMenu,this),this.on(&quot;menu:create:playlist&quot;,this.createMenu,this),this.on(&quot;menu:create:video-playlist&quot;,this.createMenu,this),this.on(&quot;toolbar:create:main-insert&quot;,this.createToolbar,this),this.on(&quot;toolbar:create:main-gallery&quot;,this.createToolbar,this),this.on(&quot;toolbar:create:main-playlist&quot;,this.createToolbar,this),this.on(&quot;toolbar:create:main-video-playlist&quot;,this.createToolbar,this),this.on(&quot;toolbar:create:featured-image&quot;,this.featuredImageToolbar,this),this.on(&quot;toolbar:create:main-embed&quot;,this.mainEmbedToolbar,this),_.each({menu:{default:&quot;mainMenu&quot;,gallery:&quot;galleryMenu&quot;,playlist:&quot;playlistMenu&quot;,&quot;video-playlist&quot;:&quot;videoPlaylistMenu&quot;},content:{embed:&quot;embedContent&quot;,&quot;edit-image&quot;:&quot;editImageContent&quot;,&quot;edit-selection&quot;:&quot;editSelectionContent&quot;},toolbar:{&quot;main-insert&quot;:&quot;mainInsertToolbar&quot;,&quot;main-gallery&quot;:&quot;mainGalleryToolbar&quot;,&quot;gallery-edit&quot;:&quot;galleryEditToolbar&quot;,&quot;gallery-add&quot;:&quot;galleryAddToolbar&quot;,&quot;main-playlist&quot;:&quot;mainPlaylistToolbar&quot;,&quot;playlist-edit&quot;:&quot;playlistEditToolbar&quot;,&quot;playlist-add&quot;:&quot;playlistAddToolbar&quot;,&quot;main-video-playlist&quot;:&quot;mainVideoPlaylistToolbar&quot;,&quot;video-playlist-edit&quot;:&quot;videoPlaylistEditToolbar&quot;,&quot;video-playlist-add&quot;:&quot;videoPlaylistAddToolbar&quot;}},function(t,i){_.each(t,function(t,e){this.on(i+&quot;:render:&quot;+e,this[t],this)},this)},this)},activate:function(){_.each(this.counts,function(t){t.count&lt;1&amp;&amp;this.menuItemVisibility(t.state,&quot;hide&quot;)},this)},mediaTypeCounts:function(t,e){void 0!==this.counts[e]&amp;&amp;this.counts[e].count&lt;1&amp;&amp;(this.counts[e].count++,this.menuItemVisibility(this.counts[e].state,&quot;show&quot;))},mainMenu:function(t){t.set({&quot;library-separator&quot;:new wp.media.View({className:&quot;separator&quot;,priority:100,attributes:{role:&quot;presentation&quot;}})})},menuItemVisibility:function(t,e){var i=this.menu.get();&quot;hide&quot;===e?i.hide(t):&quot;show&quot;===e&amp;&amp;i.show(t)},galleryMenu:function(t){var e=this.lastState(),i=e&amp;&amp;e.id,s=this;t.set({cancel:{text:o.cancelGalleryTitle,priority:20,click:function(){i?s.setState(i):s.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:&quot;separator&quot;,priority:40})})},playlistMenu:function(t){var e=this.lastState(),i=e&amp;&amp;e.id,s=this;t.set({cancel:{text:o.cancelPlaylistTitle,priority:20,click:function(){i?s.setState(i):s.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:&quot;separator&quot;,priority:40})})},videoPlaylistMenu:function(t){var e=this.lastState(),i=e&amp;&amp;e.id,s=this;t.set({cancel:{text:o.cancelVideoPlaylistTitle,priority:20,click:function(){i?s.setState(i):s.close(),this.controller.modal.focusManager.focus()}},separateCancel:new wp.media.View({className:&quot;separator&quot;,priority:40})})},embedContent:function(){var t=new wp.media.view.Embed({controller:this,model:this.state()}).render();this.content.set(t)},editSelectionContent:function(){var t=this.state(),e=t.get(&quot;selection&quot;),e=new wp.media.view.AttachmentsBrowser({controller:this,collection:e,selection:e,model:t,sortable:!0,search:!1,date:!1,dragInfo:!0,AttachmentView:wp.media.view.Attachments.EditSelection}).render();e.toolbar.set(&quot;backToLibrary&quot;,{text:o.returnToLibrary,priority:-100,click:function(){this.controller.content.mode(&quot;browse&quot;),this.controller.modal.focusManager.focus()}}),this.content.set(e),this.trigger(&quot;edit:selection&quot;,this)},editImageContent:function(){var t=this.state().get(&quot;image&quot;),t=new wp.media.view.EditImage({model:t,controller:this}).render();this.content.set(t),t.loadEditor()},selectionStatusToolbar:function(t){var e=this.state().get(&quot;editable&quot;);t.set(&quot;selection&quot;,new wp.media.view.Selection({controller:this,collection:this.state().get(&quot;selection&quot;),priority:-40,editable:e&amp;&amp;function(){this.controller.content.mode(&quot;edit-selection&quot;)}}).render())},mainInsertToolbar:function(t){var i=this;this.selectionStatusToolbar(t),t.set(&quot;insert&quot;,{style:&quot;primary&quot;,priority:80,text:o.insertIntoPost,requires:{selection:!0},click:function(){var t=i.state(),e=t.get(&quot;selection&quot;);i.close(),t.trigger(&quot;insert&quot;,e).reset()}})},mainGalleryToolbar:function(t){var s=this;this.selectionStatusToolbar(t),t.set(&quot;gallery&quot;,{style:&quot;primary&quot;,text:o.createNewGallery,priority:60,requires:{selection:!0},click:function(){var t=s.state().get(&quot;selection&quot;),e=s.state(&quot;gallery-edit&quot;),i=t.where({type:&quot;image&quot;});e.set(&quot;library&quot;,new wp.media.model.Selection(i,{props:t.props.toJSON(),multiple:!0})),this.controller.setState(&quot;gallery-edit&quot;),this.controller.modal.focusManager.focus()}})},mainPlaylistToolbar:function(t){var s=this;this.selectionStatusToolbar(t),t.set(&quot;playlist&quot;,{style:&quot;primary&quot;,text:o.createNewPlaylist,priority:100,requires:{selection:!0},click:function(){var t=s.state().get(&quot;selection&quot;),e=s.state(&quot;playlist-edit&quot;),i=t.where({type:&quot;audio&quot;});e.set(&quot;library&quot;,new wp.media.model.Selection(i,{props:t.props.toJSON(),multiple:!0})),this.controller.setState(&quot;playlist-edit&quot;),this.controller.modal.focusManager.focus()}})},mainVideoPlaylistToolbar:function(t){var s=this;this.selectionStatusToolbar(t),t.set(&quot;video-playlist&quot;,{style:&quot;primary&quot;,text:o.createNewVideoPlaylist,priority:100,requires:{selection:!0},click:function(){var t=s.state().get(&quot;selection&quot;),e=s.state(&quot;video-playlist-edit&quot;),i=t.where({type:&quot;video&quot;});e.set(&quot;library&quot;,new wp.media.model.Selection(i,{props:t.props.toJSON(),multiple:!0})),this.controller.setState(&quot;video-playlist-edit&quot;),this.controller.modal.focusManager.focus()}})},featuredImageToolbar:function(t){this.createSelectToolbar(t,{text:o.setFeaturedImage,state:this.options.state})},mainEmbedToolbar:function(t){t.view=new wp.media.view.Toolbar.Embed({controller:this})},galleryEditToolbar:function(){var t=this.state().get(&quot;editing&quot;);this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:&quot;primary&quot;,text:t?o.updateGallery:o.insertGallery,priority:80,requires:{library:!0},click:function(){var t=this.controller,e=t.state();t.close(),e.trigger(&quot;update&quot;,e.get(&quot;library&quot;)),t.setState(t.options.state),t.reset()}}}}))},galleryAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:&quot;primary&quot;,text:o.addToGallery,priority:80,requires:{selection:!0},click:function(){var t=this.controller,e=t.state();t.state(&quot;gallery-edit&quot;).get(&quot;library&quot;).add(e.get(&quot;selection&quot;).models),e.trigger(&quot;reset&quot;),t.setState(&quot;gallery-edit&quot;),this.controller.modal.focusManager.focus()}}}}))},playlistEditToolbar:function(){var t=this.state().get(&quot;editing&quot;);this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:&quot;primary&quot;,text:t?o.updatePlaylist:o.insertPlaylist,priority:80,requires:{library:!0},click:function(){var t=this.controller,e=t.state();t.close(),e.trigger(&quot;update&quot;,e.get(&quot;library&quot;)),t.setState(t.options.state),t.reset()}}}}))},playlistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:&quot;primary&quot;,text:o.addToPlaylist,priority:80,requires:{selection:!0},click:function(){var t=this.controller,e=t.state();t.state(&quot;playlist-edit&quot;).get(&quot;library&quot;).add(e.get(&quot;selection&quot;).models),e.trigger(&quot;reset&quot;),t.setState(&quot;playlist-edit&quot;),this.controller.modal.focusManager.focus()}}}}))},videoPlaylistEditToolbar:function(){var t=this.state().get(&quot;editing&quot;);this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:&quot;primary&quot;,text:t?o.updateVideoPlaylist:o.insertVideoPlaylist,priority:140,requires:{library:!0},click:function(){var t=this.controller,e=t.state(),i=e.get(&quot;library&quot;);i.type=&quot;video&quot;,t.close(),e.trigger(&quot;update&quot;,i),t.setState(t.options.state),t.reset()}}}}))},videoPlaylistAddToolbar:function(){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{insert:{style:&quot;primary&quot;,text:o.addToVideoPlaylist,priority:140,requires:{selection:!0},click:function(){var t=this.controller,e=t.state();t.state(&quot;video-playlist-edit&quot;).get(&quot;library&quot;).add(e.get(&quot;selection&quot;).models),e.trigger(&quot;reset&quot;),t.setState(&quot;video-playlist-edit&quot;),this.controller.modal.focusManager.focus()}}}}))}});t.exports=s},8719:function(t){var e=wp.media.view.MediaFrame,i=wp.media.view.l10n,s=e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{selection:[],library:{},multiple:!1,state:&quot;library&quot;}),this.createSelection(),this.createStates(),this.bindHandlers()},createSelection:function(){var t=this.options.selection;t instanceof wp.media.model.Selection||(this.options.selection=new wp.media.model.Selection(t,{multiple:this.options.multiple})),this._selection={attachments:new wp.media.model.Attachments,difference:[]}},editImageContent:function(){var t=this.state().get(&quot;image&quot;),t=new wp.media.view.EditImage({model:t,controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){var t=this.options;this.options.states||this.states.add([new wp.media.controller.Library({library:wp.media.query(t.library),multiple:t.multiple,title:t.title,priority:20}),new wp.media.controller.EditImage({model:t.editImage})])},bindHandlers:function(){this.on(&quot;router:create:browse&quot;,this.createRouter,this),this.on(&quot;router:render:browse&quot;,this.browseRouter,this),this.on(&quot;content:create:browse&quot;,this.browseContent,this),this.on(&quot;content:render:upload&quot;,this.uploadContent,this),this.on(&quot;toolbar:create:select&quot;,this.createSelectToolbar,this),this.on(&quot;content:render:edit-image&quot;,this.editImageContent,this)},browseRouter:function(t){t.set({upload:{text:i.uploadFilesTitle,priority:20},browse:{text:i.mediaLibraryTitle,priority:40}})},browseContent:function(t){var e=this.state();this.$el.removeClass(&quot;hide-toolbar&quot;),t.view=new wp.media.view.AttachmentsBrowser({controller:this,collection:e.get(&quot;library&quot;),selection:e.get(&quot;selection&quot;),model:e,sortable:e.get(&quot;sortable&quot;),search:e.get(&quot;searchable&quot;),filters:e.get(&quot;filterable&quot;),date:e.get(&quot;date&quot;),display:e.has(&quot;display&quot;)?e.get(&quot;display&quot;):e.get(&quot;displaySettings&quot;),dragInfo:e.get(&quot;dragInfo&quot;),idealColumnWidth:e.get(&quot;idealColumnWidth&quot;),suggestedWidth:e.get(&quot;suggestedWidth&quot;),suggestedHeight:e.get(&quot;suggestedHeight&quot;),AttachmentView:e.get(&quot;AttachmentView&quot;)})},uploadContent:function(){this.$el.removeClass(&quot;hide-toolbar&quot;),this.content.set(new wp.media.view.UploaderInline({controller:this}))},createSelectToolbar:function(t,e){(e=e||this.options.button||{}).controller=this,t.view=new wp.media.view.Toolbar.Select(e)}});t.exports=s},7990:function(t){var e=wp.media.View.extend({tagName:function(){return this.options.level||&quot;h1&quot;},className:&quot;media-views-heading&quot;,initialize:function(){this.options.className&amp;&amp;this.$el.addClass(this.options.className),this.text=this.options.text},render:function(){return this.$el.html(this.text),this}});t.exports=e},6217:function(t){var e=wp.media.View.extend({className:&quot;media-iframe&quot;,render:function(){return this.views.detach(),this.$el.html(&#039;'),this.views.render(),this}});t.exports=e},7598:function(t){var e=wp.media.view.Settings.AttachmentDisplay,o=jQuery,i=e.extend({className:"image-details",template:wp.template("image-details"),events:_.defaults(e.prototype.events,{"click .edit-attachment":"editAttachment","click .replace-attachment":"replaceAttachment","click .advanced-toggle":"onToggleAdvanced",'change [data-setting="customWidth"]':"onCustomSize",'change [data-setting="customHeight"]':"onCustomSize",'keyup [data-setting="customWidth"]':"onCustomSize",'keyup [data-setting="customHeight"]':"onCustomSize"}),initialize:function(){this.options.attachment=this.model.attachment,this.listenTo(this.model,"change:url",this.updateUrl),this.listenTo(this.model,"change:link",this.toggleLinkSettings),this.listenTo(this.model,"change:size",this.toggleCustomSize),e.prototype.initialize.apply(this,arguments)},prepare:function(){var t=!1;return this.model.attachment&amp;&amp;(t=this.model.attachment.toJSON()),_.defaults({model:this.model.toJSON(),attachment:t},this.options)},render:function(){var t=arguments;return this.model.attachment&amp;&amp;"pending"===this.model.dfd.state()?this.model.dfd.done(_.bind(function(){e.prototype.render.apply(this,t),this.postRender()},this)).fail(_.bind(function(){this.model.attachment=!1,e.prototype.render.apply(this,t),this.postRender()},this)):(e.prototype.render.apply(this,arguments),this.postRender()),this},postRender:function(){setTimeout(_.bind(this.scrollToTop,this),10),this.toggleLinkSettings(),"show"===window.getUserSetting("advImgDetails")&amp;&amp;this.toggleAdvanced(!0),this.trigger("post-render")},scrollToTop:function(){this.$(".embed-media-settings").scrollTop(0)},updateUrl:function(){this.$(".image img").attr("src",this.model.get("url")),this.$(".url").val(this.model.get("url"))},toggleLinkSettings:function(){"none"===this.model.get("link")?this.$(".link-settings").addClass("hidden"):this.$(".link-settings").removeClass("hidden")},toggleCustomSize:function(){"custom"!==this.model.get("size")?this.$(".custom-size").addClass("hidden"):this.$(".custom-size").removeClass("hidden")},onCustomSize:function(t){var e,i=o(t.target).data("setting"),s=o(t.target).val();!/^\d+/.test(s)||parseInt(s,10)&lt;1?t.preventDefault():&quot;customWidth&quot;===i?(e=Math.round(1/this.model.get(&quot;aspectRatio&quot;)*s),this.model.set(&quot;customHeight&quot;,e,{silent:!0}),this.$(&#039;[data-setting=&quot;customHeight&quot;]&#039;).val(e)):(e=Math.round(this.model.get(&quot;aspectRatio&quot;)*s),this.model.set(&quot;customWidth&quot;,e,{silent:!0}),this.$(&#039;[data-setting=&quot;customWidth&quot;]&#039;).val(e))},onToggleAdvanced:function(t){t.preventDefault(),this.toggleAdvanced()},toggleAdvanced:function(t){var e=this.$el.find(&quot;.advanced-section&quot;),t=e.hasClass(&quot;advanced-visible&quot;)||!1===t?(e.removeClass(&quot;advanced-visible&quot;),e.find(&quot;.advanced-settings&quot;).addClass(&quot;hidden&quot;),&quot;hide&quot;):(e.addClass(&quot;advanced-visible&quot;),e.find(&quot;.advanced-settings&quot;).removeClass(&quot;hidden&quot;),&quot;show&quot;);window.setUserSetting(&quot;advImgDetails&quot;,t)},editAttachment:function(t){var e=this.controller.states.get(&quot;edit-image&quot;);window.imageEdit&amp;&amp;e&amp;&amp;(t.preventDefault(),e.set(&quot;image&quot;,this.model.attachment),this.controller.setState(&quot;edit-image&quot;))},replaceAttachment:function(t){t.preventDefault(),this.controller.setState(&quot;replace-image&quot;)}});t.exports=i},6644:function(t){var e=wp.media.View.extend({tagName:&quot;label&quot;,className:&quot;screen-reader-text&quot;,initialize:function(){this.value=this.options.value},render:function(){return this.$el.html(this.value),this}});t.exports=e},4861:function(t){var e=wp.media.view.Frame,i=wp.media.view.l10n,o=jQuery,s=e.extend({className:&quot;media-frame&quot;,template:wp.template(&quot;media-frame&quot;),regions:[&quot;menu&quot;,&quot;title&quot;,&quot;content&quot;,&quot;toolbar&quot;,&quot;router&quot;],events:{&quot;click .media-frame-menu-toggle&quot;:&quot;toggleMenu&quot;},initialize:function(){e.prototype.initialize.apply(this,arguments),_.defaults(this.options,{title:i.mediaFrameDefaultTitle,modal:!0,uploader:!0}),this.$el.addClass(&quot;wp-core-ui&quot;),this.options.modal&amp;&amp;(this.modal=new wp.media.view.Modal({controller:this,title:this.options.title}),this.modal.content(this)),!wp.Uploader.limitExceeded&amp;&amp;wp.Uploader.browser.supported||(this.options.uploader=!1),this.options.uploader&amp;&amp;(this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:(this.modal||this).$el,container:this.$el}}),this.views.set(&quot;.media-frame-uploader&quot;,this.uploader)),this.on(&quot;attach&quot;,_.bind(this.views.ready,this.views),this),this.on(&quot;title:create:default&quot;,this.createTitle,this),this.title.mode(&quot;default&quot;),this.on(&quot;menu:create:default&quot;,this.createMenu,this),this.on(&quot;open&quot;,this.setMenuTabPanelAriaAttributes,this),this.on(&quot;open&quot;,this.setRouterTabPanelAriaAttributes,this),this.on(&quot;content:render&quot;,this.setMenuTabPanelAriaAttributes,this),this.on(&quot;content:render&quot;,this.setRouterTabPanelAriaAttributes,this)},setMenuTabPanelAriaAttributes:function(){var t=this.state().get(&quot;id&quot;),e=this.$el.find(&quot;.media-frame-tab-panel&quot;);e.removeAttr(&quot;role aria-labelledby tabindex&quot;),this.state().get(&quot;menu&quot;)&amp;&amp;this.menuView&amp;&amp;this.menuView.isVisible&amp;&amp;e.attr({role:&quot;tabpanel&quot;,&quot;aria-labelledby&quot;:&quot;menu-item-&quot;+t,tabIndex:&quot;0&quot;})},setRouterTabPanelAriaAttributes:function(){var t,e=this.$el.find(&quot;.media-frame-content&quot;);e.removeAttr(&quot;role aria-labelledby tabindex&quot;),this.state().get(&quot;router&quot;)&amp;&amp;this.routerView&amp;&amp;this.routerView.isVisible&amp;&amp;this.content._mode&amp;&amp;(t=&quot;menu-item-&quot;+this.content._mode,e.attr({role:&quot;tabpanel&quot;,&quot;aria-labelledby&quot;:t,tabIndex:&quot;0&quot;}))},render:function(){return!this.state()&amp;&amp;this.options.state&amp;&amp;this.setState(this.options.state),e.prototype.render.apply(this,arguments)},createTitle:function(t){t.view=new wp.media.View({controller:this,tagName:&quot;h1&quot;})},createMenu:function(t){t.view=new wp.media.view.Menu({controller:this,attributes:{role:&quot;tablist&quot;,&quot;aria-orientation&quot;:&quot;vertical&quot;}}),this.menuView=t.view},toggleMenu:function(t){var e=this.$el.find(&quot;.media-menu&quot;);e.toggleClass(&quot;visible&quot;),o(t.target).attr(&quot;aria-expanded&quot;,e.hasClass(&quot;visible&quot;))},createToolbar:function(t){t.view=new wp.media.view.Toolbar({controller:this})},createRouter:function(t){t.view=new wp.media.view.Router({controller:this,attributes:{role:&quot;tablist&quot;,&quot;aria-orientation&quot;:&quot;horizontal&quot;}}),this.routerView=t.view},createIframeStates:function(i){var t=wp.media.view.settings,e=t.tabs,s=t.tabUrl;e&amp;&amp;s&amp;&amp;((t=o(&quot;#post_ID&quot;)).length&amp;&amp;(s+=&quot;&amp;post_id=&quot;+t.val()),_.each(e,function(t,e){this.state(&quot;iframe:&quot;+e).set(_.defaults({tab:e,src:s+&quot;&amp;tab=&quot;+e,title:t,content:&quot;iframe&quot;,menu:&quot;default&quot;},i))},this),this.on(&quot;content:create:iframe&quot;,this.iframeContent,this),this.on(&quot;content:deactivate:iframe&quot;,this.iframeContentCleanup,this),this.on(&quot;menu:render:default&quot;,this.iframeMenu,this),this.on(&quot;open&quot;,this.hijackThickbox,this),this.on(&quot;close&quot;,this.restoreThickbox,this))},iframeContent:function(t){this.$el.addClass(&quot;hide-toolbar&quot;),t.view=new wp.media.view.Iframe({controller:this})},iframeContentCleanup:function(){this.$el.removeClass(&quot;hide-toolbar&quot;)},iframeMenu:function(t){var i={};t&amp;&amp;(_.each(wp.media.view.settings.tabs,function(t,e){i[&quot;iframe:&quot;+e]={text:this.state(&quot;iframe:&quot;+e).get(&quot;title&quot;),priority:200}},this),t.set(i))},hijackThickbox:function(){var t=this;window.tb_remove&amp;&amp;!this._tb_remove&amp;&amp;(this._tb_remove=window.tb_remove,window.tb_remove=function(){t.close(),t.reset(),t.setState(t.options.state),t._tb_remove.call(window)})},restoreThickbox:function(){this._tb_remove&amp;&amp;(window.tb_remove=this._tb_remove,delete this._tb_remove)}});_.each([&quot;open&quot;,&quot;close&quot;,&quot;attach&quot;,&quot;detach&quot;,&quot;escape&quot;],function(t){s.prototype[t]=function(){return this.modal&amp;&amp;this.modal[t].apply(this.modal,arguments),this}}),t.exports=s},917:function(t){var e=wp.media.View.extend({tagName:&quot;button&quot;,className:&quot;media-menu-item&quot;,attributes:{type:&quot;button&quot;,role:&quot;tab&quot;},events:{click:&quot;_click&quot;},_click:function(){var t=this.options.click;t?t.call(this):this.click()},click:function(){var t=this.options.state;t&amp;&amp;(this.controller.setState(t),this.views.parent.$el.removeClass(&quot;visible&quot;))},render:function(){var t=this.options,e=t.state||t.contentMode;return t.text?this.$el.text(t.text):t.html&amp;&amp;this.$el.html(t.html),this.$el.attr(&quot;id&quot;,&quot;menu-item-&quot;+e),this}});t.exports=e},2596:function(t){var e=wp.media.view.MenuItem,i=wp.media.view.PriorityList,e=i.extend({tagName:&quot;div&quot;,className:&quot;media-menu&quot;,property:&quot;state&quot;,ItemView:e,region:&quot;menu&quot;,attributes:{role:&quot;tablist&quot;,&quot;aria-orientation&quot;:&quot;horizontal&quot;},initialize:function(){this._views={},this.set(_.extend({},this._views,this.options.views),{silent:!0}),delete this.options.views,this.options.silent||this.render(),this.focusManager=new wp.media.view.FocusManager({el:this.el,mode:&quot;tabsNavigation&quot;}),this.isVisible=!0},toView:function(t,e){return(t=t||{})[this.property]=t[this.property]||e,new this.ItemView(t).render()},ready:function(){i.prototype.ready.apply(this,arguments),this.visibility(),this.focusManager.setupAriaTabs()},set:function(){i.prototype.set.apply(this,arguments),this.visibility()},unset:function(){i.prototype.unset.apply(this,arguments),this.visibility()},visibility:function(){var t=this.region,e=this.controller[t].get(),i=this.views.get(),i=!i||i.lengths)return o=e,!0}),this._views[t]=e,this.views.add(e,{at:_.isNumber(o)?o:i.length||0})),this},get:function(t){return this._views[t]},unset:function(t){var e=this.get(t);return e&amp;&amp;e.remove(),delete this._views[t],this},toView:function(t){return new wp.media.View(t)}});t.exports=e},9484:function(t){var e=wp.media.view.MenuItem.extend({click:function(){var t=this.options.contentMode;t&amp;&amp;this.controller.content.mode(t)}});t.exports=e},1562:function(t){var e=wp.media.view.Menu,i=e.extend({tagName:"div",className:"media-router",property:"contentMode",ItemView:wp.media.view.RouterItem,region:"router",attributes:{role:"tablist","aria-orientation":"horizontal"},initialize:function(){this.controller.on("content:render",this.update,this),e.prototype.initialize.apply(this,arguments)},update:function(){var t=this.controller.content.mode();t&amp;&amp;this.select(t)}});t.exports=i},4556:function(t){var e=wp.media.View.extend({tagName:"input",className:"search",id:"media-search-input",attributes:{type:"search"},events:{input:"search"},render:function(){return this.el.value=this.model.escape("search"),this},search:_.debounce(function(t){t=t.target.value.trim();t&amp;&amp;1&lt;t.length?this.model.set(&quot;search&quot;,t):this.model.unset(&quot;search&quot;)},500)});t.exports=e},6191:function(t){var i=wp.i18n._n,s=wp.i18n.sprintf,e=wp.media.View.extend({tagName:&quot;div&quot;,className:&quot;media-selection&quot;,template:wp.template(&quot;media-selection&quot;),events:{&quot;click .edit-selection&quot;:&quot;edit&quot;,&quot;click .clear-selection&quot;:&quot;clear&quot;},initialize:function(){_.defaults(this.options,{editable:!1,clearable:!0}),this.attachments=new wp.media.view.Attachments.Selection({controller:this.controller,collection:this.collection,selection:this.collection,model:new Backbone.Model}),this.views.set(&quot;.selection-view&quot;,this.attachments),this.collection.on(&quot;add remove reset&quot;,this.refresh,this),this.controller.on(&quot;content:activate&quot;,this.refresh,this)},ready:function(){this.refresh()},refresh:function(){var t,e;this.$el.children().length&amp;&amp;(t=this.collection,e=&quot;edit-selection&quot;===this.controller.content.mode(),this.$el.toggleClass(&quot;empty&quot;,!t.length),this.$el.toggleClass(&quot;one&quot;,1===t.length),this.$el.toggleClass(&quot;editing&quot;,e),this.$(&quot;.count&quot;).text(s(i(&quot;%s item selected&quot;,&quot;%s items selected&quot;,t.length),t.length)))},edit:function(t){t.preventDefault(),this.options.editable&amp;&amp;this.options.editable.call(this,this.collection)},clear:function(t){t.preventDefault(),this.collection.reset(),this.controller.modal.focusManager.focus()}});t.exports=e},859:function(t){var e=wp.media.View,s=Backbone.$,i=e.extend({events:{&quot;click button&quot;:&quot;updateHandler&quot;,&quot;change input&quot;:&quot;updateHandler&quot;,&quot;change select&quot;:&quot;updateHandler&quot;,&quot;change textarea&quot;:&quot;updateHandler&quot;},initialize:function(){this.model=this.model||new Backbone.Model,this.listenTo(this.model,&quot;change&quot;,this.updateChanges)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},render:function(){return e.prototype.render.apply(this,arguments),_(this.model.attributes).chain().keys().each(this.update,this),this},update:function(t){var e,i=this.model.get(t),s=this.$(&#039;[data-setting=&quot;&#039;+t+&#039;&quot;]&#039;);s.length&amp;&amp;(s.is(&quot;select&quot;)?(e=s.find(&#039;[value=&quot;&#039;+i+&#039;&quot;]&#039;)).length?(s.find(&quot;option&quot;).prop(&quot;selected&quot;,!1),e.prop(&quot;selected&quot;,!0)):this.model.set(t,s.find(&quot;:selected&quot;).val()):s.hasClass(&quot;button-group&quot;)?s.find(&quot;button&quot;).removeClass(&quot;active&quot;).attr(&quot;aria-pressed&quot;,&quot;false&quot;).filter(&#039;[value=&quot;&#039;+i+&#039;&quot;]&#039;).addClass(&quot;active&quot;).attr(&quot;aria-pressed&quot;,&quot;true&quot;):s.is(&#039;input[type=&quot;text&quot;], textarea&#039;)?s.is(&quot;:focus&quot;)||s.val(i):s.is(&#039;input[type=&quot;checkbox&quot;]&#039;)&amp;&amp;s.prop(&quot;checked&quot;,!!i&amp;&amp;&quot;false&quot;!==i))},updateHandler:function(t){var e=s(t.target).closest(&quot;[data-setting]&quot;),i=t.target.value;t.preventDefault(),e.length&amp;&amp;(e.is(&#039;input[type=&quot;checkbox&quot;]&#039;)&amp;&amp;(i=e[0].checked),this.model.set(e.data(&quot;setting&quot;),i),(t=e.data(&quot;userSetting&quot;))&amp;&amp;window.setUserSetting(t,i))},updateChanges:function(t){t.hasChanged()&amp;&amp;_(t.changed).chain().keys().each(this.update,this)}});t.exports=i},2176:function(t){var e=wp.media.view.Settings,i=e.extend({className:&quot;attachment-display-settings&quot;,template:wp.template(&quot;attachment-display-settings&quot;),initialize:function(){var t=this.options.attachment;_.defaults(this.options,{userSettings:!1}),e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,&quot;change:link&quot;,this.updateLinkTo),t&amp;&amp;t.on(&quot;change:uploading&quot;,this.render,this)},dispose:function(){var t=this.options.attachment;t&amp;&amp;t.off(null,null,this),e.prototype.dispose.apply(this,arguments)},render:function(){var t=this.options.attachment;return t&amp;&amp;_.extend(this.options,{sizes:t.get(&quot;sizes&quot;),type:t.get(&quot;type&quot;)}),e.prototype.render.call(this),this.updateLinkTo(),this},updateLinkTo:function(){var t=this.model.get(&quot;link&quot;),e=this.$(&quot;.link-to-custom&quot;),i=this.options.attachment;&quot;none&quot;===t||&quot;embed&quot;===t||!i&amp;&amp;&quot;custom&quot;!==t?e.closest(&quot;.setting&quot;).addClass(&quot;hidden&quot;):(i&amp;&amp;(&quot;post&quot;===t?e.val(i.get(&quot;link&quot;)):&quot;file&quot;===t?e.val(i.get(&quot;url&quot;)):this.model.get(&quot;linkUrl&quot;)||e.val(&quot;http://&quot;),e.prop(&quot;readonly&quot;,&quot;custom&quot;!==t)),e.closest(&quot;.setting&quot;).removeClass(&quot;hidden&quot;),e.length&amp;&amp;e[0].scrollIntoView())}});t.exports=i},6872:function(t){var e=wp.media.view.Settings.extend({className:&quot;collection-settings gallery-settings&quot;,template:wp.template(&quot;gallery-settings&quot;)});t.exports=e},8488:function(t){var e=wp.media.view.Settings.extend({className:&quot;collection-settings playlist-settings&quot;,template:wp.template(&quot;playlist-settings&quot;)});t.exports=e},9799:function(t){var e=wp.media.view.PriorityList.extend({className:&quot;media-sidebar&quot;});t.exports=e},5187:function(t){var e=wp.media.view,i=e.Cropper.extend({className:&quot;crop-content site-icon&quot;,ready:function(){e.Cropper.prototype.ready.apply(this,arguments),this.$(&quot;.crop-image&quot;).on(&quot;load&quot;,_.bind(this.addSidebar,this))},addSidebar:function(){this.sidebar=new wp.media.view.Sidebar({controller:this.controller}),this.sidebar.set(&quot;preview&quot;,new wp.media.view.SiteIconPreview({controller:this.controller,attachment:this.options.attachment})),this.controller.cropperView.views.add(this.sidebar)}});t.exports=i},8260:function(t){var e=wp.media.View,a=jQuery,e=e.extend({className:&quot;site-icon-preview&quot;,template:wp.template(&quot;site-icon-preview&quot;),ready:function(){this.controller.imgSelect.setOptions({onInit:this.updatePreview,onSelectChange:this.updatePreview})},prepare:function(){return{url:this.options.attachment.get(&quot;url&quot;)}},updatePreview:function(t,e){var i=64/e.width,s=64/e.height,o=16/e.width,n=16/e.height;a(&quot;#preview-app-icon&quot;).css({width:Math.round(i*this.imageWidth)+&quot;px&quot;,height:Math.round(s*this.imageHeight)+&quot;px&quot;,marginLeft:&quot;-&quot;+Math.round(i*e.x1)+&quot;px&quot;,marginTop:&quot;-&quot;+Math.round(s*e.y1)+&quot;px&quot;}),a(&quot;#preview-favicon&quot;).css({width:Math.round(o*this.imageWidth)+&quot;px&quot;,height:Math.round(n*this.imageHeight)+&quot;px&quot;,marginLeft:&quot;-&quot;+Math.round(o*e.x1)+&quot;px&quot;,marginTop:&quot;-&quot;+Math.floor(n*e.y1)+&quot;px&quot;})}});t.exports=e},2234:function(t){var e=wp.media.View.extend({tagName:&quot;span&quot;,className:&quot;spinner&quot;,spinnerTimeout:!1,delay:400,show:function(){return this.spinnerTimeout||(this.spinnerTimeout=_.delay(function(t){t.addClass(&quot;is-active&quot;)},this.delay,this.$el)),this},hide:function(){return this.$el.removeClass(&quot;is-active&quot;),this.spinnerTimeout=clearTimeout(this.spinnerTimeout),this}});t.exports=e},9510:function(t){var e=wp.media.View,i=e.extend({tagName:&quot;div&quot;,className:&quot;media-toolbar&quot;,initialize:function(){var t=this.controller.state(),e=this.selection=t.get(&quot;selection&quot;),t=this.library=t.get(&quot;library&quot;);this._views={},this.primary=new wp.media.view.PriorityList,this.secondary=new wp.media.view.PriorityList,this.primary.$el.addClass(&quot;media-toolbar-primary search-form&quot;),this.secondary.$el.addClass(&quot;media-toolbar-secondary&quot;),this.views.set([this.secondary,this.primary]),this.options.items&amp;&amp;this.set(this.options.items,{silent:!0}),this.options.silent||this.render(),e&amp;&amp;e.on(&quot;add remove reset&quot;,this.refresh,this),t&amp;&amp;t.on(&quot;add remove reset&quot;,this.refresh,this)},dispose:function(){return this.selection&amp;&amp;this.selection.off(null,null,this),this.library&amp;&amp;this.library.off(null,null,this),e.prototype.dispose.apply(this,arguments)},ready:function(){this.refresh()},set:function(t,e,i){return i=i||{},_.isObject(t)?_.each(t,function(t,e){this.set(e,t,{silent:!0})},this):(e instanceof Backbone.View||(e.classes=[&quot;media-button-&quot;+t].concat(e.classes||[]),e=new wp.media.view.Button(e).render()),e.controller=e.controller||this.controller,this._views[t]=e,this[e.options.priority&lt;0?&quot;secondary&quot;:&quot;primary&quot;].set(t,e,i)),i.silent||this.refresh(),this},get:function(t){return this._views[t]},unset:function(t,e){return delete this._views[t],this.primary.unset(t,e),this.secondary.unset(t,e),e&amp;&amp;e.silent||this.refresh(),this},refresh:function(){var t=this.controller.state(),s=t.get(&quot;library&quot;),o=t.get(&quot;selection&quot;);_.each(this._views,function(t){var e,i;t.model&amp;&amp;t.options&amp;&amp;t.options.requires&amp;&amp;(e=t.options.requires,i=!1,o&amp;&amp;o.models&amp;&amp;(i=_.some(o.models,function(t){return!0===t.get(&quot;uploading&quot;)})),(e.selection&amp;&amp;o&amp;&amp;!o.length||e.library&amp;&amp;s&amp;&amp;!s.length)&amp;&amp;(i=!0),t.model.set(&quot;disabled&quot;,i))})}});t.exports=i},7128:function(t){var e=wp.media.view.Toolbar.Select,i=wp.media.view.l10n,s=e.extend({initialize:function(){_.defaults(this.options,{text:i.insertIntoPost,requires:!1}),e.prototype.initialize.apply(this,arguments)},refresh:function(){var t=this.controller.state().props.get(&quot;url&quot;);this.get(&quot;select&quot;).model.set(&quot;disabled&quot;,!t||&quot;http://&quot;===t),e.prototype.refresh.apply(this,arguments)}});t.exports=s},6850:function(t){var e=wp.media.view.Toolbar,i=wp.media.view.l10n,s=e.extend({initialize:function(){var t=this.options;_.bindAll(this,&quot;clickSelect&quot;),_.defaults(t,{event:&quot;select&quot;,state:!1,reset:!0,close:!0,text:i.select,requires:{selection:!0}}),t.items=_.defaults(t.items||{},{select:{style:&quot;primary&quot;,text:t.text,priority:80,click:this.clickSelect,requires:t.requires}}),e.prototype.initialize.apply(this,arguments)},clickSelect:function(){var t=this.options,e=this.controller;t.close&amp;&amp;e.close(),t.event&amp;&amp;e.state().trigger(t.event),t.state&amp;&amp;e.setState(t.state),t.reset&amp;&amp;e.reset()}});t.exports=s},841:function(t){var e=wp.media.View,i=wp.media.view.l10n,s=jQuery,o=e.extend({tagName:&quot;div&quot;,className:&quot;uploader-editor&quot;,template:wp.template(&quot;uploader-editor&quot;),localDrag:!1,overContainer:!1,overDropzone:!1,draggingFile:null,initialize:function(){return this.initialized=!1,window.tinyMCEPreInit&amp;&amp;window.tinyMCEPreInit.dragDropUpload&amp;&amp;this.browserSupport()&amp;&amp;(this.$document=s(document),this.dropzones=[],this.files=[],this.$document.on(&quot;drop&quot;,&quot;.uploader-editor&quot;,_.bind(this.drop,this)),this.$document.on(&quot;dragover&quot;,&quot;.uploader-editor&quot;,_.bind(this.dropzoneDragover,this)),this.$document.on(&quot;dragleave&quot;,&quot;.uploader-editor&quot;,_.bind(this.dropzoneDragleave,this)),this.$document.on(&quot;click&quot;,&quot;.uploader-editor&quot;,_.bind(this.click,this)),this.$document.on(&quot;dragover&quot;,_.bind(this.containerDragover,this)),this.$document.on(&quot;dragleave&quot;,_.bind(this.containerDragleave,this)),this.$document.on(&quot;dragstart dragend drop&quot;,_.bind(function(t){this.localDrag=&quot;dragstart&quot;===t.type,&quot;drop&quot;===t.type&amp;&amp;this.containerDragleave()},this)),this.initialized=!0),this},browserSupport:function(){var t=document.createElement(&quot;div&quot;);return(&quot;draggable&quot;in t||&quot;ondragstart&quot;in t&amp;&amp;&quot;ondrop&quot;in t)&amp;&amp;!!(window.File&amp;&amp;window.FileList&amp;&amp;window.FileReader)},isDraggingFile:function(t){return null!==this.draggingFile?this.draggingFile:!_.isUndefined(t.originalEvent)&amp;&amp;!_.isUndefined(t.originalEvent.dataTransfer)&amp;&amp;(this.draggingFile=-1&lt;_.indexOf(t.originalEvent.dataTransfer.types,&quot;Files&quot;)&amp;&amp;-1===_.indexOf(t.originalEvent.dataTransfer.types,&quot;text/plain&quot;),this.draggingFile)},refresh:function(t){for(var e in this.dropzones)this.dropzones[e].toggle(this.overContainer||this.overDropzone);return _.isUndefined(t)||s(t.target).closest(&quot;.uploader-editor&quot;).toggleClass(&quot;droppable&quot;,this.overDropzone),this.overContainer||this.overDropzone||(this.draggingFile=null),this},render:function(){return this.initialized&amp;&amp;(e.prototype.render.apply(this,arguments),s(&quot;.wp-editor-wrap&quot;).each(_.bind(this.attach,this))),this},attach:function(t,e){var i=this.$el.clone();return this.dropzones.push(i),s(e).append(i),this},drop:function(t){if(this.containerDragleave(t),this.dropzoneDragleave(t),this.files=t.originalEvent.dataTransfer.files,!(this.files.length&lt;1))return 0&lt;(t=s(t.target).parents(&quot;.wp-editor-wrap&quot;)).length&amp;&amp;t[0].id&amp;&amp;(window.wpActiveEditor=t[0].id.slice(3,-5)),this.workflow?(this.workflow.state().reset(),this.addFiles.apply(this),this.workflow.open()):(this.workflow=wp.media.editor.open(window.wpActiveEditor,{frame:&quot;post&quot;,state:&quot;insert&quot;,title:i.addMedia,multiple:!0}),(t=this.workflow.uploader).uploader&amp;&amp;t.uploader.ready?this.addFiles.apply(this):this.workflow.on(&quot;uploader:ready&quot;,this.addFiles,this)),!1},addFiles:function(){return this.files.length&amp;&amp;(this.workflow.uploader.uploader.uploader.addFile(_.toArray(this.files)),this.files=[]),this},containerDragover:function(t){!this.localDrag&amp;&amp;this.isDraggingFile(t)&amp;&amp;(this.overContainer=!0,this.refresh())},containerDragleave:function(){this.overContainer=!1,_.delay(_.bind(this.refresh,this),50)},dropzoneDragover:function(t){if(!this.localDrag&amp;&amp;this.isDraggingFile(t))return this.overDropzone=!0,this.refresh(t),!1},dropzoneDragleave:function(t){this.overDropzone=!1,_.delay(_.bind(this.refresh,this,t),50)},click:function(t){this.containerDragleave(t),this.dropzoneDragleave(t),this.localDrag=!1}});t.exports=o},6353:function(t){var e=wp.media.View,i=e.extend({tagName:&quot;div&quot;,className:&quot;uploader-inline&quot;,template:wp.template(&quot;uploader-inline&quot;),events:{&quot;click .close&quot;:&quot;hide&quot;},initialize:function(){_.defaults(this.options,{message:&quot;&quot;,status:!0,canClose:!1}),!this.options.$browser&amp;&amp;this.controller.uploader&amp;&amp;(this.options.$browser=this.controller.uploader.$browser),_.isUndefined(this.options.postId)&amp;&amp;(this.options.postId=wp.media.view.settings.post.id),this.options.status&amp;&amp;this.views.set(&quot;.upload-inline-status&quot;,new wp.media.view.UploaderStatus({controller:this.controller}))},prepare:function(){var t=this.controller.state().get(&quot;suggestedWidth&quot;),e=this.controller.state().get(&quot;suggestedHeight&quot;),i={};return i.message=this.options.message,i.canClose=this.options.canClose,t&amp;&amp;e&amp;&amp;(i.suggestedWidth=t,i.suggestedHeight=e),i},dispose:function(){return this.disposing?e.prototype.dispose.apply(this,arguments):(this.disposing=!0,this.remove())},remove:function(){var t=e.prototype.remove.apply(this,arguments);return _.defer(_.bind(this.refresh,this)),t},refresh:function(){var t=this.controller.uploader;t&amp;&amp;t.refresh()},ready:function(){var t,e=this.options.$browser;if(this.controller.uploader){if((t=this.$(&quot;.browser&quot;))[0]===e[0])return;e.detach().text(t.text()),e[0].className=t[0].className,e[0].setAttribute(&quot;aria-labelledby&quot;,e[0].id+&quot; &quot;+t[0].getAttribute(&quot;aria-labelledby&quot;)),t.replaceWith(e.show())}return this.refresh(),this},show:function(){this.$el.removeClass(&quot;hidden&quot;),this.controller.$uploaderToggler&amp;&amp;this.controller.$uploaderToggler.length&amp;&amp;this.controller.$uploaderToggler.attr(&quot;aria-expanded&quot;,&quot;true&quot;)},hide:function(){this.$el.addClass(&quot;hidden&quot;),this.controller.$uploaderToggler&amp;&amp;this.controller.$uploaderToggler.length&amp;&amp;this.controller.$uploaderToggler.attr(&quot;aria-expanded&quot;,&quot;false&quot;).trigger(&quot;focus&quot;)}});t.exports=i},9411:function(t){var e=wp.media.View.extend({className:&quot;upload-error&quot;,template:wp.template(&quot;uploader-status-error&quot;)});t.exports=e},2894:function(t){var e=wp.media.View,i=e.extend({className:&quot;media-uploader-status&quot;,template:wp.template(&quot;uploader-status&quot;),events:{&quot;click .upload-dismiss-errors&quot;:&quot;dismiss&quot;},initialize:function(){this.queue=wp.Uploader.queue,this.queue.on(&quot;add remove reset&quot;,this.visibility,this),this.queue.on(&quot;add remove reset change:percent&quot;,this.progress,this),this.queue.on(&quot;add remove reset change:uploading&quot;,this.info,this),this.errors=wp.Uploader.errors,this.errors.reset(),this.errors.on(&quot;add remove reset&quot;,this.visibility,this),this.errors.on(&quot;add&quot;,this.error,this)},dispose:function(){return wp.Uploader.queue.off(null,null,this),e.prototype.dispose.apply(this,arguments),this},visibility:function(){this.$el.toggleClass(&quot;uploading&quot;,!!this.queue.length),this.$el.toggleClass(&quot;errors&quot;,!!this.errors.length),this.$el.toggle(!!this.queue.length||!!this.errors.length)},ready:function(){_.each({$bar:&quot;.media-progress-bar div&quot;,$index:&quot;.upload-index&quot;,$total:&quot;.upload-total&quot;,$filename:&quot;.upload-filename&quot;},function(t,e){this[e]=this.$(t)},this),this.visibility(),this.progress(),this.info()},progress:function(){var t=this.queue,e=this.$bar;e&amp;&amp;t.length&amp;&amp;e.width(t.reduce(function(t,e){if(!e.get(&quot;uploading&quot;))return t+100;e=e.get(&quot;percent&quot;);return t+(_.isNumber(e)?e:100)},0)/t.length+&quot;%&quot;)},info:function(){var t,e=this.queue,i=0;e.length&amp;&amp;(t=this.queue.find(function(t,e){return i=e,t.get(&quot;uploading&quot;)}),this.$index&amp;&amp;this.$total&amp;&amp;this.$filename&amp;&amp;(this.$index.text(i+1),this.$total.text(e.length),this.$filename.html(t?this.filename(t.get(&quot;filename&quot;)):&quot;&quot;)))},filename:function(t){return _.escape(t)},error:function(t){var e=new wp.media.view.UploaderStatusError({filename:this.filename(t.get(&quot;file&quot;).name),message:t.get(&quot;message&quot;)}),i=this.$el.find(&quot;button&quot;);this.views.add(&quot;.upload-errors&quot;,e,{at:0}),_.delay(function(){i.trigger(&quot;focus&quot;),wp.a11y.speak(t.get(&quot;message&quot;),&quot;assertive&quot;)},1e3)},dismiss:function(){var t=this.views.get(&quot;.upload-errors&quot;);t&amp;&amp;_.invoke(t,&quot;remove&quot;),wp.Uploader.errors.reset(),this.controller.modal&amp;&amp;this.controller.modal.focusManager.focus()}});t.exports=i},5823:function(t){var e=jQuery,i=wp.media.View.extend({tagName:&quot;div&quot;,className:&quot;uploader-window&quot;,template:wp.template(&quot;uploader-window&quot;),initialize:function(){var t;this.$browser=e(&#039;<button type="button" class="browser" />').hide().appendTo("body"),!(t=this.options.uploader=_.defaults(this.options.uploader||{},{dropzone:this.$el,browser:this.$browser,params:{}})).dropzone||t.dropzone instanceof e||(t.dropzone=e(t.dropzone)),this.controller.on("activate",this.refresh,this),this.controller.on("detach",function(){this.$browser.remove()},this)},refresh:function(){this.uploader&amp;&amp;this.uploader.refresh()},ready:function(){var t=wp.media.view.settings.post.id;this.uploader||(t&amp;&amp;(this.options.uploader.params.post_id=t),this.uploader=new wp.Uploader(this.options.uploader),(t=this.uploader.dropzone).on("dropzone:enter",_.bind(this.show,this)),t.on("dropzone:leave",_.bind(this.hide,this)),e(this.uploader).on("uploader:ready",_.bind(this._ready,this)))},_ready:function(){this.controller.trigger("uploader:ready")},show:function(){var t=this.$el.show();_.defer(function(){t.css({opacity:1})})},hide:function(){var t=this.$el.css({opacity:0});wp.media.transition(t).done(function(){"0"===t.css("opacity")&amp;&amp;t.hide()}),_.delay(function(){"0"===t.css("opacity")&amp;&amp;t.is(":visible")&amp;&amp;t.hide()},500)}});t.exports=i},487:function(t){var e=wp.Backbone.View.extend({constructor:function(t){t&amp;&amp;t.controller&amp;&amp;(this.controller=t.controller),wp.Backbone.View.apply(this,arguments)},dispose:function(){return this.undelegateEvents(),this.model&amp;&amp;this.model.off&amp;&amp;this.model.off(null,null,this),this.collection&amp;&amp;this.collection.off&amp;&amp;this.collection.off(null,null,this),this.controller&amp;&amp;this.controller.off&amp;&amp;this.controller.off(null,null,this),this},remove:function(){return this.dispose(),wp.Backbone.View.prototype.remove.apply(this,arguments)}});t.exports=e}},s={};function o(t){var e=s[t];if(void 0!==e)return e.exports;e=s[t]={exports:{}};return i[t](e,e.exports,o),e.exports}var e,t,n,a,r;a=wp.media,r=jQuery,a.isTouchDevice="ontouchend"in document,t=a.view.l10n=window._wpMediaViewsL10n||{},a.view.settings=t.settings||{},delete t.settings,a.model.settings.post=a.view.settings.post,r.support.transition=(e=document.documentElement.style,t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},(n=_.find(_.keys(t),function(t){return!_.isUndefined(e[t])}))&amp;&amp;{end:t[n]}),a.events=_.extend({},Backbone.Events),a.transition=function(t,e){var i=r.Deferred();return e=e||2e3,r.support.transition?((t=t instanceof r?t:r(t)).first().one(r.support.transition.end,i.resolve),_.delay(i.resolve,e)):i.resolve(),i.promise()},a.controller.Region=o(4903),a.controller.StateMachine=o(5466),a.controller.State=o(5826),a.selectionSync=o(3526),a.controller.Library=o(9024),a.controller.ImageDetails=o(3849),a.controller.GalleryEdit=o(6328),a.controller.GalleryAdd=o(7323),a.controller.CollectionEdit=o(1817),a.controller.CollectionAdd=o(1517),a.controller.FeaturedImage=o(5095),a.controller.ReplaceImage=o(8493),a.controller.EditImage=o(7658),a.controller.MediaLibrary=o(3742),a.controller.Embed=o(9067),a.controller.Cropper=o(2288),a.controller.CustomizeImageCropper=o(6934),a.controller.SiteIconCropper=o(5274),a.View=o(487),a.view.Frame=o(3647),a.view.MediaFrame=o(4861),a.view.MediaFrame.Select=o(8719),a.view.MediaFrame.Post=o(9075),a.view.MediaFrame.ImageDetails=o(9142),a.view.Modal=o(3939),a.view.FocusManager=o(6557),a.view.UploaderWindow=o(5823),a.view.EditorUploader=o(841),a.view.UploaderInline=o(6353),a.view.UploaderStatus=o(2894),a.view.UploaderStatusError=o(9411),a.view.Toolbar=o(9510),a.view.Toolbar.Select=o(6850),a.view.Toolbar.Embed=o(7128),a.view.Button=o(3157),a.view.ButtonGroup=o(4094),a.view.PriorityList=o(1993),a.view.MenuItem=o(917),a.view.Menu=o(2596),a.view.RouterItem=o(9484),a.view.Router=o(1562),a.view.Sidebar=o(9799),a.view.Attachment=o(5019),a.view.Attachment.Library=o(9254),a.view.Attachment.EditLibrary=o(4640),a.view.Attachments=o(8408),a.view.Search=o(4556),a.view.AttachmentFilters=o(4906),a.view.DateFilter=o(9663),a.view.AttachmentFilters.Uploaded=o(7040),a.view.AttachmentFilters.All=o(2868),a.view.AttachmentsBrowser=o(9239),a.view.Selection=o(6191),a.view.Attachment.Selection=o(9003),a.view.Attachments.Selection=o(1223),a.view.Attachment.EditSelection=o(1009),a.view.Settings=o(859),a.view.Settings.AttachmentDisplay=o(2176),a.view.Settings.Gallery=o(6872),a.view.Settings.Playlist=o(8488),a.view.Attachment.Details=o(7274),a.view.AttachmentCompat=o(8093),a.view.Iframe=o(6217),a.view.Embed=o(5138),a.view.Label=o(6644),a.view.EmbedUrl=o(4848),a.view.EmbedLink=o(6959),a.view.EmbedImage=o(1338),a.view.ImageDetails=o(7598),a.view.Cropper=o(7137),a.view.SiteIconCropper=o(5187),a.view.SiteIconPreview=o(8260),a.view.EditImage=o(5970),a.view.Spinner=o(2234),a.view.Heading=o(7990)}();
/*! This file is auto-generated */
!function(a,r){var i={};wp.media.coerce=function(e,t){return r.isUndefined(e[t])&amp;&amp;!r.isUndefined(this.defaults[t])?e[t]=this.defaults[t]:"true"===e[t]?e[t]=!0:"false"===e[t]&amp;&amp;(e[t]=!1),e[t]},wp.media.string={props:function(e,t){var i,n=wp.media.view.settings.defaultProps;return e=e?r.clone(e):{},t&amp;&amp;t.type&amp;&amp;(e.type=t.type),"image"===e.type&amp;&amp;(e=r.defaults(e||{},{align:n.align||getUserSetting("align","none"),size:n.size||getUserSetting("imgsize","medium"),url:"",classes:[]})),t&amp;&amp;(e.title=e.title||t.title,"file"===(n=e.link||n.link||getUserSetting("urlbutton","file"))||"embed"===n?i=t.url:"post"===n?i=t.link:"custom"===n&amp;&amp;(i=e.linkUrl),e.linkUrl=i||"","image"===t.type?(e.classes.push("wp-image-"+t.id),i=(n=t.sizes)&amp;&amp;n[e.size]?n[e.size]:t,r.extend(e,r.pick(t,"align","caption","alt"),{width:i.width,height:i.height,src:i.url,captionId:"attachment_"+t.id})):"video"===t.type||"audio"===t.type?r.extend(e,r.pick(t,"title","type","icon","mime")):(e.title=e.title||t.filename,e.rel=e.rel||"attachment wp-att-"+t.id)),e},link:function(e,t){t={tag:"a",content:(e=wp.media.string.props(e,t)).title,attrs:{href:e.linkUrl}};return e.rel&amp;&amp;(t.attrs.rel=e.rel),wp.html.string(t)},audio:function(e,t){return wp.media.string._audioVideo("audio",e,t)},video:function(e,t){return wp.media.string._audioVideo("video",e,t)},_audioVideo:function(e,t,i){var n,a;return"embed"!==(t=wp.media.string.props(t,i)).link?wp.media.string.link(t):(n={},"video"===e&amp;&amp;(i.image&amp;&amp;-1===i.image.src.indexOf(i.icon)&amp;&amp;(n.poster=i.image.src),i.width&amp;&amp;(n.width=i.width),i.height&amp;&amp;(n.height=i.height)),a=i.filename.split(".").pop(),r.contains(wp.media.view.settings.embedExts,a)?(n[a]=i.url,wp.shortcode.string({tag:e,attrs:n})):wp.media.string.link(t))},image:function(e,t){var i,n={};return e.type="image",i=(e=wp.media.string.props(e,t)).classes||[],n.src=(r.isUndefined(t)?e:t).url,r.extend(n,r.pick(e,"width","height","alt")),e.align&amp;&amp;!e.caption&amp;&amp;i.push("align"+e.align),e.size&amp;&amp;i.push("size-"+e.size),n.class=r.compact(i).join(" "),t={tag:"img",attrs:n,single:!0},e.linkUrl&amp;&amp;(t={tag:"a",attrs:{href:e.linkUrl},content:t}),i=wp.html.string(t),e.caption&amp;&amp;(t={},n.width&amp;&amp;(t.width=n.width),e.captionId&amp;&amp;(t.id=e.captionId),e.align&amp;&amp;(t.align="align"+e.align),i=wp.shortcode.string({tag:"caption",attrs:t,content:i+" "+e.caption})),i}},wp.media.embed={coerce:wp.media.coerce,defaults:{url:"",width:"",height:""},edit:function(e,t){var i={};return t?i.url=e.replace(/]+&gt;/g,""):(t=wp.shortcode.next("embed",e).shortcode,i=r.defaults(t.attrs.named,this.defaults),t.content&amp;&amp;(i.url=t.content)),wp.media({frame:"post",state:"embed",metadata:i})},shortcode:function(i){var e,n=this;return r.each(this.defaults,function(e,t){i[t]=n.coerce(i,t),e===i[t]&amp;&amp;delete i[t]}),e=i.url,delete i.url,new wp.shortcode({tag:"embed",attrs:i,content:e})}},wp.media.collection=function(e){var d={};return r.extend({coerce:wp.media.coerce,attachments:function(e){var i,t=e.string(),n=d[t],a=this;return delete d[t],n||(t=r.defaults(e.attrs.named,this.defaults),(n=r.pick(t,"orderby","order")).type=this.type,n.perPage=-1,void 0!==t.orderby&amp;&amp;(t._orderByField=t.orderby),"rand"===t.orderby&amp;&amp;(t._orderbyRandom=!0),t.orderby&amp;&amp;!/^menu_order(?: ID)?$/i.test(t.orderby)||(n.orderby="menuOrder"),t.ids?(n.post__in=t.ids.split(","),n.orderby="post__in"):t.include&amp;&amp;(n.post__in=t.include.split(",")),t.exclude&amp;&amp;(n.post__not_in=t.exclude.split(",")),n.post__in||(n.uploadedTo=t.id),i=r.omit(t,"id","ids","include","exclude","orderby","order"),r.each(this.defaults,function(e,t){i[t]=a.coerce(i,t)}),(e=wp.media.query(n))[this.tag]=new Backbone.Model(i),e)},shortcode:function(e){var t=e.props.toJSON(),i=r.pick(t,"orderby","order");return e.type&amp;&amp;(i.type=e.type,delete e.type),e[this.tag]&amp;&amp;r.extend(i,e[this.tag].toJSON()),i.ids=e.pluck("id"),t.uploadedTo&amp;&amp;(i.id=t.uploadedTo),delete i.orderby,i._orderbyRandom?i.orderby="rand":i._orderByField&amp;&amp;"rand"!==i._orderByField&amp;&amp;(i.orderby=i._orderByField),delete i._orderbyRandom,delete i._orderByField,i.ids&amp;&amp;"post__in"===i.orderby&amp;&amp;delete i.orderby,i=this.setDefaults(i),i=new wp.shortcode({tag:this.tag,attrs:i,type:"single"}),(t=new wp.media.model.Attachments(e.models,{props:t}))[this.tag]=e[this.tag],d[i.string()]=t,i},edit:function(e){var t,i=wp.shortcode.next(this.tag,e),n=this.defaults.id;if(i&amp;&amp;i.content===e)return i=i.shortcode,r.isUndefined(i.get("id"))&amp;&amp;!r.isUndefined(n)&amp;&amp;i.set("id",n),e=this.attachments(i),(t=new wp.media.model.Selection(e.models,{props:e.props.toJSON(),multiple:!0}))[this.tag]=e[this.tag],t.more().done(function(){t.props.set({query:!1}),t.unmirror(),t.props.unset("orderby")}),this.frame&amp;&amp;this.frame.dispose(),n=i.attrs.named.type&amp;&amp;"video"===i.attrs.named.type?"video-"+this.tag+"-edit":this.tag+"-edit",this.frame=wp.media({frame:"post",state:n,title:this.editTitle,editing:!0,multiple:!0,selection:t}).open(),this.frame},setDefaults:function(i){var n=this;return r.each(this.defaults,function(e,t){i[t]=n.coerce(i,t),e===i[t]&amp;&amp;delete i[t]}),i}},e)},wp.media._galleryDefaults={itemtag:"dl",icontag:"dt",captiontag:"dd",columns:"3",link:"post",size:"thumbnail",order:"ASC",id:wp.media.view.settings.post&amp;&amp;wp.media.view.settings.post.id,orderby:"menu_order ID"},wp.media.view.settings.galleryDefaults?wp.media.galleryDefaults=r.extend({},wp.media._galleryDefaults,wp.media.view.settings.galleryDefaults):wp.media.galleryDefaults=wp.media._galleryDefaults,wp.media.gallery=new wp.media.collection({tag:"gallery",type:"image",editTitle:wp.media.view.l10n.editGalleryTitle,defaults:wp.media.galleryDefaults,setDefaults:function(i){var n=this,a=!r.isEqual(wp.media.galleryDefaults,wp.media._galleryDefaults);return r.each(this.defaults,function(e,t){i[t]=n.coerce(i,t),e!==i[t]||a&amp;&amp;e!==wp.media._galleryDefaults[t]||delete i[t]}),i}}),wp.media.featuredImage={get:function(){return wp.media.view.settings.post.featuredImageId},set:function(e){var t=wp.media.view.settings;t.post.featuredImageId=e,wp.media.post("get-post-thumbnail-html",{post_id:t.post.id,thumbnail_id:t.post.featuredImageId,_wpnonce:t.post.nonce}).done(function(e){"0"===e?window.alert(wp.i18n.__("Could not set that as the thumbnail image. Try a different attachment.")):a(".inside","#postimagediv").html(e)})},remove:function(){wp.media.featuredImage.set(-1)},frame:function(){return this._frame?wp.media.frame=this._frame:(this._frame=wp.media({state:"featured-image",states:[new wp.media.controller.FeaturedImage,new wp.media.controller.EditImage]}),this._frame.on("toolbar:create:featured-image",function(e){this.createSelectToolbar(e,{text:wp.media.view.l10n.setFeaturedImage})},this._frame),this._frame.on("content:render:edit-image",function(){var e=this.state("featured-image").get("selection"),e=new wp.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(e),e.loadEditor()},this._frame),this._frame.state("featured-image").on("select",this.select)),this._frame},select:function(){var e=this.get("selection").single();wp.media.view.settings.post.featuredImageId&amp;&amp;wp.media.featuredImage.set(e?e.id:-1)},init:function(){a("#postimagediv").on("click","#set-post-thumbnail",function(e){e.preventDefault(),e.stopPropagation(),wp.media.featuredImage.frame().open()}).on("click","#remove-post-thumbnail",function(){return wp.media.featuredImage.remove(),!1})}},a(wp.media.featuredImage.init),wp.media.editor={insert:function(e){var t,i=!r.isUndefined(window.tinymce),n=!r.isUndefined(window.QTags),a=this.activeEditor?window.wpActiveEditor=this.activeEditor:window.wpActiveEditor;if(window.send_to_editor)return window.send_to_editor.apply(this,arguments);if(a)i&amp;&amp;(t=tinymce.get(a));else if(i&amp;&amp;tinymce.activeEditor)t=tinymce.activeEditor,a=window.wpActiveEditor=t.id;else if(!n)return!1;if(t&amp;&amp;!t.isHidden()?t.execCommand("mceInsertContent",!1,e):n?QTags.insertContent(e):document.getElementById(a).value+=e,window.tb_remove)try{window.tb_remove()}catch(e){}},add:function(e,t){var n=this.get(e);return n||((n=i[e]=wp.media(r.defaults(t||{},{frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0}))).on("insert",function(e){var i=n.state();(e=e||i.get("selection"))&amp;&amp;a.when.apply(a,e.map(function(e){var t=i.display(e).toJSON();return this.send.attachment(t,e.toJSON())},this)).done(function(){wp.media.editor.insert(r.toArray(arguments).join("\n\n"))})},this),n.state("gallery-edit").on("update",function(e){this.insert(wp.media.gallery.shortcode(e).string())},this),n.state("playlist-edit").on("update",function(e){this.insert(wp.media.playlist.shortcode(e).string())},this),n.state("video-playlist-edit").on("update",function(e){this.insert(wp.media.playlist.shortcode(e).string())},this),n.state("embed").on("select",function(){var e=n.state(),t=e.get("type"),e=e.props.toJSON();e.url=e.url||"","link"===t?(r.defaults(e,{linkText:e.url,linkUrl:e.url}),this.send.link(e).done(function(e){wp.media.editor.insert(e)})):"image"===t&amp;&amp;(r.defaults(e,{title:e.url,linkUrl:"",align:"none",link:"none"}),"none"===e.link?e.linkUrl="":"file"===e.link&amp;&amp;(e.linkUrl=e.url),this.insert(wp.media.string.image(e)))},this),n.state("featured-image").on("select",wp.media.featuredImage.select),n.setState(n.options.state),n)},id:function(e){return e||((e=window.wpActiveEditor)||r.isUndefined(window.tinymce)||!tinymce.activeEditor?e:tinymce.activeEditor.id)||""},get:function(e){return e=this.id(e),i[e]},remove:function(e){e=this.id(e),delete i[e]},send:{attachment:function(i,e){var n,t,a=e.caption;return wp.media.view.settings.captions||delete e.caption,i=wp.media.string.props(i,e),n={id:e.id,post_content:e.description,post_excerpt:a},i.linkUrl&amp;&amp;(n.url=i.linkUrl),"image"===e.type?(t=wp.media.string.image(i),r.each({align:"align",size:"image-size",alt:"image_alt"},function(e,t){i[t]&amp;&amp;(n[e]=i[t])})):"video"===e.type?t=wp.media.string.video(i,e):"audio"===e.type?t=wp.media.string.audio(i,e):(t=wp.media.string.link(i),n.post_title=i.title),wp.media.post("send-attachment-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,attachment:n,html:t,post_id:wp.media.view.settings.post.id})},link:function(e){return wp.media.post("send-link-to-editor",{nonce:wp.media.view.settings.nonce.sendToEditor,src:e.linkUrl,link_text:e.linkText,html:wp.media.string.link(e),post_id:wp.media.view.settings.post.id})}},open:function(e,t){var i;return t=t||{},e=this.id(e),this.activeEditor=e,(!(i=this.get(e))||i.options&amp;&amp;t.state!==i.options.state)&amp;&amp;(i=this.add(e,t)),(wp.media.frame=i).open()},init:function(){a(document.body).on("click.add-media-button",".insert-media",function(e){var t=a(e.currentTarget),i=t.data("editor"),n={frame:"post",state:"insert",title:wp.media.view.l10n.addMedia,multiple:!0};e.preventDefault(),t.hasClass("gallery")&amp;&amp;(n.state="gallery",n.title=wp.media.view.l10n.createGalleryTitle),wp.media.editor.open(i,n)}),(new wp.media.view.EditorUploader).render()}},r.bindAll(wp.media.editor,"open"),a(wp.media.editor.init)}(jQuery,_);
/*! This file is auto-generated */
!function(){var i={6045:function(e){var t=wp.media.controller.State,i=wp.media.view.l10n,i=t.extend({defaults:{id:"audio-details",toolbar:"audio-details",title:i.audioDetailsTitle,content:"audio-details",menu:"audio-details",router:!1,priority:60},initialize:function(e){this.media=e.media,t.prototype.initialize.apply(this,arguments)}});e.exports=i},580:function(e){var t=wp.media.controller.State,i=wp.media.view.l10n,i=t.extend({defaults:{id:"video-details",toolbar:"video-details",title:i.videoDetailsTitle,content:"video-details",menu:"video-details",router:!1,priority:60},initialize:function(e){this.media=e.media,t.prototype.initialize.apply(this,arguments)}});e.exports=i},6615:function(e){var t=Backbone.Model.extend({initialize:function(){this.attachment=!1},setSource:function(e){this.attachment=e,this.extension=e.get("filename").split(".").pop(),this.get("src")&amp;&amp;this.extension===this.get("src").split(".").pop()&amp;&amp;this.unset("src"),_.contains(wp.media.view.settings.embedExts,this.extension)?this.set(this.extension,this.attachment.get("url")):this.unset(this.extension)},changeAttachment:function(e){this.setSource(e),this.unset("src"),_.each(_.without(wp.media.view.settings.embedExts,this.extension),function(e){this.unset(e)},this)}});e.exports=t},1764:function(e){var t=wp.media.view.MediaDetails,i=t.extend({className:"audio-details",template:wp.template("audio-details"),setMedia:function(){var e=this.$(".wp-audio-shortcode");return e.find("source").length?(e.is(":hidden")&amp;&amp;e.show(),this.media=t.prepareSrc(e.get(0))):(e.hide(),this.media=!1),this}});e.exports=i},5262:function(e){var t=wp.media.view.MediaFrame.MediaDetails,i=wp.media.controller.MediaLibrary,a=wp.media.view.l10n,s=t.extend({defaults:{id:"audio",url:"",menu:"audio-details",content:"audio-details",toolbar:"audio-details",type:"link",title:a.audioDetailsTitle,priority:120},initialize:function(e){e.DetailsView=wp.media.view.AudioDetails,e.cancelText=a.audioDetailsCancel,e.addText=a.audioAddSourceTitle,t.prototype.initialize.call(this,e)},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-audio",this.renderReplaceToolbar,this),this.on("toolbar:render:add-audio-source",this.renderAddSourceToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.AudioDetails({media:this.media}),new i({type:"audio",id:"replace-audio",title:a.audioReplaceTitle,toolbar:"replace-audio",media:this.media,menu:"audio-details"}),new i({type:"audio",id:"add-audio-source",title:a.audioAddSourceTitle,toolbar:"add-audio-source",media:this.media,menu:!1})])}});e.exports=s},6445:function(e){var t=wp.media.view.MediaFrame.Select,i=wp.media.view.l10n,a=t.extend({defaults:{id:"media",url:"",menu:"media-details",content:"media-details",toolbar:"media-details",type:"link",priority:120},initialize:function(e){this.DetailsView=e.DetailsView,this.cancelText=e.cancelText,this.addText=e.addText,this.media=new wp.media.model.PostMedia(e.metadata),this.options.selection=new wp.media.model.Selection(this.media.attachment,{multiple:!1}),t.prototype.initialize.apply(this,arguments)},bindHandlers:function(){var e=this.defaults.menu;t.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:"+e,this.createMenu,this),this.on("content:render:"+e,this.renderDetailsContent,this),this.on("menu:render:"+e,this.renderMenu,this),this.on("toolbar:render:"+e,this.renderDetailsToolbar,this)},renderDetailsContent:function(){var e=new this.DetailsView({controller:this,model:this.state().media,attachment:this.state().media.attachment}).render();this.content.set(e)},renderMenu:function(e){var t=this.lastState(),i=t&amp;&amp;t.id,a=this;e.set({cancel:{text:this.cancelText,priority:20,click:function(){i?a.setState(i):a.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},setPrimaryButton:function(e,t){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{button:{style:"primary",text:e,priority:80,click:function(){var e=this.controller;t.call(this,e,e.state()),e.setState(e.options.state),e.reset()}}}}))},renderDetailsToolbar:function(){this.setPrimaryButton(i.update,function(e,t){e.close(),t.trigger("update",e.media.toJSON())})},renderReplaceToolbar:function(){this.setPrimaryButton(i.replace,function(e,t){var i=t.get("selection").single();e.media.changeAttachment(i),t.trigger("replace",e.media.toJSON())})},renderAddSourceToolbar:function(){this.setPrimaryButton(this.addText,function(e,t){var i=t.get("selection").single();e.media.setSource(i),t.trigger("add-source",e.media.toJSON())})}});e.exports=a},2075:function(e){var t=wp.media.view.MediaFrame.MediaDetails,i=wp.media.controller.MediaLibrary,a=wp.media.view.l10n,s=t.extend({defaults:{id:"video",url:"",menu:"video-details",content:"video-details",toolbar:"video-details",type:"link",title:a.videoDetailsTitle,priority:120},initialize:function(e){e.DetailsView=wp.media.view.VideoDetails,e.cancelText=a.videoDetailsCancel,e.addText=a.videoAddSourceTitle,t.prototype.initialize.call(this,e)},bindHandlers:function(){t.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-video",this.renderReplaceToolbar,this),this.on("toolbar:render:add-video-source",this.renderAddSourceToolbar,this),this.on("toolbar:render:select-poster-image",this.renderSelectPosterImageToolbar,this),this.on("toolbar:render:add-track",this.renderAddTrackToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.VideoDetails({media:this.media}),new i({type:"video",id:"replace-video",title:a.videoReplaceTitle,toolbar:"replace-video",media:this.media,menu:"video-details"}),new i({type:"video",id:"add-video-source",title:a.videoAddSourceTitle,toolbar:"add-video-source",media:this.media,menu:!1}),new i({type:"image",id:"select-poster-image",title:a.videoSelectPosterImageTitle,toolbar:"select-poster-image",media:this.media,menu:"video-details"}),new i({type:"text",id:"add-track",title:a.videoAddTrackTitle,toolbar:"add-track",media:this.media,menu:"video-details"})])},renderSelectPosterImageToolbar:function(){this.setPrimaryButton(a.videoSelectPosterImageTitle,function(t,e){var i=[],a=e.get("selection").single();t.media.set("poster",a.get("url")),e.trigger("set-poster-image",t.media.toJSON()),_.each(wp.media.view.settings.embedExts,function(e){t.media.get(e)&amp;&amp;i.push(t.media.get(e))}),wp.ajax.send("set-attachment-thumbnail",{data:{urls:i,thumbnail_id:a.get("id")}})})},renderAddTrackToolbar:function(){this.setPrimaryButton(a.videoAddTrackTitle,function(e,t){var i=t.get("selection").single(),a=e.media.get("content");-1===a.indexOf(i.get("url"))&amp;&amp;(a+=['<track srclang="en" label="English" kind="subtitles" />'].join(""),e.media.set("content",a)),t.trigger("add-track",e.media.toJSON())})}});e.exports=s},8867:function(e){var t=wp.media.view.Settings.AttachmentDisplay,i=jQuery,a=t.extend({initialize:function(){_.bindAll(this,"success"),this.players=[],this.listenTo(this.controller.states,"close",wp.media.mixin.unsetPlayers),this.on("ready",this.setPlayer),this.on("media:setting:remove",wp.media.mixin.unsetPlayers,this),this.on("media:setting:remove",this.render),this.on("media:setting:remove",this.setPlayer),t.prototype.initialize.apply(this,arguments)},events:function(){return _.extend({"click .remove-setting":"removeSetting","change .content-track":"setTracks","click .remove-track":"setTracks","click .add-media-source":"addSource"},t.prototype.events)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},removeSetting:function(e){var e=i(e.currentTarget).parent(),t=e.find("input").data("setting");t&amp;&amp;(this.model.unset(t),this.trigger("media:setting:remove",this)),e.remove()},setTracks:function(){var t="";_.each(this.$(".content-track"),function(e){t+=i(e).val()}),this.model.set("content",t),this.trigger("media:setting:remove",this)},addSource:function(e){this.controller.lastMime=i(e.currentTarget).data("mime"),this.controller.setState("add-"+this.controller.defaults.id+"-source")},loadPlayer:function(){this.players.push(new MediaElementPlayer(this.media,this.settings)),this.scriptXhr=!1},setPlayer:function(){var e;this.players.length||!this.media||this.scriptXhr||((e=this.model.get("src"))&amp;&amp;-1&lt;e.indexOf(&quot;vimeo&quot;)&amp;&amp;!(&quot;Vimeo&quot;in window)?this.scriptXhr=i.getScript(&quot;https://player.vimeo.com/api/player.js&quot;,_.bind(this.loadPlayer,this)):this.loadPlayer())},setMedia:function(){return this},success:function(e){var t=e.attributes.autoplay&amp;&amp;&quot;false&quot;!==e.attributes.autoplay;&quot;flash&quot;===e.pluginType&amp;&amp;t&amp;&amp;e.addEventListener(&quot;canplay&quot;,function(){e.play()},!1),this.mejs=e},render:function(){return t.prototype.render.apply(this,arguments),setTimeout(_.bind(function(){this.scrollToTop()},this),10),this.settings=_.defaults({success:this.success},wp.media.mixin.mejsSettings),this.setMedia()},scrollToTop:function(){this.$(&quot;.embed-media-settings&quot;).scrollTop(0)}},{instances:0,prepareSrc:function(e){var t=a.instances++;return _.each(i(e).find(&quot;source&quot;),function(e){e.src=[e.src,-1&lt;e.src.indexOf(&quot;?&quot;)?&quot;&amp;&quot;:&quot;?&quot;,&quot;_=&quot;,t].join(&quot;&quot;)}),e}});e.exports=a},7697:function(e){var t=wp.media.view.MediaDetails,i=t.extend({className:&quot;video-details&quot;,template:wp.template(&quot;video-details&quot;),setMedia:function(){var e=this.$(&quot;.wp-video-shortcode&quot;);return e.find(&quot;source&quot;).length?(e.is(&quot;:hidden&quot;)&amp;&amp;e.show(),e.hasClass(&quot;youtube-video&quot;)||e.hasClass(&quot;vimeo-video&quot;)?this.media=e.get(0):this.media=t.prepareSrc(e.get(0))):(e.hide(),this.media=!1),this}});e.exports=i}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;t=a[e]={exports:{}};return i[e](t,t.exports,s),t.exports}var e,t,o;e=wp.media,t=window._wpmejsSettings||{},o=window._wpMediaViewsL10n||{},wp.media.mixin={mejsSettings:t,removeAllPlayers:function(){if(window.mejs&amp;&amp;window.mejs.players)for(var e in window.mejs.players)window.mejs.players[e].pause(),this.removePlayer(window.mejs.players[e])},removePlayer:function(e){var t,i;if(e.options){for(t in e.options.features)if(e[&quot;clean&quot;+(i=e.options.features[t])])try{e[&quot;clean&quot;+i](e)}catch(e){}e.isDynamic||e.node.remove(),&quot;html5&quot;!==e.media.rendererName&amp;&amp;e.media.remove(),delete window.mejs.players[e.id],e.container.remove(),e.globalUnbind(&quot;resize&quot;,e.globalResizeCallback),e.globalUnbind(&quot;keydown&quot;,e.globalKeydownCallback),e.globalUnbind(&quot;click&quot;,e.globalClickCallback),delete e.media.player}},unsetPlayers:function(){this.players&amp;&amp;this.players.length&amp;&amp;(_.each(this.players,function(e){e.pause(),wp.media.mixin.removePlayer(e)}),this.players=[])}},wp.media.playlist=new wp.media.collection({tag:&quot;playlist&quot;,editTitle:o.editPlaylistTitle,defaults:{id:wp.media.view.settings.post.id,style:&quot;light&quot;,tracklist:!0,tracknumbers:!0,images:!0,artists:!0,type:&quot;audio&quot;}}),wp.media.audio={coerce:wp.media.coerce,defaults:{id:wp.media.view.settings.post.id,src:&quot;&quot;,loop:!1,autoplay:!1,preload:&quot;none&quot;,width:400},edit:function(e){e=wp.shortcode.next(&quot;audio&quot;,e).shortcode;return wp.media({frame:&quot;audio&quot;,state:&quot;audio-details&quot;,metadata:_.defaults(e.attrs.named,this.defaults)})},shortcode:function(i){var e;return _.each(this.defaults,function(e,t){i[t]=this.coerce(i,t),e===i[t]&amp;&amp;delete i[t]},this),e=i.content,delete i.content,new wp.shortcode({tag:&quot;audio&quot;,attrs:i,content:e})}},wp.media.video={coerce:wp.media.coerce,defaults:{id:wp.media.view.settings.post.id,src:&quot;&quot;,poster:&quot;&quot;,loop:!1,autoplay:!1,preload:&quot;metadata&quot;,content:&quot;&quot;,width:640,height:360},edit:function(e){var e=wp.shortcode.next(&quot;video&quot;,e).shortcode,t=e.attrs.named;return t.content=e.content,wp.media({frame:&quot;video&quot;,state:&quot;video-details&quot;,metadata:_.defaults(t,this.defaults)})},shortcode:function(i){var e;return _.each(this.defaults,function(e,t){i[t]=this.coerce(i,t),e===i[t]&amp;&amp;delete i[t]},this),e=i.content,delete i.content,new wp.shortcode({tag:&quot;video&quot;,attrs:i,content:e})}},e.model.PostMedia=s(6615),e.controller.AudioDetails=s(6045),e.controller.VideoDetails=s(580),e.view.MediaFrame.MediaDetails=s(6445),e.view.MediaFrame.AudioDetails=s(5262),e.view.MediaFrame.VideoDetails=s(2075),e.view.MediaDetails=s(8867),e.view.AudioDetails=s(1764),e.view.VideoDetails=s(7697)}();