(()=>{"use strict";var r={d:(e,o)=>{for(var t in o)r.o(o,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e),r:r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},e={};r.r(e),r.d(e,{createRegistry:()=>t});const o=window.wp.element;function t(r){const{name:e,groups:t={},defaultGroup:i=""}=r;let n={...t},u=[];const p=new Set,l=()=>{p.forEach(r=>r())},a=(r,e)=>{var o,t;if(r.group===e.group)return r.priority-e.priority;const i=r=>{var e;return r?null!==(e=n[r]?.priority)&&void 0!==e?e:50:1/0};return i(r.group)-i(e.group)||(null!==(o=r.group)&&void 0!==o?o:"zzzz").localeCompare(null!==(t=e.group)&&void 0!==t?t:"zzzz")};return{name:e,register:r=>{var e,o;const t={...r,group:null!==(e=r.group)&&void 0!==e?e:i,priority:null!==(o=r.priority)&&void 0!==o?o:10};u.find(({id:r,group:e})=>r===t.id&&e===t.group)?u=u.map(r=>r.id===t.id?t:r):u.push(t),u.sort(a),l()},registerGroup:(r,e)=>{n={...n,[r]:e},u.sort(a),l()},getItems:()=>[...u],useItems:()=>{const r=()=>u;return(0,o.useSyncExternalStore)(r=>(p.add(r),()=>p.delete(r)),r,r)},filter:r=>u.filter(r),emitChange:l,clear:()=>{u=[],l()}}}(window.popupMaker=window.popupMaker||{}).registry=e})();