!function(e,n){"function"==typeof define&&define.amd?define(["cldr","cldr/event"],n):"object"==typeof exports?module.exports=n(require("cldrjs")):e.Globalize=n(e.Cldr)}(this,function(e){function n(e){e.once("get",l),e.get("supplemental/likelySubtags")}function t(e){return this instanceof t?(d(e,"locale"),_(e,"locale"),this.cldr=g(e),void n(this.cldr)):new t(e)}var r=function(e){return"string"==typeof e?e:"number"==typeof e?""+e:JSON.stringify(e)},a=function(e,n){return e=e.replace(/{[0-9a-zA-Z-_. ]+}/g,function(e){return e=e.replace(/^{([^}]*)}$/,"$1"),r(n[e])})},i=function(){var e=arguments[0],n=[].slice.call(arguments,1);return n.forEach(function(n){var t;for(t in n)e[t]=n[t]}),e},o=function(e,n,t){var r;return n=e+(n?": "+a(n,t):""),r=new Error(n),r.code=e,i(r,t),r},c=function(e,n,t,r){if(!t)throw o(e,n,r)},u=function(e){return Array.isArray(e)?e:e?[e]:[]},l=function(e,n,t){var r;t=t||{},r=u(t.skip).some(function(n){return n.test(e)}),c("E_MISSING_CLDR","Missing required CLDR content `{path}`.",n||r,{path:e})},f=function(e){c("E_DEFAULT_LOCALE_NOT_DEFINED","Default locale has not been defined.",void 0!==e,{})},d=function(e,n){c("E_MISSING_PARAMETER","Missing required parameter `{name}`.",void 0!==e,{name:n})},s=function(e,n,t,r){c("E_PAR_OUT_OF_RANGE","Parameter `{name}` has value `{value}` out of range [{minimum}, {maximum}].",void 0===e||e>=t&&r>=e,{maximum:r,minimum:t,name:n,value:e})},m=function(e,n,t,r){c("E_INVALID_PAR_TYPE","Invalid `{name}` parameter ({value}). {expected} expected.",t,{expected:r,name:n,value:e})},_=function(n,t){m(n,t,void 0===n||"string"==typeof n||n instanceof e,"String or Cldr instance")},p=function(e){return null!==e&&""+e=="[object Object]"},v=function(e,n){m(e,n,void 0===e||p(e),"Plain Object")},g=function(n){return n instanceof e?n:new e(n)},E=function(e){return e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")},h=function(e,n,t){var r;for("string"!=typeof e&&(e=String(e)),r=e.length;n>r;r+=1)e=t?e+"0":"0"+e;return e};return t.load=function(){e.load.apply(e,arguments)},t.locale=function(e){return _(e,"locale"),arguments.length&&(this.cldr=g(e),n(this.cldr)),this.cldr},t._alwaysArray=u,t._createError=o,t._formatMessage=a,t._isPlainObject=p,t._objectExtend=i,t._regexpEscape=E,t._stringPad=h,t._validate=c,t._validateCldr=l,t._validateDefaultLocale=f,t._validateParameterPresence=d,t._validateParameterRange=s,t._validateParameterTypePlainObject=v,t._validateParameterType=m,t});