react-period-of-stay-input
Version:
React.js component for entering a period of stay in a hotel: check-in + check-out date
1 lines • 4.55 kB
JSON
{"id":"3Iku","dependencies":[{"name":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat/package.json","includedInParent":true,"mtime":1533713806935},{"name":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/package.json","includedInParent":true,"mtime":1534170011202},{"name":"./utils","loc":{"line":10,"column":26},"parent":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat/lib/core.js","resolved":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat/lib/utils.js"},{"name":"./es5","loc":{"line":10,"column":58},"parent":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat/lib/core.js","resolved":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat/lib/es5.js"},{"name":"./compiler","loc":{"line":10,"column":93},"parent":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat/lib/core.js","resolved":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat/lib/compiler.js"},{"name":"intl-messageformat-parser","loc":{"line":10,"column":146},"parent":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat/lib/core.js","resolved":"/home/ikr/prj/stc-b2b/react-period-of-stay-input/node_modules/intl-messageformat-parser/index.js"}],"generated":{"js":"\"use strict\";var e=require(\"./utils\"),r=require(\"./es5\"),t=require(\"./compiler\"),o=require(\"intl-messageformat-parser\");function a(e,t,o){var n=\"string\"==typeof e?a.__parse(e):e;if(!n||\"messageFormatPattern\"!==n.type)throw new TypeError(\"A message must be provided as a String or AST.\");o=this._mergeFormats(a.formats,o),r.defineProperty(this,\"_locale\",{value:this._resolveLocale(t)});var i=this._findPluralRuleFunction(this._locale),l=this._compilePattern(n,t,o,i),u=this;this.format=function(r){try{return u._format(l,r)}catch(r){throw r.variableId?new Error(\"The intl string context variable '\"+r.variableId+\"' was not provided to the string '\"+e+\"'\"):r}}}exports.default=a,r.defineProperty(a,\"formats\",{enumerable:!0,value:{number:{currency:{style:\"currency\"},percent:{style:\"percent\"}},date:{short:{month:\"numeric\",day:\"numeric\",year:\"2-digit\"},medium:{month:\"short\",day:\"numeric\",year:\"numeric\"},long:{month:\"long\",day:\"numeric\",year:\"numeric\"},full:{weekday:\"long\",month:\"long\",day:\"numeric\",year:\"numeric\"}},time:{short:{hour:\"numeric\",minute:\"numeric\"},medium:{hour:\"numeric\",minute:\"numeric\",second:\"numeric\"},long:{hour:\"numeric\",minute:\"numeric\",second:\"numeric\",timeZoneName:\"short\"},full:{hour:\"numeric\",minute:\"numeric\",second:\"numeric\",timeZoneName:\"short\"}}}}),r.defineProperty(a,\"__localeData__\",{value:r.objCreate(null)}),r.defineProperty(a,\"__addLocaleData\",{value:function(e){if(!e||!e.locale)throw new Error(\"Locale data provided to IntlMessageFormat is missing a `locale` property\");a.__localeData__[e.locale.toLowerCase()]=e}}),r.defineProperty(a,\"__parse\",{value:o.default.parse}),r.defineProperty(a,\"defaultLocale\",{enumerable:!0,writable:!0,value:void 0}),a.prototype.resolvedOptions=function(){return{locale:this._locale}},a.prototype._compilePattern=function(e,r,o,a){return new t.default(r,o,a).compile(e)},a.prototype._findPluralRuleFunction=function(e){for(var r=a.__localeData__,t=r[e.toLowerCase()];t;){if(t.pluralRuleFunction)return t.pluralRuleFunction;t=t.parentLocale&&r[t.parentLocale.toLowerCase()]}throw new Error(\"Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :\"+e)},a.prototype._format=function(r,t){var o,a,n,i,l,u,c=\"\";for(o=0,a=r.length;o<a;o+=1)if(\"string\"!=typeof(n=r[o])){if(i=n.id,!t||!e.hop.call(t,i))throw(u=new Error(\"A value must be provided for: \"+i)).variableId=i,u;l=t[i],n.options?c+=this._format(n.getOption(l),t):c+=n.format(l)}else c+=n;return c},a.prototype._mergeFormats=function(t,o){var a,n,i={};for(a in t)e.hop.call(t,a)&&(i[a]=n=r.objCreate(t[a]),o&&e.hop.call(o,a)&&e.extend(n,o[a]));return i},a.prototype._resolveLocale=function(e){\"string\"==typeof e&&(e=[e]),e=(e||[]).concat(a.defaultLocale);var r,t,o,n,i=a.__localeData__;for(r=0,t=e.length;r<t;r+=1)for(o=e[r].toLowerCase().split(\"-\");o.length;){if(n=i[o.join(\"-\")])return n.locale;o.pop()}var l=e.pop();throw new Error(\"No locale data has been added to IntlMessageFormat for: \"+e.join(\", \")+\", or the default locale: \"+l)};","map":null},"hash":"fe8c302c6790eea5d7eaf3fbd1663833","cacheData":{"env":{}}}