var e={713(e){e.exports=ReactJSXRuntime},386(e){e.exports=wp.element},756(e,t,r){r.d(t,{V:()=>i});var n=r(725),o=r(713);function i({widgetType:e,attributes:t,setAttributes:r,resolveWidgetModule:i}){const a=(0,n.q)(e.renderModule,i);return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(a,{attributes:t,setAttributes:r})})}},189(e,t,r){r.d(t,{iz:()=>a,oL:()=>i});var n=/^[a-z][a-z0-9-]*(\/[a-z][a-z0-9-]*)?$/,o=new Map;function i(e){if(n.test(e.name)&&!o.has(e.name))return o.set(e.name,e),e}function a(e){return e.map(e=>{const t=e.type?o.get(e.type):void 0;if(!t)return e;const{name:r,baseType:n,isValid:i,...a}=t,{type:s,isValid:u,...l}=e;return{...a,...l,type:n,...i||u?{isValid:{...i,...u}}:{}}})}},217(e,t,r){r.d(t,{N:()=>i});var n=r(386),o=r(189);function i(e){const[t,r]=(0,n.useState)([]),[i,a]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{if(null==e)return void a(!0);if(0===e.length)return r([]),void a(!1);let t=!1;return a(!0),Promise.all(e.map(async e=>{if(!e.widget_module)return null;try{const t=await import(e.widget_module);if(!t?.default)return null;const r=t.default;return{...r,...r.attributes?{attributes:(0,o.iz)(r.attributes)}:{},name:e.name,renderModule:e.render_module??"",title:e.title??r.title??e.name,...e.presentation?{presentation:e.presentation}:{},...e.category?{category:e.category}:{},...e.description?{description:e.description}:{},...e.help?{help:e.help}:{},...e.keywords?{keywords:e.keywords}:{},...e.actions?{actions:e.actions}:{}}}catch{return null}})).then(e=>{t||(r(e.filter(e=>null!==e)),a(!1))}),()=>{t=!0}},[e]),[t,i]}},725(e,t,r){r.d(t,{q:()=>i});var n=r(386);var o=new Map;function i(e,t){const r=o.get(e);if(r)return r;const i=(0,n.lazy)(async()=>{const r=await t(e);if(!function(e){return"object"==typeof e&&null!==e&&"default"in e&&"function"==typeof e.default}(r))throw new Error(`Invalid widget module: ${e}`);return r});return o.set(e,i),i}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};r.d(n,{No:()=>i.N,VK:()=>o.V,oL:()=>a.oL});var o=r(756),i=r(217),a=r(189);const s=n.VK,u=n.oL,l=n.No;export{s as WidgetRender,u as registerFieldType,l as useWidgetTypes};