import{s as t,m as e,T as n}from"./p-fd56940f.js";import{d as o}from"./p-9a7a47e8.js";const i=e(console.error);function r(e){try{for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.sprintf(e,...o)}catch(t){return t instanceof Error&&i("sprintf error: \n\n"+t.toString()),e}}const a={plural_forms:t=>1===t?0:1},l=/^i18n\.(n?gettext|has_translation)(_|$)/,d=((t,e,o)=>{const i=new n({}),r=new Set,d=()=>{r.forEach((t=>t()))},s=function(t){var e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";i.data[n]={...i.data[n],...t},i.data[n][""]={...a,...null===(e=i.data[n])||void 0===e?void 0:e[""]},delete i.pluralForms[n]},u=(t,e)=>{s(t,e),d()},c=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return i.data[t]||s(void 0,t),i.dcnpgettext(t,e,n,o,r)},v=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},_=(t,e,n)=>{let i=c(n,e,t);return o?(i=o.applyFilters("i18n.gettext_with_context",i,t,e,n),o.applyFilters("i18n.gettext_with_context_"+v(n),i,t,e,n)):i};if(o){const t=t=>{l.test(t)&&d()};o.addAction("hookAdded","core/i18n",t),o.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return i.data[t]},setLocaleData:u,addLocaleData:function(t){var e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";i.data[n]={...i.data[n],...t,"":{...a,...null===(e=i.data[n])||void 0===e?void 0:e[""],...null==t?void 0:t[""]}},delete i.pluralForms[n],d()},resetLocaleData:(t,e)=>{i.data={},i.pluralForms={},u(t,e)},subscribe:t=>(r.add(t),()=>r.delete(t)),__:(t,e)=>{let n=c(e,void 0,t);return o?(n=o.applyFilters("i18n.gettext",n,t,e),o.applyFilters("i18n.gettext_"+v(e),n,t,e)):n},_x:_,_n:(t,e,n,i)=>{let r=c(i,void 0,t,e,n);return o?(r=o.applyFilters("i18n.ngettext",r,t,e,n,i),o.applyFilters("i18n.ngettext_"+v(i),r,t,e,n,i)):r},_nx:(t,e,n,i,r)=>{let a=c(r,i,t,e,n);return o?(a=o.applyFilters("i18n.ngettext_with_context",a,t,e,n,i,r),o.applyFilters("i18n.ngettext_with_context_"+v(r),a,t,e,n,i,r)):a},isRTL:()=>"rtl"===_("ltr","text direction"),hasTranslation:(t,e,n)=>{var r,a;let l=!(null===(r=i.data)||void 0===r||null===(a=r[null!=n?n:"default"])||void 0===a||!a[e?e+""+t:t]);return o&&(l=o.applyFilters("i18n.has_translation",l,t,e,n),l=o.applyFilters("i18n.has_translation_"+v(n),l,t,e,n)),l}}})(0,0,o);d.getLocaleData.bind(d),d.setLocaleData.bind(d),d.resetLocaleData.bind(d),d.subscribe.bind(d);const s=d.__.bind(d);d._x.bind(d);const u=d._n.bind(d);d._nx.bind(d),d.isRTL.bind(d),d.hasTranslation.bind(d);export{s as _,u as a,r as s}