@byuckchon-frontend/utils 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const gu = () => ({
1
+ const wu = () => ({
2
2
  formatPhoneNumber: (i) => {
3
3
  const a = (i ?? "").replace(/\D/g, "");
4
4
  if (/^1[568]\d{7}$/.test(a))
@@ -136,7 +136,7 @@ function zs(t, e = 10) {
136
136
  const n = typeof t == "string" ? t : t.name;
137
137
  return !(!Ls.test(n) || t instanceof File && t.size / 1048576 > e);
138
138
  }
139
- const wu = {
139
+ const yu = {
140
140
  email: Is,
141
141
  phone: Fs,
142
142
  homePhone: vs,
@@ -1901,23 +1901,23 @@ B.getAdapter = Wr.getAdapter;
1901
1901
  B.HttpStatusCode = cn;
1902
1902
  B.default = B;
1903
1903
  const {
1904
- Axios: Tu,
1905
- AxiosError: Eu,
1906
- CanceledError: Ou,
1907
- isCancel: Au,
1908
- CancelToken: _u,
1909
- VERSION: xu,
1910
- all: Du,
1911
- Cancel: Ru,
1912
- isAxiosError: Su,
1913
- spread: Mu,
1914
- toFormData: Pu,
1915
- AxiosHeaders: Nu,
1916
- HttpStatusCode: Cu,
1917
- formToJSON: ku,
1918
- getAdapter: Lu,
1919
- mergeConfig: Iu
1920
- } = B, Fu = ({ error: t, message: e = "알 수 없는 에러가 발생했습니다.", callback: n }) => B.isAxiosError(t) ? (n?.(), {
1904
+ Axios: Eu,
1905
+ AxiosError: Ou,
1906
+ CanceledError: Au,
1907
+ isCancel: _u,
1908
+ CancelToken: xu,
1909
+ VERSION: Du,
1910
+ all: Ru,
1911
+ Cancel: Su,
1912
+ isAxiosError: Mu,
1913
+ spread: Pu,
1914
+ toFormData: Nu,
1915
+ AxiosHeaders: Cu,
1916
+ HttpStatusCode: ku,
1917
+ formToJSON: Lu,
1918
+ getAdapter: Iu,
1919
+ mergeConfig: Fu
1920
+ } = B, vu = ({ error: t, message: e = "알 수 없는 에러가 발생했습니다.", callback: n }) => B.isAxiosError(t) ? (n?.(), {
1921
1921
  type: "axios",
1922
1922
  message: t.response?.data?.message ?? e,
1923
1923
  status: t.response?.status
@@ -2008,7 +2008,7 @@ function Di() {
2008
2008
  const t = yn();
2009
2009
  return t === "ios" || t === "android" ? t : jr() ? "macos" : "web";
2010
2010
  }
2011
- const vu = {
2011
+ const Hu = {
2012
2012
  isServer: be,
2013
2013
  isClient: Ai,
2014
2014
  isIOS: zr,
@@ -2575,7 +2575,7 @@ const Qi = {
2575
2575
  allowAttributes: {},
2576
2576
  dropElements: [],
2577
2577
  dropAttributes: {}
2578
- }, mr = (t) => t ? Array.from(new Set(Object.values(t).flat())) : [], Hu = ({ content: t, config: e }) => {
2578
+ }, mr = (t) => t ? Array.from(new Set(Object.values(t).flat())) : [], Uu = ({ content: t, config: e }) => {
2579
2579
  const n = { ...Qi, ...e }, r = mr(n.allowAttributes), s = r.length > 0 ? {
2580
2580
  ALLOWED_ATTR: [.../* @__PURE__ */ new Set([...r, "class", "id", "style"])]
2581
2581
  } : {}, o = mr(n.dropAttributes), i = o.length > 0 ? { FORBID_ATTR: o } : {}, a = n.addElements && n.addElements.length > 0 && !(n.allowElements && n.allowElements.length > 0) ? { ADD_TAGS: n.addElements } : {}, d = n.allowElements && n.allowElements.length > 0 ? { ALLOWED_TAGS: n.allowElements } : {}, f = n.dropElements && n.dropElements.length > 0 ? { FORBID_TAGS: n.dropElements } : {}, l = {
@@ -5497,13 +5497,17 @@ function pu(t, e) {
5497
5497
  const n = typeof t == "string" ? new Date(t) : t, r = typeof e == "string" ? new Date(e) : e;
5498
5498
  return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth() && n.getDate() === r.getDate();
5499
5499
  }
5500
- const Uu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5500
+ const gu = (t, e) => {
5501
+ const n = typeof t == "string" ? new Date(t) : t, r = typeof e == "string" ? new Date(e) : e, s = n.setSeconds(0, 0), o = r.setSeconds(0, 0);
5502
+ return s === o;
5503
+ }, Bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5501
5504
  __proto__: null,
5502
5505
  afterDate: du,
5503
5506
  beforeDate: fu,
5504
5507
  formatDate: gs,
5505
5508
  formatToCustomKoreanTime: hu,
5506
5509
  isSameDay: pu,
5510
+ isSameMinute: gu,
5507
5511
  kstToUtc: cu,
5508
5512
  parseDate: lu,
5509
5513
  relativeTime: mu,
@@ -5511,11 +5515,11 @@ const Uu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5511
5515
  utcToKst: au
5512
5516
  }, Symbol.toStringTag, { value: "Module" }));
5513
5517
  export {
5514
- gu as FormatData,
5515
- Hu as SanitizeHtml,
5516
- Uu as dateUtils,
5518
+ wu as FormatData,
5519
+ Uu as SanitizeHtml,
5520
+ Bu as dateUtils,
5517
5521
  Oi as filterParams,
5518
- Fu as handleError,
5519
- vu as userAgent,
5520
- wu as validate
5522
+ vu as handleError,
5523
+ Hu as userAgent,
5524
+ yu as validate
5521
5525
  };
package/dist/index.umd.js CHANGED
@@ -4,4 +4,4 @@
4
4
  `+i.map(sr).join(`
5
5
  `):" "+sr(i[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const or={getAdapter:ai,adapters:jt};function Gt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Le(null,t)}function ir(t){return Gt(t),t.headers=J.from(t.headers),t.data=zt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),or.getAdapter(t.adapter||Ve.adapter,t)(t).then(function(r){return Gt(t),r.data=zt.call(t,t.transformResponse,r),r.headers=J.from(r.headers),r},function(r){return zn(r)||(Gt(t),r&&r.response&&(r.response.data=zt.call(t,t.transformResponse,r.response),r.response.headers=J.from(r.response.headers))),Promise.reject(r)})}const ar="1.13.2",yt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{yt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const cr={};yt.transitional=function(e,n,r){function s(o,i){return"[Axios v"+ar+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(e===!1)throw new O(s(i," has been removed"+(n?" in "+n:"")),O.ERR_DEPRECATED);return n&&!cr[i]&&(cr[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,i,a):!0}},yt.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function ci(t,e,n){if(typeof t!="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],i=e[o];if(i){const a=t[o],d=a===void 0||i(a,o,t);if(d!==!0)throw new O("option "+o+" must be "+d,O.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new O("Unknown option "+o,O.ERR_BAD_OPTION)}}const bt={assertOptions:ci,validators:yt},ue=bt.validators;let De=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Wn,response:new Wn}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
6
  `+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=xe(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&bt.assertOptions(r,{silentJSONParsing:ue.transitional(ue.boolean),forcedJSONParsing:ue.transitional(ue.boolean),clarifyTimeoutError:ue.transitional(ue.boolean)},!1),s!=null&&(u.isFunction(s)?n.paramsSerializer={serialize:s}:bt.assertOptions(s,{encode:ue.function,serialize:ue.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bt.assertOptions(n,{baseUrl:ue.spelling("baseURL"),withXsrfToken:ue.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&u.merge(o.common,o[n.method]);o&&u.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=J.concat(i,o);const a=[];let d=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(d=d&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const f=[];this.interceptors.response.forEach(function(b){f.push(b.fulfilled,b.rejected)});let l,p=0,w;if(!d){const m=[ir.bind(this),void 0];for(m.unshift(...a),m.push(...f),w=m.length,l=Promise.resolve(n);p<w;)l=l.then(m[p++],m[p++]);return l}w=a.length;let A=n;for(;p<w;){const m=a[p++],b=a[p++];try{A=m(A)}catch(h){b.call(this,h);break}}try{l=ir.call(this,A)}catch(m){return Promise.reject(m)}for(p=0,w=f.length;p<w;)l=l.then(f[p++],f[p++]);return l}getUri(e){e=xe(this.defaults,e);const n=Qn(e.baseURL,e.url,e.allowAbsoluteUrls);return Bn(n,e.params,e.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(e){De.prototype[e]=function(n,r){return this.request(xe(r||{},{method:e,url:n,data:(r||{}).data}))}}),u.forEach(["post","put","patch"],function(e){function n(r){return function(o,i,a){return this.request(xe(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}De.prototype[e]=n(),De.prototype[e+"Form"]=n(!0)});let ui=class bs{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},e(function(o,i,a){r.reason||(r.reason=new Le(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new bs(function(s){e=s}),cancel:e}}};function li(t){return function(n){return t.apply(null,n)}}function fi(t){return u.isObject(t)&&t.isAxiosError===!0}const Xt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Xt).forEach(([t,e])=>{Xt[e]=t});function ur(t){const e=new De(t),n=xn(De.prototype.request,e);return u.extend(n,De.prototype,e,{allOwnKeys:!0}),u.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return ur(xe(t,s))},n}const v=ur(Ve);v.Axios=De,v.CanceledError=Le,v.CancelToken=ui,v.isCancel=zn,v.VERSION=ar,v.toFormData=ht,v.AxiosError=O,v.Cancel=v.CanceledError,v.all=function(e){return Promise.all(e)},v.spread=li,v.isAxiosError=fi,v.mergeConfig=xe,v.AxiosHeaders=J,v.formToJSON=t=>Yn(u.isHTMLForm(t)?new FormData(t):t),v.getAdapter=or.getAdapter,v.HttpStatusCode=Xt,v.default=v;const{Axios:Eu,AxiosError:Au,CanceledError:Ou,isCancel:_u,CancelToken:xu,VERSION:Du,all:Ru,Cancel:Su,isAxiosError:Mu,spread:Pu,toFormData:Nu,AxiosHeaders:Cu,HttpStatusCode:ku,formToJSON:Lu,getAdapter:Iu,mergeConfig:Fu}=v,di=({error:t,message:e="알 수 없는 에러가 발생했습니다.",callback:n})=>v.isAxiosError(t)?(n?.(),{type:"axios",message:t.response?.data?.message??e,status:t.response?.status}):t instanceof Error?(n?.(),{type:"client",message:t.message||e}):(n?.(),{type:"unknown",message:e}),lr=(t,e={})=>{const{removeUndefined:n=!0,removeNull:r=!0,removeEmptyString:s=!0,removeEmptyArray:o=!0,removeEmptyObject:i=!0,normalizeNumbers:a=!1,normalizeBooleans:d=!1,normalizeNested:f=!1}=e,l=w=>{switch(!0){case(n&&w===void 0):return!0;case(r&&w===null):return!0;case(s&&w===""):return!0;case(o&&Array.isArray(w)&&w.length===0):return!0;case(i&&typeof w=="object"&&w!==null&&!Array.isArray(w)&&Object.keys(w).length===0):return!0;default:return!1}},p=w=>{if(typeof w=="object"&&w!==null){if(Array.isArray(w))return f?w.map(A=>p(A)).filter(A=>!l(A)):w;if(typeof w=="object")return f?lr(w,e):w}if(typeof w=="string"){const A=w.trim();if(d){const m=A.toLowerCase();if(m==="true")return!0;if(m==="false")return!1}return A}return a&&typeof w=="number"?String(w):w};return Object.fromEntries(Object.entries(t).map(([w,A])=>[w,p(A)]).filter(([,w])=>!l(w)))};function pe(){return typeof window>"u"||"Deno"in globalThis}function mi(){return!pe()}function fr(){return pe()?!1:/ipad|iphone/i.test(navigator.userAgent)}function dr(){return pe()?!1:/Macintosh|MacIntel|MacPPC|Mac68K/.test(navigator.platform)}function mr(){return pe()?!1:/Android/i.test(navigator.userAgent)}function hi(){return pe()?!1:/MSIE|Trident/i.test(navigator.userAgent)}function hr(){return pe()?!1:/KAKAOTALK/i.test(navigator.userAgent)}function Qt(){return pe()?!1:fr()?"ios":mr()?"android":"web"}function pi(){const t=Qt();return t==="ios"||t==="android"}function gi(){if(pe())return"server";if(hr())return"kakao";const t=Qt();return t==="ios"||t==="android"?t:dr()?"macos":"web"}const wi={isServer:pe,isClient:mi,isIOS:fr,isAndroid:mr,isMacOS:dr,isIE:hi,isKakaoWebView:hr,isMobileWeb:pi,getOSByUserAgent:Qt,getPlatform:gi};const{entries:pr,setPrototypeOf:gr,isFrozen:yi,getPrototypeOf:bi,getOwnPropertyDescriptor:Ti}=Object;let{freeze:X,seal:re,create:Vt}=Object,{apply:Kt,construct:Jt}=typeof Reflect<"u"&&Reflect;X||(X=function(e){return e}),re||(re=function(e){return e}),Kt||(Kt=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return e.apply(n,s)}),Jt||(Jt=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const Tt=V(Array.prototype.forEach),Ei=V(Array.prototype.lastIndexOf),wr=V(Array.prototype.pop),Je=V(Array.prototype.push),Ai=V(Array.prototype.splice),Et=V(String.prototype.toLowerCase),Zt=V(String.prototype.toString),en=V(String.prototype.match),Ze=V(String.prototype.replace),Oi=V(String.prototype.indexOf),_i=V(String.prototype.trim),ie=V(Object.prototype.hasOwnProperty),Q=V(RegExp.prototype.test),et=xi(TypeError);function V(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return Kt(t,e,r)}}function xi(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Jt(t,n)}}function x(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Et;gr&&gr(t,null);let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const o=n(s);o!==s&&(yi(e)||(e[r]=o),s=o)}t[s]=!0}return t}function Di(t){for(let e=0;e<t.length;e++)ie(t,e)||(t[e]=null);return t}function le(t){const e=Vt(null);for(const[n,r]of pr(t))ie(t,n)&&(Array.isArray(r)?e[n]=Di(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=le(r):e[n]=r);return e}function tt(t,e){for(;t!==null;){const r=Ti(t,e);if(r){if(r.get)return V(r.get);if(typeof r.value=="function")return V(r.value)}t=bi(t)}function n(){return null}return n}const yr=X(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),tn=X(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),nn=X(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ri=X(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),rn=X(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Si=X(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),br=X(["#text"]),Tr=X(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),sn=X(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Er=X(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),At=X(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Mi=re(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Pi=re(/<%[\w\W]*|[\w\W]*%>/gm),Ni=re(/\$\{[\w\W]*/gm),Ci=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),ki=re(/^aria-[\-\w]+$/),Ar=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Li=re(/^(?:\w+script|data):/i),Ii=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Or=re(/^html$/i),Fi=re(/^[a-z][.\w]*(-[.\w]+)+$/i);var _r=Object.freeze({__proto__:null,ARIA_ATTR:ki,ATTR_WHITESPACE:Ii,CUSTOM_ELEMENT:Fi,DATA_ATTR:Ci,DOCTYPE_NAME:Or,ERB_EXPR:Pi,IS_ALLOWED_URI:Ar,IS_SCRIPT_OR_DATA:Li,MUSTACHE_EXPR:Mi,TMPLIT_EXPR:Ni});const nt={element:1,text:3,progressingInstruction:7,comment:8,document:9},vi=function(){return typeof window>"u"?null:window},Hi=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},xr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Dr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vi();const e=T=>Dr(T);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==nt.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,s=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:i,Node:a,Element:d,NodeFilter:f,NamedNodeMap:l=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:w,trustedTypes:A}=t,m=d.prototype,b=tt(m,"cloneNode"),h=tt(m,"remove"),E=tt(m,"nextSibling"),P=tt(m,"childNodes"),S=tt(m,"parentNode");if(typeof i=="function"){const T=n.createElement("template");T.content&&T.content.ownerDocument&&(n=T.content.ownerDocument)}let _,C="";const{implementation:Z,createNodeIterator:ee,createDocumentFragment:it,getElementsByTagName:He}=n,{importNode:Dt}=r;let q=xr();e.isSupported=typeof pr=="function"&&typeof S=="function"&&Z&&Z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Oe,ERB_EXPR:ge,TMPLIT_EXPR:ae,DATA_ATTR:Rt,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:St,ATTR_WHITESPACE:ce,CUSTOM_ELEMENT:Mt}=_r;let{IS_ALLOWED_URI:Pt}=_r,N=null;const we=x({},[...yr,...tn,...nn,...rn,...br]);let B=null;const Me=x({},[...Tr,...sn,...Er,...At]);let k=Object.seal(Vt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),at=null,mn=null;const Ue=Object.seal(Vt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Zr=!0,hn=!0,es=!1,ts=!0,Be=!1,Nt=!0,Pe=!1,pn=!1,gn=!1,We=!1,Ct=!1,kt=!1,ns=!0,rs=!1;const au="user-content-";let wn=!0,ct=!1,$e={},me=null;const yn=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ss=null;const os=x({},["audio","video","img","source","image","track"]);let bn=null;const is=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",It="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let Ye=ye,Tn=!1,En=null;const cu=x({},[Lt,It,ye],Zt);let Ft=x({},["mi","mo","mn","ms","mtext"]),vt=x({},["annotation-xml"]);const uu=x({},["title","style","font","a","script"]);let ut=null;const lu=["application/xhtml+xml","text/html"],fu="text/html";let $=null,qe=null;const du=n.createElement("form"),as=function(c){return c instanceof RegExp||c instanceof Function},An=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(qe&&qe===c)){if((!c||typeof c!="object")&&(c={}),c=le(c),ut=lu.indexOf(c.PARSER_MEDIA_TYPE)===-1?fu:c.PARSER_MEDIA_TYPE,$=ut==="application/xhtml+xml"?Zt:Et,N=ie(c,"ALLOWED_TAGS")?x({},c.ALLOWED_TAGS,$):we,B=ie(c,"ALLOWED_ATTR")?x({},c.ALLOWED_ATTR,$):Me,En=ie(c,"ALLOWED_NAMESPACES")?x({},c.ALLOWED_NAMESPACES,Zt):cu,bn=ie(c,"ADD_URI_SAFE_ATTR")?x(le(is),c.ADD_URI_SAFE_ATTR,$):is,ss=ie(c,"ADD_DATA_URI_TAGS")?x(le(os),c.ADD_DATA_URI_TAGS,$):os,me=ie(c,"FORBID_CONTENTS")?x({},c.FORBID_CONTENTS,$):yn,at=ie(c,"FORBID_TAGS")?x({},c.FORBID_TAGS,$):le({}),mn=ie(c,"FORBID_ATTR")?x({},c.FORBID_ATTR,$):le({}),$e=ie(c,"USE_PROFILES")?c.USE_PROFILES:!1,Zr=c.ALLOW_ARIA_ATTR!==!1,hn=c.ALLOW_DATA_ATTR!==!1,es=c.ALLOW_UNKNOWN_PROTOCOLS||!1,ts=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Be=c.SAFE_FOR_TEMPLATES||!1,Nt=c.SAFE_FOR_XML!==!1,Pe=c.WHOLE_DOCUMENT||!1,We=c.RETURN_DOM||!1,Ct=c.RETURN_DOM_FRAGMENT||!1,kt=c.RETURN_TRUSTED_TYPE||!1,gn=c.FORCE_BODY||!1,ns=c.SANITIZE_DOM!==!1,rs=c.SANITIZE_NAMED_PROPS||!1,wn=c.KEEP_CONTENT!==!1,ct=c.IN_PLACE||!1,Pt=c.ALLOWED_URI_REGEXP||Ar,Ye=c.NAMESPACE||ye,Ft=c.MATHML_TEXT_INTEGRATION_POINTS||Ft,vt=c.HTML_INTEGRATION_POINTS||vt,k=c.CUSTOM_ELEMENT_HANDLING||{},c.CUSTOM_ELEMENT_HANDLING&&as(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(k.tagNameCheck=c.CUSTOM_ELEMENT_HANDLING.tagNameCheck),c.CUSTOM_ELEMENT_HANDLING&&as(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(k.attributeNameCheck=c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(k.allowCustomizedBuiltInElements=c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Be&&(hn=!1),Ct&&(We=!0),$e&&(N=x({},br),B=[],$e.html===!0&&(x(N,yr),x(B,Tr)),$e.svg===!0&&(x(N,tn),x(B,sn),x(B,At)),$e.svgFilters===!0&&(x(N,nn),x(B,sn),x(B,At)),$e.mathMl===!0&&(x(N,rn),x(B,Er),x(B,At))),c.ADD_TAGS&&(typeof c.ADD_TAGS=="function"?Ue.tagCheck=c.ADD_TAGS:(N===we&&(N=le(N)),x(N,c.ADD_TAGS,$))),c.ADD_ATTR&&(typeof c.ADD_ATTR=="function"?Ue.attributeCheck=c.ADD_ATTR:(B===Me&&(B=le(B)),x(B,c.ADD_ATTR,$))),c.ADD_URI_SAFE_ATTR&&x(bn,c.ADD_URI_SAFE_ATTR,$),c.FORBID_CONTENTS&&(me===yn&&(me=le(me)),x(me,c.FORBID_CONTENTS,$)),c.ADD_FORBID_CONTENTS&&(me===yn&&(me=le(me)),x(me,c.ADD_FORBID_CONTENTS,$)),wn&&(N["#text"]=!0),Pe&&x(N,["html","head","body"]),N.table&&(x(N,["tbody"]),delete at.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=c.TRUSTED_TYPES_POLICY,C=_.createHTML("")}else _===void 0&&(_=Hi(A,s)),_!==null&&typeof C=="string"&&(C=_.createHTML(""));X&&X(c),qe=c}},cs=x({},[...tn,...nn,...Ri]),us=x({},[...rn,...Si]),mu=function(c){let g=S(c);(!g||!g.tagName)&&(g={namespaceURI:Ye,tagName:"template"});const y=Et(c.tagName),L=Et(g.tagName);return En[c.namespaceURI]?c.namespaceURI===It?g.namespaceURI===ye?y==="svg":g.namespaceURI===Lt?y==="svg"&&(L==="annotation-xml"||Ft[L]):!!cs[y]:c.namespaceURI===Lt?g.namespaceURI===ye?y==="math":g.namespaceURI===It?y==="math"&&vt[L]:!!us[y]:c.namespaceURI===ye?g.namespaceURI===It&&!vt[L]||g.namespaceURI===Lt&&!Ft[L]?!1:!us[y]&&(uu[y]||!cs[y]):!!(ut==="application/xhtml+xml"&&En[c.namespaceURI]):!1},he=function(c){Je(e.removed,{element:c});try{S(c).removeChild(c)}catch{h(c)}},Ne=function(c,g){try{Je(e.removed,{attribute:g.getAttributeNode(c),from:g})}catch{Je(e.removed,{attribute:null,from:g})}if(g.removeAttribute(c),c==="is")if(We||Ct)try{he(g)}catch{}else try{g.setAttribute(c,"")}catch{}},ls=function(c){let g=null,y=null;if(gn)c="<remove></remove>"+c;else{const W=en(c,/^[\r\n\t ]+/);y=W&&W[0]}ut==="application/xhtml+xml"&&Ye===ye&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");const L=_?_.createHTML(c):c;if(Ye===ye)try{g=new w().parseFromString(L,ut)}catch{}if(!g||!g.documentElement){g=Z.createDocument(Ye,"template",null);try{g.documentElement.innerHTML=Tn?C:L}catch{}}const G=g.body||g.documentElement;return c&&y&&G.insertBefore(n.createTextNode(y),G.childNodes[0]||null),Ye===ye?He.call(g,Pe?"html":"body")[0]:Pe?g.documentElement:G},fs=function(c){return ee.call(c.ownerDocument||c,c,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},On=function(c){return c instanceof p&&(typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||!(c.attributes instanceof l)||typeof c.removeAttribute!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function")},ds=function(c){return typeof a=="function"&&c instanceof a};function be(T,c,g){Tt(T,y=>{y.call(e,c,g,qe)})}const ms=function(c){let g=null;if(be(q.beforeSanitizeElements,c,null),On(c))return he(c),!0;const y=$(c.nodeName);if(be(q.uponSanitizeElement,c,{tagName:y,allowedTags:N}),Nt&&c.hasChildNodes()&&!ds(c.firstElementChild)&&Q(/<[/\w!]/g,c.innerHTML)&&Q(/<[/\w!]/g,c.textContent)||c.nodeType===nt.progressingInstruction||Nt&&c.nodeType===nt.comment&&Q(/<[/\w]/g,c.data))return he(c),!0;if(!(Ue.tagCheck instanceof Function&&Ue.tagCheck(y))&&(!N[y]||at[y])){if(!at[y]&&ps(y)&&(k.tagNameCheck instanceof RegExp&&Q(k.tagNameCheck,y)||k.tagNameCheck instanceof Function&&k.tagNameCheck(y)))return!1;if(wn&&!me[y]){const L=S(c)||c.parentNode,G=P(c)||c.childNodes;if(G&&L){const W=G.length;for(let te=W-1;te>=0;--te){const Te=b(G[te],!0);Te.__removalCount=(c.__removalCount||0)+1,L.insertBefore(Te,E(c))}}}return he(c),!0}return c instanceof d&&!mu(c)||(y==="noscript"||y==="noembed"||y==="noframes")&&Q(/<\/no(script|embed|frames)/i,c.innerHTML)?(he(c),!0):(Be&&c.nodeType===nt.text&&(g=c.textContent,Tt([Oe,ge,ae],L=>{g=Ze(g,L," ")}),c.textContent!==g&&(Je(e.removed,{element:c.cloneNode()}),c.textContent=g)),be(q.afterSanitizeElements,c,null),!1)},hs=function(c,g,y){if(ns&&(g==="id"||g==="name")&&(y in n||y in du))return!1;if(!(hn&&!mn[g]&&Q(Rt,g))){if(!(Zr&&Q(se,g))){if(!(Ue.attributeCheck instanceof Function&&Ue.attributeCheck(g,c))){if(!B[g]||mn[g]){if(!(ps(c)&&(k.tagNameCheck instanceof RegExp&&Q(k.tagNameCheck,c)||k.tagNameCheck instanceof Function&&k.tagNameCheck(c))&&(k.attributeNameCheck instanceof RegExp&&Q(k.attributeNameCheck,g)||k.attributeNameCheck instanceof Function&&k.attributeNameCheck(g,c))||g==="is"&&k.allowCustomizedBuiltInElements&&(k.tagNameCheck instanceof RegExp&&Q(k.tagNameCheck,y)||k.tagNameCheck instanceof Function&&k.tagNameCheck(y))))return!1}else if(!bn[g]){if(!Q(Pt,Ze(y,ce,""))){if(!((g==="src"||g==="xlink:href"||g==="href")&&c!=="script"&&Oi(y,"data:")===0&&ss[c])){if(!(es&&!Q(St,Ze(y,ce,"")))){if(y)return!1}}}}}}}return!0},ps=function(c){return c!=="annotation-xml"&&en(c,Mt)},gs=function(c){be(q.beforeSanitizeAttributes,c,null);const{attributes:g}=c;if(!g||On(c))return;const y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B,forceKeepAttr:void 0};let L=g.length;for(;L--;){const G=g[L],{name:W,namespaceURI:te,value:Te}=G,ze=$(W),_n=Te;let z=W==="value"?_n:_i(_n);if(y.attrName=ze,y.attrValue=z,y.keepAttr=!0,y.forceKeepAttr=void 0,be(q.uponSanitizeAttribute,c,y),z=y.attrValue,rs&&(ze==="id"||ze==="name")&&(Ne(W,c),z=au+z),Nt&&Q(/((--!?|])>)|<\/(style|title|textarea)/i,z)){Ne(W,c);continue}if(ze==="attributename"&&en(z,"href")){Ne(W,c);continue}if(y.forceKeepAttr)continue;if(!y.keepAttr){Ne(W,c);continue}if(!ts&&Q(/\/>/i,z)){Ne(W,c);continue}Be&&Tt([Oe,ge,ae],ys=>{z=Ze(z,ys," ")});const ws=$(c.nodeName);if(!hs(ws,ze,z)){Ne(W,c);continue}if(_&&typeof A=="object"&&typeof A.getAttributeType=="function"&&!te)switch(A.getAttributeType(ws,ze)){case"TrustedHTML":{z=_.createHTML(z);break}case"TrustedScriptURL":{z=_.createScriptURL(z);break}}if(z!==_n)try{te?c.setAttributeNS(te,W,z):c.setAttribute(W,z),On(c)?he(c):wr(e.removed)}catch{Ne(W,c)}}be(q.afterSanitizeAttributes,c,null)},hu=function T(c){let g=null;const y=fs(c);for(be(q.beforeSanitizeShadowDOM,c,null);g=y.nextNode();)be(q.uponSanitizeShadowNode,g,null),ms(g),gs(g),g.content instanceof o&&T(g.content);be(q.afterSanitizeShadowDOM,c,null)};return e.sanitize=function(T){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,y=null,L=null,G=null;if(Tn=!T,Tn&&(T="<!-->"),typeof T!="string"&&!ds(T))if(typeof T.toString=="function"){if(T=T.toString(),typeof T!="string")throw et("dirty is not a string, aborting")}else throw et("toString is not a function");if(!e.isSupported)return T;if(pn||An(c),e.removed=[],typeof T=="string"&&(ct=!1),ct){if(T.nodeName){const Te=$(T.nodeName);if(!N[Te]||at[Te])throw et("root node is forbidden and cannot be sanitized in-place")}}else if(T instanceof a)g=ls("<!---->"),y=g.ownerDocument.importNode(T,!0),y.nodeType===nt.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?g=y:g.appendChild(y);else{if(!We&&!Be&&!Pe&&T.indexOf("<")===-1)return _&&kt?_.createHTML(T):T;if(g=ls(T),!g)return We?null:kt?C:""}g&&gn&&he(g.firstChild);const W=fs(ct?T:g);for(;L=W.nextNode();)ms(L),gs(L),L.content instanceof o&&hu(L.content);if(ct)return T;if(We){if(Ct)for(G=it.call(g.ownerDocument);g.firstChild;)G.appendChild(g.firstChild);else G=g;return(B.shadowroot||B.shadowrootmode)&&(G=Dt.call(r,G,!0)),G}let te=Pe?g.outerHTML:g.innerHTML;return Pe&&N["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&Q(Or,g.ownerDocument.doctype.name)&&(te="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
7
- `+te),Be&&Tt([Oe,ge,ae],Te=>{te=Ze(te,Te," ")}),_&&kt?_.createHTML(te):te},e.setConfig=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};An(T),pn=!0},e.clearConfig=function(){qe=null,pn=!1},e.isValidAttribute=function(T,c,g){qe||An({});const y=$(T),L=$(c);return hs(y,L,g)},e.addHook=function(T,c){typeof c=="function"&&Je(q[T],c)},e.removeHook=function(T,c){if(c!==void 0){const g=Ei(q[T],c);return g===-1?void 0:Ai(q[T],g,1)[0]}return wr(q[T])},e.removeHooks=function(T){q[T]=[]},e.removeAllHooks=function(){q=xr()},e}var Ui=Dr();const Bi={addElements:[],allowElements:[],allowAttributes:{},dropElements:[],dropAttributes:{}},Rr=t=>t?Array.from(new Set(Object.values(t).flat())):[],Wi=({content:t,config:e})=>{const n={...Bi,...e},r=Rr(n.allowAttributes),s=r.length>0?{ALLOWED_ATTR:[...new Set([...r,"class","id","style"])]}:{},o=Rr(n.dropAttributes),i=o.length>0?{FORBID_ATTR:o}:{},a=n.addElements&&n.addElements.length>0&&!(n.allowElements&&n.allowElements.length>0)?{ADD_TAGS:n.addElements}:{},d=n.allowElements&&n.allowElements.length>0?{ALLOWED_TAGS:n.allowElements}:{},f=n.dropElements&&n.dropElements.length>0?{FORBID_TAGS:n.dropElements}:{},l={ALLOW_UNKNOWN_PROTOCOLS:!1,...a,...d,...i,...s,...f};return Ui.sanitize(t,l)},Sr=6048e5,$i=864e5,Mr=6e4,Pr=36e5,Yi=1e3,Nr=Symbol.for("constructDateFrom");function Y(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Nr in t?t[Nr](e):t instanceof Date?new t.constructor(e):new Date(e)}function R(t,e){return Y(e||t,t)}function Cr(t,e,n){const r=R(t,n?.in);return isNaN(e)?Y(n?.in||t,NaN):(e&&r.setDate(r.getDate()+e),r)}let qi={};function Ie(){return qi}function Ee(t,e){const n=Ie(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=R(t,e?.in),o=s.getDay(),i=(o<r?7:0)+o-r;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function Fe(t,e){return Ee(t,{...e,weekStartsOn:1})}function kr(t,e){const n=R(t,e?.in),r=n.getFullYear(),s=Y(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const o=Fe(s),i=Y(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=Fe(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Ot(t){const e=R(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Re(t,...e){const n=Y.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function Lr(t,e){const n=R(t,e?.in);return n.setHours(0,0,0,0),n}function Ir(t,e,n){const[r,s]=Re(n?.in,t,e),o=Lr(r),i=Lr(s),a=+o-Ot(o),d=+i-Ot(i);return Math.round((a-d)/$i)}function zi(t,e){const n=kr(t,e),r=Y(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Fe(r)}function rt(t,e){const n=+R(t)-+R(e);return n<0?-1:n>0?1:n}function ji(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Gi(t){return!(!ji(t)&&typeof t!="number"||isNaN(+R(t)))}function Xi(t,e,n){const[r,s]=Re(n?.in,t,e),o=r.getFullYear()-s.getFullYear(),i=r.getMonth()-s.getMonth();return o*12+i}function Qi(t,e,n){const[r,s]=Re(n?.in,t,e);return r.getFullYear()-s.getFullYear()}function Fr(t,e,n){const[r,s]=Re(n?.in,t,e),o=vr(r,s),i=Math.abs(Ir(r,s));r.setDate(r.getDate()-o*i);const a=+(vr(r,s)===-o),d=o*(i-a);return d===0?0:d}function vr(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function on(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function Vi(t,e,n){const[r,s]=Re(n?.in,t,e),o=(+r-+s)/Pr;return on(n?.roundingMethod)(o)}function Ki(t,e){return+R(t)-+R(e)}function Ji(t,e,n){const r=Ki(t,e)/Mr;return on(n?.roundingMethod)(r)}function Zi(t,e){const n=R(t,e?.in);return n.setHours(23,59,59,999),n}function ea(t,e){const n=R(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ta(t,e){const n=R(t,e?.in);return+Zi(n,e)==+ea(n,e)}function na(t,e,n){const[r,s,o]=Re(n?.in,t,t,e),i=rt(s,o),a=Math.abs(Xi(s,o));if(a<1)return 0;s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-i*a);let d=rt(s,o)===-i;ta(r)&&a===1&&rt(r,o)===1&&(d=!1);const f=i*(a-+d);return f===0?0:f}function ra(t,e,n){const r=Fr(t,e,n)/7;return on(n?.roundingMethod)(r)}function sa(t,e,n){const[r,s]=Re(n?.in,t,e),o=rt(r,s),i=Math.abs(Qi(r,s));r.setFullYear(1584),s.setFullYear(1584);const a=rt(r,s)===-o,d=o*(i-+a);return d===0?0:d}function oa(t,e){const n=R(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const ia={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},aa=(t,e,n)=>{let r;const s=ia[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function an(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ca={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ua={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},la={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fa={date:an({formats:ca,defaultWidth:"full"}),time:an({formats:ua,defaultWidth:"full"}),dateTime:an({formats:la,defaultWidth:"full"})},da={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ma=(t,e,n,r)=>da[t];function st(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):i;s=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[i]}const o=t.argumentCallback?t.argumentCallback(e):e;return s[o]}}const ha={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pa={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ga={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},wa={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ya={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ba={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ta={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:st({values:ha,defaultWidth:"wide"}),quarter:st({values:pa,defaultWidth:"wide",argumentCallback:t=>t-1}),month:st({values:ga,defaultWidth:"wide"}),day:st({values:wa,defaultWidth:"wide"}),dayPeriod:st({values:ya,defaultWidth:"wide",formattingValues:ba,defaultFormattingWidth:"wide"})};function ot(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;const i=o[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(a)?Aa(a,p=>p.test(i)):Ea(a,p=>p.test(i));let f;f=t.valueCallback?t.valueCallback(d):d,f=n.valueCallback?n.valueCallback(f):f;const l=e.slice(i.length);return{value:f,rest:l}}}function Ea(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Aa(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Oa(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],o=e.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const a=e.slice(s.length);return{value:i,rest:a}}}const _a=/^(\d+)(th|st|nd|rd)?/i,xa=/\d+/i,Da={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ra={any:[/^b/i,/^(a|c)/i]},Sa={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ma={any:[/1/i,/2/i,/3/i,/4/i]},Pa={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Na={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ca={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ka={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},La={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ia={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Fa={ordinalNumber:Oa({matchPattern:_a,parsePattern:xa,valueCallback:t=>parseInt(t,10)}),era:ot({matchPatterns:Da,defaultMatchWidth:"wide",parsePatterns:Ra,defaultParseWidth:"any"}),quarter:ot({matchPatterns:Sa,defaultMatchWidth:"wide",parsePatterns:Ma,defaultParseWidth:"any",valueCallback:t=>t+1}),month:ot({matchPatterns:Pa,defaultMatchWidth:"wide",parsePatterns:Na,defaultParseWidth:"any"}),day:ot({matchPatterns:Ca,defaultMatchWidth:"wide",parsePatterns:ka,defaultParseWidth:"any"}),dayPeriod:ot({matchPatterns:La,defaultMatchWidth:"any",parsePatterns:Ia,defaultParseWidth:"any"})},Hr={code:"en-US",formatDistance:aa,formatLong:fa,formatRelative:ma,localize:Ta,match:Fa,options:{weekStartsOn:0,firstWeekContainsDate:1}};function va(t,e){const n=R(t,e?.in);return Ir(n,oa(n))+1}function Ur(t,e){const n=R(t,e?.in),r=+Fe(n)-+zi(n);return Math.round(r/Sr)+1}function cn(t,e){const n=R(t,e?.in),r=n.getFullYear(),s=Ie(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=Y(e?.in||t,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const a=Ee(i,e),d=Y(e?.in||t,0);d.setFullYear(r,0,o),d.setHours(0,0,0,0);const f=Ee(d,e);return+n>=+a?r+1:+n>=+f?r:r-1}function Ha(t,e){const n=Ie(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=cn(t,e),o=Y(e?.in||t,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),Ee(o,e)}function Br(t,e){const n=R(t,e?.in),r=+Ee(n,e)-+Ha(n,e);return Math.round(r/Sr)+1}function D(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Ae={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return D(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):D(n+1,2)},d(t,e){return D(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(t,e){return D(t.getHours()%12||12,e.length)},H(t,e){return D(t.getHours(),e.length)},m(t,e){return D(t.getMinutes(),e.length)},s(t,e){return D(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return D(s,e.length)}},ve={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wr={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Ae.y(t,e)},Y:function(t,e,n,r){const s=cn(t,r),o=s>0?s:1-s;if(e==="YY"){const i=o%100;return D(i,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):D(o,e.length)},R:function(t,e){const n=kr(t);return D(n,e.length)},u:function(t,e){const n=t.getFullYear();return D(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return D(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return D(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Ae.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return D(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=Br(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):D(s,e.length)},I:function(t,e,n){const r=Ur(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):D(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Ae.d(t,e)},D:function(t,e,n){const r=va(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):D(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return D(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return D(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return D(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=ve.noon:r===0?s=ve.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=ve.evening:r>=12?s=ve.afternoon:r>=4?s=ve.morning:s=ve.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ae.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Ae.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):D(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):D(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Ae.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Ae.s(t,e)},S:function(t,e){return Ae.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Yr(r);case"XXXX":case"XX":return Se(r);default:return Se(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Yr(r);case"xxxx":case"xx":return Se(r);default:return Se(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+$r(r,":");default:return"GMT"+Se(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+$r(r,":");default:return"GMT"+Se(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return D(r,e.length)},T:function(t,e,n){return D(+t,e.length)}};function $r(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+e+D(o,2)}function Yr(t,e){return t%60===0?(t>0?"-":"+")+D(Math.abs(t)/60,2):Se(t,e)}function Se(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=D(Math.trunc(r/60),2),o=D(r%60,2);return n+s+e+o}const qr=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},zr=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},un={p:zr,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return qr(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",qr(r,e)).replace("{{time}}",zr(s,e))}},Ua=/^D+$/,Ba=/^Y+$/,Wa=["D","DD","YY","YYYY"];function jr(t){return Ua.test(t)}function Gr(t){return Ba.test(t)}function ln(t,e,n){const r=$a(t,e,n);if(console.warn(r),Wa.includes(t))throw new RangeError(r)}function $a(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ya=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,za=/^'([^]*?)'?$/,ja=/''/g,Ga=/[a-zA-Z]/;function Xa(t,e,n){const r=Ie(),s=r.locale??Hr,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=R(t,n?.in);if(!Gi(a))throw new RangeError("Invalid time value");let d=e.match(qa).map(l=>{const p=l[0];if(p==="p"||p==="P"){const w=un[p];return w(l,s.formatLong)}return l}).join("").match(Ya).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const p=l[0];if(p==="'")return{isToken:!1,value:Qa(l)};if(Wr[p])return{isToken:!0,value:l};if(p.match(Ga))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:l}});s.localize.preprocessor&&(d=s.localize.preprocessor(a,d));const f={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return d.map(l=>{if(!l.isToken)return l.value;const p=l.value;(Gr(p)||jr(p))&&ln(p,e,String(t));const w=Wr[p[0]];return w(a,p,s.localize,f)}).join("")}function Qa(t){const e=t.match(za);return e?e[1].replace(ja,"'"):t}function Va(t,e){const n=R(t,e?.in);if(isNaN(+n))throw new RangeError("Invalid time value");let r="",s="";const o="-",i=":";{const a=D(n.getDate(),2),d=D(n.getMonth()+1,2);r=`${D(n.getFullYear(),4)}${o}${d}${o}${a}`}{const a=n.getTimezoneOffset();if(a!==0){const A=Math.abs(a),m=D(Math.trunc(A/60),2),b=D(A%60,2);s=`${a<0?"+":"-"}${m}:${b}`}else s="Z";const d=D(n.getHours(),2),f=D(n.getMinutes(),2),l=D(n.getSeconds(),2),p=r===""?"":"T",w=[d,f,l].join(i);r=`${r}${p}${w}${s}`}return r}function Ka(){return Object.assign({},Ie())}function Ja(t,e){const n=R(t,e?.in).getDay();return n===0?7:n}function Za(t,e){return+R(t)>+R(e)}function ec(t,e){return+R(t)<+R(e)}function tc(t,e){const n=nc(e)?new e(0):Y(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function nc(t){return typeof t=="function"&&t.prototype?.constructor===t}const rc=10;class Xr{subPriority=0;validate(e,n){return!0}}class sc extends Xr{constructor(e,n,r,s,o){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=s,o&&(this.subPriority=o)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}}class oc extends Xr{priority=rc;subPriority=-1;constructor(e,n){super(),this.context=e||(r=>Y(n,r))}set(e,n){return n.timestampIsSet?e:Y(e,tc(e,this.context))}}class M{run(e,n,r,s){const o=this.parse(e,n,r,s);return o?{setter:new sc(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,n,r){return!0}}class ic extends M{priority=140;parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const H={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},fe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function U(t,e){return t&&{value:e(t.value),rest:t.rest}}function I(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function de(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,s=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(s*Pr+o*Mr+i*Yi),rest:e.slice(n[0].length)}}function Qr(t){return I(H.anyDigitsSigned,t)}function F(t,e){switch(t){case 1:return I(H.singleDigit,e);case 2:return I(H.twoDigits,e);case 3:return I(H.threeDigits,e);case 4:return I(H.fourDigits,e);default:return I(new RegExp("^\\d{1,"+t+"}"),e)}}function _t(t,e){switch(t){case 1:return I(H.singleDigitSigned,e);case 2:return I(H.twoDigitsSigned,e);case 3:return I(H.threeDigitsSigned,e);case 4:return I(H.fourDigitsSigned,e);default:return I(new RegExp("^-?\\d{1,"+t+"}"),e)}}function fn(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Vr(t,e){const n=e>0,r=n?e:1-e;let s;if(r<=50)s=t||100;else{const o=r+50,i=Math.trunc(o/100)*100,a=t>=o%100;s=t+i-(a?100:0)}return n?s:1-s}function Kr(t){return t%400===0||t%4===0&&t%100!==0}class ac extends M{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,r){const s=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return U(F(4,e),s);case"yo":return U(r.ordinalNumber(e,{unit:"year"}),s);default:return U(F(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const s=e.getFullYear();if(r.isTwoDigitYear){const i=Vr(r.year,s);return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}const o=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class cc extends M{priority=130;parse(e,n,r){const s=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return U(F(4,e),s);case"Yo":return U(r.ordinalNumber(e,{unit:"year"}),s);default:return U(F(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,s){const o=cn(e,s);if(r.isTwoDigitYear){const a=Vr(r.year,o);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),Ee(e,s)}const i=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(i,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),Ee(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class uc extends M{priority=130;parse(e,n){return _t(n==="R"?4:n.length,e)}set(e,n,r){const s=Y(e,0);return s.setFullYear(r,0,4),s.setHours(0,0,0,0),Fe(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class lc extends M{priority=130;parse(e,n){return _t(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class fc extends M{priority=120;parse(e,n,r){switch(n){case"Q":case"QQ":return F(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class dc extends M{priority=120;parse(e,n,r){switch(n){case"q":case"qq":return F(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class mc extends M{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,r){const s=o=>o-1;switch(n){case"M":return U(I(H.month,e),s);case"MM":return U(F(2,e),s);case"Mo":return U(r.ordinalNumber(e,{unit:"month"}),s);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class hc extends M{priority=110;parse(e,n,r){const s=o=>o-1;switch(n){case"L":return U(I(H.month,e),s);case"LL":return U(F(2,e),s);case"Lo":return U(r.ordinalNumber(e,{unit:"month"}),s);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function pc(t,e,n){const r=R(t,n?.in),s=Br(r,n)-e;return r.setDate(r.getDate()-s*7),R(r,n?.in)}class gc extends M{priority=100;parse(e,n,r){switch(n){case"w":return I(H.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return F(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,s){return Ee(pc(e,r,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function wc(t,e,n){const r=R(t,n?.in),s=Ur(r,n)-e;return r.setDate(r.getDate()-s*7),r}class yc extends M{priority=100;parse(e,n,r){switch(n){case"I":return I(H.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return F(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return Fe(wc(e,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const bc=[31,28,31,30,31,30,31,31,30,31,30,31],Tc=[31,29,31,30,31,30,31,31,30,31,30,31];class Ec extends M{priority=90;subPriority=1;parse(e,n,r){switch(n){case"d":return I(H.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return F(n.length,e)}}validate(e,n){const r=e.getFullYear(),s=Kr(r),o=e.getMonth();return s?n>=1&&n<=Tc[o]:n>=1&&n<=bc[o]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Ac extends M{priority=90;subpriority=1;parse(e,n,r){switch(n){case"D":case"DD":return I(H.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return F(n.length,e)}}validate(e,n){const r=e.getFullYear();return Kr(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function dn(t,e,n){const r=Ie(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=R(t,n?.in),i=o.getDay(),d=(e%7+7)%7,f=7-s,l=e<0||e>6?e-(i+f)%7:(d+f)%7-(i+f)%7;return Cr(o,l,n)}class Oc extends M{priority=90;parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=dn(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class _c extends M{priority=90;parse(e,n,r,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return U(F(n.length,e),o);case"eo":return U(r.ordinalNumber(e,{unit:"day"}),o);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=dn(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class xc extends M{priority=90;parse(e,n,r,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return U(F(n.length,e),o);case"co":return U(r.ordinalNumber(e,{unit:"day"}),o);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=dn(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Dc(t,e,n){const r=R(t,n?.in),s=Ja(r,n),o=e-s;return Cr(r,o,n)}class Rc extends M{priority=90;parse(e,n,r){const s=o=>o===0?7:o;switch(n){case"i":case"ii":return F(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return U(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return U(r.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return U(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s);default:return U(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=Dc(e,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Sc extends M{priority=80;parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(fn(r),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class Mc extends M{priority=80;parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(fn(r),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class Pc extends M{priority=80;parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(fn(r),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class Nc extends M{priority=70;parse(e,n,r){switch(n){case"h":return I(H.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return F(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const s=e.getHours()>=12;return s&&r<12?e.setHours(r+12,0,0,0):!s&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class Cc extends M{priority=70;parse(e,n,r){switch(n){case"H":return I(H.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return F(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class kc extends M{priority=70;parse(e,n,r){switch(n){case"K":return I(H.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return F(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class Lc extends M{priority=70;parse(e,n,r){switch(n){case"k":return I(H.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return F(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const s=r<=24?r%24:r;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class Ic extends M{priority=60;parse(e,n,r){switch(n){case"m":return I(H.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return F(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}incompatibleTokens=["t","T"]}class Fc extends M{priority=50;parse(e,n,r){switch(n){case"s":return I(H.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return F(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}incompatibleTokens=["t","T"]}class vc extends M{priority=30;parse(e,n){const r=s=>Math.trunc(s*Math.pow(10,-n.length+3));return U(F(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}incompatibleTokens=["t","T"]}class Hc extends M{priority=10;parse(e,n){switch(n){case"X":return de(fe.basicOptionalMinutes,e);case"XX":return de(fe.basic,e);case"XXXX":return de(fe.basicOptionalSeconds,e);case"XXXXX":return de(fe.extendedOptionalSeconds,e);default:return de(fe.extended,e)}}set(e,n,r){return n.timestampIsSet?e:Y(e,e.getTime()-Ot(e)-r)}incompatibleTokens=["t","T","x"]}class Uc extends M{priority=10;parse(e,n){switch(n){case"x":return de(fe.basicOptionalMinutes,e);case"xx":return de(fe.basic,e);case"xxxx":return de(fe.basicOptionalSeconds,e);case"xxxxx":return de(fe.extendedOptionalSeconds,e);default:return de(fe.extended,e)}}set(e,n,r){return n.timestampIsSet?e:Y(e,e.getTime()-Ot(e)-r)}incompatibleTokens=["t","T","X"]}class Bc extends M{priority=40;parse(e){return Qr(e)}set(e,n,r){return[Y(e,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Wc extends M{priority=20;parse(e){return Qr(e)}set(e,n,r){return[Y(e,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const $c={G:new ic,y:new ac,Y:new cc,R:new uc,u:new lc,Q:new fc,q:new dc,M:new mc,L:new hc,w:new gc,I:new yc,d:new Ec,D:new Ac,E:new Oc,e:new _c,c:new xc,i:new Rc,a:new Sc,b:new Mc,B:new Pc,h:new Nc,H:new Cc,K:new kc,k:new Lc,m:new Ic,s:new Fc,S:new vc,X:new Hc,x:new Uc,t:new Bc,T:new Wc},Yc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zc=/^'([^]*?)'?$/,jc=/''/g,Gc=/\S/,Xc=/[a-zA-Z]/;function Qc(t,e,n,r){const s=()=>Y(n,NaN),o=Ka(),i=o.locale??Hr,a=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,d=o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!e)return t?s():R(n,r?.in);const f={firstWeekContainsDate:a,weekStartsOn:d,locale:i},l=[new oc(r?.in,n)],p=e.match(qc).map(h=>{const E=h[0];if(E in un){const P=un[E];return P(h,i.formatLong)}return h}).join("").match(Yc),w=[];for(let h of p){Gr(h)&&ln(h,e,t),jr(h)&&ln(h,e,t);const E=h[0],P=$c[E];if(P){const{incompatibleTokens:S}=P;if(Array.isArray(S)){const C=w.find(Z=>S.includes(Z.token)||Z.token===E);if(C)throw new RangeError(`The format string mustn't contain \`${C.fullToken}\` and \`${h}\` at the same time`)}else if(P.incompatibleTokens==="*"&&w.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);w.push({token:E,fullToken:h});const _=P.run(t,h,i.match,f);if(!_)return s();l.push(_.setter),t=_.rest}else{if(E.match(Xc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");if(h==="''"?h="'":E==="'"&&(h=Vc(h)),t.indexOf(h)===0)t=t.slice(h.length);else return s()}}if(t.length>0&&Gc.test(t))return s();const A=l.map(h=>h.priority).sort((h,E)=>E-h).filter((h,E,P)=>P.indexOf(h)===E).map(h=>l.filter(E=>E.priority===h).sort((E,P)=>P.subPriority-E.subPriority)).map(h=>h[0]);let m=R(n,r?.in);if(isNaN(+m))return s();const b={};for(const h of A){if(!h.validate(m,f))return s();const E=h.set(m,b,f);Array.isArray(E)?(m=E[0],Object.assign(b,E[1])):m=E}return m}function Vc(t){return t.match(zc)[1].replace(jc,"'")}const xt=t=>{const e=typeof t=="string"?new Date(t):t;if(isNaN(e.getTime()))throw new Error("올바른 날짜 형식이 아닙니다.");return e},Kc=t=>{const e=xt(t),n=540*60*1e3;return new Date(e.getTime()+n)},Jc=t=>{const e=xt(t),n=540*60*1e3;return new Date(e.getTime()-n)},Jr=(t,e="yyyy-MM-dd")=>{const n=xt(t);return Xa(n,e)},Zc=t=>Va(t),eu=(t,e)=>Qc(t,e??"yyyy-MM-dd",new Date),tu=(t,e)=>ec(t,e)?t:e,nu=(t,e)=>Za(t,e)?t:e,ru=(t,e)=>{const n=new Date,r=n>=t,o={...{direction:r?"전":"후",seconds:r?"방금":"잠시",minutes:"분",hours:"시간",days:"일",weeks:"주",months:"개월",years:"년"},...e},i=[{diffFunc:Ji,limit:60,label:o.minutes},{diffFunc:Vi,limit:24,label:o.hours},{diffFunc:Fr,limit:7,label:o.days},{diffFunc:ra,limit:5,label:o.weeks},{diffFunc:na,limit:12,label:o.months},{diffFunc:sa,limit:1/0,label:o.years}];for(const a of i){const d=Math.abs(a.diffFunc(n,t));if(d>=1&&d<a.limit)return`${d}${a.label} ${o.direction}`}return r?`${o.seconds} ${o.direction}`:`${o.seconds} ${o.direction}`},su=(t,e={})=>{const{use12Hour:n=!0,showPeriod:r=!0,showSeconds:s=!1,includeDate:o=!1,includeWeekday:i=!1,timeSeparator:a=":",dateFormat:d="yyyy-MM-dd",dateTimeSeparator:f=" ",padHours:l=!0,periodLabels:p={am:"오전",pm:"오후"},weekdayLabels:w=["일","월","화","수","목","금","토"]}=e,A=xt(t),m=A.getHours(),b=A.getMinutes(),h=A.getSeconds();let E="";if(n){const S=m<12?p.am:p.pm,_=m%12||12,C=l?_.toString().padStart(2,"0"):_.toString();E=r?`${S} ${C}`:C}else E=l?m.toString().padStart(2,"0"):m.toString();const P=b.toString().padStart(2,"0");if(E+=`${a}${P}`,s){const S=h.toString().padStart(2,"0");E+=`${a}${S}`}if(o){let _=Jr(A,d);if(i){const C=w[A.getDay()];_+=` (${C})`}return`${_}${f}${E}`}return E};function ou(t,e){const n=typeof t=="string"?new Date(t):t,r=typeof e=="string"?new Date(e):e;return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}const iu=Object.freeze(Object.defineProperty({__proto__:null,afterDate:nu,beforeDate:tu,formatDate:Jr,formatToCustomKoreanTime:su,isSameDay:ou,kstToUtc:Jc,parseDate:eu,relativeTime:ru,toISO:Zc,utcToKst:Kc},Symbol.toStringTag,{value:"Module"}));ne.FormatData=je,ne.SanitizeHtml=Wi,ne.dateUtils=iu,ne.filterParams=lr,ne.handleError=di,ne.userAgent=wi,ne.validate=Ws,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})}));
7
+ `+te),Be&&Tt([Oe,ge,ae],Te=>{te=Ze(te,Te," ")}),_&&kt?_.createHTML(te):te},e.setConfig=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};An(T),pn=!0},e.clearConfig=function(){qe=null,pn=!1},e.isValidAttribute=function(T,c,g){qe||An({});const y=$(T),L=$(c);return hs(y,L,g)},e.addHook=function(T,c){typeof c=="function"&&Je(q[T],c)},e.removeHook=function(T,c){if(c!==void 0){const g=Ei(q[T],c);return g===-1?void 0:Ai(q[T],g,1)[0]}return wr(q[T])},e.removeHooks=function(T){q[T]=[]},e.removeAllHooks=function(){q=xr()},e}var Ui=Dr();const Bi={addElements:[],allowElements:[],allowAttributes:{},dropElements:[],dropAttributes:{}},Rr=t=>t?Array.from(new Set(Object.values(t).flat())):[],Wi=({content:t,config:e})=>{const n={...Bi,...e},r=Rr(n.allowAttributes),s=r.length>0?{ALLOWED_ATTR:[...new Set([...r,"class","id","style"])]}:{},o=Rr(n.dropAttributes),i=o.length>0?{FORBID_ATTR:o}:{},a=n.addElements&&n.addElements.length>0&&!(n.allowElements&&n.allowElements.length>0)?{ADD_TAGS:n.addElements}:{},d=n.allowElements&&n.allowElements.length>0?{ALLOWED_TAGS:n.allowElements}:{},f=n.dropElements&&n.dropElements.length>0?{FORBID_TAGS:n.dropElements}:{},l={ALLOW_UNKNOWN_PROTOCOLS:!1,...a,...d,...i,...s,...f};return Ui.sanitize(t,l)},Sr=6048e5,$i=864e5,Mr=6e4,Pr=36e5,Yi=1e3,Nr=Symbol.for("constructDateFrom");function Y(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Nr in t?t[Nr](e):t instanceof Date?new t.constructor(e):new Date(e)}function R(t,e){return Y(e||t,t)}function Cr(t,e,n){const r=R(t,n?.in);return isNaN(e)?Y(n?.in||t,NaN):(e&&r.setDate(r.getDate()+e),r)}let qi={};function Ie(){return qi}function Ee(t,e){const n=Ie(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=R(t,e?.in),o=s.getDay(),i=(o<r?7:0)+o-r;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function Fe(t,e){return Ee(t,{...e,weekStartsOn:1})}function kr(t,e){const n=R(t,e?.in),r=n.getFullYear(),s=Y(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const o=Fe(s),i=Y(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=Fe(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Ot(t){const e=R(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Re(t,...e){const n=Y.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function Lr(t,e){const n=R(t,e?.in);return n.setHours(0,0,0,0),n}function Ir(t,e,n){const[r,s]=Re(n?.in,t,e),o=Lr(r),i=Lr(s),a=+o-Ot(o),d=+i-Ot(i);return Math.round((a-d)/$i)}function zi(t,e){const n=kr(t,e),r=Y(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Fe(r)}function rt(t,e){const n=+R(t)-+R(e);return n<0?-1:n>0?1:n}function ji(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Gi(t){return!(!ji(t)&&typeof t!="number"||isNaN(+R(t)))}function Xi(t,e,n){const[r,s]=Re(n?.in,t,e),o=r.getFullYear()-s.getFullYear(),i=r.getMonth()-s.getMonth();return o*12+i}function Qi(t,e,n){const[r,s]=Re(n?.in,t,e);return r.getFullYear()-s.getFullYear()}function Fr(t,e,n){const[r,s]=Re(n?.in,t,e),o=vr(r,s),i=Math.abs(Ir(r,s));r.setDate(r.getDate()-o*i);const a=+(vr(r,s)===-o),d=o*(i-a);return d===0?0:d}function vr(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function on(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function Vi(t,e,n){const[r,s]=Re(n?.in,t,e),o=(+r-+s)/Pr;return on(n?.roundingMethod)(o)}function Ki(t,e){return+R(t)-+R(e)}function Ji(t,e,n){const r=Ki(t,e)/Mr;return on(n?.roundingMethod)(r)}function Zi(t,e){const n=R(t,e?.in);return n.setHours(23,59,59,999),n}function ea(t,e){const n=R(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function ta(t,e){const n=R(t,e?.in);return+Zi(n,e)==+ea(n,e)}function na(t,e,n){const[r,s,o]=Re(n?.in,t,t,e),i=rt(s,o),a=Math.abs(Xi(s,o));if(a<1)return 0;s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-i*a);let d=rt(s,o)===-i;ta(r)&&a===1&&rt(r,o)===1&&(d=!1);const f=i*(a-+d);return f===0?0:f}function ra(t,e,n){const r=Fr(t,e,n)/7;return on(n?.roundingMethod)(r)}function sa(t,e,n){const[r,s]=Re(n?.in,t,e),o=rt(r,s),i=Math.abs(Qi(r,s));r.setFullYear(1584),s.setFullYear(1584);const a=rt(r,s)===-o,d=o*(i-+a);return d===0?0:d}function oa(t,e){const n=R(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const ia={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},aa=(t,e,n)=>{let r;const s=ia[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function an(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ca={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ua={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},la={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fa={date:an({formats:ca,defaultWidth:"full"}),time:an({formats:ua,defaultWidth:"full"}),dateTime:an({formats:la,defaultWidth:"full"})},da={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ma=(t,e,n,r)=>da[t];function st(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):i;s=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[i]}const o=t.argumentCallback?t.argumentCallback(e):e;return s[o]}}const ha={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pa={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ga={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},wa={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ya={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ba={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ta={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:st({values:ha,defaultWidth:"wide"}),quarter:st({values:pa,defaultWidth:"wide",argumentCallback:t=>t-1}),month:st({values:ga,defaultWidth:"wide"}),day:st({values:wa,defaultWidth:"wide"}),dayPeriod:st({values:ya,defaultWidth:"wide",formattingValues:ba,defaultFormattingWidth:"wide"})};function ot(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;const i=o[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(a)?Aa(a,p=>p.test(i)):Ea(a,p=>p.test(i));let f;f=t.valueCallback?t.valueCallback(d):d,f=n.valueCallback?n.valueCallback(f):f;const l=e.slice(i.length);return{value:f,rest:l}}}function Ea(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Aa(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Oa(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],o=e.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const a=e.slice(s.length);return{value:i,rest:a}}}const _a=/^(\d+)(th|st|nd|rd)?/i,xa=/\d+/i,Da={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ra={any:[/^b/i,/^(a|c)/i]},Sa={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ma={any:[/1/i,/2/i,/3/i,/4/i]},Pa={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Na={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ca={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ka={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},La={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ia={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Fa={ordinalNumber:Oa({matchPattern:_a,parsePattern:xa,valueCallback:t=>parseInt(t,10)}),era:ot({matchPatterns:Da,defaultMatchWidth:"wide",parsePatterns:Ra,defaultParseWidth:"any"}),quarter:ot({matchPatterns:Sa,defaultMatchWidth:"wide",parsePatterns:Ma,defaultParseWidth:"any",valueCallback:t=>t+1}),month:ot({matchPatterns:Pa,defaultMatchWidth:"wide",parsePatterns:Na,defaultParseWidth:"any"}),day:ot({matchPatterns:Ca,defaultMatchWidth:"wide",parsePatterns:ka,defaultParseWidth:"any"}),dayPeriod:ot({matchPatterns:La,defaultMatchWidth:"any",parsePatterns:Ia,defaultParseWidth:"any"})},Hr={code:"en-US",formatDistance:aa,formatLong:fa,formatRelative:ma,localize:Ta,match:Fa,options:{weekStartsOn:0,firstWeekContainsDate:1}};function va(t,e){const n=R(t,e?.in);return Ir(n,oa(n))+1}function Ur(t,e){const n=R(t,e?.in),r=+Fe(n)-+zi(n);return Math.round(r/Sr)+1}function cn(t,e){const n=R(t,e?.in),r=n.getFullYear(),s=Ie(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=Y(e?.in||t,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const a=Ee(i,e),d=Y(e?.in||t,0);d.setFullYear(r,0,o),d.setHours(0,0,0,0);const f=Ee(d,e);return+n>=+a?r+1:+n>=+f?r:r-1}function Ha(t,e){const n=Ie(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=cn(t,e),o=Y(e?.in||t,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),Ee(o,e)}function Br(t,e){const n=R(t,e?.in),r=+Ee(n,e)-+Ha(n,e);return Math.round(r/Sr)+1}function D(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Ae={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return D(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):D(n+1,2)},d(t,e){return D(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(t,e){return D(t.getHours()%12||12,e.length)},H(t,e){return D(t.getHours(),e.length)},m(t,e){return D(t.getMinutes(),e.length)},s(t,e){return D(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return D(s,e.length)}},ve={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wr={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Ae.y(t,e)},Y:function(t,e,n,r){const s=cn(t,r),o=s>0?s:1-s;if(e==="YY"){const i=o%100;return D(i,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):D(o,e.length)},R:function(t,e){const n=kr(t);return D(n,e.length)},u:function(t,e){const n=t.getFullYear();return D(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return D(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return D(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Ae.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return D(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=Br(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):D(s,e.length)},I:function(t,e,n){const r=Ur(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):D(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Ae.d(t,e)},D:function(t,e,n){const r=va(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):D(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return D(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return D(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return D(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=ve.noon:r===0?s=ve.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=ve.evening:r>=12?s=ve.afternoon:r>=4?s=ve.morning:s=ve.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ae.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Ae.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):D(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):D(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Ae.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Ae.s(t,e)},S:function(t,e){return Ae.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Yr(r);case"XXXX":case"XX":return Se(r);default:return Se(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Yr(r);case"xxxx":case"xx":return Se(r);default:return Se(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+$r(r,":");default:return"GMT"+Se(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+$r(r,":");default:return"GMT"+Se(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return D(r,e.length)},T:function(t,e,n){return D(+t,e.length)}};function $r(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+e+D(o,2)}function Yr(t,e){return t%60===0?(t>0?"-":"+")+D(Math.abs(t)/60,2):Se(t,e)}function Se(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=D(Math.trunc(r/60),2),o=D(r%60,2);return n+s+e+o}const qr=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},zr=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},un={p:zr,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return qr(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",qr(r,e)).replace("{{time}}",zr(s,e))}},Ua=/^D+$/,Ba=/^Y+$/,Wa=["D","DD","YY","YYYY"];function jr(t){return Ua.test(t)}function Gr(t){return Ba.test(t)}function ln(t,e,n){const r=$a(t,e,n);if(console.warn(r),Wa.includes(t))throw new RangeError(r)}function $a(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ya=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qa=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,za=/^'([^]*?)'?$/,ja=/''/g,Ga=/[a-zA-Z]/;function Xa(t,e,n){const r=Ie(),s=r.locale??Hr,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=R(t,n?.in);if(!Gi(a))throw new RangeError("Invalid time value");let d=e.match(qa).map(l=>{const p=l[0];if(p==="p"||p==="P"){const w=un[p];return w(l,s.formatLong)}return l}).join("").match(Ya).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const p=l[0];if(p==="'")return{isToken:!1,value:Qa(l)};if(Wr[p])return{isToken:!0,value:l};if(p.match(Ga))throw new RangeError("Format string contains an unescaped latin alphabet character `"+p+"`");return{isToken:!1,value:l}});s.localize.preprocessor&&(d=s.localize.preprocessor(a,d));const f={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return d.map(l=>{if(!l.isToken)return l.value;const p=l.value;(Gr(p)||jr(p))&&ln(p,e,String(t));const w=Wr[p[0]];return w(a,p,s.localize,f)}).join("")}function Qa(t){const e=t.match(za);return e?e[1].replace(ja,"'"):t}function Va(t,e){const n=R(t,e?.in);if(isNaN(+n))throw new RangeError("Invalid time value");let r="",s="";const o="-",i=":";{const a=D(n.getDate(),2),d=D(n.getMonth()+1,2);r=`${D(n.getFullYear(),4)}${o}${d}${o}${a}`}{const a=n.getTimezoneOffset();if(a!==0){const A=Math.abs(a),m=D(Math.trunc(A/60),2),b=D(A%60,2);s=`${a<0?"+":"-"}${m}:${b}`}else s="Z";const d=D(n.getHours(),2),f=D(n.getMinutes(),2),l=D(n.getSeconds(),2),p=r===""?"":"T",w=[d,f,l].join(i);r=`${r}${p}${w}${s}`}return r}function Ka(){return Object.assign({},Ie())}function Ja(t,e){const n=R(t,e?.in).getDay();return n===0?7:n}function Za(t,e){return+R(t)>+R(e)}function ec(t,e){return+R(t)<+R(e)}function tc(t,e){const n=nc(e)?new e(0):Y(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function nc(t){return typeof t=="function"&&t.prototype?.constructor===t}const rc=10;class Xr{subPriority=0;validate(e,n){return!0}}class sc extends Xr{constructor(e,n,r,s,o){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=s,o&&(this.subPriority=o)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}}class oc extends Xr{priority=rc;subPriority=-1;constructor(e,n){super(),this.context=e||(r=>Y(n,r))}set(e,n){return n.timestampIsSet?e:Y(e,tc(e,this.context))}}class M{run(e,n,r,s){const o=this.parse(e,n,r,s);return o?{setter:new sc(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,n,r){return!0}}class ic extends M{priority=140;parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const H={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},fe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function U(t,e){return t&&{value:e(t.value),rest:t.rest}}function I(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function de(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,s=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(s*Pr+o*Mr+i*Yi),rest:e.slice(n[0].length)}}function Qr(t){return I(H.anyDigitsSigned,t)}function F(t,e){switch(t){case 1:return I(H.singleDigit,e);case 2:return I(H.twoDigits,e);case 3:return I(H.threeDigits,e);case 4:return I(H.fourDigits,e);default:return I(new RegExp("^\\d{1,"+t+"}"),e)}}function _t(t,e){switch(t){case 1:return I(H.singleDigitSigned,e);case 2:return I(H.twoDigitsSigned,e);case 3:return I(H.threeDigitsSigned,e);case 4:return I(H.fourDigitsSigned,e);default:return I(new RegExp("^-?\\d{1,"+t+"}"),e)}}function fn(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Vr(t,e){const n=e>0,r=n?e:1-e;let s;if(r<=50)s=t||100;else{const o=r+50,i=Math.trunc(o/100)*100,a=t>=o%100;s=t+i-(a?100:0)}return n?s:1-s}function Kr(t){return t%400===0||t%4===0&&t%100!==0}class ac extends M{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,r){const s=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return U(F(4,e),s);case"yo":return U(r.ordinalNumber(e,{unit:"year"}),s);default:return U(F(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const s=e.getFullYear();if(r.isTwoDigitYear){const i=Vr(r.year,s);return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}const o=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class cc extends M{priority=130;parse(e,n,r){const s=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return U(F(4,e),s);case"Yo":return U(r.ordinalNumber(e,{unit:"year"}),s);default:return U(F(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,s){const o=cn(e,s);if(r.isTwoDigitYear){const a=Vr(r.year,o);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),Ee(e,s)}const i=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(i,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),Ee(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class uc extends M{priority=130;parse(e,n){return _t(n==="R"?4:n.length,e)}set(e,n,r){const s=Y(e,0);return s.setFullYear(r,0,4),s.setHours(0,0,0,0),Fe(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class lc extends M{priority=130;parse(e,n){return _t(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class fc extends M{priority=120;parse(e,n,r){switch(n){case"Q":case"QQ":return F(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class dc extends M{priority=120;parse(e,n,r){switch(n){case"q":case"qq":return F(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class mc extends M{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,r){const s=o=>o-1;switch(n){case"M":return U(I(H.month,e),s);case"MM":return U(F(2,e),s);case"Mo":return U(r.ordinalNumber(e,{unit:"month"}),s);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class hc extends M{priority=110;parse(e,n,r){const s=o=>o-1;switch(n){case"L":return U(I(H.month,e),s);case"LL":return U(F(2,e),s);case"Lo":return U(r.ordinalNumber(e,{unit:"month"}),s);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function pc(t,e,n){const r=R(t,n?.in),s=Br(r,n)-e;return r.setDate(r.getDate()-s*7),R(r,n?.in)}class gc extends M{priority=100;parse(e,n,r){switch(n){case"w":return I(H.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return F(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,s){return Ee(pc(e,r,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function wc(t,e,n){const r=R(t,n?.in),s=Ur(r,n)-e;return r.setDate(r.getDate()-s*7),r}class yc extends M{priority=100;parse(e,n,r){switch(n){case"I":return I(H.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return F(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return Fe(wc(e,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const bc=[31,28,31,30,31,30,31,31,30,31,30,31],Tc=[31,29,31,30,31,30,31,31,30,31,30,31];class Ec extends M{priority=90;subPriority=1;parse(e,n,r){switch(n){case"d":return I(H.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return F(n.length,e)}}validate(e,n){const r=e.getFullYear(),s=Kr(r),o=e.getMonth();return s?n>=1&&n<=Tc[o]:n>=1&&n<=bc[o]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Ac extends M{priority=90;subpriority=1;parse(e,n,r){switch(n){case"D":case"DD":return I(H.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return F(n.length,e)}}validate(e,n){const r=e.getFullYear();return Kr(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function dn(t,e,n){const r=Ie(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=R(t,n?.in),i=o.getDay(),d=(e%7+7)%7,f=7-s,l=e<0||e>6?e-(i+f)%7:(d+f)%7-(i+f)%7;return Cr(o,l,n)}class Oc extends M{priority=90;parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=dn(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class _c extends M{priority=90;parse(e,n,r,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return U(F(n.length,e),o);case"eo":return U(r.ordinalNumber(e,{unit:"day"}),o);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=dn(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class xc extends M{priority=90;parse(e,n,r,s){const o=i=>{const a=Math.floor((i-1)/7)*7;return(i+s.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return U(F(n.length,e),o);case"co":return U(r.ordinalNumber(e,{unit:"day"}),o);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,s){return e=dn(e,r,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Dc(t,e,n){const r=R(t,n?.in),s=Ja(r,n),o=e-s;return Cr(r,o,n)}class Rc extends M{priority=90;parse(e,n,r){const s=o=>o===0?7:o;switch(n){case"i":case"ii":return F(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return U(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return U(r.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return U(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s);default:return U(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=Dc(e,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Sc extends M{priority=80;parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(fn(r),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class Mc extends M{priority=80;parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(fn(r),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class Pc extends M{priority=80;parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(fn(r),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class Nc extends M{priority=70;parse(e,n,r){switch(n){case"h":return I(H.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return F(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const s=e.getHours()>=12;return s&&r<12?e.setHours(r+12,0,0,0):!s&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class Cc extends M{priority=70;parse(e,n,r){switch(n){case"H":return I(H.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return F(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class kc extends M{priority=70;parse(e,n,r){switch(n){case"K":return I(H.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return F(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class Lc extends M{priority=70;parse(e,n,r){switch(n){case"k":return I(H.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return F(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const s=r<=24?r%24:r;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class Ic extends M{priority=60;parse(e,n,r){switch(n){case"m":return I(H.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return F(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}incompatibleTokens=["t","T"]}class Fc extends M{priority=50;parse(e,n,r){switch(n){case"s":return I(H.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return F(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}incompatibleTokens=["t","T"]}class vc extends M{priority=30;parse(e,n){const r=s=>Math.trunc(s*Math.pow(10,-n.length+3));return U(F(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}incompatibleTokens=["t","T"]}class Hc extends M{priority=10;parse(e,n){switch(n){case"X":return de(fe.basicOptionalMinutes,e);case"XX":return de(fe.basic,e);case"XXXX":return de(fe.basicOptionalSeconds,e);case"XXXXX":return de(fe.extendedOptionalSeconds,e);default:return de(fe.extended,e)}}set(e,n,r){return n.timestampIsSet?e:Y(e,e.getTime()-Ot(e)-r)}incompatibleTokens=["t","T","x"]}class Uc extends M{priority=10;parse(e,n){switch(n){case"x":return de(fe.basicOptionalMinutes,e);case"xx":return de(fe.basic,e);case"xxxx":return de(fe.basicOptionalSeconds,e);case"xxxxx":return de(fe.extendedOptionalSeconds,e);default:return de(fe.extended,e)}}set(e,n,r){return n.timestampIsSet?e:Y(e,e.getTime()-Ot(e)-r)}incompatibleTokens=["t","T","X"]}class Bc extends M{priority=40;parse(e){return Qr(e)}set(e,n,r){return[Y(e,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Wc extends M{priority=20;parse(e){return Qr(e)}set(e,n,r){return[Y(e,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const $c={G:new ic,y:new ac,Y:new cc,R:new uc,u:new lc,Q:new fc,q:new dc,M:new mc,L:new hc,w:new gc,I:new yc,d:new Ec,D:new Ac,E:new Oc,e:new _c,c:new xc,i:new Rc,a:new Sc,b:new Mc,B:new Pc,h:new Nc,H:new Cc,K:new kc,k:new Lc,m:new Ic,s:new Fc,S:new vc,X:new Hc,x:new Uc,t:new Bc,T:new Wc},Yc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,qc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zc=/^'([^]*?)'?$/,jc=/''/g,Gc=/\S/,Xc=/[a-zA-Z]/;function Qc(t,e,n,r){const s=()=>Y(n,NaN),o=Ka(),i=o.locale??Hr,a=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,d=o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!e)return t?s():R(n,r?.in);const f={firstWeekContainsDate:a,weekStartsOn:d,locale:i},l=[new oc(r?.in,n)],p=e.match(qc).map(h=>{const E=h[0];if(E in un){const P=un[E];return P(h,i.formatLong)}return h}).join("").match(Yc),w=[];for(let h of p){Gr(h)&&ln(h,e,t),jr(h)&&ln(h,e,t);const E=h[0],P=$c[E];if(P){const{incompatibleTokens:S}=P;if(Array.isArray(S)){const C=w.find(Z=>S.includes(Z.token)||Z.token===E);if(C)throw new RangeError(`The format string mustn't contain \`${C.fullToken}\` and \`${h}\` at the same time`)}else if(P.incompatibleTokens==="*"&&w.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);w.push({token:E,fullToken:h});const _=P.run(t,h,i.match,f);if(!_)return s();l.push(_.setter),t=_.rest}else{if(E.match(Xc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");if(h==="''"?h="'":E==="'"&&(h=Vc(h)),t.indexOf(h)===0)t=t.slice(h.length);else return s()}}if(t.length>0&&Gc.test(t))return s();const A=l.map(h=>h.priority).sort((h,E)=>E-h).filter((h,E,P)=>P.indexOf(h)===E).map(h=>l.filter(E=>E.priority===h).sort((E,P)=>P.subPriority-E.subPriority)).map(h=>h[0]);let m=R(n,r?.in);if(isNaN(+m))return s();const b={};for(const h of A){if(!h.validate(m,f))return s();const E=h.set(m,b,f);Array.isArray(E)?(m=E[0],Object.assign(b,E[1])):m=E}return m}function Vc(t){return t.match(zc)[1].replace(jc,"'")}const xt=t=>{const e=typeof t=="string"?new Date(t):t;if(isNaN(e.getTime()))throw new Error("올바른 날짜 형식이 아닙니다.");return e},Kc=t=>{const e=xt(t),n=540*60*1e3;return new Date(e.getTime()+n)},Jc=t=>{const e=xt(t),n=540*60*1e3;return new Date(e.getTime()-n)},Jr=(t,e="yyyy-MM-dd")=>{const n=xt(t);return Xa(n,e)},Zc=t=>Va(t),eu=(t,e)=>Qc(t,e??"yyyy-MM-dd",new Date),tu=(t,e)=>ec(t,e)?t:e,nu=(t,e)=>Za(t,e)?t:e,ru=(t,e)=>{const n=new Date,r=n>=t,o={...{direction:r?"전":"후",seconds:r?"방금":"잠시",minutes:"분",hours:"시간",days:"일",weeks:"주",months:"개월",years:"년"},...e},i=[{diffFunc:Ji,limit:60,label:o.minutes},{diffFunc:Vi,limit:24,label:o.hours},{diffFunc:Fr,limit:7,label:o.days},{diffFunc:ra,limit:5,label:o.weeks},{diffFunc:na,limit:12,label:o.months},{diffFunc:sa,limit:1/0,label:o.years}];for(const a of i){const d=Math.abs(a.diffFunc(n,t));if(d>=1&&d<a.limit)return`${d}${a.label} ${o.direction}`}return r?`${o.seconds} ${o.direction}`:`${o.seconds} ${o.direction}`},su=(t,e={})=>{const{use12Hour:n=!0,showPeriod:r=!0,showSeconds:s=!1,includeDate:o=!1,includeWeekday:i=!1,timeSeparator:a=":",dateFormat:d="yyyy-MM-dd",dateTimeSeparator:f=" ",padHours:l=!0,periodLabels:p={am:"오전",pm:"오후"},weekdayLabels:w=["일","월","화","수","목","금","토"]}=e,A=xt(t),m=A.getHours(),b=A.getMinutes(),h=A.getSeconds();let E="";if(n){const S=m<12?p.am:p.pm,_=m%12||12,C=l?_.toString().padStart(2,"0"):_.toString();E=r?`${S} ${C}`:C}else E=l?m.toString().padStart(2,"0"):m.toString();const P=b.toString().padStart(2,"0");if(E+=`${a}${P}`,s){const S=h.toString().padStart(2,"0");E+=`${a}${S}`}if(o){let _=Jr(A,d);if(i){const C=w[A.getDay()];_+=` (${C})`}return`${_}${f}${E}`}return E};function ou(t,e){const n=typeof t=="string"?new Date(t):t,r=typeof e=="string"?new Date(e):e;return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}const iu=Object.freeze(Object.defineProperty({__proto__:null,afterDate:nu,beforeDate:tu,formatDate:Jr,formatToCustomKoreanTime:su,isSameDay:ou,isSameMinute:(t,e)=>{const n=typeof t=="string"?new Date(t):t,r=typeof e=="string"?new Date(e):e,s=n.setSeconds(0,0),o=r.setSeconds(0,0);return s===o},kstToUtc:Jc,parseDate:eu,relativeTime:ru,toISO:Zc,utcToKst:Kc},Symbol.toStringTag,{value:"Module"}));ne.FormatData=je,ne.SanitizeHtml=Wi,ne.dateUtils=iu,ne.filterParams=lr,ne.handleError=di,ne.userAgent=wi,ne.validate=Ws,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})}));
@@ -17,3 +17,4 @@ export declare const afterDate: (firstDate: Date, secondDate: Date) => Date;
17
17
  export declare const relativeTime: (date: Date, labels?: Partial<Record<"direction" | "seconds" | "minutes" | "hours" | "days" | "weeks" | "months" | "years", string>>) => string;
18
18
  export declare const formatToCustomKoreanTime: (isoString: Date | string, options?: FormatTimeOptions) => string;
19
19
  export declare function isSameDay(date1: string | Date, date2: string | Date): boolean;
20
+ export declare const isSameMinute: (date1: string, date2: string) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byuckchon-frontend/utils",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.umd.js",