this.wp=this.wp||{},this.wp.mediaUtils=function(e){vart={};functioni(o){if(t[o])returnt[o].exports;varr=t[o]={i:o,l:!1,exports:{}};returne[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}returni.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)returne;if(4&t&&"object"==typeofe&&e&&e.__esModule)returne;varo=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeofe)for(varrine)i.d(o,r,function(t){returne[t]}.bind(null,r));returno},i.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returni.d(t,"a",t),t},i.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="Lb+8")}({GRId:function(e,t){e.exports=window.wp.element},"Lb+8":function(e,t,i){"use strict";i.r(t),i.d(t,"MediaUpload",(function(){returnh})),i.d(t,"uploadMedia",(function(){returnb}));varo=i("YLtl"),r=i("GRId"),l=i("l3Sj");const{wp:a}=window,s=[],n=()=>a.media.view.MediaFrame.Select.extend({featuredImageToolbar(e){this.createSelectToolbar(e,{text:a.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){conste=this.state("featured-image").get("selection"),t=newa.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([newa.media.controller.FeaturedImage,newa.media.controller.EditImage({model:this.options.editImage})])}}),d=()=>a.media.view.MediaFrame.Post.extend({galleryToolbar(){conste=this.state().get("editing");this.toolbar.set(newa.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:e?a.media.view.l10n.updateGallery:a.media.view.l10n.insertGallery,priority:80,requires:{library:!0},click(){conste=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},editState(){conste=this.state("gallery").get("selection"),t=newa.media.view.EditImage({model:e.single(),controller:this}).render();this.content.set(t),t.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([newa.media.controller.Library({id:"gallery",title:a.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:a.media.query(Object(o.defaults)({type:"image"},this.options.library))}),newa.media.controller.EditImage({model:this.options.editImage}),newa.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),newa.media.controller.GalleryAdd])}}),p=e=>Object(o.pick)(e,["sizes","mime","type","subtype","id","url","alt","link","caption"]),c=e=>a.media.query({order:"ASC",orderby:"post__in",post__in:e,posts_per_page:-1,query:!0,type:"image"});classmextendsr.Component{constructor({allowedTypes:e,gallery:t=!1,unstableFeaturedImageFlow:i=!1,modalClass:o,multiple:r=!1,title:s=Object(l.__)("Select or Upload Media")}){if(super(...arguments),this.openModal=this.openModal.bind(this),this.onOpen=this.onOpen.bind(this),this.onSelect=this.onSelect.bind(this),this.onUpdate=this.onUpdate.bind(this),this.onClose=this.onClose.bind(this),t)this.buildAndSetGalleryFrame();else{constt={title:s,multiple:r};e&&(t.library={type:e}),this.frame=a.media(t)}o&&this.frame.$el.addClass(o),i&&this.buildAndSetFeatureImageFrame(),this.initializeListeners()}initializeListeners(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}buildAndSetGalleryFrame(){const{addToGallery:e=!1,a