Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
2 lines
1.2 KiB
Plaintext
2 lines
1.2 KiB
Plaintext
import{IntlMessageFormat as t}from"intl-messageformat";import{isValidElement as e}from"react";import{I as r,a as o,m as a}from"../formatters-CJcico0N.js";function m(...[m,s,i,n]){if(Array.isArray(s))throw new r(o.INVALID_MESSAGE,void 0);if("object"==typeof s)throw new r(o.INSUFFICIENT_PATH,void 0);if("string"==typeof s){const t=function(t,e){return e||/'[{}]/.test(t)?void 0:t}(s,i);if(t)return t}const{cache:f,formats:c,formatters:g,globalFormats:u,locale:d,timeZone:A}=n;let p;g.getMessageFormat||(g.getMessageFormat=function(e,r){return a(((...e)=>new t(e[0],e[1],e[2],{formatters:r,...e[3]})),e.message)}(f,g));try{p=g.getMessageFormat(s,d,function(e,r,o){const a=t.formats.date,m=t.formats.time,s={...e?.dateTime,...r?.dateTime},i={date:{...a,...s},time:{...m,...s},number:{...e?.number,...r?.number}};return o&&["date","time"].forEach((t=>{const e=i[t];for(const[t,r]of Object.entries(e))e[t]={timeZone:o,...r}})),i}(u,c,A),{formatters:{...g,getDateTimeFormat:(t,e)=>g.getDateTimeFormat(t,{...e,timeZone:e?.timeZone??A})}})}catch(t){throw new r(o.INVALID_MESSAGE,void 0)}const w=p.format(i);return e(w)||Array.isArray(w)||"string"==typeof w?w:String(w)}m.raw=!0;export{m as default};
|