@riab/cpm-archiving 1.0.13-beta.18 → 1.0.13-beta.19
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/cpm-archiving.js +1 -1
- package/package.json +1 -1
package/dist/cpm-archiving.js
CHANGED
|
@@ -611,7 +611,7 @@ See the full list of free and premium components here: ${Bte}`),console.groupEnd
|
|
|
611
611
|
cursor-pointer
|
|
612
612
|
min-w-[200px]
|
|
613
613
|
${a}
|
|
614
|
-
`,disabled:i,style:{paddingRight:"2.5rem"},children:[m.jsx("option",{value:"",disabled:!0,children:r}),e.map(o=>m.jsx("option",{value:o.value,children:o.label},o.value))]}),!i&&m.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",children:m.jsx("svg",{className:"w-4 h-4 text-[#213F4A]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})}const cg=(e,t=!1)=>({queryKey:["client_review_periods",e,t],queryFn:async()=>await At.executeRequest(`/clientreviewperiods/list?ArchivingType=${e}&completed=${t}`,"GET")}),GI=e=>{const t=ln();return Bt({mutationFn:n=>At.executeRequest("/Archiving/mark_review_period_completed","POST",{reviewPeriodId:n}),onSuccess:()=>{t.invalidateQueries({queryKey:["client_review_periods",e,!1]})},onError:()=>{Ze.error("Error occurred while updating item")}})},Dq=(e,t,n)=>({queryKey:["client_review_period_details",e,t,n],queryFn:async()=>await At.executeRequest(`/clientreviewperiods/details?ArchivingType=${e}&ReviewPeriodId=${t}&EsId=${n}`,"GET")}),Mq=6048e5,die=864e5,fie=6e4,hie=36e5,mie=1e3,Ij=Symbol.for("constructDateFrom");function jr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ij in e?e[Ij](t):e instanceof Date?new e.constructor(t):new Date(t)}function Nr(e,t){return jr(t||e,e)}function XI(e,t,n){const r=Nr(e,n==null?void 0:n.in);return isNaN(t)?jr((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function gie(e,t,n){const r=Nr(e,n==null?void 0:n.in);if(isNaN(t))return jr(e,NaN);if(!t)return r;const a=r.getDate(),i=jr(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}let pie={};function kf(){return pie}function Fl(e,t){var u,c,h,p,g,b,y,A;const n=kf(),r=(A=(y=(p=(h=t==null?void 0:t.weekStartsOn)!=null?h:(c=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)!=null?p:n.weekStartsOn)!=null?y:(b=(g=n.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)!=null?A:0,a=Nr(e,t==null?void 0:t.in),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function xf(e,t){return Fl(e,{...t,weekStartsOn:1})}function Pq(e,t){const n=Nr(e,t==null?void 0:t.in),r=n.getFullYear(),a=jr(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=xf(a),o=jr(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const u=xf(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function db(e){const t=Nr(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 vie(e,...t){const n=jr.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function fb(e,t){const n=Nr(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function bie(e,t,n){const[r,a]=vie(n==null?void 0:n.in,e,t),i=fb(r),o=fb(a),u=+i-db(i),c=+o-db(o);return Math.round((u-c)/die)}function yie(e,t){const n=Pq(e,t),r=jr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xf(r)}function Aie(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xie(e){return!(!Aie(e)&&typeof e!="number"||isNaN(+Nr(e)))}function Dj(e,t){const n=Nr(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function wie(e,t){const n=Nr(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Sie={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"}},Eie=(e,t,n)=>{let r;const a=Sie[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function hx(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Cie={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Rie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Oie={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Iie={date:hx({formats:Cie,defaultWidth:"full"}),time:hx({formats:Rie,defaultWidth:"full"}),dateTime:hx({formats:Oie,defaultWidth:"full"})},Die={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Mie=(e,t,n,r)=>Die[e];function gm(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,u=n!=null&&n.width?String(n.width):o;a=e.formattingValues[u]||e.formattingValues[o]}else{const o=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[u]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const Pie={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Tie={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_ie={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"]},jie={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"]},Nie={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"}},Bie={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"}},Lie=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Fie={ordinalNumber:Lie,era:gm({values:Pie,defaultWidth:"wide"}),quarter:gm({values:Tie,defaultWidth:"wide",argumentCallback:e=>e-1}),month:gm({values:_ie,defaultWidth:"wide"}),day:gm({values:jie,defaultWidth:"wide"}),dayPeriod:gm({values:Nie,defaultWidth:"wide",formattingValues:Bie,defaultFormattingWidth:"wide"})};function pm(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(u)?qie(u,g=>g.test(o)):kie(u,g=>g.test(o));let h;h=e.valueCallback?e.valueCallback(c):c,h=n.valueCallback?n.valueCallback(h):h;const p=t.slice(o.length);return{value:h,rest:p}}}function kie(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function qie(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function zie(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const u=t.slice(a.length);return{value:o,rest:u}}}const Qie=/^(\d+)(th|st|nd|rd)?/i,Hie=/\d+/i,Vie={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},Yie={any:[/^b/i,/^(a|c)/i]},Wie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Uie={any:[/1/i,/2/i,/3/i,/4/i]},Gie={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},Xie={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]},Zie={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},Kie={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]},Jie={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},$ie={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}},ese={ordinalNumber:zie({matchPattern:Qie,parsePattern:Hie,valueCallback:e=>parseInt(e,10)}),era:pm({matchPatterns:Vie,defaultMatchWidth:"wide",parsePatterns:Yie,defaultParseWidth:"any"}),quarter:pm({matchPatterns:Wie,defaultMatchWidth:"wide",parsePatterns:Uie,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pm({matchPatterns:Gie,defaultMatchWidth:"wide",parsePatterns:Xie,defaultParseWidth:"any"}),day:pm({matchPatterns:Zie,defaultMatchWidth:"wide",parsePatterns:Kie,defaultParseWidth:"any"}),dayPeriod:pm({matchPatterns:Jie,defaultMatchWidth:"any",parsePatterns:$ie,defaultParseWidth:"any"})},Tq={code:"en-US",formatDistance:Eie,formatLong:Iie,formatRelative:Mie,localize:Fie,match:ese,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tse(e,t){const n=Nr(e,t==null?void 0:t.in);return bie(n,wie(n))+1}function _q(e,t){const n=Nr(e,t==null?void 0:t.in),r=+xf(n)-+yie(n);return Math.round(r/Mq)+1}function ZI(e,t){var p,g,b,y,A,x,w,C;const n=Nr(e,t==null?void 0:t.in),r=n.getFullYear(),a=kf(),i=(C=(w=(y=(b=t==null?void 0:t.firstWeekContainsDate)!=null?b:(g=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)!=null?y:a.firstWeekContainsDate)!=null?w:(x=(A=a.locale)==null?void 0:A.options)==null?void 0:x.firstWeekContainsDate)!=null?C:1,o=jr((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const u=Fl(o,t),c=jr((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const h=Fl(c,t);return+n>=+u?r+1:+n>=+h?r:r-1}function nse(e,t){var u,c,h,p,g,b,y,A;const n=kf(),r=(A=(y=(p=(h=t==null?void 0:t.firstWeekContainsDate)!=null?h:(c=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)!=null?p:n.firstWeekContainsDate)!=null?y:(b=(g=n.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)!=null?A:1,a=ZI(e,t),i=jr((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),Fl(i,t)}function jq(e,t){const n=Nr(e,t==null?void 0:t.in),r=+Fl(n,t)-+nse(n,t);return Math.round(r/Mq)+1}function Wn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ll={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Wn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Wn(n+1,2)},d(e,t){return Wn(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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Wn(e.getHours()%12||12,t.length)},H(e,t){return Wn(e.getHours(),t.length)},m(e,t){return Wn(e.getMinutes(),t.length)},s(e,t){return Wn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return Wn(a,t.length)}},Md={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mj={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return ll.y(e,t)},Y:function(e,t,n,r){const a=ZI(e,r),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return Wn(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Wn(i,t.length)},R:function(e,t){const n=Pq(e);return Wn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Wn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Wn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Wn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ll.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Wn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=jq(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):Wn(a,t.length)},I:function(e,t,n){const r=_q(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Wn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ll.d(e,t)},D:function(e,t,n){const r=tse(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Wn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":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"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Wn(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Wn(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return Wn(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=Md.noon:r===0?a=Md.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=Md.evening:r>=12?a=Md.afternoon:r>=4?a=Md.morning:a=Md.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ll.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ll.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Wn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Wn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ll.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ll.s(e,t)},S:function(e,t){return ll.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Tj(r);case"XXXX":case"XX":return _u(r);case"XXXXX":case"XXX":default:return _u(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Tj(r);case"xxxx":case"xx":return _u(r);case"xxxxx":case"xxx":default:return _u(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pj(r,":");case"OOOO":default:return"GMT"+_u(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pj(r,":");case"zzzz":default:return"GMT"+_u(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Wn(r,t.length)},T:function(e,t,n){return Wn(+e,t.length)}};function Pj(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+Wn(i,2)}function Tj(e,t){return e%60===0?(e>0?"-":"+")+Wn(Math.abs(e)/60,2):_u(e,t)}function _u(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Wn(Math.trunc(r/60),2),i=Wn(r%60,2);return n+a+t+i}const _j=(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"});case"PPPP":default:return t.date({width:"full"})}},Nq=(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"});case"pppp":default:return t.time({width:"full"})}},rse=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return _j(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",_j(r,t)).replace("{{time}}",Nq(a,t))},yO={p:Nq,P:rse},ase=/^D+$/,ise=/^Y+$/,sse=["D","DD","YY","YYYY"];function Bq(e){return ase.test(e)}function Lq(e){return ise.test(e)}function AO(e,t,n){const r=ose(e,t,n);if(console.warn(r),sse.includes(e))throw new RangeError(r)}function ose(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lse=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,use=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cse=/^'([^]*?)'?$/,dse=/''/g,fse=/[a-zA-Z]/;function sa(e,t,n){var p,g,b,y,A,x,w,C,_;const r=kf(),a=(p=r.locale)!=null?p:Tq,i=(A=(y=r.firstWeekContainsDate)!=null?y:(b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)!=null?A:1,o=(_=(C=r.weekStartsOn)!=null?C:(w=(x=r.locale)==null?void 0:x.options)==null?void 0:w.weekStartsOn)!=null?_:0,u=Nr(e,n==null?void 0:n.in);if(!xie(u))throw new RangeError("Invalid time value");let c=t.match(use).map(D=>{const T=D[0];if(T==="p"||T==="P"){const E=yO[T];return E(D,a.formatLong)}return D}).join("").match(lse).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const T=D[0];if(T==="'")return{isToken:!1,value:hse(D)};if(Mj[T])return{isToken:!0,value:D};if(T.match(fse))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:D}});a.localize.preprocessor&&(c=a.localize.preprocessor(u,c));const h={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return c.map(D=>{if(!D.isToken)return D.value;const T=D.value;(Lq(T)||Bq(T))&&AO(T,t,String(e));const E=Mj[T[0]];return E(u,T,a.localize,h)}).join("")}function hse(e){const t=e.match(cse);return t?t[1].replace(dse,"'"):e}function mse(){return Object.assign({},kf())}function gse(e,t){const n=Nr(e,t==null?void 0:t.in).getDay();return n===0?7:n}function pse(e,t){const n=vse(t)?new t(0):jr(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function vse(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const bse=10;let Fq=class{constructor(){ke(this,"subPriority",0)}validate(t,n){return!0}};class yse extends Fq{constructor(t,n,r,a,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=a,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Ase extends Fq{constructor(n,r){super();ke(this,"priority",bse);ke(this,"subPriority",-1);this.context=n||(a=>jr(r,a))}set(n,r){return r.timestampIsSet?n:jr(n,pse(n,this.context))}}let qn=class{run(t,n,r,a){const i=this.parse(t,n,r,a);return i?{setter:new yse(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}},xse=class extends qn{constructor(){super(...arguments);ke(this,"priority",140);ke(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"})||a.era(n,{width:"narrow"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})||a.era(n,{width:"abbreviated"})||a.era(n,{width:"narrow"})}}set(n,r,a){return r.era=a,n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}};const Tr={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},As={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function _r(e,t){return e&&{value:t(e.value),rest:e.rest}}function gr(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function xs(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,a=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(a*hie+i*fie+o*mie),rest:t.slice(n[0].length)}}function kq(e){return gr(Tr.anyDigitsSigned,e)}function Cr(e,t){switch(e){case 1:return gr(Tr.singleDigit,t);case 2:return gr(Tr.twoDigits,t);case 3:return gr(Tr.threeDigits,t);case 4:return gr(Tr.fourDigits,t);default:return gr(new RegExp("^\\d{1,"+e+"}"),t)}}function hb(e,t){switch(e){case 1:return gr(Tr.singleDigitSigned,t);case 2:return gr(Tr.twoDigitsSigned,t);case 3:return gr(Tr.threeDigitsSigned,t);case 4:return gr(Tr.fourDigitsSigned,t);default:return gr(new RegExp("^-?\\d{1,"+e+"}"),t)}}function KI(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function qq(e,t){const n=t>0,r=n?t:1-t;let a;if(r<=50)a=e||100;else{const i=r+50,o=Math.trunc(i/100)*100,u=e>=i%100;a=e+o-(u?100:0)}return n?a:1-a}function zq(e){return e%400===0||e%4===0&&e%100!==0}let wse=class extends qn{constructor(){super(...arguments);ke(this,"priority",130);ke(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,a){const i=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return _r(Cr(4,n),i);case"yo":return _r(a.ordinalNumber(n,{unit:"year"}),i);default:return _r(Cr(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,a){const i=n.getFullYear();if(a.isTwoDigitYear){const u=qq(a.year,i);return n.setFullYear(u,0,1),n.setHours(0,0,0,0),n}const o=!("era"in r)||r.era===1?a.year:1-a.year;return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}},Sse=class extends qn{constructor(){super(...arguments);ke(this,"priority",130);ke(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,a){const i=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return _r(Cr(4,n),i);case"Yo":return _r(a.ordinalNumber(n,{unit:"year"}),i);default:return _r(Cr(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,a,i){const o=ZI(n,i);if(a.isTwoDigitYear){const c=qq(a.year,o);return n.setFullYear(c,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Fl(n,i)}const u=!("era"in r)||r.era===1?a.year:1-a.year;return n.setFullYear(u,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Fl(n,i)}},Ese=class extends qn{constructor(){super(...arguments);ke(this,"priority",130);ke(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return hb(r==="R"?4:r.length,n)}set(n,r,a){const i=jr(n,0);return i.setFullYear(a,0,4),i.setHours(0,0,0,0),xf(i)}},Cse=class extends qn{constructor(){super(...arguments);ke(this,"priority",130);ke(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return hb(r==="u"?4:r.length,n)}set(n,r,a){return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}},Rse=class extends qn{constructor(){super(...arguments);ke(this,"priority",120);ke(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"Q":case"QQ":return Cr(r.length,n);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"})||a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})||a.quarter(n,{width:"abbreviated",context:"formatting"})||a.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,a){return n.setMonth((a-1)*3,1),n.setHours(0,0,0,0),n}},Ose=class extends qn{constructor(){super(...arguments);ke(this,"priority",120);ke(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"q":case"qq":return Cr(r.length,n);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"})||a.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})||a.quarter(n,{width:"abbreviated",context:"standalone"})||a.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,a){return n.setMonth((a-1)*3,1),n.setHours(0,0,0,0),n}},Ise=class extends qn{constructor(){super(...arguments);ke(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ke(this,"priority",110)}parse(n,r,a){const i=o=>o-1;switch(r){case"M":return _r(gr(Tr.month,n),i);case"MM":return _r(Cr(2,n),i);case"Mo":return _r(a.ordinalNumber(n,{unit:"month"}),i);case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"})||a.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})||a.month(n,{width:"abbreviated",context:"formatting"})||a.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.setMonth(a,1),n.setHours(0,0,0,0),n}},Dse=class extends qn{constructor(){super(...arguments);ke(this,"priority",110);ke(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,a){const i=o=>o-1;switch(r){case"L":return _r(gr(Tr.month,n),i);case"LL":return _r(Cr(2,n),i);case"Lo":return _r(a.ordinalNumber(n,{unit:"month"}),i);case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"})||a.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})||a.month(n,{width:"abbreviated",context:"standalone"})||a.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.setMonth(a,1),n.setHours(0,0,0,0),n}};function Mse(e,t,n){const r=Nr(e,n==null?void 0:n.in),a=jq(r,n)-t;return r.setDate(r.getDate()-a*7),Nr(r,n==null?void 0:n.in)}let Pse=class extends qn{constructor(){super(...arguments);ke(this,"priority",100);ke(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,a){switch(r){case"w":return gr(Tr.week,n);case"wo":return a.ordinalNumber(n,{unit:"week"});default:return Cr(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,a,i){return Fl(Mse(n,a,i),i)}};function Tse(e,t,n){const r=Nr(e,n==null?void 0:n.in),a=_q(r,n)-t;return r.setDate(r.getDate()-a*7),r}let _se=class extends qn{constructor(){super(...arguments);ke(this,"priority",100);ke(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,a){switch(r){case"I":return gr(Tr.week,n);case"Io":return a.ordinalNumber(n,{unit:"week"});default:return Cr(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,a){return xf(Tse(n,a))}};const jse=[31,28,31,30,31,30,31,31,30,31,30,31],Nse=[31,29,31,30,31,30,31,31,30,31,30,31];let Bse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"subPriority",1);ke(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"d":return gr(Tr.date,n);case"do":return a.ordinalNumber(n,{unit:"date"});default:return Cr(r.length,n)}}validate(n,r){const a=n.getFullYear(),i=zq(a),o=n.getMonth();return i?r>=1&&r<=Nse[o]:r>=1&&r<=jse[o]}set(n,r,a){return n.setDate(a),n.setHours(0,0,0,0),n}},Lse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"subpriority",1);ke(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,a){switch(r){case"D":case"DD":return gr(Tr.dayOfYear,n);case"Do":return a.ordinalNumber(n,{unit:"date"});default:return Cr(r.length,n)}}validate(n,r){const a=n.getFullYear();return zq(a)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,a){return n.setMonth(0,a),n.setHours(0,0,0,0),n}};function JI(e,t,n){var g,b,y,A,x,w,C,_;const r=kf(),a=(_=(C=(A=(y=n==null?void 0:n.weekStartsOn)!=null?y:(b=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)!=null?A:r.weekStartsOn)!=null?C:(w=(x=r.locale)==null?void 0:x.options)==null?void 0:w.weekStartsOn)!=null?_:0,i=Nr(e,n==null?void 0:n.in),o=i.getDay(),c=(t%7+7)%7,h=7-a,p=t<0||t>6?t-(o+h)%7:(c+h)%7-(o+h)%7;return XI(i,p,n)}let Fse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,i){return n=JI(n,a,i),n.setHours(0,0,0,0),n}},kse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,a,i){const o=u=>{const c=Math.floor((u-1)/7)*7;return(u+i.weekStartsOn+6)%7+c};switch(r){case"e":case"ee":return _r(Cr(r.length,n),o);case"eo":return _r(a.ordinalNumber(n,{unit:"day"}),o);case"eee":return a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,i){return n=JI(n,a,i),n.setHours(0,0,0,0),n}},qse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,a,i){const o=u=>{const c=Math.floor((u-1)/7)*7;return(u+i.weekStartsOn+6)%7+c};switch(r){case"c":case"cc":return _r(Cr(r.length,n),o);case"co":return _r(a.ordinalNumber(n,{unit:"day"}),o);case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"})||a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})||a.day(n,{width:"abbreviated",context:"standalone"})||a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,i){return n=JI(n,a,i),n.setHours(0,0,0,0),n}};function zse(e,t,n){const r=Nr(e,n==null?void 0:n.in),a=gse(r,n),i=t-a;return XI(r,i,n)}let Qse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,a){const i=o=>o===0?7:o;switch(r){case"i":case"ii":return Cr(r.length,n);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return _r(a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return _r(a.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return _r(a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return _r(a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,a){return n=zse(n,a),n.setHours(0,0,0,0),n}},Hse=class extends qn{constructor(){super(...arguments);ke(this,"priority",80);ke(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(KI(a),0,0,0),n}},Vse=class extends qn{constructor(){super(...arguments);ke(this,"priority",80);ke(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(KI(a),0,0,0),n}},Yse=class extends qn{constructor(){super(...arguments);ke(this,"priority",80);ke(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(KI(a),0,0,0),n}},Wse=class extends qn{constructor(){super(...arguments);ke(this,"priority",70);ke(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,a){switch(r){case"h":return gr(Tr.hour12h,n);case"ho":return a.ordinalNumber(n,{unit:"hour"});default:return Cr(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,a){const i=n.getHours()>=12;return i&&a<12?n.setHours(a+12,0,0,0):!i&&a===12?n.setHours(0,0,0,0):n.setHours(a,0,0,0),n}},Use=class extends qn{constructor(){super(...arguments);ke(this,"priority",70);ke(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,a){switch(r){case"H":return gr(Tr.hour23h,n);case"Ho":return a.ordinalNumber(n,{unit:"hour"});default:return Cr(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,a){return n.setHours(a,0,0,0),n}},Gse=class extends qn{constructor(){super(...arguments);ke(this,"priority",70);ke(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,a){switch(r){case"K":return gr(Tr.hour11h,n);case"Ko":return a.ordinalNumber(n,{unit:"hour"});default:return Cr(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.getHours()>=12&&a<12?n.setHours(a+12,0,0,0):n.setHours(a,0,0,0),n}},Xse=class extends qn{constructor(){super(...arguments);ke(this,"priority",70);ke(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,a){switch(r){case"k":return gr(Tr.hour24h,n);case"ko":return a.ordinalNumber(n,{unit:"hour"});default:return Cr(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,a){const i=a<=24?a%24:a;return n.setHours(i,0,0,0),n}},Zse=class extends qn{constructor(){super(...arguments);ke(this,"priority",60);ke(this,"incompatibleTokens",["t","T"])}parse(n,r,a){switch(r){case"m":return gr(Tr.minute,n);case"mo":return a.ordinalNumber(n,{unit:"minute"});default:return Cr(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,a){return n.setMinutes(a,0,0),n}},Kse=class extends qn{constructor(){super(...arguments);ke(this,"priority",50);ke(this,"incompatibleTokens",["t","T"])}parse(n,r,a){switch(r){case"s":return gr(Tr.second,n);case"so":return a.ordinalNumber(n,{unit:"second"});default:return Cr(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,a){return n.setSeconds(a,0),n}},Jse=class extends qn{constructor(){super(...arguments);ke(this,"priority",30);ke(this,"incompatibleTokens",["t","T"])}parse(n,r){const a=i=>Math.trunc(i*Math.pow(10,-r.length+3));return _r(Cr(r.length,n),a)}set(n,r,a){return n.setMilliseconds(a),n}},$se=class extends qn{constructor(){super(...arguments);ke(this,"priority",10);ke(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return xs(As.basicOptionalMinutes,n);case"XX":return xs(As.basic,n);case"XXXX":return xs(As.basicOptionalSeconds,n);case"XXXXX":return xs(As.extendedOptionalSeconds,n);case"XXX":default:return xs(As.extended,n)}}set(n,r,a){return r.timestampIsSet?n:jr(n,n.getTime()-db(n)-a)}},eoe=class extends qn{constructor(){super(...arguments);ke(this,"priority",10);ke(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return xs(As.basicOptionalMinutes,n);case"xx":return xs(As.basic,n);case"xxxx":return xs(As.basicOptionalSeconds,n);case"xxxxx":return xs(As.extendedOptionalSeconds,n);case"xxx":default:return xs(As.extended,n)}}set(n,r,a){return r.timestampIsSet?n:jr(n,n.getTime()-db(n)-a)}},toe=class extends qn{constructor(){super(...arguments);ke(this,"priority",40);ke(this,"incompatibleTokens","*")}parse(n){return kq(n)}set(n,r,a){return[jr(n,a*1e3),{timestampIsSet:!0}]}},noe=class extends qn{constructor(){super(...arguments);ke(this,"priority",20);ke(this,"incompatibleTokens","*")}parse(n){return kq(n)}set(n,r,a){return[jr(n,a),{timestampIsSet:!0}]}};const roe={G:new xse,y:new wse,Y:new Sse,R:new Ese,u:new Cse,Q:new Rse,q:new Ose,M:new Ise,L:new Dse,w:new Pse,I:new _se,d:new Bse,D:new Lse,E:new Fse,e:new kse,c:new qse,i:new Qse,a:new Hse,b:new Vse,B:new Yse,h:new Wse,H:new Use,K:new Gse,k:new Xse,m:new Zse,s:new Kse,S:new Jse,X:new $se,x:new eoe,t:new toe,T:new noe},aoe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ioe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,soe=/^'([^]*?)'?$/,ooe=/''/g,loe=/\S/,uoe=/[a-zA-Z]/;function Qq(e,t,n,r){var w,C,_,D,T,E,M,O,I;const a=()=>jr(n,NaN),i=mse(),o=(w=i.locale)!=null?w:Tq,u=(T=(D=i.firstWeekContainsDate)!=null?D:(_=(C=i.locale)==null?void 0:C.options)==null?void 0:_.firstWeekContainsDate)!=null?T:1,c=(I=(O=i.weekStartsOn)!=null?O:(M=(E=i.locale)==null?void 0:E.options)==null?void 0:M.weekStartsOn)!=null?I:0,h={firstWeekContainsDate:u,weekStartsOn:c,locale:o},p=[new Ase(r==null?void 0:r.in,n)],g=t.match(ioe).map(P=>{const j=P[0];if(j in yO){const L=yO[j];return L(P,o.formatLong)}return P}).join("").match(aoe),b=[];for(let P of g){Lq(P)&&AO(P,t,e),Bq(P)&&AO(P,t,e);const j=P[0],L=roe[j];if(L){const{incompatibleTokens:k}=L;if(Array.isArray(k)){const Y=b.find(J=>k.includes(J.token)||J.token===j);if(Y)throw new RangeError(`The format string mustn't contain \`${Y.fullToken}\` and \`${P}\` at the same time`)}else if(L.incompatibleTokens==="*"&&b.length>0)throw new RangeError(`The format string mustn't contain \`${P}\` and any other token at the same time`);b.push({token:j,fullToken:P});const q=L.run(e,P,o.match,h);if(!q)return a();p.push(q.setter),e=q.rest}else{if(j.match(uoe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");if(P==="''"?P="'":j==="'"&&(P=coe(P)),e.indexOf(P)===0)e=e.slice(P.length);else return a()}}if(e.length>0&&loe.test(e))return a();const y=p.map(P=>P.priority).sort((P,j)=>j-P).filter((P,j,L)=>L.indexOf(P)===j).map(P=>p.filter(j=>j.priority===P).sort((j,L)=>L.subPriority-j.subPriority)).map(P=>P[0]);let A=Nr(n,r==null?void 0:r.in);if(isNaN(+A))return a();const x={};for(const P of y){if(!P.validate(A,h))return a();const j=P.set(A,x,h);Array.isArray(j)?(A=j[0],Object.assign(x,j[1])):A=j}return A}function coe(e){return e.match(soe)[1].replace(ooe,"'")}function doe(e,t,n){return XI(e,-t,n)}function foe(e,t,n){return gie(e,-t,n)}function hoe(e,t,n){const{years:r=0,months:a=0,weeks:i=0,days:o=0,hours:u=0,minutes:c=0,seconds:h=0}=t,p=foe(e,a+r*12,n),g=doe(p,o+i*7,n),b=c+u*60,A=(h+b*60)*1e3;return jr(e,+g-A)}function $I({title:e,table:t,reviewPeriods:n,onRowClick:r,filters:a,isLoading:i=!1,emptyMessage:o,searchPlaceholder:u=null,paginationControlLabel:c=null}){var L;const{pathname:h}=Rs(),p=Qb(h),[g,b]=N.useState([]),{data:y,isLoading:A,isSuccess:x}=en(cg(p)),{data:w,isLoading:C,isSuccess:_}=en(cg(p,!0));N.useEffect(()=>{x&&b(y.map(k=>({value:k.id,label:`${sa(k.start,"MMM dd, yyyy")} - ${sa(k.end,"MMM dd, yyyy")}${k.isCompleted?" (Completed)":""}`})))},[x,y]);const D=Ht(k=>k.reviewPeriod),T=Ht(k=>k.setReviewPeriod),[E,M]=N.useState(null);N.useEffect(()=>{M(D)},[D]),N.useEffect(()=>{g.length>0&&T(g[0].value)},[g]);const O=p==null?void 0:p.replaceAll("_"," "),I=y==null?void 0:y.find(k=>k.id==D),P=(y==null?void 0:y.every(k=>k==null?void 0:k.isCompleted))||(y==null?void 0:y.length)<1,j=(w==null?void 0:w.length)<1&&(y==null?void 0:y.length)<1||!w&&!y;if(!A&&!C&&j)return O=="email"?m.jsx("div",{className:"mt-10 flex text-center justify-center",children:"Your firm's email journaling settings are configured, but we have not processed any emails yet. Journaled emails will begin processing within one day of being set up."}):m.jsxs("div",{className:"mt-10 flex text-center justify-center",children:["There are no ",O," currently available for review."]});if(!j&&P&&x&&_){const k=w&&w.length>0?(L=w[0])==null?void 0:L.reviewStart:null;return m.jsxs("div",{className:"mt-10 flex text-center justify-center",children:["You’ve completed your ",O," review!",m.jsx("br",{}),"Your next review will be available on ",Yae(new Date(k)),"."]})}return A||C?m.jsx("div",{className:"flex justify-center",children:m.jsx(nn,{size:"xl"})}):m.jsxs("section",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"flex flex-col gap-3",children:m.jsxs("div",{className:"flex items-center gap-7 mb-10",children:[m.jsx("h6",{className:"font-semibold text-lg text-blue-700",children:"Select Review Period:"}),m.jsx(UI,{placeholder:"Select a period",value:E,onChange:k=>M(k),options:g}),m.jsx("button",{type:"button",className:"uppercase cursor-pointer bg-blue-500 px-4 py-2 rounded-sm text-white font-bold",onClick:()=>T(E),children:i?m.jsx(nn,{colorClass:"white"}):"Go"})]})}),I&&(I==null?void 0:I.isCompleted)&&m.jsxs("div",{className:"mb-10 mt-5",children:[m.jsx("hr",{}),m.jsx("div",{className:"text-center",children:m.jsx("p",{className:"mt-[-11px]",children:m.jsx("span",{className:"bg-white px-5",children:"Review Completed"})})})]}),m.jsxs("div",{children:[m.jsxs("h4",{className:"text-brand text-2xl font-semibold leading-9",children:[e," Records"]}),m.jsx(Yb,{table:t,onRowClick:r,filterButtons:a,hasGlobalFilter:!0,emptyMessage:o,searchPlaceholder:u!=null?u:"Search....",paginationControlLabel:c})]})]})}const Rc=e=>({queryKey:["emails",e],queryFn:async()=>e?(await At.executeRequest("/emailaccounts/list","POST",{reviewPeriodId:e,pageIndex:1,pageSize:1e4,filters:[],sortings:[{name:"emailDate",ascending:!0}]})).data||[]:[]}),qf=(e,t,n=!1)=>({queryKey:["emailreview",t],queryFn:()=>At.executeRequest(`/emailaccounts/details?ReviewPeriodId=${e}&ItemId=${t}&IsSpecialReview=${n}`,"GET")}),moe=(e,t=!1)=>({queryKey:["emailreviewmessage",e],queryFn:()=>At.executeRequest(`/emailaccounts/message?S3Path=${e}&IsKeyword=${t}`,"GET")}),goe=()=>{const e=ln();return Bt({mutationFn:t=>At.executeRequest("/emailreviewresponses","POST",{esId:t}),onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while updating item")}})},poe=()=>{const e=ln();return Bt({mutationFn:t=>At.executeRequest("/emailreviewresponses/further","POST",{esId:t}),onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while updating item")}})},eD=()=>{const e=ln();return Bt({mutationFn:({esId:t,note:n,archivingType:r})=>At.executeRequest("/accounts/note","POST",{esId:t.toString(),note:n,archivingType:r}),onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while updating item")}})},voe=(e,t,n)=>({queryKey:["emailexclude",e,n,t],queryFn:()=>At.executeRequest(`/clientdomains/exclude?From=${e}&ItemType=${t}&CurrEmailReviewPeriodId=${n}`,"GET")}),boe=()=>{const e=ln();return Bt({mutationFn:({item:t,itemType:n,currEmailReviewPeriodId:r,filterType:a="blacklist",isEmailLimit:i=!0})=>At.executeRequest("/emailaccounts/deactivate","POST",{item:t,itemType:n,filterType:a,isEmailLimit:i,currEmailReviewPeriodId:r,filters:[],sortings:[]}),onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while excluding item. Please try again!")}})},yoe=()=>{const e=ln();return Bt({mutationFn:({reviewPeriodId:t,isEnable:n})=>{const r=n?"/Archiving/disable_exclusion_confirmation_popup":"/Archiving/enable_exclusion_confirmation_popup";return At.executeRequest(r,"POST",{reviewPeriodId:t})},onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while excluding item. Please try again!")}})},vm=pr(),Aoe=[vm.accessor("from",{header:"From",cell:e=>m.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.getValue()})}),vm.accessor("to",{header:"To",cell:e=>{const t=e.getValue().split(",");let n=null;const r=t[0];return t.length<1&&(n=null),t.length==1?n=r:n=r+" +"+(t.length-1),m.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n})}}),vm.accessor("subject",{header:"Subject",cell:e=>m.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.getValue()})}),vm.accessor("emailDate",{size:110,header:()=>m.jsx("div",{className:"text-right",children:"Date"}),cell:e=>m.jsx("div",{className:"text-right",children:sa(e.getValue(),"MM/dd/yyyy")})}),vm.accessor("status",{header:"Review Status",cell:e=>{const t=e.row.original;return t.isReviewed?m.jsxs("span",{className:"flex items-center gap-2 text-[#008E28]",children:[m.jsx(Oe,{icon:mr})," Reviewed"]}):t.isFurtherReview?m.jsxs("span",{className:"flex items-center gap-2 text-[#D33200]",children:[m.jsx("img",{src:Bg,className:"w-[13px]"})," Needs Further Review"]}):m.jsx("span",{className:"flex items-center gap-2 text-[#0000A9]",children:"Not Reviewed"})}})],xoe=()=>{const e=Ht(w=>w.reviewPeriod),t=ln(),{data:n=[],isLoading:r,isSuccess:a}=en(Rc(e)),[i,o]=N.useState(!1),[u,c]=N.useState(!1),[h,p]=N.useState(!1),[g,b]=N.useState([]);N.useEffect(()=>{t.invalidateQueries({queryKey:["emails",e]})},[e]),N.useEffect(()=>{b(n.filter(w=>(!i||w.isKeyword)&&(!u||w.isHeightenedSupervision)&&(!h||w.isReviewed)))},[i,u,h]),N.useEffect(()=>{!n||!a||b(n)},[n,a]);const y=[{label:"Flagged Words",active:i,onClick:()=>{o(!i)}},{label:"Heightened Supervision",active:u,onClick:()=>{c(!u)}},{label:"Reviewed Emails",active:h,onClick:()=>{p(!h)}}],A=yr({data:g,columns:Aoe,getCoreRowModel:vr(),getPaginationRowModel:br(),getRowId:w=>w.id,getFilteredRowModel:zr(),globalFilterFn:"includesString"}),x=Gr();return m.jsx($I,{searchPlaceholder:"Search Email Records",title:"Email",table:A,filters:y,isLoading:r,emptyMessage:r?"Loading...":"No emails to review for the selected period!",onRowClick:w=>x({to:`/email/${w.original.esId}`}),paginationControlLabel:"emails to review"})},wf=Math.min,ic=Math.max,mb=Math.round,bv=Math.floor,Es=e=>({x:e,y:e}),woe={left:"right",right:"left",bottom:"top",top:"bottom"},Soe={start:"end",end:"start"};function xO(e,t,n){return ic(e,wf(t,n))}function Lg(e,t){return typeof e=="function"?e(t):e}function gc(e){return e.split("-")[0]}function Fg(e){return e.split("-")[1]}function Hq(e){return e==="x"?"y":"x"}function tD(e){return e==="y"?"height":"width"}function sc(e){return["top","bottom"].includes(gc(e))?"y":"x"}function nD(e){return Hq(sc(e))}function Eoe(e,t,n){n===void 0&&(n=!1);const r=Fg(e),a=nD(e),i=tD(a);let o=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=gb(o)),[o,gb(o)]}function Coe(e){const t=gb(e);return[wO(e),t,wO(t)]}function wO(e){return e.replace(/start|end/g,t=>Soe[t])}function Roe(e,t,n){const r=["left","right"],a=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?i:o;default:return[]}}function Ooe(e,t,n,r){const a=Fg(e);let i=Roe(gc(e),n==="start",r);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(wO)))),i}function gb(e){return e.replace(/left|right|bottom|top/g,t=>woe[t])}function Ioe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vq(e){return typeof e!="number"?Ioe(e):{top:e,right:e,bottom:e,left:e}}function pb(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function jj(e,t,n){let{reference:r,floating:a}=e;const i=sc(t),o=nD(t),u=tD(o),c=gc(t),h=i==="y",p=r.x+r.width/2-a.width/2,g=r.y+r.height/2-a.height/2,b=r[u]/2-a[u]/2;let y;switch(c){case"top":y={x:p,y:r.y-a.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-a.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Fg(t)){case"start":y[o]-=b*(n&&h?-1:1);break;case"end":y[o]+=b*(n&&h?-1:1);break}return y}const Doe=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:o}=n,u=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let h=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:g}=jj(h,r,c),b=r,y={},A=0;for(let x=0;x<u.length;x++){const{name:w,fn:C}=u[x],{x:_,y:D,data:T,reset:E}=await C({x:p,y:g,initialPlacement:r,placement:b,strategy:a,middlewareData:y,rects:h,platform:o,elements:{reference:e,floating:t}});p=_!=null?_:p,g=D!=null?D:g,y={...y,[w]:{...y[w],...T}},E&&A<=50&&(A++,typeof E=="object"&&(E.placement&&(b=E.placement),E.rects&&(h=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):E.rects),{x:p,y:g}=jj(h,b,c)),x=-1)}return{x:p,y:g,placement:b,strategy:a,middlewareData:y}};async function Yq(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:o,elements:u,strategy:c}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:b=!1,padding:y=0}=Lg(t,e),A=Vq(y),w=u[b?g==="floating"?"reference":"floating":g],C=pb(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:h,rootBoundary:p,strategy:c})),_=g==="floating"?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),T=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},E=pb(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:D,strategy:c}):_);return{top:(C.top-E.top+A.top)/T.y,bottom:(E.bottom-C.bottom+A.bottom)/T.y,left:(C.left-E.left+A.left)/T.x,right:(E.right-C.right+A.right)/T.x}}const Moe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:o,elements:u,middlewareData:c}=t,{element:h,padding:p=0}=Lg(e,t)||{};if(h==null)return{};const g=Vq(p),b={x:n,y:r},y=nD(a),A=tD(y),x=await o.getDimensions(h),w=y==="y",C=w?"top":"left",_=w?"bottom":"right",D=w?"clientHeight":"clientWidth",T=i.reference[A]+i.reference[y]-b[y]-i.floating[A],E=b[y]-i.reference[y],M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(h));let O=M?M[D]:0;(!O||!await(o.isElement==null?void 0:o.isElement(M)))&&(O=u.floating[D]||i.floating[A]);const I=T/2-E/2,P=O/2-x[A]/2-1,j=wf(g[C],P),L=wf(g[_],P),k=j,q=O-x[A]-L,Y=O/2-x[A]/2+I,J=xO(k,Y,q),H=!c.arrow&&Fg(a)!=null&&Y!==J&&i.reference[A]/2-(Y<k?j:L)-x[A]/2<0,ee=H?Y<k?Y-k:Y-q:0;return{[y]:b[y]+ee,data:{[y]:J,centerOffset:Y-J-ee,...H&&{alignmentOffset:ee}},reset:H}}}),Poe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:o,initialPlacement:u,platform:c,elements:h}=t,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:x=!0,...w}=Lg(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const C=gc(a),_=sc(u),D=gc(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(h.floating)),E=b||(D||!x?[gb(u)]:Coe(u)),M=A!=="none";!b&&M&&E.push(...Ooe(u,x,A,T));const O=[u,...E],I=await Yq(t,w),P=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&P.push(I[C]),g){const J=Eoe(a,o,T);P.push(I[J[0]],I[J[1]])}if(j=[...j,{placement:a,overflows:P}],!P.every(J=>J<=0)){var L,k;const J=(((L=i.flip)==null?void 0:L.index)||0)+1,H=O[J];if(H){var q;const ne=g==="alignment"?_!==sc(H):!1,fe=((q=j[0])==null?void 0:q.overflows[0])>0;if(!ne||fe)return{data:{index:J,overflows:j},reset:{placement:H}}}let ee=(k=j.filter(ne=>ne.overflows[0]<=0).sort((ne,fe)=>ne.overflows[1]-fe.overflows[1])[0])==null?void 0:k.placement;if(!ee)switch(y){case"bestFit":{var Y;const ne=(Y=j.filter(fe=>{if(M){const z=sc(fe.placement);return z===_||z==="y"}return!0}).map(fe=>[fe.placement,fe.overflows.filter(z=>z>0).reduce((z,V)=>z+V,0)]).sort((fe,z)=>fe[1]-z[1])[0])==null?void 0:Y[0];ne&&(ee=ne);break}case"initialPlacement":ee=u;break}if(a!==ee)return{reset:{placement:ee}}}return{}}}};async function Toe(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),o=gc(n),u=Fg(n),c=sc(n)==="y",h=["left","top"].includes(o)?-1:1,p=i&&c?-1:1,g=Lg(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:A}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof A=="number"&&(y=u==="end"?A*-1:A),c?{x:y*p,y:b*h}:{x:b*h,y:y*p}}const _oe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:o,middlewareData:u}=t,c=await Toe(t,e);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},joe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:u={fn:w=>{let{x:C,y:_}=w;return{x:C,y:_}}},...c}=Lg(e,t),h={x:n,y:r},p=await Yq(t,c),g=sc(gc(a)),b=Hq(g);let y=h[b],A=h[g];if(i){const w=b==="y"?"top":"left",C=b==="y"?"bottom":"right",_=y+p[w],D=y-p[C];y=xO(_,y,D)}if(o){const w=g==="y"?"top":"left",C=g==="y"?"bottom":"right",_=A+p[w],D=A-p[C];A=xO(_,A,D)}const x=u.fn({...t,[b]:y,[g]:A});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[b]:i,[g]:o}}}}}};function Wb(){return typeof window!="undefined"}function zf(e){return Wq(e)?(e.nodeName||"").toLowerCase():"#document"}function mi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ms(e){var t;return(t=(Wq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wq(e){return Wb()?e instanceof Node||e instanceof mi(e).Node:!1}function as(e){return Wb()?e instanceof Element||e instanceof mi(e).Element:!1}function Os(e){return Wb()?e instanceof HTMLElement||e instanceof mi(e).HTMLElement:!1}function Nj(e){return!Wb()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof mi(e).ShadowRoot}function kg(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=is(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function Noe(e){return["table","td","th"].includes(zf(e))}function Ub(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function rD(e){const t=aD(),n=as(e)?is(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Boe(e){let t=kl(e);for(;Os(t)&&!Sf(t);){if(rD(t))return t;if(Ub(t))return null;t=kl(t)}return null}function aD(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Sf(e){return["html","body","#document"].includes(zf(e))}function is(e){return mi(e).getComputedStyle(e)}function Gb(e){return as(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kl(e){if(zf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nj(e)&&e.host||Ms(e);return Nj(t)?t.host:t}function Uq(e){const t=kl(e);return Sf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Os(t)&&kg(t)?t:Uq(t)}function dg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=Uq(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),o=mi(a);if(i){const u=SO(o);return t.concat(o,o.visualViewport||[],kg(a)?a:[],u&&n?dg(u):[])}return t.concat(a,dg(a,[],n))}function SO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gq(e){const t=is(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Os(e),i=a?e.offsetWidth:n,o=a?e.offsetHeight:r,u=mb(n)!==i||mb(r)!==o;return u&&(n=i,r=o),{width:n,height:r,$:u}}function iD(e){return as(e)?e:e.contextElement}function Jd(e){const t=iD(e);if(!Os(t))return Es(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=Gq(t);let o=(i?mb(n.width):n.width)/r,u=(i?mb(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const Loe=Es(0);function Xq(e){const t=mi(e);return!aD()||!t.visualViewport?Loe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Foe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mi(e)?!1:t}function pc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=iD(e);let o=Es(1);t&&(r?as(r)&&(o=Jd(r)):o=Jd(e));const u=Foe(i,n,r)?Xq(i):Es(0);let c=(a.left+u.x)/o.x,h=(a.top+u.y)/o.y,p=a.width/o.x,g=a.height/o.y;if(i){const b=mi(i),y=r&&as(r)?mi(r):r;let A=b,x=SO(A);for(;x&&r&&y!==A;){const w=Jd(x),C=x.getBoundingClientRect(),_=is(x),D=C.left+(x.clientLeft+parseFloat(_.paddingLeft))*w.x,T=C.top+(x.clientTop+parseFloat(_.paddingTop))*w.y;c*=w.x,h*=w.y,p*=w.x,g*=w.y,c+=D,h+=T,A=mi(x),x=SO(A)}}return pb({width:p,height:g,x:c,y:h})}function sD(e,t){const n=Gb(e).scrollLeft;return t?t.left+n:pc(Ms(e)).left+n}function Zq(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:sD(e,r)),i=r.top+t.scrollTop;return{x:a,y:i}}function koe(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",o=Ms(r),u=t?Ub(t.floating):!1;if(r===o||u&&i)return n;let c={scrollLeft:0,scrollTop:0},h=Es(1);const p=Es(0),g=Os(r);if((g||!g&&!i)&&((zf(r)!=="body"||kg(o))&&(c=Gb(r)),Os(r))){const y=pc(r);h=Jd(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=o&&!g&&!i?Zq(o,c,!0):Es(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-c.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-c.scrollTop*h.y+p.y+b.y}}function qoe(e){return Array.from(e.getClientRects())}function zoe(e){const t=Ms(e),n=Gb(e),r=e.ownerDocument.body,a=ic(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ic(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+sD(e);const u=-n.scrollTop;return is(r).direction==="rtl"&&(o+=ic(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:o,y:u}}function Qoe(e,t){const n=mi(e),r=Ms(e),a=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,u=0,c=0;if(a){i=a.width,o=a.height;const h=aD();(!h||h&&t==="fixed")&&(u=a.offsetLeft,c=a.offsetTop)}return{width:i,height:o,x:u,y:c}}function Hoe(e,t){const n=pc(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=Os(e)?Jd(e):Es(1),o=e.clientWidth*i.x,u=e.clientHeight*i.y,c=a*i.x,h=r*i.y;return{width:o,height:u,x:c,y:h}}function Bj(e,t,n){let r;if(t==="viewport")r=Qoe(e,n);else if(t==="document")r=zoe(Ms(e));else if(as(t))r=Hoe(t,n);else{const a=Xq(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return pb(r)}function Kq(e,t){const n=kl(e);return n===t||!as(n)||Sf(n)?!1:is(n).position==="fixed"||Kq(n,t)}function Voe(e,t){const n=t.get(e);if(n)return n;let r=dg(e,[],!1).filter(u=>as(u)&&zf(u)!=="body"),a=null;const i=is(e).position==="fixed";let o=i?kl(e):e;for(;as(o)&&!Sf(o);){const u=is(o),c=rD(o);!c&&u.position==="fixed"&&(a=null),(i?!c&&!a:!c&&u.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||kg(o)&&!c&&Kq(e,o))?r=r.filter(p=>p!==o):a=u,o=kl(o)}return t.set(e,r),r}function Yoe(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[...n==="clippingAncestors"?Ub(t)?[]:Voe(t,this._c):[].concat(n),r],u=o[0],c=o.reduce((h,p)=>{const g=Bj(t,p,a);return h.top=ic(g.top,h.top),h.right=wf(g.right,h.right),h.bottom=wf(g.bottom,h.bottom),h.left=ic(g.left,h.left),h},Bj(t,u,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Woe(e){const{width:t,height:n}=Gq(e);return{width:t,height:n}}function Uoe(e,t,n){const r=Os(t),a=Ms(t),i=n==="fixed",o=pc(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const c=Es(0);function h(){c.x=sD(a)}if(r||!r&&!i)if((zf(t)!=="body"||kg(a))&&(u=Gb(t)),r){const y=pc(t,!0,i,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else a&&h();i&&!r&&a&&h();const p=a&&!r&&!i?Zq(a,u):Es(0),g=o.left+u.scrollLeft-c.x-p.x,b=o.top+u.scrollTop-c.y-p.y;return{x:g,y:b,width:o.width,height:o.height}}function mx(e){return is(e).position==="static"}function Lj(e,t){if(!Os(e)||is(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ms(e)===n&&(n=n.ownerDocument.body),n}function Jq(e,t){const n=mi(e);if(Ub(e))return n;if(!Os(e)){let a=kl(e);for(;a&&!Sf(a);){if(as(a)&&!mx(a))return a;a=kl(a)}return n}let r=Lj(e,t);for(;r&&Noe(r)&&mx(r);)r=Lj(r,t);return r&&Sf(r)&&mx(r)&&!rD(r)?n:r||Boe(e)||n}const Goe=async function(e){const t=this.getOffsetParent||Jq,n=this.getDimensions,r=await n(e.floating);return{reference:Uoe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xoe(e){return is(e).direction==="rtl"}const Zoe={convertOffsetParentRelativeRectToViewportRelativeRect:koe,getDocumentElement:Ms,getClippingRect:Yoe,getOffsetParent:Jq,getElementRects:Goe,getClientRects:qoe,getDimensions:Woe,getScale:Jd,isElement:as,isRTL:Xoe};function $q(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Koe(e,t){let n=null,r;const a=Ms(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),i();const h=e.getBoundingClientRect(),{left:p,top:g,width:b,height:y}=h;if(u||t(),!b||!y)return;const A=bv(g),x=bv(a.clientWidth-(p+b)),w=bv(a.clientHeight-(g+y)),C=bv(p),D={rootMargin:-A+"px "+-x+"px "+-w+"px "+-C+"px",threshold:ic(0,wf(1,c))||1};let T=!0;function E(M){const O=M[0].intersectionRatio;if(O!==c){if(!T)return o();O?o(!1,O):r=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!$q(h,e.getBoundingClientRect())&&o(),T=!1}try{n=new IntersectionObserver(E,{...D,root:a.ownerDocument})}catch(M){n=new IntersectionObserver(E,D)}n.observe(e)}return o(!0),i}function Joe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,h=iD(e),p=a||i?[...h?dg(h):[],...dg(t)]:[];p.forEach(C=>{a&&C.addEventListener("scroll",n,{passive:!0}),i&&C.addEventListener("resize",n)});const g=h&&u?Koe(h,n):null;let b=-1,y=null;o&&(y=new ResizeObserver(C=>{let[_]=C;_&&_.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var D;(D=y)==null||D.observe(t)})),n()}),h&&!c&&y.observe(h),y.observe(t));let A,x=c?pc(e):null;c&&w();function w(){const C=pc(e);x&&!$q(x,C)&&n(),x=C,A=requestAnimationFrame(w)}return n(),()=>{var C;p.forEach(_=>{a&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),g==null||g(),(C=y)==null||C.disconnect(),y=null,c&&cancelAnimationFrame(A)}}const $oe=_oe,ele=joe,tle=Poe,nle=Moe,Fj=(e,t,n)=>{const r=new Map,a={platform:Zoe,...n},i={...a.platform,_c:r};return Doe(e,t,{...a,platform:i})};var gx={exports:{}};/*!
|
|
614
|
+
`,disabled:i,style:{paddingRight:"2.5rem"},children:[m.jsx("option",{value:"",disabled:!0,children:r}),e.map(o=>m.jsx("option",{value:o.value,children:o.label},o.value))]}),!i&&m.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none",children:m.jsx("svg",{className:"w-4 h-4 text-[#213F4A]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})}const cg=(e,t=!1)=>({queryKey:["client_review_periods",e,t],queryFn:async()=>await At.executeRequest(`/clientreviewperiods/list?ArchivingType=${e}&completed=${t}`,"GET")}),GI=e=>{const t=ln();return Bt({mutationFn:n=>At.executeRequest("/Archiving/mark_review_period_completed","POST",{reviewPeriodId:n}),onSuccess:()=>{t.invalidateQueries({queryKey:["client_review_periods",e,!1]})},onError:()=>{Ze.error("Error occurred while updating item")}})},Dq=(e,t,n)=>({queryKey:["client_review_period_details",e,t,n],queryFn:async()=>await At.executeRequest(`/clientreviewperiods/details?ArchivingType=${e}&ReviewPeriodId=${t}&EsId=${n}`,"GET")}),Mq=6048e5,die=864e5,fie=6e4,hie=36e5,mie=1e3,Ij=Symbol.for("constructDateFrom");function jr(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ij in e?e[Ij](t):e instanceof Date?new e.constructor(t):new Date(t)}function Nr(e,t){return jr(t||e,e)}function XI(e,t,n){const r=Nr(e,n==null?void 0:n.in);return isNaN(t)?jr((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function gie(e,t,n){const r=Nr(e,n==null?void 0:n.in);if(isNaN(t))return jr(e,NaN);if(!t)return r;const a=r.getDate(),i=jr(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}let pie={};function kf(){return pie}function Fl(e,t){var u,c,h,p,g,b,y,A;const n=kf(),r=(A=(y=(p=(h=t==null?void 0:t.weekStartsOn)!=null?h:(c=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)!=null?p:n.weekStartsOn)!=null?y:(b=(g=n.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)!=null?A:0,a=Nr(e,t==null?void 0:t.in),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function xf(e,t){return Fl(e,{...t,weekStartsOn:1})}function Pq(e,t){const n=Nr(e,t==null?void 0:t.in),r=n.getFullYear(),a=jr(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=xf(a),o=jr(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const u=xf(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function db(e){const t=Nr(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 vie(e,...t){const n=jr.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function fb(e,t){const n=Nr(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function bie(e,t,n){const[r,a]=vie(n==null?void 0:n.in,e,t),i=fb(r),o=fb(a),u=+i-db(i),c=+o-db(o);return Math.round((u-c)/die)}function yie(e,t){const n=Pq(e,t),r=jr(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xf(r)}function Aie(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xie(e){return!(!Aie(e)&&typeof e!="number"||isNaN(+Nr(e)))}function Dj(e,t){const n=Nr(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function wie(e,t){const n=Nr(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Sie={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"}},Eie=(e,t,n)=>{let r;const a=Sie[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function hx(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Cie={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Rie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Oie={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Iie={date:hx({formats:Cie,defaultWidth:"full"}),time:hx({formats:Rie,defaultWidth:"full"}),dateTime:hx({formats:Oie,defaultWidth:"full"})},Die={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Mie=(e,t,n,r)=>Die[e];function gm(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,u=n!=null&&n.width?String(n.width):o;a=e.formattingValues[u]||e.formattingValues[o]}else{const o=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[u]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const Pie={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Tie={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_ie={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"]},jie={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"]},Nie={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"}},Bie={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"}},Lie=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Fie={ordinalNumber:Lie,era:gm({values:Pie,defaultWidth:"wide"}),quarter:gm({values:Tie,defaultWidth:"wide",argumentCallback:e=>e-1}),month:gm({values:_ie,defaultWidth:"wide"}),day:gm({values:jie,defaultWidth:"wide"}),dayPeriod:gm({values:Nie,defaultWidth:"wide",formattingValues:Bie,defaultFormattingWidth:"wide"})};function pm(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(u)?qie(u,g=>g.test(o)):kie(u,g=>g.test(o));let h;h=e.valueCallback?e.valueCallback(c):c,h=n.valueCallback?n.valueCallback(h):h;const p=t.slice(o.length);return{value:h,rest:p}}}function kie(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function qie(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function zie(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const u=t.slice(a.length);return{value:o,rest:u}}}const Qie=/^(\d+)(th|st|nd|rd)?/i,Hie=/\d+/i,Vie={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},Yie={any:[/^b/i,/^(a|c)/i]},Wie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Uie={any:[/1/i,/2/i,/3/i,/4/i]},Gie={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},Xie={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]},Zie={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},Kie={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]},Jie={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},$ie={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}},ese={ordinalNumber:zie({matchPattern:Qie,parsePattern:Hie,valueCallback:e=>parseInt(e,10)}),era:pm({matchPatterns:Vie,defaultMatchWidth:"wide",parsePatterns:Yie,defaultParseWidth:"any"}),quarter:pm({matchPatterns:Wie,defaultMatchWidth:"wide",parsePatterns:Uie,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pm({matchPatterns:Gie,defaultMatchWidth:"wide",parsePatterns:Xie,defaultParseWidth:"any"}),day:pm({matchPatterns:Zie,defaultMatchWidth:"wide",parsePatterns:Kie,defaultParseWidth:"any"}),dayPeriod:pm({matchPatterns:Jie,defaultMatchWidth:"any",parsePatterns:$ie,defaultParseWidth:"any"})},Tq={code:"en-US",formatDistance:Eie,formatLong:Iie,formatRelative:Mie,localize:Fie,match:ese,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tse(e,t){const n=Nr(e,t==null?void 0:t.in);return bie(n,wie(n))+1}function _q(e,t){const n=Nr(e,t==null?void 0:t.in),r=+xf(n)-+yie(n);return Math.round(r/Mq)+1}function ZI(e,t){var p,g,b,y,A,x,w,C;const n=Nr(e,t==null?void 0:t.in),r=n.getFullYear(),a=kf(),i=(C=(w=(y=(b=t==null?void 0:t.firstWeekContainsDate)!=null?b:(g=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)!=null?y:a.firstWeekContainsDate)!=null?w:(x=(A=a.locale)==null?void 0:A.options)==null?void 0:x.firstWeekContainsDate)!=null?C:1,o=jr((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const u=Fl(o,t),c=jr((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const h=Fl(c,t);return+n>=+u?r+1:+n>=+h?r:r-1}function nse(e,t){var u,c,h,p,g,b,y,A;const n=kf(),r=(A=(y=(p=(h=t==null?void 0:t.firstWeekContainsDate)!=null?h:(c=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)!=null?p:n.firstWeekContainsDate)!=null?y:(b=(g=n.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)!=null?A:1,a=ZI(e,t),i=jr((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),Fl(i,t)}function jq(e,t){const n=Nr(e,t==null?void 0:t.in),r=+Fl(n,t)-+nse(n,t);return Math.round(r/Mq)+1}function Wn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ll={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Wn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Wn(n+1,2)},d(e,t){return Wn(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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Wn(e.getHours()%12||12,t.length)},H(e,t){return Wn(e.getHours(),t.length)},m(e,t){return Wn(e.getMinutes(),t.length)},s(e,t){return Wn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return Wn(a,t.length)}},Md={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Mj={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return ll.y(e,t)},Y:function(e,t,n,r){const a=ZI(e,r),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return Wn(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Wn(i,t.length)},R:function(e,t){const n=Pq(e);return Wn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Wn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Wn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Wn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ll.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Wn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=jq(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):Wn(a,t.length)},I:function(e,t,n){const r=_q(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Wn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ll.d(e,t)},D:function(e,t,n){const r=tse(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Wn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":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"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Wn(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Wn(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return Wn(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=Md.noon:r===0?a=Md.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=Md.evening:r>=12?a=Md.afternoon:r>=4?a=Md.morning:a=Md.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ll.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ll.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Wn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Wn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ll.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ll.s(e,t)},S:function(e,t){return ll.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Tj(r);case"XXXX":case"XX":return _u(r);case"XXXXX":case"XXX":default:return _u(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Tj(r);case"xxxx":case"xx":return _u(r);case"xxxxx":case"xxx":default:return _u(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Pj(r,":");case"OOOO":default:return"GMT"+_u(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Pj(r,":");case"zzzz":default:return"GMT"+_u(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Wn(r,t.length)},T:function(e,t,n){return Wn(+e,t.length)}};function Pj(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+t+Wn(i,2)}function Tj(e,t){return e%60===0?(e>0?"-":"+")+Wn(Math.abs(e)/60,2):_u(e,t)}function _u(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Wn(Math.trunc(r/60),2),i=Wn(r%60,2);return n+a+t+i}const _j=(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"});case"PPPP":default:return t.date({width:"full"})}},Nq=(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"});case"pppp":default:return t.time({width:"full"})}},rse=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return _j(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",_j(r,t)).replace("{{time}}",Nq(a,t))},yO={p:Nq,P:rse},ase=/^D+$/,ise=/^Y+$/,sse=["D","DD","YY","YYYY"];function Bq(e){return ase.test(e)}function Lq(e){return ise.test(e)}function AO(e,t,n){const r=ose(e,t,n);if(console.warn(r),sse.includes(e))throw new RangeError(r)}function ose(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lse=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,use=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cse=/^'([^]*?)'?$/,dse=/''/g,fse=/[a-zA-Z]/;function sa(e,t,n){var p,g,b,y,A,x,w,C,_;const r=kf(),a=(p=r.locale)!=null?p:Tq,i=(A=(y=r.firstWeekContainsDate)!=null?y:(b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.firstWeekContainsDate)!=null?A:1,o=(_=(C=r.weekStartsOn)!=null?C:(w=(x=r.locale)==null?void 0:x.options)==null?void 0:w.weekStartsOn)!=null?_:0,u=Nr(e,n==null?void 0:n.in);if(!xie(u))throw new RangeError("Invalid time value");let c=t.match(use).map(D=>{const T=D[0];if(T==="p"||T==="P"){const E=yO[T];return E(D,a.formatLong)}return D}).join("").match(lse).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const T=D[0];if(T==="'")return{isToken:!1,value:hse(D)};if(Mj[T])return{isToken:!0,value:D};if(T.match(fse))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:D}});a.localize.preprocessor&&(c=a.localize.preprocessor(u,c));const h={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return c.map(D=>{if(!D.isToken)return D.value;const T=D.value;(Lq(T)||Bq(T))&&AO(T,t,String(e));const E=Mj[T[0]];return E(u,T,a.localize,h)}).join("")}function hse(e){const t=e.match(cse);return t?t[1].replace(dse,"'"):e}function mse(){return Object.assign({},kf())}function gse(e,t){const n=Nr(e,t==null?void 0:t.in).getDay();return n===0?7:n}function pse(e,t){const n=vse(t)?new t(0):jr(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function vse(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const bse=10;let Fq=class{constructor(){ke(this,"subPriority",0)}validate(t,n){return!0}};class yse extends Fq{constructor(t,n,r,a,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=a,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Ase extends Fq{constructor(n,r){super();ke(this,"priority",bse);ke(this,"subPriority",-1);this.context=n||(a=>jr(r,a))}set(n,r){return r.timestampIsSet?n:jr(n,pse(n,this.context))}}let qn=class{run(t,n,r,a){const i=this.parse(t,n,r,a);return i?{setter:new yse(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}},xse=class extends qn{constructor(){super(...arguments);ke(this,"priority",140);ke(this,"incompatibleTokens",["R","u","t","T"])}parse(n,r,a){switch(r){case"G":case"GG":case"GGG":return a.era(n,{width:"abbreviated"})||a.era(n,{width:"narrow"});case"GGGGG":return a.era(n,{width:"narrow"});case"GGGG":default:return a.era(n,{width:"wide"})||a.era(n,{width:"abbreviated"})||a.era(n,{width:"narrow"})}}set(n,r,a){return r.era=a,n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}};const Tr={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},As={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function _r(e,t){return e&&{value:t(e.value),rest:e.rest}}function gr(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function xs(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,a=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(a*hie+i*fie+o*mie),rest:t.slice(n[0].length)}}function kq(e){return gr(Tr.anyDigitsSigned,e)}function Cr(e,t){switch(e){case 1:return gr(Tr.singleDigit,t);case 2:return gr(Tr.twoDigits,t);case 3:return gr(Tr.threeDigits,t);case 4:return gr(Tr.fourDigits,t);default:return gr(new RegExp("^\\d{1,"+e+"}"),t)}}function hb(e,t){switch(e){case 1:return gr(Tr.singleDigitSigned,t);case 2:return gr(Tr.twoDigitsSigned,t);case 3:return gr(Tr.threeDigitsSigned,t);case 4:return gr(Tr.fourDigitsSigned,t);default:return gr(new RegExp("^-?\\d{1,"+e+"}"),t)}}function KI(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function qq(e,t){const n=t>0,r=n?t:1-t;let a;if(r<=50)a=e||100;else{const i=r+50,o=Math.trunc(i/100)*100,u=e>=i%100;a=e+o-(u?100:0)}return n?a:1-a}function zq(e){return e%400===0||e%4===0&&e%100!==0}let wse=class extends qn{constructor(){super(...arguments);ke(this,"priority",130);ke(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(n,r,a){const i=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return _r(Cr(4,n),i);case"yo":return _r(a.ordinalNumber(n,{unit:"year"}),i);default:return _r(Cr(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,a){const i=n.getFullYear();if(a.isTwoDigitYear){const u=qq(a.year,i);return n.setFullYear(u,0,1),n.setHours(0,0,0,0),n}const o=!("era"in r)||r.era===1?a.year:1-a.year;return n.setFullYear(o,0,1),n.setHours(0,0,0,0),n}},Sse=class extends qn{constructor(){super(...arguments);ke(this,"priority",130);ke(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(n,r,a){const i=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return _r(Cr(4,n),i);case"Yo":return _r(a.ordinalNumber(n,{unit:"year"}),i);default:return _r(Cr(r.length,n),i)}}validate(n,r){return r.isTwoDigitYear||r.year>0}set(n,r,a,i){const o=ZI(n,i);if(a.isTwoDigitYear){const c=qq(a.year,o);return n.setFullYear(c,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Fl(n,i)}const u=!("era"in r)||r.era===1?a.year:1-a.year;return n.setFullYear(u,0,i.firstWeekContainsDate),n.setHours(0,0,0,0),Fl(n,i)}},Ese=class extends qn{constructor(){super(...arguments);ke(this,"priority",130);ke(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(n,r){return hb(r==="R"?4:r.length,n)}set(n,r,a){const i=jr(n,0);return i.setFullYear(a,0,4),i.setHours(0,0,0,0),xf(i)}},Cse=class extends qn{constructor(){super(...arguments);ke(this,"priority",130);ke(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(n,r){return hb(r==="u"?4:r.length,n)}set(n,r,a){return n.setFullYear(a,0,1),n.setHours(0,0,0,0),n}},Rse=class extends qn{constructor(){super(...arguments);ke(this,"priority",120);ke(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"Q":case"QQ":return Cr(r.length,n);case"Qo":return a.ordinalNumber(n,{unit:"quarter"});case"QQQ":return a.quarter(n,{width:"abbreviated",context:"formatting"})||a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(n,{width:"wide",context:"formatting"})||a.quarter(n,{width:"abbreviated",context:"formatting"})||a.quarter(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=1&&r<=4}set(n,r,a){return n.setMonth((a-1)*3,1),n.setHours(0,0,0,0),n}},Ose=class extends qn{constructor(){super(...arguments);ke(this,"priority",120);ke(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"q":case"qq":return Cr(r.length,n);case"qo":return a.ordinalNumber(n,{unit:"quarter"});case"qqq":return a.quarter(n,{width:"abbreviated",context:"standalone"})||a.quarter(n,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(n,{width:"wide",context:"standalone"})||a.quarter(n,{width:"abbreviated",context:"standalone"})||a.quarter(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=1&&r<=4}set(n,r,a){return n.setMonth((a-1)*3,1),n.setHours(0,0,0,0),n}},Ise=class extends qn{constructor(){super(...arguments);ke(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);ke(this,"priority",110)}parse(n,r,a){const i=o=>o-1;switch(r){case"M":return _r(gr(Tr.month,n),i);case"MM":return _r(Cr(2,n),i);case"Mo":return _r(a.ordinalNumber(n,{unit:"month"}),i);case"MMM":return a.month(n,{width:"abbreviated",context:"formatting"})||a.month(n,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(n,{width:"wide",context:"formatting"})||a.month(n,{width:"abbreviated",context:"formatting"})||a.month(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.setMonth(a,1),n.setHours(0,0,0,0),n}},Dse=class extends qn{constructor(){super(...arguments);ke(this,"priority",110);ke(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(n,r,a){const i=o=>o-1;switch(r){case"L":return _r(gr(Tr.month,n),i);case"LL":return _r(Cr(2,n),i);case"Lo":return _r(a.ordinalNumber(n,{unit:"month"}),i);case"LLL":return a.month(n,{width:"abbreviated",context:"standalone"})||a.month(n,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(n,{width:"wide",context:"standalone"})||a.month(n,{width:"abbreviated",context:"standalone"})||a.month(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.setMonth(a,1),n.setHours(0,0,0,0),n}};function Mse(e,t,n){const r=Nr(e,n==null?void 0:n.in),a=jq(r,n)-t;return r.setDate(r.getDate()-a*7),Nr(r,n==null?void 0:n.in)}let Pse=class extends qn{constructor(){super(...arguments);ke(this,"priority",100);ke(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(n,r,a){switch(r){case"w":return gr(Tr.week,n);case"wo":return a.ordinalNumber(n,{unit:"week"});default:return Cr(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,a,i){return Fl(Mse(n,a,i),i)}};function Tse(e,t,n){const r=Nr(e,n==null?void 0:n.in),a=_q(r,n)-t;return r.setDate(r.getDate()-a*7),r}let _se=class extends qn{constructor(){super(...arguments);ke(this,"priority",100);ke(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(n,r,a){switch(r){case"I":return gr(Tr.week,n);case"Io":return a.ordinalNumber(n,{unit:"week"});default:return Cr(r.length,n)}}validate(n,r){return r>=1&&r<=53}set(n,r,a){return xf(Tse(n,a))}};const jse=[31,28,31,30,31,30,31,31,30,31,30,31],Nse=[31,29,31,30,31,30,31,31,30,31,30,31];let Bse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"subPriority",1);ke(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"d":return gr(Tr.date,n);case"do":return a.ordinalNumber(n,{unit:"date"});default:return Cr(r.length,n)}}validate(n,r){const a=n.getFullYear(),i=zq(a),o=n.getMonth();return i?r>=1&&r<=Nse[o]:r>=1&&r<=jse[o]}set(n,r,a){return n.setDate(a),n.setHours(0,0,0,0),n}},Lse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"subpriority",1);ke(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(n,r,a){switch(r){case"D":case"DD":return gr(Tr.dayOfYear,n);case"Do":return a.ordinalNumber(n,{unit:"date"});default:return Cr(r.length,n)}}validate(n,r){const a=n.getFullYear();return zq(a)?r>=1&&r<=366:r>=1&&r<=365}set(n,r,a){return n.setMonth(0,a),n.setHours(0,0,0,0),n}};function JI(e,t,n){var g,b,y,A,x,w,C,_;const r=kf(),a=(_=(C=(A=(y=n==null?void 0:n.weekStartsOn)!=null?y:(b=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)!=null?A:r.weekStartsOn)!=null?C:(w=(x=r.locale)==null?void 0:x.options)==null?void 0:w.weekStartsOn)!=null?_:0,i=Nr(e,n==null?void 0:n.in),o=i.getDay(),c=(t%7+7)%7,h=7-a,p=t<0||t>6?t-(o+h)%7:(c+h)%7-(o+h)%7;return XI(i,p,n)}let Fse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(n,r,a){switch(r){case"E":case"EE":case"EEE":return a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,i){return n=JI(n,a,i),n.setHours(0,0,0,0),n}},kse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(n,r,a,i){const o=u=>{const c=Math.floor((u-1)/7)*7;return(u+i.weekStartsOn+6)%7+c};switch(r){case"e":case"ee":return _r(Cr(r.length,n),o);case"eo":return _r(a.ordinalNumber(n,{unit:"day"}),o);case"eee":return a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"eeeee":return a.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,i){return n=JI(n,a,i),n.setHours(0,0,0,0),n}},qse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(n,r,a,i){const o=u=>{const c=Math.floor((u-1)/7)*7;return(u+i.weekStartsOn+6)%7+c};switch(r){case"c":case"cc":return _r(Cr(r.length,n),o);case"co":return _r(a.ordinalNumber(n,{unit:"day"}),o);case"ccc":return a.day(n,{width:"abbreviated",context:"standalone"})||a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"});case"ccccc":return a.day(n,{width:"narrow",context:"standalone"});case"cccccc":return a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(n,{width:"wide",context:"standalone"})||a.day(n,{width:"abbreviated",context:"standalone"})||a.day(n,{width:"short",context:"standalone"})||a.day(n,{width:"narrow",context:"standalone"})}}validate(n,r){return r>=0&&r<=6}set(n,r,a,i){return n=JI(n,a,i),n.setHours(0,0,0,0),n}};function zse(e,t,n){const r=Nr(e,n==null?void 0:n.in),a=gse(r,n),i=t-a;return XI(r,i,n)}let Qse=class extends qn{constructor(){super(...arguments);ke(this,"priority",90);ke(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(n,r,a){const i=o=>o===0?7:o;switch(r){case"i":case"ii":return Cr(r.length,n);case"io":return a.ordinalNumber(n,{unit:"day"});case"iii":return _r(a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),i);case"iiiii":return _r(a.day(n,{width:"narrow",context:"formatting"}),i);case"iiiiii":return _r(a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),i);case"iiii":default:return _r(a.day(n,{width:"wide",context:"formatting"})||a.day(n,{width:"abbreviated",context:"formatting"})||a.day(n,{width:"short",context:"formatting"})||a.day(n,{width:"narrow",context:"formatting"}),i)}}validate(n,r){return r>=1&&r<=7}set(n,r,a){return n=zse(n,a),n.setHours(0,0,0,0),n}},Hse=class extends qn{constructor(){super(...arguments);ke(this,"priority",80);ke(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(n,r,a){switch(r){case"a":case"aa":case"aaa":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(KI(a),0,0,0),n}},Vse=class extends qn{constructor(){super(...arguments);ke(this,"priority",80);ke(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(n,r,a){switch(r){case"b":case"bb":case"bbb":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(KI(a),0,0,0),n}},Yse=class extends qn{constructor(){super(...arguments);ke(this,"priority",80);ke(this,"incompatibleTokens",["a","b","t","T"])}parse(n,r,a){switch(r){case"B":case"BB":case"BBB":return a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(n,{width:"wide",context:"formatting"})||a.dayPeriod(n,{width:"abbreviated",context:"formatting"})||a.dayPeriod(n,{width:"narrow",context:"formatting"})}}set(n,r,a){return n.setHours(KI(a),0,0,0),n}},Wse=class extends qn{constructor(){super(...arguments);ke(this,"priority",70);ke(this,"incompatibleTokens",["H","K","k","t","T"])}parse(n,r,a){switch(r){case"h":return gr(Tr.hour12h,n);case"ho":return a.ordinalNumber(n,{unit:"hour"});default:return Cr(r.length,n)}}validate(n,r){return r>=1&&r<=12}set(n,r,a){const i=n.getHours()>=12;return i&&a<12?n.setHours(a+12,0,0,0):!i&&a===12?n.setHours(0,0,0,0):n.setHours(a,0,0,0),n}},Use=class extends qn{constructor(){super(...arguments);ke(this,"priority",70);ke(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(n,r,a){switch(r){case"H":return gr(Tr.hour23h,n);case"Ho":return a.ordinalNumber(n,{unit:"hour"});default:return Cr(r.length,n)}}validate(n,r){return r>=0&&r<=23}set(n,r,a){return n.setHours(a,0,0,0),n}},Gse=class extends qn{constructor(){super(...arguments);ke(this,"priority",70);ke(this,"incompatibleTokens",["h","H","k","t","T"])}parse(n,r,a){switch(r){case"K":return gr(Tr.hour11h,n);case"Ko":return a.ordinalNumber(n,{unit:"hour"});default:return Cr(r.length,n)}}validate(n,r){return r>=0&&r<=11}set(n,r,a){return n.getHours()>=12&&a<12?n.setHours(a+12,0,0,0):n.setHours(a,0,0,0),n}},Xse=class extends qn{constructor(){super(...arguments);ke(this,"priority",70);ke(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(n,r,a){switch(r){case"k":return gr(Tr.hour24h,n);case"ko":return a.ordinalNumber(n,{unit:"hour"});default:return Cr(r.length,n)}}validate(n,r){return r>=1&&r<=24}set(n,r,a){const i=a<=24?a%24:a;return n.setHours(i,0,0,0),n}},Zse=class extends qn{constructor(){super(...arguments);ke(this,"priority",60);ke(this,"incompatibleTokens",["t","T"])}parse(n,r,a){switch(r){case"m":return gr(Tr.minute,n);case"mo":return a.ordinalNumber(n,{unit:"minute"});default:return Cr(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,a){return n.setMinutes(a,0,0),n}},Kse=class extends qn{constructor(){super(...arguments);ke(this,"priority",50);ke(this,"incompatibleTokens",["t","T"])}parse(n,r,a){switch(r){case"s":return gr(Tr.second,n);case"so":return a.ordinalNumber(n,{unit:"second"});default:return Cr(r.length,n)}}validate(n,r){return r>=0&&r<=59}set(n,r,a){return n.setSeconds(a,0),n}},Jse=class extends qn{constructor(){super(...arguments);ke(this,"priority",30);ke(this,"incompatibleTokens",["t","T"])}parse(n,r){const a=i=>Math.trunc(i*Math.pow(10,-r.length+3));return _r(Cr(r.length,n),a)}set(n,r,a){return n.setMilliseconds(a),n}},$se=class extends qn{constructor(){super(...arguments);ke(this,"priority",10);ke(this,"incompatibleTokens",["t","T","x"])}parse(n,r){switch(r){case"X":return xs(As.basicOptionalMinutes,n);case"XX":return xs(As.basic,n);case"XXXX":return xs(As.basicOptionalSeconds,n);case"XXXXX":return xs(As.extendedOptionalSeconds,n);case"XXX":default:return xs(As.extended,n)}}set(n,r,a){return r.timestampIsSet?n:jr(n,n.getTime()-db(n)-a)}},eoe=class extends qn{constructor(){super(...arguments);ke(this,"priority",10);ke(this,"incompatibleTokens",["t","T","X"])}parse(n,r){switch(r){case"x":return xs(As.basicOptionalMinutes,n);case"xx":return xs(As.basic,n);case"xxxx":return xs(As.basicOptionalSeconds,n);case"xxxxx":return xs(As.extendedOptionalSeconds,n);case"xxx":default:return xs(As.extended,n)}}set(n,r,a){return r.timestampIsSet?n:jr(n,n.getTime()-db(n)-a)}},toe=class extends qn{constructor(){super(...arguments);ke(this,"priority",40);ke(this,"incompatibleTokens","*")}parse(n){return kq(n)}set(n,r,a){return[jr(n,a*1e3),{timestampIsSet:!0}]}},noe=class extends qn{constructor(){super(...arguments);ke(this,"priority",20);ke(this,"incompatibleTokens","*")}parse(n){return kq(n)}set(n,r,a){return[jr(n,a),{timestampIsSet:!0}]}};const roe={G:new xse,y:new wse,Y:new Sse,R:new Ese,u:new Cse,Q:new Rse,q:new Ose,M:new Ise,L:new Dse,w:new Pse,I:new _se,d:new Bse,D:new Lse,E:new Fse,e:new kse,c:new qse,i:new Qse,a:new Hse,b:new Vse,B:new Yse,h:new Wse,H:new Use,K:new Gse,k:new Xse,m:new Zse,s:new Kse,S:new Jse,X:new $se,x:new eoe,t:new toe,T:new noe},aoe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ioe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,soe=/^'([^]*?)'?$/,ooe=/''/g,loe=/\S/,uoe=/[a-zA-Z]/;function Qq(e,t,n,r){var w,C,_,D,T,E,M,O,I;const a=()=>jr(n,NaN),i=mse(),o=(w=i.locale)!=null?w:Tq,u=(T=(D=i.firstWeekContainsDate)!=null?D:(_=(C=i.locale)==null?void 0:C.options)==null?void 0:_.firstWeekContainsDate)!=null?T:1,c=(I=(O=i.weekStartsOn)!=null?O:(M=(E=i.locale)==null?void 0:E.options)==null?void 0:M.weekStartsOn)!=null?I:0,h={firstWeekContainsDate:u,weekStartsOn:c,locale:o},p=[new Ase(r==null?void 0:r.in,n)],g=t.match(ioe).map(P=>{const j=P[0];if(j in yO){const L=yO[j];return L(P,o.formatLong)}return P}).join("").match(aoe),b=[];for(let P of g){Lq(P)&&AO(P,t,e),Bq(P)&&AO(P,t,e);const j=P[0],L=roe[j];if(L){const{incompatibleTokens:k}=L;if(Array.isArray(k)){const Y=b.find(J=>k.includes(J.token)||J.token===j);if(Y)throw new RangeError(`The format string mustn't contain \`${Y.fullToken}\` and \`${P}\` at the same time`)}else if(L.incompatibleTokens==="*"&&b.length>0)throw new RangeError(`The format string mustn't contain \`${P}\` and any other token at the same time`);b.push({token:j,fullToken:P});const q=L.run(e,P,o.match,h);if(!q)return a();p.push(q.setter),e=q.rest}else{if(j.match(uoe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");if(P==="''"?P="'":j==="'"&&(P=coe(P)),e.indexOf(P)===0)e=e.slice(P.length);else return a()}}if(e.length>0&&loe.test(e))return a();const y=p.map(P=>P.priority).sort((P,j)=>j-P).filter((P,j,L)=>L.indexOf(P)===j).map(P=>p.filter(j=>j.priority===P).sort((j,L)=>L.subPriority-j.subPriority)).map(P=>P[0]);let A=Nr(n,r==null?void 0:r.in);if(isNaN(+A))return a();const x={};for(const P of y){if(!P.validate(A,h))return a();const j=P.set(A,x,h);Array.isArray(j)?(A=j[0],Object.assign(x,j[1])):A=j}return A}function coe(e){return e.match(soe)[1].replace(ooe,"'")}function doe(e,t,n){return XI(e,-t,n)}function foe(e,t,n){return gie(e,-t,n)}function hoe(e,t,n){const{years:r=0,months:a=0,weeks:i=0,days:o=0,hours:u=0,minutes:c=0,seconds:h=0}=t,p=foe(e,a+r*12,n),g=doe(p,o+i*7,n),b=c+u*60,A=(h+b*60)*1e3;return jr(e,+g-A)}function $I({title:e,table:t,reviewPeriods:n,onRowClick:r,filters:a,isLoading:i=!1,emptyMessage:o,searchPlaceholder:u=null,paginationControlLabel:c=null}){var L;const{pathname:h}=Rs(),p=Qb(h),[g,b]=N.useState([]),{data:y,isLoading:A,isSuccess:x}=en(cg(p)),{data:w,isLoading:C,isSuccess:_}=en(cg(p,!0));N.useEffect(()=>{x&&b(y.map(k=>({value:k.id,label:`${sa(k.start,"MMM dd, yyyy")} - ${sa(k.end,"MMM dd, yyyy")}${k.isCompleted?" (Completed)":""}`})))},[x,y]);const D=Ht(k=>k.reviewPeriod),T=Ht(k=>k.setReviewPeriod),[E,M]=N.useState(null);N.useEffect(()=>{M(D)},[D]),N.useEffect(()=>{g.length>0&&T(g[0].value)},[g]);const O=p==null?void 0:p.replaceAll("_"," "),I=y==null?void 0:y.find(k=>k.id==D),P=(y==null?void 0:y.every(k=>k==null?void 0:k.isCompleted))||(y==null?void 0:y.length)<1,j=(w==null?void 0:w.length)<1&&(y==null?void 0:y.length)<1||!w&&!y;if(!A&&!C&&j)return O=="email"?m.jsx("div",{className:"mt-10 flex text-center justify-center",children:"Your firm's email journaling settings are configured, but we have not processed any emails yet. Journaled emails will begin processing within one day of being set up."}):m.jsxs("div",{className:"mt-10 flex text-center justify-center",children:["There are no ",O," currently available for review."]});if(O=="website"&&!j&&P&&x&&_){const k=w&&w.length>0?(L=w[0])==null?void 0:L.reviewStart:null;return m.jsxs("div",{className:"mt-10 flex text-center justify-center",children:["You’ve completed your ",O," review!",m.jsx("br",{}),"Your next review will be available on ",Yae(new Date(k)),"."]})}return A||C?m.jsx("div",{className:"flex justify-center",children:m.jsx(nn,{size:"xl"})}):m.jsxs("section",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"flex flex-col gap-3",children:m.jsxs("div",{className:"flex items-center gap-7 mb-10",children:[m.jsx("h6",{className:"font-semibold text-lg text-blue-700",children:"Select Review Period:"}),m.jsx(UI,{placeholder:"Select a period",value:E,onChange:k=>M(k),options:g}),m.jsx("button",{type:"button",className:"uppercase cursor-pointer bg-blue-500 px-4 py-2 rounded-sm text-white font-bold",onClick:()=>T(E),children:i?m.jsx(nn,{colorClass:"white"}):"Go"})]})}),I&&(I==null?void 0:I.isCompleted)&&m.jsxs("div",{className:"mb-10 mt-5",children:[m.jsx("hr",{}),m.jsx("div",{className:"text-center",children:m.jsx("p",{className:"mt-[-11px]",children:m.jsx("span",{className:"bg-white px-5",children:"Review Completed"})})})]}),m.jsxs("div",{children:[m.jsxs("h4",{className:"text-brand text-2xl font-semibold leading-9",children:[e," Records"]}),m.jsx(Yb,{table:t,onRowClick:r,filterButtons:a,hasGlobalFilter:!0,emptyMessage:o,searchPlaceholder:u!=null?u:"Search....",paginationControlLabel:c})]})]})}const Rc=e=>({queryKey:["emails",e],queryFn:async()=>e?(await At.executeRequest("/emailaccounts/list","POST",{reviewPeriodId:e,pageIndex:1,pageSize:1e4,filters:[],sortings:[{name:"emailDate",ascending:!0}]})).data||[]:[]}),qf=(e,t,n=!1)=>({queryKey:["emailreview",t],queryFn:()=>At.executeRequest(`/emailaccounts/details?ReviewPeriodId=${e}&ItemId=${t}&IsSpecialReview=${n}`,"GET")}),moe=(e,t=!1)=>({queryKey:["emailreviewmessage",e],queryFn:()=>At.executeRequest(`/emailaccounts/message?S3Path=${e}&IsKeyword=${t}`,"GET")}),goe=()=>{const e=ln();return Bt({mutationFn:t=>At.executeRequest("/emailreviewresponses","POST",{esId:t}),onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while updating item")}})},poe=()=>{const e=ln();return Bt({mutationFn:t=>At.executeRequest("/emailreviewresponses/further","POST",{esId:t}),onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while updating item")}})},eD=()=>{const e=ln();return Bt({mutationFn:({esId:t,note:n,archivingType:r})=>At.executeRequest("/accounts/note","POST",{esId:t.toString(),note:n,archivingType:r}),onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while updating item")}})},voe=(e,t,n)=>({queryKey:["emailexclude",e,n,t],queryFn:()=>At.executeRequest(`/clientdomains/exclude?From=${e}&ItemType=${t}&CurrEmailReviewPeriodId=${n}`,"GET")}),boe=()=>{const e=ln();return Bt({mutationFn:({item:t,itemType:n,currEmailReviewPeriodId:r,filterType:a="blacklist",isEmailLimit:i=!0})=>At.executeRequest("/emailaccounts/deactivate","POST",{item:t,itemType:n,filterType:a,isEmailLimit:i,currEmailReviewPeriodId:r,filters:[],sortings:[]}),onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while excluding item. Please try again!")}})},yoe=()=>{const e=ln();return Bt({mutationFn:({reviewPeriodId:t,isEnable:n})=>{const r=n?"/Archiving/disable_exclusion_confirmation_popup":"/Archiving/enable_exclusion_confirmation_popup";return At.executeRequest(r,"POST",{reviewPeriodId:t})},onSuccess:()=>{e.invalidateQueries([Rc,qf])},onError:()=>{Ze.error("Error occurred while excluding item. Please try again!")}})},vm=pr(),Aoe=[vm.accessor("from",{header:"From",cell:e=>m.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.getValue()})}),vm.accessor("to",{header:"To",cell:e=>{const t=e.getValue().split(",");let n=null;const r=t[0];return t.length<1&&(n=null),t.length==1?n=r:n=r+" +"+(t.length-1),m.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n})}}),vm.accessor("subject",{header:"Subject",cell:e=>m.jsx("div",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:e.getValue()})}),vm.accessor("emailDate",{size:110,header:()=>m.jsx("div",{className:"text-right",children:"Date"}),cell:e=>m.jsx("div",{className:"text-right",children:sa(e.getValue(),"MM/dd/yyyy")})}),vm.accessor("status",{header:"Review Status",cell:e=>{const t=e.row.original;return t.isReviewed?m.jsxs("span",{className:"flex items-center gap-2 text-[#008E28]",children:[m.jsx(Oe,{icon:mr})," Reviewed"]}):t.isFurtherReview?m.jsxs("span",{className:"flex items-center gap-2 text-[#D33200]",children:[m.jsx("img",{src:Bg,className:"w-[13px]"})," Needs Further Review"]}):m.jsx("span",{className:"flex items-center gap-2 text-[#0000A9]",children:"Not Reviewed"})}})],xoe=()=>{const e=Ht(w=>w.reviewPeriod),t=ln(),{data:n=[],isLoading:r,isSuccess:a}=en(Rc(e)),[i,o]=N.useState(!1),[u,c]=N.useState(!1),[h,p]=N.useState(!1),[g,b]=N.useState([]);N.useEffect(()=>{t.invalidateQueries({queryKey:["emails",e]})},[e]),N.useEffect(()=>{b(n.filter(w=>(!i||w.isKeyword)&&(!u||w.isHeightenedSupervision)&&(!h||w.isReviewed)))},[i,u,h]),N.useEffect(()=>{!n||!a||b(n)},[n,a]);const y=[{label:"Flagged Words",active:i,onClick:()=>{o(!i)}},{label:"Heightened Supervision",active:u,onClick:()=>{c(!u)}},{label:"Reviewed Emails",active:h,onClick:()=>{p(!h)}}],A=yr({data:g,columns:Aoe,getCoreRowModel:vr(),getPaginationRowModel:br(),getRowId:w=>w.id,getFilteredRowModel:zr(),globalFilterFn:"includesString"}),x=Gr();return m.jsx($I,{searchPlaceholder:"Search Email Records",title:"Email",table:A,filters:y,isLoading:r,emptyMessage:r?"Loading...":"No emails to review for the selected period!",onRowClick:w=>x({to:`/email/${w.original.esId}`}),paginationControlLabel:"emails to review"})},wf=Math.min,ic=Math.max,mb=Math.round,bv=Math.floor,Es=e=>({x:e,y:e}),woe={left:"right",right:"left",bottom:"top",top:"bottom"},Soe={start:"end",end:"start"};function xO(e,t,n){return ic(e,wf(t,n))}function Lg(e,t){return typeof e=="function"?e(t):e}function gc(e){return e.split("-")[0]}function Fg(e){return e.split("-")[1]}function Hq(e){return e==="x"?"y":"x"}function tD(e){return e==="y"?"height":"width"}function sc(e){return["top","bottom"].includes(gc(e))?"y":"x"}function nD(e){return Hq(sc(e))}function Eoe(e,t,n){n===void 0&&(n=!1);const r=Fg(e),a=nD(e),i=tD(a);let o=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=gb(o)),[o,gb(o)]}function Coe(e){const t=gb(e);return[wO(e),t,wO(t)]}function wO(e){return e.replace(/start|end/g,t=>Soe[t])}function Roe(e,t,n){const r=["left","right"],a=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?i:o;default:return[]}}function Ooe(e,t,n,r){const a=Fg(e);let i=Roe(gc(e),n==="start",r);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(wO)))),i}function gb(e){return e.replace(/left|right|bottom|top/g,t=>woe[t])}function Ioe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vq(e){return typeof e!="number"?Ioe(e):{top:e,right:e,bottom:e,left:e}}function pb(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function jj(e,t,n){let{reference:r,floating:a}=e;const i=sc(t),o=nD(t),u=tD(o),c=gc(t),h=i==="y",p=r.x+r.width/2-a.width/2,g=r.y+r.height/2-a.height/2,b=r[u]/2-a[u]/2;let y;switch(c){case"top":y={x:p,y:r.y-a.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:g};break;case"left":y={x:r.x-a.width,y:g};break;default:y={x:r.x,y:r.y}}switch(Fg(t)){case"start":y[o]-=b*(n&&h?-1:1);break;case"end":y[o]+=b*(n&&h?-1:1);break}return y}const Doe=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:o}=n,u=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let h=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:g}=jj(h,r,c),b=r,y={},A=0;for(let x=0;x<u.length;x++){const{name:w,fn:C}=u[x],{x:_,y:D,data:T,reset:E}=await C({x:p,y:g,initialPlacement:r,placement:b,strategy:a,middlewareData:y,rects:h,platform:o,elements:{reference:e,floating:t}});p=_!=null?_:p,g=D!=null?D:g,y={...y,[w]:{...y[w],...T}},E&&A<=50&&(A++,typeof E=="object"&&(E.placement&&(b=E.placement),E.rects&&(h=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):E.rects),{x:p,y:g}=jj(h,b,c)),x=-1)}return{x:p,y:g,placement:b,strategy:a,middlewareData:y}};async function Yq(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:o,elements:u,strategy:c}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:b=!1,padding:y=0}=Lg(t,e),A=Vq(y),w=u[b?g==="floating"?"reference":"floating":g],C=pb(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:h,rootBoundary:p,strategy:c})),_=g==="floating"?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,D=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),T=await(i.isElement==null?void 0:i.isElement(D))?await(i.getScale==null?void 0:i.getScale(D))||{x:1,y:1}:{x:1,y:1},E=pb(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:D,strategy:c}):_);return{top:(C.top-E.top+A.top)/T.y,bottom:(E.bottom-C.bottom+A.bottom)/T.y,left:(C.left-E.left+A.left)/T.x,right:(E.right-C.right+A.right)/T.x}}const Moe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:o,elements:u,middlewareData:c}=t,{element:h,padding:p=0}=Lg(e,t)||{};if(h==null)return{};const g=Vq(p),b={x:n,y:r},y=nD(a),A=tD(y),x=await o.getDimensions(h),w=y==="y",C=w?"top":"left",_=w?"bottom":"right",D=w?"clientHeight":"clientWidth",T=i.reference[A]+i.reference[y]-b[y]-i.floating[A],E=b[y]-i.reference[y],M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(h));let O=M?M[D]:0;(!O||!await(o.isElement==null?void 0:o.isElement(M)))&&(O=u.floating[D]||i.floating[A]);const I=T/2-E/2,P=O/2-x[A]/2-1,j=wf(g[C],P),L=wf(g[_],P),k=j,q=O-x[A]-L,Y=O/2-x[A]/2+I,J=xO(k,Y,q),H=!c.arrow&&Fg(a)!=null&&Y!==J&&i.reference[A]/2-(Y<k?j:L)-x[A]/2<0,ee=H?Y<k?Y-k:Y-q:0;return{[y]:b[y]+ee,data:{[y]:J,centerOffset:Y-J-ee,...H&&{alignmentOffset:ee}},reset:H}}}),Poe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:o,initialPlacement:u,platform:c,elements:h}=t,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:x=!0,...w}=Lg(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const C=gc(a),_=sc(u),D=gc(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(h.floating)),E=b||(D||!x?[gb(u)]:Coe(u)),M=A!=="none";!b&&M&&E.push(...Ooe(u,x,A,T));const O=[u,...E],I=await Yq(t,w),P=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&P.push(I[C]),g){const J=Eoe(a,o,T);P.push(I[J[0]],I[J[1]])}if(j=[...j,{placement:a,overflows:P}],!P.every(J=>J<=0)){var L,k;const J=(((L=i.flip)==null?void 0:L.index)||0)+1,H=O[J];if(H){var q;const ne=g==="alignment"?_!==sc(H):!1,fe=((q=j[0])==null?void 0:q.overflows[0])>0;if(!ne||fe)return{data:{index:J,overflows:j},reset:{placement:H}}}let ee=(k=j.filter(ne=>ne.overflows[0]<=0).sort((ne,fe)=>ne.overflows[1]-fe.overflows[1])[0])==null?void 0:k.placement;if(!ee)switch(y){case"bestFit":{var Y;const ne=(Y=j.filter(fe=>{if(M){const z=sc(fe.placement);return z===_||z==="y"}return!0}).map(fe=>[fe.placement,fe.overflows.filter(z=>z>0).reduce((z,V)=>z+V,0)]).sort((fe,z)=>fe[1]-z[1])[0])==null?void 0:Y[0];ne&&(ee=ne);break}case"initialPlacement":ee=u;break}if(a!==ee)return{reset:{placement:ee}}}return{}}}};async function Toe(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),o=gc(n),u=Fg(n),c=sc(n)==="y",h=["left","top"].includes(o)?-1:1,p=i&&c?-1:1,g=Lg(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:A}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof A=="number"&&(y=u==="end"?A*-1:A),c?{x:y*p,y:b*h}:{x:b*h,y:y*p}}const _oe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:o,middlewareData:u}=t,c=await Toe(t,e);return o===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},joe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:u={fn:w=>{let{x:C,y:_}=w;return{x:C,y:_}}},...c}=Lg(e,t),h={x:n,y:r},p=await Yq(t,c),g=sc(gc(a)),b=Hq(g);let y=h[b],A=h[g];if(i){const w=b==="y"?"top":"left",C=b==="y"?"bottom":"right",_=y+p[w],D=y-p[C];y=xO(_,y,D)}if(o){const w=g==="y"?"top":"left",C=g==="y"?"bottom":"right",_=A+p[w],D=A-p[C];A=xO(_,A,D)}const x=u.fn({...t,[b]:y,[g]:A});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[b]:i,[g]:o}}}}}};function Wb(){return typeof window!="undefined"}function zf(e){return Wq(e)?(e.nodeName||"").toLowerCase():"#document"}function mi(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ms(e){var t;return(t=(Wq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wq(e){return Wb()?e instanceof Node||e instanceof mi(e).Node:!1}function as(e){return Wb()?e instanceof Element||e instanceof mi(e).Element:!1}function Os(e){return Wb()?e instanceof HTMLElement||e instanceof mi(e).HTMLElement:!1}function Nj(e){return!Wb()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof mi(e).ShadowRoot}function kg(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=is(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function Noe(e){return["table","td","th"].includes(zf(e))}function Ub(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function rD(e){const t=aD(),n=as(e)?is(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Boe(e){let t=kl(e);for(;Os(t)&&!Sf(t);){if(rD(t))return t;if(Ub(t))return null;t=kl(t)}return null}function aD(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Sf(e){return["html","body","#document"].includes(zf(e))}function is(e){return mi(e).getComputedStyle(e)}function Gb(e){return as(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kl(e){if(zf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nj(e)&&e.host||Ms(e);return Nj(t)?t.host:t}function Uq(e){const t=kl(e);return Sf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Os(t)&&kg(t)?t:Uq(t)}function dg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=Uq(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),o=mi(a);if(i){const u=SO(o);return t.concat(o,o.visualViewport||[],kg(a)?a:[],u&&n?dg(u):[])}return t.concat(a,dg(a,[],n))}function SO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Gq(e){const t=is(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Os(e),i=a?e.offsetWidth:n,o=a?e.offsetHeight:r,u=mb(n)!==i||mb(r)!==o;return u&&(n=i,r=o),{width:n,height:r,$:u}}function iD(e){return as(e)?e:e.contextElement}function Jd(e){const t=iD(e);if(!Os(t))return Es(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=Gq(t);let o=(i?mb(n.width):n.width)/r,u=(i?mb(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const Loe=Es(0);function Xq(e){const t=mi(e);return!aD()||!t.visualViewport?Loe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Foe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mi(e)?!1:t}function pc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=iD(e);let o=Es(1);t&&(r?as(r)&&(o=Jd(r)):o=Jd(e));const u=Foe(i,n,r)?Xq(i):Es(0);let c=(a.left+u.x)/o.x,h=(a.top+u.y)/o.y,p=a.width/o.x,g=a.height/o.y;if(i){const b=mi(i),y=r&&as(r)?mi(r):r;let A=b,x=SO(A);for(;x&&r&&y!==A;){const w=Jd(x),C=x.getBoundingClientRect(),_=is(x),D=C.left+(x.clientLeft+parseFloat(_.paddingLeft))*w.x,T=C.top+(x.clientTop+parseFloat(_.paddingTop))*w.y;c*=w.x,h*=w.y,p*=w.x,g*=w.y,c+=D,h+=T,A=mi(x),x=SO(A)}}return pb({width:p,height:g,x:c,y:h})}function sD(e,t){const n=Gb(e).scrollLeft;return t?t.left+n:pc(Ms(e)).left+n}function Zq(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:sD(e,r)),i=r.top+t.scrollTop;return{x:a,y:i}}function koe(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",o=Ms(r),u=t?Ub(t.floating):!1;if(r===o||u&&i)return n;let c={scrollLeft:0,scrollTop:0},h=Es(1);const p=Es(0),g=Os(r);if((g||!g&&!i)&&((zf(r)!=="body"||kg(o))&&(c=Gb(r)),Os(r))){const y=pc(r);h=Jd(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=o&&!g&&!i?Zq(o,c,!0):Es(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-c.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-c.scrollTop*h.y+p.y+b.y}}function qoe(e){return Array.from(e.getClientRects())}function zoe(e){const t=Ms(e),n=Gb(e),r=e.ownerDocument.body,a=ic(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ic(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+sD(e);const u=-n.scrollTop;return is(r).direction==="rtl"&&(o+=ic(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:o,y:u}}function Qoe(e,t){const n=mi(e),r=Ms(e),a=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,u=0,c=0;if(a){i=a.width,o=a.height;const h=aD();(!h||h&&t==="fixed")&&(u=a.offsetLeft,c=a.offsetTop)}return{width:i,height:o,x:u,y:c}}function Hoe(e,t){const n=pc(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=Os(e)?Jd(e):Es(1),o=e.clientWidth*i.x,u=e.clientHeight*i.y,c=a*i.x,h=r*i.y;return{width:o,height:u,x:c,y:h}}function Bj(e,t,n){let r;if(t==="viewport")r=Qoe(e,n);else if(t==="document")r=zoe(Ms(e));else if(as(t))r=Hoe(t,n);else{const a=Xq(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return pb(r)}function Kq(e,t){const n=kl(e);return n===t||!as(n)||Sf(n)?!1:is(n).position==="fixed"||Kq(n,t)}function Voe(e,t){const n=t.get(e);if(n)return n;let r=dg(e,[],!1).filter(u=>as(u)&&zf(u)!=="body"),a=null;const i=is(e).position==="fixed";let o=i?kl(e):e;for(;as(o)&&!Sf(o);){const u=is(o),c=rD(o);!c&&u.position==="fixed"&&(a=null),(i?!c&&!a:!c&&u.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||kg(o)&&!c&&Kq(e,o))?r=r.filter(p=>p!==o):a=u,o=kl(o)}return t.set(e,r),r}function Yoe(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[...n==="clippingAncestors"?Ub(t)?[]:Voe(t,this._c):[].concat(n),r],u=o[0],c=o.reduce((h,p)=>{const g=Bj(t,p,a);return h.top=ic(g.top,h.top),h.right=wf(g.right,h.right),h.bottom=wf(g.bottom,h.bottom),h.left=ic(g.left,h.left),h},Bj(t,u,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Woe(e){const{width:t,height:n}=Gq(e);return{width:t,height:n}}function Uoe(e,t,n){const r=Os(t),a=Ms(t),i=n==="fixed",o=pc(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const c=Es(0);function h(){c.x=sD(a)}if(r||!r&&!i)if((zf(t)!=="body"||kg(a))&&(u=Gb(t)),r){const y=pc(t,!0,i,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else a&&h();i&&!r&&a&&h();const p=a&&!r&&!i?Zq(a,u):Es(0),g=o.left+u.scrollLeft-c.x-p.x,b=o.top+u.scrollTop-c.y-p.y;return{x:g,y:b,width:o.width,height:o.height}}function mx(e){return is(e).position==="static"}function Lj(e,t){if(!Os(e)||is(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ms(e)===n&&(n=n.ownerDocument.body),n}function Jq(e,t){const n=mi(e);if(Ub(e))return n;if(!Os(e)){let a=kl(e);for(;a&&!Sf(a);){if(as(a)&&!mx(a))return a;a=kl(a)}return n}let r=Lj(e,t);for(;r&&Noe(r)&&mx(r);)r=Lj(r,t);return r&&Sf(r)&&mx(r)&&!rD(r)?n:r||Boe(e)||n}const Goe=async function(e){const t=this.getOffsetParent||Jq,n=this.getDimensions,r=await n(e.floating);return{reference:Uoe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xoe(e){return is(e).direction==="rtl"}const Zoe={convertOffsetParentRelativeRectToViewportRelativeRect:koe,getDocumentElement:Ms,getClippingRect:Yoe,getOffsetParent:Jq,getElementRects:Goe,getClientRects:qoe,getDimensions:Woe,getScale:Jd,isElement:as,isRTL:Xoe};function $q(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Koe(e,t){let n=null,r;const a=Ms(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function o(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),i();const h=e.getBoundingClientRect(),{left:p,top:g,width:b,height:y}=h;if(u||t(),!b||!y)return;const A=bv(g),x=bv(a.clientWidth-(p+b)),w=bv(a.clientHeight-(g+y)),C=bv(p),D={rootMargin:-A+"px "+-x+"px "+-w+"px "+-C+"px",threshold:ic(0,wf(1,c))||1};let T=!0;function E(M){const O=M[0].intersectionRatio;if(O!==c){if(!T)return o();O?o(!1,O):r=setTimeout(()=>{o(!1,1e-7)},1e3)}O===1&&!$q(h,e.getBoundingClientRect())&&o(),T=!1}try{n=new IntersectionObserver(E,{...D,root:a.ownerDocument})}catch(M){n=new IntersectionObserver(E,D)}n.observe(e)}return o(!0),i}function Joe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,h=iD(e),p=a||i?[...h?dg(h):[],...dg(t)]:[];p.forEach(C=>{a&&C.addEventListener("scroll",n,{passive:!0}),i&&C.addEventListener("resize",n)});const g=h&&u?Koe(h,n):null;let b=-1,y=null;o&&(y=new ResizeObserver(C=>{let[_]=C;_&&_.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var D;(D=y)==null||D.observe(t)})),n()}),h&&!c&&y.observe(h),y.observe(t));let A,x=c?pc(e):null;c&&w();function w(){const C=pc(e);x&&!$q(x,C)&&n(),x=C,A=requestAnimationFrame(w)}return n(),()=>{var C;p.forEach(_=>{a&&_.removeEventListener("scroll",n),i&&_.removeEventListener("resize",n)}),g==null||g(),(C=y)==null||C.disconnect(),y=null,c&&cancelAnimationFrame(A)}}const $oe=_oe,ele=joe,tle=Poe,nle=Moe,Fj=(e,t,n)=>{const r=new Map,a={platform:Zoe,...n},i={...a.platform,_c:r};return Doe(e,t,{...a,platform:i})};var gx={exports:{}};/*!
|
|
615
615
|
Copyright (c) 2018 Jed Watson.
|
|
616
616
|
Licensed under the MIT License (MIT), see
|
|
617
617
|
http://jedwatson.github.io/classnames
|