vendor: 7,295 bytes, lines 1-9
1import{j as _}from"./client-wT6vtYO_.js";import{e as q,T as W,f as m,M as K,j as w,I as Y,k as c,l as O,m as h,n as S,E as P,o as B,D as X,p as z,q as R,s as H,t as Z,v as J,w as Q,_ as V,x as tt,y as rt,z as et,A as at,r as F,P as nt,B as ot}from"./index-BdTwX--g.js";import{g as it,b as lt,l as st,i as mt}from"./load_locale-CnahXAX6.js";function I(t,o){return Object.keys(t).reduce(function(e,r){return e[r]=m({timeZone:o},t[r]),e},{})}function x(t,o){var e=Object.keys(m(m({},t),o));return e.reduce(function(r,n){return r[n]=m(m({},t[n]||{}),o[n]||{}),r},{})}function j(t,o){if(!o)return t;var e=Y.formats;return m(m(m({},e),t),{date:x(I(e.date,o),I(t.date||{},o)),time:x(I(e.time,o),I(t.time||{},o))})}var D=function(t,o,e,r,n){var a=t.locale,i=t.formats,l=t.messages,s=t.defaultLocale,d=t.defaultFormats,f=t.fallbackOnEmptyString,y=t.onError,p=t.timeZone,N=t.defaultRichTextElements;e===void 0&&(e={id:""});var M=e.id,g=e.defaultMessage;q(!!M,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var v=String(M),u=l&&Object.prototype.hasOwnProperty.call(l,v)&&l[v];if(Array.isArray(u)&&u.length===1&&u[0].type===W.literal)return u[0].value;if(!r&&u&&typeof u=="string"&&!N)return u.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=m(m({},N),r||{}),i=j(i,p),d=j(d,p),!u){if(f===!1&&u==="")return u;if((!g||a&&a.toLowerCase()!==s.toLowerCase())&&y(new K(e,a)),g)try{var E=o.getMessageFormat(g,s,d,n);return E.format(r)}catch(T){return y(new w('Error formatting default message for: "'.concat(v,'", rendering default message verbatim'),a,e,T)),typeof g=="string"?g:v}return v}try{var E=o.getMessageFormat(u,a,i,m({formatters:o},n||{}));return E.format(r)}catch(T){y(new w('Error formatting message: "'.concat(v,'", using ').concat(g?"default message":"id"," as fallback."),a,e,T))}if(g)try{var E=o.getMessageFormat(g,s,d,n);return E.format(r)}catch(T){y(new w('Error formatting the default message for: "'.concat(v,'", rendering message verbatim'),a,e,T))}return typeof u=="string"?u:typeof g=="string"?g:v},ft=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function b(t,o,e,r){var n=t.locale,a=t.formats,i=t.onError,l=t.timeZone;r===void 0&&(r={});var s=r.format,d=m(m({},l&&{timeZone:l}),s&&O(a,o,s,i)),f=h(r,ft,d);return o==="time"&&!f.hour&&!f.minute&&!f.second&&!f.timeStyle&&!f.dateStyle&&(f=m(m({},f),{hour:"numeric",minute:"numeric"})),e(n,f)}function ut(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=a===void 0?{}:a,l=typeof n=="string"?new Date(n||0):n;try{return b(t,"date",o,i).format(l)}catch(s){t.onError(new c("Error formatting date.",t.locale,s))}return String(l)}function ct(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=a===void 0?{}:a,l=typeof n=="string"?new Date(n||0):n;try{return b(t,"time",o,i).format(l)}catch(s){t.onError(new c("Error formatting time.",t.locale,s))}return String(l)}function dt(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=e[2],l=i===void 0?{}:i,s=typeof n=="string"?new Date(n||0):n,d=typeof a=="string"?new Date(a||0):a;try{return b(t,"dateTimeRange",o,l).formatRange(s,d)}catch(f){t.onError(new c("Error formatting date time range.",t.locale,f))}return String(s)}function gt(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=a===void 0?{}:a,l=typeof n=="string"?new Date(n||0):n;try{return b(t,"date",o,i).formatToParts(l)}catch(s){t.onError(new c("Error formatting date.",t.locale,s))}return[]}function vt(t,o){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];var n=e[0],a=e[1],i=a===void 0?{}:a,l=typeof n=="string"?new Date(n||0):n;try{return b(t,"time",o,i).formatToParts(l)}catch(s){t.onError(new c("Error formatting time.",t.locale,s))}return[]}var yt=["style","type","fallback","languageDisplay"];function ht(t,o,e,r){var n=t.locale,a=t.onError,i=Intl.DisplayNames;i||a(new S(`Intl.DisplayNames is not available in this environment. 2Try polyfilling it using "@formatjs/intl-displaynames" 3`,P.MISSING_INTL_API));var l=h(r,yt);try{return o(n,l).of(e)}catch(s){a(new c("Error formatting display name.",n,s))}}var pt=["type","style"],A=Date.now();function Et(t){return"".concat(A,"_").concat(t,"_").concat(A)}function Tt(t,o,e,r){r===void 0&&(r={});var n=$(t,o,e,r).reduce(function(a,i){var l=i.value;return typeof l!="string"?a.push(l):typeof a[a.length-1]=="string"?a[a.length-1]+=l:a.push(l),a},[]);return n.length===1?n[0]:n.length===0?"":n}function $(t,o,e,r){var n=t.locale,a=t.onError;r===void 0&&(r={});var i=Intl.ListFormat;i||a(new S(`Intl.ListFormat is not available in this environment. 4Try polyfilling it using "@formatjs/intl-listformat" 5`,P.MISSING_INTL_API));var l=h(r,pt);try{var s={},d=e.map(function(f,y){if(typeof f=="object"){var p=Et(y);return s[p]=f,p}return String(f)});return o(n,l).formatToParts(d).map(function(f){return f.type==="literal"?f:m(m({},f),{value:s[f.value]||f.value})})}catch(f){a(new c("Error formatting list.",n,f))}return e}var bt=["type"];function It(t,o,e,r){var n=t.locale,a=t.onError;r===void 0&&(r={}),Intl.PluralRules||a(new S(`Intl.PluralRules is not available in this environment. 6Try polyfilling it using "@formatjs/intl-pluralrules" 7`,P.MISSING_INTL_API));var i=h(r,bt);try{return o(n,i).select(e)}catch(l){a(new c("Error formatting plural.",n,l))}return"other"}var Ft=["numeric","style"];function St(t,o,e){var r=t.locale,n=t.formats,a=t.onError;e===void 0&&(e={});var i=e.format,l=!!i&&O(n,"relative",i,a)||{},s=h(e,Ft,l);return o(r,s)}function Pt(t,o,e,r,n){n===void 0&&(n={}),r||(r="second");var a=Intl.RelativeTimeFormat;a||t.onError(new S(`Intl.RelativeTimeFormat is not available in this environment. 8Try polyfilling it using "@formatjs/intl-relativetimeformat" 9`,P.MISSING_INTL_API));try{return St(t,o,n).format(e,r)}catch(i){t.onError(new c("Error formatting relative time.",t.locale,i))}return String(e)}var wt=["style","currency","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem","trailingZeroDisplay","roundingPriority","roundingIncrement","roundingMode"];function G(t,o,e){var r=t.locale,n=t.formats,a=t.onError;e===void 0&&(e={});var i=e.format,l=i&&O(n,"number",i,a)||{},s=h(e,wt,l);return o(r,s)}function Lt(t,o,e,r){r===void 0&&(r={});try{return G(t,o,r).format(e)}catch(n){t.onError(new c("Error formatting number.",t.locale,n))}return String(e)}function Dt(t,o,e,r){r===void 0&&(r={});try{return G(t,o,r).formatToParts(e)}catch(n){t.onError(new c("Error formatting number.",t.locale,n))}return[]}function Ot(t){var o=t?t[Object.keys(t)[0]]:void 0;
9return typeof o=="string"}function Nt(t){t.onWarn&&t.defaultRichTextElements&&Ot(t.messages||{})&&t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled. 10Please consider using "@formatjs/cli" to pre-compile your messages for performance. 11For more details see https://formatjs.github.io/docs/getting-started/message-distribution`)}function Mt(t,o){var e=B(o),r=m(m({},X),t),n=r.locale,a=r.defaultLocale,i=r.onError;return n?!Intl.NumberFormat.supportedLocalesOf(n).length&&i?i(new R('Missing locale data for locale: "'.concat(n,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(n).length&&i&&i(new R('Missing locale data for locale: "'.concat(n,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details'))):(i&&i(new z('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),Nt(r),m(m({},r),{formatters:e,formatNumber:Lt.bind(null,r,e.getNumberFormat),formatNumberToParts:Dt.bind(null,r,e.getNumberFormat),formatRelativeTime:Pt.bind(null,r,e.getRelativeTimeFormat),formatDate:ut.bind(null,r,e.getDateTimeFormat),formatDateToParts:gt.bind(null,r,e.getDateTimeFormat),formatTime:ct.bind(null,r,e.getDateTimeFormat),formatDateTimeRange:dt.bind(null,r,e.getDateTimeFormat),formatTimeToParts:vt.bind(null,r,e.getDateTimeFormat),formatPlural:It.bind(null,r,e.getPluralRules),formatMessage:D.bind(null,r,e),$t:D.bind(null,r,e),formatList:Tt.bind(null,r,e.getListFormat),formatListToParts:$.bind(null,r,e.getListFormat),formatDisplayName:ht.bind(null,r,e.getDisplayNames)})}function U(t){return t&&Object.keys(t).reduce(function(o,e){var r=t[e];return o[e]=Q(r)?J(r):r,o},{})}var C=function(t,o,e,r){for(var n=[],a=4;a<arguments.length;a++)n[a-4]=arguments[a];var i=U(r),l=D.apply(void 0,V([t,o,e,i],n,!1));return Array.isArray(l)?tt(l):l},k=function(t,o){var e=t.defaultRichTextElements,r=H(t,["defaultRichTextElements"]),n=U(e),a=Mt(m(m(m({},Z),r),{defaultRichTextElements:n}),o),i={locale:a.locale,timeZone:a.timeZone,fallbackOnEmptyString:a.fallbackOnEmptyString,formats:a.formats,defaultLocale:a.defaultLocale,defaultFormats:a.defaultFormats,messages:a.messages,onError:a.onError,defaultRichTextElements:n};return m(m({},a),{formatMessage:C.bind(null,i,a.formatters),$t:C.bind(null,i,a.formatters)})};function L(t){return{locale:t.locale,timeZone:t.timeZone,fallbackOnEmptyString:t.fallbackOnEmptyString,formats:t.formats,textComponent:t.textComponent,messages:t.messages,defaultLocale:t.defaultLocale,defaultFormats:t.defaultFormats,onError:t.onError,onWarn:t.onWarn,wrapRichTextChunksInFragment:t.wrapRichTextChunksInFragment,defaultRichTextElements:t.defaultRichTextElements}}var Rt=function(t){rt(o,t);function o(){var e=t!==null&&t.apply(this,arguments)||this;return e.cache=ot(),e.state={cache:e.cache,intl:k(L(e.props),e.cache),prevConfig:L(e.props)},e}return o.getDerivedStateFromProps=function(e,r){var n=r.prevConfig,a=r.cache,i=L(e);return et(n,i)?null:{intl:k(i,a),prevConfig:i}},o.prototype.render=function(){return at(this.state.intl),F.createElement(nt,{value:this.state.intl},this.props.children)},o.displayName="IntlProvider",o.defaultProps=Z,o}(F.PureComponent);function xt(t){mt()||(t&&typeof t=="object"&&t instanceof Error&&/MISSING_DATA/.exec(t.message)&&console.warn(t.message),console.error(t))}const kt=({children:t,...o})=>{const[e,r]=F.useState(!1);if(F.useEffect(()=>{async function i(){lt()||await st(),r(!0)}i()},[]),!e)return null;const{locale:n,messages:a}=it();return _.jsx(Rt,{locale:n,messages:a,onError:xt,textComponent:"span",...o,children:t})};export{kt as I}; 12//# sourceMappingURL=intl_provider-BSqiLGEU.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.