import{l as e}from"./chunk.casing_U_9x-Om3.esm.js";import{A as t,_ as r}from"./chunk.register_Cnn1s0Rw.esm.js";import{t as o}from"./chunk.context_IZTYG4gY.esm.js";const n=()=>t(o),s=["string",void 0],c=()=>{const{locale:t,translations:o}=n();return{locale:t,translate:(n,c)=>{const i=n.split(".");if(!o||!t)throw new ReferenceError;const{count:a,defaultValue:f,...l}=c||{};let u=o.get(t);if(!u&&(null==c?void 0:c.defaultValue))return c.defaultValue;try{for(const e of i)switch(typeof u){case"object":u=u[e];break;case"string":case"undefined":throw new ReferenceError}if(void 0===u)throw new ReferenceError;if("string"!=typeof o&&a){let e=1===a?"one":"other";0===a&&"string"!=typeof o&&"zero"in o&&(e="zero"),u=u[e]}if("string"!=typeof u)throw new ReferenceError;let t=!1;const n=Object.keys(l),c=u.split(new RegExp(`({${n.join("}|{")}})`,"g"));return n.forEach((e=>{t||s.includes(typeof l[e])||(t=!0),c.forEach(((t,r)=>{t===`{${e}}`&&(c[r]=l[e])}))})),t?r(e,{children:c}):c.join("")}catch(e){return f||n}}}};export{n,c as t}; //# sourceMappingURL=chunk.hooks_B8JiKvZ3.esm.js.map