@yext/pages-components 1.0.8 → 1.0.9

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CMl7zBKp.cjs"),x=require("react"),N=require("react-dom");function k(){return i.getRuntime().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,N.createPortal(i.jsxRuntimeExports.jsx(w,{}),document.body))}const S=(e,n)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,c=e.dataset.yaEventname,a=t||n;return{action:s,originalEventName:a?`${a}_${c}`:c,scope:a}},C=(e,n)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(n),t&&s.push(t);return s},m={},R="YA_NO_SCOPE",y=(e,n,s,t)=>{m.hasOwnProperty(e)?m[e].events.map(c=>c.el).includes(t)||(m[e].events=[...m[e].events,{eventData:n,el:t}]):m[e]={scopeEl:s||t,events:[{eventData:n,el:t}]}};function w(){const[e,n]=x.useState(),[s,t]=x.useState([]),[c,a]=x.useState(!1),o=l=>{n(e===l?void 0:l)};return x.useEffect(()=>(document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((r,d)=>{const u=r.closest("[data-ya-scope]"),v=u==null?void 0:u.dataset.yaScope,g=S(r,v);r.addEventListener("mouseenter",()=>{t([{elem:r,key:`${g.originalEventName}_${d}`,action:g.action,originalEventName:g.originalEventName,scope:g.scope}])}),r.addEventListener("mouseleave",()=>{t([])});const b=r.dataset.yaScopeoverride;b?y(b,g,u,r):[v,...C(r,"[data-ya-scope]").map(p=>p.dataset.yaScope)].forEach(p=>{y(p||R,g,u,r)})}),a(!0),()=>{document.documentElement.classList.remove("xYextDebug")}),[]),c?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger",children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-toggles",children:[i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>o("Events"),children:"Events"}),i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>o("Scopes"),children:"Scopes"})]}),e&&i.jsxRuntimeExports.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?i.jsxRuntimeExports.jsx(O,{data:m,setTooltips:t}):i.jsxRuntimeExports.jsx(Y,{data:m,setTooltips:t})})]}),i.jsxRuntimeExports.jsx(T,{tooltips:s})]}):null}const B=()=>{const e=[];return Object.entries(m).map(([n,s])=>s.events.map(t=>{e.map(c=>c.eventData.originalEventName).includes(t.eventData.originalEventName)||e.push(t)})),e};function O(e){const{setTooltips:n}=e,[s,t]=x.useState(),[c,a]=x.useState(""),o=(l,r,d)=>{l.scrollIntoView({behavior:"smooth",block:"nearest"}),s&&s.classList.remove("analytics-event-highlight"),t(l),l.classList.add("analytics-event-highlight"),a(d),n([{elem:l,key:d,action:r.action,originalEventName:r.originalEventName,scope:r.scope}])};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:B().map((l,r)=>{const d=l.eventData,u=`${d.originalEventName}_${r}`;return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":u===c}),onClick:()=>o(l.el,d,u),children:d.originalEventName})},u)})})]})}function Y(e){const{data:n,setTooltips:s}=e,[t,c]=x.useState(""),a=o=>{const l=n[o];l.scopeEl&&(l.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),c(o),s(l.events.map((r,d)=>{const u=r.eventData;return{elem:r.el,key:`${u.originalEventName}_${d}`,action:u.action,originalEventName:u.originalEventName,scope:u.scope}})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(n).map((o,l)=>{if(o!==R)return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":o===t}),onClick:()=>a(o),children:o})},o+l)})})]})}function T(e){const n=x.useRef({});return x.useEffect(()=>{if(n.current)for(const s of Object.values(n.current)){const t=Object.values(n.current).map(c=>c.el).filter(c=>c!==s.el);$(s,t),s.el.style.visibility="visible"}},[e.tooltips]),i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:e.tooltips.map(s=>i.jsxRuntimeExports.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?n.current[s.key]={el:t,tooltip:s}:delete n.current[s.key]},children:[i.jsxRuntimeExports.jsxs("span",{children:["Action: ",s.action]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Scope: ",s.scope]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function $(e,n){for(let s=0;s<9;s++){const t=I(e.tooltip.elem.getBoundingClientRect(),e.el,s);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!A(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let a=!0;for(let o=0;o<n.length;o++){const l=n[o];D(e.el,l)&&(a=!1)}if(a)break}}function D(e,n){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,c=s+e.clientHeight,a=t+e.clientWidth,o=n.getBoundingClientRect().top+window.scrollY,l=n.getBoundingClientRect().left,r=o+n.clientHeight,d=l+n.clientWidth,u=(v,g,b,h,p,j,E,f)=>b<=p&&p<=E&&h<=j&&j<=f||b<=v&&v<=E&&h<=g&&g<=f||b<=v&&v<=E&&h<=j&&j<=f||b<=p&&p<=E&&h<=g&&g<=f;return u(t,s,l,o,a,c,d,r)||u(l,o,t,s,d,r,a,c)}function A(e,n,s,t){return e<0||s>window.innerWidth||n<0||t>document.documentElement.scrollHeight}function I(e,n,s){const t=n.clientHeight,c=n.clientWidth;let a,o;switch(s){case 0:{o=window.scrollY+e.top-t+"px",a=e.left-c+"px";break}case 1:{o=window.scrollY+e.top-t+"px",a=e.left+"px";break}case 2:{o=window.scrollY+e.top-t+"px",a=e.right+"px";break}case 3:{o=window.scrollY+e.top-t+"px",a=e.right-c+"px";break}case 4:{o=window.scrollY+e.bottom+"px",a=e.left-c+"px";break}case 5:{o=window.scrollY+e.bottom+"px",a=e.left+"px";break}case 6:{o=window.scrollY+e.bottom+"px",a=e.right-c+"px";break}case 7:{o=window.scrollY+e.bottom+"px",a=e.right+"px";break}default:o=0,a=0}return{top:o,left:a}}exports.AnalyticsDebuggerInternal=w;exports.default=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-DFMeoKHF.cjs"),x=require("react"),N=require("react-dom");function k(){return i.getRuntime().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,N.createPortal(i.jsxRuntimeExports.jsx(w,{}),document.body))}const S=(e,n)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,c=e.dataset.yaEventname,a=t||n;return{action:s,originalEventName:a?`${a}_${c}`:c,scope:a}},C=(e,n)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(n),t&&s.push(t);return s},m={},R="YA_NO_SCOPE",y=(e,n,s,t)=>{m.hasOwnProperty(e)?m[e].events.map(c=>c.el).includes(t)||(m[e].events=[...m[e].events,{eventData:n,el:t}]):m[e]={scopeEl:s||t,events:[{eventData:n,el:t}]}};function w(){const[e,n]=x.useState(),[s,t]=x.useState([]),[c,a]=x.useState(!1),o=l=>{n(e===l?void 0:l)};return x.useEffect(()=>(document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((r,d)=>{const u=r.closest("[data-ya-scope]"),v=u==null?void 0:u.dataset.yaScope,g=S(r,v);r.addEventListener("mouseenter",()=>{t([{elem:r,key:`${g.originalEventName}_${d}`,action:g.action,originalEventName:g.originalEventName,scope:g.scope}])}),r.addEventListener("mouseleave",()=>{t([])});const b=r.dataset.yaScopeoverride;b?y(b,g,u,r):[v,...C(r,"[data-ya-scope]").map(p=>p.dataset.yaScope)].forEach(p=>{y(p||R,g,u,r)})}),a(!0),()=>{document.documentElement.classList.remove("xYextDebug")}),[]),c?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger",children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-toggles",children:[i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>o("Events"),children:"Events"}),i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>o("Scopes"),children:"Scopes"})]}),e&&i.jsxRuntimeExports.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?i.jsxRuntimeExports.jsx(O,{data:m,setTooltips:t}):i.jsxRuntimeExports.jsx(Y,{data:m,setTooltips:t})})]}),i.jsxRuntimeExports.jsx(T,{tooltips:s})]}):null}const B=()=>{const e=[];return Object.entries(m).map(([n,s])=>s.events.map(t=>{e.map(c=>c.eventData.originalEventName).includes(t.eventData.originalEventName)||e.push(t)})),e};function O(e){const{setTooltips:n}=e,[s,t]=x.useState(),[c,a]=x.useState(""),o=(l,r,d)=>{l.scrollIntoView({behavior:"smooth",block:"nearest"}),s&&s.classList.remove("analytics-event-highlight"),t(l),l.classList.add("analytics-event-highlight"),a(d),n([{elem:l,key:d,action:r.action,originalEventName:r.originalEventName,scope:r.scope}])};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:B().map((l,r)=>{const d=l.eventData,u=`${d.originalEventName}_${r}`;return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":u===c}),onClick:()=>o(l.el,d,u),children:d.originalEventName})},u)})})]})}function Y(e){const{data:n,setTooltips:s}=e,[t,c]=x.useState(""),a=o=>{const l=n[o];l.scopeEl&&(l.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),c(o),s(l.events.map((r,d)=>{const u=r.eventData;return{elem:r.el,key:`${u.originalEventName}_${d}`,action:u.action,originalEventName:u.originalEventName,scope:u.scope}})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(n).map((o,l)=>{if(o!==R)return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":o===t}),onClick:()=>a(o),children:o})},o+l)})})]})}function T(e){const n=x.useRef({});return x.useEffect(()=>{if(n.current)for(const s of Object.values(n.current)){const t=Object.values(n.current).map(c=>c.el).filter(c=>c!==s.el);$(s,t),s.el.style.visibility="visible"}},[e.tooltips]),i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:e.tooltips.map(s=>i.jsxRuntimeExports.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?n.current[s.key]={el:t,tooltip:s}:delete n.current[s.key]},children:[i.jsxRuntimeExports.jsxs("span",{children:["Action: ",s.action]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Scope: ",s.scope]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function $(e,n){for(let s=0;s<9;s++){const t=I(e.tooltip.elem.getBoundingClientRect(),e.el,s);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!A(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let a=!0;for(let o=0;o<n.length;o++){const l=n[o];D(e.el,l)&&(a=!1)}if(a)break}}function D(e,n){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,c=s+e.clientHeight,a=t+e.clientWidth,o=n.getBoundingClientRect().top+window.scrollY,l=n.getBoundingClientRect().left,r=o+n.clientHeight,d=l+n.clientWidth,u=(v,g,b,h,p,j,E,f)=>b<=p&&p<=E&&h<=j&&j<=f||b<=v&&v<=E&&h<=g&&g<=f||b<=v&&v<=E&&h<=j&&j<=f||b<=p&&p<=E&&h<=g&&g<=f;return u(t,s,l,o,a,c,d,r)||u(l,o,t,s,d,r,a,c)}function A(e,n,s,t){return e<0||s>window.innerWidth||n<0||t>document.documentElement.scrollHeight}function I(e,n,s){const t=n.clientHeight,c=n.clientWidth;let a,o;switch(s){case 0:{o=window.scrollY+e.top-t+"px",a=e.left-c+"px";break}case 1:{o=window.scrollY+e.top-t+"px",a=e.left+"px";break}case 2:{o=window.scrollY+e.top-t+"px",a=e.right+"px";break}case 3:{o=window.scrollY+e.top-t+"px",a=e.right-c+"px";break}case 4:{o=window.scrollY+e.bottom+"px",a=e.left-c+"px";break}case 5:{o=window.scrollY+e.bottom+"px",a=e.left+"px";break}case 6:{o=window.scrollY+e.bottom+"px",a=e.right-c+"px";break}case 7:{o=window.scrollY+e.bottom+"px",a=e.right+"px";break}default:o=0,a=0}return{top:o,left:a}}exports.AnalyticsDebuggerInternal=w;exports.default=k;
@@ -1,4 +1,4 @@
1
- import { g as C, j as o, c as j } from "./index-DmrYUFTF.js";
1
+ import { g as C, j as o, c as j } from "./index-BD3PUS-n.js";
2
2
  import { useState as b, useEffect as N, useRef as B } from "react";
3
3
  import { createPortal as S } from "react-dom";
4
4
  function q() {
@@ -1616,7 +1616,7 @@ const tN = (e) => {
1616
1616
  default:
1617
1617
  return "";
1618
1618
  }
1619
- }, lp = Nc(null), nN = Z_(() => import("./debugger-XdM5KrVj.js"));
1619
+ }, lp = Nc(null), nN = Z_(() => import("./debugger-Yi81eB35.js"));
1620
1620
  function JS(e) {
1621
1621
  const {
1622
1622
  children: t,
@@ -2210,7 +2210,7 @@ const sa = /* @__PURE__ */ rp(dN), yf = (e) => e.linkType === "Email" || !e.link
2210
2210
  className: sa("Link", f),
2211
2211
  href: P ? btoa(yf(r)) : yf(r),
2212
2212
  onClick: H,
2213
- rel: t.target && !t.rel ? "noopener" : void 0,
2213
+ rel: t.target && !t.rel ? "noopener" : t.rel,
2214
2214
  ref: n
2215
2215
  };
2216
2216
  return I != null && I.getDebugEnabled() && (re["data-ya-action"] = k, re["data-ya-scopeoverride"] = _, re["data-ya-eventname"] = G), /* @__PURE__ */ ft.jsx("a", { ...v, ...re, suppressHydrationWarning: !0, children: l || r.label || j });
@@ -26115,7 +26115,7 @@ const FT = (e, t) => e(t, "i", oo(e, t)), BT = (e, t) => e(t, "b", oo(e, t)), HT
26115
26115
  (async () => {
26116
26116
  if (!r)
26117
26117
  try {
26118
- r = (await import("./index-B47Uqwbc.js")).default;
26118
+ r = (await import("./index-TsFEhBRJ.js")).default;
26119
26119
  } catch {
26120
26120
  throw new Error(
26121
26121
  "Failed to import React Markdown, cannot properly render LegacyRichText."
@@ -29,11 +29,11 @@ React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
30
  <%s key={someKey} {...props} />`,Jn,Ln,Mi,Ln),Yt[Ln+Jn]=!0}}return pe===r?kt(cn):tn(cn),cn}}function Qt(pe,Ze,nt){return bt(pe,Ze,nt,!0)}function wr(pe,Ze,nt){return bt(pe,Ze,nt,!1)}var mi=wr,_i=Qt;jl.Fragment=r,jl.jsx=mi,jl.jsxs=_i}()),jl}process.env.NODE_ENV==="production"?Hu.exports=iy():Hu.exports=oy();var ft=Hu.exports;function sy(e){switch(e){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const op={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},Wu={APPLE:"apple",BING:"bing"},ly=(e,t)=>{const r={region:"localizedRegionName",countryCode:"localizedCountryName"}[e];return r&&t[r]},ay=(e,t=[],n,r={route:!1},l)=>{const d="Failed to construct query for maps service.";let f=e&&yf([e.line1,e.line2,e.city,e.region,e.postalCode,e.countryCode]);switch(r.provider){case Wu.APPLE:{if(l!=null&&l.latitude&&(l!=null&&l.longitude))return pf(`${l.latitude},${l.longitude}`,r.route);if(!f){console.warn(`${d} Check that you've provided a valid Yext Address.`);break}return pf(f,r.route)}case Wu.BING:{if(l!=null&&l.latitude&&(l!=null&&l.longitude))return mf(`${l.latitude},${l.longitude}`,r.route);if(f=e&&yf([e.line1,e.city,e.region,e.postalCode]),!f){console.warn(`${d} Check that you've provided a valid Yext Address.`);break}return mf(f,r.route)}default:{if(l!=null&&l.latitude&&(l!=null&&l.longitude))return _f(`${l.latitude},${l.longitude}`,r.route);const p=t.find(_=>{var T;return((T=_==null?void 0:_.publisher)==null?void 0:T.toUpperCase())===op.GOOGLEMYBUSINESS});if(p!=null&&p.listingUrl)return p.listingUrl;if(n)return cy(n,f,r.route);if(!f){console.warn(`${d} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return _f(f,r.route)}}},pf=(e,t)=>t?`https://maps.apple.com/?daddr=${e}`:`https://maps.apple.com/?address=${e}`,mf=(e,t)=>t?`https://bing.com/maps/default.aspx?rtp=adr.${e}`:`https://bing.com/maps/default.aspx?where1=${e}`,cy=(e,t,n)=>{const r=t?`&query=${t}`:"";return n?`https://maps.google.com/maps/dir/?api=1${r}&destination_place_id=${e}&destination=direct`:r?`https://maps.google.com/maps/search/?api=1${r}&query_place_id=${e}`:`https://maps.google.com/maps/dir/?api=1&destination_place_id=${e}&destination=direct`},_f=(e,t)=>t?`https://maps.google.com/maps/dir/?api=1&destination=${e}`:`https://maps.google.com/maps/search/?api=1&query=${e}`,yf=(e=[])=>{if(!e.length)return"";const t=e.filter(Boolean).join(", ");return encodeURI(t)},uy=({address:e,lines:t,separator:n=",",...r})=>{const l=(t||sy(e.countryCode)).map(d=>ft.jsx(dy,{address:e,line:d,separator:n},d.toString()));return rt.createElement("div",{...r,key:e.toString()},l)},dy=({address:e,line:t,separator:n})=>{const r=[];for(const l of t){if(l===","){r.push(ft.jsx("span",{children:n},l));continue}const d=e[l];if(!d)continue;const f=ly(l,e);if(f){r.push(ft.jsxs(ry.Fragment,{children:[" ",ft.jsx("abbr",{title:f,children:d})]},l));continue}r.push(ft.jsx("span",{children:" "+d},l))}return ft.jsx("div",{className:"address-line",children:r})};var tl={};Object.defineProperty(tl,"__esModule",{value:!0});var fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hy=typeof window<"u"&&typeof window.document<"u",gy=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,py=(typeof self>"u"?"undefined":fy(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",my=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),_y=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",Nf=tl.isBrowser=hy;tl.isWebWorker=py;var yy=tl.isNode=gy;tl.isJsDom=my;var Ny=tl.isDeno=_y;class Cy{constructor(){Ie(this,"name");Ie(this,"isServerSide");Ie(this,"version");var t;Ny?(this.name="deno",this.version="",Nf&&(this.version=((t=window.Deno)==null?void 0:t.version.deno)||""),this.isServerSide=!0):yy?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):Nf?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const Xs=()=>new Cy,Ey=(...e)=>typeof window<"u"&&window.IS_PRODUCTION||!1;function Yc(e){if(!cd(e))throw new Error("Parameter was not an error")}function cd(e){return!!e&&typeof e=="object"&&Ty(e)==="[object Error]"||e instanceof Error}function Ty(e){return Object.prototype.toString.call(e)}const xy="Layerr";let vy=xy;function Sy(){return vy}function wy(e){let t,n="";if(e.length===0)t={};else if(cd(e[0]))t={cause:e[0]},n=e.slice(1).join(" ")||"";else if(e[0]&&typeof e[0]=="object")t=Object.assign({},e[0]),n=e.slice(1).join(" ")||"";else if(typeof e[0]=="string")t={},n=n=e.join(" ")||"";else throw new Error("Invalid arguments passed to Layerr");return{options:t,shortMessage:n}}class Ai extends Error{constructor(t,n){const r=[...arguments],{options:l,shortMessage:d}=wy(r);let f=d;if(l.cause&&(f=`${f}: ${l.cause.message}`),super(f),this.message=f,l.name&&typeof l.name=="string"?this.name=l.name:this.name=Sy(),l.cause&&Object.defineProperty(this,"_cause",{value:l.cause}),Object.defineProperty(this,"_info",{value:{}}),l.info&&typeof l.info=="object"&&Object.assign(this._info,l.info),Error.captureStackTrace){const p=l.constructorOpt||this.constructor;Error.captureStackTrace(this,p)}}static cause(t){return Yc(t),t._cause&&cd(t._cause)?t._cause:null}static fullStack(t){Yc(t);const n=Ai.cause(t);return n?`${t.stack}
31
31
  caused by: ${Ai.fullStack(n)}`:t.stack??""}static info(t){Yc(t);const n={},r=Ai.cause(t);return r&&Object.assign(n,Ai.info(r)),t._info&&Object.assign(n,t._info),n}toString(){let t=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(t=`${t}: ${this.message}`),t}}const sp="0123456789ABCDEFGHJKMNPQRSTVWXYZ",ra=32,Cf=0xffffffffffff,Oy=10,Dy=16,ea=Object.freeze({source:"ulid"});function Ay(e){const t=My(),n=t&&(t.crypto||t.msCrypto)||null;if(typeof(n==null?void 0:n.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return n.getRandomValues(r),r[0]/255};if(typeof(n==null?void 0:n.randomBytes)=="function")return()=>n.randomBytes(1).readUInt8()/255;throw new Ai({info:{code:"PRNG_DETECT",...ea}},"Failed to find a reliable PRNG")}function My(){return Ly()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function Ry(e,t){let n="";for(;e>0;e--)n=Iy(t)+n;return n}function by(e,t){if(isNaN(e))throw new Ai({info:{code:"ENC_TIME_NAN",...ea}},`Time must be a number: ${e}`);if(e>Cf)throw new Ai({info:{code:"ENC_TIME_SIZE_EXCEED",...ea}},`Cannot encode a time larger than ${Cf}: ${e}`);if(e<0)throw new Ai({info:{code:"ENC_TIME_NEG",...ea}},`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new Ai({info:{code:"ENC_TIME_TYPE",...ea}},`Time must be an integer: ${e}`);let n,r="";for(let l=t;l>0;l--)n=e%ra,r=sp.charAt(n)+r,e=(e-n)/ra;return r}function Ly(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Iy(e){let t=Math.floor(e()*ra);return t===ra&&(t=ra-1),sp.charAt(t)}function ky(e,t){const n=Ay(),r=isNaN(e)?Date.now():e;return by(r,Oy)+Ry(Dy,n)}var Ef="yext_analytics_session_id";function Py(){if(typeof window>"u")return null;try{var e=window.sessionStorage.getItem(Ef);return e||(e=ky(),window.sessionStorage.setItem(Ef,e)),e}catch(t){return console.warn(`Unable to use browser sessionStorage for sessionId.
32
- `,t),null}}const $y="@yext/analytics",Fy="1.0.0-beta.5",By="An analytics library for Yext",Hy="fusion@yext.com",Wy="BSD-3-Clause",Ky="./lib/commonjs/src/index.js",zy="./lib/esm/src/index.js",Uy="./lib/analytics.d.ts",Gy=["analytics","report","events","yext"],Yy=["src","lib","THIRD-PARTY-NOTICES"],jy={build:"rm -rf lib/** && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && npm run format-check && npm run api-extractor && npm run generate-docs && npm run generate-notices && vite build",prepare:"husky install","format-check":"prettier --check . && eslint .","format-fix":"prettier --write . && eslint . --fix","api-extractor":"api-extractor run --local --verbose","generate-docs":"api-documenter markdown --input-folder temp --output-folder docs && rm -rf temp",prepublishOnly:"npm run build",test:"jest && playwright test",dev:"tsc -p tsconfig.esm.json --watch","generate-notices":"generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite"},Vy={"@babel/preset-env":"^7.14.7","@babel/preset-typescript":"^7.14.5","@microsoft/api-documenter":"^7.15.3","@microsoft/api-extractor":"^7.19.4","@playwright/test":"^1.38.0","@types/jest":"^29.5.12","@types/node":"^20.6.0","@typescript-eslint/eslint-plugin":"^6.19.1","@typescript-eslint/parser":"^6.19.1",eslint:"^7.32.0","fetch-mock-jest":"^1.5.1","generate-license-file":"^1.3.0",husky:"^8.0.3",jest:"^27.0.6","jest-fetch-mock":"^3.0.3",prettier:"^3.0.3",typescript:"^4.1.5",vite:"^4.4.9"},qy={bail:!1,verbose:!0,collectCoverage:!0,testEnvironment:"jsdom",collectCoverageFrom:["src/**","!src/utils/**"],moduleFileExtensions:["js","ts"],moduleDirectories:["node_modules","<rootDir>"],testMatch:["<rootDir>/tests/**/*.ts"],resetMocks:!0,restoreMocks:!0,clearMocks:!0,passWithNoTests:!0},Zy={ulidx:"^2.0.0"},Tf={name:$y,version:Fy,description:By,author:Hy,license:Wy,main:Ky,module:zy,types:Uy,keywords:Gy,files:Yy,scripts:jy,devDependencies:Vy,jest:qy,dependencies:Zy};function Jy(e,t,n){return n.debug?(lp(!0,t,n),!0):navigator.sendBeacon(e,JSON.stringify(t))}function Xy(e,t,n){return n.debug?(lp(!1,t,n),Promise.resolve(new Response)):fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0})}function Qy(e,t){return!t&&!!navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox")}function lp(e,t,n){var r=e?"Beacon":"fetch()";console.log("[DEBUG] AnalyticsConfig object at time of call to report():",n),console.log("[DEBUG] The following EventPayload would be sent to the Yext Events API using ".concat(r,":"),t)}var Ku=function(){return Ku=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},Ku.apply(this,arguments)},zu=function(e,t){if(!t||Object.keys(t).length===0)return e;if(!e||Object.keys(e).length===0)return t;var n=JSON.parse(JSON.stringify(e));for(var r in t)if(t.hasOwnProperty(r)){var l=t[r];l==null?delete n[r]:typeof l!="object"?n[r]=l:n[r]=zu(n[r],l)}return Ku({},n)},eN="yextevents.com/accounts/me/events";function tN(e,t){var n=e==="SANDBOX",r=t==null?void 0:t.toLowerCase();if(n&&r==="eu")throw new Error("Sandbox environment is not available in the EU region.");return"https://"+(n?"sbx.":"")+(r??"us")+"."+eN}var nN=function(e,t,n,r){function l(d){return d instanceof n?d:new n(function(f){f(d)})}return new(n||(n=Promise))(function(d,f){function p(E){try{T(r.next(E))}catch(S){f(S)}}function _(E){try{T(r.throw(E))}catch(S){f(S)}}function T(E){E.done?d(E.value):l(E.value).then(p,_)}T((r=r.apply(e,t||[])).next())})},rN=function(e,t){var n={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},r,l,d,f;return f={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function p(T){return function(E){return _([T,E])}}function _(T){if(r)throw new TypeError("Generator is already executing.");for(;f&&(f=0,T[0]&&(n=0)),n;)try{if(r=1,l&&(d=T[0]&2?l.return:T[0]?l.throw||((d=l.return)&&d.call(l),0):l.next)&&!(d=d.call(l,T[1])).done)return d;switch(l=0,d&&(T=[T[0]&2,d.value]),T[0]){case 0:case 1:d=T;break;case 4:return n.label++,{value:T[1],done:!1};case 5:n.label++,l=T[1],T=[0];continue;case 7:T=n.ops.pop(),n.trys.pop();continue;default:if(d=n.trys,!(d=d.length>0&&d[d.length-1])&&(T[0]===6||T[0]===2)){n=0;continue}if(T[0]===3&&(!d||T[1]>d[0]&&T[1]<d[3])){n.label=T[1];break}if(T[0]===6&&n.label<d[1]){n.label=d[1],d=T;break}if(d&&n.label<d[2]){n.label=d[2],n.ops.push(T);break}d[2]&&n.ops.pop(),n.trys.pop();continue}T=t.call(e,n)}catch(E){T=[6,E],l=0}finally{r=d=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}},iN=function(){function e(t,n){if(t.authorizationType!=="apiKey"&&t.authorizationType!=="bearer")throw new Error("Authorization type must be either apiKey or bearer.");if(!t.authorization)throw new Error("Authorization must be provided.");this.config=t,this.payload=n}return e.prototype.with=function(t){var n=this.payload===void 0?t:zu(this.payload,t);return new e(this.config,n)},e.prototype.report=function(t){var n;return nN(this,void 0,void 0,function(){var r,l,d,f,p=this;return rN(this,function(_){return r=zu((n=this.payload)!==null&&n!==void 0?n:{},t??{}),this.config.sessionTrackingEnabled?r.sessionId||(r.sessionId=Py()):r.sessionId=void 0,r.clientSdk?r.clientSdk.ANALYTICS=Tf.version:r.clientSdk=(f={},f.ANALYTICS=Tf.version,f),r.authorization=this.config.authorizationType==="apiKey"?"KEY "+this.config.authorization:"Bearer "+this.config.authorization,l=Qy(r,this.config.forceFetch),d=tN(this.config.env,this.config.region),l?[2,new Promise(function(T,E){Jy(d,r,p.config)?T(""):E("Failed Beacon Call")})]:[2,Xy(d,r,this.config).then(function(T){return T}).catch(function(T){return T})]})})},e}();function oN(e){return new iN(e)}function Uu(e){return e?e.toLowerCase().trim().replace(/\s/g,""):""}function ap(e,t){return[e,t].filter(n=>!!n).map(n=>Uu(n)).join("_")}const sN=e=>{switch(Math.floor(e/1e8%10)){case 0:return"US";case 1:return"EU";default:return""}},ud=rt.createContext(null),lN=rt.lazy(()=>Promise.resolve().then(()=>require("./debugger-Byx1SNbB.cjs")));function aN(e){const{children:t,apiKey:n,currency:r,templateData:l,requireOptIn:d,disableSessionTracking:f,enableDebugging:p}=e,_=rt.useRef(null),[T,E]=rt.useState(!1);rt.useEffect(()=>{E(!0)},[]),_.current===null&&(_.current=new cp(n,r,l,d,f,p??cc()));const S=_.current;return rt.useEffect(()=>(window.enableYextAnalytics=()=>{S.optIn()},()=>{delete window.enableYextAnalytics}),[S]),ft.jsxs(ft.Fragment,{children:[ft.jsx(ud.Provider,{value:S,children:t}),T&&(p||cc())&&Xs().name==="browser"?ft.jsx(rt.Suspense,{fallback:ft.jsx(ft.Fragment,{}),children:ft.jsx(lN,{})}):null]})}function cc(){return Xs().name!=="browser"||typeof window===void 0?!1:!!new URL(window.location.href).searchParams.get("xYextDebug")}class cp{constructor(t,n,r,l,d,f=!1){Ie(this,"_optedIn");Ie(this,"_sessionTrackingEnabled");Ie(this,"_analyticsEventService");Ie(this,"_pageViewFired",!1);this.apiKey=t,this.defaultCurrency=n,this.templateData=r,this.enableDebugging=f,this._optedIn=!l,this._sessionTrackingEnabled=!d,this.makeReporter(),this.pageView()}makeReporter(){if(Xs().name!=="browser"||!this._optedIn)return;if(!Ey()&&!this.getDebugEnabled()){console.warn("Yext Analytics disabled for non-production domains");return}const t=sN(this.templateData.document.businessId),n={authorizationType:"apiKey",authorization:this.apiKey,env:"PRODUCTION",region:t||"US",sessionTrackingEnabled:this._sessionTrackingEnabled,debug:this.getDebugEnabled()},r={pages:{siteUid:this.templateData.document.siteId,template:this.templateData.document.__.name},entity:this.templateData.document.uid||void 0,pageUrl:document.URL,referrerUrl:document.referrer!==""?document.referrer:void 0};this._analyticsEventService=oN(n).with(r)}canTrack(){return Xs().name==="browser"&&this._optedIn&&!!this._analyticsEventService}identify(t){this.canTrack()&&this._analyticsEventService&&(this._analyticsEventService=this._analyticsEventService.with({visitor:t}))}async optIn(){this._optedIn=!0,this.makeReporter(),this._pageViewFired||await this.pageView()}async pageView(){var t;if(!this.canTrack())return Promise.resolve(void 0);await((t=this._analyticsEventService)==null?void 0:t.report({action:"PAGE_VIEW"})),this._pageViewFired=!0}async track(t){var S;if(!this.canTrack())return Promise.resolve();const{action:n,scope:r,eventName:l,currency:d,amount:f,destinationUrl:p,customTags:_,customValues:T}=t;let E;f&&(E={amount:f,currency:d||this.defaultCurrency}),await((S=this._analyticsEventService)==null?void 0:S.report({action:n,pages:{scope:Uu(r)||void 0,originalEventName:ap(r||"",Uu(l)||"")},value:E,destinationUrl:p,customTags:_,customValues:T}))}getDebugEnabled(){return this.enableDebugging||cc()}}const Gu=rt.createContext({name:""}),dd=()=>rt.useContext(Gu).name;function cN(e){var f;const t=dd(),[n]=rt.useState({name:ap(t,e.name)}),r=(f=nl())==null?void 0:f.getDebugEnabled(),[l,d]=rt.useState(!1);return rt.useEffect(()=>{d(!0)},[]),r&&l?ft.jsx("section",{"data-ya-scope":n.name,children:ft.jsx(Gu.Provider,{value:n,children:e.children})}):ft.jsx(Gu.Provider,{value:n,children:e.children})}function nl(){const e=rt.useContext(ud);if(!e)return e;Xs().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=dd();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const uN=()=>{var e;return(e=nl())==null?void 0:e.track},dN=()=>{var e;return(e=nl())==null?void 0:e.pageView},fN=()=>{var e;return(e=nl())==null?void 0:e.identify},xo={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},hN=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const l=e.pathname.replace(/^\//,"").split("/");if(l.length<2||l.length>3){console.error(`Invalid path: ${e}`);return}let d;if(l[0]==="f")d="prod";else switch(l[0].replace("f-","")){case"sandbox":{d="sbx";break}case"qa":{d="qa";break}case"dev":{d="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(d==="dev"||d==="sbx")){console.error(`Invalid path: ${e}`);return}let f;if(l.length===3&&(f=parseInt(l[1]),Number.isNaN(f))){console.error(`Invalid account id: ${e}`);return}const p=l[l.length-1].split("."),_=p.length===2?`.${p[1]}`:"",T=p[0];return{scheme:t,partition:r,env:d,accountId:f,contentHash:T,extension:_}},gN=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let l="f";switch(e.env){case"prod":break;case"sbx":{l+="-sandbox";break}default:l+=`-${e.env.toString()}`}const d=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${l}/${d}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},pN=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const l=n[1];let d;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(d=parseFloat(n[2]),Number.isNaN(d)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const f=n[n.length-1].split("."),p=f.length===2?`.${f[1]}`:"",_=f[0];return{scheme:t,env:r,contentHash:l,aspectRatio:d,name:_,extension:p}},mN=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let l="p";switch(e.env){case"prod":break;case"sbx":{l+="-sandbox";break}default:l+=`-${e.env.toString()}`}return`${r}/${l}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},Yu=(e,t,n)=>{if(!up(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const l=pN(r);if(l)return mN(l,t,n)}else if(r.pathname.startsWith("/f")){const l=hN(r);if(l)return gN(l,t,n)}return e},up=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},_N=({image:e,className:t,width:n,height:r,aspectRatio:l,layout:d=xo.INTRINSIC,placeholder:f,imgOverrides:p,style:_={},loading:T="lazy"})=>{const E=rt.useRef(null),[S,w]=rt.useState(!1),M="image"in e?e.image:e;rt.useEffect(()=>{var ce;(ce=E.current)!=null&&ce.complete&&w(!0)},[]),yN(d,M.width,M.height,n,r,l);const m=Math.abs(M.width);m||console.warn("Invalid image width.");const v=Math.abs(M.height);if(v||console.warn("Invalid image height."),!up(M.url))return console.error(`Invalid image url: ${M.url}`),ft.jsx(ft.Fragment,{children:f!=null&&f});const k=n&&n>0?n:void 0,G=r&&r>0?r:void 0,{src:I,imgStyle:P,widths:H}=NN(d,m,v,_,M.url,k,G,l),j=H.map(ce=>`${Yu(M.url,ce,v/m*ce)} ${ce}w`).join(", "),re=[640,768,1024,1280,1536],te=H.map((ce,V)=>V===H.length-1?`${ce}px`:`(max-width: ${re[V]}px) ${ce}px`).join(", ");return ft.jsxs(ft.Fragment,{children:[!S&&f!=null&&f,ft.jsx("img",{ref:E,style:P,src:I,className:t,width:k,height:G,srcSet:j,sizes:te,loading:T,alt:M.alternateText||"",...p})]})},yN=(e,t,n,r,l,d)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===xo.FIXED){if(!r&&!l){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),l&&l<0&&console.warn(`Using fixed layout but height is invalid: ${l}.`);return}(r||l)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===xo.ASPECT&&!d&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},NN=(e,t,n,r,l,d,f,p)=>{let _=[100,320,640,960,1280,1920],T=Yu(l,500,500);const E={...r};switch(E.objectFit=E.objectFit||"cover",E.objectPosition=E.objectPosition||"center",e){case xo.INTRINSIC:E.maxWidth=t,E.width="100%",E.aspectRatio=p?`${p}`:`${t} / ${n}`;break;case xo.FIXED:{const{fixedWidth:S,fixedHeight:w,fixedWidths:M}=CN(t,n,_,d,f);E.width=S,E.height=w,_=M,T=Yu(l,S,w);break}case xo.ASPECT:E.aspectRatio=p?`${p}`:`${t} / ${n}`;break;case xo.FILL:E.width="100%",E.aspectRatio=p?`${p}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:T,imgStyle:E,widths:_}},CN=(e,t,n,r,l)=>r&&l?{fixedWidth:r,fixedHeight:l,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:l?{fixedWidth:l/t*e,fixedHeight:l,fixedWidths:[l/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var dp={exports:{}};/*!
32
+ `,t),null}}const $y="@yext/analytics",Fy="1.0.0-beta.5",By="An analytics library for Yext",Hy="fusion@yext.com",Wy="BSD-3-Clause",Ky="./lib/commonjs/src/index.js",zy="./lib/esm/src/index.js",Uy="./lib/analytics.d.ts",Gy=["analytics","report","events","yext"],Yy=["src","lib","THIRD-PARTY-NOTICES"],jy={build:"rm -rf lib/** && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && npm run format-check && npm run api-extractor && npm run generate-docs && npm run generate-notices && vite build",prepare:"husky install","format-check":"prettier --check . && eslint .","format-fix":"prettier --write . && eslint . --fix","api-extractor":"api-extractor run --local --verbose","generate-docs":"api-documenter markdown --input-folder temp --output-folder docs && rm -rf temp",prepublishOnly:"npm run build",test:"jest && playwright test",dev:"tsc -p tsconfig.esm.json --watch","generate-notices":"generate-license-file --input package.json --output THIRD-PARTY-NOTICES --overwrite"},Vy={"@babel/preset-env":"^7.14.7","@babel/preset-typescript":"^7.14.5","@microsoft/api-documenter":"^7.15.3","@microsoft/api-extractor":"^7.19.4","@playwright/test":"^1.38.0","@types/jest":"^29.5.12","@types/node":"^20.6.0","@typescript-eslint/eslint-plugin":"^6.19.1","@typescript-eslint/parser":"^6.19.1",eslint:"^7.32.0","fetch-mock-jest":"^1.5.1","generate-license-file":"^1.3.0",husky:"^8.0.3",jest:"^27.0.6","jest-fetch-mock":"^3.0.3",prettier:"^3.0.3",typescript:"^4.1.5",vite:"^4.4.9"},qy={bail:!1,verbose:!0,collectCoverage:!0,testEnvironment:"jsdom",collectCoverageFrom:["src/**","!src/utils/**"],moduleFileExtensions:["js","ts"],moduleDirectories:["node_modules","<rootDir>"],testMatch:["<rootDir>/tests/**/*.ts"],resetMocks:!0,restoreMocks:!0,clearMocks:!0,passWithNoTests:!0},Zy={ulidx:"^2.0.0"},Tf={name:$y,version:Fy,description:By,author:Hy,license:Wy,main:Ky,module:zy,types:Uy,keywords:Gy,files:Yy,scripts:jy,devDependencies:Vy,jest:qy,dependencies:Zy};function Jy(e,t,n){return n.debug?(lp(!0,t,n),!0):navigator.sendBeacon(e,JSON.stringify(t))}function Xy(e,t,n){return n.debug?(lp(!1,t,n),Promise.resolve(new Response)):fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0})}function Qy(e,t){return!t&&!!navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox")}function lp(e,t,n){var r=e?"Beacon":"fetch()";console.log("[DEBUG] AnalyticsConfig object at time of call to report():",n),console.log("[DEBUG] The following EventPayload would be sent to the Yext Events API using ".concat(r,":"),t)}var Ku=function(){return Ku=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},Ku.apply(this,arguments)},zu=function(e,t){if(!t||Object.keys(t).length===0)return e;if(!e||Object.keys(e).length===0)return t;var n=JSON.parse(JSON.stringify(e));for(var r in t)if(t.hasOwnProperty(r)){var l=t[r];l==null?delete n[r]:typeof l!="object"?n[r]=l:n[r]=zu(n[r],l)}return Ku({},n)},eN="yextevents.com/accounts/me/events";function tN(e,t){var n=e==="SANDBOX",r=t==null?void 0:t.toLowerCase();if(n&&r==="eu")throw new Error("Sandbox environment is not available in the EU region.");return"https://"+(n?"sbx.":"")+(r??"us")+"."+eN}var nN=function(e,t,n,r){function l(d){return d instanceof n?d:new n(function(f){f(d)})}return new(n||(n=Promise))(function(d,f){function p(E){try{T(r.next(E))}catch(S){f(S)}}function _(E){try{T(r.throw(E))}catch(S){f(S)}}function T(E){E.done?d(E.value):l(E.value).then(p,_)}T((r=r.apply(e,t||[])).next())})},rN=function(e,t){var n={label:0,sent:function(){if(d[0]&1)throw d[1];return d[1]},trys:[],ops:[]},r,l,d,f;return f={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function p(T){return function(E){return _([T,E])}}function _(T){if(r)throw new TypeError("Generator is already executing.");for(;f&&(f=0,T[0]&&(n=0)),n;)try{if(r=1,l&&(d=T[0]&2?l.return:T[0]?l.throw||((d=l.return)&&d.call(l),0):l.next)&&!(d=d.call(l,T[1])).done)return d;switch(l=0,d&&(T=[T[0]&2,d.value]),T[0]){case 0:case 1:d=T;break;case 4:return n.label++,{value:T[1],done:!1};case 5:n.label++,l=T[1],T=[0];continue;case 7:T=n.ops.pop(),n.trys.pop();continue;default:if(d=n.trys,!(d=d.length>0&&d[d.length-1])&&(T[0]===6||T[0]===2)){n=0;continue}if(T[0]===3&&(!d||T[1]>d[0]&&T[1]<d[3])){n.label=T[1];break}if(T[0]===6&&n.label<d[1]){n.label=d[1],d=T;break}if(d&&n.label<d[2]){n.label=d[2],n.ops.push(T);break}d[2]&&n.ops.pop(),n.trys.pop();continue}T=t.call(e,n)}catch(E){T=[6,E],l=0}finally{r=d=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}},iN=function(){function e(t,n){if(t.authorizationType!=="apiKey"&&t.authorizationType!=="bearer")throw new Error("Authorization type must be either apiKey or bearer.");if(!t.authorization)throw new Error("Authorization must be provided.");this.config=t,this.payload=n}return e.prototype.with=function(t){var n=this.payload===void 0?t:zu(this.payload,t);return new e(this.config,n)},e.prototype.report=function(t){var n;return nN(this,void 0,void 0,function(){var r,l,d,f,p=this;return rN(this,function(_){return r=zu((n=this.payload)!==null&&n!==void 0?n:{},t??{}),this.config.sessionTrackingEnabled?r.sessionId||(r.sessionId=Py()):r.sessionId=void 0,r.clientSdk?r.clientSdk.ANALYTICS=Tf.version:r.clientSdk=(f={},f.ANALYTICS=Tf.version,f),r.authorization=this.config.authorizationType==="apiKey"?"KEY "+this.config.authorization:"Bearer "+this.config.authorization,l=Qy(r,this.config.forceFetch),d=tN(this.config.env,this.config.region),l?[2,new Promise(function(T,E){Jy(d,r,p.config)?T(""):E("Failed Beacon Call")})]:[2,Xy(d,r,this.config).then(function(T){return T}).catch(function(T){return T})]})})},e}();function oN(e){return new iN(e)}function Uu(e){return e?e.toLowerCase().trim().replace(/\s/g,""):""}function ap(e,t){return[e,t].filter(n=>!!n).map(n=>Uu(n)).join("_")}const sN=e=>{switch(Math.floor(e/1e8%10)){case 0:return"US";case 1:return"EU";default:return""}},ud=rt.createContext(null),lN=rt.lazy(()=>Promise.resolve().then(()=>require("./debugger-CtOkrsjS.cjs")));function aN(e){const{children:t,apiKey:n,currency:r,templateData:l,requireOptIn:d,disableSessionTracking:f,enableDebugging:p}=e,_=rt.useRef(null),[T,E]=rt.useState(!1);rt.useEffect(()=>{E(!0)},[]),_.current===null&&(_.current=new cp(n,r,l,d,f,p??cc()));const S=_.current;return rt.useEffect(()=>(window.enableYextAnalytics=()=>{S.optIn()},()=>{delete window.enableYextAnalytics}),[S]),ft.jsxs(ft.Fragment,{children:[ft.jsx(ud.Provider,{value:S,children:t}),T&&(p||cc())&&Xs().name==="browser"?ft.jsx(rt.Suspense,{fallback:ft.jsx(ft.Fragment,{}),children:ft.jsx(lN,{})}):null]})}function cc(){return Xs().name!=="browser"||typeof window===void 0?!1:!!new URL(window.location.href).searchParams.get("xYextDebug")}class cp{constructor(t,n,r,l,d,f=!1){Ie(this,"_optedIn");Ie(this,"_sessionTrackingEnabled");Ie(this,"_analyticsEventService");Ie(this,"_pageViewFired",!1);this.apiKey=t,this.defaultCurrency=n,this.templateData=r,this.enableDebugging=f,this._optedIn=!l,this._sessionTrackingEnabled=!d,this.makeReporter(),this.pageView()}makeReporter(){if(Xs().name!=="browser"||!this._optedIn)return;if(!Ey()&&!this.getDebugEnabled()){console.warn("Yext Analytics disabled for non-production domains");return}const t=sN(this.templateData.document.businessId),n={authorizationType:"apiKey",authorization:this.apiKey,env:"PRODUCTION",region:t||"US",sessionTrackingEnabled:this._sessionTrackingEnabled,debug:this.getDebugEnabled()},r={pages:{siteUid:this.templateData.document.siteId,template:this.templateData.document.__.name},entity:this.templateData.document.uid||void 0,pageUrl:document.URL,referrerUrl:document.referrer!==""?document.referrer:void 0};this._analyticsEventService=oN(n).with(r)}canTrack(){return Xs().name==="browser"&&this._optedIn&&!!this._analyticsEventService}identify(t){this.canTrack()&&this._analyticsEventService&&(this._analyticsEventService=this._analyticsEventService.with({visitor:t}))}async optIn(){this._optedIn=!0,this.makeReporter(),this._pageViewFired||await this.pageView()}async pageView(){var t;if(!this.canTrack())return Promise.resolve(void 0);await((t=this._analyticsEventService)==null?void 0:t.report({action:"PAGE_VIEW"})),this._pageViewFired=!0}async track(t){var S;if(!this.canTrack())return Promise.resolve();const{action:n,scope:r,eventName:l,currency:d,amount:f,destinationUrl:p,customTags:_,customValues:T}=t;let E;f&&(E={amount:f,currency:d||this.defaultCurrency}),await((S=this._analyticsEventService)==null?void 0:S.report({action:n,pages:{scope:Uu(r)||void 0,originalEventName:ap(r||"",Uu(l)||"")},value:E,destinationUrl:p,customTags:_,customValues:T}))}getDebugEnabled(){return this.enableDebugging||cc()}}const Gu=rt.createContext({name:""}),dd=()=>rt.useContext(Gu).name;function cN(e){var f;const t=dd(),[n]=rt.useState({name:ap(t,e.name)}),r=(f=nl())==null?void 0:f.getDebugEnabled(),[l,d]=rt.useState(!1);return rt.useEffect(()=>{d(!0)},[]),r&&l?ft.jsx("section",{"data-ya-scope":n.name,children:ft.jsx(Gu.Provider,{value:n,children:e.children})}):ft.jsx(Gu.Provider,{value:n,children:e.children})}function nl(){const e=rt.useContext(ud);if(!e)return e;Xs().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=dd();return{getDebugEnabled(){return e.getDebugEnabled()},identify(n){return e.identify(n)},optIn(){return e.optIn()},pageView(){return e.pageView()},track(n){return e.track({...n,scope:n.scope??t})}}}const uN=()=>{var e;return(e=nl())==null?void 0:e.track},dN=()=>{var e;return(e=nl())==null?void 0:e.pageView},fN=()=>{var e;return(e=nl())==null?void 0:e.identify},xo={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},hN=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}const n=e.hostname;let r;if(n==="a.mktgcdn.com")r="us";else{if(n.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${e}`);return}r="eu"}if(!e.pathname.startsWith("/f")){console.error(`Invalid path: ${e}`);return}const l=e.pathname.replace(/^\//,"").split("/");if(l.length<2||l.length>3){console.error(`Invalid path: ${e}`);return}let d;if(l[0]==="f")d="prod";else switch(l[0].replace("f-","")){case"sandbox":{d="sbx";break}case"qa":{d="qa";break}case"dev":{d="dev";break}default:{console.error(`Invalid path: ${e}`);return}}if(r==="eu"&&(d==="dev"||d==="sbx")){console.error(`Invalid path: ${e}`);return}let f;if(l.length===3&&(f=parseInt(l[1]),Number.isNaN(f))){console.error(`Invalid account id: ${e}`);return}const p=l[l.length-1].split("."),_=p.length===2?`.${p[1]}`:"",T=p[0];return{scheme:t,partition:r,env:d,accountId:f,contentHash:T,extension:_}},gN=(e,t,n)=>{const r=`https://dyn${e.partition==="us"?"":`.${e.partition}`}.mktgcdn.com`;let l="f";switch(e.env){case"prod":break;case"sbx":{l+="-sandbox";break}default:l+=`-${e.env.toString()}`}const d=e.accountId!==void 0?`${e.accountId}/`:"";return`${r}/${l}/${d}${e.contentHash}${e.extension}/width=${Math.round(t)},height=${Math.round(n)}`},pN=e=>{const t=e.protocol.slice(0,-1);if(t!=="http"&&t!=="https"){console.error(`Invalid scheme: ${e}`);return}if(e.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${e}`);return}if(!e.pathname.startsWith("/p")){console.error(`Invalid path: ${e}`);return}const n=e.pathname.replace(/^\//,"").split("/");if(n.length<3||n.length>4){console.error(`Invalid path: ${e}`);return}let r;if(n[0]==="p")r="prod";else switch(n[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${e}`);return}}const l=n[1];let d;if(n.length===4){if(!n[2].includes(".")){console.error(`Invalid aspect ratio: ${e}`);return}if(d=parseFloat(n[2]),Number.isNaN(d)||n[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${e}`);return}}const f=n[n.length-1].split("."),p=f.length===2?`.${f[1]}`:"",_=f[0];return{scheme:t,env:r,contentHash:l,aspectRatio:d,name:_,extension:p}},mN=(e,t,n)=>{const r="https://dyn.mktgcdn.com";let l="p";switch(e.env){case"prod":break;case"sbx":{l+="-sandbox";break}default:l+=`-${e.env.toString()}`}return`${r}/${l}/${e.contentHash}/width=${Math.round(t)},height=${Math.round(n)}`},Yu=(e,t,n)=>{if(!up(e)){console.error(`Invalid image url: ${e}.`);return}const r=new URL(e);if(r.pathname.startsWith("/p")){const l=pN(r);if(l)return mN(l,t,n)}else if(r.pathname.startsWith("/f")){const l=hN(r);if(l)return gN(l,t,n)}return e},up=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},_N=({image:e,className:t,width:n,height:r,aspectRatio:l,layout:d=xo.INTRINSIC,placeholder:f,imgOverrides:p,style:_={},loading:T="lazy"})=>{const E=rt.useRef(null),[S,w]=rt.useState(!1),M="image"in e?e.image:e;rt.useEffect(()=>{var ce;(ce=E.current)!=null&&ce.complete&&w(!0)},[]),yN(d,M.width,M.height,n,r,l);const m=Math.abs(M.width);m||console.warn("Invalid image width.");const v=Math.abs(M.height);if(v||console.warn("Invalid image height."),!up(M.url))return console.error(`Invalid image url: ${M.url}`),ft.jsx(ft.Fragment,{children:f!=null&&f});const k=n&&n>0?n:void 0,G=r&&r>0?r:void 0,{src:I,imgStyle:P,widths:H}=NN(d,m,v,_,M.url,k,G,l),j=H.map(ce=>`${Yu(M.url,ce,v/m*ce)} ${ce}w`).join(", "),re=[640,768,1024,1280,1536],te=H.map((ce,V)=>V===H.length-1?`${ce}px`:`(max-width: ${re[V]}px) ${ce}px`).join(", ");return ft.jsxs(ft.Fragment,{children:[!S&&f!=null&&f,ft.jsx("img",{ref:E,style:P,src:I,className:t,width:k,height:G,srcSet:j,sizes:te,loading:T,alt:M.alternateText||"",...p})]})},yN=(e,t,n,r,l,d)=>{if(t<0&&console.warn(`Invalid image width: ${t}.`),n<0&&console.warn(`Invalid image height: ${n}.`),e===xo.FIXED){if(!r&&!l){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),l&&l<0&&console.warn(`Using fixed layout but height is invalid: ${l}.`);return}(r||l)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),e===xo.ASPECT&&!d&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},NN=(e,t,n,r,l,d,f,p)=>{let _=[100,320,640,960,1280,1920],T=Yu(l,500,500);const E={...r};switch(E.objectFit=E.objectFit||"cover",E.objectPosition=E.objectPosition||"center",e){case xo.INTRINSIC:E.maxWidth=t,E.width="100%",E.aspectRatio=p?`${p}`:`${t} / ${n}`;break;case xo.FIXED:{const{fixedWidth:S,fixedHeight:w,fixedWidths:M}=CN(t,n,_,d,f);E.width=S,E.height=w,_=M,T=Yu(l,S,w);break}case xo.ASPECT:E.aspectRatio=p?`${p}`:`${t} / ${n}`;break;case xo.FILL:E.width="100%",E.aspectRatio=p?`${p}`:`${t} / ${n}`;break;default:console.warn(`Unrecognized layout: ${e}.`);break}return{src:T,imgStyle:E,widths:_}},CN=(e,t,n,r,l)=>r&&l?{fixedWidth:r,fixedHeight:l,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*t/e,fixedWidths:[r]}:l?{fixedWidth:l/t*e,fixedHeight:l,fixedWidths:[l/t*e]}:{fixedWidth:e,fixedHeight:t,fixedWidths:n};var dp={exports:{}};/*!
33
33
  Copyright (c) 2018 Jed Watson.
34
34
  Licensed under the MIT License (MIT), see
35
35
  http://jedwatson.github.io/classnames
36
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var d="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(d=l(d,r(p)))}return d}function r(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return n.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var f="";for(var p in d)t.call(d,p)&&d[p]&&(f=l(f,p));return f}function l(d,f){return f?d?d+" "+f:d+f:d}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(dp);var EN=dp.exports;const Qs=ad(EN),xf=e=>e.linkType==="Email"||!e.linkType&&fp(e.link)?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="Phone"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,fp=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),TN=e=>e.cta??{link:e.href},hp=rt.forwardRef(function(t,n){const r=TN(t),{children:l,onClick:d,className:f,eventName:p,scope:_,currency:T,amount:E,cta:S,obfuscate:w,customTags:M,customValues:m,...v}=t,k=S?"CTA_CLICK":"LINK",G=p||(S?"cta":"link"),I=nl();if(!(r!=null&&r.link))throw new Error("CTA's link is undefined");const P=w||w!==!1&&fp(r.link),H=async te=>{const ce=te.currentTarget;let V="";if(P){te.preventDefault();const z=ce.href.split("/").at(-1);z&&(V=atob(z))}if(I!==null)try{await I.track({action:k,scope:t.scope,eventName:G,currency:T,amount:E,destinationUrl:V||ce.href,customTags:M,customValues:m})}catch{console.error("Failed to report click Analytics Event")}d&&d(te),V&&(window.location.href=V)},j=P?"Obfuscated, set a label or child":r.link,re={className:Qs("Link",f),href:P?btoa(xf(r)):xf(r),onClick:H,rel:t.target&&!t.rel?"noopener":void 0,ref:n};return I!=null&&I.getDebugEnabled()&&(re["data-ya-action"]=k,re["data-ya-scopeoverride"]=_,re["data-ya-eventname"]=G),ft.jsx("a",{...v,...re,suppressHydrationWarning:!0,children:l||r.label||j})}),xN={URL:"URL",Email:"Email",Phone:"Phone"};var yn=(e=>(e.DEGREE="deg",e.KILOMETER="km",e.MILE="mi",e.RADIAN="r",e))(yn||{}),Ur=(e=>(e.MERCATOR="mercator",e.SPHERICAL="spherical",e))(Ur||{});const jc=3959,Vc=6371,vN=["latitude","lat"],SN=["longitude","lon","lng","long"];function vf(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Sf(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function os(e){return e*Math.PI/180}function Ji(e){return e/Math.PI*180}function wN(e,t){const n=os(e.latitude),r=os(t.latitude),l=r-n,d=os(t.longitude-e.longitude),f=Math.pow(Math.sin(l/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(d/2),2);return 2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f))}function ON(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function DN(e,t){const r=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(r)*360/Math.PI-90}class un{constructor(t,n){Ie(this,"_lat");Ie(this,"_lon");let r=t,l=n;this._lat=0,this._lon=0,typeof t=="object"?(r=vf(t,vN)??0,l=vf(t,SN)??0,this.latitude=typeof r=="function"?r():r,this.longitude=typeof l=="function"?l():l):typeof r=="number"&&typeof l=="number"&&(this.latitude=r,this.longitude=l)}get latitude(){return this._lat}set latitude(t){this._lat=Math.max(-90,Math.min(Sf(t),90))}get longitude(){return this._lon}set longitude(t){this._lon=Sf(t)}get normalLon(){return((this._lon+180)%360+360)%360-180}add(t,n,r=yn.DEGREE,l=Ur.SPHERICAL){if(l===Ur.MERCATOR&&(r===yn.DEGREE||r===yn.RADIAN)){const d=r===yn.DEGREE?os(t):t,f=r===yn.DEGREE?n:Ji(n);this.latitude=DN(this.latitude,d),this.longitude+=f}else switch(r){case yn.DEGREE:this.latitude+=t,this.longitude+=n;break;case yn.KILOMETER:this.latitude+=Ji(t)*Vc,this.longitude+=Ji(n)*Vc*Math.cos(os(this.latitude));break;case yn.MILE:this.latitude+=Ji(t)*jc,this.longitude+=Ji(n)*jc*Math.cos(os(this.latitude));break;case yn.RADIAN:this.latitude+=Ji(t),this.longitude+=Ji(n);break;default:throw new Error(`unit unhandled: ${String(r)}`)}}distanceTo(t,n=yn.MILE,r=Ur.SPHERICAL){if(r===Ur.MERCATOR&&(n===yn.DEGREE||n===yn.RADIAN)){const l=ON(this.latitude,t.latitude),d=Math.abs(t.normalLon-this.normalLon),f=os(Math.min(d,360-d)),p=Math.sqrt(Math.pow(l,2)+Math.pow(f,2));switch(n){case yn.DEGREE:return Ji(p);case yn.RADIAN:return p;default:throw new Error(`unit unhandled: ${String(n)}`)}}else{const l=wN(this,t);switch(n){case yn.DEGREE:return Ji(l);case yn.KILOMETER:return l*Vc;case yn.MILE:return l*jc;case yn.RADIAN:return l;default:throw new Error(`unit unhandled: ${String(n)}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function gp(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}var vr=(e=>(e.UNDEFINED="undefined",e.NULL="object",e.BOOLEAN="boolean",e.NUMBER="number",e.BIGINT="bigint",e.STRING="string",e.SYMBOL="symbol",e.FUNCTION="function",e.OBJECT="object",e))(vr||{});function Ir(e,t){if(typeof t!="string")throw new Error("Assertion error: 'type' must be a string");if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function Sr(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class pp{constructor(t,n){Ie(this,"providerMapClass");Ie(this,"wrapper");Ie(this,"controlEnabled");Ie(this,"panHandler");Ie(this,"panStartHandler");Ie(this,"providerOptions");Sr(t,cs),n&&Sr(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return Ir(t,vr.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Ir(t,vr.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class rl{constructor(t){Ie(this,"_panHandler");Ie(this,"_panStartHandler");Sr(t,pp),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class mp{constructor(t){Ie(this,"providerPinClass");Ie(this,"clickHandler");Ie(this,"focusHandler");Ie(this,"hoverHandler");Ie(this,"icons");Ie(this,"hasPinUrl");Sr(t,cs),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={},this.hasPinUrl=!1}withClickHandler(t){return Ir(t,vr.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return Ir(t,vr.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return Ir(t,vr.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}withHasPinUrl(t){return this.hasPinUrl=t,this}build(){const t=this.providerPinClass;return new t(this)}}class fd{constructor(t){Ie(this,"_clickHandler");Ie(this,"_focusHandler");Ie(this,"_hoverHandler");Ie(this,"_icons");Sr(t,mp),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const AN=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class il extends fd{constructor(n){super(n);Ie(this,"_pinEl");Ie(this,"_pinAlt");Ie(this,"_wrapper");this._pinEl=n.hasPinUrl?document.createElement("div"):document.createElement("button"),Object.assign(this._pinEl.style,il.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}static get baseStyle(){return AN}addListeners(){this._wrapper&&(this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1)))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(n){this.setElementProperties(n);const r=n.getClass(),l=n.getElement()||this._pinEl,d=n.getZIndex();l.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=d.toString(),this._wrapper.setAttribute("class",r),l!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(l)))}setElementProperties(n){const r=n.getAnchorX(),l=n.getAnchorY(),d=n.getHeight(),f=this._icons[n.getIcon()],p=n.getSRText(),_=n.getWidth();Object.assign(this._pinEl.style,{backgroundImage:f?`url("${f}")`:"",height:d+"px",transform:`translate(${-100*r}%, ${-100*l}%)`,width:_+"px"}),this._pinAlt.innerText=p}}class as{constructor(){Ie(this,"loadFunction");Ie(this,"mapClass");Ie(this,"pinClass");Ie(this,"providerName");this.loadFunction=(t,n,r,l)=>t(),this.mapClass=rl,this.pinClass=fd,this.providerName=""}withLoadFunction(t){return Ir(t,vr.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new cs(this)}}class cs{constructor(t){Ie(this,"_loadFunction");Ie(this,"_mapClass");Ie(this,"_pinClass");Ie(this,"_providerName");Ie(this,"_loadPromise");Ie(this,"_resolveLoad");Ie(this,"_rejectLoad");Ie(this,"_apiKey");Ie(this,"_loadInvoked");Ie(this,"_loaded");Ie(this,"_options");Sr(t,as),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){!this._loadInvoked&&this._resolveLoad&&this._rejectLoad&&(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}class MN extends rl{constructor(n){super(n);Ie(this,"map");Ie(this,"_moving");n.wrapper&&(this.map=new google.maps.Map(n.wrapper,{disableDefaultUI:!n.controlEnabled,fullscreenControl:!1,gestureHandling:n.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:n.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...n.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()}))}getCenter(){var n;return new un(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return((n=this.map)==null?void 0:n.getZoom())??0}setCenter(n,r){var d,f;const l=new google.maps.LatLng(n.latitude,n.longitude);r?(d=this.map)==null||d.panTo(l):(f=this.map)==null||f.setCenter(l)}setZoom(n,r){var l;(l=this.map)==null||l.setZoom(Math.floor(n))}setZoomCenter(n,r,l){this.setCenter(r,l),this.setZoom(n,l)}}class RN extends il{constructor(n){super(n);Ie(this,"_latLng");Ie(this,"pin");this._wrapper&&(this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper));class r extends google.maps.OverlayView{constructor(f){super();Ie(this,"pin");this.pin=f}draw(){var p;const f=(p=this.getProjection())==null?void 0:p.fromLatLngToDivPixel(this.pin._latLng??null);f&&this.pin._wrapper&&(this.pin._wrapper.style.left=f.x+"px",this.pin._wrapper.style.top=f.y+"px")}onAdd(){var f;this.pin._wrapper&&((f=this.getPanes())==null||f.floatPane.appendChild(this.pin._wrapper))}onRemove(){var f,p;(p=(f=this.pin._wrapper)==null?void 0:f.parentNode)==null||p.removeChild(this.pin._wrapper)}}this.pin=new r(this)}setCoordinate(n){this._latLng=new google.maps.LatLng(n.latitude,n.longitude),this.pin.draw()}setMap(n,r){var d;const l=(d=n==null?void 0:n.getProviderMap())==null?void 0:d.map;this.pin.setMap(l??null)}}const wf="GoogleMapsCallback_b7d77ff2",bN="https://maps.googleapis.com/maps/api/js";function LN(e,t,n,{autocomplete:r=!1,channel:l=window.location.hostname,client:d,language:f,region:p,libraries:_=[],loading:T="async",params:E={}}={}){window[wf]=e,r&&_.push("geocoder","places");const S={callback:wf,channel:l,libraries:_.join(","),...E};n&&(S.key=n),d&&(S.client=d),f&&(S.language=f),p&&(S.region=p),T&&(S.loading=T),gp(bN+"?"+Object.entries(S).map(([w,M])=>w+"="+M).join("&"))}const _p=new as().withLoadFunction(LN).withMapClass(MN).withPinClass(RN).withProviderName("Google").build();class rs{constructor(t,n){Ie(this,"_ne");Ie(this,"_sw");this._ne=new un(n),this._sw=new un(t)}static fit(t){const n=t.map(T=>T.latitude),r=Math.max(...n),l=Math.min(...n),d=t.map(T=>T.normalLon).sort((T,E)=>T-E),f=d.map((T,E)=>({distance:(E<d.length-1?d[E+1]:d[0]+360)-T,index:E})).reduce((T,E)=>E.distance>T.distance?E:T).index,p=d[f],_=d[(f+1)%d.length];return new this(new un(l,_),new un(r,p))}get ne(){return this._ne}set ne(t){this._ne=new un(t)}get sw(){return this._sw}set sw(t){this._sw=new un(t)}contains(t){const n=this._sw.latitude<=t.latitude&&t.latitude<=this._ne.latitude,r=this._ne.longitude-this._sw.longitude>=360,l=this._sw.normalLon<=this._ne.normalLon?this._sw.normalLon<=t.normalLon&&t.normalLon<=this._ne.normalLon:this._sw.normalLon<=t.normalLon||t.normalLon<=this._ne.normalLon;return n&&(r||l)}extend(t){if(this._ne.latitude=Math.max(this._ne.latitude,t.latitude),this._sw.latitude=Math.min(this._sw.latitude,t.latitude),!this.contains(t)){const n=((t.longitude-this._ne.longitude)%360+360)%360,r=((this._sw.longitude-t.longitude)%360+360)%360;n<r?this._ne.longitude+=n:this._sw.longitude-=r}}getCenter(t=Ur.SPHERICAL){const n=new un(this._ne.latitude,this._sw.longitude),r=this._sw.distanceTo(n,yn.DEGREE,t),l=(n.longitude+this._ne.longitude)/2+(this._ne.longitude<n.longitude?180:0);return n.add(-r/2,0,yn.DEGREE,t),n.longitude=l,n}}class IN{constructor(){Ie(this,"_anchorX");Ie(this,"_anchorY");Ie(this,"_height");Ie(this,"_icon");Ie(this,"_srText");Ie(this,"_width");Ie(this,"_zIndex");Ie(this,"_class");Ie(this,"_element");this._anchorX=.5,this._anchorY=1,this._height=39,this._icon="default",this._srText="map pin",this._width=33,this._zIndex=0,this._class="",this._element=null}getAnchorX(){return this._anchorX}getAnchorY(){return this._anchorY}getClass(){return this._class}getElement(){return this._element}getHeight(){return this._height}getIcon(){return this._icon}getSRText(){return this._srText}getWidth(){return this._width}getZIndex(){return this._zIndex}setAnchorX(t){return this._anchorX=t,this}setAnchorY(t){return this._anchorY=t,this}setClass(t){return this._class=t,this}setElement(t){return this._element=t,this}setHeight(t){return this._height=t,this}setIcon(t){return this._icon=t,this}setSRText(t){return this._srText=t,this}setWidth(t){return this._width=t,this}setZIndex(t){return this._zIndex=t,this}}class hd{constructor(){Ie(this,"coordinate");Ie(this,"hideOffscreen");Ie(this,"icons");Ie(this,"propertiesForStatus");Ie(this,"provider");Ie(this,"type");Ie(this,"hasPinUrl");this.coordinate=new un(0,0),this.hideOffscreen=!1,this.icons={},this.propertiesForStatus=t=>new IN,this.provider=null,this.type="",this.hasPinUrl=!1}withCoordinate(t){return this.coordinate=new un(t),this}withHideOffscreen(t){return this.hideOffscreen=t,this}withIcon(t,n){return this.icons[t]=n,this}withPropertiesForStatus(t){return Ir(t,vr.FUNCTION),this.propertiesForStatus=t,this}withProvider(t){return t&&(Sr(t,cs),this.provider=t),this}withHasPinUrl(t){return this.hasPinUrl=t,this}withType(t){return this.type=t,this}build(){return new kN(this)}}class kN{constructor(t){Ie(this,"_coordinate");Ie(this,"_hideOffscreen");Ie(this,"_icons");Ie(this,"_propertiesForStatus");Ie(this,"_type");Ie(this,"_clickHandler");Ie(this,"_focusHandler");Ie(this,"_hoverHandler");Ie(this,"_hidden");Ie(this,"_cancelHiddenUpdater");Ie(this,"_map");Ie(this,"_pin");Ie(this,"_status");var n,r;if(Sr(t,hd),t.provider&&Sr(t.provider,cs),!((n=t.provider)!=null&&n.loaded))throw new Error(`MapProvider '${(r=t.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling MapPin constructor.`);this._coordinate=t.coordinate,this._hideOffscreen=t.hideOffscreen,this._icons={...t.icons},this._propertiesForStatus=t.propertiesForStatus,this._type=t.type,this._clickHandler=()=>null,this._focusHandler=l=>this._hoverHandler(l),this._hoverHandler=l=>null,this._hidden=!1,this._cancelHiddenUpdater=()=>null,this._map=null,this._pin=new mp(t.provider).withIcons({...this._icons}).withClickHandler(()=>this._clickHandler()).withFocusHandler(l=>this._focusHandler(l)).withHoverHandler(l=>this._hoverHandler(l)).withHasPinUrl(t.hasPinUrl).build(),this._pin.setCoordinate(t.coordinate),this._status={},this.setStatus(this._status)}getCoordinate(){return this._coordinate}getIcon(t){return this._icons[t]}getMap(){return this._map}getProviderPin(){return this._pin}getType(){return this._type}remove(){this.setMap(null)}setClickHandler(t){Ir(t,vr.FUNCTION),this._clickHandler=t}setCoordinate(t){this._coordinate=new un(t),this._pin.setCoordinate(this._coordinate),this._hideOffscreen&&this._hideIfOffscreen()}setFocusHandler(t){Ir(t,vr.FUNCTION),this._focusHandler=t}setHoverHandler(t){Ir(t,vr.FUNCTION),this._hoverHandler=t}setMap(t){if(t!==this._map&&(t!==null&&Sr(t,Np),this._pin.setMap(t,this._hidden?null:this._map),this._map=t,this._hidden=!1,this._cancelHiddenUpdater(),t&&this._hideOffscreen)){let n=!1;const r=new Promise(l=>{this._cancelHiddenUpdater=()=>{n=!0,l()}});(async()=>{for(;!n;)this._hideIfOffscreen(),await Promise.race([r,t.moving()]),await Promise.race([r,t.idle()])})()}}setStatus(t){Object.assign(this._status,t),this._pin.setProperties(this._propertiesForStatus(this._status))}_hideIfOffscreen(){if(this._map){const t=this._map.getBounds().contains(this._coordinate);this._hidden&&t?this._pin.setMap(this._map,null):!this._hidden&&!t&&this._pin.setMap(null,this._map),this._hidden=!t}}}const yo=.98;function Va(e,t){return Math.max(e instanceof Function?e():e||0,0)/t}class yp{constructor(){Ie(this,"controlEnabled");Ie(this,"defaultCenter");Ie(this,"defaultZoom");Ie(this,"legendPins");Ie(this,"padding");Ie(this,"panHandler");Ie(this,"panStartHandler");Ie(this,"provider");Ie(this,"providerOptions");Ie(this,"singlePinZoom");Ie(this,"wrapper");this.controlEnabled=!0,this.defaultCenter=new un(39.83,-98.58),this.defaultZoom=4,this.legendPins=[],this.padding={bottom:()=>50,left:()=>50,right:()=>50,top:()=>50},this.panHandler=(t,n)=>null,this.panStartHandler=t=>null,this.provider=null,this.providerOptions={},this.singlePinZoom=14,this.wrapper=null}withControlEnabled(t){return this.controlEnabled=t,this}withDefaultCenter(t){return this.defaultCenter=new un(t),this}withDefaultZoom(t){return this.defaultZoom=t,this}withLegendPins(t){return this.legendPins=Array.from(t),this}withPadding(t){return this.padding=t,this}withPanHandler(t){return Ir(t,vr.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Ir(t,vr.FUNCTION),this.panStartHandler=t,this}withProvider(t){return Sr(t,cs),this.provider=t,this}withProviderOptions(t){return this.providerOptions=t,this}withSinglePinZoom(t){return this.singlePinZoom=t,this}withWrapper(t){return t?(Sr(t,HTMLElement),this.wrapper=t,this):this}build(){return new Np(this)}}let Np=class{constructor(t){Ie(this,"_defaultCenter");Ie(this,"_defaultZoom");Ie(this,"_legendPins");Ie(this,"_padding");Ie(this,"_provider");Ie(this,"_singlePinZoom");Ie(this,"_wrapper");Ie(this,"_cachedBounds");Ie(this,"_resolveIdle");Ie(this,"_resolveMoving");Ie(this,"_idlePromise");Ie(this,"_panHandlerRunning");Ie(this,"_panStartHandlerRunning");Ie(this,"_currentBounds");Ie(this,"_movingPromise");Ie(this,"_panHandler");Ie(this,"_panStartHandler");Ie(this,"_map");var n,r,l;if(Sr(t,yp),t.provider&&Sr(t.provider,cs),t.wrapper&&Sr(t.wrapper,HTMLElement),!((n=t.provider)!=null&&n.loaded))throw new Error(`MapProvider '${(r=t.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling Map constructor.`);for(this._defaultCenter=t.defaultCenter,this._defaultZoom=t.defaultZoom,this._legendPins=t.legendPins,this._provider=t.provider,this._singlePinZoom=t.singlePinZoom,this._wrapper=t.wrapper,this._padding={},this.setPadding(t.padding),this._cachedBounds=null,this._resolveIdle=()=>null,this._resolveMoving=()=>null,this._idlePromise=Promise.resolve(),this._setIdle(),this.setPanHandler(t.panHandler),this.setPanStartHandler(t.panStartHandler);(l=this._wrapper)!=null&&l.lastChild;)this._wrapper.removeChild(this._wrapper.lastChild);this._panHandlerRunning=!1,this._panStartHandlerRunning=!1,this._map=new pp(t.provider,this._wrapper).withControlEnabled(t.controlEnabled).withPanHandler(()=>this.panHandler()).withPanStartHandler(()=>this.panStartHandler()).withProviderOptions(t.providerOptions).build(),this.setZoomCenter(this._defaultZoom,this._defaultCenter),this._currentBounds=this.getBounds()}fitCoordinates(t,n=!1,r=this._singlePinZoom){t.length?this.setBounds(rs.fit(t),n,this._padding,r):this.setZoomCenter(this._defaultZoom,this._defaultCenter,n)}getBounds(){var t,n;if(!this._cachedBounds){const r=((t=this._wrapper)==null?void 0:t.offsetHeight)??0,l=((n=this._wrapper)==null?void 0:n.offsetWidth)??0,d=this.getZoom(),f=this.getCenter(),p=360/Math.pow(2,d+8),_=l*p,T=r*p;this._cachedBounds=new rs(f,f),this._cachedBounds.ne.add(T/2,_/2,yn.DEGREE,Ur.MERCATOR),this._cachedBounds.sw.add(-T/2,-_/2,yn.DEGREE,Ur.MERCATOR),this.moving().then(()=>this._cachedBounds=null)}return new rs(this._cachedBounds.sw,this._cachedBounds.ne)}getCenter(){return this._map.getCenter()}getProviderMap(){return this._map}getZoom(){return this._map.getZoom()}async idle(){await this._idlePromise}async moving(){await this._movingPromise}newPinOptions(){return new hd().withProvider(this._provider)}panHandler(){this._panHandlerRunning||(this._panHandlerRunning=!0,requestAnimationFrame(()=>{const t=this._currentBounds;this._currentBounds=this.getBounds(),this._panHandler&&this._panHandler(t,new rs(new un(this._currentBounds.sw),new un(this._currentBounds.ne))),this._panHandlerRunning=!1}),this._setIdle())}panStartHandler(){this._panStartHandlerRunning||(this._panStartHandlerRunning=!0,requestAnimationFrame(()=>{this._panStartHandler&&this._panStartHandler(new rs(new un(this._currentBounds.sw),new un(this._currentBounds.ne))),this._panStartHandlerRunning=!1}),this._setMoving())}setBounds({ne:t,sw:n},r=!1,l={},d=1/0){var z,q;const f=(z=this._wrapper)==null?void 0:z.offsetHeight,p=(q=this._wrapper)==null?void 0:q.offsetWidth;if(!f||!p)return;let _=Va(l.bottom,f),T=Va(l.left,p),E=Va(l.right,p),S=Va(l.top,f),w=T+E,M=_+S;w>yo&&(T*=yo/w,E*=yo/w,w=yo),M>yo&&(_*=yo/M,S*=yo/M,M=yo);const m=f*(1-M),v=p*(1-w),k=new rs(n,t),G=new un(k.ne.latitude,k.sw.longitude),I=k.sw.distanceTo(G,yn.DEGREE,Ur.MERCATOR),P=(k.ne.longitude-G.longitude+360)%360;let H=Math.max(I,P*m/v)/(1-M),j=Math.max(P,I*v/m)/(1-w),re=Math.log2(p*360/j)-8;re>d&&(re=d,j=p*360/2**(re+8),H=j*f/p);const te=k.getCenter(Ur.MERCATOR),ce=(S-_)/2*H,V=(E-T)/2*j;te.add(ce,V,yn.DEGREE,Ur.MERCATOR),this.setZoomCenter(re,te,r)}setCenter(t,n=!1){this._map.setCenter(new un(t),n)}setPadding({bottom:t=this._padding.bottom,left:n=this._padding.left,right:r=this._padding.right,top:l=this._padding.top}){return this._padding={bottom:t,left:n,right:r,top:l},this}setPanHandler(t){Ir(t,vr.FUNCTION),this._panHandler=t}setPanStartHandler(t){Ir(t,vr.FUNCTION),this._panStartHandler=t}setZoom(t,n=!1){this._map.setZoom(t,n)}setZoomCenter(t,n,r=!1){this._map.setZoomCenter(t,n,r)}_setIdle(){this._resolveMoving(),this._movingPromise=new Promise(t=>this._resolveMoving=t),this._resolveIdle()}_setMoving(){this._resolveIdle(),this._idlePromise=new Promise(t=>this._resolveIdle=t),this._resolveMoving()}};const _c=rt.createContext(null);function PN(){const e=rt.useContext(_c);if(!e||e.map===void 0)throw new Error("Attempted to call useMapContext() outside of <Map>.");return e.map}const Cp=({apiKey:e,bounds:t,children:n,className:r,clientKey:l,controls:d=!0,defaultCenter:f={latitude:39.83,longitude:-98.58},defaultZoom:p=4,mapRef:_,padding:T={bottom:50,left:50,right:50,top:50},panHandler:E=()=>null,panStartHandler:S=()=>null,provider:w=_p,providerOptions:M={},singleZoom:m=14})=>{const v=rt.useRef(null),[k,G]=rt.useState(new un(f)),[I,P]=rt.useState(!1),[H,j]=rt.useState(),[re,te]=rt.useState(p),ce=(V,z)=>{E(V,z),z&&G(z.getCenter())};return rt.useEffect(()=>{!I||!H||te(H.getZoom())},[k]),rt.useEffect(()=>{if(!t||!I||!H)return;const V=t.map(z=>new un(z));H.fitCoordinates(V)},[JSON.stringify(t),H]),rt.useEffect(()=>{if(!I||H)return;const V=new yp().withControlEnabled(d).withDefaultCenter(k).withDefaultZoom(re).withPadding(T).withPanHandler(ce).withPanStartHandler(S).withProvider(w).withProviderOptions(M).withSinglePinZoom(m).withWrapper(v.current).build();j(V),_&&(_.current=V)},[I]),rt.useEffect(()=>{I||H||!v.current||w.load(e,{...M,...l&&{client:l}}).then(()=>P(!0))},[]),ft.jsx("div",{className:Qs({"is-loaded":I},r),id:"map",ref:v,"data-testid":"map",children:H&&ft.jsx(_c.Provider,{value:{map:H,provider:w},children:n})})},$N=({count:e})=>ft.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",children:ft.jsxs("g",{fill:"none",fillRule:"evenodd",children:[ft.jsx("circle",{fill:"red",fillRule:"nonzero",stroke:"white",cx:"11",cy:"11",r:"11"}),ft.jsx("text",{fill:"white",fontFamily:"Arial-BoldMT,Arial",fontSize:"12",fontWeight:"bold",children:ft.jsx("tspan",{x:"50%",y:"15",textAnchor:"middle",children:e})})]})}),gd=rt.createContext(null);function FN(){const e=rt.useContext(gd);if(!e)throw new Error("Attempted to call useClustererContext() outside of <Clusterer>.");return e}const BN=({clusterRadius:e=50,children:t,ClusterTemplate:n=$N})=>{const{map:r}=rt.useContext(_c),[l,d]=rt.useState([]),[f,p]=rt.useState(),[_,T]=rt.useState([]),[E,S]=rt.useState([]);return rt.useEffect(()=>{p(HN(l,r.getZoom(),e))},[l,r.getZoom()]),rt.useEffect(()=>{S(()=>[]),T(()=>[]),(f==null?void 0:f.length)!==0&&(f==null||f.forEach(w=>{if(w.length===1){w[0].pin.setMap(r);return}if(w.length>1){const M=rs.fit(w.map(v=>v.pin.getCoordinate())).getCenter(Ur.MERCATOR),m=`cluster-{${M._lat},${M._lon}}`;w.forEach(v=>v.pin.setMap(null)),T(v=>[...v,m]),S(v=>[...v,ft.jsx(pd,{coordinate:M,id:m,onClick:()=>r.fitCoordinates(w.map(k=>k.pin.getCoordinate()),!0,1/0),children:ft.jsx(n,{count:w.length})},m)])}}))},[f]),ft.jsx(gd.Provider,{value:{clusters:f??[],clusterIds:_,setPinStore:d},children:ft.jsxs(ft.Fragment,{children:[E.map((w,M)=>ft.jsx(rt.Fragment,{children:w},M)),t]})})},HN=(e,t,n)=>{const r=n*Math.PI/2**(t+7),l=e.map((p,_)=>[_]),d=[];e.forEach((p,_)=>{for(let T=_;T<e.length;T++)T!==_&&new un(p.pin.getCoordinate()).distanceTo(new un(e[T].pin.getCoordinate()),yn.RADIAN,Ur.MERCATOR)<=r&&(l[_].push(T),l[T].push(_))});let f=1;for(;f;){f=0;let p;if(l.forEach((E,S)=>{E.length>f&&(f=E.length,p=S)}),!f)break;const _=l[p??0],T=[];l[p??0]=[];for(const E of _){const S=l[E];T.push(e[E]),l[E]=[],S.forEach(w=>l[w].splice(l[w].indexOf(E),1))}d.push(T)}return d},WN=ft.jsx("svg",{width:"30",height:"38",viewBox:"0 0 30 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ft.jsx("path",{d:"M30 15.0882C30 23.4212 23.3333 30.7353 15 38C7.22222 31.2941 0 23.4212 0 15.0882C0 6.75523 6.71573 0 15 0C23.2843 0 30 6.75523 30 15.0882Z",fill:"red"})}),pd=({children:e,coordinate:t,hideOffscreen:n=!1,id:r,icon:l=WN,onClick:d=()=>null,onFocus:f=()=>null,onHover:p=()=>null,zIndex:_,hasPinUrl:T=!1})=>{const{map:E,provider:S}=rt.useContext(_c),w=rt.useContext(gd),M=rt.useMemo(()=>new hd().withCoordinate(t).withHideOffscreen(n).withProvider(S).withHasPinUrl(T).build(),[]);rt.useEffect(()=>{if(_!==0&&!_)return;const v=M.getProviderPin().getWrapperElement();v&&(v.style.zIndex=_.toString())},[_]),rt.useEffect(()=>{M.setMap(E),M.setClickHandler(()=>d(r)),M.setFocusHandler(k=>f(k,r)),M.setHoverHandler(k=>p(k,r));const v=w==null?void 0:w.clusterIds.includes(r);return w&&!v&&w.setPinStore(k=>[...k,{pin:M,id:r}]),()=>{M.setMap(null),w&&w.setPinStore(k=>k.filter(G=>G.id!==r))}},[]);const m=e||l;if(m){const v=M.getProviderPin().getPinElement();return Object.assign(v.style,{height:"auto",width:"auto"}),ld.createPortal(m,v)}return null},KN=({children:e,coordinate:t,linkSameTab:n,pinUrl:r,onClick:l=()=>null,onHover:d=()=>null,onFocus:f=()=>null,...p})=>{var _;return ft.jsx(Cp,{bounds:[t],...p,children:ft.jsx(pd,{coordinate:t,id:"location-map-marker",onClick:l,onHover:d,onFocus:f,hasPinUrl:((_=r||"")==null?void 0:_.length)>0,children:r?ft.jsx(hp,{href:r,target:n?"_self":"_blank",children:e}):e||void 0})})};var qc={},Vl={},Of;function zN(){if(Of)return Vl;Of=1;var e=rt;const t=e.createContext(null);function n(l,d){let f=null;l!=null&&(f=l[1]);function p(){return d??(f!=null?f.getTheme():null)}return{getTheme:p}}function r(){const l=e.useContext(t);if(l==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return l}return Vl.LexicalComposerContext=t,Vl.createLexicalComposerContext=n,Vl.useLexicalComposerContext=r,Vl}var ql={},Df;function UN(){if(Df)return ql;Df=1;var e=rt;function t(r){let l=new URLSearchParams;l.append("code",r);for(let d=1;d<arguments.length;d++)l.append("v",arguments[d]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return ql.LexicalComposerContext=n,ql.createLexicalComposerContext=function(r,l){let d=null;return r!=null&&(d=r[1]),{getTheme:function(){return l??(d!=null?d.getTheme():null)}}},ql.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},ql}var Zc,Af;function Zn(){return Af||(Af=1,Zc=process.env.NODE_ENV==="development"?zN():UN()),Zc}var He={},Mf;function GN(){if(Mf)return He;Mf=1;function e(u){return{type:u}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),r=e("CLICK_COMMAND"),l=e("DELETE_CHARACTER_COMMAND"),d=e("INSERT_LINE_BREAK_COMMAND"),f=e("INSERT_PARAGRAPH_COMMAND"),p=e("CONTROLLED_TEXT_INSERTION_COMMAND"),_=e("PASTE_COMMAND"),T=e("REMOVE_TEXT_COMMAND"),E=e("DELETE_WORD_COMMAND"),S=e("DELETE_LINE_COMMAND"),w=e("FORMAT_TEXT_COMMAND"),M=e("UNDO_COMMAND"),m=e("REDO_COMMAND"),v=e("KEYDOWN_COMMAND"),k=e("KEY_ARROW_RIGHT_COMMAND"),G=e("MOVE_TO_END"),I=e("KEY_ARROW_LEFT_COMMAND"),P=e("MOVE_TO_START"),H=e("KEY_ARROW_UP_COMMAND"),j=e("KEY_ARROW_DOWN_COMMAND"),re=e("KEY_ENTER_COMMAND"),te=e("KEY_SPACE_COMMAND"),ce=e("KEY_BACKSPACE_COMMAND"),V=e("KEY_ESCAPE_COMMAND"),z=e("KEY_DELETE_COMMAND"),q=e("KEY_TAB_COMMAND"),Te=e("INSERT_TAB_COMMAND"),Se=e("INDENT_CONTENT_COMMAND"),Ee=e("OUTDENT_CONTENT_COMMAND"),de=e("DROP_COMMAND"),K=e("FORMAT_ELEMENT_COMMAND"),O=e("DRAGSTART_COMMAND"),Z=e("DRAGOVER_COMMAND"),se=e("DRAGEND_COMMAND"),Y=e("COPY_COMMAND"),W=e("CUT_COMMAND"),J=e("SELECT_ALL_COMMAND"),R=e("CLEAR_EDITOR_COMMAND"),U=e("CLEAR_HISTORY_COMMAND"),X=e("CAN_REDO_COMMAND"),fe=e("CAN_UNDO_COMMAND"),_e=e("FOCUS_COMMAND"),B=e("BLUR_COMMAND"),A=e("KEY_MODIFIER_COMMAND"),F=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oe=F&&"documentMode"in document?document.documentMode:null,ye=F&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),De=F&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ee=F&&"InputEvent"in window&&!oe?"getTargetRanges"in new window.InputEvent("input"):!1,ne=F&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ue=F&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,be=F&&/Android/.test(navigator.userAgent),Ne=F&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Re=F&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Ne,ke=1,Fe=3,qe=0,Be=1,ct=2,Mt=0,zt=1,Vt=2,Oe=1,ie=2,le=4,ve=8,Le=16,Me=32,je=64,it=128,ot=Oe|ie|le|ve|Le|Me|je|it,st=1,wt=2,Ue=1,Ge=2,tt=3,yt=4,Nt=5,Tt=6,gt=" ",mt=ne||ue||Re?gt:"​",Ft=`
36
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var d="",f=0;f<arguments.length;f++){var p=arguments[f];p&&(d=l(d,r(p)))}return d}function r(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return n.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var f="";for(var p in d)t.call(d,p)&&d[p]&&(f=l(f,p));return f}function l(d,f){return f?d?d+" "+f:d+f:d}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(dp);var EN=dp.exports;const Qs=ad(EN),xf=e=>e.linkType==="Email"||!e.linkType&&fp(e.link)?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:e.linkType==="Phone"?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,fp=e=>e.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),TN=e=>e.cta??{link:e.href},hp=rt.forwardRef(function(t,n){const r=TN(t),{children:l,onClick:d,className:f,eventName:p,scope:_,currency:T,amount:E,cta:S,obfuscate:w,customTags:M,customValues:m,...v}=t,k=S?"CTA_CLICK":"LINK",G=p||(S?"cta":"link"),I=nl();if(!(r!=null&&r.link))throw new Error("CTA's link is undefined");const P=w||w!==!1&&fp(r.link),H=async te=>{const ce=te.currentTarget;let V="";if(P){te.preventDefault();const z=ce.href.split("/").at(-1);z&&(V=atob(z))}if(I!==null)try{await I.track({action:k,scope:t.scope,eventName:G,currency:T,amount:E,destinationUrl:V||ce.href,customTags:M,customValues:m})}catch{console.error("Failed to report click Analytics Event")}d&&d(te),V&&(window.location.href=V)},j=P?"Obfuscated, set a label or child":r.link,re={className:Qs("Link",f),href:P?btoa(xf(r)):xf(r),onClick:H,rel:t.target&&!t.rel?"noopener":t.rel,ref:n};return I!=null&&I.getDebugEnabled()&&(re["data-ya-action"]=k,re["data-ya-scopeoverride"]=_,re["data-ya-eventname"]=G),ft.jsx("a",{...v,...re,suppressHydrationWarning:!0,children:l||r.label||j})}),xN={URL:"URL",Email:"Email",Phone:"Phone"};var yn=(e=>(e.DEGREE="deg",e.KILOMETER="km",e.MILE="mi",e.RADIAN="r",e))(yn||{}),Ur=(e=>(e.MERCATOR="mercator",e.SPHERICAL="spherical",e))(Ur||{});const jc=3959,Vc=6371,vN=["latitude","lat"],SN=["longitude","lon","lng","long"];function vf(e,t){for(const n of t)if(e[n]||e[n]===0)return e[n]}function Sf(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function os(e){return e*Math.PI/180}function Ji(e){return e/Math.PI*180}function wN(e,t){const n=os(e.latitude),r=os(t.latitude),l=r-n,d=os(t.longitude-e.longitude),f=Math.pow(Math.sin(l/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(d/2),2);return 2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f))}function ON(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}function DN(e,t){const r=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return Math.atan(r)*360/Math.PI-90}class un{constructor(t,n){Ie(this,"_lat");Ie(this,"_lon");let r=t,l=n;this._lat=0,this._lon=0,typeof t=="object"?(r=vf(t,vN)??0,l=vf(t,SN)??0,this.latitude=typeof r=="function"?r():r,this.longitude=typeof l=="function"?l():l):typeof r=="number"&&typeof l=="number"&&(this.latitude=r,this.longitude=l)}get latitude(){return this._lat}set latitude(t){this._lat=Math.max(-90,Math.min(Sf(t),90))}get longitude(){return this._lon}set longitude(t){this._lon=Sf(t)}get normalLon(){return((this._lon+180)%360+360)%360-180}add(t,n,r=yn.DEGREE,l=Ur.SPHERICAL){if(l===Ur.MERCATOR&&(r===yn.DEGREE||r===yn.RADIAN)){const d=r===yn.DEGREE?os(t):t,f=r===yn.DEGREE?n:Ji(n);this.latitude=DN(this.latitude,d),this.longitude+=f}else switch(r){case yn.DEGREE:this.latitude+=t,this.longitude+=n;break;case yn.KILOMETER:this.latitude+=Ji(t)*Vc,this.longitude+=Ji(n)*Vc*Math.cos(os(this.latitude));break;case yn.MILE:this.latitude+=Ji(t)*jc,this.longitude+=Ji(n)*jc*Math.cos(os(this.latitude));break;case yn.RADIAN:this.latitude+=Ji(t),this.longitude+=Ji(n);break;default:throw new Error(`unit unhandled: ${String(r)}`)}}distanceTo(t,n=yn.MILE,r=Ur.SPHERICAL){if(r===Ur.MERCATOR&&(n===yn.DEGREE||n===yn.RADIAN)){const l=ON(this.latitude,t.latitude),d=Math.abs(t.normalLon-this.normalLon),f=os(Math.min(d,360-d)),p=Math.sqrt(Math.pow(l,2)+Math.pow(f,2));switch(n){case yn.DEGREE:return Ji(p);case yn.RADIAN:return p;default:throw new Error(`unit unhandled: ${String(n)}`)}}else{const l=wN(this,t);switch(n){case yn.DEGREE:return Ji(l);case yn.KILOMETER:return l*Vc;case yn.MILE:return l*jc;case yn.RADIAN:return l;default:throw new Error(`unit unhandled: ${String(n)}`)}}}equals(t){return t&&t.latitude===this.latitude&&t.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function gp(e,t=()=>null){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}var vr=(e=>(e.UNDEFINED="undefined",e.NULL="object",e.BOOLEAN="boolean",e.NUMBER="number",e.BIGINT="bigint",e.STRING="string",e.SYMBOL="symbol",e.FUNCTION="function",e.OBJECT="object",e))(vr||{});function Ir(e,t){if(typeof t!="string")throw new Error("Assertion error: 'type' must be a string");if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function Sr(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class pp{constructor(t,n){Ie(this,"providerMapClass");Ie(this,"wrapper");Ie(this,"controlEnabled");Ie(this,"panHandler");Ie(this,"panStartHandler");Ie(this,"providerOptions");Sr(t,cs),n&&Sr(n,HTMLElement),this.providerMapClass=t.getMapClass(),this.wrapper=n,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(t){return this.controlEnabled=t,this}withPanHandler(t){return Ir(t,vr.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Ir(t,vr.FUNCTION),this.panStartHandler=t,this}withProviderOptions(t){return this.providerOptions=t,this}build(){const t=this.providerMapClass;return new t(this)}}class rl{constructor(t){Ie(this,"_panHandler");Ie(this,"_panStartHandler");Sr(t,pp),this._panHandler=t.panHandler,this._panStartHandler=t.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(t,n){throw new Error("not implemented")}setZoom(t,n){throw new Error("not implemented")}setZoomCenter(t,n,r){this.setZoom(t,r),this.setCenter(n,r)}}class mp{constructor(t){Ie(this,"providerPinClass");Ie(this,"clickHandler");Ie(this,"focusHandler");Ie(this,"hoverHandler");Ie(this,"icons");Ie(this,"hasPinUrl");Sr(t,cs),this.providerPinClass=t.getPinClass(),this.clickHandler=()=>null,this.focusHandler=n=>null,this.hoverHandler=n=>null,this.icons={},this.hasPinUrl=!1}withClickHandler(t){return Ir(t,vr.FUNCTION),this.clickHandler=t,this}withFocusHandler(t){return Ir(t,vr.FUNCTION),this.focusHandler=t,this}withHoverHandler(t){return Ir(t,vr.FUNCTION),this.hoverHandler=t,this}withIcons(t){return this.icons=t,this}withHasPinUrl(t){return this.hasPinUrl=t,this}build(){const t=this.providerPinClass;return new t(this)}}class fd{constructor(t){Ie(this,"_clickHandler");Ie(this,"_focusHandler");Ie(this,"_hoverHandler");Ie(this,"_icons");Sr(t,mp),this._clickHandler=t.clickHandler,this._focusHandler=t.focusHandler,this._hoverHandler=t.hoverHandler,this._icons=t.icons}setCoordinate(t){throw new Error("not implemented")}setMap(t,n){throw new Error("not implemented")}setProperties(t){throw new Error("not implemented")}}const AN=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class il extends fd{constructor(n){super(n);Ie(this,"_pinEl");Ie(this,"_pinAlt");Ie(this,"_wrapper");this._pinEl=n.hasPinUrl?document.createElement("div"):document.createElement("button"),Object.assign(this._pinEl.style,il.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}static get baseStyle(){return AN}addListeners(){this._wrapper&&(this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1)))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(n){this.setElementProperties(n);const r=n.getClass(),l=n.getElement()||this._pinEl,d=n.getZIndex();l.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=d.toString(),this._wrapper.setAttribute("class",r),l!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(l)))}setElementProperties(n){const r=n.getAnchorX(),l=n.getAnchorY(),d=n.getHeight(),f=this._icons[n.getIcon()],p=n.getSRText(),_=n.getWidth();Object.assign(this._pinEl.style,{backgroundImage:f?`url("${f}")`:"",height:d+"px",transform:`translate(${-100*r}%, ${-100*l}%)`,width:_+"px"}),this._pinAlt.innerText=p}}class as{constructor(){Ie(this,"loadFunction");Ie(this,"mapClass");Ie(this,"pinClass");Ie(this,"providerName");this.loadFunction=(t,n,r,l)=>t(),this.mapClass=rl,this.pinClass=fd,this.providerName=""}withLoadFunction(t){return Ir(t,vr.FUNCTION),this.loadFunction=t,this}withMapClass(t){return this.mapClass=t,this}withPinClass(t){return this.pinClass=t,this}withProviderName(t){return this.providerName=t,this}build(){return new cs(this)}}class cs{constructor(t){Ie(this,"_loadFunction");Ie(this,"_mapClass");Ie(this,"_pinClass");Ie(this,"_providerName");Ie(this,"_loadPromise");Ie(this,"_resolveLoad");Ie(this,"_rejectLoad");Ie(this,"_apiKey");Ie(this,"_loadInvoked");Ie(this,"_loaded");Ie(this,"_options");Sr(t,as),this._loadFunction=t.loadFunction,this._mapClass=t.mapClass,this._pinClass=t.pinClass,this._providerName=t.providerName,this._loadPromise=new Promise((n,r)=>{this._resolveLoad=n,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(t=this._apiKey,n=this._options){!this._loadInvoked&&this._resolveLoad&&this._rejectLoad&&(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,t,n)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(t,n=null){this._loadInvoked||(this._apiKey=t,this._options=n||this._options)}}class MN extends rl{constructor(n){super(n);Ie(this,"map");Ie(this,"_moving");n.wrapper&&(this.map=new google.maps.Map(n.wrapper,{disableDefaultUI:!n.controlEnabled,fullscreenControl:!1,gestureHandling:n.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:n.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...n.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()}))}getCenter(){var n;return new un(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return((n=this.map)==null?void 0:n.getZoom())??0}setCenter(n,r){var d,f;const l=new google.maps.LatLng(n.latitude,n.longitude);r?(d=this.map)==null||d.panTo(l):(f=this.map)==null||f.setCenter(l)}setZoom(n,r){var l;(l=this.map)==null||l.setZoom(Math.floor(n))}setZoomCenter(n,r,l){this.setCenter(r,l),this.setZoom(n,l)}}class RN extends il{constructor(n){super(n);Ie(this,"_latLng");Ie(this,"pin");this._wrapper&&(this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper));class r extends google.maps.OverlayView{constructor(f){super();Ie(this,"pin");this.pin=f}draw(){var p;const f=(p=this.getProjection())==null?void 0:p.fromLatLngToDivPixel(this.pin._latLng??null);f&&this.pin._wrapper&&(this.pin._wrapper.style.left=f.x+"px",this.pin._wrapper.style.top=f.y+"px")}onAdd(){var f;this.pin._wrapper&&((f=this.getPanes())==null||f.floatPane.appendChild(this.pin._wrapper))}onRemove(){var f,p;(p=(f=this.pin._wrapper)==null?void 0:f.parentNode)==null||p.removeChild(this.pin._wrapper)}}this.pin=new r(this)}setCoordinate(n){this._latLng=new google.maps.LatLng(n.latitude,n.longitude),this.pin.draw()}setMap(n,r){var d;const l=(d=n==null?void 0:n.getProviderMap())==null?void 0:d.map;this.pin.setMap(l??null)}}const wf="GoogleMapsCallback_b7d77ff2",bN="https://maps.googleapis.com/maps/api/js";function LN(e,t,n,{autocomplete:r=!1,channel:l=window.location.hostname,client:d,language:f,region:p,libraries:_=[],loading:T="async",params:E={}}={}){window[wf]=e,r&&_.push("geocoder","places");const S={callback:wf,channel:l,libraries:_.join(","),...E};n&&(S.key=n),d&&(S.client=d),f&&(S.language=f),p&&(S.region=p),T&&(S.loading=T),gp(bN+"?"+Object.entries(S).map(([w,M])=>w+"="+M).join("&"))}const _p=new as().withLoadFunction(LN).withMapClass(MN).withPinClass(RN).withProviderName("Google").build();class rs{constructor(t,n){Ie(this,"_ne");Ie(this,"_sw");this._ne=new un(n),this._sw=new un(t)}static fit(t){const n=t.map(T=>T.latitude),r=Math.max(...n),l=Math.min(...n),d=t.map(T=>T.normalLon).sort((T,E)=>T-E),f=d.map((T,E)=>({distance:(E<d.length-1?d[E+1]:d[0]+360)-T,index:E})).reduce((T,E)=>E.distance>T.distance?E:T).index,p=d[f],_=d[(f+1)%d.length];return new this(new un(l,_),new un(r,p))}get ne(){return this._ne}set ne(t){this._ne=new un(t)}get sw(){return this._sw}set sw(t){this._sw=new un(t)}contains(t){const n=this._sw.latitude<=t.latitude&&t.latitude<=this._ne.latitude,r=this._ne.longitude-this._sw.longitude>=360,l=this._sw.normalLon<=this._ne.normalLon?this._sw.normalLon<=t.normalLon&&t.normalLon<=this._ne.normalLon:this._sw.normalLon<=t.normalLon||t.normalLon<=this._ne.normalLon;return n&&(r||l)}extend(t){if(this._ne.latitude=Math.max(this._ne.latitude,t.latitude),this._sw.latitude=Math.min(this._sw.latitude,t.latitude),!this.contains(t)){const n=((t.longitude-this._ne.longitude)%360+360)%360,r=((this._sw.longitude-t.longitude)%360+360)%360;n<r?this._ne.longitude+=n:this._sw.longitude-=r}}getCenter(t=Ur.SPHERICAL){const n=new un(this._ne.latitude,this._sw.longitude),r=this._sw.distanceTo(n,yn.DEGREE,t),l=(n.longitude+this._ne.longitude)/2+(this._ne.longitude<n.longitude?180:0);return n.add(-r/2,0,yn.DEGREE,t),n.longitude=l,n}}class IN{constructor(){Ie(this,"_anchorX");Ie(this,"_anchorY");Ie(this,"_height");Ie(this,"_icon");Ie(this,"_srText");Ie(this,"_width");Ie(this,"_zIndex");Ie(this,"_class");Ie(this,"_element");this._anchorX=.5,this._anchorY=1,this._height=39,this._icon="default",this._srText="map pin",this._width=33,this._zIndex=0,this._class="",this._element=null}getAnchorX(){return this._anchorX}getAnchorY(){return this._anchorY}getClass(){return this._class}getElement(){return this._element}getHeight(){return this._height}getIcon(){return this._icon}getSRText(){return this._srText}getWidth(){return this._width}getZIndex(){return this._zIndex}setAnchorX(t){return this._anchorX=t,this}setAnchorY(t){return this._anchorY=t,this}setClass(t){return this._class=t,this}setElement(t){return this._element=t,this}setHeight(t){return this._height=t,this}setIcon(t){return this._icon=t,this}setSRText(t){return this._srText=t,this}setWidth(t){return this._width=t,this}setZIndex(t){return this._zIndex=t,this}}class hd{constructor(){Ie(this,"coordinate");Ie(this,"hideOffscreen");Ie(this,"icons");Ie(this,"propertiesForStatus");Ie(this,"provider");Ie(this,"type");Ie(this,"hasPinUrl");this.coordinate=new un(0,0),this.hideOffscreen=!1,this.icons={},this.propertiesForStatus=t=>new IN,this.provider=null,this.type="",this.hasPinUrl=!1}withCoordinate(t){return this.coordinate=new un(t),this}withHideOffscreen(t){return this.hideOffscreen=t,this}withIcon(t,n){return this.icons[t]=n,this}withPropertiesForStatus(t){return Ir(t,vr.FUNCTION),this.propertiesForStatus=t,this}withProvider(t){return t&&(Sr(t,cs),this.provider=t),this}withHasPinUrl(t){return this.hasPinUrl=t,this}withType(t){return this.type=t,this}build(){return new kN(this)}}class kN{constructor(t){Ie(this,"_coordinate");Ie(this,"_hideOffscreen");Ie(this,"_icons");Ie(this,"_propertiesForStatus");Ie(this,"_type");Ie(this,"_clickHandler");Ie(this,"_focusHandler");Ie(this,"_hoverHandler");Ie(this,"_hidden");Ie(this,"_cancelHiddenUpdater");Ie(this,"_map");Ie(this,"_pin");Ie(this,"_status");var n,r;if(Sr(t,hd),t.provider&&Sr(t.provider,cs),!((n=t.provider)!=null&&n.loaded))throw new Error(`MapProvider '${(r=t.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling MapPin constructor.`);this._coordinate=t.coordinate,this._hideOffscreen=t.hideOffscreen,this._icons={...t.icons},this._propertiesForStatus=t.propertiesForStatus,this._type=t.type,this._clickHandler=()=>null,this._focusHandler=l=>this._hoverHandler(l),this._hoverHandler=l=>null,this._hidden=!1,this._cancelHiddenUpdater=()=>null,this._map=null,this._pin=new mp(t.provider).withIcons({...this._icons}).withClickHandler(()=>this._clickHandler()).withFocusHandler(l=>this._focusHandler(l)).withHoverHandler(l=>this._hoverHandler(l)).withHasPinUrl(t.hasPinUrl).build(),this._pin.setCoordinate(t.coordinate),this._status={},this.setStatus(this._status)}getCoordinate(){return this._coordinate}getIcon(t){return this._icons[t]}getMap(){return this._map}getProviderPin(){return this._pin}getType(){return this._type}remove(){this.setMap(null)}setClickHandler(t){Ir(t,vr.FUNCTION),this._clickHandler=t}setCoordinate(t){this._coordinate=new un(t),this._pin.setCoordinate(this._coordinate),this._hideOffscreen&&this._hideIfOffscreen()}setFocusHandler(t){Ir(t,vr.FUNCTION),this._focusHandler=t}setHoverHandler(t){Ir(t,vr.FUNCTION),this._hoverHandler=t}setMap(t){if(t!==this._map&&(t!==null&&Sr(t,Np),this._pin.setMap(t,this._hidden?null:this._map),this._map=t,this._hidden=!1,this._cancelHiddenUpdater(),t&&this._hideOffscreen)){let n=!1;const r=new Promise(l=>{this._cancelHiddenUpdater=()=>{n=!0,l()}});(async()=>{for(;!n;)this._hideIfOffscreen(),await Promise.race([r,t.moving()]),await Promise.race([r,t.idle()])})()}}setStatus(t){Object.assign(this._status,t),this._pin.setProperties(this._propertiesForStatus(this._status))}_hideIfOffscreen(){if(this._map){const t=this._map.getBounds().contains(this._coordinate);this._hidden&&t?this._pin.setMap(this._map,null):!this._hidden&&!t&&this._pin.setMap(null,this._map),this._hidden=!t}}}const yo=.98;function Va(e,t){return Math.max(e instanceof Function?e():e||0,0)/t}class yp{constructor(){Ie(this,"controlEnabled");Ie(this,"defaultCenter");Ie(this,"defaultZoom");Ie(this,"legendPins");Ie(this,"padding");Ie(this,"panHandler");Ie(this,"panStartHandler");Ie(this,"provider");Ie(this,"providerOptions");Ie(this,"singlePinZoom");Ie(this,"wrapper");this.controlEnabled=!0,this.defaultCenter=new un(39.83,-98.58),this.defaultZoom=4,this.legendPins=[],this.padding={bottom:()=>50,left:()=>50,right:()=>50,top:()=>50},this.panHandler=(t,n)=>null,this.panStartHandler=t=>null,this.provider=null,this.providerOptions={},this.singlePinZoom=14,this.wrapper=null}withControlEnabled(t){return this.controlEnabled=t,this}withDefaultCenter(t){return this.defaultCenter=new un(t),this}withDefaultZoom(t){return this.defaultZoom=t,this}withLegendPins(t){return this.legendPins=Array.from(t),this}withPadding(t){return this.padding=t,this}withPanHandler(t){return Ir(t,vr.FUNCTION),this.panHandler=t,this}withPanStartHandler(t){return Ir(t,vr.FUNCTION),this.panStartHandler=t,this}withProvider(t){return Sr(t,cs),this.provider=t,this}withProviderOptions(t){return this.providerOptions=t,this}withSinglePinZoom(t){return this.singlePinZoom=t,this}withWrapper(t){return t?(Sr(t,HTMLElement),this.wrapper=t,this):this}build(){return new Np(this)}}let Np=class{constructor(t){Ie(this,"_defaultCenter");Ie(this,"_defaultZoom");Ie(this,"_legendPins");Ie(this,"_padding");Ie(this,"_provider");Ie(this,"_singlePinZoom");Ie(this,"_wrapper");Ie(this,"_cachedBounds");Ie(this,"_resolveIdle");Ie(this,"_resolveMoving");Ie(this,"_idlePromise");Ie(this,"_panHandlerRunning");Ie(this,"_panStartHandlerRunning");Ie(this,"_currentBounds");Ie(this,"_movingPromise");Ie(this,"_panHandler");Ie(this,"_panStartHandler");Ie(this,"_map");var n,r,l;if(Sr(t,yp),t.provider&&Sr(t.provider,cs),t.wrapper&&Sr(t.wrapper,HTMLElement),!((n=t.provider)!=null&&n.loaded))throw new Error(`MapProvider '${(r=t.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling Map constructor.`);for(this._defaultCenter=t.defaultCenter,this._defaultZoom=t.defaultZoom,this._legendPins=t.legendPins,this._provider=t.provider,this._singlePinZoom=t.singlePinZoom,this._wrapper=t.wrapper,this._padding={},this.setPadding(t.padding),this._cachedBounds=null,this._resolveIdle=()=>null,this._resolveMoving=()=>null,this._idlePromise=Promise.resolve(),this._setIdle(),this.setPanHandler(t.panHandler),this.setPanStartHandler(t.panStartHandler);(l=this._wrapper)!=null&&l.lastChild;)this._wrapper.removeChild(this._wrapper.lastChild);this._panHandlerRunning=!1,this._panStartHandlerRunning=!1,this._map=new pp(t.provider,this._wrapper).withControlEnabled(t.controlEnabled).withPanHandler(()=>this.panHandler()).withPanStartHandler(()=>this.panStartHandler()).withProviderOptions(t.providerOptions).build(),this.setZoomCenter(this._defaultZoom,this._defaultCenter),this._currentBounds=this.getBounds()}fitCoordinates(t,n=!1,r=this._singlePinZoom){t.length?this.setBounds(rs.fit(t),n,this._padding,r):this.setZoomCenter(this._defaultZoom,this._defaultCenter,n)}getBounds(){var t,n;if(!this._cachedBounds){const r=((t=this._wrapper)==null?void 0:t.offsetHeight)??0,l=((n=this._wrapper)==null?void 0:n.offsetWidth)??0,d=this.getZoom(),f=this.getCenter(),p=360/Math.pow(2,d+8),_=l*p,T=r*p;this._cachedBounds=new rs(f,f),this._cachedBounds.ne.add(T/2,_/2,yn.DEGREE,Ur.MERCATOR),this._cachedBounds.sw.add(-T/2,-_/2,yn.DEGREE,Ur.MERCATOR),this.moving().then(()=>this._cachedBounds=null)}return new rs(this._cachedBounds.sw,this._cachedBounds.ne)}getCenter(){return this._map.getCenter()}getProviderMap(){return this._map}getZoom(){return this._map.getZoom()}async idle(){await this._idlePromise}async moving(){await this._movingPromise}newPinOptions(){return new hd().withProvider(this._provider)}panHandler(){this._panHandlerRunning||(this._panHandlerRunning=!0,requestAnimationFrame(()=>{const t=this._currentBounds;this._currentBounds=this.getBounds(),this._panHandler&&this._panHandler(t,new rs(new un(this._currentBounds.sw),new un(this._currentBounds.ne))),this._panHandlerRunning=!1}),this._setIdle())}panStartHandler(){this._panStartHandlerRunning||(this._panStartHandlerRunning=!0,requestAnimationFrame(()=>{this._panStartHandler&&this._panStartHandler(new rs(new un(this._currentBounds.sw),new un(this._currentBounds.ne))),this._panStartHandlerRunning=!1}),this._setMoving())}setBounds({ne:t,sw:n},r=!1,l={},d=1/0){var z,q;const f=(z=this._wrapper)==null?void 0:z.offsetHeight,p=(q=this._wrapper)==null?void 0:q.offsetWidth;if(!f||!p)return;let _=Va(l.bottom,f),T=Va(l.left,p),E=Va(l.right,p),S=Va(l.top,f),w=T+E,M=_+S;w>yo&&(T*=yo/w,E*=yo/w,w=yo),M>yo&&(_*=yo/M,S*=yo/M,M=yo);const m=f*(1-M),v=p*(1-w),k=new rs(n,t),G=new un(k.ne.latitude,k.sw.longitude),I=k.sw.distanceTo(G,yn.DEGREE,Ur.MERCATOR),P=(k.ne.longitude-G.longitude+360)%360;let H=Math.max(I,P*m/v)/(1-M),j=Math.max(P,I*v/m)/(1-w),re=Math.log2(p*360/j)-8;re>d&&(re=d,j=p*360/2**(re+8),H=j*f/p);const te=k.getCenter(Ur.MERCATOR),ce=(S-_)/2*H,V=(E-T)/2*j;te.add(ce,V,yn.DEGREE,Ur.MERCATOR),this.setZoomCenter(re,te,r)}setCenter(t,n=!1){this._map.setCenter(new un(t),n)}setPadding({bottom:t=this._padding.bottom,left:n=this._padding.left,right:r=this._padding.right,top:l=this._padding.top}){return this._padding={bottom:t,left:n,right:r,top:l},this}setPanHandler(t){Ir(t,vr.FUNCTION),this._panHandler=t}setPanStartHandler(t){Ir(t,vr.FUNCTION),this._panStartHandler=t}setZoom(t,n=!1){this._map.setZoom(t,n)}setZoomCenter(t,n,r=!1){this._map.setZoomCenter(t,n,r)}_setIdle(){this._resolveMoving(),this._movingPromise=new Promise(t=>this._resolveMoving=t),this._resolveIdle()}_setMoving(){this._resolveIdle(),this._idlePromise=new Promise(t=>this._resolveIdle=t),this._resolveMoving()}};const _c=rt.createContext(null);function PN(){const e=rt.useContext(_c);if(!e||e.map===void 0)throw new Error("Attempted to call useMapContext() outside of <Map>.");return e.map}const Cp=({apiKey:e,bounds:t,children:n,className:r,clientKey:l,controls:d=!0,defaultCenter:f={latitude:39.83,longitude:-98.58},defaultZoom:p=4,mapRef:_,padding:T={bottom:50,left:50,right:50,top:50},panHandler:E=()=>null,panStartHandler:S=()=>null,provider:w=_p,providerOptions:M={},singleZoom:m=14})=>{const v=rt.useRef(null),[k,G]=rt.useState(new un(f)),[I,P]=rt.useState(!1),[H,j]=rt.useState(),[re,te]=rt.useState(p),ce=(V,z)=>{E(V,z),z&&G(z.getCenter())};return rt.useEffect(()=>{!I||!H||te(H.getZoom())},[k]),rt.useEffect(()=>{if(!t||!I||!H)return;const V=t.map(z=>new un(z));H.fitCoordinates(V)},[JSON.stringify(t),H]),rt.useEffect(()=>{if(!I||H)return;const V=new yp().withControlEnabled(d).withDefaultCenter(k).withDefaultZoom(re).withPadding(T).withPanHandler(ce).withPanStartHandler(S).withProvider(w).withProviderOptions(M).withSinglePinZoom(m).withWrapper(v.current).build();j(V),_&&(_.current=V)},[I]),rt.useEffect(()=>{I||H||!v.current||w.load(e,{...M,...l&&{client:l}}).then(()=>P(!0))},[]),ft.jsx("div",{className:Qs({"is-loaded":I},r),id:"map",ref:v,"data-testid":"map",children:H&&ft.jsx(_c.Provider,{value:{map:H,provider:w},children:n})})},$N=({count:e})=>ft.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",children:ft.jsxs("g",{fill:"none",fillRule:"evenodd",children:[ft.jsx("circle",{fill:"red",fillRule:"nonzero",stroke:"white",cx:"11",cy:"11",r:"11"}),ft.jsx("text",{fill:"white",fontFamily:"Arial-BoldMT,Arial",fontSize:"12",fontWeight:"bold",children:ft.jsx("tspan",{x:"50%",y:"15",textAnchor:"middle",children:e})})]})}),gd=rt.createContext(null);function FN(){const e=rt.useContext(gd);if(!e)throw new Error("Attempted to call useClustererContext() outside of <Clusterer>.");return e}const BN=({clusterRadius:e=50,children:t,ClusterTemplate:n=$N})=>{const{map:r}=rt.useContext(_c),[l,d]=rt.useState([]),[f,p]=rt.useState(),[_,T]=rt.useState([]),[E,S]=rt.useState([]);return rt.useEffect(()=>{p(HN(l,r.getZoom(),e))},[l,r.getZoom()]),rt.useEffect(()=>{S(()=>[]),T(()=>[]),(f==null?void 0:f.length)!==0&&(f==null||f.forEach(w=>{if(w.length===1){w[0].pin.setMap(r);return}if(w.length>1){const M=rs.fit(w.map(v=>v.pin.getCoordinate())).getCenter(Ur.MERCATOR),m=`cluster-{${M._lat},${M._lon}}`;w.forEach(v=>v.pin.setMap(null)),T(v=>[...v,m]),S(v=>[...v,ft.jsx(pd,{coordinate:M,id:m,onClick:()=>r.fitCoordinates(w.map(k=>k.pin.getCoordinate()),!0,1/0),children:ft.jsx(n,{count:w.length})},m)])}}))},[f]),ft.jsx(gd.Provider,{value:{clusters:f??[],clusterIds:_,setPinStore:d},children:ft.jsxs(ft.Fragment,{children:[E.map((w,M)=>ft.jsx(rt.Fragment,{children:w},M)),t]})})},HN=(e,t,n)=>{const r=n*Math.PI/2**(t+7),l=e.map((p,_)=>[_]),d=[];e.forEach((p,_)=>{for(let T=_;T<e.length;T++)T!==_&&new un(p.pin.getCoordinate()).distanceTo(new un(e[T].pin.getCoordinate()),yn.RADIAN,Ur.MERCATOR)<=r&&(l[_].push(T),l[T].push(_))});let f=1;for(;f;){f=0;let p;if(l.forEach((E,S)=>{E.length>f&&(f=E.length,p=S)}),!f)break;const _=l[p??0],T=[];l[p??0]=[];for(const E of _){const S=l[E];T.push(e[E]),l[E]=[],S.forEach(w=>l[w].splice(l[w].indexOf(E),1))}d.push(T)}return d},WN=ft.jsx("svg",{width:"30",height:"38",viewBox:"0 0 30 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ft.jsx("path",{d:"M30 15.0882C30 23.4212 23.3333 30.7353 15 38C7.22222 31.2941 0 23.4212 0 15.0882C0 6.75523 6.71573 0 15 0C23.2843 0 30 6.75523 30 15.0882Z",fill:"red"})}),pd=({children:e,coordinate:t,hideOffscreen:n=!1,id:r,icon:l=WN,onClick:d=()=>null,onFocus:f=()=>null,onHover:p=()=>null,zIndex:_,hasPinUrl:T=!1})=>{const{map:E,provider:S}=rt.useContext(_c),w=rt.useContext(gd),M=rt.useMemo(()=>new hd().withCoordinate(t).withHideOffscreen(n).withProvider(S).withHasPinUrl(T).build(),[]);rt.useEffect(()=>{if(_!==0&&!_)return;const v=M.getProviderPin().getWrapperElement();v&&(v.style.zIndex=_.toString())},[_]),rt.useEffect(()=>{M.setMap(E),M.setClickHandler(()=>d(r)),M.setFocusHandler(k=>f(k,r)),M.setHoverHandler(k=>p(k,r));const v=w==null?void 0:w.clusterIds.includes(r);return w&&!v&&w.setPinStore(k=>[...k,{pin:M,id:r}]),()=>{M.setMap(null),w&&w.setPinStore(k=>k.filter(G=>G.id!==r))}},[]);const m=e||l;if(m){const v=M.getProviderPin().getPinElement();return Object.assign(v.style,{height:"auto",width:"auto"}),ld.createPortal(m,v)}return null},KN=({children:e,coordinate:t,linkSameTab:n,pinUrl:r,onClick:l=()=>null,onHover:d=()=>null,onFocus:f=()=>null,...p})=>{var _;return ft.jsx(Cp,{bounds:[t],...p,children:ft.jsx(pd,{coordinate:t,id:"location-map-marker",onClick:l,onHover:d,onFocus:f,hasPinUrl:((_=r||"")==null?void 0:_.length)>0,children:r?ft.jsx(hp,{href:r,target:n?"_self":"_blank",children:e}):e||void 0})})};var qc={},Vl={},Of;function zN(){if(Of)return Vl;Of=1;var e=rt;const t=e.createContext(null);function n(l,d){let f=null;l!=null&&(f=l[1]);function p(){return d??(f!=null?f.getTheme():null)}return{getTheme:p}}function r(){const l=e.useContext(t);if(l==null)throw Error("LexicalComposerContext.useLexicalComposerContext: cannot find a LexicalComposerContext");return l}return Vl.LexicalComposerContext=t,Vl.createLexicalComposerContext=n,Vl.useLexicalComposerContext=r,Vl}var ql={},Df;function UN(){if(Df)return ql;Df=1;var e=rt;function t(r){let l=new URLSearchParams;l.append("code",r);for(let d=1;d<arguments.length;d++)l.append("v",arguments[d]);throw Error(`Minified Lexical error #${r}; visit https://lexical.dev/docs/error?${l} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let n=e.createContext(null);return ql.LexicalComposerContext=n,ql.createLexicalComposerContext=function(r,l){let d=null;return r!=null&&(d=r[1]),{getTheme:function(){return l??(d!=null?d.getTheme():null)}}},ql.useLexicalComposerContext=function(){let r=e.useContext(n);return r==null&&t(8),r},ql}var Zc,Af;function Zn(){return Af||(Af=1,Zc=process.env.NODE_ENV==="development"?zN():UN()),Zc}var He={},Mf;function GN(){if(Mf)return He;Mf=1;function e(u){return{type:u}}const t=e("SELECTION_CHANGE_COMMAND"),n=e("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),r=e("CLICK_COMMAND"),l=e("DELETE_CHARACTER_COMMAND"),d=e("INSERT_LINE_BREAK_COMMAND"),f=e("INSERT_PARAGRAPH_COMMAND"),p=e("CONTROLLED_TEXT_INSERTION_COMMAND"),_=e("PASTE_COMMAND"),T=e("REMOVE_TEXT_COMMAND"),E=e("DELETE_WORD_COMMAND"),S=e("DELETE_LINE_COMMAND"),w=e("FORMAT_TEXT_COMMAND"),M=e("UNDO_COMMAND"),m=e("REDO_COMMAND"),v=e("KEYDOWN_COMMAND"),k=e("KEY_ARROW_RIGHT_COMMAND"),G=e("MOVE_TO_END"),I=e("KEY_ARROW_LEFT_COMMAND"),P=e("MOVE_TO_START"),H=e("KEY_ARROW_UP_COMMAND"),j=e("KEY_ARROW_DOWN_COMMAND"),re=e("KEY_ENTER_COMMAND"),te=e("KEY_SPACE_COMMAND"),ce=e("KEY_BACKSPACE_COMMAND"),V=e("KEY_ESCAPE_COMMAND"),z=e("KEY_DELETE_COMMAND"),q=e("KEY_TAB_COMMAND"),Te=e("INSERT_TAB_COMMAND"),Se=e("INDENT_CONTENT_COMMAND"),Ee=e("OUTDENT_CONTENT_COMMAND"),de=e("DROP_COMMAND"),K=e("FORMAT_ELEMENT_COMMAND"),O=e("DRAGSTART_COMMAND"),Z=e("DRAGOVER_COMMAND"),se=e("DRAGEND_COMMAND"),Y=e("COPY_COMMAND"),W=e("CUT_COMMAND"),J=e("SELECT_ALL_COMMAND"),R=e("CLEAR_EDITOR_COMMAND"),U=e("CLEAR_HISTORY_COMMAND"),X=e("CAN_REDO_COMMAND"),fe=e("CAN_UNDO_COMMAND"),_e=e("FOCUS_COMMAND"),B=e("BLUR_COMMAND"),A=e("KEY_MODIFIER_COMMAND"),F=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oe=F&&"documentMode"in document?document.documentMode:null,ye=F&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),De=F&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ee=F&&"InputEvent"in window&&!oe?"getTargetRanges"in new window.InputEvent("input"):!1,ne=F&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ue=F&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,be=F&&/Android/.test(navigator.userAgent),Ne=F&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Re=F&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Ne,ke=1,Fe=3,qe=0,Be=1,ct=2,Mt=0,zt=1,Vt=2,Oe=1,ie=2,le=4,ve=8,Le=16,Me=32,je=64,it=128,ot=Oe|ie|le|ve|Le|Me|je|it,st=1,wt=2,Ue=1,Ge=2,tt=3,yt=4,Nt=5,Tt=6,gt=" ",mt=ne||ue||Re?gt:"​",Ft=`
37
37
 
38
38
  `,Ht=De?gt:mt,tn="֑-߿יִ-﷽ﹰ-ﻼ",kt="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",Yt=new RegExp("^[^"+kt+"]*["+tn+"]"),bt=new RegExp("^[^"+tn+"]*["+kt+"]"),Qt={bold:Oe,code:Le,highlight:it,italic:ie,strikethrough:le,subscript:Me,superscript:je,underline:ve},wr={directionless:st,unmergeable:wt},mi={center:Ge,end:Tt,justify:yt,left:Ue,right:tt,start:Nt},_i={[Ge]:"center",[Tt]:"end",[yt]:"justify",[Ue]:"left",[tt]:"right",[Nt]:"start"},pe={normal:Mt,segmented:Vt,token:zt},Ze={[Mt]:"normal",[Vt]:"segmented",[zt]:"token"},nt=100;let St=!1,Pt=0;function Ut(){return St}function $t(u){Pt=u.timeStamp}function Et(u){Pt===0&&Ns(u).addEventListener("textInput",$t,!0)}function Nn(u,o,c){return o.__lexicalLineBreak===u||u[`__lexicalKey_${c._key}`]!==void 0}function rn(u){return u.getEditorState().read(()=>{const o=mn();return o!==null?o.clone():null})}function cn(u,o,c){const h=cr(c._window);let y=null,N=null;h!==null&&h.anchorNode===u&&(y=h.anchorOffset,N=h.focusOffset);const b=u.nodeValue;b!==null&&Pr(o,b,y,N,!1)}function bn(u,o,c){if(vt(u)){const h=u.anchor.getNode();if(h.is(c)&&u.format!==h.getFormat())return!1}return o.nodeType===Fe&&c.isAttached()}function nr(u,o,c){St=!0;const h=performance.now()-Pt>nt;try{Kr(u,()=>{const y=mn()||rn(u),N=new Map,b=u.getRootElement(),$=u._editorState,ae=u._blockCursorElement;let he=!1,me="";for(let we=0;we<o.length;we++){const Ce=o[we],Ve=Ce.type,ze=Ce.target;let $e=ri(ze,$);if(!($e===null&&ze!==b||An($e))){if(Ve==="characterData")h&&_t($e)&&bn(y,ze,$e)&&cn(ze,$e,u);else if(Ve==="childList"){he=!0;const Lt=Ce.addedNodes;for(let qt=0;qt<Lt.length;qt++){const Wt=Lt[qt],At=hs(Wt),ln=Wt.parentNode;if(ln!=null&&Wt!==ae&&At===null&&(Wt.nodeName!=="BR"||!Nn(Wt,ln,u))){if(De){const lr=Wt.innerText||Wt.nodeValue;lr&&(me+=lr)}ln.removeChild(Wt)}}const Qe=Ce.removedNodes,ht=Qe.length;if(ht>0){let qt=0;for(let Wt=0;Wt<ht;Wt++){const At=Qe[Wt];(At.nodeName==="BR"&&Nn(At,ze,u)||ae===At)&&(ze.appendChild(At),qt++)}ht!==qt&&(ze===b&&($e=ml($)),N.set(ze,$e))}}}}if(N.size>0)for(const[we,Ce]of N)if(et(Ce)){const Ve=Ce.getChildrenKeys();let ze=we.firstChild;for(let $e=0;$e<Ve.length;$e++){const Lt=Ve[$e],Qe=u.getElementByKey(Lt);Qe!==null&&(ze==null?(we.appendChild(Qe),ze=Qe):ze!==Qe&&we.replaceChild(Qe,ze),ze=ze.nextSibling)}}else _t(Ce)&&Ce.markDirty();const xe=c.takeRecords();if(xe.length>0){for(let we=0;we<xe.length;we++){const Ce=xe[we],Ve=Ce.addedNodes,ze=Ce.target;for(let $e=0;$e<Ve.length;$e++){const Lt=Ve[$e],Qe=Lt.parentNode;Qe!=null&&Lt.nodeName==="BR"&&!Nn(Lt,ze,u)&&Qe.removeChild(Lt)}}c.takeRecords()}y!==null&&(he&&(y.dirty=!0,Nr(y)),De&&Ol(u)&&y.insertRawText(me))})}finally{St=!1}}function Ln(u){const o=u._observer;if(o!==null){const c=o.takeRecords();nr(u,c,o)}}function fn(u){Et(u),u._observer=new MutationObserver((o,c)=>{nr(u,o,c)})}function Jn(u,o){const c=u.__mode,h=u.__format,y=u.__style,N=o.__mode,b=o.__format,$=o.__style;return(c===null||c===N)&&(h===null||h===b)&&(y===null||y===$)}function Mi(u,o){const c=u.mergeWithSibling(o),h=xn()._normalizedNodes;return h.add(u.__key),h.add(o.__key),c}function rr(u){let o=u;if(o.__text===""&&o.isSimpleText()&&!o.isUnmergeable()){o.remove();return}let c;for(;(c=o.getPreviousSibling())!==null&&_t(c)&&c.isSimpleText()&&!c.isUnmergeable();)if(c.__text==="")c.remove();else if(Jn(c,o)){o=Mi(c,o);break}else break;let h;for(;(h=o.getNextSibling())!==null&&_t(h)&&h.isSimpleText()&&!h.isUnmergeable();)if(h.__text==="")h.remove();else if(Jn(o,h)){o=Mi(o,h);break}else break}function Do(u){return ds(u.anchor),ds(u.focus),u}function ds(u){for(;u.type==="element";){const o=u.getNode(),c=u.offset;let h,y;if(c===o.getChildrenSize()?(h=o.getChildAtIndex(c-1),y=!0):(h=o.getChildAtIndex(c),y=!1),_t(h)){u.set(h.__key,y?h.getTextContentSize():0,"text");break}else if(!et(h))break;u.set(h.__key,y?h.getChildrenSize():0,"element")}}let dl=1;function Yr(){return""+dl++}function pa(u,o){const c=u._nodes.get(o);if(c===void 0)throw Error(`registeredNode: Type ${o} not found`);return c}const fs=typeof queueMicrotask=="function"?queueMicrotask:u=>{Promise.resolve().then(u)};function io(u){return An(ri(u))}function Ao(u){const o=document.activeElement;if(o===null)return!1;const c=o.nodeName;return An(ri(u))&&(c==="INPUT"||c==="TEXTAREA"||o.contentEditable==="true"&&o.__lexicalEditor==null)}function oo(u,o,c){const h=u.getRootElement();try{return h!==null&&h.contains(o)&&h.contains(c)&&o!==null&&!Ao(o)&&fl(o)===u}catch{return!1}}function fl(u){let o=u;for(;o!=null;){const c=o.__lexicalEditor;if(c!=null)return c;o=ys(o)}return null}function In(u){return Yt.test(u)?"rtl":bt.test(u)?"ltr":null}function Un(u){return u.isToken()||u.isSegmented()}function ni(u){return u.nodeType===Fe}function kr(u){let o=u;for(;o!=null;){if(ni(o))return o;o=o.firstChild}return null}function Hn(u,o,c){const h=Qt[o];if(c!==null&&(u&h)===(c&h))return u;let y=u^h;return o==="subscript"?y&=~Qt.superscript:o==="superscript"&&(y&=~Qt.subscript),y}function Mo(u){return _t(u)||li(u)||An(u)}function hl(u,o){if(o!=null){u.__key=o;return}hr(),Jd();const c=xn(),h=xi(),y=Yr();h._nodeMap.set(y,u),et(u)?c._dirtyElements.set(y,!0):c._dirtyLeaves.add(y),c._cloneNotNeeded.add(y),c._dirtyType=Be,u.__key=y}function gl(u,o,c){let h=u;for(;h!==null;){if(c.has(h))return;const y=o.get(h);if(y===void 0)break;c.set(h,!1),h=y.__parent}}function jr(u){const o=u.getParent();if(o!==null){const c=u.getWritable(),h=o.getWritable(),y=u.getPreviousSibling(),N=u.getNextSibling();if(y===null)if(N!==null){const b=N.getWritable();h.__first=N.__key,b.__prev=null}else h.__first=null;else{const b=y.getWritable();if(N!==null){const $=N.getWritable();$.__prev=b.__key,b.__next=$.__key}else b.__next=null;c.__prev=null}if(N===null)if(y!==null){const b=y.getWritable();h.__last=y.__key,b.__next=null}else h.__last=null;else{const b=N.getWritable();if(y!==null){const $=y.getWritable();$.__next=b.__key,b.__prev=$.__key}else b.__prev=null;c.__next=null}h.__size--,c.__parent=null}}function Ri(u){Jd();const o=u.getLatest(),c=o.__parent,h=xi(),y=xn(),N=h._nodeMap,b=y._dirtyElements;c!==null&&gl(c,N,b);const $=o.__key;y._dirtyType=Be,et(u)?b.set($,!0):y._dirtyLeaves.add($)}function pl(u){const o=u.getPreviousSibling(),c=u.getNextSibling();o!==null&&Ri(o),c!==null&&Ri(c)}function vn(u){hr();const o=xn(),c=o._compositionKey;if(u!==c){if(o._compositionKey=u,c!==null){const h=Cn(c);h!==null&&h.getWritable()}if(u!==null){const h=Cn(u);h!==null&&h.getWritable()}}}function ar(){return Fs()?null:xn()._compositionKey}function Cn(u,o){const h=(o||xi())._nodeMap.get(u);return h===void 0?null:h}function hs(u,o){const c=xn(),h=u[`__lexicalKey_${c._key}`];return h!==void 0?Cn(h,o):null}function ri(u,o){let c=u;for(;c!=null;){const h=hs(c,o);if(h!==null)return h;c=ys(c)}return null}function Ro(u){const o=u._decorators,c=Object.assign({},o);return u._pendingDecorators=c,c}function gs(u){return u.read(()=>ir().getTextContent())}function bi(u,o){Kr(u,()=>{const c=xi();if(c.isEmpty())return;if(o==="root"){ir().markDirty();return}const h=c._nodeMap;for(const[,y]of h)y.markDirty()},u._pendingEditorState===null?{tag:"history-merge"}:void 0)}function ir(){return ml(xi())}function ml(u){return u._nodeMap.get("root")}function Nr(u){hr();const o=xi();if(u!==null){if(Object.isFrozen(u))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");u.dirty=!0,u.setCachedNodes(null)}o._selection=u}function _l(){hr();const u=xn();Ln(u)}function Li(u){const o=xn(),c=ma(u,o);if(c===null){const h=o.getRootElement();return u===h?Cn("root"):null}return Cn(c)}function yl(u,o){return o?u.getTextContentSize():0}function ma(u,o){let c=u;for(;c!=null;){const h=c[`__lexicalKey_${o._key}`];if(h!==void 0)return h;c=ys(c)}return null}function bo(u){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(u)}function Ii(u){const o=[];let c=u;for(;c!==null;)o.push(c),c=c._parentEditor;return o}function Nl(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function ps(u){return u.nodeType===Fe?u.nodeValue:null}function Lo(u,o,c){const h=cr(o._window);if(h===null)return;const y=h.anchorNode;let{anchorOffset:N,focusOffset:b}=h;if(y!==null){let $=ps(y);const ae=ri(y);if($!==null&&_t(ae)){if($===mt&&c){const he=c.length;$=c,N=he,b=he}$!==null&&Pr(ae,$,N,b,u)}}}function Pr(u,o,c,h,y){let N=u;if(N.isAttached()&&(y||!N.isDirty())){const b=N.isComposing();let $=o;(b||y)&&o[o.length-1]===mt&&($=o.slice(0,-1));const ae=N.getTextContent();if(y||$!==ae){if($===""){if(vn(null),!ne&&!ue&&!Re){const ze=xn();setTimeout(()=>{ze.update(()=>{N.isAttached()&&N.remove()})},20)}else N.remove();return}const he=N.getParent(),me=$s(),xe=N.getTextContentSize(),we=ar(),Ce=N.getKey();if(N.isToken()||we!==null&&Ce===we&&!b||vt(me)&&(he!==null&&!he.canInsertTextBefore()&&me.anchor.offset===0||me.anchor.key===u.__key&&me.anchor.offset===0&&!N.canInsertTextBefore()&&!b||me.focus.key===u.__key&&me.focus.offset===xe&&!N.canInsertTextAfter()&&!b)){N.markDirty();return}const Ve=mn();if(!vt(Ve)||c===null||h===null){N.setTextContent($);return}if(Ve.setTextNodeRange(N,c,N,h),N.isSegmented()){const ze=N.getTextContent(),$e=Dn(ze);N.replace($e),N=$e}N.setTextContent($)}}}function Cl(u){const o=u.getPreviousSibling();return(_t(o)||et(o)&&o.isInline())&&!o.canInsertTextAfter()}function Io(u,o){if(o.isSegmented())return!0;if(!u.isCollapsed())return!1;const c=u.anchor.offset,h=o.getParentOrThrow(),y=o.isToken();return c===0?!o.canInsertTextBefore()||!h.canInsertTextBefore()||y||Cl(o):c===o.getTextContentSize()?!o.canInsertTextAfter()||!h.canInsertTextAfter()||y:!1}function _a(u,o,c,h){return u===9&&!o&&!c&&!h}function ya(u,o,c,h){return u===66&&!o&&Vr(c,h)}function so(u,o,c,h){return u===73&&!o&&Vr(c,h)}function ko(u,o,c,h){return u===85&&!o&&Vr(c,h)}function El(u,o){return Da(u)&&!o}function Tl(u,o){return Da(u)&&o}function Po(u,o){return ye&&o&&u===79}function $o(u,o,c){return qr(u)&&(ye?o:c)}function Na(u,o,c){return Pi(u)&&(ye?o:c)}function Ca(u,o){return ye&&o&&qr(u)}function Ea(u,o){return ye&&o&&Pi(u)}function Ta(u,o,c,h){return ye?o||c?!1:qr(u)||u===72&&h:h||o||c?!1:qr(u)}function Dc(u,o,c,h,y){return ye?c||h||y?!1:Pi(u)||u===68&&o:o||h||y?!1:Pi(u)}function Ac(u,o,c,h){return u===90&&!o&&Vr(c,h)}function xa(u,o,c,h){return ye?u===90&&c&&o:u===89&&h||u===90&&h&&o}function Mc(u,o,c,h){return o?!1:u===67?ye?c:h:!1}function Rc(u,o,c,h){return o?!1:u===88?ye?c:h:!1}function va(u){return u===37}function Sa(u){return u===39}function xl(u){return u===38}function bc(u){return u===40}function Lc(u,o,c,h){return va(u)&&!o&&!h&&!c}function wa(u,o,c,h,y){return va(u)&&!h&&!c&&(o||y)}function lo(u,o,c,h){return Sa(u)&&!o&&!h&&!c}function Oa(u,o,c,h,y){return Sa(u)&&!h&&!c&&(o||y)}function Ic(u,o,c){return xl(u)&&!o&&!c}function vl(u,o,c){return bc(u)&&!o&&!c}function Fo(u,o,c,h){return u||o||c||h}function kc(u){return u===32}function Vr(u,o){return ye?u:o}function Da(u){return u===13}function qr(u){return u===8}function ki(u){return u===27}function Pi(u){return u===46}function ms(u,o,c){return u===65&&Vr(o,c)}function Sl(){const u=ir(),o=u.select(0,u.getChildrenSize());Nr(Do(o))}function $i(u,o){u.__lexicalClassNameCache===void 0&&(u.__lexicalClassNameCache={});const c=u.__lexicalClassNameCache,h=c[o];if(h!==void 0)return h;const y=u[o];if(typeof y=="string"){const N=y.split(" ");return c[o]=N,N}return y}function ao(u,o,c,h,y){if(c.size===0)return;const N=h.__type,b=h.__key,$=o.get(N);if($===void 0)throw Error(`Type ${N} not in registeredNodes`);const ae=$.klass;let he=u.get(ae);he===void 0&&(he=new Map,u.set(ae,he));const me=he.get(b),xe=me==="destroyed"&&y==="created";(me===void 0||xe)&&he.set(b,xe?"updated":y)}function Fi(u){const o=xi(),c=o._readOnly,h=u.getType(),y=o._nodeMap,N=[];for(const[,b]of y)b instanceof u&&b.__type===h&&(c||b.isAttached())&&N.push(b);return N}function Aa(u,o,c){const h=u.getParent();let y=c,N=u;return h!==null&&(o&&c===0?(y=N.getIndexWithinParent(),N=h):!o&&c===N.getChildrenSize()&&(y=N.getIndexWithinParent()+1,N=h)),N.getChildAtIndex(o?y-1:y)}function wl(u,o){const c=u.offset;if(u.type==="element"){const h=u.getNode();return Aa(h,o,c)}else{const h=u.getNode();if(o&&c===0||!o&&c===h.getTextContentSize()){const y=o?h.getPreviousSibling():h.getNextSibling();return y===null?Aa(h.getParentOrThrow(),o,h.getIndexWithinParent()+(o?0:1)):y}}return null}function Ol(u){const o=Ns(u).event,c=o&&o.inputType;return c==="insertFromPaste"||c==="insertFromPasteAsQuotation"}function ut(u,o,c){return nf(u,o,c)}function _s(u){return!zr(u)&&!u.isLastChild()&&!u.isInline()}function Bo(u,o){const c=u._keyToDOMMap.get(o);if(c===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${o}`);return c}function ys(u){const o=u.assignedSlot||u.parentElement;return o!==null&&o.nodeType===11?o.host:o}function yi(u,o,c){const h=c.ownerDocument,y=h.defaultView;if(y===null)return;let{top:N,bottom:b}=o,$=0,ae=0,he=c;for(;he!==null;){const me=he===h.body;if(me)$=0,ae=Ns(u).innerHeight;else{const we=he.getBoundingClientRect();$=we.top,ae=we.bottom}let xe=0;if(N<$?xe=-($-N):b>ae&&(xe=b-ae),xe!==0)if(me)y.scrollBy(0,xe);else{const we=he.scrollTop;he.scrollTop+=xe;const Ce=he.scrollTop-we;N-=Ce,b-=Ce}if(me)break;he=ys(he)}}function Gn(u){return xn()._updateTags.has(u)}function Ct(u){hr(),xn()._updateTags.add(u)}function co(u){const o=mn();if(!vt(o)||!et(u))return o;const{anchor:c,focus:h}=o,y=c.getNode(),N=h.getNode();return Bi(y,u)&&c.set(u.__key,0,"element"),Bi(N,u)&&h.set(u.__key,0,"element"),o}function Bi(u,o){let c=u.getParent();for(;c!==null;){if(c.is(o))return!0;c=c.getParent()}return!1}function Ma(u){const o=u.ownerDocument;return o&&o.defaultView||null}function Ns(u){const o=u._window;if(o===null)throw Error("window object not found");return o}function $r(u){return et(u)&&u.isInline()||An(u)&&u.isInline()}function Cs(u){let o=u.getParentOrThrow();for(;o!==null;){if(ii(o))return o;o=o.getParentOrThrow()}return o}function ii(u){return zr(u)||et(u)&&u.isShadowRoot()}function Dl(u){const o=u.constructor.clone(u);return hl(o,null),o}function Or(u){const o=xn(),c=u.constructor.getType(),h=o._nodes.get(c);if(h===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const y=h.replace;if(y!==null){const N=y(u);if(!(N instanceof u.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return N}return u}function Ho(u,o){const c=u.getParent();if(zr(c)&&!et(o)&&!An(o))throw Error("Only element or decorator nodes can be inserted in to the root node")}function Es(u){const o=u.theme,c=document.createElement("div");c.contentEditable="false",c.setAttribute("data-lexical-cursor","true");let h=o.blockCursor;if(h!==void 0){if(typeof h=="string"){const y=h.split(" ");h=o.blockCursor=y}h!==void 0&&c.classList.add(...h)}return c}function Rt(u){return(An(u)||et(u)&&!u.canBeEmpty())&&!u.isInline()}function Wo(u,o,c){c.style.removeProperty("caret-color"),o._blockCursorElement=null;const h=u.parentElement;h!==null&&h.removeChild(u)}function Ni(u,o,c){let h=u._blockCursorElement;if(vt(c)&&c.isCollapsed()&&c.anchor.type==="element"&&o.contains(document.activeElement)){const y=c.anchor,N=y.getNode(),b=y.offset,$=N.getChildrenSize();let ae=!1,he=null;if(b===$){const me=N.getChildAtIndex(b-1);Rt(me)&&(ae=!0)}else{const me=N.getChildAtIndex(b);if(Rt(me)){const xe=me.getPreviousSibling();(xe===null||Rt(xe))&&(ae=!0,he=u.getElementByKey(me.__key))}}if(ae){const me=u.getElementByKey(N.__key);h===null&&(u._blockCursorElement=h=Es(u._config)),o.style.caretColor="transparent",he===null?me.appendChild(h):me.insertBefore(h,he);return}}h!==null&&Wo(h,u,o)}function cr(u){return F?(u||window).getSelection():null}function Ra(u,o){let c=u.getChildAtIndex(o);if(c==null&&(c=u),ii(u))throw Error("Can not call $splitNode() on root element");const h=b=>{const $=b.getParentOrThrow(),ae=ii($),he=b===c&&!ae?b:Dl(b);if(ae){if(!(et(b)&&et(he)))throw Error("Children of a root must be ElementNode");return b.insertAfter(he),[b,he,he]}else{const[me,xe,we]=h($),Ce=b.getNextSiblings();return we.append(he,...Ce),[me,xe,he]}},[y,N]=h(c);return[y,N]}function Ts(u,o){let c=u;for(;c!==ir()&&c!=null;){if(o(c))return c;c=c.getParent()}return null}function ba(u){return Ko(u)&&u.tagName==="A"}function Ko(u){return u.nodeType===1}function Hi(u){if(An(u)&&!u.isInline())return!0;if(!et(u)||ii(u))return!1;const o=u.getFirstChild(),c=o===null||li(o)||_t(o)||o.isInline();return!u.isInline()&&u.canBeEmpty()!==!1&&c}function xs(u,o){let c=u;for(;c!==null&&c.getParent()!==null&&!o(c);)c=c.getParentOrThrow();return o(c)?c:null}function La(u,o){const c=u._decorators;let y=u._pendingDecorators||c;const N=o._nodeMap;let b;for(b in y)N.has(b)||(y===c&&(y=Ro(u)),delete y[b])}function Al(u,o,c,h,y,N){let b=u.getFirstChild();for(;b!==null;){const $=b.__key;b.__parent===o&&(et(b)&&Al(b,$,c,h,y,N),c.has($)||N.delete($),y.push($)),b=b.getNextSibling()}}function Ml(u,o,c,h){const y=u._nodeMap,N=o._nodeMap,b=[];for(const[$]of h){const ae=N.get($);ae!==void 0&&(ae.isAttached()||(et(ae)&&Al(ae,$,y,N,b,h),y.has($)||h.delete($),b.push($)))}for(const $ of b)N.delete($);for(const $ of c){const ae=N.get($);ae!==void 0&&!ae.isAttached()&&(y.has($)||c.delete($),N.delete($))}}let kn="",Yn="",jt="",Cr,Wn,uo,Ia=!1,fo=!1,zo,Uo=null,Go,Rl,Wi,hn,On,Kn;function ho(u,o){const c=Wi.get(u);if(o!==null){const h=ws(u);h.parentNode===o&&o.removeChild(h)}if(hn.has(u)||Wn._keyToDOMMap.delete(u),et(c)){const h=Ei(c,Wi);Ki(h,0,h.length-1,null)}c!==void 0&&ao(Kn,uo,zo,c,"destroyed")}function Ki(u,o,c,h){let y=o;for(;y<=c;++y){const N=u[y];N!==void 0&&ho(N,h)}}function Ci(u,o){u.setProperty("text-align",o)}const go="40px";function Xn(u,o){const c=Cr.theme.indent;if(typeof c=="string"){const y=u.classList.contains(c);o>0&&!y?u.classList.add(c):o<1&&y&&u.classList.remove(c)}const h=getComputedStyle(u).getPropertyValue("--lexical-indent-base-value")||go;u.style.setProperty("padding-inline-start",o===0?"":`calc(${o} * ${h})`)}function Fr(u,o){const c=u.style;o===0?Ci(c,""):o===Ue?Ci(c,"left"):o===Ge?Ci(c,"center"):o===tt?Ci(c,"right"):o===yt?Ci(c,"justify"):o===Nt?Ci(c,"start"):o===Tt&&Ci(c,"end")}function dn(u,o,c){const h=hn.get(u);if(h===void 0)throw Error("createNode: node does not exist in nodeMap");const y=h.createDOM(Cr,Wn);if(Je(u,y,Wn),_t(h)?y.setAttribute("data-lexical-text","true"):An(h)&&y.setAttribute("data-lexical-decorator","true"),et(h)){const N=h.__indent,b=h.__size;if(N!==0&&Xn(y,N),b!==0){const ae=b-1,he=Ei(h,hn);ka(he,ae,h,y)}const $=h.__format;$!==0&&Fr(y,$),h.isInline()||vs(null,h,y),_s(h)&&(kn+=Ft,jt+=Ft)}else{const N=h.getTextContent();if(An(h)){const b=h.decorate(Wn,Cr);b!==null&&Il(u,b),y.contentEditable="false"}else _t(h)&&(h.isDirectionless()||(Yn+=N));kn+=N,jt+=N}if(o!==null)if(c!=null)o.insertBefore(y,c);else{const N=o.__lexicalLineBreak;N!=null?o.insertBefore(y,N):o.appendChild(y)}return Object.freeze(h),ao(Kn,uo,zo,h,"created"),y}function ka(u,o,c,h){const y=Yn;Yn="",bl(u,c,0,o,h,null),Ll(c,h),Yn=y}function bl(u,o,c,h,y,N){const b=kn;kn="";let $=c;for(;$<=h;++$)dn(u[$],y,N);_s(o)&&(kn+=Ft),y.__lexicalTextContent=kn,kn=b+kn}function Pa(u,o){const c=o.get(u);return li(c)||An(c)&&c.isInline()}function vs(u,o,c){const h=u!==null&&(u.__size===0||Pa(u.__last,Wi)),y=o.__size===0||Pa(o.__last,hn);if(h){if(!y){const N=c.__lexicalLineBreak;N!=null&&c.removeChild(N),c.__lexicalLineBreak=null}}else if(y){const N=document.createElement("br");c.__lexicalLineBreak=N,c.appendChild(N)}}function Ll(u,o){const c=o.__lexicalDirTextContent,h=o.__lexicalDir;if(c!==Yn||h!==Uo){const y=Yn==="",N=y?Uo:In(Yn);if(N!==h){const b=o.classList,$=Cr.theme;let ae=h!==null?$[h]:void 0,he=N!==null?$[N]:void 0;if(ae!==void 0){if(typeof ae=="string"){const me=ae.split(" ");ae=$[h]=me}b.remove(...ae)}if(N===null||y&&N==="ltr")o.removeAttribute("dir");else{if(he!==void 0){if(typeof he=="string"){const me=he.split(" ");he=$[N]=me}he!==void 0&&b.add(...he)}o.dir=N}if(!fo){const me=u.getWritable();me.__dir=N}}Uo=N,o.__lexicalDirTextContent=Yn,o.__lexicalDir=N}}function zi(u,o,c){const h=Yn;Yn="",at(u,o,c),Ll(o,c),Yn=h}function Ei(u,o){const c=[];let h=u.__first;for(;h!==null;){const y=o.get(h);if(y===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");c.push(h),h=y.__next}return c}function at(u,o,c){const h=kn,y=u.__size,N=o.__size;if(kn="",y===1&&N===1){const b=u.__first,$=o.__first;if(b===$)po(b,c);else{const ae=ws(b),he=dn($,null,null);c.replaceChild(he,ae),ho(b,null)}}else{const b=Ei(u,Wi),$=Ei(o,hn);if(y===0)N!==0&&bl($,o,0,N-1,c,null);else if(N===0){if(y!==0){const he=c.__lexicalLineBreak==null;Ki(b,0,y-1,he?null:c),he&&(c.textContent="")}}else En(o,b,$,y,N,c)}_s(o)&&(kn+=Ft),c.__lexicalTextContent=kn,kn=h+kn}function po(u,o){const c=Wi.get(u);let h=hn.get(u);if(c===void 0||h===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const y=Ia||Rl.has(u)||Go.has(u),N=Bo(Wn,u);if(c===h&&!y){if(et(c)){const b=N.__lexicalTextContent;b!==void 0&&(kn+=b,jt+=b);const $=N.__lexicalDirTextContent;$!==void 0&&(Yn+=$)}else{const b=c.getTextContent();_t(c)&&!c.isDirectionless()&&(Yn+=b),jt+=b,kn+=b}return N}if(c!==h&&y&&ao(Kn,uo,zo,h,"updated"),h.updateDOM(c,N,Cr)){const b=dn(u,null,null);if(o===null)throw Error("reconcileNode: parentDOM is null");return o.replaceChild(b,N),ho(u,null),b}if(et(c)&&et(h)){const b=h.__indent;b!==c.__indent&&Xn(N,b);const $=h.__format;$!==c.__format&&Fr(N,$),y&&(zi(c,h,N),!zr(h)&&!h.isInline()&&vs(c,h,N)),_s(h)&&(kn+=Ft,jt+=Ft)}else{const b=h.getTextContent();if(An(h)){const $=h.decorate(Wn,Cr);$!==null&&Il(u,$)}else _t(h)&&!h.isDirectionless()&&(Yn+=b);kn+=b,jt+=b}if(!fo&&zr(h)&&h.__cachedText!==jt){const b=h.getWritable();b.__cachedText=jt,h=b}return Object.freeze(h),N}function Il(u,o){let c=Wn._pendingDecorators;const h=Wn._decorators;if(c===null){if(h[u]===o)return;c=Ro(Wn)}c[u]=o}function Er(u){return u.firstChild}function Ss(u){let o=u.nextSibling;return o!==null&&o===Wn._blockCursorElement&&(o=o.nextSibling),o}function En(u,o,c,h,y,N){const b=h-1,$=y-1;let ae,he,me=Er(N),xe=0,we=0;for(;xe<=b&&we<=$;){const ze=o[xe],$e=c[we];if(ze===$e)me=Ss(po($e,N)),xe++,we++;else{ae===void 0&&(ae=new Set(o)),he===void 0&&(he=new Set(c));const Lt=he.has(ze),Qe=ae.has($e);if(!Lt)me=Ss(ws(ze)),ho(ze,N),xe++;else if(!Qe)dn($e,N,me),we++;else{const ht=Bo(Wn,$e);ht===me?me=Ss(po($e,N)):(me!=null?N.insertBefore(ht,me):N.appendChild(ht),po($e,N)),xe++,we++}}}const Ce=xe>b,Ve=we>$;if(Ce&&!Ve){const ze=c[$+1],$e=ze===void 0?null:Wn.getElementByKey(ze);bl(c,u,we,$,N,$e)}else Ve&&!Ce&&Ki(o,xe,b,N)}function Ui(u,o,c,h,y,N){kn="",jt="",Yn="",Ia=h===ct,Uo=null,Wn=c,Cr=c._config,uo=c._nodes,zo=Wn._listeners.mutation,Go=y,Rl=N,Wi=u._nodeMap,hn=o._nodeMap,fo=o._readOnly,On=new Map(c._keyToDOMMap);const b=new Map;return Kn=b,po("root",null),Wn=void 0,uo=void 0,Go=void 0,Rl=void 0,Wi=void 0,hn=void 0,Cr=void 0,On=void 0,Kn=void 0,b}function Je(u,o,c){const h=c._keyToDOMMap;o["__lexicalKey_"+c._key]=u,h.set(u,o)}function ws(u){const o=On.get(u);if(o===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${u}`);return o}const ur=Object.freeze({}),or=30,kl=[["keydown",ge],["pointerdown",Bl],["compositionstart",x],["compositionend",Q],["input",C],["click",$a],["cut",ur],["copy",ur],["dragstart",ur],["dragover",ur],["dragend",ur],["paste",ur],["focus",ur],["blur",ur],["drop",ur]];ee&&kl.push(["beforeinput",(u,o)=>g(u,o)]);let Gi=0,Pl=0,Yo=0,Br=null,jo=0,Hr=!1,Os=!1,Vo=!1,qo=!1,Ds=[0,"",0,"root",0];function Yi(u,o,c,h,y){const N=u.anchor,b=u.focus,$=N.getNode(),ae=xn(),he=cr(ae._window),me=he!==null?he.anchorNode:null,xe=N.key,we=ae.getElementByKey(xe),Ce=c.length;return xe!==b.key||!_t($)||(!y&&(!ee||Yo<h+50)||$.isDirty()&&Ce<2||bo(c))&&N.offset!==b.offset&&!$.isComposing()||Un($)||$.isDirty()&&Ce>1||(y||!ee)&&we!==null&&!$.isComposing()&&me!==kr(we)||he!==null&&o!==null&&(!o.collapsed||o.startContainer!==he.anchorNode||o.startOffset!==he.anchorOffset)||$.getFormat()!==u.format||$.getStyle()!==u.style||Io(u,$)}function $l(u,o){return u!==null&&u.nodeValue!==null&&u.nodeType===Fe&&o!==0&&o!==u.nodeValue.length}function Fl(u,o,c){const{anchorNode:h,anchorOffset:y,focusNode:N,focusOffset:b}=u;Hr&&(Hr=!1,$l(h,y)&&$l(N,b))||Kr(o,()=>{if(!c){Nr(null);return}if(!oo(o,h,N))return;const $=mn();if(vt($)){const ae=$.anchor,he=ae.getNode();if($.isCollapsed()){u.type==="Range"&&u.anchorNode===u.focusNode&&($.dirty=!0);const me=Ns(o).event,xe=me?me.timeStamp:performance.now(),[we,Ce,Ve,ze,$e]=Ds,Lt=ir(),Qe=o.isComposing()===!1&&Lt.getTextContent()==="";if(xe<$e+200&&ae.offset===Ve&&ae.key===ze)$.format=we,$.style=Ce;else if(ae.type==="text"){if(!_t(he))throw Error("Point.getNode() must return TextNode when type is text");$.format=he.getFormat(),$.style=he.getStyle()}else ae.type==="element"&&!Qe&&($.format=0,$.style="")}else{let me=ot,xe=!1;const we=$.getNodes(),Ce=we.length;for(let Ve=0;Ve<Ce;Ve++){const ze=we[Ve];if(_t(ze)&&(xe=!0,me&=ze.getFormat(),me===0))break}$.format=xe?me:0}}ut(o,t,void 0)})}function $a(u,o){Kr(o,()=>{const c=mn(),h=cr(o._window),y=$s();if(h){if(vt(c)){const N=c.anchor,b=N.getNode();if(N.type==="element"&&N.offset===0&&c.isCollapsed()&&!zr(b)&&ir().getChildrenSize()===1&&b.getTopLevelElementOrThrow().isEmpty()&&y!==null&&c.is(y))h.removeAllRanges(),c.dirty=!0;else if(u.detail===3&&!c.isCollapsed()){const ae=c.focus.getNode();b!==ae&&(et(b)?b.select(0):b.getParentOrThrow().select(0))}}else if(u.pointerType==="touch"){const N=h.anchorNode;if(N!==null){const b=N.nodeType;if(b===ke||b===Fe){const $=Fc(y,h,o,u);Nr($)}}}}ut(o,r,u)})}function Bl(u,o){const c=u.target,h=u.pointerType;c instanceof Node&&h!=="touch"&&Kr(o,()=>{io(c)||(Os=!0)})}function s(u){if(!u.getTargetRanges)return null;const o=u.getTargetRanges();return o.length===0?null:o[0]}function i(u,o){return u!==o||et(u)||et(o)||!u.isToken()||!o.isToken()}function a(u){return Pl===229&&u<Gi+or}function g(u,o){const c=u.inputType,h=s(u);c==="deleteCompositionText"||De&&Ol(o)||c!=="insertCompositionText"&&Kr(o,()=>{const y=mn();if(c==="deleteContentBackward"){if(y===null){const me=$s();if(!vt(me))return;Nr(me.clone())}if(vt(y)){if(be&&vn(y.anchor.key),a(u.timeStamp)&&o.isComposing()&&y.anchor.key===y.focus.key){if(vn(null),Gi=0,setTimeout(()=>{Kr(o,()=>{vn(null)})},or),vt(y)){const xe=y.anchor.getNode();if(xe.markDirty(),y.format=xe.getFormat(),!_t(xe))throw Error("Anchor node must be a TextNode");y.style=xe.getStyle()}y.anchor.getNode().getTextContent().length<=1&&(u.preventDefault(),ut(o,l,!0))}else vn(null),u.preventDefault(),ut(o,l,!0);return}}if(!vt(y))return;const N=u.data;Br!==null&&Lo(!1,o,Br),(!y.dirty||Br!==null)&&y.isCollapsed()&&!zr(y.anchor.getNode())&&h!==null&&y.applyDOMRange(h),Br=null;const b=y.anchor,$=y.focus,ae=b.getNode(),he=$.getNode();if(c==="insertText"||c==="insertTranspose"){if(N===`
39
39
  `)u.preventDefault(),ut(o,d,!1);else if(N===Ft)u.preventDefault(),ut(o,f,void 0);else if(N==null&&u.dataTransfer){const me=u.dataTransfer.getData("text/plain");u.preventDefault(),y.insertRawText(me)}else N!=null&&Yi(y,h,N,u.timeStamp,!0)?(u.preventDefault(),ut(o,p,N)):Br=N;Yo=u.timeStamp;return}switch(u.preventDefault(),c){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{ut(o,p,u);break}case"insertFromComposition":{vn(null),ut(o,p,u);break}case"insertLineBreak":{vn(null),ut(o,d,!1);break}case"insertParagraph":{vn(null),Vo&&!ue?(Vo=!1,ut(o,d,!1)):ut(o,f,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{ut(o,_,u);break}case"deleteByComposition":{i(ae,he)&&ut(o,T,u);break}case"deleteByDrag":case"deleteByCut":{ut(o,T,u);break}case"deleteContent":{ut(o,l,!1);break}case"deleteWordBackward":{ut(o,E,!0);break}case"deleteWordForward":{ut(o,E,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{ut(o,S,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{ut(o,S,!1);break}case"formatStrikeThrough":{ut(o,w,"strikethrough");break}case"formatBold":{ut(o,w,"bold");break}case"formatItalic":{ut(o,w,"italic");break}case"formatUnderline":{ut(o,w,"underline");break}case"historyUndo":{ut(o,M,void 0);break}case"historyRedo":{ut(o,m,void 0);break}}})}function C(u,o){u.stopPropagation(),Kr(o,()=>{const c=mn(),h=u.data,y=s(u);if(h!=null&&vt(c)&&Yi(c,y,h,u.timeStamp,!1)){qo&&(D(o,h),qo=!1);const N=c.anchor,b=N.getNode(),$=cr(o._window);if($===null)return;const ae=N.offset;(!ee||c.isCollapsed()||!_t(b)||$.anchorNode===null||b.getTextContent().slice(0,ae)+h+b.getTextContent().slice(ae+c.focus.offset)!==ps($.anchorNode))&&ut(o,p,h);const he=h.length;De&&he>1&&u.inputType==="insertCompositionText"&&!o.isComposing()&&(c.anchor.offset-=he),!ne&&!ue&&!Re&&o.isComposing()&&(Gi=0,vn(null))}else Lo(!1,o,h!==null?h:void 0),qo&&(D(o,h||void 0),qo=!1);_l()}),Br=null}function x(u,o){Kr(o,()=>{const c=mn();if(vt(c)&&!o.isComposing()){const h=c.anchor,y=c.anchor.getNode();vn(h.key),(u.timeStamp<Gi+or||h.type==="element"||!c.isCollapsed()||y.getFormat()!==c.format||_t(y)&&y.getStyle()!==c.style)&&ut(o,p,Ht)}})}function D(u,o){const c=u._compositionKey;if(vn(null),c!==null&&o!=null){if(o===""){const h=Cn(c),y=kr(u.getElementByKey(c));y!==null&&y.nodeValue!==null&&_t(h)&&Pr(h,y.nodeValue,null,null,!0);return}if(o[o.length-1]===`
@@ -106,6 +106,6 @@ caused by: ${Ai.fullStack(n)}`:t.stack??""}static info(t){Yc(t);const n={},r=Ai.
106
106
  `});const T={type:"element",tagName:"li",properties:d,children:f};return e.patch(t,T),e.applyData(t,T)}function AT(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nm(n[r])}return t}function nm(e){const t=e.spread;return t??e.children.length>1}function MT(e,t){const n={},r=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++l<r.length;){const f=r[l];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const d={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,d),e.applyData(t,d)}function RT(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bT(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function LT(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const wd=rm("start"),Od=rm("end");function IT(e){return{start:wd(e),end:Od(e)}}function rm(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function kT(e,t){const n=e.all(t),r=n.shift(),l=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],f),l.push(f)}if(n.length>0){const f={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},p=wd(t.children[1]),_=Od(t.children[t.children.length-1]);p.line&&_.line&&(f.position={start:p,end:_}),l.push(f)}const d={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function PT(e,t,n){const r=n?n.children:void 0,d=(r?r.indexOf(t):1)===0?"th":"td",f=n&&n.type==="table"?n.align:void 0,p=f?f.length:t.children.length;let _=-1;const T=[];for(;++_<p;){const S=t.children[_],w={},M=f?f[_]:void 0;M&&(w.align=M);let m={type:"element",tagName:d,properties:w,children:[]};S&&(m.children=e.all(S),e.patch(S,m),m=e.applyData(t,m)),T.push(m)}const E={type:"element",tagName:"tr",properties:{},children:e.wrap(T,!0)};return e.patch(t,E),e.applyData(t,E)}function $T(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Cg=9,Eg=32;function FT(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),l=0;const d=[];for(;r;)d.push(Tg(t.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=n.exec(t);return d.push(Tg(t.slice(l),l>0,!1)),d.join("")}function Tg(e,t,n){let r=0,l=e.length;if(t){let d=e.codePointAt(r);for(;d===Cg||d===Eg;)r++,d=e.codePointAt(r)}if(n){let d=e.codePointAt(l-1);for(;d===Cg||d===Eg;)l--,d=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}function BT(e,t){const n={type:"text",value:FT(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function HT(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const WT={blockquote:pT,break:mT,code:_T,delete:yT,emphasis:NT,footnoteReference:em,footnote:CT,heading:ET,html:TT,imageReference:xT,image:vT,inlineCode:ST,linkReference:wT,link:OT,listItem:DT,list:MT,paragraph:RT,root:bT,strong:LT,table:kT,tableCell:$T,tableRow:PT,text:BT,thematicBreak:HT,toml:Ja,yaml:Ja,definition:Ja,footnoteDefinition:Ja};function Ja(){return null}const im=function(e){if(e==null)return GT;if(typeof e=="string")return UT(e);if(typeof e=="object")return Array.isArray(e)?KT(e):zT(e);if(typeof e=="function")return Cc(e);throw new Error("Expected function, string, or object as test")};function KT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=im(e[n]);return Cc(r);function r(...l){let d=-1;for(;++d<t.length;)if(t[d].call(this,...l))return!0;return!1}}function zT(e){return Cc(t);function t(n){let r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function UT(e){return Cc(t);function t(n){return n&&n.type===e}}function Cc(e){return t;function t(n,...r){return!!(n&&typeof n=="object"&&"type"in n&&e.call(this,n,...r))}}function GT(){return!0}const YT=!0,xg=!1,jT="skip",VT=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null);const l=im(t),d=r?-1:1;f(e,void 0,[])();function f(p,_,T){const E=p&&typeof p=="object"?p:{};if(typeof E.type=="string"){const w=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(p.type+(w?"<"+w+">":""))+")"})}return S;function S(){let w=[],M,m,v;if((!t||l(p,_,T[T.length-1]||null))&&(w=qT(n(p,T)),w[0]===xg))return w;if(p.children&&w[0]!==jT)for(m=(r?p.children.length:-1)+d,v=T.concat(p);m>-1&&m<p.children.length;){if(M=f(p.children[m],m,v)(),M[0]===xg)return M;m=typeof M[1]=="number"?M[1]:m+d}return w}}};function qT(e){return Array.isArray(e)?e:typeof e=="number"?[YT,e]:[e]}const Dd=function(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),VT(e,t,l,r);function l(d,f){const p=f[f.length-1];return n(d,p?p.children.indexOf(d):null,p)}};function ZT(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const vg={}.hasOwnProperty;function JT(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Dd(e,"definition",r=>{const l=Sg(r.identifier);l&&!vg.call(t,l)&&(t[l]=r)}),n;function n(r){const l=Sg(r);return l&&vg.call(t,l)?t[l]:null}}function Sg(e){return String(e||"").toUpperCase()}const fc={}.hasOwnProperty;function XT(e,t){const n=t||{},r=n.allowDangerousHtml||!1,l={};return f.dangerous=r,f.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,f.footnoteLabel=n.footnoteLabel||"Footnotes",f.footnoteLabelTagName=n.footnoteLabelTagName||"h2",f.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},f.footnoteBackLabel=n.footnoteBackLabel||"Back to content",f.unknownHandler=n.unknownHandler,f.passThrough=n.passThrough,f.handlers={...WT,...n.handlers},f.definition=JT(e),f.footnoteById=l,f.footnoteOrder=[],f.footnoteCounts={},f.patch=QT,f.applyData=ex,f.one=p,f.all=_,f.wrap=nx,f.augment=d,Dd(e,"footnoteDefinition",T=>{const E=String(T.identifier).toUpperCase();fc.call(l,E)||(l[E]=T)}),f;function d(T,E){if(T&&"data"in T&&T.data){const S=T.data;S.hName&&(E.type!=="element"&&(E={type:"element",tagName:"",properties:{},children:[]}),E.tagName=S.hName),E.type==="element"&&S.hProperties&&(E.properties={...E.properties,...S.hProperties}),"children"in E&&E.children&&S.hChildren&&(E.children=S.hChildren)}if(T){const S="type"in T?T:{position:T};ZT(S)||(E.position={start:wd(S),end:Od(S)})}return E}function f(T,E,S,w){return Array.isArray(S)&&(w=S,S={}),d(T,{type:"element",tagName:E,properties:S||{},children:w||[]})}function p(T,E){return om(f,T,E)}function _(T){return ro(f,T)}}function QT(e,t){e.position&&(t.position=IT(e))}function ex(e,t){let n=t;if(e&&e.data){const r=e.data.hName,l=e.data.hChildren,d=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&d&&(n.properties={...n.properties,...d}),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function om(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return fc.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:ro(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):tx(e,t)}function ro(e,t){const n=[];if("children"in t){const r=t.children;let l=-1;for(;++l<r.length;){const d=om(e,r[l],t);if(d){if(l&&r[l-1].type==="break"&&(!Array.isArray(d)&&d.type==="text"&&(d.value=d.value.replace(/^\s+/,"")),!Array.isArray(d)&&d.type==="element")){const f=d.children[0];f&&f.type==="text"&&(f.value=f.value.replace(/^\s+/,""))}Array.isArray(d)?n.push(...d):n.push(d)}}}return n}function tx(e,t){const n=t.data||{},r="value"in t&&!(fc.call(n,"hProperties")||fc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:ro(e,t)};return e.patch(t,r),e.applyData(t,r)}function nx(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
107
107
  `});++r<e.length;)r&&n.push({type:"text",value:`
108
108
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
109
- `}),n}const rx=(e,t)=>e(t,"i",ro(e,t)),ix=(e,t)=>e(t,"b",ro(e,t)),ox=(e,t)=>e(t,"u",ro(e,t)),sx=(e,t)=>e(t,"s",ro(e,t)),lx=(e,t)=>e(t,"sub",ro(e,t)),ax=(e,t)=>e(t,"sup",ro(e,t)),cx={emphasis:rx,strong:ix,underline:ox,strikethrough:sx,subscript:lx,superscript:ax},ux=e=>{const[t,n]=rt.useState();let r;return rt.useEffect(()=>{(async()=>{if(!r)try{r=(await Promise.resolve().then(()=>require("./index-DxNyUS0j.cjs"))).default}catch{throw new Error("Failed to import React Markdown, cannot properly render LegacyRichText.")}const d=r({children:e.markdown,remarkPlugins:[gT],remarkRehypeOptions:{handlers:cx}});n(d)})()},[e.markdown]),t||null};class us extends Error{}class dx extends us{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class fx extends us{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class hx extends us{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class qs extends us{}class sm extends us{constructor(t){super(`Invalid unit ${t}`)}}class _r extends us{}class No extends us{constructor(){super("Zone is an abstract class")}}const lt="numeric",pi="short",Gr="long",hc={year:lt,month:lt,day:lt},lm={year:lt,month:pi,day:lt},gx={year:lt,month:pi,day:lt,weekday:pi},am={year:lt,month:Gr,day:lt},cm={year:lt,month:Gr,day:lt,weekday:Gr},um={hour:lt,minute:lt},dm={hour:lt,minute:lt,second:lt},fm={hour:lt,minute:lt,second:lt,timeZoneName:pi},hm={hour:lt,minute:lt,second:lt,timeZoneName:Gr},gm={hour:lt,minute:lt,hourCycle:"h23"},pm={hour:lt,minute:lt,second:lt,hourCycle:"h23"},mm={hour:lt,minute:lt,second:lt,hourCycle:"h23",timeZoneName:pi},_m={hour:lt,minute:lt,second:lt,hourCycle:"h23",timeZoneName:Gr},ym={year:lt,month:lt,day:lt,hour:lt,minute:lt},Nm={year:lt,month:lt,day:lt,hour:lt,minute:lt,second:lt},Cm={year:lt,month:pi,day:lt,hour:lt,minute:lt},Em={year:lt,month:pi,day:lt,hour:lt,minute:lt,second:lt},px={year:lt,month:pi,day:lt,weekday:pi,hour:lt,minute:lt},Tm={year:lt,month:Gr,day:lt,hour:lt,minute:lt,timeZoneName:pi},xm={year:lt,month:Gr,day:lt,hour:lt,minute:lt,second:lt,timeZoneName:pi},vm={year:lt,month:Gr,day:lt,weekday:Gr,hour:lt,minute:lt,timeZoneName:Gr},Sm={year:lt,month:Gr,day:lt,weekday:Gr,hour:lt,minute:lt,second:lt,timeZoneName:Gr};class ca{get type(){throw new No}get name(){throw new No}get ianaName(){return this.name}get isUniversal(){throw new No}offsetName(t,n){throw new No}formatOffset(t,n){throw new No}offset(t){throw new No}equals(t){throw new No}get isValid(){throw new No}}let bu=null;class Ec extends ca{static get instance(){return bu===null&&(bu=new Ec),bu}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Im(t,n,r)}formatOffset(t,n){return oa(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let oc={};function mx(e){return oc[e]||(oc[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),oc[e]}const _x={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function yx(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,l,d,f,p,_,T,E]=r;return[f,l,d,p,_,T,E]}function Nx(e,t){const n=e.formatToParts(t),r=[];for(let l=0;l<n.length;l++){const{type:d,value:f}=n[l],p=_x[d];d==="era"?r[p]=f:It(p)||(r[p]=parseInt(f,10))}return r}let Xa={};class no extends ca{static create(t){return Xa[t]||(Xa[t]=new no(t)),Xa[t]}static resetCache(){Xa={},oc={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=no.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Im(t,n,r,this.name)}formatOffset(t,n){return oa(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=mx(this.name);let[l,d,f,p,_,T,E]=r.formatToParts?Nx(r,n):yx(r,n);p==="BC"&&(l=-Math.abs(l)+1);const w=xc({year:l,month:d,day:f,hour:_===24?0:_,minute:T,second:E,millisecond:0});let M=+n;const m=M%1e3;return M-=m>=0?m:1e3+m,(w-M)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let wg={};function Cx(e,t={}){const n=JSON.stringify([e,t]);let r=wg[n];return r||(r=new Intl.ListFormat(e,t),wg[n]=r),r}let Xu={};function Qu(e,t={}){const n=JSON.stringify([e,t]);let r=Xu[n];return r||(r=new Intl.DateTimeFormat(e,t),Xu[n]=r),r}let ed={};function Ex(e,t={}){const n=JSON.stringify([e,t]);let r=ed[n];return r||(r=new Intl.NumberFormat(e,t),ed[n]=r),r}let td={};function Tx(e,t={}){const{base:n,...r}=t,l=JSON.stringify([e,r]);let d=td[l];return d||(d=new Intl.RelativeTimeFormat(e,t),td[l]=d),d}let ta=null;function xx(){return ta||(ta=new Intl.DateTimeFormat().resolvedOptions().locale,ta)}let Og={};function vx(e){let t=Og[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Og[e]=t}return t}function Sx(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,l;try{r=Qu(e).resolvedOptions(),l=e}catch{const _=e.substring(0,n);r=Qu(_).resolvedOptions(),l=_}const{numberingSystem:d,calendar:f}=r;return[l,d,f]}}function wx(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Ox(e){const t=[];for(let n=1;n<=12;n++){const r=Dt.utc(2009,n,1);t.push(e(r))}return t}function Dx(e){const t=[];for(let n=1;n<=7;n++){const r=Dt.utc(2016,11,13+n);t.push(e(r))}return t}function Qa(e,t,n,r){const l=e.listingMode();return l==="error"?null:l==="en"?n(t):r(t)}function Ax(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Mx{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:l,floor:d,...f}=r;if(!n||Object.keys(f).length>0){const p={useGrouping:!1,...r};r.padTo>0&&(p.minimumIntegerDigits=r.padTo),this.inf=Ex(t,p)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):Ld(t,3);return zn(n,this.padTo)}}}class Rx{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let l;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const f=-1*(t.offset/60),p=f>=0?`Etc/GMT+${f}`:`Etc/GMT${f}`;t.offset!==0&&no.create(p).valid?(l=p,this.dt=t):(l="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,l=t.zone.name):(l="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const d={...this.opts};d.timeZone=d.timeZone||l,this.dtf=Qu(n,d)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class bx{constructor(t,n,r){this.opts={style:"long",...r},!n&&bm()&&(this.rtf=Tx(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):tv(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const Lx={firstDay:1,minimalDays:4,weekend:[6,7]};class an{static fromOpts(t){return an.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,l,d=!1){const f=t||Rn.defaultLocale,p=f||(d?"en-US":xx()),_=n||Rn.defaultNumberingSystem,T=r||Rn.defaultOutputCalendar,E=nd(l)||Rn.defaultWeekSettings;return new an(p,_,T,E,f)}static resetCache(){ta=null,Xu={},ed={},td={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:l}={}){return an.create(t,n,r,l)}constructor(t,n,r,l,d){const[f,p,_]=Sx(t);this.locale=f,this.numberingSystem=n||p||null,this.outputCalendar=r||_||null,this.weekSettings=l,this.intl=wx(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=d,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ax(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:an.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,nd(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Qa(this,t,$m,()=>{const r=n?{month:t,day:"numeric"}:{month:t},l=n?"format":"standalone";return this.monthsCache[l][t]||(this.monthsCache[l][t]=Ox(d=>this.extract(d,r,"month"))),this.monthsCache[l][t]})}weekdays(t,n=!1){return Qa(this,t,Hm,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},l=n?"format":"standalone";return this.weekdaysCache[l][t]||(this.weekdaysCache[l][t]=Dx(d=>this.extract(d,r,"weekday"))),this.weekdaysCache[l][t]})}meridiems(){return Qa(this,void 0,()=>Wm,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Dt.utc(2016,11,13,9),Dt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Qa(this,t,Km,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[Dt.utc(-40,1,1),Dt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const l=this.dtFormatter(t,n),d=l.formatToParts(),f=d.find(p=>p.type.toLowerCase()===r);return f?f.value:null}numberFormatter(t={}){return new Mx(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Rx(t,this.intl,n)}relFormatter(t={}){return new bx(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Cx(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Lm()?vx(this.locale):Lx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Lu=null;class xr extends ca{static get utcInstance(){return Lu===null&&(Lu=new xr(0)),Lu}static instance(t){return t===0?xr.utcInstance:new xr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new xr(vc(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${oa(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${oa(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return oa(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Ix extends ca{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function To(e,t){if(It(e)||e===null)return t;if(e instanceof ca)return e;if(Hx(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Ec.instance:n==="utc"||n==="gmt"?xr.utcInstance:xr.parseSpecifier(n)||no.create(e)}else return vo(e)?xr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new Ix(e)}const Ad={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Dg={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},kx=Ad.hanidec.replace(/[\[|\]]/g,"").split("");function Px(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(Ad.hanidec)!==-1)t+=kx.indexOf(e[n]);else for(const l in Dg){const[d,f]=Dg[l];r>=d&&r<=f&&(t+=r-d)}}return parseInt(t,10)}else return t}let Vs={};function $x(){Vs={}}function fi({numberingSystem:e},t=""){const n=e||"latn";return Vs[n]||(Vs[n]={}),Vs[n][t]||(Vs[n][t]=new RegExp(`${Ad[n]}${t}`)),Vs[n][t]}let Ag=()=>Date.now(),Mg="system",Rg=null,bg=null,Lg=null,Ig=60,kg,Pg=null;class Rn{static get now(){return Ag}static set now(t){Ag=t}static set defaultZone(t){Mg=t}static get defaultZone(){return To(Mg,Ec.instance)}static get defaultLocale(){return Rg}static set defaultLocale(t){Rg=t}static get defaultNumberingSystem(){return bg}static set defaultNumberingSystem(t){bg=t}static get defaultOutputCalendar(){return Lg}static set defaultOutputCalendar(t){Lg=t}static get defaultWeekSettings(){return Pg}static set defaultWeekSettings(t){Pg=nd(t)}static get twoDigitCutoffYear(){return Ig}static set twoDigitCutoffYear(t){Ig=t%100}static get throwOnInvalid(){return kg}static set throwOnInvalid(t){kg=t}static resetCaches(){an.resetCache(),no.resetCache(),Dt.resetCache(),$x()}}class gi{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const wm=[0,31,59,90,120,151,181,212,243,273,304,334],Om=[0,31,60,91,121,152,182,213,244,274,305,335];function Qr(e,t){return new gi("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Md(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const l=r.getUTCDay();return l===0?7:l}function Dm(e,t,n){return n+(ua(e)?Om:wm)[t-1]}function Am(e,t){const n=ua(e)?Om:wm,r=n.findIndex(d=>d<t),l=t-n[r];return{month:r+1,day:l}}function Rd(e,t){return(e-t+7)%7+1}function gc(e,t=4,n=1){const{year:r,month:l,day:d}=e,f=Dm(r,l,d),p=Rd(Md(r,l,d),n);let _=Math.floor((f-p+14-t)/7),T;return _<1?(T=r-1,_=aa(T,t,n)):_>aa(r,t,n)?(T=r+1,_=1):T=r,{weekYear:T,weekNumber:_,weekday:p,...Sc(e)}}function $g(e,t=4,n=1){const{weekYear:r,weekNumber:l,weekday:d}=e,f=Rd(Md(r,1,t),n),p=Zs(r);let _=l*7+d-f-7+t,T;_<1?(T=r-1,_+=Zs(T)):_>p?(T=r+1,_-=Zs(r)):T=r;const{month:E,day:S}=Am(T,_);return{year:T,month:E,day:S,...Sc(e)}}function Iu(e){const{year:t,month:n,day:r}=e,l=Dm(t,n,r);return{year:t,ordinal:l,...Sc(e)}}function Fg(e){const{year:t,ordinal:n}=e,{month:r,day:l}=Am(t,n);return{year:t,month:r,day:l,...Sc(e)}}function Bg(e,t){if(!It(e.localWeekday)||!It(e.localWeekNumber)||!It(e.localWeekYear)){if(!It(e.weekday)||!It(e.weekNumber)||!It(e.weekYear))throw new qs("Cannot mix locale-based week fields with ISO-based week fields");return It(e.localWeekday)||(e.weekday=e.localWeekday),It(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),It(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Fx(e,t=4,n=1){const r=Tc(e.weekYear),l=ei(e.weekNumber,1,aa(e.weekYear,t,n)),d=ei(e.weekday,1,7);return r?l?d?!1:Qr("weekday",e.weekday):Qr("week",e.weekNumber):Qr("weekYear",e.weekYear)}function Bx(e){const t=Tc(e.year),n=ei(e.ordinal,1,Zs(e.year));return t?n?!1:Qr("ordinal",e.ordinal):Qr("year",e.year)}function Mm(e){const t=Tc(e.year),n=ei(e.month,1,12),r=ei(e.day,1,pc(e.year,e.month));return t?n?r?!1:Qr("day",e.day):Qr("month",e.month):Qr("year",e.year)}function Rm(e){const{hour:t,minute:n,second:r,millisecond:l}=e,d=ei(t,0,23)||t===24&&n===0&&r===0&&l===0,f=ei(n,0,59),p=ei(r,0,59),_=ei(l,0,999);return d?f?p?_?!1:Qr("millisecond",l):Qr("second",r):Qr("minute",n):Qr("hour",t)}function It(e){return typeof e>"u"}function vo(e){return typeof e=="number"}function Tc(e){return typeof e=="number"&&e%1===0}function Hx(e){return typeof e=="string"}function Wx(e){return Object.prototype.toString.call(e)==="[object Date]"}function bm(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Lm(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Kx(e){return Array.isArray(e)?e:[e]}function Hg(e,t,n){if(e.length!==0)return e.reduce((r,l)=>{const d=[t(l),l];return r&&n(r[0],d[0])===r[0]?r:d},null)[1]}function zx(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function el(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function nd(e){if(e==null)return null;if(typeof e!="object")throw new _r("Week settings must be an object");if(!ei(e.firstDay,1,7)||!ei(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!ei(t,1,7)))throw new _r("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function ei(e,t,n){return Tc(e)&&e>=t&&e<=n}function Ux(e,t){return e-t*Math.floor(e/t)}function zn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Eo(e){if(!(It(e)||e===null||e===""))return parseInt(e,10)}function es(e){if(!(It(e)||e===null||e===""))return parseFloat(e)}function bd(e){if(!(It(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Ld(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function ua(e){return e%4===0&&(e%100!==0||e%400===0)}function Zs(e){return ua(e)?366:365}function pc(e,t){const n=Ux(t-1,12)+1,r=e+(t-n)/12;return n===2?ua(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function xc(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Wg(e,t,n){return-Rd(Md(e,1,t),n)+t-1}function aa(e,t=4,n=1){const r=Wg(e,t,n),l=Wg(e+1,t,n);return(Zs(e)-r+l)/7}function rd(e){return e>99?e:e>Rn.twoDigitCutoffYear?1900+e:2e3+e}function Im(e,t,n,r=null){const l=new Date(e),d={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(d.timeZone=r);const f={timeZoneName:t,...d},p=new Intl.DateTimeFormat(n,f).formatToParts(l).find(_=>_.type.toLowerCase()==="timezonename");return p?p.value:null}function vc(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,l=n<0||Object.is(n,-0)?-r:r;return n*60+l}function km(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new _r(`Invalid unit value ${e}`);return t}function mc(e,t){const n={};for(const r in e)if(el(e,r)){const l=e[r];if(l==null)continue;n[t(r)]=km(l)}return n}function oa(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),l=e>=0?"+":"-";switch(t){case"short":return`${l}${zn(n,2)}:${zn(r,2)}`;case"narrow":return`${l}${n}${r>0?`:${r}`:""}`;case"techie":return`${l}${zn(n,2)}${zn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Sc(e){return zx(e,["hour","minute","second","millisecond"])}const Gx=["January","February","March","April","May","June","July","August","September","October","November","December"],Pm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Yx=["J","F","M","A","M","J","J","A","S","O","N","D"];function $m(e){switch(e){case"narrow":return[...Yx];case"short":return[...Pm];case"long":return[...Gx];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Fm=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Bm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],jx=["M","T","W","T","F","S","S"];function Hm(e){switch(e){case"narrow":return[...jx];case"short":return[...Bm];case"long":return[...Fm];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Wm=["AM","PM"],Vx=["Before Christ","Anno Domini"],qx=["BC","AD"],Zx=["B","A"];function Km(e){switch(e){case"narrow":return[...Zx];case"short":return[...qx];case"long":return[...Vx];default:return null}}function Jx(e){return Wm[e.hour<12?0:1]}function Xx(e,t){return Hm(t)[e.weekday-1]}function Qx(e,t){return $m(t)[e.month-1]}function ev(e,t){return Km(t)[e.year<0?0:1]}function tv(e,t,n="always",r=!1){const l={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},d=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&d){const S=e==="days";switch(t){case 1:return S?"tomorrow":`next ${l[e][0]}`;case-1:return S?"yesterday":`last ${l[e][0]}`;case 0:return S?"today":`this ${l[e][0]}`}}const f=Object.is(t,-0)||t<0,p=Math.abs(t),_=p===1,T=l[e],E=r?_?T[1]:T[2]||T[1]:_?l[e][0]:e;return f?`${p} ${E} ago`:`in ${p} ${E}`}function Kg(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const nv={D:hc,DD:lm,DDD:am,DDDD:cm,t:um,tt:dm,ttt:fm,tttt:hm,T:gm,TT:pm,TTT:mm,TTTT:_m,f:ym,ff:Cm,fff:Tm,ffff:vm,F:Nm,FF:Em,FFF:xm,FFFF:Sm};class yr{static create(t,n={}){return new yr(t,n)}static parseFormat(t){let n=null,r="",l=!1;const d=[];for(let f=0;f<t.length;f++){const p=t.charAt(f);p==="'"?(r.length>0&&d.push({literal:l||/^\s+$/.test(r),val:r}),n=null,r="",l=!l):l||p===n?r+=p:(r.length>0&&d.push({literal:/^\s+$/.test(r),val:r}),r=p,n=p)}return r.length>0&&d.push({literal:l||/^\s+$/.test(r),val:r}),d}static macroTokenToFormatOpts(t){return nv[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return zn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",l=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",d=(M,m)=>this.loc.extract(t,M,m),f=M=>t.isOffsetFixed&&t.offset===0&&M.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,M.format):"",p=()=>r?Jx(t):d({hour:"numeric",hourCycle:"h12"},"dayperiod"),_=(M,m)=>r?Qx(t,M):d(m?{month:M}:{month:M,day:"numeric"},"month"),T=(M,m)=>r?Xx(t,M):d(m?{weekday:M}:{weekday:M,month:"long",day:"numeric"},"weekday"),E=M=>{const m=yr.macroTokenToFormatOpts(M);return m?this.formatWithSystemDefault(t,m):M},S=M=>r?ev(t,M):d({era:M},"era"),w=M=>{switch(M){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return f({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return f({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return f({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return p();case"d":return l?d({day:"numeric"},"day"):this.num(t.day);case"dd":return l?d({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return T("short",!0);case"cccc":return T("long",!0);case"ccccc":return T("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return T("short",!1);case"EEEE":return T("long",!1);case"EEEEE":return T("narrow",!1);case"L":return l?d({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return l?d({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return _("short",!0);case"LLLL":return _("long",!0);case"LLLLL":return _("narrow",!0);case"M":return l?d({month:"numeric"},"month"):this.num(t.month);case"MM":return l?d({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return _("short",!1);case"MMMM":return _("long",!1);case"MMMMM":return _("narrow",!1);case"y":return l?d({year:"numeric"},"year"):this.num(t.year);case"yy":return l?d({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return l?d({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return l?d({year:"numeric"},"year"):this.num(t.year,6);case"G":return S("short");case"GG":return S("long");case"GGGGG":return S("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return E(M)}};return Kg(yr.parseFormat(n),w)}formatDurationFromString(t,n){const r=_=>{switch(_[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},l=_=>T=>{const E=r(T);return E?this.num(_.get(E),T.length):T},d=yr.parseFormat(n),f=d.reduce((_,{literal:T,val:E})=>T?_:_.concat(E),[]),p=t.shiftTo(...f.map(r).filter(_=>_));return Kg(d,l(p))}}const zm=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ll(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function al(...e){return t=>e.reduce(([n,r,l],d)=>{const[f,p,_]=d(t,l);return[{...n,...f},p||r,_]},[{},null,1]).slice(0,2)}function cl(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const l=n.exec(e);if(l)return r(l)}return[null,null]}function Um(...e){return(t,n)=>{const r={};let l;for(l=0;l<e.length;l++)r[e[l]]=Eo(t[n+l]);return[r,null,n+l]}}const Gm=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,rv=`(?:${Gm.source}?(?:\\[(${zm.source})\\])?)?`,Id=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ym=RegExp(`${Id.source}${rv}`),kd=RegExp(`(?:T${Ym.source})?`),iv=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ov=/(\d{4})-?W(\d\d)(?:-?(\d))?/,sv=/(\d{4})-?(\d{3})/,lv=Um("weekYear","weekNumber","weekDay"),av=Um("year","ordinal"),cv=/(\d{4})-(\d\d)-(\d\d)/,jm=RegExp(`${Id.source} ?(?:${Gm.source}|(${zm.source}))?`),uv=RegExp(`(?: ${jm.source})?`);function Js(e,t,n){const r=e[t];return It(r)?n:Eo(r)}function dv(e,t){return[{year:Js(e,t),month:Js(e,t+1,1),day:Js(e,t+2,1)},null,t+3]}function ul(e,t){return[{hours:Js(e,t,0),minutes:Js(e,t+1,0),seconds:Js(e,t+2,0),milliseconds:bd(e[t+3])},null,t+4]}function da(e,t){const n=!e[t]&&!e[t+1],r=vc(e[t+1],e[t+2]),l=n?null:xr.instance(r);return[{},l,t+3]}function fa(e,t){const n=e[t]?no.create(e[t]):null;return[{},n,t+1]}const fv=RegExp(`^T?${Id.source}$`),hv=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function gv(e){const[t,n,r,l,d,f,p,_,T]=e,E=t[0]==="-",S=_&&_[0]==="-",w=(M,m=!1)=>M!==void 0&&(m||M&&E)?-M:M;return[{years:w(es(n)),months:w(es(r)),weeks:w(es(l)),days:w(es(d)),hours:w(es(f)),minutes:w(es(p)),seconds:w(es(_),_==="-0"),milliseconds:w(bd(T),S)}]}const pv={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Pd(e,t,n,r,l,d,f){const p={year:t.length===2?rd(Eo(t)):Eo(t),month:Pm.indexOf(n)+1,day:Eo(r),hour:Eo(l),minute:Eo(d)};return f&&(p.second=Eo(f)),e&&(p.weekday=e.length>3?Fm.indexOf(e)+1:Bm.indexOf(e)+1),p}const mv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function _v(e){const[,t,n,r,l,d,f,p,_,T,E,S]=e,w=Pd(t,l,r,n,d,f,p);let M;return _?M=pv[_]:T?M=0:M=vc(E,S),[w,new xr(M)]}function yv(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Nv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Cv=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ev=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function zg(e){const[,t,n,r,l,d,f,p]=e;return[Pd(t,l,r,n,d,f,p),xr.utcInstance]}function Tv(e){const[,t,n,r,l,d,f,p]=e;return[Pd(t,p,n,r,l,d,f),xr.utcInstance]}const xv=ll(iv,kd),vv=ll(ov,kd),Sv=ll(sv,kd),wv=ll(Ym),Vm=al(dv,ul,da,fa),Ov=al(lv,ul,da,fa),Dv=al(av,ul,da,fa),Av=al(ul,da,fa);function Mv(e){return cl(e,[xv,Vm],[vv,Ov],[Sv,Dv],[wv,Av])}function Rv(e){return cl(yv(e),[mv,_v])}function bv(e){return cl(e,[Nv,zg],[Cv,zg],[Ev,Tv])}function Lv(e){return cl(e,[hv,gv])}const Iv=al(ul);function kv(e){return cl(e,[fv,Iv])}const Pv=ll(cv,uv),$v=ll(jm),Fv=al(ul,da,fa);function Bv(e){return cl(e,[Pv,Vm],[$v,Fv])}const Ug="Invalid Duration",qm={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Hv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...qm},Xr=146097/400,Us=146097/4800,Wv={years:{quarters:4,months:12,weeks:Xr/7,days:Xr,hours:Xr*24,minutes:Xr*24*60,seconds:Xr*24*60*60,milliseconds:Xr*24*60*60*1e3},quarters:{months:3,weeks:Xr/28,days:Xr/4,hours:Xr*24/4,minutes:Xr*24*60/4,seconds:Xr*24*60*60/4,milliseconds:Xr*24*60*60*1e3/4},months:{weeks:Us/7,days:Us,hours:Us*24,minutes:Us*24*60,seconds:Us*24*60*60,milliseconds:Us*24*60*60*1e3},...qm},ss=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Kv=ss.slice(0).reverse();function Co(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new en(r)}function Zm(e,t){let n=t.milliseconds??0;for(const r of Kv.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Gg(e,t){const n=Zm(e,t)<0?-1:1;ss.reduceRight((r,l)=>{if(It(t[l]))return r;if(r){const d=t[r]*n,f=e[l][r],p=Math.floor(d/f);t[l]+=p*n,t[r]-=p*f*n}return l},null),ss.reduce((r,l)=>{if(It(t[l]))return r;if(r){const d=t[r]%1;t[r]-=d,t[l]+=d*e[r][l]}return l},null)}function zv(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class en{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?Wv:Hv;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||an.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return en.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new _r(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new en({values:mc(t,en.normalizeUnit),loc:an.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(vo(t))return en.fromMillis(t);if(en.isDuration(t))return t;if(typeof t=="object")return en.fromObject(t);throw new _r(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Lv(t);return r?en.fromObject(r,n):en.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=kv(t);return r?en.fromObject(r,n):en.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new _r("need to specify a reason the Duration is invalid");const r=t instanceof gi?t:new gi(t,n);if(Rn.throwOnInvalid)throw new hx(r);return new en({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new sm(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?yr.create(this.loc,r).formatDurationFromString(this,t):Ug}toHuman(t={}){if(!this.isValid)return Ug;const n=ss.map(r=>{const l=this.values[r];return It(l)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(l)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Ld(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Dt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Zm(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t),r={};for(const l of ss)(el(n.values,l)||el(this.values,l))&&(r[l]=n.get(l)+this.get(l));return Co(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=km(t(this.values[r],r));return Co(this,{values:n},!0)}get(t){return this[en.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...mc(t,en.normalizeUnit)};return Co(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:l}={}){const f={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:l,conversionAccuracy:r};return Co(this,f)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Gg(this.matrix,t),Co(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=zv(this.normalize().shiftToAll().toObject());return Co(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(f=>en.normalizeUnit(f));const n={},r={},l=this.toObject();let d;for(const f of ss)if(t.indexOf(f)>=0){d=f;let p=0;for(const T in r)p+=this.matrix[T][f]*r[T],r[T]=0;vo(l[f])&&(p+=l[f]);const _=Math.trunc(p);n[f]=_,r[f]=(p*1e3-_*1e3)/1e3}else vo(l[f])&&(r[f]=l[f]);for(const f in r)r[f]!==0&&(n[d]+=f===d?r[f]:r[f]/this.matrix[d][f]);return Gg(this.matrix,n),Co(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Co(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,l){return r===void 0||r===0?l===void 0||l===0:r===l}for(const r of ss)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Gs="Invalid Interval";function Uv(e,t){return!e||!e.isValid?Mn.invalid("missing or invalid start"):!t||!t.isValid?Mn.invalid("missing or invalid end"):t<e?Mn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Mn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new _r("need to specify a reason the Interval is invalid");const r=t instanceof gi?t:new gi(t,n);if(Rn.throwOnInvalid)throw new fx(r);return new Mn({invalid:r})}static fromDateTimes(t,n){const r=Xl(t),l=Xl(n),d=Uv(r,l);return d??new Mn({start:r,end:l})}static after(t,n){const r=en.fromDurationLike(n),l=Xl(t);return Mn.fromDateTimes(l,l.plus(r))}static before(t,n){const r=en.fromDurationLike(n),l=Xl(t);return Mn.fromDateTimes(l.minus(r),l)}static fromISO(t,n){const[r,l]=(t||"").split("/",2);if(r&&l){let d,f;try{d=Dt.fromISO(r,n),f=d.isValid}catch{f=!1}let p,_;try{p=Dt.fromISO(l,n),_=p.isValid}catch{_=!1}if(f&&_)return Mn.fromDateTimes(d,p);if(f){const T=en.fromISO(l,n);if(T.isValid)return Mn.after(d,T)}else if(_){const T=en.fromISO(r,n);if(T.isValid)return Mn.before(p,T)}}return Mn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let l;return n!=null&&n.useLocaleWeeks?l=this.end.reconfigure({locale:r.locale}):l=this.end,l=l.startOf(t,n),Math.floor(l.diff(r,t).get(t))+(l.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Mn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Xl).filter(f=>this.contains(f)).sort((f,p)=>f.toMillis()-p.toMillis()),r=[];let{s:l}=this,d=0;for(;l<this.e;){const f=n[d]||this.e,p=+f>+this.e?this.e:f;r.push(Mn.fromDateTimes(l,p)),l=p,d+=1}return r}splitBy(t){const n=en.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,l=1,d;const f=[];for(;r<this.e;){const p=this.start.plus(n.mapUnits(_=>_*l));d=+p>+this.e?this.e:p,f.push(Mn.fromDateTimes(r,d)),r=d,l+=1}return f}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Mn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Mn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((l,d)=>l.s-d.s).reduce(([l,d],f)=>d?d.overlaps(f)||d.abutsStart(f)?[l,d.union(f)]:[l.concat([d]),f]:[l,f],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const l=[],d=t.map(_=>[{time:_.s,type:"s"},{time:_.e,type:"e"}]),f=Array.prototype.concat(...d),p=f.sort((_,T)=>_.time-T.time);for(const _ of p)r+=_.type==="s"?1:-1,r===1?n=_.time:(n&&+n!=+_.time&&l.push(Mn.fromDateTimes(n,_.time)),n=null);return Mn.merge(l)}difference(...t){return Mn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Gs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=hc,n={}){return this.isValid?yr.create(this.s.loc.clone(n),t).formatInterval(this):Gs}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Gs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Gs}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Gs}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Gs}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):en.invalid(this.invalidReason)}mapEndpoints(t){return Mn.fromDateTimes(t(this.s),t(this.e))}}class ec{static hasDST(t=Rn.defaultZone){const n=Dt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return no.isValidZone(t)}static normalizeZone(t){return To(t,Rn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||an.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||an.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||an.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null,outputCalendar:d="gregory"}={}){return(l||an.create(n,r,d)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null,outputCalendar:d="gregory"}={}){return(l||an.create(n,r,d)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null}={}){return(l||an.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null}={}){return(l||an.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return an.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return an.create(n,null,"gregory").eras(t)}static features(){return{relative:bm(),localeWeek:Lm()}}}function Yg(e,t){const n=l=>l.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(en.fromMillis(r).as("days"))}function Gv(e,t,n){const r=[["years",(_,T)=>T.year-_.year],["quarters",(_,T)=>T.quarter-_.quarter+(T.year-_.year)*4],["months",(_,T)=>T.month-_.month+(T.year-_.year)*12],["weeks",(_,T)=>{const E=Yg(_,T);return(E-E%7)/7}],["days",Yg]],l={},d=e;let f,p;for(const[_,T]of r)n.indexOf(_)>=0&&(f=_,l[_]=T(e,t),p=d.plus(l),p>t?(l[_]--,e=d.plus(l),e>t&&(p=e,l[_]--,e=d.plus(l))):e=p);return[e,l,p,f]}function Yv(e,t,n,r){let[l,d,f,p]=Gv(e,t,n);const _=t-l,T=n.filter(S=>["hours","minutes","seconds","milliseconds"].indexOf(S)>=0);T.length===0&&(f<t&&(f=l.plus({[p]:1})),f!==l&&(d[p]=(d[p]||0)+_/(f-l)));const E=en.fromObject(d,r);return T.length>0?en.fromMillis(_,r).shiftTo(...T).plus(E):E}const jv="missing Intl.DateTimeFormat.formatToParts support";function on(e,t=n=>n){return{regex:e,deser:([n])=>t(Px(n))}}const Vv=" ",Jm=`[ ${Vv}]`,Xm=new RegExp(Jm,"g");function qv(e){return e.replace(/\./g,"\\.?").replace(Xm,Jm)}function jg(e){return e.replace(/\./g,"").replace(Xm," ").toLowerCase()}function hi(e,t){return e===null?null:{regex:RegExp(e.map(qv).join("|")),deser:([n])=>e.findIndex(r=>jg(n)===jg(r))+t}}function Vg(e,t){return{regex:e,deser:([,n,r])=>vc(n,r),groups:t}}function tc(e){return{regex:e,deser:([t])=>t}}function Zv(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Jv(e,t){const n=fi(t),r=fi(t,"{2}"),l=fi(t,"{3}"),d=fi(t,"{4}"),f=fi(t,"{6}"),p=fi(t,"{1,2}"),_=fi(t,"{1,3}"),T=fi(t,"{1,6}"),E=fi(t,"{1,9}"),S=fi(t,"{2,4}"),w=fi(t,"{4,6}"),M=k=>({regex:RegExp(Zv(k.val)),deser:([G])=>G,literal:!0}),v=(k=>{if(e.literal)return M(k);switch(k.val){case"G":return hi(t.eras("short"),0);case"GG":return hi(t.eras("long"),0);case"y":return on(T);case"yy":return on(S,rd);case"yyyy":return on(d);case"yyyyy":return on(w);case"yyyyyy":return on(f);case"M":return on(p);case"MM":return on(r);case"MMM":return hi(t.months("short",!0),1);case"MMMM":return hi(t.months("long",!0),1);case"L":return on(p);case"LL":return on(r);case"LLL":return hi(t.months("short",!1),1);case"LLLL":return hi(t.months("long",!1),1);case"d":return on(p);case"dd":return on(r);case"o":return on(_);case"ooo":return on(l);case"HH":return on(r);case"H":return on(p);case"hh":return on(r);case"h":return on(p);case"mm":return on(r);case"m":return on(p);case"q":return on(p);case"qq":return on(r);case"s":return on(p);case"ss":return on(r);case"S":return on(_);case"SSS":return on(l);case"u":return tc(E);case"uu":return tc(p);case"uuu":return on(n);case"a":return hi(t.meridiems(),0);case"kkkk":return on(d);case"kk":return on(S,rd);case"W":return on(p);case"WW":return on(r);case"E":case"c":return on(n);case"EEE":return hi(t.weekdays("short",!1),1);case"EEEE":return hi(t.weekdays("long",!1),1);case"ccc":return hi(t.weekdays("short",!0),1);case"cccc":return hi(t.weekdays("long",!0),1);case"Z":case"ZZ":return Vg(new RegExp(`([+-]${p.source})(?::(${r.source}))?`),2);case"ZZZ":return Vg(new RegExp(`([+-]${p.source})(${r.source})?`),2);case"z":return tc(/[a-z_+-/]{1,256}?/i);case" ":return tc(/[^\S\n\r]/);default:return M(k)}})(e)||{invalidReason:jv};return v.token=e,v}const Xv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Qv(e,t,n){const{type:r,value:l}=e;if(r==="literal"){const _=/^\s+$/.test(l);return{literal:!_,val:_?" ":l}}const d=t[r];let f=r;r==="hour"&&(t.hour12!=null?f=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?f="hour12":f="hour24":f=n.hour12?"hour12":"hour24");let p=Xv[f];if(typeof p=="object"&&(p=p[d]),p)return{literal:!1,val:p}}function eS(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function tS(e,t,n){const r=e.match(t);if(r){const l={};let d=1;for(const f in n)if(el(n,f)){const p=n[f],_=p.groups?p.groups+1:1;!p.literal&&p.token&&(l[p.token.val[0]]=p.deser(r.slice(d,d+_))),d+=_}return[r,l]}else return[r,{}]}function nS(e){const t=d=>{switch(d){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return It(e.z)||(n=no.create(e.z)),It(e.Z)||(n||(n=new xr(e.Z)),r=e.Z),It(e.q)||(e.M=(e.q-1)*3+1),It(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),It(e.u)||(e.S=bd(e.u)),[Object.keys(e).reduce((d,f)=>{const p=t(f);return p&&(d[p]=e[f]),d},{}),n,r]}let ku=null;function rS(){return ku||(ku=Dt.fromMillis(1555555555555)),ku}function iS(e,t){if(e.literal)return e;const n=yr.macroTokenToFormatOpts(e.val),r=n_(n,t);return r==null||r.includes(void 0)?e:r}function Qm(e,t){return Array.prototype.concat(...e.map(n=>iS(n,t)))}class e_{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=Qm(yr.parseFormat(n),t),this.units=this.tokens.map(r=>Jv(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,l]=eS(this.units);this.regex=RegExp(r,"i"),this.handlers=l}}explainFromTokens(t){if(this.isValid){const[n,r]=tS(t,this.regex,this.handlers),[l,d,f]=r?nS(r):[null,null,void 0];if(el(r,"a")&&el(r,"H"))throw new qs("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:l,zone:d,specificOffset:f}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function t_(e,t,n){return new e_(e,n).explainFromTokens(t)}function oS(e,t,n){const{result:r,zone:l,specificOffset:d,invalidReason:f}=t_(e,t,n);return[r,l,d,f]}function n_(e,t){if(!e)return null;const r=yr.create(t,e).dtFormatter(rS()),l=r.formatToParts(),d=r.resolvedOptions();return l.map(f=>Qv(f,e,d))}const Pu="Invalid DateTime",qg=864e13;function na(e){return new gi("unsupported zone",`the zone "${e.name}" is not supported`)}function $u(e){return e.weekData===null&&(e.weekData=gc(e.c)),e.weekData}function Fu(e){return e.localWeekData===null&&(e.localWeekData=gc(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ts(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Dt({...n,...t,old:n})}function r_(e,t,n){let r=e-t*60*1e3;const l=n.offset(r);if(t===l)return[r,t];r-=(l-t)*60*1e3;const d=n.offset(r);return l===d?[r,l]:[e-Math.min(l,d)*60*1e3,Math.max(l,d)]}function nc(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function sc(e,t,n){return r_(xc(e),t,n)}function Zg(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),l=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,d={...e.c,year:r,month:l,day:Math.min(e.c.day,pc(r,l))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},f=en.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),p=xc(d);let[_,T]=r_(p,n,e.zone);return f!==0&&(_+=f,T=e.zone.offset(_)),{ts:_,o:T}}function Ys(e,t,n,r,l,d){const{setZone:f,zone:p}=n;if(e&&Object.keys(e).length!==0||t){const _=t||p,T=Dt.fromObject(e,{...n,zone:_,specificOffset:d});return f?T:T.setZone(p)}else return Dt.invalid(new gi("unparsable",`the input "${l}" can't be parsed as ${r}`))}function rc(e,t,n=!0){return e.isValid?yr.create(an.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Bu(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=zn(e.c.year,n?6:4),t?(r+="-",r+=zn(e.c.month),r+="-",r+=zn(e.c.day)):(r+=zn(e.c.month),r+=zn(e.c.day)),r}function Jg(e,t,n,r,l,d){let f=zn(e.c.hour);return t?(f+=":",f+=zn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=":")):f+=zn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=zn(e.c.second),(e.c.millisecond!==0||!r)&&(f+=".",f+=zn(e.c.millisecond,3))),l&&(e.isOffsetFixed&&e.offset===0&&!d?f+="Z":e.o<0?(f+="-",f+=zn(Math.trunc(-e.o/60)),f+=":",f+=zn(Math.trunc(-e.o%60))):(f+="+",f+=zn(Math.trunc(e.o/60)),f+=":",f+=zn(Math.trunc(e.o%60)))),d&&(f+="["+e.zone.ianaName+"]"),f}const i_={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},sS={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},lS={ordinal:1,hour:0,minute:0,second:0,millisecond:0},o_=["year","month","day","hour","minute","second","millisecond"],aS=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],cS=["year","ordinal","hour","minute","second","millisecond"];function uS(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new sm(e);return t}function Xg(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return uS(e)}}function dS(e){return ac[e]||(lc===void 0&&(lc=Rn.now()),ac[e]=e.offset(lc)),ac[e]}function Qg(e,t){const n=To(t.zone,Rn.defaultZone);if(!n.isValid)return Dt.invalid(na(n));const r=an.fromObject(t);let l,d;if(It(e.year))l=Rn.now();else{for(const _ of o_)It(e[_])&&(e[_]=i_[_]);const f=Mm(e)||Rm(e);if(f)return Dt.invalid(f);const p=dS(n);[l,d]=sc(e,p,n)}return new Dt({ts:l,zone:n,loc:r,o:d})}function ep(e,t,n){const r=It(n.round)?!0:n.round,l=(f,p)=>(f=Ld(f,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(f,p)),d=f=>n.calendary?t.hasSame(e,f)?0:t.startOf(f).diff(e.startOf(f),f).get(f):t.diff(e,f).get(f);if(n.unit)return l(d(n.unit),n.unit);for(const f of n.units){const p=d(f);if(Math.abs(p)>=1)return l(p,f)}return l(e>t?-0:0,n.units[n.units.length-1])}function tp(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let lc,ac={};class Dt{constructor(t){const n=t.zone||Rn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new gi("invalid input"):null)||(n.isValid?null:na(n));this.ts=It(t.ts)?Rn.now():t.ts;let l=null,d=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[l,d]=[t.old.c,t.old.o];else{const p=vo(t.o)&&!t.old?t.o:n.offset(this.ts);l=nc(this.ts,p),r=Number.isNaN(l.year)?new gi("invalid input"):null,l=r?null:l,d=r?null:p}this._zone=n,this.loc=t.loc||an.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=l,this.o=d,this.isLuxonDateTime=!0}static now(){return new Dt({})}static local(){const[t,n]=tp(arguments),[r,l,d,f,p,_,T]=n;return Qg({year:r,month:l,day:d,hour:f,minute:p,second:_,millisecond:T},t)}static utc(){const[t,n]=tp(arguments),[r,l,d,f,p,_,T]=n;return t.zone=xr.utcInstance,Qg({year:r,month:l,day:d,hour:f,minute:p,second:_,millisecond:T},t)}static fromJSDate(t,n={}){const r=Wx(t)?t.valueOf():NaN;if(Number.isNaN(r))return Dt.invalid("invalid input");const l=To(n.zone,Rn.defaultZone);return l.isValid?new Dt({ts:r,zone:l,loc:an.fromObject(n)}):Dt.invalid(na(l))}static fromMillis(t,n={}){if(vo(t))return t<-qg||t>qg?Dt.invalid("Timestamp out of range"):new Dt({ts:t,zone:To(n.zone,Rn.defaultZone),loc:an.fromObject(n)});throw new _r(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(vo(t))return new Dt({ts:t*1e3,zone:To(n.zone,Rn.defaultZone),loc:an.fromObject(n)});throw new _r("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=To(n.zone,Rn.defaultZone);if(!r.isValid)return Dt.invalid(na(r));const l=an.fromObject(n),d=mc(t,Xg),{minDaysInFirstWeek:f,startOfWeek:p}=Bg(d,l),_=Rn.now(),T=It(n.specificOffset)?r.offset(_):n.specificOffset,E=!It(d.ordinal),S=!It(d.year),w=!It(d.month)||!It(d.day),M=S||w,m=d.weekYear||d.weekNumber;if((M||E)&&m)throw new qs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&E)throw new qs("Can't mix ordinal dates with month/day");const v=m||d.weekday&&!M;let k,G,I=nc(_,T);v?(k=aS,G=sS,I=gc(I,f,p)):E?(k=cS,G=lS,I=Iu(I)):(k=o_,G=i_);let P=!1;for(const z of k){const q=d[z];It(q)?P?d[z]=G[z]:d[z]=I[z]:P=!0}const H=v?Fx(d,f,p):E?Bx(d):Mm(d),j=H||Rm(d);if(j)return Dt.invalid(j);const re=v?$g(d,f,p):E?Fg(d):d,[te,ce]=sc(re,T,r),V=new Dt({ts:te,zone:r,o:ce,loc:l});return d.weekday&&M&&t.weekday!==V.weekday?Dt.invalid("mismatched weekday",`you can't specify both a weekday of ${d.weekday} and a date of ${V.toISO()}`):V.isValid?V:Dt.invalid(V.invalid)}static fromISO(t,n={}){const[r,l]=Mv(t);return Ys(r,l,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,l]=Rv(t);return Ys(r,l,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,l]=bv(t);return Ys(r,l,n,"HTTP",n)}static fromFormat(t,n,r={}){if(It(t)||It(n))throw new _r("fromFormat requires an input string and a format");const{locale:l=null,numberingSystem:d=null}=r,f=an.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0}),[p,_,T,E]=oS(f,t,n);return E?Dt.invalid(E):Ys(p,_,r,`format ${n}`,t,T)}static fromString(t,n,r={}){return Dt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,l]=Bv(t);return Ys(r,l,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new _r("need to specify a reason the DateTime is invalid");const r=t instanceof gi?t:new gi(t,n);if(Rn.throwOnInvalid)throw new dx(r);return new Dt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=n_(t,an.fromObject(n));return r?r.map(l=>l?l.val:null).join(""):null}static expandFormat(t,n={}){return Qm(yr.parseFormat(t),an.fromObject(n)).map(l=>l.val).join("")}static resetCache(){lc=void 0,ac={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?$u(this).weekYear:NaN}get weekNumber(){return this.isValid?$u(this).weekNumber:NaN}get weekday(){return this.isValid?$u(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Fu(this).weekday:NaN}get localWeekNumber(){return this.isValid?Fu(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Fu(this).weekYear:NaN}get ordinal(){return this.isValid?Iu(this.c).ordinal:NaN}get monthShort(){return this.isValid?ec.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ec.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ec.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ec.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=xc(this.c),l=this.zone.offset(r-t),d=this.zone.offset(r+t),f=this.zone.offset(r-l*n),p=this.zone.offset(r-d*n);if(f===p)return[this];const _=r-f*n,T=r-p*n,E=nc(_,f),S=nc(T,p);return E.hour===S.hour&&E.minute===S.minute&&E.second===S.second&&E.millisecond===S.millisecond?[ts(this,{ts:_}),ts(this,{ts:T})]:[this]}get isInLeapYear(){return ua(this.year)}get daysInMonth(){return pc(this.year,this.month)}get daysInYear(){return this.isValid?Zs(this.year):NaN}get weeksInWeekYear(){return this.isValid?aa(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?aa(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:l}=yr.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:l}}toUTC(t=0,n={}){return this.setZone(xr.instance(t),n)}toLocal(){return this.setZone(Rn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=To(t,Rn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let l=this.ts;if(n||r){const d=t.offset(this.ts),f=this.toObject();[l]=sc(f,d,t)}return ts(this,{ts:l,zone:t})}else return Dt.invalid(na(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const l=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return ts(this,{loc:l})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=mc(t,Xg),{minDaysInFirstWeek:r,startOfWeek:l}=Bg(n,this.loc),d=!It(n.weekYear)||!It(n.weekNumber)||!It(n.weekday),f=!It(n.ordinal),p=!It(n.year),_=!It(n.month)||!It(n.day),T=p||_,E=n.weekYear||n.weekNumber;if((T||f)&&E)throw new qs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(_&&f)throw new qs("Can't mix ordinal dates with month/day");let S;d?S=$g({...gc(this.c,r,l),...n},r,l):It(n.ordinal)?(S={...this.toObject(),...n},It(n.day)&&(S.day=Math.min(pc(S.year,S.month),S.day))):S=Fg({...Iu(this.c),...n});const[w,M]=sc(S,this.o,this.zone);return ts(this,{ts:w,o:M})}plus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t);return ts(this,Zg(this,n))}minus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t).negate();return ts(this,Zg(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},l=en.normalizeUnit(t);switch(l){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(l==="weeks")if(n){const d=this.loc.getStartOfWeek(),{weekday:f}=this;f<d&&(r.weekNumber=this.weekNumber-1),r.weekday=d}else r.weekday=1;if(l==="quarters"){const d=Math.ceil(this.month/3);r.month=(d-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?yr.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Pu}toLocaleString(t=hc,n={}){return this.isValid?yr.create(this.loc.clone(n),t).formatDateTime(this):Pu}toLocaleParts(t={}){return this.isValid?yr.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:l=!0,extendedZone:d=!1}={}){if(!this.isValid)return null;const f=t==="extended";let p=Bu(this,f);return p+="T",p+=Jg(this,f,n,r,l,d),p}toISODate({format:t="extended"}={}){return this.isValid?Bu(this,t==="extended"):null}toISOWeekDate(){return rc(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:l=!1,extendedZone:d=!1,format:f="extended"}={}){return this.isValid?(l?"T":"")+Jg(this,f==="extended",n,t,r,d):null}toRFC2822(){return rc(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rc(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Bu(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let l="HH:mm:ss.SSS";return(n||t)&&(r&&(l+=" "),n?l+="z":t&&(l+="ZZ")),rc(this,l,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Pu}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return en.invalid("created by diffing an invalid DateTime");const l={locale:this.locale,numberingSystem:this.numberingSystem,...r},d=Kx(n).map(en.normalizeUnit),f=t.valueOf()>this.valueOf(),p=f?this:t,_=f?t:this,T=Yv(p,_,d,l);return f?T.negate():T}diffNow(t="milliseconds",n={}){return this.diff(Dt.now(),t,n)}until(t){return this.isValid?Mn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const l=t.valueOf(),d=this.setZone(t.zone,{keepLocalTime:!0});return d.startOf(n,r)<=l&&l<=d.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Dt.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let l=["years","months","days","hours","minutes","seconds"],d=t.unit;return Array.isArray(t.unit)&&(l=t.unit,d=void 0),ep(n,this.plus(r),{...t,numeric:"always",units:l,unit:d})}toRelativeCalendar(t={}){return this.isValid?ep(t.base||Dt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Dt.isDateTime))throw new _r("min requires all arguments be DateTimes");return Hg(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(Dt.isDateTime))throw new _r("max requires all arguments be DateTimes");return Hg(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:l=null,numberingSystem:d=null}=r,f=an.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0});return t_(f,t,n)}static fromStringExplain(t,n,r={}){return Dt.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:l=null}=n,d=an.fromOpts({locale:r,numberingSystem:l,defaultToEN:!0});return new e_(d,t)}static fromFormatParser(t,n,r={}){if(It(t)||It(n))throw new _r("fromFormatParser requires an input string and a format parser");const{locale:l=null,numberingSystem:d=null}=r,f=an.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0});if(!f.equals(n.locale))throw new _r(`fromFormatParser called with a locale of ${f}, but the format parser was created for ${n.locale}`);const{result:p,zone:_,specificOffset:T,invalidReason:E}=n.explainFromTokens(t);return E?Dt.invalid(E):Ys(p,_,r,`format ${n.format}`,t,T)}static get DATE_SHORT(){return hc}static get DATE_MED(){return lm}static get DATE_MED_WITH_WEEKDAY(){return gx}static get DATE_FULL(){return am}static get DATE_HUGE(){return cm}static get TIME_SIMPLE(){return um}static get TIME_WITH_SECONDS(){return dm}static get TIME_WITH_SHORT_OFFSET(){return fm}static get TIME_WITH_LONG_OFFSET(){return hm}static get TIME_24_SIMPLE(){return gm}static get TIME_24_WITH_SECONDS(){return pm}static get TIME_24_WITH_SHORT_OFFSET(){return mm}static get TIME_24_WITH_LONG_OFFSET(){return _m}static get DATETIME_SHORT(){return ym}static get DATETIME_SHORT_WITH_SECONDS(){return Nm}static get DATETIME_MED(){return Cm}static get DATETIME_MED_WITH_SECONDS(){return Em}static get DATETIME_MED_WITH_WEEKDAY(){return px}static get DATETIME_FULL(){return Tm}static get DATETIME_FULL_WITH_SECONDS(){return xm}static get DATETIME_HUGE(){return vm}static get DATETIME_HUGE_WITH_SECONDS(){return Sm}}function Xl(e){if(Dt.isDateTime(e))return e;if(e&&e.valueOf&&vo(e.valueOf()))return Dt.fromJSDate(e);if(e&&typeof e=="object")return Dt.fromObject(e);throw new _r(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var sn=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(sn||{});function $d(e){const t={1:sn.Monday,2:sn.Tuesday,3:sn.Wednesday,4:sn.Thursday,5:sn.Friday,6:sn.Saturday,7:sn.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function Di(e){return{[sn.Monday]:"Monday",[sn.Tuesday]:"Tuesday",[sn.Wednesday]:"Wednesday",[sn.Thursday]:"Thursday",[sn.Friday]:"Friday",[sn.Saturday]:"Saturday",[sn.Sunday]:"Sunday"}[e]}class np{constructor(t,n,r){Ie(this,"end");Ie(this,"start");this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(_=>{if(_.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[l,d]=n.start.split(":"),[f,p]=n.end.split(":");this.end=this.end.set({hour:Number(f),minute:Number(p)}),this.start=this.start.set({hour:Number(l),minute:Number(d)}),this.end<this.start&&(this.end=this.end.plus({days:1})),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r)}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r)}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class s_{constructor(t,n){Ie(this,"holidayHoursByDate");Ie(this,"hours");Ie(this,"timezone");this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;let n=t;n=n.minus({days:1});for(const r of[n,t]){const l=this.getHours(r);if(l&&!l.isClosed)for(const d of l.openIntervals||[]){const f=new np(r,d,this.timezone);if(f.contains(t))return f}}return null}getCurrentInterval(){return this.getInterval(Dt.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(d,f)=>d.start===f.start?0:d.start>f.start?1:-1,l=n.sort(r);for(const[d,f]of l.entries())if(f.contains(t)&&l.length>d+1)return l[d+1];for(const d of l)if(d.start>t)return d;return null}getIntervalsForNDays(t,n){const r=[];for(let l=0;l<t;l++){let d=n;d=d.plus({days:l});const f=this.getHours(d);f!=null&&f.openIntervals&&!f.isClosed&&r.push(...f.openIntervals.map(p=>new np(d,p,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=Di($d(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(Dt.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,l,d]=n,f=Dt.fromObject({year:Number(r),month:Number(l),day:Number(d)},{zone:this.timezone});if(t<f)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(Dt.now())}}function fS(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function hS(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function ha(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function ga(e){return!e.futureInterval}function gS(e){return ha(e)?ft.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):ga(e)?ft.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):ft.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function pS(e){return ha(e)||ga(e)?null:ft.jsx("span",{className:"HoursStatus-separator",children:" • "})}function mS(e){return ha(e)||ga(e)?null:ft.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function _S(e){if(ha(e)||ga(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return ft.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function yS(e){var r,l;if(ha(e)||ga(e))return null;const t={weekday:"long",...e.dayOptions??{}};let n="";if(e.isOpen){const d=e.currentInterval;n+=((r=d==null?void 0:d.end)==null?void 0:r.setLocale("en-US").toLocaleString(t))||""}else{const d=e.futureInterval;n+=((l=d==null?void 0:d.start)==null?void 0:l.setLocale("en-US").toLocaleString(t))||""}return ft.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",n]})}function NS(e,t){const n=e.currentTemplate||gS,r=e.separatorTemplate||pS,l=e.futureTemplate||mS,d=e.timeTemplate||_S,f=e.dayOfWeekTemplate||yS;return ft.jsxs("div",{className:Qs("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),l(e),d(e),f(e)]})}const CS=e=>{const[t,n]=rt.useState(!1),[r,l]=rt.useState(!1);rt.useEffect(()=>{l(!0)},[]);const d=e.statusTemplate||NS,f=new s_(e.hours,e.timezone),p=f.isOpenNow(),_=f.getCurrentInterval(),T=f.getNextInterval(),E=(_==null?void 0:_.end)||(T==null?void 0:T.start);if(E&&!t){n(!0);const w=E.toMillis()-Dt.now().toMillis();setTimeout(()=>n(!1),w)}const S={isOpen:p,currentInterval:_,futureInterval:T,...e};return ft.jsx(ft.Fragment,{children:r&&d(S,e)})};function ES(e,t){const n=[];return e.forEach(r=>{const l=n[n.length-1];l?hS(l.intervals,r.intervals)?(l.endDay=r.endDay,l.isToday=l.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const l=t&&Di(r.startDay)in t?t[Di(r.startDay)]||"":Di(r.startDay),d=t&&Di(r.endDay)in t?t[Di(r.endDay)]||"":Di(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${l}`:`${l} - ${d}`}})}function TS(e,t){const n=[],r=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?n.push("Closed"):r?n.push("Open 24 hours"):e.intervals.forEach(l=>{const d=l.getStartTime("en-US",t),f=l.getEndTime("en-US",t);n.push(`${d} - ${f}`)}),n}function xS(e,t,n){const r=[];for(let l=1;l<=7;l++){const d=Dt.fromObject({weekday:l}),f=$d(d);r.push({startDay:f,endDay:f,dayName:n&&Di(f).toLowerCase()in n?n[Di(f).toLowerCase()]||"":Di(f),intervals:e.filter(p=>p.start.weekday===l),isToday:t.weekday===l})}return r}const vS=e=>{const[t,n]=rt.useState(!1);rt.useEffect(()=>{n(!0)},[]);const r=new s_(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),l=Dt.now(),d=r.getIntervalsForNDays(7,l);let f=xS(d,l,e.dayOfWeekNames);function p(E){return E?{today:$d(l),monday:sn.Monday,tuesday:sn.Tuesday,wednesday:sn.Wednesday,thursday:sn.Thursday,friday:sn.Friday,saturday:sn.Saturday,sunday:sn.Sunday}[E]:sn.Sunday}let _=[sn.Sunday,sn.Monday,sn.Tuesday,sn.Wednesday,sn.Thursday,sn.Friday,sn.Saturday];const T=_.indexOf(p(e.startOfWeek));return _=fS(_,7-T),f.sort((E,S)=>_.indexOf(E.startDay)-_.indexOf(S.startDay)),e.collapseDays&&(f=ES(f,e.dayOfWeekNames)),ft.jsx(ft.Fragment,{children:t&&ft.jsx("div",{className:Qs("HoursTable",e.className),children:f.map(E=>{const w=(e.intervalStringsBuilderFn||TS)(E,e.timeOptions);return ft.jsxs("div",{className:Qs("HoursTable-row",{"is-today":E.isToday}),children:[ft.jsx("span",{className:"HoursTable-day",children:E.dayName}),ft.jsx("span",{className:"HoursTable-intervals",children:w.map((M,m)=>ft.jsx("span",{className:"HoursTable-interval",children:M},m))})]},E.dayName)})})})},SS=e=>`<script type="application/ld+json">
109
+ `}),n}const rx=(e,t)=>e(t,"i",ro(e,t)),ix=(e,t)=>e(t,"b",ro(e,t)),ox=(e,t)=>e(t,"u",ro(e,t)),sx=(e,t)=>e(t,"s",ro(e,t)),lx=(e,t)=>e(t,"sub",ro(e,t)),ax=(e,t)=>e(t,"sup",ro(e,t)),cx={emphasis:rx,strong:ix,underline:ox,strikethrough:sx,subscript:lx,superscript:ax},ux=e=>{const[t,n]=rt.useState();let r;return rt.useEffect(()=>{(async()=>{if(!r)try{r=(await Promise.resolve().then(()=>require("./index-OnXuUcWb.cjs"))).default}catch{throw new Error("Failed to import React Markdown, cannot properly render LegacyRichText.")}const d=r({children:e.markdown,remarkPlugins:[gT],remarkRehypeOptions:{handlers:cx}});n(d)})()},[e.markdown]),t||null};class us extends Error{}class dx extends us{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class fx extends us{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class hx extends us{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class qs extends us{}class sm extends us{constructor(t){super(`Invalid unit ${t}`)}}class _r extends us{}class No extends us{constructor(){super("Zone is an abstract class")}}const lt="numeric",pi="short",Gr="long",hc={year:lt,month:lt,day:lt},lm={year:lt,month:pi,day:lt},gx={year:lt,month:pi,day:lt,weekday:pi},am={year:lt,month:Gr,day:lt},cm={year:lt,month:Gr,day:lt,weekday:Gr},um={hour:lt,minute:lt},dm={hour:lt,minute:lt,second:lt},fm={hour:lt,minute:lt,second:lt,timeZoneName:pi},hm={hour:lt,minute:lt,second:lt,timeZoneName:Gr},gm={hour:lt,minute:lt,hourCycle:"h23"},pm={hour:lt,minute:lt,second:lt,hourCycle:"h23"},mm={hour:lt,minute:lt,second:lt,hourCycle:"h23",timeZoneName:pi},_m={hour:lt,minute:lt,second:lt,hourCycle:"h23",timeZoneName:Gr},ym={year:lt,month:lt,day:lt,hour:lt,minute:lt},Nm={year:lt,month:lt,day:lt,hour:lt,minute:lt,second:lt},Cm={year:lt,month:pi,day:lt,hour:lt,minute:lt},Em={year:lt,month:pi,day:lt,hour:lt,minute:lt,second:lt},px={year:lt,month:pi,day:lt,weekday:pi,hour:lt,minute:lt},Tm={year:lt,month:Gr,day:lt,hour:lt,minute:lt,timeZoneName:pi},xm={year:lt,month:Gr,day:lt,hour:lt,minute:lt,second:lt,timeZoneName:pi},vm={year:lt,month:Gr,day:lt,weekday:Gr,hour:lt,minute:lt,timeZoneName:Gr},Sm={year:lt,month:Gr,day:lt,weekday:Gr,hour:lt,minute:lt,second:lt,timeZoneName:Gr};class ca{get type(){throw new No}get name(){throw new No}get ianaName(){return this.name}get isUniversal(){throw new No}offsetName(t,n){throw new No}formatOffset(t,n){throw new No}offset(t){throw new No}equals(t){throw new No}get isValid(){throw new No}}let bu=null;class Ec extends ca{static get instance(){return bu===null&&(bu=new Ec),bu}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Im(t,n,r)}formatOffset(t,n){return oa(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let oc={};function mx(e){return oc[e]||(oc[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),oc[e]}const _x={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function yx(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,l,d,f,p,_,T,E]=r;return[f,l,d,p,_,T,E]}function Nx(e,t){const n=e.formatToParts(t),r=[];for(let l=0;l<n.length;l++){const{type:d,value:f}=n[l],p=_x[d];d==="era"?r[p]=f:It(p)||(r[p]=parseInt(f,10))}return r}let Xa={};class no extends ca{static create(t){return Xa[t]||(Xa[t]=new no(t)),Xa[t]}static resetCache(){Xa={},oc={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=no.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Im(t,n,r,this.name)}formatOffset(t,n){return oa(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=mx(this.name);let[l,d,f,p,_,T,E]=r.formatToParts?Nx(r,n):yx(r,n);p==="BC"&&(l=-Math.abs(l)+1);const w=xc({year:l,month:d,day:f,hour:_===24?0:_,minute:T,second:E,millisecond:0});let M=+n;const m=M%1e3;return M-=m>=0?m:1e3+m,(w-M)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let wg={};function Cx(e,t={}){const n=JSON.stringify([e,t]);let r=wg[n];return r||(r=new Intl.ListFormat(e,t),wg[n]=r),r}let Xu={};function Qu(e,t={}){const n=JSON.stringify([e,t]);let r=Xu[n];return r||(r=new Intl.DateTimeFormat(e,t),Xu[n]=r),r}let ed={};function Ex(e,t={}){const n=JSON.stringify([e,t]);let r=ed[n];return r||(r=new Intl.NumberFormat(e,t),ed[n]=r),r}let td={};function Tx(e,t={}){const{base:n,...r}=t,l=JSON.stringify([e,r]);let d=td[l];return d||(d=new Intl.RelativeTimeFormat(e,t),td[l]=d),d}let ta=null;function xx(){return ta||(ta=new Intl.DateTimeFormat().resolvedOptions().locale,ta)}let Og={};function vx(e){let t=Og[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Og[e]=t}return t}function Sx(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,l;try{r=Qu(e).resolvedOptions(),l=e}catch{const _=e.substring(0,n);r=Qu(_).resolvedOptions(),l=_}const{numberingSystem:d,calendar:f}=r;return[l,d,f]}}function wx(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Ox(e){const t=[];for(let n=1;n<=12;n++){const r=Dt.utc(2009,n,1);t.push(e(r))}return t}function Dx(e){const t=[];for(let n=1;n<=7;n++){const r=Dt.utc(2016,11,13+n);t.push(e(r))}return t}function Qa(e,t,n,r){const l=e.listingMode();return l==="error"?null:l==="en"?n(t):r(t)}function Ax(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Mx{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:l,floor:d,...f}=r;if(!n||Object.keys(f).length>0){const p={useGrouping:!1,...r};r.padTo>0&&(p.minimumIntegerDigits=r.padTo),this.inf=Ex(t,p)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):Ld(t,3);return zn(n,this.padTo)}}}class Rx{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let l;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const f=-1*(t.offset/60),p=f>=0?`Etc/GMT+${f}`:`Etc/GMT${f}`;t.offset!==0&&no.create(p).valid?(l=p,this.dt=t):(l="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,l=t.zone.name):(l="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const d={...this.opts};d.timeZone=d.timeZone||l,this.dtf=Qu(n,d)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class bx{constructor(t,n,r){this.opts={style:"long",...r},!n&&bm()&&(this.rtf=Tx(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):tv(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const Lx={firstDay:1,minimalDays:4,weekend:[6,7]};class an{static fromOpts(t){return an.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,l,d=!1){const f=t||Rn.defaultLocale,p=f||(d?"en-US":xx()),_=n||Rn.defaultNumberingSystem,T=r||Rn.defaultOutputCalendar,E=nd(l)||Rn.defaultWeekSettings;return new an(p,_,T,E,f)}static resetCache(){ta=null,Xu={},ed={},td={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:l}={}){return an.create(t,n,r,l)}constructor(t,n,r,l,d){const[f,p,_]=Sx(t);this.locale=f,this.numberingSystem=n||p||null,this.outputCalendar=r||_||null,this.weekSettings=l,this.intl=wx(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=d,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ax(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:an.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,nd(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return Qa(this,t,$m,()=>{const r=n?{month:t,day:"numeric"}:{month:t},l=n?"format":"standalone";return this.monthsCache[l][t]||(this.monthsCache[l][t]=Ox(d=>this.extract(d,r,"month"))),this.monthsCache[l][t]})}weekdays(t,n=!1){return Qa(this,t,Hm,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},l=n?"format":"standalone";return this.weekdaysCache[l][t]||(this.weekdaysCache[l][t]=Dx(d=>this.extract(d,r,"weekday"))),this.weekdaysCache[l][t]})}meridiems(){return Qa(this,void 0,()=>Wm,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Dt.utc(2016,11,13,9),Dt.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Qa(this,t,Km,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[Dt.utc(-40,1,1),Dt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const l=this.dtFormatter(t,n),d=l.formatToParts(),f=d.find(p=>p.type.toLowerCase()===r);return f?f.value:null}numberFormatter(t={}){return new Mx(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Rx(t,this.intl,n)}relFormatter(t={}){return new bx(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Cx(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Lm()?vx(this.locale):Lx}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Lu=null;class xr extends ca{static get utcInstance(){return Lu===null&&(Lu=new xr(0)),Lu}static instance(t){return t===0?xr.utcInstance:new xr(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new xr(vc(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${oa(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${oa(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return oa(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Ix extends ca{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function To(e,t){if(It(e)||e===null)return t;if(e instanceof ca)return e;if(Hx(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Ec.instance:n==="utc"||n==="gmt"?xr.utcInstance:xr.parseSpecifier(n)||no.create(e)}else return vo(e)?xr.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new Ix(e)}const Ad={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Dg={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},kx=Ad.hanidec.replace(/[\[|\]]/g,"").split("");function Px(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(Ad.hanidec)!==-1)t+=kx.indexOf(e[n]);else for(const l in Dg){const[d,f]=Dg[l];r>=d&&r<=f&&(t+=r-d)}}return parseInt(t,10)}else return t}let Vs={};function $x(){Vs={}}function fi({numberingSystem:e},t=""){const n=e||"latn";return Vs[n]||(Vs[n]={}),Vs[n][t]||(Vs[n][t]=new RegExp(`${Ad[n]}${t}`)),Vs[n][t]}let Ag=()=>Date.now(),Mg="system",Rg=null,bg=null,Lg=null,Ig=60,kg,Pg=null;class Rn{static get now(){return Ag}static set now(t){Ag=t}static set defaultZone(t){Mg=t}static get defaultZone(){return To(Mg,Ec.instance)}static get defaultLocale(){return Rg}static set defaultLocale(t){Rg=t}static get defaultNumberingSystem(){return bg}static set defaultNumberingSystem(t){bg=t}static get defaultOutputCalendar(){return Lg}static set defaultOutputCalendar(t){Lg=t}static get defaultWeekSettings(){return Pg}static set defaultWeekSettings(t){Pg=nd(t)}static get twoDigitCutoffYear(){return Ig}static set twoDigitCutoffYear(t){Ig=t%100}static get throwOnInvalid(){return kg}static set throwOnInvalid(t){kg=t}static resetCaches(){an.resetCache(),no.resetCache(),Dt.resetCache(),$x()}}class gi{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const wm=[0,31,59,90,120,151,181,212,243,273,304,334],Om=[0,31,60,91,121,152,182,213,244,274,305,335];function Qr(e,t){return new gi("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Md(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const l=r.getUTCDay();return l===0?7:l}function Dm(e,t,n){return n+(ua(e)?Om:wm)[t-1]}function Am(e,t){const n=ua(e)?Om:wm,r=n.findIndex(d=>d<t),l=t-n[r];return{month:r+1,day:l}}function Rd(e,t){return(e-t+7)%7+1}function gc(e,t=4,n=1){const{year:r,month:l,day:d}=e,f=Dm(r,l,d),p=Rd(Md(r,l,d),n);let _=Math.floor((f-p+14-t)/7),T;return _<1?(T=r-1,_=aa(T,t,n)):_>aa(r,t,n)?(T=r+1,_=1):T=r,{weekYear:T,weekNumber:_,weekday:p,...Sc(e)}}function $g(e,t=4,n=1){const{weekYear:r,weekNumber:l,weekday:d}=e,f=Rd(Md(r,1,t),n),p=Zs(r);let _=l*7+d-f-7+t,T;_<1?(T=r-1,_+=Zs(T)):_>p?(T=r+1,_-=Zs(r)):T=r;const{month:E,day:S}=Am(T,_);return{year:T,month:E,day:S,...Sc(e)}}function Iu(e){const{year:t,month:n,day:r}=e,l=Dm(t,n,r);return{year:t,ordinal:l,...Sc(e)}}function Fg(e){const{year:t,ordinal:n}=e,{month:r,day:l}=Am(t,n);return{year:t,month:r,day:l,...Sc(e)}}function Bg(e,t){if(!It(e.localWeekday)||!It(e.localWeekNumber)||!It(e.localWeekYear)){if(!It(e.weekday)||!It(e.weekNumber)||!It(e.weekYear))throw new qs("Cannot mix locale-based week fields with ISO-based week fields");return It(e.localWeekday)||(e.weekday=e.localWeekday),It(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),It(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Fx(e,t=4,n=1){const r=Tc(e.weekYear),l=ei(e.weekNumber,1,aa(e.weekYear,t,n)),d=ei(e.weekday,1,7);return r?l?d?!1:Qr("weekday",e.weekday):Qr("week",e.weekNumber):Qr("weekYear",e.weekYear)}function Bx(e){const t=Tc(e.year),n=ei(e.ordinal,1,Zs(e.year));return t?n?!1:Qr("ordinal",e.ordinal):Qr("year",e.year)}function Mm(e){const t=Tc(e.year),n=ei(e.month,1,12),r=ei(e.day,1,pc(e.year,e.month));return t?n?r?!1:Qr("day",e.day):Qr("month",e.month):Qr("year",e.year)}function Rm(e){const{hour:t,minute:n,second:r,millisecond:l}=e,d=ei(t,0,23)||t===24&&n===0&&r===0&&l===0,f=ei(n,0,59),p=ei(r,0,59),_=ei(l,0,999);return d?f?p?_?!1:Qr("millisecond",l):Qr("second",r):Qr("minute",n):Qr("hour",t)}function It(e){return typeof e>"u"}function vo(e){return typeof e=="number"}function Tc(e){return typeof e=="number"&&e%1===0}function Hx(e){return typeof e=="string"}function Wx(e){return Object.prototype.toString.call(e)==="[object Date]"}function bm(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Lm(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Kx(e){return Array.isArray(e)?e:[e]}function Hg(e,t,n){if(e.length!==0)return e.reduce((r,l)=>{const d=[t(l),l];return r&&n(r[0],d[0])===r[0]?r:d},null)[1]}function zx(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function el(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function nd(e){if(e==null)return null;if(typeof e!="object")throw new _r("Week settings must be an object");if(!ei(e.firstDay,1,7)||!ei(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!ei(t,1,7)))throw new _r("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function ei(e,t,n){return Tc(e)&&e>=t&&e<=n}function Ux(e,t){return e-t*Math.floor(e/t)}function zn(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Eo(e){if(!(It(e)||e===null||e===""))return parseInt(e,10)}function es(e){if(!(It(e)||e===null||e===""))return parseFloat(e)}function bd(e){if(!(It(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Ld(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function ua(e){return e%4===0&&(e%100!==0||e%400===0)}function Zs(e){return ua(e)?366:365}function pc(e,t){const n=Ux(t-1,12)+1,r=e+(t-n)/12;return n===2?ua(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function xc(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Wg(e,t,n){return-Rd(Md(e,1,t),n)+t-1}function aa(e,t=4,n=1){const r=Wg(e,t,n),l=Wg(e+1,t,n);return(Zs(e)-r+l)/7}function rd(e){return e>99?e:e>Rn.twoDigitCutoffYear?1900+e:2e3+e}function Im(e,t,n,r=null){const l=new Date(e),d={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(d.timeZone=r);const f={timeZoneName:t,...d},p=new Intl.DateTimeFormat(n,f).formatToParts(l).find(_=>_.type.toLowerCase()==="timezonename");return p?p.value:null}function vc(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,l=n<0||Object.is(n,-0)?-r:r;return n*60+l}function km(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new _r(`Invalid unit value ${e}`);return t}function mc(e,t){const n={};for(const r in e)if(el(e,r)){const l=e[r];if(l==null)continue;n[t(r)]=km(l)}return n}function oa(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),l=e>=0?"+":"-";switch(t){case"short":return`${l}${zn(n,2)}:${zn(r,2)}`;case"narrow":return`${l}${n}${r>0?`:${r}`:""}`;case"techie":return`${l}${zn(n,2)}${zn(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Sc(e){return zx(e,["hour","minute","second","millisecond"])}const Gx=["January","February","March","April","May","June","July","August","September","October","November","December"],Pm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Yx=["J","F","M","A","M","J","J","A","S","O","N","D"];function $m(e){switch(e){case"narrow":return[...Yx];case"short":return[...Pm];case"long":return[...Gx];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Fm=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Bm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],jx=["M","T","W","T","F","S","S"];function Hm(e){switch(e){case"narrow":return[...jx];case"short":return[...Bm];case"long":return[...Fm];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Wm=["AM","PM"],Vx=["Before Christ","Anno Domini"],qx=["BC","AD"],Zx=["B","A"];function Km(e){switch(e){case"narrow":return[...Zx];case"short":return[...qx];case"long":return[...Vx];default:return null}}function Jx(e){return Wm[e.hour<12?0:1]}function Xx(e,t){return Hm(t)[e.weekday-1]}function Qx(e,t){return $m(t)[e.month-1]}function ev(e,t){return Km(t)[e.year<0?0:1]}function tv(e,t,n="always",r=!1){const l={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},d=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&d){const S=e==="days";switch(t){case 1:return S?"tomorrow":`next ${l[e][0]}`;case-1:return S?"yesterday":`last ${l[e][0]}`;case 0:return S?"today":`this ${l[e][0]}`}}const f=Object.is(t,-0)||t<0,p=Math.abs(t),_=p===1,T=l[e],E=r?_?T[1]:T[2]||T[1]:_?l[e][0]:e;return f?`${p} ${E} ago`:`in ${p} ${E}`}function Kg(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const nv={D:hc,DD:lm,DDD:am,DDDD:cm,t:um,tt:dm,ttt:fm,tttt:hm,T:gm,TT:pm,TTT:mm,TTTT:_m,f:ym,ff:Cm,fff:Tm,ffff:vm,F:Nm,FF:Em,FFF:xm,FFFF:Sm};class yr{static create(t,n={}){return new yr(t,n)}static parseFormat(t){let n=null,r="",l=!1;const d=[];for(let f=0;f<t.length;f++){const p=t.charAt(f);p==="'"?(r.length>0&&d.push({literal:l||/^\s+$/.test(r),val:r}),n=null,r="",l=!l):l||p===n?r+=p:(r.length>0&&d.push({literal:/^\s+$/.test(r),val:r}),r=p,n=p)}return r.length>0&&d.push({literal:l||/^\s+$/.test(r),val:r}),d}static macroTokenToFormatOpts(t){return nv[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return zn(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",l=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",d=(M,m)=>this.loc.extract(t,M,m),f=M=>t.isOffsetFixed&&t.offset===0&&M.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,M.format):"",p=()=>r?Jx(t):d({hour:"numeric",hourCycle:"h12"},"dayperiod"),_=(M,m)=>r?Qx(t,M):d(m?{month:M}:{month:M,day:"numeric"},"month"),T=(M,m)=>r?Xx(t,M):d(m?{weekday:M}:{weekday:M,month:"long",day:"numeric"},"weekday"),E=M=>{const m=yr.macroTokenToFormatOpts(M);return m?this.formatWithSystemDefault(t,m):M},S=M=>r?ev(t,M):d({era:M},"era"),w=M=>{switch(M){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return f({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return f({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return f({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return p();case"d":return l?d({day:"numeric"},"day"):this.num(t.day);case"dd":return l?d({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return T("short",!0);case"cccc":return T("long",!0);case"ccccc":return T("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return T("short",!1);case"EEEE":return T("long",!1);case"EEEEE":return T("narrow",!1);case"L":return l?d({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return l?d({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return _("short",!0);case"LLLL":return _("long",!0);case"LLLLL":return _("narrow",!0);case"M":return l?d({month:"numeric"},"month"):this.num(t.month);case"MM":return l?d({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return _("short",!1);case"MMMM":return _("long",!1);case"MMMMM":return _("narrow",!1);case"y":return l?d({year:"numeric"},"year"):this.num(t.year);case"yy":return l?d({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return l?d({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return l?d({year:"numeric"},"year"):this.num(t.year,6);case"G":return S("short");case"GG":return S("long");case"GGGGG":return S("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return E(M)}};return Kg(yr.parseFormat(n),w)}formatDurationFromString(t,n){const r=_=>{switch(_[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},l=_=>T=>{const E=r(T);return E?this.num(_.get(E),T.length):T},d=yr.parseFormat(n),f=d.reduce((_,{literal:T,val:E})=>T?_:_.concat(E),[]),p=t.shiftTo(...f.map(r).filter(_=>_));return Kg(d,l(p))}}const zm=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ll(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function al(...e){return t=>e.reduce(([n,r,l],d)=>{const[f,p,_]=d(t,l);return[{...n,...f},p||r,_]},[{},null,1]).slice(0,2)}function cl(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const l=n.exec(e);if(l)return r(l)}return[null,null]}function Um(...e){return(t,n)=>{const r={};let l;for(l=0;l<e.length;l++)r[e[l]]=Eo(t[n+l]);return[r,null,n+l]}}const Gm=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,rv=`(?:${Gm.source}?(?:\\[(${zm.source})\\])?)?`,Id=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Ym=RegExp(`${Id.source}${rv}`),kd=RegExp(`(?:T${Ym.source})?`),iv=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ov=/(\d{4})-?W(\d\d)(?:-?(\d))?/,sv=/(\d{4})-?(\d{3})/,lv=Um("weekYear","weekNumber","weekDay"),av=Um("year","ordinal"),cv=/(\d{4})-(\d\d)-(\d\d)/,jm=RegExp(`${Id.source} ?(?:${Gm.source}|(${zm.source}))?`),uv=RegExp(`(?: ${jm.source})?`);function Js(e,t,n){const r=e[t];return It(r)?n:Eo(r)}function dv(e,t){return[{year:Js(e,t),month:Js(e,t+1,1),day:Js(e,t+2,1)},null,t+3]}function ul(e,t){return[{hours:Js(e,t,0),minutes:Js(e,t+1,0),seconds:Js(e,t+2,0),milliseconds:bd(e[t+3])},null,t+4]}function da(e,t){const n=!e[t]&&!e[t+1],r=vc(e[t+1],e[t+2]),l=n?null:xr.instance(r);return[{},l,t+3]}function fa(e,t){const n=e[t]?no.create(e[t]):null;return[{},n,t+1]}const fv=RegExp(`^T?${Id.source}$`),hv=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function gv(e){const[t,n,r,l,d,f,p,_,T]=e,E=t[0]==="-",S=_&&_[0]==="-",w=(M,m=!1)=>M!==void 0&&(m||M&&E)?-M:M;return[{years:w(es(n)),months:w(es(r)),weeks:w(es(l)),days:w(es(d)),hours:w(es(f)),minutes:w(es(p)),seconds:w(es(_),_==="-0"),milliseconds:w(bd(T),S)}]}const pv={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Pd(e,t,n,r,l,d,f){const p={year:t.length===2?rd(Eo(t)):Eo(t),month:Pm.indexOf(n)+1,day:Eo(r),hour:Eo(l),minute:Eo(d)};return f&&(p.second=Eo(f)),e&&(p.weekday=e.length>3?Fm.indexOf(e)+1:Bm.indexOf(e)+1),p}const mv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function _v(e){const[,t,n,r,l,d,f,p,_,T,E,S]=e,w=Pd(t,l,r,n,d,f,p);let M;return _?M=pv[_]:T?M=0:M=vc(E,S),[w,new xr(M)]}function yv(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Nv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Cv=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ev=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function zg(e){const[,t,n,r,l,d,f,p]=e;return[Pd(t,l,r,n,d,f,p),xr.utcInstance]}function Tv(e){const[,t,n,r,l,d,f,p]=e;return[Pd(t,p,n,r,l,d,f),xr.utcInstance]}const xv=ll(iv,kd),vv=ll(ov,kd),Sv=ll(sv,kd),wv=ll(Ym),Vm=al(dv,ul,da,fa),Ov=al(lv,ul,da,fa),Dv=al(av,ul,da,fa),Av=al(ul,da,fa);function Mv(e){return cl(e,[xv,Vm],[vv,Ov],[Sv,Dv],[wv,Av])}function Rv(e){return cl(yv(e),[mv,_v])}function bv(e){return cl(e,[Nv,zg],[Cv,zg],[Ev,Tv])}function Lv(e){return cl(e,[hv,gv])}const Iv=al(ul);function kv(e){return cl(e,[fv,Iv])}const Pv=ll(cv,uv),$v=ll(jm),Fv=al(ul,da,fa);function Bv(e){return cl(e,[Pv,Vm],[$v,Fv])}const Ug="Invalid Duration",qm={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Hv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...qm},Xr=146097/400,Us=146097/4800,Wv={years:{quarters:4,months:12,weeks:Xr/7,days:Xr,hours:Xr*24,minutes:Xr*24*60,seconds:Xr*24*60*60,milliseconds:Xr*24*60*60*1e3},quarters:{months:3,weeks:Xr/28,days:Xr/4,hours:Xr*24/4,minutes:Xr*24*60/4,seconds:Xr*24*60*60/4,milliseconds:Xr*24*60*60*1e3/4},months:{weeks:Us/7,days:Us,hours:Us*24,minutes:Us*24*60,seconds:Us*24*60*60,milliseconds:Us*24*60*60*1e3},...qm},ss=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Kv=ss.slice(0).reverse();function Co(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new en(r)}function Zm(e,t){let n=t.milliseconds??0;for(const r of Kv.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Gg(e,t){const n=Zm(e,t)<0?-1:1;ss.reduceRight((r,l)=>{if(It(t[l]))return r;if(r){const d=t[r]*n,f=e[l][r],p=Math.floor(d/f);t[l]+=p*n,t[r]-=p*f*n}return l},null),ss.reduce((r,l)=>{if(It(t[l]))return r;if(r){const d=t[r]%1;t[r]-=d,t[l]+=d*e[r][l]}return l},null)}function zv(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class en{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?Wv:Hv;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||an.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return en.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new _r(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new en({values:mc(t,en.normalizeUnit),loc:an.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(vo(t))return en.fromMillis(t);if(en.isDuration(t))return t;if(typeof t=="object")return en.fromObject(t);throw new _r(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Lv(t);return r?en.fromObject(r,n):en.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=kv(t);return r?en.fromObject(r,n):en.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new _r("need to specify a reason the Duration is invalid");const r=t instanceof gi?t:new gi(t,n);if(Rn.throwOnInvalid)throw new hx(r);return new en({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new sm(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?yr.create(this.loc,r).formatDurationFromString(this,t):Ug}toHuman(t={}){if(!this.isValid)return Ug;const n=ss.map(r=>{const l=this.values[r];return It(l)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(l)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Ld(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Dt.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Zm(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t),r={};for(const l of ss)(el(n.values,l)||el(this.values,l))&&(r[l]=n.get(l)+this.get(l));return Co(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=km(t(this.values[r],r));return Co(this,{values:n},!0)}get(t){return this[en.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...mc(t,en.normalizeUnit)};return Co(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:l}={}){const f={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:l,conversionAccuracy:r};return Co(this,f)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Gg(this.matrix,t),Co(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=zv(this.normalize().shiftToAll().toObject());return Co(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(f=>en.normalizeUnit(f));const n={},r={},l=this.toObject();let d;for(const f of ss)if(t.indexOf(f)>=0){d=f;let p=0;for(const T in r)p+=this.matrix[T][f]*r[T],r[T]=0;vo(l[f])&&(p+=l[f]);const _=Math.trunc(p);n[f]=_,r[f]=(p*1e3-_*1e3)/1e3}else vo(l[f])&&(r[f]=l[f]);for(const f in r)r[f]!==0&&(n[d]+=f===d?r[f]:r[f]/this.matrix[d][f]);return Gg(this.matrix,n),Co(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Co(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,l){return r===void 0||r===0?l===void 0||l===0:r===l}for(const r of ss)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Gs="Invalid Interval";function Uv(e,t){return!e||!e.isValid?Mn.invalid("missing or invalid start"):!t||!t.isValid?Mn.invalid("missing or invalid end"):t<e?Mn.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Mn{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new _r("need to specify a reason the Interval is invalid");const r=t instanceof gi?t:new gi(t,n);if(Rn.throwOnInvalid)throw new fx(r);return new Mn({invalid:r})}static fromDateTimes(t,n){const r=Xl(t),l=Xl(n),d=Uv(r,l);return d??new Mn({start:r,end:l})}static after(t,n){const r=en.fromDurationLike(n),l=Xl(t);return Mn.fromDateTimes(l,l.plus(r))}static before(t,n){const r=en.fromDurationLike(n),l=Xl(t);return Mn.fromDateTimes(l.minus(r),l)}static fromISO(t,n){const[r,l]=(t||"").split("/",2);if(r&&l){let d,f;try{d=Dt.fromISO(r,n),f=d.isValid}catch{f=!1}let p,_;try{p=Dt.fromISO(l,n),_=p.isValid}catch{_=!1}if(f&&_)return Mn.fromDateTimes(d,p);if(f){const T=en.fromISO(l,n);if(T.isValid)return Mn.after(d,T)}else if(_){const T=en.fromISO(r,n);if(T.isValid)return Mn.before(p,T)}}return Mn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(t,n);let l;return n!=null&&n.useLocaleWeeks?l=this.end.reconfigure({locale:r.locale}):l=this.end,l=l.startOf(t,n),Math.floor(l.diff(r,t).get(t))+(l.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Mn.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Xl).filter(f=>this.contains(f)).sort((f,p)=>f.toMillis()-p.toMillis()),r=[];let{s:l}=this,d=0;for(;l<this.e;){const f=n[d]||this.e,p=+f>+this.e?this.e:f;r.push(Mn.fromDateTimes(l,p)),l=p,d+=1}return r}splitBy(t){const n=en.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,l=1,d;const f=[];for(;r<this.e;){const p=this.start.plus(n.mapUnits(_=>_*l));d=+p>+this.e?this.e:p,f.push(Mn.fromDateTimes(r,d)),r=d,l+=1}return f}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Mn.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Mn.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((l,d)=>l.s-d.s).reduce(([l,d],f)=>d?d.overlaps(f)||d.abutsStart(f)?[l,d.union(f)]:[l.concat([d]),f]:[l,f],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const l=[],d=t.map(_=>[{time:_.s,type:"s"},{time:_.e,type:"e"}]),f=Array.prototype.concat(...d),p=f.sort((_,T)=>_.time-T.time);for(const _ of p)r+=_.type==="s"?1:-1,r===1?n=_.time:(n&&+n!=+_.time&&l.push(Mn.fromDateTimes(n,_.time)),n=null);return Mn.merge(l)}difference(...t){return Mn.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Gs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=hc,n={}){return this.isValid?yr.create(this.s.loc.clone(n),t).formatInterval(this):Gs}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Gs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Gs}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Gs}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Gs}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):en.invalid(this.invalidReason)}mapEndpoints(t){return Mn.fromDateTimes(t(this.s),t(this.e))}}class ec{static hasDST(t=Rn.defaultZone){const n=Dt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return no.isValidZone(t)}static normalizeZone(t){return To(t,Rn.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||an.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||an.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||an.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null,outputCalendar:d="gregory"}={}){return(l||an.create(n,r,d)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null,outputCalendar:d="gregory"}={}){return(l||an.create(n,r,d)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null}={}){return(l||an.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:l=null}={}){return(l||an.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return an.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return an.create(n,null,"gregory").eras(t)}static features(){return{relative:bm(),localeWeek:Lm()}}}function Yg(e,t){const n=l=>l.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(en.fromMillis(r).as("days"))}function Gv(e,t,n){const r=[["years",(_,T)=>T.year-_.year],["quarters",(_,T)=>T.quarter-_.quarter+(T.year-_.year)*4],["months",(_,T)=>T.month-_.month+(T.year-_.year)*12],["weeks",(_,T)=>{const E=Yg(_,T);return(E-E%7)/7}],["days",Yg]],l={},d=e;let f,p;for(const[_,T]of r)n.indexOf(_)>=0&&(f=_,l[_]=T(e,t),p=d.plus(l),p>t?(l[_]--,e=d.plus(l),e>t&&(p=e,l[_]--,e=d.plus(l))):e=p);return[e,l,p,f]}function Yv(e,t,n,r){let[l,d,f,p]=Gv(e,t,n);const _=t-l,T=n.filter(S=>["hours","minutes","seconds","milliseconds"].indexOf(S)>=0);T.length===0&&(f<t&&(f=l.plus({[p]:1})),f!==l&&(d[p]=(d[p]||0)+_/(f-l)));const E=en.fromObject(d,r);return T.length>0?en.fromMillis(_,r).shiftTo(...T).plus(E):E}const jv="missing Intl.DateTimeFormat.formatToParts support";function on(e,t=n=>n){return{regex:e,deser:([n])=>t(Px(n))}}const Vv=" ",Jm=`[ ${Vv}]`,Xm=new RegExp(Jm,"g");function qv(e){return e.replace(/\./g,"\\.?").replace(Xm,Jm)}function jg(e){return e.replace(/\./g,"").replace(Xm," ").toLowerCase()}function hi(e,t){return e===null?null:{regex:RegExp(e.map(qv).join("|")),deser:([n])=>e.findIndex(r=>jg(n)===jg(r))+t}}function Vg(e,t){return{regex:e,deser:([,n,r])=>vc(n,r),groups:t}}function tc(e){return{regex:e,deser:([t])=>t}}function Zv(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Jv(e,t){const n=fi(t),r=fi(t,"{2}"),l=fi(t,"{3}"),d=fi(t,"{4}"),f=fi(t,"{6}"),p=fi(t,"{1,2}"),_=fi(t,"{1,3}"),T=fi(t,"{1,6}"),E=fi(t,"{1,9}"),S=fi(t,"{2,4}"),w=fi(t,"{4,6}"),M=k=>({regex:RegExp(Zv(k.val)),deser:([G])=>G,literal:!0}),v=(k=>{if(e.literal)return M(k);switch(k.val){case"G":return hi(t.eras("short"),0);case"GG":return hi(t.eras("long"),0);case"y":return on(T);case"yy":return on(S,rd);case"yyyy":return on(d);case"yyyyy":return on(w);case"yyyyyy":return on(f);case"M":return on(p);case"MM":return on(r);case"MMM":return hi(t.months("short",!0),1);case"MMMM":return hi(t.months("long",!0),1);case"L":return on(p);case"LL":return on(r);case"LLL":return hi(t.months("short",!1),1);case"LLLL":return hi(t.months("long",!1),1);case"d":return on(p);case"dd":return on(r);case"o":return on(_);case"ooo":return on(l);case"HH":return on(r);case"H":return on(p);case"hh":return on(r);case"h":return on(p);case"mm":return on(r);case"m":return on(p);case"q":return on(p);case"qq":return on(r);case"s":return on(p);case"ss":return on(r);case"S":return on(_);case"SSS":return on(l);case"u":return tc(E);case"uu":return tc(p);case"uuu":return on(n);case"a":return hi(t.meridiems(),0);case"kkkk":return on(d);case"kk":return on(S,rd);case"W":return on(p);case"WW":return on(r);case"E":case"c":return on(n);case"EEE":return hi(t.weekdays("short",!1),1);case"EEEE":return hi(t.weekdays("long",!1),1);case"ccc":return hi(t.weekdays("short",!0),1);case"cccc":return hi(t.weekdays("long",!0),1);case"Z":case"ZZ":return Vg(new RegExp(`([+-]${p.source})(?::(${r.source}))?`),2);case"ZZZ":return Vg(new RegExp(`([+-]${p.source})(${r.source})?`),2);case"z":return tc(/[a-z_+-/]{1,256}?/i);case" ":return tc(/[^\S\n\r]/);default:return M(k)}})(e)||{invalidReason:jv};return v.token=e,v}const Xv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Qv(e,t,n){const{type:r,value:l}=e;if(r==="literal"){const _=/^\s+$/.test(l);return{literal:!_,val:_?" ":l}}const d=t[r];let f=r;r==="hour"&&(t.hour12!=null?f=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?f="hour12":f="hour24":f=n.hour12?"hour12":"hour24");let p=Xv[f];if(typeof p=="object"&&(p=p[d]),p)return{literal:!1,val:p}}function eS(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function tS(e,t,n){const r=e.match(t);if(r){const l={};let d=1;for(const f in n)if(el(n,f)){const p=n[f],_=p.groups?p.groups+1:1;!p.literal&&p.token&&(l[p.token.val[0]]=p.deser(r.slice(d,d+_))),d+=_}return[r,l]}else return[r,{}]}function nS(e){const t=d=>{switch(d){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return It(e.z)||(n=no.create(e.z)),It(e.Z)||(n||(n=new xr(e.Z)),r=e.Z),It(e.q)||(e.M=(e.q-1)*3+1),It(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),It(e.u)||(e.S=bd(e.u)),[Object.keys(e).reduce((d,f)=>{const p=t(f);return p&&(d[p]=e[f]),d},{}),n,r]}let ku=null;function rS(){return ku||(ku=Dt.fromMillis(1555555555555)),ku}function iS(e,t){if(e.literal)return e;const n=yr.macroTokenToFormatOpts(e.val),r=n_(n,t);return r==null||r.includes(void 0)?e:r}function Qm(e,t){return Array.prototype.concat(...e.map(n=>iS(n,t)))}class e_{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=Qm(yr.parseFormat(n),t),this.units=this.tokens.map(r=>Jv(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,l]=eS(this.units);this.regex=RegExp(r,"i"),this.handlers=l}}explainFromTokens(t){if(this.isValid){const[n,r]=tS(t,this.regex,this.handlers),[l,d,f]=r?nS(r):[null,null,void 0];if(el(r,"a")&&el(r,"H"))throw new qs("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:l,zone:d,specificOffset:f}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function t_(e,t,n){return new e_(e,n).explainFromTokens(t)}function oS(e,t,n){const{result:r,zone:l,specificOffset:d,invalidReason:f}=t_(e,t,n);return[r,l,d,f]}function n_(e,t){if(!e)return null;const r=yr.create(t,e).dtFormatter(rS()),l=r.formatToParts(),d=r.resolvedOptions();return l.map(f=>Qv(f,e,d))}const Pu="Invalid DateTime",qg=864e13;function na(e){return new gi("unsupported zone",`the zone "${e.name}" is not supported`)}function $u(e){return e.weekData===null&&(e.weekData=gc(e.c)),e.weekData}function Fu(e){return e.localWeekData===null&&(e.localWeekData=gc(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function ts(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Dt({...n,...t,old:n})}function r_(e,t,n){let r=e-t*60*1e3;const l=n.offset(r);if(t===l)return[r,t];r-=(l-t)*60*1e3;const d=n.offset(r);return l===d?[r,l]:[e-Math.min(l,d)*60*1e3,Math.max(l,d)]}function nc(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function sc(e,t,n){return r_(xc(e),t,n)}function Zg(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),l=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,d={...e.c,year:r,month:l,day:Math.min(e.c.day,pc(r,l))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},f=en.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),p=xc(d);let[_,T]=r_(p,n,e.zone);return f!==0&&(_+=f,T=e.zone.offset(_)),{ts:_,o:T}}function Ys(e,t,n,r,l,d){const{setZone:f,zone:p}=n;if(e&&Object.keys(e).length!==0||t){const _=t||p,T=Dt.fromObject(e,{...n,zone:_,specificOffset:d});return f?T:T.setZone(p)}else return Dt.invalid(new gi("unparsable",`the input "${l}" can't be parsed as ${r}`))}function rc(e,t,n=!0){return e.isValid?yr.create(an.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Bu(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=zn(e.c.year,n?6:4),t?(r+="-",r+=zn(e.c.month),r+="-",r+=zn(e.c.day)):(r+=zn(e.c.month),r+=zn(e.c.day)),r}function Jg(e,t,n,r,l,d){let f=zn(e.c.hour);return t?(f+=":",f+=zn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=":")):f+=zn(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(f+=zn(e.c.second),(e.c.millisecond!==0||!r)&&(f+=".",f+=zn(e.c.millisecond,3))),l&&(e.isOffsetFixed&&e.offset===0&&!d?f+="Z":e.o<0?(f+="-",f+=zn(Math.trunc(-e.o/60)),f+=":",f+=zn(Math.trunc(-e.o%60))):(f+="+",f+=zn(Math.trunc(e.o/60)),f+=":",f+=zn(Math.trunc(e.o%60)))),d&&(f+="["+e.zone.ianaName+"]"),f}const i_={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},sS={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},lS={ordinal:1,hour:0,minute:0,second:0,millisecond:0},o_=["year","month","day","hour","minute","second","millisecond"],aS=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],cS=["year","ordinal","hour","minute","second","millisecond"];function uS(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new sm(e);return t}function Xg(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return uS(e)}}function dS(e){return ac[e]||(lc===void 0&&(lc=Rn.now()),ac[e]=e.offset(lc)),ac[e]}function Qg(e,t){const n=To(t.zone,Rn.defaultZone);if(!n.isValid)return Dt.invalid(na(n));const r=an.fromObject(t);let l,d;if(It(e.year))l=Rn.now();else{for(const _ of o_)It(e[_])&&(e[_]=i_[_]);const f=Mm(e)||Rm(e);if(f)return Dt.invalid(f);const p=dS(n);[l,d]=sc(e,p,n)}return new Dt({ts:l,zone:n,loc:r,o:d})}function ep(e,t,n){const r=It(n.round)?!0:n.round,l=(f,p)=>(f=Ld(f,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(f,p)),d=f=>n.calendary?t.hasSame(e,f)?0:t.startOf(f).diff(e.startOf(f),f).get(f):t.diff(e,f).get(f);if(n.unit)return l(d(n.unit),n.unit);for(const f of n.units){const p=d(f);if(Math.abs(p)>=1)return l(p,f)}return l(e>t?-0:0,n.units[n.units.length-1])}function tp(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let lc,ac={};class Dt{constructor(t){const n=t.zone||Rn.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new gi("invalid input"):null)||(n.isValid?null:na(n));this.ts=It(t.ts)?Rn.now():t.ts;let l=null,d=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[l,d]=[t.old.c,t.old.o];else{const p=vo(t.o)&&!t.old?t.o:n.offset(this.ts);l=nc(this.ts,p),r=Number.isNaN(l.year)?new gi("invalid input"):null,l=r?null:l,d=r?null:p}this._zone=n,this.loc=t.loc||an.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=l,this.o=d,this.isLuxonDateTime=!0}static now(){return new Dt({})}static local(){const[t,n]=tp(arguments),[r,l,d,f,p,_,T]=n;return Qg({year:r,month:l,day:d,hour:f,minute:p,second:_,millisecond:T},t)}static utc(){const[t,n]=tp(arguments),[r,l,d,f,p,_,T]=n;return t.zone=xr.utcInstance,Qg({year:r,month:l,day:d,hour:f,minute:p,second:_,millisecond:T},t)}static fromJSDate(t,n={}){const r=Wx(t)?t.valueOf():NaN;if(Number.isNaN(r))return Dt.invalid("invalid input");const l=To(n.zone,Rn.defaultZone);return l.isValid?new Dt({ts:r,zone:l,loc:an.fromObject(n)}):Dt.invalid(na(l))}static fromMillis(t,n={}){if(vo(t))return t<-qg||t>qg?Dt.invalid("Timestamp out of range"):new Dt({ts:t,zone:To(n.zone,Rn.defaultZone),loc:an.fromObject(n)});throw new _r(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(vo(t))return new Dt({ts:t*1e3,zone:To(n.zone,Rn.defaultZone),loc:an.fromObject(n)});throw new _r("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=To(n.zone,Rn.defaultZone);if(!r.isValid)return Dt.invalid(na(r));const l=an.fromObject(n),d=mc(t,Xg),{minDaysInFirstWeek:f,startOfWeek:p}=Bg(d,l),_=Rn.now(),T=It(n.specificOffset)?r.offset(_):n.specificOffset,E=!It(d.ordinal),S=!It(d.year),w=!It(d.month)||!It(d.day),M=S||w,m=d.weekYear||d.weekNumber;if((M||E)&&m)throw new qs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(w&&E)throw new qs("Can't mix ordinal dates with month/day");const v=m||d.weekday&&!M;let k,G,I=nc(_,T);v?(k=aS,G=sS,I=gc(I,f,p)):E?(k=cS,G=lS,I=Iu(I)):(k=o_,G=i_);let P=!1;for(const z of k){const q=d[z];It(q)?P?d[z]=G[z]:d[z]=I[z]:P=!0}const H=v?Fx(d,f,p):E?Bx(d):Mm(d),j=H||Rm(d);if(j)return Dt.invalid(j);const re=v?$g(d,f,p):E?Fg(d):d,[te,ce]=sc(re,T,r),V=new Dt({ts:te,zone:r,o:ce,loc:l});return d.weekday&&M&&t.weekday!==V.weekday?Dt.invalid("mismatched weekday",`you can't specify both a weekday of ${d.weekday} and a date of ${V.toISO()}`):V.isValid?V:Dt.invalid(V.invalid)}static fromISO(t,n={}){const[r,l]=Mv(t);return Ys(r,l,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,l]=Rv(t);return Ys(r,l,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,l]=bv(t);return Ys(r,l,n,"HTTP",n)}static fromFormat(t,n,r={}){if(It(t)||It(n))throw new _r("fromFormat requires an input string and a format");const{locale:l=null,numberingSystem:d=null}=r,f=an.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0}),[p,_,T,E]=oS(f,t,n);return E?Dt.invalid(E):Ys(p,_,r,`format ${n}`,t,T)}static fromString(t,n,r={}){return Dt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,l]=Bv(t);return Ys(r,l,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new _r("need to specify a reason the DateTime is invalid");const r=t instanceof gi?t:new gi(t,n);if(Rn.throwOnInvalid)throw new dx(r);return new Dt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=n_(t,an.fromObject(n));return r?r.map(l=>l?l.val:null).join(""):null}static expandFormat(t,n={}){return Qm(yr.parseFormat(t),an.fromObject(n)).map(l=>l.val).join("")}static resetCache(){lc=void 0,ac={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?$u(this).weekYear:NaN}get weekNumber(){return this.isValid?$u(this).weekNumber:NaN}get weekday(){return this.isValid?$u(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Fu(this).weekday:NaN}get localWeekNumber(){return this.isValid?Fu(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Fu(this).weekYear:NaN}get ordinal(){return this.isValid?Iu(this.c).ordinal:NaN}get monthShort(){return this.isValid?ec.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ec.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ec.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ec.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=xc(this.c),l=this.zone.offset(r-t),d=this.zone.offset(r+t),f=this.zone.offset(r-l*n),p=this.zone.offset(r-d*n);if(f===p)return[this];const _=r-f*n,T=r-p*n,E=nc(_,f),S=nc(T,p);return E.hour===S.hour&&E.minute===S.minute&&E.second===S.second&&E.millisecond===S.millisecond?[ts(this,{ts:_}),ts(this,{ts:T})]:[this]}get isInLeapYear(){return ua(this.year)}get daysInMonth(){return pc(this.year,this.month)}get daysInYear(){return this.isValid?Zs(this.year):NaN}get weeksInWeekYear(){return this.isValid?aa(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?aa(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:l}=yr.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:l}}toUTC(t=0,n={}){return this.setZone(xr.instance(t),n)}toLocal(){return this.setZone(Rn.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=To(t,Rn.defaultZone),t.equals(this.zone))return this;if(t.isValid){let l=this.ts;if(n||r){const d=t.offset(this.ts),f=this.toObject();[l]=sc(f,d,t)}return ts(this,{ts:l,zone:t})}else return Dt.invalid(na(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const l=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return ts(this,{loc:l})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=mc(t,Xg),{minDaysInFirstWeek:r,startOfWeek:l}=Bg(n,this.loc),d=!It(n.weekYear)||!It(n.weekNumber)||!It(n.weekday),f=!It(n.ordinal),p=!It(n.year),_=!It(n.month)||!It(n.day),T=p||_,E=n.weekYear||n.weekNumber;if((T||f)&&E)throw new qs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(_&&f)throw new qs("Can't mix ordinal dates with month/day");let S;d?S=$g({...gc(this.c,r,l),...n},r,l):It(n.ordinal)?(S={...this.toObject(),...n},It(n.day)&&(S.day=Math.min(pc(S.year,S.month),S.day))):S=Fg({...Iu(this.c),...n});const[w,M]=sc(S,this.o,this.zone);return ts(this,{ts:w,o:M})}plus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t);return ts(this,Zg(this,n))}minus(t){if(!this.isValid)return this;const n=en.fromDurationLike(t).negate();return ts(this,Zg(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},l=en.normalizeUnit(t);switch(l){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(l==="weeks")if(n){const d=this.loc.getStartOfWeek(),{weekday:f}=this;f<d&&(r.weekNumber=this.weekNumber-1),r.weekday=d}else r.weekday=1;if(l==="quarters"){const d=Math.ceil(this.month/3);r.month=(d-1)*3+1}return this.set(r)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?yr.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Pu}toLocaleString(t=hc,n={}){return this.isValid?yr.create(this.loc.clone(n),t).formatDateTime(this):Pu}toLocaleParts(t={}){return this.isValid?yr.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:l=!0,extendedZone:d=!1}={}){if(!this.isValid)return null;const f=t==="extended";let p=Bu(this,f);return p+="T",p+=Jg(this,f,n,r,l,d),p}toISODate({format:t="extended"}={}){return this.isValid?Bu(this,t==="extended"):null}toISOWeekDate(){return rc(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:l=!1,extendedZone:d=!1,format:f="extended"}={}){return this.isValid?(l?"T":"")+Jg(this,f==="extended",n,t,r,d):null}toRFC2822(){return rc(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rc(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Bu(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let l="HH:mm:ss.SSS";return(n||t)&&(r&&(l+=" "),n?l+="z":t&&(l+="ZZ")),rc(this,l,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Pu}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return en.invalid("created by diffing an invalid DateTime");const l={locale:this.locale,numberingSystem:this.numberingSystem,...r},d=Kx(n).map(en.normalizeUnit),f=t.valueOf()>this.valueOf(),p=f?this:t,_=f?t:this,T=Yv(p,_,d,l);return f?T.negate():T}diffNow(t="milliseconds",n={}){return this.diff(Dt.now(),t,n)}until(t){return this.isValid?Mn.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const l=t.valueOf(),d=this.setZone(t.zone,{keepLocalTime:!0});return d.startOf(n,r)<=l&&l<=d.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Dt.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let l=["years","months","days","hours","minutes","seconds"],d=t.unit;return Array.isArray(t.unit)&&(l=t.unit,d=void 0),ep(n,this.plus(r),{...t,numeric:"always",units:l,unit:d})}toRelativeCalendar(t={}){return this.isValid?ep(t.base||Dt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Dt.isDateTime))throw new _r("min requires all arguments be DateTimes");return Hg(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(Dt.isDateTime))throw new _r("max requires all arguments be DateTimes");return Hg(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:l=null,numberingSystem:d=null}=r,f=an.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0});return t_(f,t,n)}static fromStringExplain(t,n,r={}){return Dt.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:l=null}=n,d=an.fromOpts({locale:r,numberingSystem:l,defaultToEN:!0});return new e_(d,t)}static fromFormatParser(t,n,r={}){if(It(t)||It(n))throw new _r("fromFormatParser requires an input string and a format parser");const{locale:l=null,numberingSystem:d=null}=r,f=an.fromOpts({locale:l,numberingSystem:d,defaultToEN:!0});if(!f.equals(n.locale))throw new _r(`fromFormatParser called with a locale of ${f}, but the format parser was created for ${n.locale}`);const{result:p,zone:_,specificOffset:T,invalidReason:E}=n.explainFromTokens(t);return E?Dt.invalid(E):Ys(p,_,r,`format ${n.format}`,t,T)}static get DATE_SHORT(){return hc}static get DATE_MED(){return lm}static get DATE_MED_WITH_WEEKDAY(){return gx}static get DATE_FULL(){return am}static get DATE_HUGE(){return cm}static get TIME_SIMPLE(){return um}static get TIME_WITH_SECONDS(){return dm}static get TIME_WITH_SHORT_OFFSET(){return fm}static get TIME_WITH_LONG_OFFSET(){return hm}static get TIME_24_SIMPLE(){return gm}static get TIME_24_WITH_SECONDS(){return pm}static get TIME_24_WITH_SHORT_OFFSET(){return mm}static get TIME_24_WITH_LONG_OFFSET(){return _m}static get DATETIME_SHORT(){return ym}static get DATETIME_SHORT_WITH_SECONDS(){return Nm}static get DATETIME_MED(){return Cm}static get DATETIME_MED_WITH_SECONDS(){return Em}static get DATETIME_MED_WITH_WEEKDAY(){return px}static get DATETIME_FULL(){return Tm}static get DATETIME_FULL_WITH_SECONDS(){return xm}static get DATETIME_HUGE(){return vm}static get DATETIME_HUGE_WITH_SECONDS(){return Sm}}function Xl(e){if(Dt.isDateTime(e))return e;if(e&&e.valueOf&&vo(e.valueOf()))return Dt.fromJSDate(e);if(e&&typeof e=="object")return Dt.fromObject(e);throw new _r(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var sn=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(sn||{});function $d(e){const t={1:sn.Monday,2:sn.Tuesday,3:sn.Wednesday,4:sn.Thursday,5:sn.Friday,6:sn.Saturday,7:sn.Sunday};if(e.weekday in t)return t[e.weekday];throw new Error(`Invalid DateTime.weekday property: ${e}, ${e.weekday}`)}function Di(e){return{[sn.Monday]:"Monday",[sn.Tuesday]:"Tuesday",[sn.Wednesday]:"Wednesday",[sn.Thursday]:"Thursday",[sn.Friday]:"Friday",[sn.Saturday]:"Saturday",[sn.Sunday]:"Sunday"}[e]}class np{constructor(t,n,r){Ie(this,"end");Ie(this,"start");this.end=t.setZone(r),this.start=t.setZone(r),[n.start,n.end].forEach(_=>{if(_.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[l,d]=n.start.split(":"),[f,p]=n.end.split(":");this.end=this.end.set({hour:Number(f),minute:Number(p)}),this.start=this.start.set({hour:Number(l),minute:Number(d)}),this.end<this.start&&(this.end=this.end.plus({days:1})),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(t){return this.start<=t&&t<this.end}getStartTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.start.setLocale(t||"en-US").toLocaleString(r)}getEndTime(t,n){const r={hour:"numeric",minute:"numeric",...n};return this.end.setLocale(t||"en-US").toLocaleString(r)}timeIsEqualTo(t){const n=this.getStartTime()===t.getStartTime(),r=this.getEndTime()===t.getEndTime();return n&&r}is24h(){const t=this.start.minute===0&&this.start.hour===0,n=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return t&&n&&r}}class s_{constructor(t,n){Ie(this,"holidayHoursByDate");Ie(this,"hours");Ie(this,"timezone");this.holidayHoursByDate=Object.fromEntries((t.holidayHours||[]).map(r=>[r.date,r])),this.hours=t,this.timezone=n}getInterval(t){if(this.isTemporarilyClosedAt(t))return null;let n=t;n=n.minus({days:1});for(const r of[n,t]){const l=this.getHours(r);if(l&&!l.isClosed)for(const d of l.openIntervals||[]){const f=new np(r,d,this.timezone);if(f.contains(t))return f}}return null}getCurrentInterval(){return this.getInterval(Dt.now())}getIntervalAfter(t){const n=this.getIntervalsForNDays(8,t),r=(d,f)=>d.start===f.start?0:d.start>f.start?1:-1,l=n.sort(r);for(const[d,f]of l.entries())if(f.contains(t)&&l.length>d+1)return l[d+1];for(const d of l)if(d.start>t)return d;return null}getIntervalsForNDays(t,n){const r=[];for(let l=0;l<t;l++){let d=n;d=d.plus({days:l});const f=this.getHours(d);f!=null&&f.openIntervals&&!f.isClosed&&r.push(...f.openIntervals.map(p=>new np(d,p,this.timezone)))}return r}getHolidayHours(t){return this.isTemporarilyClosedAt(t)?null:this.holidayHoursByDate[(t.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(t){if(this.isTemporarilyClosedAt(t))return null;const n=Di($d(t)).toLowerCase();return this.hours[n]}getHours(t){const n=this.getHolidayHours(t);return!n||n.isRegularHours?this.getNormalHours(t):n}getNextInterval(){return this.getIntervalAfter(Dt.now())}isHoliday(t){return!!this.getHolidayHours(t)}isTemporarilyClosedAt(t){if(!this.hours.reopenDate)return!1;const n=this.hours.reopenDate.split("-");if(n.length===3){const[r,l,d]=n,f=Dt.fromObject({year:Number(r),month:Number(l),day:Number(d)},{zone:this.timezone});if(t<f)return!0}return!1}isOpenAt(t){return this.isTemporarilyClosedAt(t)?!1:!!this.getInterval(t)}isOpenNow(){return this.isOpenAt(Dt.now())}}function fS(e,t){const n=[...e];return t=t%n.length,n.concat(n.splice(0,n.length-t))}function hS(e,t){if(e.length!==t.length)return!1;for(const[n,r]of e.entries())if(!r.timeIsEqualTo(t[n]))return!1;return!0}function ha(e){var t,n;return((n=(t=e==null?void 0:e.currentInterval)==null?void 0:t.is24h)==null?void 0:n.call(t))||!1}function ga(e){return!e.futureInterval}function gS(e){return ha(e)?ft.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):ga(e)?ft.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):ft.jsx("span",{className:"HoursStatus-current",children:e.isOpen?"Open Now":"Closed"})}function pS(e){return ha(e)||ga(e)?null:ft.jsx("span",{className:"HoursStatus-separator",children:" • "})}function mS(e){return ha(e)||ga(e)?null:ft.jsx("span",{className:"HoursStatus-future",children:e.isOpen?"Closes at":"Opens at"})}function _S(e){if(ha(e)||ga(e))return null;let t="";if(e.isOpen){const n=e.currentInterval;t+=n?n.getEndTime("en-US",e.timeOptions):""}else{const n=e.futureInterval;t+=n?n.getStartTime("en-US",e.timeOptions):""}return ft.jsxs("span",{className:"HoursStatus-time",children:[" ",t]})}function yS(e){var r,l;if(ha(e)||ga(e))return null;const t={weekday:"long",...e.dayOptions??{}};let n="";if(e.isOpen){const d=e.currentInterval;n+=((r=d==null?void 0:d.end)==null?void 0:r.setLocale("en-US").toLocaleString(t))||""}else{const d=e.futureInterval;n+=((l=d==null?void 0:d.start)==null?void 0:l.setLocale("en-US").toLocaleString(t))||""}return ft.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",n]})}function NS(e,t){const n=e.currentTemplate||gS,r=e.separatorTemplate||pS,l=e.futureTemplate||mS,d=e.timeTemplate||_S,f=e.dayOfWeekTemplate||yS;return ft.jsxs("div",{className:Qs("HoursStatus",(t==null?void 0:t.className)||""),children:[n(e),r(e),l(e),d(e),f(e)]})}const CS=e=>{const[t,n]=rt.useState(!1),[r,l]=rt.useState(!1);rt.useEffect(()=>{l(!0)},[]);const d=e.statusTemplate||NS,f=new s_(e.hours,e.timezone),p=f.isOpenNow(),_=f.getCurrentInterval(),T=f.getNextInterval(),E=(_==null?void 0:_.end)||(T==null?void 0:T.start);if(E&&!t){n(!0);const w=E.toMillis()-Dt.now().toMillis();setTimeout(()=>n(!1),w)}const S={isOpen:p,currentInterval:_,futureInterval:T,...e};return ft.jsx(ft.Fragment,{children:r&&d(S,e)})};function ES(e,t){const n=[];return e.forEach(r=>{const l=n[n.length-1];l?hS(l.intervals,r.intervals)?(l.endDay=r.endDay,l.isToday=l.isToday||r.isToday):n.push({...r}):n.push({...r})}),n.map(r=>{const l=t&&Di(r.startDay)in t?t[Di(r.startDay)]||"":Di(r.startDay),d=t&&Di(r.endDay)in t?t[Di(r.endDay)]||"":Di(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${l}`:`${l} - ${d}`}})}function TS(e,t){const n=[],r=e.intervals.length>0&&e.intervals[0].is24h();return e.intervals.length===0?n.push("Closed"):r?n.push("Open 24 hours"):e.intervals.forEach(l=>{const d=l.getStartTime("en-US",t),f=l.getEndTime("en-US",t);n.push(`${d} - ${f}`)}),n}function xS(e,t,n){const r=[];for(let l=1;l<=7;l++){const d=Dt.fromObject({weekday:l}),f=$d(d);r.push({startDay:f,endDay:f,dayName:n&&Di(f).toLowerCase()in n?n[Di(f).toLowerCase()]||"":Di(f),intervals:e.filter(p=>p.start.weekday===l),isToday:t.weekday===l})}return r}const vS=e=>{const[t,n]=rt.useState(!1);rt.useEffect(()=>{n(!0)},[]);const r=new s_(e.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),l=Dt.now(),d=r.getIntervalsForNDays(7,l);let f=xS(d,l,e.dayOfWeekNames);function p(E){return E?{today:$d(l),monday:sn.Monday,tuesday:sn.Tuesday,wednesday:sn.Wednesday,thursday:sn.Thursday,friday:sn.Friday,saturday:sn.Saturday,sunday:sn.Sunday}[E]:sn.Sunday}let _=[sn.Sunday,sn.Monday,sn.Tuesday,sn.Wednesday,sn.Thursday,sn.Friday,sn.Saturday];const T=_.indexOf(p(e.startOfWeek));return _=fS(_,7-T),f.sort((E,S)=>_.indexOf(E.startDay)-_.indexOf(S.startDay)),e.collapseDays&&(f=ES(f,e.dayOfWeekNames)),ft.jsx(ft.Fragment,{children:t&&ft.jsx("div",{className:Qs("HoursTable",e.className),children:f.map(E=>{const w=(e.intervalStringsBuilderFn||TS)(E,e.timeOptions);return ft.jsxs("div",{className:Qs("HoursTable-row",{"is-today":E.isToday}),children:[ft.jsx("span",{className:"HoursTable-day",children:E.dayName}),ft.jsx("span",{className:"HoursTable-intervals",children:w.map((M,m)=>ft.jsx("span",{className:"HoursTable-interval",children:M},m))})]},E.dayName)})})})},SS=e=>`<script type="application/ld+json">
110
110
  ${JSON.stringify(e)}
111
111
  <\/script>`,wc=(e,t)=>{if(!(!e.name||typeof e.name!="string"))return{"@context":"https://schema.org","@type":t,name:e.name}},wS=e=>typeof e!="object"?!1:!!e.name||!!e.address,OS=e=>typeof e!="object"?!1:!!e.line1||!!e.city||!!e.region||!!e.postalCode||!!e.countryCode,Fd=e=>OS(e)&&{address:{"@type":"PostalAddress",streetAddress:e.line1,addressLocality:e.city,addressRegion:e.region,postalCode:e.postalCode,addressCountry:e.countryCode}},l_=e=>wS(e)&&{"@type":"Place",name:e.name,...Fd(e.address)},a_=e=>typeof e!="object"||!("image"in e)?!1:"url"in e.image&&typeof e.image.url=="string",Oc=e=>{if(!e)return{};const t=new Array;for(const n of e)a_(n)&&t.push(n.image.url);return{image:t}},DS=e=>a_(e)&&{image:e.image.url},AS=e=>typeof e!="object"?!1:!!e.name,MS=e=>Array.isArray(e)&&e.length>0,c_=e=>MS(e)&&{performer:{"@type":"PerformingGroup",name:e.join(" and ")}},u_=e=>AS(e)&&{organizer:{"@type":"Organization",name:e.name,...e.url&&{url:e.url}}},RS=["BackOrder","Discontinued","InStock","InStoreOnly","LimitedAvailability","MadeToOrder","OnlineOnly","OutOfStock","PreOrder","PreSale","Reserved","SoldOut"],bS=e=>typeof e!="object"?!1:"priceCurrency"in e&&"price"in e&&"availability"in e&&RS.includes(e.availability),Bd=e=>bS(e)&&{offers:{"@type":"Offer",url:e.url,priceCurrency:e.priceCurrency,price:e.price,priceValidUntil:e.priceValidUntil,itemCondition:e.itemCondition,availability:e.availability}},LS=(e,t)=>{const n=l_({name:e.geomodifier,address:e.address});return{...wc(e,t??"Event"),...Oc(e.photoGallery),...n&&{location:n},...c_(e.performers),...u_({name:e.organizerName}),...Bd({url:"",priceCurrency:e.c_currency,price:e.price,priceValidUntil:e.expirationDate,itemCondition:e.condition,availability:e.stockStatus}),...e.c_startDate&&{startDate:e.c_startDate},...e.c_endDate&&{endDate:e.c_endDate},...e.description&&{description:e.description},...e.attendance&&{eventAttendanceMode:e.attendance},...e.eventStatus&&{eventStatus:e.eventStatus}}},IS=e=>typeof e!="object"?!1:"monday"in e||"tuesday"in e||"wednesday"in e||"thursday"in e||"friday"in e||"saturday"in e||"sunday"in e,kS=e=>typeof e!="object"?!1:e.isClosed?!0:"openIntervals"in e&&Array.isArray(e.openIntervals)&&e.openIntervals.length?e.openIntervals.every(t=>typeof t=="object"&&"start"in t&&"end"in t):!1,d_=e=>{if(!IS(e))return{};let t=new Map;t=ns(e.monday,t,"Mo"),t=ns(e.tuesday,t,"Tu"),t=ns(e.wednesday,t,"We"),t=ns(e.thursday,t,"Th"),t=ns(e.friday,t,"Fr"),t=ns(e.saturday,t,"Sa"),t=ns(e.sunday,t,"Su");const n=new Array;for(const[r,l]of t){const d=l.join(",");n.push(d+" "+r)}return{openingHours:n}},ns=(e,t,n)=>{if(!kS(e))return t;if(e.isClosed||!e.openIntervals){const r="00:00-00:00",l=t.get(r)??[];return l.push(n),t.set(r,l),t}for(let r=0;r<e.openIntervals.length;r++){const l=e.openIntervals[r].start+"-"+e.openIntervals[r].end,d=t.get(l)??[];d.push(n),t.set(l,d)}return t},PS=(e,t)=>({...wc(e,t??"LocalBusiness"),...Fd(e.address),...d_(e.hours),...Oc(e.photoGallery),description:e.description,telephone:e.mainPhone,email:e.email}),$S=e=>typeof e!="object"?!1:"ratingValue"in e,FS=e=>typeof e!="object"?!1:"ratingValue"in e&&"reviewCount"in e,f_=e=>$S(e)&&{review:{"@type":"Review",reviewRating:{"@type":"Rating",ratingValue:e.ratingValue,bestRating:e.bestRating},...e.author&&{author:{"@type":"Person",name:e.author}}}},h_=e=>FS(e)?{aggregateRating:{"@type":"AggregateRating",ratingValue:e.ratingValue,reviewCount:e.reviewCount}}:void 0,BS=(e,t)=>({...wc(e,t??"Product"),...Oc(e.photoGallery),...f_(e.c_reviews),...h_(e.c_aggregateRating),...Bd({url:"",priceCurrency:e.c_currency,price:e.price,priceValidUntil:e.expirationDate,itemCondition:e.condition,availability:e.stockStatus}),description:e.description,sku:e.sku,mpn:e.mpn,...e.brand&&{brand:{"@type":"Brand",name:e.brand}}}),HS=e=>!e||typeof e!="object"?!1:"question"in e&&"answer"in e,WS=e=>!e||typeof e!="object"?!1:"question"in e&&"answerV2"in e?"json"in e.answerV2&&typeof e.answerV2.json=="object":!1;function id(e,t){for(const n in e)if(typeof e[n]=="object")if(Array.isArray(e[n]))for(let r=0;r<e[n].length;r++)id(e[n][r],t);else id(e[n],t);else n==="text"&&t.push(e[n])}function g_(e){if(e.json){const t=[];return id(e.json,t),t.join("")}return""}const KS=e=>{const t=e.map(n=>{if(HS(n)||WS(n))return{"@type":"Question",name:n.question,acceptedAnswer:{"@type":"Answer",text:"answer"in n?n.answer:g_(n.answerV2)}}}).filter(Boolean);if(t.length)return{"@context":"http://www.schema.org","@type":"FAQPage",mainEntity:t}},od=Math.log2(1.6745627884839434),zS=4,US=19,sd="js-baidu-neg-lng-fix";let p_;const GS=new Promise(e=>p_=e),YS="https://api.map.baidu.com/geoconv/v1/";let Ql=[];const jS="gcj02ToBD09Callback_b872c21c";let VS=0,rp;async function m_(e){return await new Promise((t,n)=>{Ql.push({coordinates:e,resolve:t,reject:n}),Ql.length===1&&(rp=setTimeout(r,100)),Ql.length>40&&(clearTimeout(rp),r());function r(){const l=Ql;Ql=[];const d=[].concat(...l.map(_=>_.coordinates)),f=jS+"_"+VS++,p=document.createElement("script");window[f]=_=>{var S;if(_.status){const w=new Error(`Unable to convert coordinates to BD-09: Received status code ${_.status}${_.message?": "+_.message:""}`);l.forEach(M=>M.reject(w))}const T=_.result.map(w=>new un(w.y,w.x));let E=0;l.forEach(w=>{w.resolve(T.slice(E,E+=w.coordinates.length))}),delete window[f],(S=p.parentNode)==null||S.removeChild(p)},GS.then(_=>{const T={ak:_,callback:f,coords:d.map(E=>`${E.longitude},${E.latitude}`).join(";"),from:3,to:5};p.src=YS+"?"+Object.entries(T).map(([E,S])=>E+"="+S).join("&"),document.head.appendChild(p)})}})}class qS extends rl{constructor(n){super(n);Ie(this,"_wrapper");Ie(this,"map");Ie(this,"_panStartHandler");Ie(this,"_panHandler");Ie(this,"_centerReady");const r=!!(window.MSInputMethodContext&&document.DOCUMENT_NODE);this._wrapper=n.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:n.controlEnabled,maxZoom:r?14:18,...n.providerOptions}),n.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this._panStartHandler=()=>null,this._panHandler=()=>null,this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper&&(this._wrapper.dataset.baiduZoom=this.map.getZoom()),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new un(this.map.getCenter())}getZoom(){return this.map.getZoom()-od}setCenter(n,r){this._centerReady=m_([n]).then(([l])=>{const d=new BMap.Point(l.longitude,l.latitude);this.map.panTo(d,{noAnimation:!r})})}setZoom(n,r){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(n+od)},{enableAnimation:r})})}}class ZS extends il{constructor(n){super(n);Ie(this,"_wrapper");Ie(this,"_zIndex");Ie(this,"_wrapperClass");Ie(this,"_originalWrapperClass");Ie(this,"_element");Ie(this,"_coordinateReady");Ie(this,"_negativeLngFix");Ie(this,"pin");this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;class r extends BMap.Marker{constructor(p,_){super(p);Ie(this,"pin");this.pin=_}initialize(p){return this.pin._wrapper=super.initialize(p),this.pin._wrapper&&(this.pin._wrapper.style.zIndex=this.pin._zIndex.toString(),this.pin._originalWrapperClass=this.pin._wrapper.getAttribute("class")??"",this.pin._wrapper.setAttribute("class",this.pin._getClass()),this.pin._wrapper.appendChild(this.pin._element),this.pin.addListeners()),this.pin._wrapper}draw(){if(this.pin._wrapper){const p=this.pin._wrapper.style.zIndex;super.draw(),this.pin._wrapper.style.height="",this.pin._wrapper.style.width="",this.pin._wrapper.style.pointerEvents="none",this.pin._wrapper.style.zIndex=p}else super.draw()}}this.pin=new r(new BMap.Point(0,0),this);const l=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(l),this.pin.setShadow(l)}addListeners(){super.addListeners(),this._wrapper&&this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(n){this._coordinateReady=m_([n]).then(([r])=>{this._negativeLngFix=r.longitude<0,this.pin.setPosition(new BMap.Point(r.longitude+(this._negativeLngFix?180:0),r.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](sd)})}setMap(n,r){this._coordinateReady.then(()=>{r&&r.getProviderMap().map.removeOverlay(this.pin),n&&n.getProviderMap().map.addOverlay(this.pin)})}setProperties(n){super.setProperties(n),this._wrapperClass=n.getClass(),this._element=n.getElement()||this._pinEl,this._zIndex=n.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?sd:""} ${this._wrapperClass}`}}const JS="https://api.map.baidu.com/getscript";function XS(e,t,n,{params:r={},version:l="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const d=n,f={ak:d,v:l,...r};p_(d);const p=document.createElement("script");p.src=JS+"?"+Object.entries(f).map(([E,S])=>E+"="+S).join("&"),p.onload=()=>e(),document.head.appendChild(p);let _="";for(let E=zS;E<=US;E++){const S=2**(E-od+7);_+=`[data-baidu-zoom="${E}"] .${sd}{transform:translateX(-${S}px);}`}const T=document.createElement("style");T.appendChild(document.createTextNode(_)),document.head.appendChild(T)}const QS=new as().withLoadFunction(XS).withMapClass(qS).withPinClass(ZS).withProviderName("Baidu").build();let __;function ew(){class e extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1});Ie(this,"_container");Ie(this,"_pins");Ie(this,"_viewChangeEventHandler");Ie(this,"_map");this._container=document.createElement("div"),this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(r){this._pins.add(r),r._wrapper&&(r._wrapper.style.position="absolute",this._container.appendChild(r._wrapper)),this._map&&this.updatePinPosition(r)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){this._viewChangeEventHandler&&Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(r){this._pins.delete(r),r._wrapper&&this._container.removeChild(r._wrapper)}updatePinPosition(r){if(!this._map)return;const l=this._map.tryLocationToPixel(r._location,Microsoft.Maps.PixelReference.control);r._wrapper&&l instanceof Microsoft.Maps.Point&&(r._wrapper.style.left=l.x+"px",r._wrapper.style.top=l.y+"px")}updatePinPositions(){this._pins.forEach(r=>this.updatePinPosition(r))}}__=e}class tw extends rl{constructor(n){super(n);Ie(this,"wrapper");Ie(this,"map");Ie(this,"pinOverlay");this.wrapper=n.wrapper,this.wrapper&&(this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!n.controlEnabled,disableZooming:!n.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...n.providerOptions}),this.pinOverlay=new __(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler()))}getCenter(){var n;return new un(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return((n=this.map)==null?void 0:n.getZoom())??0}setCenter(n,r){var d;const l=new Microsoft.Maps.Location(n.latitude,n.longitude);(d=this.map)==null||d.setView({center:l}),this.pinOverlay.updatePinPositions()}setZoom(n,r){var l;(l=this.map)==null||l.setView({zoom:Math.floor(n)}),this.pinOverlay.updatePinPositions()}}class y_ extends il{constructor(n){super(n);Ie(this,"_location");Ie(this,"_map");this._map=null,this._location=new Microsoft.Maps.Location(0,0)}static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}setCoordinate(n){this._location=new Microsoft.Maps.Location(n.latitude,n.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(n,r){r&&r.getProviderMap().pinOverlay.removePin(this),n&&n.getProviderMap().pinOverlay.addPin(this),this._map=n}}Ie(y_,"_pinId");const ip="BingMapsCallback_593d7d33",nw="https://www.bing.com/api/maps/mapcontrol";function rw(e,t,n,{params:r={}}={}){window[ip]=()=>{ew(),e()};const l={callback:ip,key:n,...r};gp(nw+"?"+Object.entries(l).map(([d,f])=>d+"="+f).join("&"))}const iw=new as().withLoadFunction(rw).withMapClass(tw).withPinClass(y_).withProviderName("Bing").build();class ow extends rl{constructor(n){var r,l,d;super(n);Ie(this,"map");if(n.wrapper&&(this.map=new mapboxgl.Map({container:n.wrapper,interactive:n.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...n.providerOptions})),n.controlEnabled){const f=new mapboxgl.NavigationControl({showCompass:!1});(r=this.map)==null||r.addControl(f)}(l=this.map)==null||l.on("movestart",()=>this._panStartHandler()),(d=this.map)==null||d.on("moveend",()=>this._panHandler())}getCenter(){var n;return new un(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return(((n=this.map)==null?void 0:n.getZoom())??0)+1}setCenter(n,r){const l=new mapboxgl.LngLat(n.longitude,n.latitude);this.map&&this.map[r?"panTo":"setCenter"](l)}setZoom(n,r){this.map&&this.map[r?"zoomTo":"setZoom"](n-1)}setZoomCenter(n,r,l){const d=new mapboxgl.LngLat(r.longitude,r.latitude);this.map&&this.map[l?"easeTo":"jumpTo"]({center:d,zoom:n-1})}}class sw extends il{constructor(n){super(n);Ie(this,"pin");this._wrapper&&(this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper}))}setCoordinate(n){var r;(r=this.pin)==null||r.setLngLat(new mapboxgl.LngLat(n.longitude,n.latitude))}setMap(n,r){var l,d;if(n){const f=n.getProviderMap().map;f&&((l=this.pin)==null||l.addTo(f))}else(d=this.pin)==null||d.remove()}}function lw(e,t,n,{version:r="v1.13.0"}={}){const l=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,d=document.createElement("link");d.rel="stylesheet",d.href=l+".css";const f=document.createElement("script");f.src=l+".js",f.onload=()=>{mapboxgl.accessToken=n,e()},document.head.appendChild(d),document.head.appendChild(f)}const aw=new as().withLoadFunction(lw).withMapClass(ow).withPinClass(sw).withProviderName("Mapbox").build();var ls;let N_=(ls=class extends rl{constructor(n){var r,l,d;super(n);Ie(this,"map");this._initMap(n),n.controlEnabled&&((r=this.map)==null||r.zoomControl.setPosition("topright")),(l=this.map)==null||l.on("movestart",()=>this._panStartHandler()),(d=this.map)==null||d.on("moveend",()=>this._panHandler())}getCenter(){var n;return new un(((n=this.map)==null?void 0:n.getCenter())??{lat:0,lng:0})}getZoom(){var n;return((n=this.map)==null?void 0:n.getZoom())??0}setCenter(n,r){var d;const l=new L.LatLng(n.latitude,n.longitude);(d=this.map)==null||d.panTo(l,{animate:r})}setZoom(n,r){var l;(l=this.map)==null||l.setZoom(n,{animate:r})}setZoomCenter(n,r,l){var f;const d=new L.LatLng(r.latitude,r.longitude);(f=this.map)==null||f.setView(d,n,{animate:l})}_initMap(n){n.wrapper&&(this.map=new L.Map(n.wrapper,{boxZoom:n.controlEnabled,doubleClickZoom:n.controlEnabled,dragging:n.controlEnabled,zoom:0,zoomControl:n.controlEnabled,zoomSnap:0,...n.providerOptions}));const r=n.providerOptions,l=r.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",d=r.tileLayerOptions||{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};d.accessToken=ls.apiKey,this.map&&L.tileLayer(l,d).addTo(this.map)}},Ie(ls,"apiKey"),ls),cw=class extends fd{constructor(n){super(n);Ie(this,"pin");this.pin=new L.Marker(new L.LatLng(0,0)),this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(n){const r=new L.LatLng(n.latitude,n.longitude);this.pin.setLatLng(r)}setMap(n,r){if(n){const l=n.getProviderMap().map;l&&this.pin.addTo(l)}else this.pin.remove()}setProperties(n){const r=n.getWidth(),l=n.getHeight(),d=n.getAnchorX(),f=n.getAnchorY();this.pin.setIcon(new L.Icon({iconUrl:this._icons[n.getIcon()],iconSize:[r,l],iconAnchor:[d*r,f*l],className:n.getClass()})),this.pin.setZIndexOffset(n.getZIndex())}};function uw(e,t,n,{version:r="1.7.1"}={}){const l=`https://unpkg.com/leaflet@${r}/dist/leaflet`;N_.apiKey=n;const d=document.createElement("link");d.rel="stylesheet",d.href=l+".css";const f=document.createElement("script");f.src=l+".js",f.onload=()=>e(),document.head.appendChild(d),document.head.appendChild(f)}const Hd=new as().withLoadFunction(uw).withMapClass(N_).withPinClass(cw).withProviderName("Leaflet").build(),dw=Hd.getMapClass(),fw=Hd.getPinClass();class hw extends dw{constructor(){super(...arguments);Ie(this,"map")}_initMap(n){this.map=L.mapquest.map(n.wrapper,{boxZoom:n.controlEnabled,center:new L.LatLng(0,0),doubleClickZoom:n.controlEnabled,dragging:n.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:n.controlEnabled,zoomSnap:0,...n.providerOptions})}}class gw extends fw{}function pw(e,t,n,{version:r="v1.3.2"}={}){const l=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,d=document.createElement("link");d.rel="stylesheet",d.href=l+".css";const f=document.createElement("script");f.src=l+".js",f.onload=()=>{L.mapquest.key=n,e()},document.head.appendChild(d),document.head.appendChild(f)}const mw=new as().withLoadFunction(pw).withMapClass(hw).withPinClass(gw).withProviderName("MapQuest").build();exports.Address=uy;exports.AddressSchema=Fd;exports.AggregateRatingSchema=h_;exports.Analytics=cp;exports.AnalyticsContext=ud;exports.AnalyticsProvider=aN;exports.AnalyticsScopeProvider=cN;exports.BaiduMaps=QS;exports.BaseSchema=wc;exports.BingMaps=iw;exports.Clusterer=BN;exports.Coordinate=un;exports.Day=sn;exports.Event=LS;exports.FAQPage=KS;exports.GoogleMaps=_p;exports.HoursStatus=CS;exports.HoursTable=vS;exports.Image=_N;exports.ImageLayoutOption=xo;exports.LeafletMaps=Hd;exports.LegacyRichText=ux;exports.LexicalRichText=TE;exports.Link=hp;exports.LinkTypes=xN;exports.ListingPublisherOption=op;exports.LocalBusiness=PS;exports.LocationMap=KN;exports.LocationSchema=l_;exports.Map=Cp;exports.MapProviderOption=Wu;exports.MapQuestMaps=mw;exports.MapboxMaps=aw;exports.Marker=pd;exports.OfferSchema=Bd;exports.OpeningHoursSchema=d_;exports.OrganizationSchema=u_;exports.PerformerSchema=c_;exports.PhotoGallerySchema=Oc;exports.PhotoSchema=DS;exports.Product=BS;exports.ReviewSchema=f_;exports.SchemaWrapper=SS;exports.asciiAlpha=bE;exports.asciiAlphanumeric=Ju;exports.asciiAtext=LE;exports.asciiControl=IE;exports.asciiDigit=kE;exports.asciiHexDigit=PE;exports.asciiPunctuation=$E;exports.c=Qs;exports.classifyCharacter=la;exports.combineExtensions=Gp;exports.createState=XT;exports.debuggingParamDetected=cc;exports.getDefaultExportFromCjs=ad;exports.getDirections=ay;exports.getRichTextContent=g_;exports.getRuntime=Xs;exports.jsxRuntimeExports=ft;exports.markdownLineEnding=FE;exports.markdownLineEndingOrSpace=Xp;exports.markdownSpace=BE;exports.normalizeUri=sl;exports.push=js;exports.resolveAll=Qp;exports.splice=yc;exports.useAnalytics=nl;exports.useClusterContext=FN;exports.useIdentify=fN;exports.useMapContext=PN;exports.usePageView=dN;exports.useScope=dd;exports.useTrack=uN;exports.visit=Dd;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-CMl7zBKp.cjs");function er(n){const t=[];let e=-1;for(;++e<n.footnoteOrder.length;){const r=n.footnoteById[n.footnoteOrder[e]];if(!r)continue;const i=n.all(r),l=String(r.identifier).toUpperCase(),o=m.normalizeUri(l.toLowerCase());let a=0;const s=[];for(;++a<=n.footnoteCounts[l];){const p={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:n.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const p=c.children[c.children.length-1];p&&p.type==="text"?p.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else i.push(...s);const d={type:"element",tagName:"li",properties:{id:n.clobberPrefix+"fn-"+o},children:n.wrap(i,!0)};n.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:n.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(n.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:n.footnoteLabel}]},{type:"text",value:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-DFMeoKHF.cjs");function er(n){const t=[];let e=-1;for(;++e<n.footnoteOrder.length;){const r=n.footnoteById[n.footnoteOrder[e]];if(!r)continue;const i=n.all(r),l=String(r.identifier).toUpperCase(),o=m.normalizeUri(l.toLowerCase());let a=0;const s=[];for(;++a<=n.footnoteCounts[l];){const p={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:n.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const p=c.children[c.children.length-1];p&&p.type==="text"?p.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else i.push(...s);const d={type:"element",tagName:"li",properties:{id:n.clobberPrefix+"fn-"+o},children:n.wrap(i,!0)};n.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:n.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(n.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:n.footnoteLabel}]},{type:"text",value:`
2
2
  `},{type:"element",tagName:"ol",properties:{},children:n.wrap(t,!0)},{type:"text",value:`
3
3
  `}]}}function yt(n,t){const e=m.createState(n,t),r=e.one(n,null),i=er(e);return i&&r.children.push({type:"text",value:`
4
4
  `},i),Array.isArray(r)?{type:"root",children:r}:r}const tr=function(n,t){return n&&"run"in n?rr(n,t):ir(n||t)};function rr(n,t){return(e,r,i)=>{n.run(yt(e,t),r,l=>{i(l)})}}function ir(n){return t=>yt(t,n)}const Pe=["http","https","mailto","tel"];function xt(n){const t=(n||"").trim(),e=t.charAt(0);if(e==="#"||e==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<Pe.length;){const l=Pe[i];if(r===l.length&&t.slice(0,l.length).toLowerCase()===l)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*!
@@ -1,5 +1,5 @@
1
1
  import zn from "react";
2
- import { n as cr, a as fr, b as Hn, m as K, d as D, s as In, p as Sn, r as Pe, e as De, f as Tn, h as vn, i as me, k as pr, l as hr, o as ge, q as dr, t as bn, u as mr, v as gr } from "./index-DmrYUFTF.js";
2
+ import { n as cr, a as fr, b as Hn, m as K, d as D, s as In, p as Sn, r as Pe, e as De, f as Tn, h as vn, i as me, k as pr, l as hr, o as ge, q as dr, t as bn, u as mr, v as gr } from "./index-BD3PUS-n.js";
3
3
  function yr(n) {
4
4
  const t = [];
5
5
  let e = -1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CMl7zBKp.cjs");exports.Address=e.Address;exports.AddressSchema=e.AddressSchema;exports.AggregateRatingSchema=e.AggregateRatingSchema;exports.Analytics=e.Analytics;exports.AnalyticsContext=e.AnalyticsContext;exports.AnalyticsProvider=e.AnalyticsProvider;exports.AnalyticsScopeProvider=e.AnalyticsScopeProvider;exports.BaiduMaps=e.BaiduMaps;exports.BaseSchema=e.BaseSchema;exports.BingMaps=e.BingMaps;exports.Clusterer=e.Clusterer;exports.CoordinateClass=e.Coordinate;exports.Day=e.Day;exports.Event=e.Event;exports.FAQPage=e.FAQPage;exports.GoogleMaps=e.GoogleMaps;exports.HoursStatus=e.HoursStatus;exports.HoursTable=e.HoursTable;exports.Image=e.Image;exports.ImageLayoutOption=e.ImageLayoutOption;exports.LeafletMaps=e.LeafletMaps;exports.LegacyRichText=e.LegacyRichText;exports.LexicalRichText=e.LexicalRichText;exports.Link=e.Link;exports.LinkTypes=e.LinkTypes;exports.ListingPublisherOption=e.ListingPublisherOption;exports.LocalBusiness=e.LocalBusiness;exports.LocationMap=e.LocationMap;exports.LocationSchema=e.LocationSchema;exports.Map=e.Map;exports.MapProviderOption=e.MapProviderOption;exports.MapQuestMaps=e.MapQuestMaps;exports.MapboxMaps=e.MapboxMaps;exports.Marker=e.Marker;exports.OfferSchema=e.OfferSchema;exports.OpeningHoursSchema=e.OpeningHoursSchema;exports.OrganizationSchema=e.OrganizationSchema;exports.PerformerSchema=e.PerformerSchema;exports.PhotoGallerySchema=e.PhotoGallerySchema;exports.PhotoSchema=e.PhotoSchema;exports.Product=e.Product;exports.ReviewSchema=e.ReviewSchema;exports.SchemaWrapper=e.SchemaWrapper;exports.debuggingParamDetected=e.debuggingParamDetected;exports.getDirections=e.getDirections;exports.getRichTextContent=e.getRichTextContent;exports.useAnalytics=e.useAnalytics;exports.useClusterContext=e.useClusterContext;exports.useIdentify=e.useIdentify;exports.useMapContext=e.useMapContext;exports.usePageView=e.usePageView;exports.useScope=e.useScope;exports.useTrack=e.useTrack;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DFMeoKHF.cjs");exports.Address=e.Address;exports.AddressSchema=e.AddressSchema;exports.AggregateRatingSchema=e.AggregateRatingSchema;exports.Analytics=e.Analytics;exports.AnalyticsContext=e.AnalyticsContext;exports.AnalyticsProvider=e.AnalyticsProvider;exports.AnalyticsScopeProvider=e.AnalyticsScopeProvider;exports.BaiduMaps=e.BaiduMaps;exports.BaseSchema=e.BaseSchema;exports.BingMaps=e.BingMaps;exports.Clusterer=e.Clusterer;exports.CoordinateClass=e.Coordinate;exports.Day=e.Day;exports.Event=e.Event;exports.FAQPage=e.FAQPage;exports.GoogleMaps=e.GoogleMaps;exports.HoursStatus=e.HoursStatus;exports.HoursTable=e.HoursTable;exports.Image=e.Image;exports.ImageLayoutOption=e.ImageLayoutOption;exports.LeafletMaps=e.LeafletMaps;exports.LegacyRichText=e.LegacyRichText;exports.LexicalRichText=e.LexicalRichText;exports.Link=e.Link;exports.LinkTypes=e.LinkTypes;exports.ListingPublisherOption=e.ListingPublisherOption;exports.LocalBusiness=e.LocalBusiness;exports.LocationMap=e.LocationMap;exports.LocationSchema=e.LocationSchema;exports.Map=e.Map;exports.MapProviderOption=e.MapProviderOption;exports.MapQuestMaps=e.MapQuestMaps;exports.MapboxMaps=e.MapboxMaps;exports.Marker=e.Marker;exports.OfferSchema=e.OfferSchema;exports.OpeningHoursSchema=e.OpeningHoursSchema;exports.OrganizationSchema=e.OrganizationSchema;exports.PerformerSchema=e.PerformerSchema;exports.PhotoGallerySchema=e.PhotoGallerySchema;exports.PhotoSchema=e.PhotoSchema;exports.Product=e.Product;exports.ReviewSchema=e.ReviewSchema;exports.SchemaWrapper=e.SchemaWrapper;exports.debuggingParamDetected=e.debuggingParamDetected;exports.getDirections=e.getDirections;exports.getRichTextContent=e.getRichTextContent;exports.useAnalytics=e.useAnalytics;exports.useClusterContext=e.useClusterContext;exports.useIdentify=e.useIdentify;exports.useMapContext=e.useMapContext;exports.usePageView=e.usePageView;exports.useScope=e.useScope;exports.useTrack=e.useTrack;
@@ -1,4 +1,4 @@
1
- import { A as e, a4 as t, ac as i, x as o, y as r, E as c, H as n, ae as p, _ as g, af as u, R as h, ak as m, Y as l, $ as S, a2 as d, ag as M, W as y, X as P, I as L, J as x, ai as A, V as C, U as f, K as O, N as T, L as R, a0 as b, T as k, a5 as v, O as B, M as D, aj as H, ah as I, Q as w, a7 as G, a6 as Q, a9 as z, a8 as E, aa as F, ab as V, a1 as W, ad as j, Z as J, F as K, w as N, a3 as U, z as X, S as Y, D as Z, P as _, C as $, G as q, B as aa } from "./index-DmrYUFTF.js";
1
+ import { A as e, a4 as t, ac as i, x as o, y as r, E as c, H as n, ae as p, _ as g, af as u, R as h, ak as m, Y as l, $ as S, a2 as d, ag as M, W as y, X as P, I as L, J as x, ai as A, V as C, U as f, K as O, N as T, L as R, a0 as b, T as k, a5 as v, O as B, M as D, aj as H, ah as I, Q as w, a7 as G, a6 as Q, a9 as z, a8 as E, aa as F, ab as V, a1 as W, ad as j, Z as J, F as K, w as N, a3 as U, z as X, S as Y, D as Z, P as _, C as $, G as q, B as aa } from "./index-BD3PUS-n.js";
2
2
  export {
3
3
  e as Address,
4
4
  t as AddressSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yext/pages-components",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "A React component library that supports Yext Pages development",
5
5
  "author": "sumo@yext.com",
6
6
  "license": "BSD-3-Clause",