import{n as e}from"./rolldown-runtime-hePW80VL.js";import{c as t,l as n,s as r,u as i}from"./countries-DOXck9T3.js";var a=e({createCountryIdentifier:()=>o,getCountryFilterValues:()=>c,parseCountryIdentifier:()=>s});function o(e){let t=e.toUpperCase();if(!n(t))throw Error(`Invalid ISO 3166 code: ${e}`);return`iso3166:${t}`}function s(e){if(!e)return;let n=e.toLowerCase();if(n.startsWith(`iso3166:`)){let n=e.slice(8).toUpperCase();return r(n)&&i(n)||n.length===2&&t(n)?n:void 0}if(n.startsWith(`geo:`)){let n=e.slice(4).toUpperCase();if(n.length===2&&t(n))return n}}function c(e,t=!0){let n=e.toUpperCase(),i=[o(n)];return t&&!r(n)&&i.push(`geo:${n}`),i}export{s as i,o as n,c as r,a as t};