@harpercollins/harpercollins-design-system 1.8.82 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +25 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/src/components/data-display/ProgressCircle/ProgressCircle.d.ts +1 -1
- package/dist/cjs/types/src/components/data-display/ProgressCircle/ProgressCircle.stories.d.ts +3 -0
- package/dist/cjs/types/src/components/global/ErrorFallback/FullPageErrorFallback.d.ts +2 -0
- package/dist/cjs/types/src/components/global/ErrorFallback/FullPageErrorFallback.stories.d.ts +6 -0
- package/dist/cjs/types/src/components/index.d.ts +2 -1
- package/dist/esm/index.js +27 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/data-display/ProgressCircle/ProgressCircle.d.ts +1 -1
- package/dist/esm/types/src/components/data-display/ProgressCircle/ProgressCircle.stories.d.ts +3 -0
- package/dist/esm/types/src/components/global/ErrorFallback/FullPageErrorFallback.d.ts +2 -0
- package/dist/esm/types/src/components/global/ErrorFallback/FullPageErrorFallback.stories.d.ts +6 -0
- package/dist/esm/types/src/components/index.d.ts +2 -1
- package/dist/index.d.ts +4 -2
- package/package.json +17 -17
|
@@ -15,7 +15,7 @@ interface TrafficLightsExtended extends TrafficLights {
|
|
|
15
15
|
export type TrafficLightRanges = TrafficLights | TrafficLightsExtended;
|
|
16
16
|
interface ProgressCircleProps {
|
|
17
17
|
size?: "tiny" | "small" | "medium" | "large";
|
|
18
|
-
value: number;
|
|
18
|
+
value: number | null | undefined;
|
|
19
19
|
kind?: "default" | "danger" | "success" | "traffic-light";
|
|
20
20
|
trafficLightRanges?: TrafficLightRanges;
|
|
21
21
|
}
|
package/dist/cjs/types/src/components/data-display/ProgressCircle/ProgressCircle.stories.d.ts
CHANGED
|
@@ -7,3 +7,6 @@ export declare const Default: Story;
|
|
|
7
7
|
export declare const Danger: Story;
|
|
8
8
|
export declare const TrafficLight: Story;
|
|
9
9
|
export declare const TrafficLightWithCustomRanges: Story;
|
|
10
|
+
export declare const ZeroValue: Story;
|
|
11
|
+
export declare const NullValue: Story;
|
|
12
|
+
export declare const UndefinedValue: Story;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import FullPageErrorFallback from "./FullPageErrorFallback";
|
|
3
|
+
declare const meta: Meta<typeof FullPageErrorFallback>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof FullPageErrorFallback>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -37,4 +37,5 @@ import TextBlock from "./data-display/TextBlock";
|
|
|
37
37
|
import TextField from "./inputs/TextField";
|
|
38
38
|
import ToastMessages from "./feedback/ToastMessages";
|
|
39
39
|
import Tooltip from "./data-display/Tooltip";
|
|
40
|
-
|
|
40
|
+
import FullPageErrorFallback from "./global/ErrorFallback/FullPageErrorFallback";
|
|
41
|
+
export { Accordion, AppBar, Autocomplete, AutocompleteSelectMultiple, Badge, Box, Breadcrumb, Button, Chip, Divider, Drawer, Dropdown, FullPageErrorFallback, Grid, Heading, Icon, IconButton, Input, Layout, List, ListItem, ListItemButton, ListItemDecorator, LoadingSpinner, Logo, Menu, MenuButton, MenuHeading, MenuItem, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextBlock, TextField, ToastMessages, Tooltip, };
|
package/dist/esm/index.js
CHANGED
|
@@ -757,7 +757,7 @@ function oc(e,t){const n=tc(e,t);return"production"!==process.env.NODE_ENV?(...t
|
|
|
757
757
|
transition: width 1s ease;
|
|
758
758
|
animation: ${Uw} 3s ease infinite;
|
|
759
759
|
transform: rotate(180deg);
|
|
760
|
-
`;function Jw({ariaLabel:t,percentage:n}){return e(Yw,{role:"progressbar","aria-label":t,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:e(Kw,{style:{width:`${n}%`}})})}function Xw({size:n="medium",value:o
|
|
760
|
+
`;function Jw({ariaLabel:t,percentage:n}){return e(Yw,{role:"progressbar","aria-label":t,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:e(Kw,{style:{width:`${n}%`}})})}function Xw({size:n="medium",value:o,kind:r="default",trafficLightRanges:a={red:{min:0,max:20,text:""},redLow:{min:20,max:40,text:""},orange:{min:40,max:60,text:""},green:{min:60,max:80,text:""},greenHigh:{min:80,max:100,text:""}}}){const i={mini:"0.8rem",tiny:"1rem",small:"1.2rem",medium:"1.6rem",large:"2rem"}[n],l={mini:50,tiny:75,small:100,medium:150,large:200}[n],s=o?(({kind:e,percentage:t,trafficLightRanges:n})=>{const o="var(--color--primary)",r="var(--color--danger)",a="var(--color--green-dark)",i="var(--color--red)",l="var(--color--orange-dark)",s="var(--color--green-dark)";return(()=>{if("traffic-light"===e){const e=Object.entries(n).find((([,e])=>t>=e.min&&t<=e.max))?.[0];return"red"===e||"redLow"===e?i:"orange"===e?l:"green"===e||"greenHigh"===e?s:"#d7d7d7"}return"danger"===e?r:"success"===e?a:"default"===e?o:"#d7d7d7"})()})({kind:r,percentage:Math.round(o),trafficLightRanges:a}):void 0,d=l/7,[p,f]=c(0);u((()=>{f(o)}),[o]);const m=(l-d)/2,g=m*Math.PI*2,h=p?p*g/100:0;return t("svg",{width:l,height:l,viewBox:`0 0 ${l} ${l}`,children:[e("circle",{fill:"white",stroke:"#d7d7d7",cx:l/2,cy:l/2,r:m,strokeWidth:`${d}px`}),e("circle",{fill:"none",stroke:s,cx:l/2,cy:l/2,r:m,strokeWidth:`${d}px`,transform:`rotate(-90 ${l/2} ${l/2})`,strokeDasharray:`${h}, ${g-h}`,strokeLinecap:"round",style:{transition:"all 0.5s"}}),e("text",{fill:"black",fontSize:i,fontWeight:"bold",x:"50%",y:"50%",dy:"6%",textAnchor:"middle",children:null!=o&&(v=o,v>=0&&v<=100)?`${o}%`:"-"})]});var v}const Qw=rn.div`
|
|
761
761
|
display: flex;
|
|
762
762
|
flex-direction: column;
|
|
763
763
|
align-items: flex-start;
|
|
@@ -1107,7 +1107,7 @@ function dS(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=
|
|
|
1107
1107
|
page-break-after: avoid;
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
|
-
`;function IS({tabsConfig:n=[],defaultId:o}){const r=new URLSearchParams(window.location.search).get("tab")||o,i=n.findIndex((e=>e.id===r)),[l,s]=c(i>=0?i:0),d=a(null),f=a({}),[m,g]=c(!1),[h,v]=c({right:!1,left:!0}),b=e=>{if(!d.current)return;const t=f.current[e];t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})},y=e=>{const t=new URL(window.location.href);t.searchParams.set("tab",e),window.history.
|
|
1110
|
+
`;function IS({tabsConfig:n=[],defaultId:o}){const r=new URLSearchParams(window.location.search).get("tab")||o,i=n.findIndex((e=>e.id===r)),[l,s]=c(i>=0?i:0),d=a(null),f=a({}),[m,g]=c(!1),[h,v]=c({right:!1,left:!0}),b=e=>{if(!d.current)return;const t=f.current[e];t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})},y=e=>{const t=new URL(window.location.href);t.searchParams.set("tab",e),window.history.replaceState({},"",t.toString())},w=e=>{const t=n[e].id,o=f.current[t];o&&o.focus(),b(t),y(t)},x=e=>{const t=n.length,o={ArrowRight:()=>w((l+1)%t),ArrowLeft:()=>w((l-1+t)%t),Home:()=>w(0),End:()=>w(t-1)}[e.key];o&&(e.preventDefault(),o())},S=(e,t)=>{if(!e)return;let n=0;const o=setInterval((()=>{e.scrollLeft+=t,n+=Math.abs(t),n>=100&&clearInterval(o)}),20);v({left:e.scrollLeft<=0,right:e.scrollLeft+e.offsetWidth>=e.scrollWidth})};return u((()=>{d.current&&g(d.current.offsetWidth<d.current.scrollWidth)}),[]),u((()=>{b(n[l].id),y(n[l].id)}),[n,l]),p((()=>{const e=()=>{if(!d.current)return;const{offsetWidth:e,scrollWidth:t}=d.current;g(e<t)};return window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e)}}),[]),t(yS,{children:[t(wS,{role:"tablist","aria-orientation":"horizontal",children:[m&&t(CS,{onClick:()=>d.current&&S(d.current,-30),className:"left-arrow","aria-label":"Left arrow",disabled:h.left,children:[e(Ti,{icon:vn,size:"large"})," "]}),e(xS,{ref:d,children:n.length>0?n.map((t=>e(SS,{type:"button",onClick:()=>(e=>{const t=n.findIndex((t=>t.id===e));b(e),s(t),y(e)})(t.id),role:"tab",ref:e=>{f.current[t.id]=e},"aria-controls":`panel-${t.id}`,"aria-selected":n[l].id===t.id,id:`tab-${t.id}`,onKeyDown:x,onFocus:()=>s(n.findIndex((e=>e.id===t.id))),tabIndex:n[l].id===t.id?0:-1,children:t.label},`tab-${t.id}`))):e("div",{children:"No tab content to display"})}),m&&e(CS,{onClick:()=>d.current&&S(d.current,30),className:"right-arrow","aria-label":"Right arrow",disabled:h.right,children:e(Ti,{icon:bn,size:"large"})})]}),e(kS,{children:n.map((o=>t(OS,{role:"tabpanel","aria-labelledby":`tab-${o.id}`,id:`panel-${o.id}`,$show:n[l].id===o.id,tabIndex:0,children:[o.label?e(xn,{as:"h2",children:o.label}):null,o.content]},`tabpanel-${o.id}`)))})]})}const ES={small:tn`
|
|
1111
1111
|
font-size: var(--font-size--small);
|
|
1112
1112
|
line-height: var(--line-height--small);
|
|
1113
1113
|
`,medium:tn`
|
|
@@ -1202,5 +1202,29 @@ function dS(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=
|
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
1204
|
`}
|
|
1205
|
-
`;function MS({message:n}){const o="success"===n.level?e(Ti,{icon:dn}):e(Ti,{icon:yn});return t(zS,"html"in n?{level:n.level,noFade:n.noFade,role:"alert","aria-live":"error"===n.level?"assertive":"polite",children:[o,e("span",{dangerouslySetInnerHTML:{__html:n.html}})]}:{level:n.level,noFade:n.noFade,role:"alert","aria-live":"error"===n.level?"assertive":"polite",children:[o,n.text]})}function AS({messages:t}){return e(RS,{children:e(DS,{style:{top:`-${55*t.length}px`},children:t.map((t=>e(MS,{message:t},String(t))))})})}function _S(e){const[t,n]=c(e);return{value:t,toggle:f((()=>n((e=>!e))),[]),setTrue:f((()=>n(!0)),[]),setFalse:f((()=>n(!1)),[])}}const LS=(e,t,n)=>{const[o,r]=c(null),[i,l]=c(!1),[s,d]=c(null),p=a(null);return u((()=>{if(!e)return()=>{};let o=!0;l(!0);return p.current&&clearTimeout(p.current),p.current=setTimeout((()=>{(async()=>{try{const n=await fetch(e,t);if(!n.ok)throw new Error(`Error: ${n.statusText}`);const a=await n.json();o&&(r(a),l(!1))}catch(e){o&&(d(e),l(!1))}})()}),n||0),()=>{o=!1,p.current&&clearTimeout(p.current)}}),[e,t,n]),{data:o,loading:i,error:s}};function FS(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function VS(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const jS=6048e5,BS=864e5,HS=6e4,WS=36e5;let GS={};function qS(){return GS}function US(e,t){const n=qS(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=FS(e),a=r.getDay(),i=(a<o?7:0)+a-o;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function YS(e){return US(e,{weekStartsOn:1})}function KS(e){const t=FS(e),n=t.getFullYear(),o=VS(e,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const r=YS(o),a=VS(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const i=YS(a);return t.getTime()>=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function JS(e){const t=FS(e);return t.setHours(0,0,0,0),t}function XS(e){const t=FS(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function QS(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const n=FS(e);return!isNaN(Number(n))}const ZS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eC(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tC={date:eC({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eC({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eC({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nC={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function oC(e){return(t,n)=>{let o;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;o=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;o=e.values[r]||e.values[t]}return o[e.argumentCallback?e.argumentCallback(t):t]}}function rC(e){return(t,n={})=>{const o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;const i=a[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(l,(e=>e.test(i)));let c;c=e.valueCallback?e.valueCallback(s):s,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}var aC;const iC={code:"en-US",formatDistance:(e,t,n)=>{let o;const r=ZS[e];return o="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o},formatLong:tC,formatRelative:(e,t,n,o)=>nC[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:oC({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:oC({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:oC({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:oC({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:oC({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(aC={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(aC.matchPattern);if(!n)return null;const o=n[0],r=e.match(aC.parsePattern);if(!r)return null;let a=aC.valueCallback?aC.valueCallback(r[0]):r[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(o.length)}}),era:rC({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:rC({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:rC({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:rC({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:rC({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function lC(e){const t=FS(e),n=function(e,t){const n=JS(e),o=JS(t),r=+n-XS(n),a=+o-XS(o);return Math.round((r-a)/BS)}(t,function(e){const t=FS(e),n=VS(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function sC(e){const t=FS(e),n=+YS(t)-+function(e){const t=KS(e),n=VS(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),YS(n)}(t);return Math.round(n/jS)+1}function cC(e,t){const n=FS(e),o=n.getFullYear(),r=qS(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=VS(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);const l=US(i,t),s=VS(e,0);s.setFullYear(o,0,a),s.setHours(0,0,0,0);const c=US(s,t);return n.getTime()>=l.getTime()?o+1:n.getTime()>=c.getTime()?o:o-1}function uC(e,t){const n=FS(e),o=+US(n,t)-+function(e,t){const n=qS(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=cC(e,t),a=VS(e,0);return a.setFullYear(r,0,o),a.setHours(0,0,0,0),US(a,t)}(n,t);return Math.round(o/jS)+1}function dC(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const pC={y(e,t){const n=e.getFullYear(),o=n>0?n:1-n;return dC("yy"===t?o%100:o,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):dC(n+1,2)},d:(e,t)=>dC(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>dC(e.getHours()%12||12,t.length),H:(e,t)=>dC(e.getHours(),t.length),m:(e,t)=>dC(e.getMinutes(),t.length),s:(e,t)=>dC(e.getSeconds(),t.length),S(e,t){const n=t.length,o=e.getMilliseconds();return dC(Math.trunc(o*Math.pow(10,n-3)),t.length)}},fC="midnight",mC="noon",gC="morning",hC="afternoon",vC="evening",bC="night",yC={G:function(e,t,n){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),o=t>0?t:1-t;return n.ordinalNumber(o,{unit:"year"})}return pC.y(e,t)},Y:function(e,t,n,o){const r=cC(e,o),a=r>0?r:1-r;if("YY"===t){return dC(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):dC(a,t.length)},R:function(e,t){return dC(KS(e),t.length)},u:function(e,t){return dC(e.getFullYear(),t.length)},Q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return dC(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return dC(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){const o=e.getMonth();switch(t){case"M":case"MM":return pC.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return dC(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){const r=uC(e,o);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):dC(r,t.length)},I:function(e,t,n){const o=sC(e);return"Io"===t?n.ordinalNumber(o,{unit:"week"}):dC(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):pC.d(e,t)},D:function(e,t,n){const o=lC(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):dC(o,t.length)},E:function(e,t,n){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){const r=e.getDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return dC(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){const r=e.getDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return dC(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const o=e.getDay(),r=0===o?7:o;switch(t){case"i":return String(r);case"ii":return dC(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const o=e.getHours();let r;switch(r=12===o?mC:0===o?fC:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const o=e.getHours();let r;switch(r=o>=17?vC:o>=12?hC:o>=4?gC:bC,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return pC.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):pC.H(e,t)},K:function(e,t,n){const o=e.getHours()%12;return"Ko"===t?n.ordinalNumber(o,{unit:"hour"}):dC(o,t.length)},k:function(e,t,n){let o=e.getHours();return 0===o&&(o=24),"ko"===t?n.ordinalNumber(o,{unit:"hour"}):dC(o,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):pC.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):pC.s(e,t)},S:function(e,t){return pC.S(e,t)},X:function(e,t,n){const o=e.getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return xC(o);case"XXXX":case"XX":return SC(o);default:return SC(o,":")}},x:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"x":return xC(o);case"xxxx":case"xx":return SC(o);default:return SC(o,":")}},O:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wC(o,":");default:return"GMT"+SC(o,":")}},z:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wC(o,":");default:return"GMT"+SC(o,":")}},t:function(e,t,n){return dC(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return dC(e.getTime(),t.length)}};function wC(e,t=""){const n=e>0?"-":"+",o=Math.abs(e),r=Math.trunc(o/60),a=o%60;return 0===a?n+String(r):n+String(r)+t+dC(a,2)}function xC(e,t){if(e%60==0){return(e>0?"-":"+")+dC(Math.abs(e)/60,2)}return SC(e,t)}function SC(e,t=""){const n=e>0?"-":"+",o=Math.abs(e);return n+dC(Math.trunc(o/60),2)+t+dC(o%60,2)}const CC=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},kC=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},OC={p:kC,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],o=n[1],r=n[2];if(!r)return CC(e,t);let a;switch(o){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",CC(o,t)).replace("{{time}}",kC(r,t))}},IC=/^D+$/,EC=/^Y+$/,PC=["D","DD","YY","YYYY"];const NC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$C=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TC=/^'([^]*?)'?$/,RC=/''/g,DC=/[a-zA-Z]/;function zC(e,t,n){const o=qS(),r=o.locale??iC,a=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=FS(e);if(!QS(l))throw new RangeError("Invalid time value");let s=t.match($C).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,OC[t])(e,r.formatLong)}return e})).join("").match(NC).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:MC(e)};if(yC[t])return{isToken:!0,value:e};if(t.match(DC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));r.localize.preprocessor&&(s=r.localize.preprocessor(l,s));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:r};return s.map((n=>{if(!n.isToken)return n.value;const o=n.value;(function(e){return EC.test(e)}(o)||function(e){return IC.test(e)}(o))&&function(e,t,n){const o=function(e,t,n){const o="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(o),PC.includes(e))throw new RangeError(o)}(o,t,String(e));return(0,yC[o[0]])(l,o,r.localize,c)})).join("")}function MC(e){const t=e.match(TC);return t?t[1].replace(RC,"'"):e}function AC(e,t){const n=function(e){const t={},n=e.split(_C.dateTimeDelimiter);let o;if(n.length>2)return t;/:/.test(n[0])?o=n[0]:(t.date=n[0],o=n[1],_C.timeZoneDelimiter.test(t.date)&&(t.date=e.split(_C.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length)));if(o){const e=_C.timezone.exec(o);e?(t.time=o.replace(e[1],""),t.timezone=e[1]):t.time=o}return t}(e);let o;if(n.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(n);if(!o)return{year:NaN,restDateString:""};const r=o[1]?parseInt(o[1]):null,a=o[2]?parseInt(o[2]):null;return{year:null===a?r:100*a,restDateString:e.slice((o[1]||o[2]).length)}}(n.date,2);o=function(e,t){if(null===t)return new Date(NaN);const n=e.match(LC);if(!n)return new Date(NaN);const o=!!n[4],r=jC(n[1]),a=jC(n[2])-1,i=jC(n[3]),l=jC(n[4]),s=jC(n[5])-1;if(o)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,l,s)?function(e,t,n){const o=new Date(0);o.setUTCFullYear(e,0,4);const r=o.getUTCDay()||7,a=7*(t-1)+n+1-r;return o.setUTCDate(o.getUTCDate()+a),o}(t,l,s):new Date(NaN);{const e=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(HC[t]||(WC(e)?29:28))}(t,a,i)&&function(e,t){return t>=1&&t<=(WC(e)?366:365)}(t,r)?(e.setUTCFullYear(t,a,Math.max(r,i)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const r=o.getTime();let a,i=0;if(n.time&&(i=function(e){const t=e.match(FC);if(!t)return NaN;const n=BC(t[1]),o=BC(t[2]),r=BC(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,o,r))return NaN;return n*WS+o*HS+1e3*r}(n.time),isNaN(i)))return new Date(NaN);if(!n.timezone){const e=new Date(r+i),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return a=function(e){if("Z"===e)return 0;const t=e.match(VC);if(!t)return 0;const n="+"===t[1]?-1:1,o=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,r))return NaN;return n*(o*WS+r*HS)}(n.timezone),isNaN(a)?new Date(NaN):new Date(r+i+a)}const _C={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},LC=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,FC=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,VC=/^([+-])(\d{2})(?::?(\d{2}))?$/;function jC(e){return e?parseInt(e):1}function BC(e){return e&&parseFloat(e.replace(",","."))||0}const HC=[31,null,31,30,31,30,31,31,30,31,30,31];function WC(e){return e%400==0||e%4==0&&e%100!=0}const GC="-",qC=(e,t="dd MMM yyyy")=>{if(""===e||null==e)return GC;const n=AC(e);return QS(n)?zC(n,t):GC},UC=e=>""===e||null==e?GC:e.toLocaleString(),YC=e=>""===e||null==e?GC:e,KC={style:"currency",currency:"GBP",minimumFractionDigits:0,maximumFractionDigits:0},JC=(e,t="en-GB",n=KC)=>{let o=e;if(""===o||null==o)return GC;"string"==typeof e&&(o=Number(e));return new Intl.NumberFormat(t,{...KC,...n}).format(o)};export{Ai as Accordion,ow as AppBar,aw as Autocomplete,cw as AutocompleteSelectMultiple,mw as Badge,xb as Box,bw as Breadcrumb,Gy as Button,yw as Chip,ww as Divider,_w as Drawer,Lw as Dropdown,Fw as Grid,xn as Heading,Ti as Icon,ov as IconButton,Vw as Input,Gw as Layout,iw as List,nh as ListItem,yh as ListItemButton,Qb as ListItemDecorator,Dy as LoadingSpinner,Uy as Logo,Ny as Menu,cy as MenuButton,Py as MenuHeading,qw as MenuItem,Jw as ProgressBar,Xw as ProgressCircle,tx as ReadMore,ox as RelativeTime,fx as StatusIcon,bS as Table,IS as Tabs,TS as TextBlock,gy as TextField,AS as ToastMessages,ax as Tooltip,JC as formatCurrency,qC as formatDate,UC as formatNumber,YC as formatText,LS as useFetch,pS as useLocalStorage,_S as useToggle};
|
|
1205
|
+
`;function MS({message:n}){const o="success"===n.level?e(Ti,{icon:dn}):e(Ti,{icon:yn});return t(zS,"html"in n?{level:n.level,noFade:n.noFade,role:"alert","aria-live":"error"===n.level?"assertive":"polite",children:[o,e("span",{dangerouslySetInnerHTML:{__html:n.html}})]}:{level:n.level,noFade:n.noFade,role:"alert","aria-live":"error"===n.level?"assertive":"polite",children:[o,n.text]})}function AS({messages:t}){return e(RS,{children:e(DS,{style:{top:`-${55*t.length}px`},children:t.map((t=>e(MS,{message:t},String(t))))})})}const _S=rn.div`
|
|
1206
|
+
background: var(--color--grey-lightest);
|
|
1207
|
+
text-align: center;
|
|
1208
|
+
display: flex;
|
|
1209
|
+
flex-direction: column;
|
|
1210
|
+
justify-content: center;
|
|
1211
|
+
align-items: center;
|
|
1212
|
+
height: 100%;
|
|
1213
|
+
width: 100%;
|
|
1214
|
+
min-height: 100vh;
|
|
1215
|
+
|
|
1216
|
+
i {
|
|
1217
|
+
margin: 0 auto var(--spacing--medium) auto;
|
|
1218
|
+
}
|
|
1219
|
+
button {
|
|
1220
|
+
align-self: center;
|
|
1221
|
+
margin: var(--spacing--medium) auto;
|
|
1222
|
+
}
|
|
1223
|
+
`,LS=rn.div`
|
|
1224
|
+
display: flex;
|
|
1225
|
+
flex-direction: column;
|
|
1226
|
+
align-items: center;
|
|
1227
|
+
justify-content: center;
|
|
1228
|
+
max-width: 600px;
|
|
1229
|
+
`;function FS(){return e(_S,{children:t(LS,{children:[e(Ti,{icon:yn,size:"xlarge",colour:"danger"}),e(xn,{as:"h1",children:"Something went wrong"}),e("p",{children:"There was a problem with that request. Please try again, if the problem persists, please contact support."}),e(Gy,{type:"link",href:"/",children:"Back to homepage"})]})})}function VS(e){const[t,n]=c(e);return{value:t,toggle:f((()=>n((e=>!e))),[]),setTrue:f((()=>n(!0)),[]),setFalse:f((()=>n(!1)),[])}}const jS=(e,t,n)=>{const[o,r]=c(null),[i,l]=c(!1),[s,d]=c(null),p=a(null);return u((()=>{if(!e)return()=>{};let o=!0;l(!0);return p.current&&clearTimeout(p.current),p.current=setTimeout((()=>{(async()=>{try{const n=await fetch(e,t);if(!n.ok)throw new Error(`Error: ${n.statusText}`);const a=await n.json();o&&(r(a),l(!1))}catch(e){o&&(d(e),l(!1))}})()}),n||0),()=>{o=!1,p.current&&clearTimeout(p.current)}}),[e,t,n]),{data:o,loading:i,error:s}};function BS(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function HS(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const WS=6048e5,GS=864e5,qS=6e4,US=36e5;let YS={};function KS(){return YS}function JS(e,t){const n=KS(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=BS(e),a=r.getDay(),i=(a<o?7:0)+a-o;return r.setDate(r.getDate()-i),r.setHours(0,0,0,0),r}function XS(e){return JS(e,{weekStartsOn:1})}function QS(e){const t=BS(e),n=t.getFullYear(),o=HS(e,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const r=XS(o),a=HS(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const i=XS(a);return t.getTime()>=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function ZS(e){const t=BS(e);return t.setHours(0,0,0,0),t}function eC(e){const t=BS(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function tC(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const n=BS(e);return!isNaN(Number(n))}const nC={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function oC(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const rC={date:oC({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:oC({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:oC({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},aC={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function iC(e){return(t,n)=>{let o;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;o=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;o=e.values[r]||e.values[t]}return o[e.argumentCallback?e.argumentCallback(t):t]}}function lC(e){return(t,n={})=>{const o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;const i=a[0],l=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(e=>e.test(i))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(l,(e=>e.test(i)));let c;c=e.valueCallback?e.valueCallback(s):s,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}var sC;const cC={code:"en-US",formatDistance:(e,t,n)=>{let o;const r=nC[e];return o="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o},formatLong:rC,formatRelative:(e,t,n,o)=>aC[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:iC({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:iC({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:iC({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:iC({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:iC({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(sC={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(sC.matchPattern);if(!n)return null;const o=n[0],r=e.match(sC.parsePattern);if(!r)return null;let a=sC.valueCallback?sC.valueCallback(r[0]):r[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(o.length)}}),era:lC({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:lC({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:lC({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:lC({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:lC({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function uC(e){const t=BS(e),n=function(e,t){const n=ZS(e),o=ZS(t),r=+n-eC(n),a=+o-eC(o);return Math.round((r-a)/GS)}(t,function(e){const t=BS(e),n=HS(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function dC(e){const t=BS(e),n=+XS(t)-+function(e){const t=QS(e),n=HS(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),XS(n)}(t);return Math.round(n/WS)+1}function pC(e,t){const n=BS(e),o=n.getFullYear(),r=KS(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=HS(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);const l=JS(i,t),s=HS(e,0);s.setFullYear(o,0,a),s.setHours(0,0,0,0);const c=JS(s,t);return n.getTime()>=l.getTime()?o+1:n.getTime()>=c.getTime()?o:o-1}function fC(e,t){const n=BS(e),o=+JS(n,t)-+function(e,t){const n=KS(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=pC(e,t),a=HS(e,0);return a.setFullYear(r,0,o),a.setHours(0,0,0,0),JS(a,t)}(n,t);return Math.round(o/WS)+1}function mC(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const gC={y(e,t){const n=e.getFullYear(),o=n>0?n:1-n;return mC("yy"===t?o%100:o,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):mC(n+1,2)},d:(e,t)=>mC(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>mC(e.getHours()%12||12,t.length),H:(e,t)=>mC(e.getHours(),t.length),m:(e,t)=>mC(e.getMinutes(),t.length),s:(e,t)=>mC(e.getSeconds(),t.length),S(e,t){const n=t.length,o=e.getMilliseconds();return mC(Math.trunc(o*Math.pow(10,n-3)),t.length)}},hC="midnight",vC="noon",bC="morning",yC="afternoon",wC="evening",xC="night",SC={G:function(e,t,n){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),o=t>0?t:1-t;return n.ordinalNumber(o,{unit:"year"})}return gC.y(e,t)},Y:function(e,t,n,o){const r=pC(e,o),a=r>0?r:1-r;if("YY"===t){return mC(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):mC(a,t.length)},R:function(e,t){return mC(QS(e),t.length)},u:function(e,t){return mC(e.getFullYear(),t.length)},Q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return mC(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return mC(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){const o=e.getMonth();switch(t){case"M":case"MM":return gC.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return mC(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){const r=fC(e,o);return"wo"===t?n.ordinalNumber(r,{unit:"week"}):mC(r,t.length)},I:function(e,t,n){const o=dC(e);return"Io"===t?n.ordinalNumber(o,{unit:"week"}):mC(o,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):gC.d(e,t)},D:function(e,t,n){const o=uC(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):mC(o,t.length)},E:function(e,t,n){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){const r=e.getDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return mC(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){const r=e.getDay(),a=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return mC(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const o=e.getDay(),r=0===o?7:o;switch(t){case"i":return String(r);case"ii":return mC(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const o=e.getHours();let r;switch(r=12===o?vC:0===o?hC:o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const o=e.getHours();let r;switch(r=o>=17?wC:o>=12?yC:o>=4?bC:xC,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return gC.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):gC.H(e,t)},K:function(e,t,n){const o=e.getHours()%12;return"Ko"===t?n.ordinalNumber(o,{unit:"hour"}):mC(o,t.length)},k:function(e,t,n){let o=e.getHours();return 0===o&&(o=24),"ko"===t?n.ordinalNumber(o,{unit:"hour"}):mC(o,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):gC.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):gC.s(e,t)},S:function(e,t){return gC.S(e,t)},X:function(e,t,n){const o=e.getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return kC(o);case"XXXX":case"XX":return OC(o);default:return OC(o,":")}},x:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"x":return kC(o);case"xxxx":case"xx":return OC(o);default:return OC(o,":")}},O:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+CC(o,":");default:return"GMT"+OC(o,":")}},z:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+CC(o,":");default:return"GMT"+OC(o,":")}},t:function(e,t,n){return mC(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return mC(e.getTime(),t.length)}};function CC(e,t=""){const n=e>0?"-":"+",o=Math.abs(e),r=Math.trunc(o/60),a=o%60;return 0===a?n+String(r):n+String(r)+t+mC(a,2)}function kC(e,t){if(e%60==0){return(e>0?"-":"+")+mC(Math.abs(e)/60,2)}return OC(e,t)}function OC(e,t=""){const n=e>0?"-":"+",o=Math.abs(e);return n+mC(Math.trunc(o/60),2)+t+mC(o%60,2)}const IC=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},EC=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},PC={p:EC,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],o=n[1],r=n[2];if(!r)return IC(e,t);let a;switch(o){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",IC(o,t)).replace("{{time}}",EC(r,t))}},NC=/^D+$/,$C=/^Y+$/,TC=["D","DD","YY","YYYY"];const RC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zC=/^'([^]*?)'?$/,MC=/''/g,AC=/[a-zA-Z]/;function _C(e,t,n){const o=KS(),r=o.locale??cC,a=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,l=BS(e);if(!tC(l))throw new RangeError("Invalid time value");let s=t.match(DC).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,PC[t])(e,r.formatLong)}return e})).join("").match(RC).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:LC(e)};if(SC[t])return{isToken:!0,value:e};if(t.match(AC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));r.localize.preprocessor&&(s=r.localize.preprocessor(l,s));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:r};return s.map((n=>{if(!n.isToken)return n.value;const o=n.value;(function(e){return $C.test(e)}(o)||function(e){return NC.test(e)}(o))&&function(e,t,n){const o=function(e,t,n){const o="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(o),TC.includes(e))throw new RangeError(o)}(o,t,String(e));return(0,SC[o[0]])(l,o,r.localize,c)})).join("")}function LC(e){const t=e.match(zC);return t?t[1].replace(MC,"'"):e}function FC(e,t){const n=function(e){const t={},n=e.split(VC.dateTimeDelimiter);let o;if(n.length>2)return t;/:/.test(n[0])?o=n[0]:(t.date=n[0],o=n[1],VC.timeZoneDelimiter.test(t.date)&&(t.date=e.split(VC.timeZoneDelimiter)[0],o=e.substr(t.date.length,e.length)));if(o){const e=VC.timezone.exec(o);e?(t.time=o.replace(e[1],""),t.timezone=e[1]):t.time=o}return t}(e);let o;if(n.date){const e=function(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),o=e.match(n);if(!o)return{year:NaN,restDateString:""};const r=o[1]?parseInt(o[1]):null,a=o[2]?parseInt(o[2]):null;return{year:null===a?r:100*a,restDateString:e.slice((o[1]||o[2]).length)}}(n.date,2);o=function(e,t){if(null===t)return new Date(NaN);const n=e.match(jC);if(!n)return new Date(NaN);const o=!!n[4],r=WC(n[1]),a=WC(n[2])-1,i=WC(n[3]),l=WC(n[4]),s=WC(n[5])-1;if(o)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,l,s)?function(e,t,n){const o=new Date(0);o.setUTCFullYear(e,0,4);const r=o.getUTCDay()||7,a=7*(t-1)+n+1-r;return o.setUTCDate(o.getUTCDate()+a),o}(t,l,s):new Date(NaN);{const e=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(qC[t]||(UC(e)?29:28))}(t,a,i)&&function(e,t){return t>=1&&t<=(UC(e)?366:365)}(t,r)?(e.setUTCFullYear(t,a,Math.max(r,i)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const r=o.getTime();let a,i=0;if(n.time&&(i=function(e){const t=e.match(BC);if(!t)return NaN;const n=GC(t[1]),o=GC(t[2]),r=GC(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,o,r))return NaN;return n*US+o*qS+1e3*r}(n.time),isNaN(i)))return new Date(NaN);if(!n.timezone){const e=new Date(r+i),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return a=function(e){if("Z"===e)return 0;const t=e.match(HC);if(!t)return 0;const n="+"===t[1]?-1:1,o=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,r))return NaN;return n*(o*US+r*qS)}(n.timezone),isNaN(a)?new Date(NaN):new Date(r+i+a)}const VC={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},jC=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,BC=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,HC=/^([+-])(\d{2})(?::?(\d{2}))?$/;function WC(e){return e?parseInt(e):1}function GC(e){return e&&parseFloat(e.replace(",","."))||0}const qC=[31,null,31,30,31,30,31,31,30,31,30,31];function UC(e){return e%400==0||e%4==0&&e%100!=0}const YC="-",KC=(e,t="dd MMM yyyy")=>{if(""===e||null==e)return YC;const n=FC(e);return tC(n)?_C(n,t):YC},JC=e=>""===e||null==e?YC:e.toLocaleString(),XC=e=>""===e||null==e?YC:e,QC={style:"currency",currency:"GBP",minimumFractionDigits:0,maximumFractionDigits:0},ZC=(e,t="en-GB",n=QC)=>{let o=e;if(""===o||null==o)return YC;"string"==typeof e&&(o=Number(e));return new Intl.NumberFormat(t,{...QC,...n}).format(o)};export{Ai as Accordion,ow as AppBar,aw as Autocomplete,cw as AutocompleteSelectMultiple,mw as Badge,xb as Box,bw as Breadcrumb,Gy as Button,yw as Chip,ww as Divider,_w as Drawer,Lw as Dropdown,FS as FullPageErrorFallback,Fw as Grid,xn as Heading,Ti as Icon,ov as IconButton,Vw as Input,Gw as Layout,iw as List,nh as ListItem,yh as ListItemButton,Qb as ListItemDecorator,Dy as LoadingSpinner,Uy as Logo,Ny as Menu,cy as MenuButton,Py as MenuHeading,qw as MenuItem,Jw as ProgressBar,Xw as ProgressCircle,tx as ReadMore,ox as RelativeTime,fx as StatusIcon,bS as Table,IS as Tabs,TS as TextBlock,gy as TextField,AS as ToastMessages,ax as Tooltip,ZC as formatCurrency,KC as formatDate,JC as formatNumber,XC as formatText,jS as useFetch,pS as useLocalStorage,VS as useToggle};
|
|
1206
1230
|
//# sourceMappingURL=index.js.map
|