@ctlyst.id/utils 1.1.4 → 1.1.6
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.js +2 -2
- package/dist/index.mjs +256 -251
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),tt=o=>o!=null&&typeof o=="object"&&"nodeType"in o&&o.nodeType===Node.ELEMENT_NODE,Ye=o=>tt(o)?o.ownerDocument??document:document,be=(o,n)=>{var r;const t=o.target;return o.button>0||t&&!Ye(t).contains(t)?!1:!((r=n.current)!=null&&r.contains(t))},rt=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),nt=rt(),kt=(o,n=[])=>{const t=P.useRef(o);return P.useEffect(()=>{t.current=o}),P.useCallback((...r)=>{var e;return(e=t.current)==null?void 0:e.call(t,...r)},n)},Te=kt;var Dt=function(){var o=document.getSelection();if(!o.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<o.rangeCount;r++)t.push(o.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return o.removeAllRanges(),function(){o.type==="Caret"&&o.removeAllRanges(),o.rangeCount||t.forEach(function(e){o.addRange(e)}),n&&n.focus()}},Pt=Dt,Qe={"text/plain":"Text","text/html":"Url",default:"Text"},Mt="Copy to clipboard: #{key}, Enter";function Ct(o){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,n)}function xt(o,n){var t,r,e,i,a,u,s=!1;n||(n={}),t=n.debug||!1;try{e=Pt(),i=document.createRange(),a=document.getSelection(),u=document.createElement("span"),u.textContent=o,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(c){if(c.stopPropagation(),n.format)if(c.preventDefault(),typeof c.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=Qe[n.format]||Qe.default;window.clipboardData.setData(f,o)}else c.clipboardData.clearData(),c.clipboardData.setData(n.format,o);n.onCopy&&(c.preventDefault(),n.onCopy(c.clipboardData))}),document.body.appendChild(u),i.selectNodeContents(u),a.addRange(i);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");s=!0}catch(c){t&&console.error("unable to copy using execCommand: ",c),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",o),n.onCopy&&n.onCopy(window.clipboardData),s=!0}catch(f){t&&console.error("unable to copy using clipboardData: ",f),t&&console.error("falling back to prompt"),r=Ct("message"in n?n.message:Mt),window.prompt(r,o)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(i):a.removeAllRanges()),u&&document.body.removeChild(u),e()}return s}var Ot=xt;const Et=({value:o="",optionsOrTimeout:n={}}={})=>{const[t,r]=P.useState(!1),[e,i]=P.useState(o);P.useEffect(()=>i(o),[o]);const{timeout:a=1500,...u}=typeof n=="number"?{timeout:n}:n,s=P.useCallback(()=>{const l=Ot(e,u);r(l)},[e,u]);return P.useEffect(()=>{let l=null;return t&&(l=window.setTimeout(()=>{r(!1)},a)),()=>{l&&window.clearTimeout(l)}},[a,t]),{value:e,setValue:i,onCopy:s,hasCopied:t}},Ut=Et,$t=({value:o,delay:n=500})=>{const[t,r]=P.useState(o);return P.useEffect(()=>{const e=setTimeout(()=>r(o),n||500);return()=>{clearTimeout(e)}},[o,n]),t},Wt=$t;var Nt=process.env.NODE_ENV==="production",Ee="Invariant failed";function je(o,n){if(!o){if(Nt)throw new Error(Ee);var t=typeof n=="function"?n():n,r=t?"".concat(Ee,": ").concat(t):Ee;throw new Error(r)}}var ye=function(n){var t=n.top,r=n.right,e=n.bottom,i=n.left,a=r-i,u=e-t,s={top:t,right:r,bottom:e,left:i,width:a,height:u,x:i,y:t,center:{x:(r+i)/2,y:(e+t)/2}};return s},Yt=function(n,t){return{top:n.top-t.top,left:n.left-t.left,bottom:n.bottom+t.bottom,right:n.right+t.right}},Ve=function(n,t){return{top:n.top+t.top,left:n.left+t.left,bottom:n.bottom-t.bottom,right:n.right-t.right}},Ue={top:0,right:0,bottom:0,left:0},_t=function(n){var t=n.borderBox,r=n.margin,e=r===void 0?Ue:r,i=n.border,a=i===void 0?Ue:i,u=n.padding,s=u===void 0?Ue:u,l=ye(Yt(t,e)),c=ye(Ve(t,a)),f=ye(Ve(c,s));return{marginBox:l,borderBox:ye(t),paddingBox:c,contentBox:f,margin:e,border:a,padding:s}},V=function(n){var t=n.slice(0,-2),r=n.slice(-2);if(r!=="px")return 0;var e=Number(t);return isNaN(e)&&(process.env.NODE_ENV!=="production"?je(!1,"Could not parse value [raw: "+n+", without suffix: "+t+"]"):je(!1)),e},At=function(n,t){var r={top:V(t.marginTop),right:V(t.marginRight),bottom:V(t.marginBottom),left:V(t.marginLeft)},e={top:V(t.paddingTop),right:V(t.paddingRight),bottom:V(t.paddingBottom),left:V(t.paddingLeft)},i={top:V(t.borderTopWidth),right:V(t.borderRightWidth),bottom:V(t.borderBottomWidth),left:V(t.borderLeftWidth)};return _t({borderBox:n,margin:r,padding:e,border:i})},St=function(n){var t=n.getBoundingClientRect(),r=window.getComputedStyle(n);return At(t,r)};const Lt=nt?P.useLayoutEffect:P.useEffect,at=Lt,It=(o,n)=>{const[t,r]=P.useState(null),e=P.useRef();return at(()=>{const i=()=>{const a=o.current;a&&(e.current=requestAnimationFrame(()=>{const u=St(a);r(u)}))};return i(),n&&(window.addEventListener("resize",i),window.addEventListener("scroll",i)),()=>{n&&(window.removeEventListener("resize",i),window.removeEventListener("scroll",i)),e.current&&cancelAnimationFrame(e.current)}},[n]),t},Rt=It,Ht=({onClose:o,onOpen:n,isOpen:t,defaultIsOpen:r,id:e}={})=>{const[i,a]=P.useState(r||!1),u=t!==void 0?t:i,s=t!==void 0,l=P.useId(),c=e??`disclosure-${l}`,f=Te(n),h=Te(o),v=P.useCallback(()=>{s||a(!1),h==null||h()},[s,h]),b=P.useCallback(()=>{s||a(!0),f==null||f()},[s,f]),x=P.useCallback(()=>{u?v():b()},[u,b,v]);return{onClose:v,onOpen:b,onToggle:x,getButtonProps:({onClick:Y,...R}={})=>({...R,"aria-expanded":u,"aria-controls":c,onClick(M){Y==null||Y(M),x()}}),getDisclosureProps:({...Y}={})=>({...Y,hidden:!u,id:c}),isOpen:u}},qt=Ht,Ft=(o,n={})=>{const{ssr:t=!0,fallback:r}=n,e=Array.isArray(o)?o:[o];let i=Array.isArray(r)?r:[r];i=i.filter(s=>s!=null);const[a,u]=P.useState(()=>e.map((s,l)=>({media:s,matches:t?!!i[l]:window.matchMedia(s).matches})));return P.useEffect(()=>{const s=window;u(e.map(f=>({media:f,matches:s.matchMedia(f).matches})));const l=e.map(f=>s.matchMedia(f)),c=f=>{u(h=>h.slice().map(v=>v.media===f.media?{...v,matches:f.matches}:v))};return l.forEach(f=>{f.addEventListener("change",c)}),()=>{l.forEach(f=>{f.removeEventListener("change",c)})}},[window]),a.map(s=>s.matches)},Bt=Ft,Qt=({value:o,thousandSeparator:n=".",decimalLength:t,decimalSeparator:r=",",prefix:e=""})=>{const a=(u=>{const s=u.toString().split("."),l=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,n);let c="";return t!==void 0?s.length>1&&t>0?c=r+s[1].padEnd(t,"0").slice(0,t):t>0&&(c=r+"0".repeat(t)):s.length>1&&(c=r+s[1]),l+c})(o);return a.charAt(0)==="-"?a.replace(/^-/g,`-${e}`):`${e}${a}`},le=Qt,jt=()=>{const[o,n]=P.useState(navigator.onLine);return P.useEffect(()=>{const t=()=>n(navigator.onLine);return window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}},[]),{isOnline:o,isOffline:!o}},Vt=jt,Xt=({enabled:o=!0,ref:n,handler:t})=>{const r=Te(t),i=P.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;P.useEffect(()=>{if(!o)return;const a=c=>{be(c,n)&&(i.isPointerDown=!0)},u=c=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&t&&be(c,n)&&(i.isPointerDown=!1,r(c))},s=c=>{i.ignoreEmulatedMouseEvents=!0,t&&i.isPointerDown&&be(c,n)&&(i.isPointerDown=!1,r(c))},l=Ye(n.current);return l.addEventListener("mousedown",a,!0),l.addEventListener("mouseup",u,!0),l.addEventListener("touchstart",a,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",a,!0),l.removeEventListener("mouseup",u,!0),l.removeEventListener("touchstart",a,!0),l.removeEventListener("touchend",s,!0)}},[t,n,r,i,o])},Gt=Xt;var X=(o=>(o.product="Product",o.order="Order",o.gift="Gift",o.freeShipping="Free Shipping",o.freeInsurance="Free Insurance",o.bundling="Bundling",o.payment="Payment",o))(X||{}),ke=(o=>(o.percentage="percentage",o.amount="amount",o))(ke||{});function Kt(o){let n="";const{type:t,collections:r=[],brands:e=[],eligibilityType:i,payment:a}=o;if(t===X.product)r.length>0?n=`Voucher hanya berlaku untuk collection ${r.map(u=>u.name).join(", ")}.`:e.length>0?n=`Voucher hanya berlaku untuk produk brand ${e.map(u=>u.name).join(", ")}.`:i==="selected_products"&&(n="Voucher hanya berlaku untuk produk tertentu.");else if(t===X.payment){const{bankName:u,paymentMethod:s,creditBinGroup:l,debitBinGroup:c}=a||{},f=(s||[]).some(M=>(M||"").includes("(Full Payment)")),h=(s||[]).some(M=>(M||"").includes("(Cicilan 3x)")),v=(s||[]).some(M=>(M||"").includes("(Cicilan 6x)")),b=(s||[]).some(M=>(M||"").includes("(Cicilan 12x)")),x=h||v||b,E=f||x,Y=[...(s||[]).some(M=>(M||"").includes("Debit Card"))&&(c||[]).length>0?["Kartu Debit"]:[],...E&&(l||[]).length>0?["Kartu Kredit"]:[]];let R="";if(E){const M=[...f?["sistem pembayaran penuh"]:[],...x?["sistem cicilan"]:[]],G=[...h?["3"]:[],...v?["6"]:[],...b?["12"]:[]],U=G.join(", "),L=U.lastIndexOf(","),H=U.slice(0,L),q=U.slice(L+1,U.length),B=G.length>1?[H,q].join(" dan"):q;R=["dengan",M.join(" dan "),...x?[`(${B} bulan)`]:[]].join(" ")}Y.length>0&&(n=["Voucher berlaku untuk pembayaran menggunakan",Y.join(" dan "),u,R].join(" "))}return n}function Jt(o){const{bankName:n,creditBinGroup:t,debitBinGroup:r}=o,e=(t||[]).join(", "),i=(r||[]).join(", ");return[...n&&e?[`Voucher berlaku untuk Kartu Kredit ${n} dengan 6-digit Bank Identification Number (BIN): ${e}.`]:[],...n&&i?[`Voucher berlaku untuk Kartu Debit ${n} dengan 6-digit Bank Identification Number (BIN): ${i}.`]:[]]}function ee(o){return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ee(o)}function F(o){if(o===null||o===!0||o===!1)return NaN;var n=Number(o);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function _(o,n){if(n.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+n.length+" present")}function I(o){_(1,arguments);var n=Object.prototype.toString.call(o);return o instanceof Date||ee(o)==="object"&&n==="[object Date]"?new Date(o.getTime()):typeof o=="number"||n==="[object Number]"?new Date(o):((typeof o=="string"||n==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function zt(o,n){_(2,arguments);var t=I(o).getTime(),r=F(n);return new Date(t+r)}var Zt={};function fe(){return Zt}function it(o){var n=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return n.setUTCFullYear(o.getFullYear()),o.getTime()-n.getTime()}var er=6e4,tr=36e5,rr=1e3;function nr(o){return _(1,arguments),o instanceof Date||ee(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function $e(o){if(_(1,arguments),!nr(o)&&typeof o!="number")return!1;var n=I(o);return!isNaN(Number(n))}function ot(o,n){_(2,arguments);var t=F(n);return zt(o,-t)}var ar=864e5;function ir(o){_(1,arguments);var n=I(o),t=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var r=n.getTime(),e=t-r;return Math.floor(e/ar)+1}function de(o){_(1,arguments);var n=1,t=I(o),r=t.getUTCDay(),e=(r<n?7:0)+r-n;return t.setUTCDate(t.getUTCDate()-e),t.setUTCHours(0,0,0,0),t}function ut(o){_(1,arguments);var n=I(o),t=n.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var e=de(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var a=de(i);return n.getTime()>=e.getTime()?t+1:n.getTime()>=a.getTime()?t:t-1}function or(o){_(1,arguments);var n=ut(o),t=new Date(0);t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0);var r=de(t);return r}var ur=6048e5;function st(o){_(1,arguments);var n=I(o),t=de(n).getTime()-or(n).getTime();return Math.round(t/ur)+1}function ue(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=fe(),f=F((t=(r=(e=(i=n==null?void 0:n.weekStartsOn)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:c.weekStartsOn)!==null&&r!==void 0?r:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=I(o),v=h.getUTCDay(),b=(v<f?7:0)+v-f;return h.setUTCDate(h.getUTCDate()-b),h.setUTCHours(0,0,0,0),h}function _e(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=I(o),f=c.getUTCFullYear(),h=fe(),v=F((t=(r=(e=(i=n==null?void 0:n.firstWeekContainsDate)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:h.firstWeekContainsDate)!==null&&r!==void 0?r:(s=h.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(f+1,0,v),b.setUTCHours(0,0,0,0);var x=ue(b,n),E=new Date(0);E.setUTCFullYear(f,0,v),E.setUTCHours(0,0,0,0);var N=ue(E,n);return c.getTime()>=x.getTime()?f+1:c.getTime()>=N.getTime()?f:f-1}function sr(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=fe(),f=F((t=(r=(e=(i=n==null?void 0:n.firstWeekContainsDate)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:c.firstWeekContainsDate)!==null&&r!==void 0?r:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=_e(o,n),v=new Date(0);v.setUTCFullYear(h,0,f),v.setUTCHours(0,0,0,0);var b=ue(v,n);return b}var lr=6048e5;function lt(o,n){_(1,arguments);var t=I(o),r=ue(t,n).getTime()-sr(t,n).getTime();return Math.round(r/lr)+1}function k(o,n){for(var t=o<0?"-":"",r=Math.abs(o).toString();r.length<n;)r="0"+r;return t+r}var cr={y:function(n,t){var r=n.getUTCFullYear(),e=r>0?r:1-r;return k(t==="yy"?e%100:e,t.length)},M:function(n,t){var r=n.getUTCMonth();return t==="M"?String(r+1):k(r+1,2)},d:function(n,t){return k(n.getUTCDate(),t.length)},a:function(n,t){var r=n.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(n,t){return k(n.getUTCHours()%12||12,t.length)},H:function(n,t){return k(n.getUTCHours(),t.length)},m:function(n,t){return k(n.getUTCMinutes(),t.length)},s:function(n,t){return k(n.getUTCSeconds(),t.length)},S:function(n,t){var r=t.length,e=n.getUTCMilliseconds(),i=Math.floor(e*Math.pow(10,r-3));return k(i,t.length)}};const re=cr;var se={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dr={G:function(n,t,r){var e=n.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})}},y:function(n,t,r){if(t==="yo"){var e=n.getUTCFullYear(),i=e>0?e:1-e;return r.ordinalNumber(i,{unit:"year"})}return re.y(n,t)},Y:function(n,t,r,e){var i=_e(n,e),a=i>0?i:1-i;if(t==="YY"){var u=a%100;return k(u,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):k(a,t.length)},R:function(n,t){var r=ut(n);return k(r,t.length)},u:function(n,t){var r=n.getUTCFullYear();return k(r,t.length)},Q:function(n,t,r){var e=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"Q":return String(e);case"QQ":return k(e,2);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,t,r){var e=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"q":return String(e);case"qq":return k(e,2);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,t,r){var e=n.getUTCMonth();switch(t){case"M":case"MM":return re.M(n,t);case"Mo":return r.ordinalNumber(e+1,{unit:"month"});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})}},L:function(n,t,r){var e=n.getUTCMonth();switch(t){case"L":return String(e+1);case"LL":return k(e+1,2);case"Lo":return r.ordinalNumber(e+1,{unit:"month"});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})}},w:function(n,t,r,e){var i=lt(n,e);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):k(i,t.length)},I:function(n,t,r){var e=st(n);return t==="Io"?r.ordinalNumber(e,{unit:"week"}):k(e,t.length)},d:function(n,t,r){return t==="do"?r.ordinalNumber(n.getUTCDate(),{unit:"date"}):re.d(n,t)},D:function(n,t,r){var e=ir(n);return t==="Do"?r.ordinalNumber(e,{unit:"dayOfYear"}):k(e,t.length)},E:function(n,t,r){var e=n.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})}},e:function(n,t,r,e){var i=n.getUTCDay(),a=(i-e.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return k(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(n,t,r,e){var i=n.getUTCDay(),a=(i-e.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return k(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(n,t,r){var e=n.getUTCDay(),i=e===0?7:e;switch(t){case"i":return String(i);case"ii":return k(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(e,{width:"short",context:"formatting"});case"iiii":default:return r.day(e,{width:"wide",context:"formatting"})}},a:function(n,t,r){var e=n.getUTCHours(),i=e/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(n,t,r){var e=n.getUTCHours(),i;switch(e===12?i=se.noon:e===0?i=se.midnight:i=e/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(n,t,r){var e=n.getUTCHours(),i;switch(e>=17?i=se.evening:e>=12?i=se.afternoon:e>=4?i=se.morning:i=se.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(n,t,r){if(t==="ho"){var e=n.getUTCHours()%12;return e===0&&(e=12),r.ordinalNumber(e,{unit:"hour"})}return re.h(n,t)},H:function(n,t,r){return t==="Ho"?r.ordinalNumber(n.getUTCHours(),{unit:"hour"}):re.H(n,t)},K:function(n,t,r){var e=n.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(e,{unit:"hour"}):k(e,t.length)},k:function(n,t,r){var e=n.getUTCHours();return e===0&&(e=24),t==="ko"?r.ordinalNumber(e,{unit:"hour"}):k(e,t.length)},m:function(n,t,r){return t==="mo"?r.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):re.m(n,t)},s:function(n,t,r){return t==="so"?r.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):re.s(n,t)},S:function(n,t){return re.S(n,t)},X:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return Ge(a);case"XXXX":case"XX":return oe(a);case"XXXXX":case"XXX":default:return oe(a,":")}},x:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"x":return Ge(a);case"xxxx":case"xx":return oe(a);case"xxxxx":case"xxx":default:return oe(a,":")}},O:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xe(a,":");case"OOOO":default:return"GMT"+oe(a,":")}},z:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xe(a,":");case"zzzz":default:return"GMT"+oe(a,":")}},t:function(n,t,r,e){var i=e._originalDate||n,a=Math.floor(i.getTime()/1e3);return k(a,t.length)},T:function(n,t,r,e){var i=e._originalDate||n,a=i.getTime();return k(a,t.length)}};function Xe(o,n){var t=o>0?"-":"+",r=Math.abs(o),e=Math.floor(r/60),i=r%60;if(i===0)return t+String(e);var a=n||"";return t+String(e)+a+k(i,2)}function Ge(o,n){if(o%60===0){var t=o>0?"-":"+";return t+k(Math.abs(o)/60,2)}return oe(o,n)}function oe(o,n){var t=n||"",r=o>0?"-":"+",e=Math.abs(o),i=k(Math.floor(e/60),2),a=k(e%60,2);return r+i+t+a}const fr=dr;var Ke=function(n,t){switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ct=function(n,t){switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},mr=function(n,t){var r=n.match(/(P+)(p+)?/)||[],e=r[1],i=r[2];if(!i)return Ke(n,t);var a;switch(e){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ke(e,t)).replace("{{time}}",ct(i,t))},vr={p:ct,P:mr};const We=vr;var hr=["D","DD"],gr=["YY","YYYY"];function dt(o){return hr.indexOf(o)!==-1}function ft(o){return gr.indexOf(o)!==-1}function De(o,n,t){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var pr={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"}},wr=function(n,t,r){var e,i=pr[n];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+e:e+" ago":e};const yr=wr;function ce(o){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.width?String(n.width):o.defaultWidth,r=o.formats[t]||o.formats[o.defaultWidth];return r}}var br={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dr={date:ce({formats:br,defaultWidth:"full"}),time:ce({formats:Tr,defaultWidth:"full"}),dateTime:ce({formats:kr,defaultWidth:"full"})};const Pr=Dr;var Mr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cr=function(n,t,r,e){return Mr[n]};const xr=Cr;function K(o){return function(n,t){var r=t!=null&&t.context?String(t.context):"standalone",e;if(r==="formatting"&&o.formattingValues){var i=o.defaultFormattingWidth||o.defaultWidth,a=t!=null&&t.width?String(t.width):i;e=o.formattingValues[a]||o.formattingValues[i]}else{var u=o.defaultWidth,s=t!=null&&t.width?String(t.width):o.defaultWidth;e=o.values[s]||o.values[u]}var l=o.argumentCallback?o.argumentCallback(n):n;return e[l]}}var Or={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Er={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ur={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"]},$r={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"]},Wr={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"}},Nr={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"}},Yr=function(n,t){var r=Number(n),e=r%100;if(e>20||e<10)switch(e%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},_r={ordinalNumber:Yr,era:K({values:Or,defaultWidth:"wide"}),quarter:K({values:Er,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:K({values:Ur,defaultWidth:"wide"}),day:K({values:$r,defaultWidth:"wide"}),dayPeriod:K({values:Wr,defaultWidth:"wide",formattingValues:Nr,defaultFormattingWidth:"wide"})};const Ar=_r;function J(o){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,e=r&&o.matchPatterns[r]||o.matchPatterns[o.defaultMatchWidth],i=n.match(e);if(!i)return null;var a=i[0],u=r&&o.parsePatterns[r]||o.parsePatterns[o.defaultParseWidth],s=Array.isArray(u)?Lr(u,function(f){return f.test(a)}):Sr(u,function(f){return f.test(a)}),l;l=o.valueCallback?o.valueCallback(s):s,l=t.valueCallback?t.valueCallback(l):l;var c=n.slice(a.length);return{value:l,rest:c}}}function Sr(o,n){for(var t in o)if(o.hasOwnProperty(t)&&n(o[t]))return t}function Lr(o,n){for(var t=0;t<o.length;t++)if(n(o[t]))return t}function mt(o){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.match(o.matchPattern);if(!r)return null;var e=r[0],i=n.match(o.parsePattern);if(!i)return null;var a=o.valueCallback?o.valueCallback(i[0]):i[0];a=t.valueCallback?t.valueCallback(a):a;var u=n.slice(e.length);return{value:a,rest:u}}}var Ir=/^(\d+)(th|st|nd|rd)?/i,Rr=/\d+/i,Hr={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},qr={any:[/^b/i,/^(a|c)/i]},Fr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Br={any:[/1/i,/2/i,/3/i,/4/i]},Qr={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},jr={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]},Vr={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},Xr={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]},Gr={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},Kr={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}},Jr={ordinalNumber:mt({matchPattern:Ir,parsePattern:Rr,valueCallback:function(n){return parseInt(n,10)}}),era:J({matchPatterns:Hr,defaultMatchWidth:"wide",parsePatterns:qr,defaultParseWidth:"any"}),quarter:J({matchPatterns:Fr,defaultMatchWidth:"wide",parsePatterns:Br,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:J({matchPatterns:Qr,defaultMatchWidth:"wide",parsePatterns:jr,defaultParseWidth:"any"}),day:J({matchPatterns:Vr,defaultMatchWidth:"wide",parsePatterns:Xr,defaultParseWidth:"any"}),dayPeriod:J({matchPatterns:Gr,defaultMatchWidth:"any",parsePatterns:Kr,defaultParseWidth:"any"})};const zr=Jr;var Zr={code:"en-US",formatDistance:yr,formatLong:Pr,formatRelative:xr,localize:Ar,match:zr,options:{weekStartsOn:0,firstWeekContainsDate:1}};const vt=Zr;var en=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rn=/^'([^]*?)'?$/,nn=/''/g,an=/[a-zA-Z]/;function ne(o,n,t){var r,e,i,a,u,s,l,c,f,h,v,b,x,E,N,Y,R,M;_(2,arguments);var G=String(n),U=fe(),L=(r=(e=t==null?void 0:t.locale)!==null&&e!==void 0?e:U.locale)!==null&&r!==void 0?r:vt,H=F((i=(a=(u=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(l=t.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&u!==void 0?u:U.firstWeekContainsDate)!==null&&a!==void 0?a:(f=U.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=F((v=(b=(x=(E=t==null?void 0:t.weekStartsOn)!==null&&E!==void 0?E:t==null||(N=t.locale)===null||N===void 0||(Y=N.options)===null||Y===void 0?void 0:Y.weekStartsOn)!==null&&x!==void 0?x:U.weekStartsOn)!==null&&b!==void 0?b:(R=U.locale)===null||R===void 0||(M=R.options)===null||M===void 0?void 0:M.weekStartsOn)!==null&&v!==void 0?v:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var B=I(o);if(!$e(B))throw new RangeError("Invalid time value");var te=it(B),me=ot(B,te),ve={firstWeekContainsDate:H,weekStartsOn:q,locale:L,_originalDate:B},Ce=G.match(tn).map(function(S){var Q=S[0];if(Q==="p"||Q==="P"){var ie=We[Q];return ie(S,L.formatLong)}return S}).join("").match(en).map(function(S){if(S==="''")return"'";var Q=S[0];if(Q==="'")return on(S);var ie=fr[Q];if(ie)return!(t!=null&&t.useAdditionalWeekYearTokens)&&ft(S)&&De(S,n,String(o)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&dt(S)&&De(S,n,String(o)),ie(me,S,L.localize,ve);if(Q.match(an))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");return S}).join("");return Ce}function on(o){var n=o.match(rn);return n?n[1].replace(nn,"'"):o}function un(o,n){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t]);return o}function Je(o,n){(n==null||n>o.length)&&(n=o.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=o[t];return r}function sn(o,n){if(o){if(typeof o=="string")return Je(o,n);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(o);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Je(o,n)}}function ze(o,n){var t=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=sn(o))||n&&o&&typeof o.length=="number"){t&&(o=t);var r=0,e=function(){};return{s:e,n:function(){return r>=o.length?{done:!0}:{done:!1,value:o[r++]}},e:function(l){throw l},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,u;return{s:function(){t=t.call(o)},n:function(){var l=t.next();return i=l.done,l},e:function(l){a=!0,u=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(a)throw u}}}}function m(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function Ne(o,n){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},Ne(o,n)}function w(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),n&&Ne(o,n)}function Pe(o){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pe(o)}function ln(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cn(o,n){if(n&&(ee(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m(o)}function y(o){var n=ln();return function(){var r=Pe(o),e;if(n){var i=Pe(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return cn(this,e)}}function g(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function dn(o,n){if(ee(o)!=="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,n||"default");if(ee(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(o)}function ht(o){var n=dn(o,"string");return ee(n)==="symbol"?n:String(n)}function Ze(o,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,ht(r.key),r)}}function p(o,n,t){return n&&Ze(o.prototype,n),t&&Ze(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function d(o,n,t){return n=ht(n),n in o?Object.defineProperty(o,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[n]=t,o}var fn=10,gt=function(){function o(){g(this,o),d(this,"priority",void 0),d(this,"subPriority",0)}return p(o,[{key:"validate",value:function(t,r){return!0}}]),o}(),mn=function(o){w(t,o);var n=y(t);function t(r,e,i,a,u){var s;return g(this,t),s=n.call(this),s.value=r,s.validateValue=e,s.setValue=i,s.priority=a,u&&(s.subPriority=u),s}return p(t,[{key:"validate",value:function(e,i){return this.validateValue(e,this.value,i)}},{key:"set",value:function(e,i,a){return this.setValue(e,i,this.value,a)}}]),t}(gt),vn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",fn),d(m(r),"subPriority",-1),r}return p(t,[{key:"set",value:function(e,i){if(i.timestampIsSet)return e;var a=new Date(0);return a.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),a.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),a}}]),t}(gt),T=function(){function o(){g(this,o),d(this,"incompatibleTokens",void 0),d(this,"priority",void 0),d(this,"subPriority",void 0)}return p(o,[{key:"run",value:function(t,r,e,i){var a=this.parse(t,r,e,i);return a?{setter:new mn(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(t,r,e){return!0}}]),o}(),hn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",140),d(m(r),"incompatibleTokens",["R","u","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"G":case"GG":case"GGG":return a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"});case"GGGGG":return a.era(e,{width:"narrow"});case"GGGG":default:return a.era(e,{width:"wide"})||a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"})}}},{key:"set",value:function(e,i,a){return i.era=a,e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),$={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}/},z={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 W(o,n){return o&&{value:n(o.value),rest:o.rest}}function C(o,n){var t=n.match(o);return t?{value:parseInt(t[0],10),rest:n.slice(t[0].length)}:null}function Z(o,n){var t=n.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:n.slice(1)};var r=t[1]==="+"?1:-1,e=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,a=t[5]?parseInt(t[5],10):0;return{value:r*(e*tr+i*er+a*rr),rest:n.slice(t[0].length)}}function pt(o){return C($.anyDigitsSigned,o)}function O(o,n){switch(o){case 1:return C($.singleDigit,n);case 2:return C($.twoDigits,n);case 3:return C($.threeDigits,n);case 4:return C($.fourDigits,n);default:return C(new RegExp("^\\d{1,"+o+"}"),n)}}function Me(o,n){switch(o){case 1:return C($.singleDigitSigned,n);case 2:return C($.twoDigitsSigned,n);case 3:return C($.threeDigitsSigned,n);case 4:return C($.fourDigitsSigned,n);default:return C(new RegExp("^-?\\d{1,"+o+"}"),n)}}function Ae(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function wt(o,n){var t=n>0,r=t?n:1-n,e;if(r<=50)e=o||100;else{var i=r+50,a=Math.floor(i/100)*100,u=o>=i%100;e=o+a-(u?100:0)}return t?e:1-e}function yt(o){return o%400===0||o%4===0&&o%100!==0}var gn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return{year:l,isTwoDigitYear:i==="yy"}};switch(i){case"y":return W(O(4,e),u);case"yo":return W(a.ordinalNumber(e,{unit:"year"}),u);default:return W(O(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,a){var u=e.getUTCFullYear();if(a.isTwoDigitYear){var s=wt(a.year,u);return e.setUTCFullYear(s,0,1),e.setUTCHours(0,0,0,0),e}var l=!("era"in i)||i.era===1?a.year:1-a.year;return e.setUTCFullYear(l,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),pn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return{year:l,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return W(O(4,e),u);case"Yo":return W(a.ordinalNumber(e,{unit:"year"}),u);default:return W(O(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,a,u){var s=_e(e,u);if(a.isTwoDigitYear){var l=wt(a.year,s);return e.setUTCFullYear(l,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ue(e,u)}var c=!("era"in i)||i.era===1?a.year:1-a.year;return e.setUTCFullYear(c,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ue(e,u)}}]),t}(T),wn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i){return Me(i==="R"?4:i.length,e)}},{key:"set",value:function(e,i,a){var u=new Date(0);return u.setUTCFullYear(a,0,4),u.setUTCHours(0,0,0,0),de(u)}}]),t}(T),yn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i){return Me(i==="u"?4:i.length,e)}},{key:"set",value:function(e,i,a){return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),bn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",120),d(m(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"Q":case"QQ":return O(i.length,e);case"Qo":return a.ordinalNumber(e,{unit:"quarter"});case"QQQ":return a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(e,{width:"wide",context:"formatting"})||a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,a){return e.setUTCMonth((a-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),Tn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",120),d(m(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"q":case"qq":return O(i.length,e);case"qo":return a.ordinalNumber(e,{unit:"quarter"});case"qqq":return a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(e,{width:"wide",context:"standalone"})||a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,a){return e.setUTCMonth((a-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),kn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),d(m(r),"priority",110),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l-1};switch(i){case"M":return W(C($.month,e),u);case"MM":return W(O(2,e),u);case"Mo":return W(a.ordinalNumber(e,{unit:"month"}),u);case"MMM":return a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(e,{width:"wide",context:"formatting"})||a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){return e.setUTCMonth(a,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),Dn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",110),d(m(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l-1};switch(i){case"L":return W(C($.month,e),u);case"LL":return W(O(2,e),u);case"Lo":return W(a.ordinalNumber(e,{unit:"month"}),u);case"LLL":return a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(e,{width:"wide",context:"standalone"})||a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){return e.setUTCMonth(a,1),e.setUTCHours(0,0,0,0),e}}]),t}(T);function Pn(o,n,t){_(2,arguments);var r=I(o),e=F(n),i=lt(r,t)-e;return r.setUTCDate(r.getUTCDate()-i*7),r}var Mn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",100),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"w":return C($.week,e);case"wo":return a.ordinalNumber(e,{unit:"week"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,a,u){return ue(Pn(e,a,u),u)}}]),t}(T);function Cn(o,n){_(2,arguments);var t=I(o),r=F(n),e=st(t)-r;return t.setUTCDate(t.getUTCDate()-e*7),t}var xn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",100),d(m(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"I":return C($.week,e);case"Io":return a.ordinalNumber(e,{unit:"week"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,a){return de(Cn(e,a))}}]),t}(T),On=[31,28,31,30,31,30,31,31,30,31,30,31],En=[31,29,31,30,31,30,31,31,30,31,30,31],Un=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"subPriority",1),d(m(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"d":return C($.date,e);case"do":return a.ordinalNumber(e,{unit:"date"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){var a=e.getUTCFullYear(),u=yt(a),s=e.getUTCMonth();return u?i>=1&&i<=En[s]:i>=1&&i<=On[s]}},{key:"set",value:function(e,i,a){return e.setUTCDate(a),e.setUTCHours(0,0,0,0),e}}]),t}(T),$n=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"subpriority",1),d(m(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"D":case"DD":return C($.dayOfYear,e);case"Do":return a.ordinalNumber(e,{unit:"date"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){var a=e.getUTCFullYear(),u=yt(a);return u?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(e,i,a){return e.setUTCMonth(0,a),e.setUTCHours(0,0,0,0),e}}]),t}(T);function Se(o,n,t){var r,e,i,a,u,s,l,c;_(2,arguments);var f=fe(),h=F((r=(e=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(u=t.locale)===null||u===void 0||(s=u.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&e!==void 0?e:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=I(o),b=F(n),x=v.getUTCDay(),E=b%7,N=(E+7)%7,Y=(N<h?7:0)+b-x;return v.setUTCDate(v.getUTCDate()+Y),v}var Wn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"E":case"EE":case"EEE":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T),Nn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a,u){var s=function(c){var f=Math.floor((c-1)/7)*7;return(c+u.weekStartsOn+6)%7+f};switch(i){case"e":case"ee":return W(O(i.length,e),s);case"eo":return W(a.ordinalNumber(e,{unit:"day"}),s);case"eee":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeeee":return a.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T),Yn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a,u){var s=function(c){var f=Math.floor((c-1)/7)*7;return(c+u.weekStartsOn+6)%7+f};switch(i){case"c":case"cc":return W(O(i.length,e),s);case"co":return W(a.ordinalNumber(e,{unit:"day"}),s);case"ccc":return a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"ccccc":return a.day(e,{width:"narrow",context:"standalone"});case"cccccc":return a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(e,{width:"wide",context:"standalone"})||a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T);function _n(o,n){_(2,arguments);var t=F(n);t%7===0&&(t=t-7);var r=1,e=I(o),i=e.getUTCDay(),a=t%7,u=(a+7)%7,s=(u<r?7:0)+t-i;return e.setUTCDate(e.getUTCDate()+s),e}var An=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l===0?7:l};switch(i){case"i":case"ii":return O(i.length,e);case"io":return a.ordinalNumber(e,{unit:"day"});case"iii":return W(a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u);case"iiiii":return W(a.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return W(a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return W(a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u)}}},{key:"validate",value:function(e,i){return i>=1&&i<=7}},{key:"set",value:function(e,i,a){return e=_n(e,a),e.setUTCHours(0,0,0,0),e}}]),t}(T),Sn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"a":case"aa":case"aaa":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),Ln=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"b":case"bb":case"bbb":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),In=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["a","b","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"B":case"BB":case"BBB":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),Rn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["H","K","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"h":return C($.hour12h,e);case"ho":return a.ordinalNumber(e,{unit:"hour"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=12}},{key:"set",value:function(e,i,a){var u=e.getUTCHours()>=12;return u&&a<12?e.setUTCHours(a+12,0,0,0):!u&&a===12?e.setUTCHours(0,0,0,0):e.setUTCHours(a,0,0,0),e}}]),t}(T),Hn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"H":return C($.hour23h,e);case"Ho":return a.ordinalNumber(e,{unit:"hour"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=23}},{key:"set",value:function(e,i,a){return e.setUTCHours(a,0,0,0),e}}]),t}(T),qn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["h","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"K":return C($.hour11h,e);case"Ko":return a.ordinalNumber(e,{unit:"hour"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){var u=e.getUTCHours()>=12;return u&&a<12?e.setUTCHours(a+12,0,0,0):e.setUTCHours(a,0,0,0),e}}]),t}(T),Fn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"k":return C($.hour24h,e);case"ko":return a.ordinalNumber(e,{unit:"hour"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=24}},{key:"set",value:function(e,i,a){var u=a<=24?a%24:a;return e.setUTCHours(u,0,0,0),e}}]),t}(T),Bn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",60),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"m":return C($.minute,e);case"mo":return a.ordinalNumber(e,{unit:"minute"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,a){return e.setUTCMinutes(a,0,0),e}}]),t}(T),Qn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",50),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"s":return C($.second,e);case"so":return a.ordinalNumber(e,{unit:"second"});default:return O(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,a){return e.setUTCSeconds(a,0),e}}]),t}(T),jn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",30),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i){var a=function(s){return Math.floor(s*Math.pow(10,-i.length+3))};return W(O(i.length,e),a)}},{key:"set",value:function(e,i,a){return e.setUTCMilliseconds(a),e}}]),t}(T),Vn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",10),d(m(r),"incompatibleTokens",["t","T","x"]),r}return p(t,[{key:"parse",value:function(e,i){switch(i){case"X":return Z(z.basicOptionalMinutes,e);case"XX":return Z(z.basic,e);case"XXXX":return Z(z.basicOptionalSeconds,e);case"XXXXX":return Z(z.extendedOptionalSeconds,e);case"XXX":default:return Z(z.extended,e)}}},{key:"set",value:function(e,i,a){return i.timestampIsSet?e:new Date(e.getTime()-a)}}]),t}(T),Xn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",10),d(m(r),"incompatibleTokens",["t","T","X"]),r}return p(t,[{key:"parse",value:function(e,i){switch(i){case"x":return Z(z.basicOptionalMinutes,e);case"xx":return Z(z.basic,e);case"xxxx":return Z(z.basicOptionalSeconds,e);case"xxxxx":return Z(z.extendedOptionalSeconds,e);case"xxx":default:return Z(z.extended,e)}}},{key:"set",value:function(e,i,a){return i.timestampIsSet?e:new Date(e.getTime()-a)}}]),t}(T),Gn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",40),d(m(r),"incompatibleTokens","*"),r}return p(t,[{key:"parse",value:function(e){return pt(e)}},{key:"set",value:function(e,i,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),t}(T),Kn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",20),d(m(r),"incompatibleTokens","*"),r}return p(t,[{key:"parse",value:function(e){return pt(e)}},{key:"set",value:function(e,i,a){return[new Date(a),{timestampIsSet:!0}]}}]),t}(T),Jn={G:new hn,y:new gn,Y:new pn,R:new wn,u:new yn,Q:new bn,q:new Tn,M:new kn,L:new Dn,w:new Mn,I:new xn,d:new Un,D:new $n,E:new Wn,e:new Nn,c:new Yn,i:new An,a:new Sn,b:new Ln,B:new In,h:new Rn,H:new Hn,K:new qn,k:new Fn,m:new Bn,s:new Qn,S:new jn,X:new Vn,x:new Xn,t:new Gn,T:new Kn},zn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ea=/^'([^]*?)'?$/,ta=/''/g,ra=/\S/,na=/[a-zA-Z]/;function et(o,n,t,r){var e,i,a,u,s,l,c,f,h,v,b,x,E,N,Y,R,M,G;_(3,arguments);var U=String(o),L=String(n),H=fe(),q=(e=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:H.locale)!==null&&e!==void 0?e:vt;if(!q.match)throw new RangeError("locale must contain match property");var B=F((a=(u=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(c=r.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:H.firstWeekContainsDate)!==null&&u!==void 0?u:(h=H.locale)===null||h===void 0||(v=h.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(B>=1&&B<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var te=F((b=(x=(E=(N=r==null?void 0:r.weekStartsOn)!==null&&N!==void 0?N:r==null||(Y=r.locale)===null||Y===void 0||(R=Y.options)===null||R===void 0?void 0:R.weekStartsOn)!==null&&E!==void 0?E:H.weekStartsOn)!==null&&x!==void 0?x:(M=H.locale)===null||M===void 0||(G=M.options)===null||G===void 0?void 0:G.weekStartsOn)!==null&&b!==void 0?b:0);if(!(te>=0&&te<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(L==="")return U===""?I(t):new Date(NaN);var me={firstWeekContainsDate:B,weekStartsOn:te,locale:q},ve=[new vn],Ce=L.match(Zn).map(function(A){var D=A[0];if(D in We){var j=We[D];return j(A,q.formatLong)}return A}).join("").match(zn),S=[],Q=ze(Ce),ie;try{var bt=function(){var D=ie.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&ft(D)&&De(D,L,o),!(r!=null&&r.useAdditionalDayOfYearTokens)&&dt(D)&&De(D,L,o);var j=D[0],we=Jn[j];if(we){var qe=we.incompatibleTokens;if(Array.isArray(qe)){var Fe=S.find(function(Be){return qe.includes(Be.token)||Be.token===j});if(Fe)throw new RangeError("The format string mustn't contain `".concat(Fe.fullToken,"` and `").concat(D,"` at the same time"))}else if(we.incompatibleTokens==="*"&&S.length>0)throw new RangeError("The format string mustn't contain `".concat(D,"` and any other token at the same time"));S.push({token:j,fullToken:D});var Oe=we.run(U,D,q.match,me);if(!Oe)return{v:new Date(NaN)};ve.push(Oe.setter),U=Oe.rest}else{if(j.match(na))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");if(D==="''"?D="'":j==="'"&&(D=aa(D)),U.indexOf(D)===0)U=U.slice(D.length);else return{v:new Date(NaN)}}};for(Q.s();!(ie=Q.n()).done;){var Le=bt();if(ee(Le)==="object")return Le.v}}catch(A){Q.e(A)}finally{Q.f()}if(U.length>0&&ra.test(U))return new Date(NaN);var Tt=ve.map(function(A){return A.priority}).sort(function(A,D){return D-A}).filter(function(A,D,j){return j.indexOf(A)===D}).map(function(A){return ve.filter(function(D){return D.priority===A}).sort(function(D,j){return j.subPriority-D.subPriority})}).map(function(A){return A[0]}),xe=I(t);if(isNaN(xe.getTime()))return new Date(NaN);var he=ot(xe,it(xe)),Ie={},ge=ze(Tt),Re;try{for(ge.s();!(Re=ge.n()).done;){var He=Re.value;if(!He.validate(he,me))return new Date(NaN);var pe=He.set(he,Ie,me);Array.isArray(pe)?(he=pe[0],un(Ie,pe[1])):he=pe}}catch(A){ge.e(A)}finally{ge.f()}return he}function aa(o){return o.match(ea)[1].replace(ta,"'")}var ia={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},oa=function(n,t,r){var e,i=ia[n];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"dalam waktu "+e:e+" yang lalu":e};const ua=oa;var sa={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},la={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},ca={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},da={date:ce({formats:sa,defaultWidth:"full"}),time:ce({formats:la,defaultWidth:"full"}),dateTime:ce({formats:ca,defaultWidth:"full"})};const fa=da;var ma={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},va=function(n,t,r,e){return ma[n]};const ha=va;var ga={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},pa={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},wa={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},ya={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},ba={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},Ta={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},ka=function(n,t){var r=Number(n);return"ke-"+r},Da={ordinalNumber:ka,era:K({values:ga,defaultWidth:"wide"}),quarter:K({values:pa,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:K({values:wa,defaultWidth:"wide"}),day:K({values:ya,defaultWidth:"wide"}),dayPeriod:K({values:ba,defaultWidth:"wide",formattingValues:Ta,defaultFormattingWidth:"wide"})};const Pa=Da;var Ma=/^ke-(\d+)?/i,Ca=/\d+/i,xa={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},Oa={any:[/^s/i,/^(m|e)/i]},Ea={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},Ua={any:[/1/i,/2/i,/3/i,/4/i]},$a={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},Wa={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,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Na={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},Ya={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},_a={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},Aa={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},Sa={ordinalNumber:mt({matchPattern:Ma,parsePattern:Ca,valueCallback:function(n){return parseInt(n,10)}}),era:J({matchPatterns:xa,defaultMatchWidth:"wide",parsePatterns:Oa,defaultParseWidth:"any"}),quarter:J({matchPatterns:Ea,defaultMatchWidth:"wide",parsePatterns:Ua,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:J({matchPatterns:$a,defaultMatchWidth:"wide",parsePatterns:Wa,defaultParseWidth:"any"}),day:J({matchPatterns:Na,defaultMatchWidth:"wide",parsePatterns:Ya,defaultParseWidth:"any"}),dayPeriod:J({matchPatterns:_a,defaultMatchWidth:"any",parsePatterns:Aa,defaultParseWidth:"any"})};const La=Sa;var Ia={code:"id",formatDistance:ua,formatLong:fa,formatRelative:ha,localize:Pa,match:La,options:{weekStartsOn:1,firstWeekContainsDate:1}};const ae=Ia;function Ra(o){let n="";const{dateStart:t,dateEnd:r}=o,e=$e(et(t,"yyyy-MM-dd HH:mm",new Date)),i=$e(et(r,"yyyy-MM-dd HH:mm",new Date));if(e&&i){const a=t.split(" "),u=a[0].split("-"),s=u[0],l=u[1],c=r.split(" "),f=c[0].split("-"),h=f[0],v=f[1];a[0]===c[0]?n=`Voucher hanya berlaku di tanggal ${ne(new Date(t),"d MMM yyyy",{locale:ae})}.`:s!==h?n=`Voucher berlaku dari ${ne(new Date(t),"d MMM yyyy",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`:s===h&&(l===v?n=`Voucher berlaku dari ${ne(new Date(t),"d",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`:n=`Voucher berlaku dari ${ne(new Date(t),"d MMM",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`)}else e&&!i&&(n=`Voucher berlaku dari ${ne(new Date(t),"d MMM yyyy",{locale:ae})}.`);return n}function Ha(o){const{isOneTimeUsage:n,isOneTimeUsagePerCard:t}=o;if(!n&&!t)return"";let r="";return n&&(r="Voucher hanya dapat digunakan 1x per member selama masa berlaku."),t&&(r="Voucher hanya dapat digunakan 1x per kartu selama masa berlaku."),n&&t&&(r="Voucher hanya dapat digunakan 1x transaksi untuk 1 kartu dan 1 member selama masa berlaku."),r}function qa(o){let n="";const{type:t,discountType:r,discountValue:e,isCheckedMaxFee:i,maxDiscountAmount:a,transactionTerms:u,termsMinTotalAmount:s,termsMinQty:l,limitFee:c}=o,f=N=>typeof N=="number"?N:Number.isNaN(Number(N))?0:Number(N),h=le({value:f(a),prefix:"Rp"}),v=le({value:f(e),prefix:"Rp"}),b=le({value:f(c),prefix:"Rp"}),x=le({value:f(s),prefix:"Rp"}),E=le({value:f(l)});switch(t===X.product||t===X.order||t===X.gift||t===X.payment?r===ke.percentage&&t!==X.gift?(n=`Diskon ${e||0}%`,i&&(n+=` (hingga ${h})`)):r===ke.amount&&t!==X.gift?n=`Potongan ${v}`:n=`Potongan ${b}`:t===X.freeShipping?(n="Shipping fee ditanggung oleh voilà.id",i&&(n+=` (hingga ${b})`)):t===X.freeInsurance&&(n="Insurance fee ditanggung oleh voilà.id",i&&(n+=` (hingga ${b})`)),u){case 0:n+=" tanpa minimum pembelian.";break;case 1:n+=` dengan min. pembelian ${x}.`;break;case 2:n+=` dengan min. pembelian ${l?E:0} item.`;break;default:n+=""}return n}const Fa=o=>{const n=[],{dateEnd:t,dateStart:r,type:e,discountType:i,discountValue:a,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:c,termsMinQty:f,limitFee:h,collections:v,brands:b,eligibilityType:x,isOneTimeUsage:E,quota:N,isOneTimeUsagePerCard:Y,payment:R}=o,{bankName:M="",creditBinGroup:G=[],debitBinGroup:U=[]}=R||{},L=Ra({dateStart:r,dateEnd:t}),H=Kt({type:e,collections:v,brands:b,eligibilityType:x,payment:R}),q=qa({type:e,discountType:i,discountValue:a,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:c,termsMinQty:f,limitFee:h}),B=Ha({isOneTimeUsage:E,isOneTimeUsagePerCard:Y}),te=Jt({bankName:M,creditBinGroup:G,debitBinGroup:U});return L&&n.push(L),q&&n.push(q),H&&n.push(H),B&&n.push(B),N>0&&n.push("Kuota voucher terbatas."),(te||[]).length>0&&n.push(...te),n},Ba=Fa;exports.DiscountType=ke;exports.VoucherType=X;exports.canUseDOM=rt;exports.getOwnerDocument=Ye;exports.isBrowser=nt;exports.isElement=tt;exports.isValidEvent=be;exports.useCallbackRef=Te;exports.useClipboard=Ut;exports.useDebounce=Wt;exports.useDimensions=Rt;exports.useDisclosure=qt;exports.useMediaQuery=Bt;exports.useNumberFormatter=le;exports.useOnlineStatus=Vt;exports.useOutsideClick=Gt;exports.useSafeLayoutEffect=at;exports.useVoucherTnc=Ba;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),tt=o=>o!=null&&typeof o=="object"&&"nodeType"in o&&o.nodeType===Node.ELEMENT_NODE,Ye=o=>tt(o)?o.ownerDocument??document:document,be=(o,n)=>{var r;const t=o.target;return o.button>0||t&&!Ye(t).contains(t)?!1:!((r=n.current)!=null&&r.contains(t))},rt=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),nt=rt(),kt=(o,n=[])=>{const t=P.useRef(o);return P.useEffect(()=>{t.current=o}),P.useCallback((...r)=>{var e;return(e=t.current)==null?void 0:e.call(t,...r)},n)},Te=kt;var Dt=function(){var o=document.getSelection();if(!o.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<o.rangeCount;r++)t.push(o.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null;break}return o.removeAllRanges(),function(){o.type==="Caret"&&o.removeAllRanges(),o.rangeCount||t.forEach(function(e){o.addRange(e)}),n&&n.focus()}},Pt=Dt,je={"text/plain":"Text","text/html":"Url",default:"Text"},Mt="Copy to clipboard: #{key}, Enter";function Ct(o){var n=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,n)}function xt(o,n){var t,r,e,i,a,u,s=!1;n||(n={}),t=n.debug||!1;try{e=Pt(),i=document.createRange(),a=document.getSelection(),u=document.createElement("span"),u.textContent=o,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(c){if(c.stopPropagation(),n.format)if(c.preventDefault(),typeof c.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=je[n.format]||je.default;window.clipboardData.setData(f,o)}else c.clipboardData.clearData(),c.clipboardData.setData(n.format,o);n.onCopy&&(c.preventDefault(),n.onCopy(c.clipboardData))}),document.body.appendChild(u),i.selectNodeContents(u),a.addRange(i);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");s=!0}catch(c){t&&console.error("unable to copy using execCommand: ",c),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",o),n.onCopy&&n.onCopy(window.clipboardData),s=!0}catch(f){t&&console.error("unable to copy using clipboardData: ",f),t&&console.error("falling back to prompt"),r=Ct("message"in n?n.message:Mt),window.prompt(r,o)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(i):a.removeAllRanges()),u&&document.body.removeChild(u),e()}return s}var Ot=xt;const Et=({value:o="",optionsOrTimeout:n={}}={})=>{const[t,r]=P.useState(!1),[e,i]=P.useState(o);P.useEffect(()=>i(o),[o]);const{timeout:a=1500,...u}=typeof n=="number"?{timeout:n}:n,s=P.useCallback(()=>{const l=Ot(e,u);r(l)},[e,u]);return P.useEffect(()=>{let l=null;return t&&(l=window.setTimeout(()=>{r(!1)},a)),()=>{l&&window.clearTimeout(l)}},[a,t]),{value:e,setValue:i,onCopy:s,hasCopied:t}},Ut=Et,$t=({value:o,delay:n=500})=>{const[t,r]=P.useState(o);return P.useEffect(()=>{const e=setTimeout(()=>r(o),n||500);return()=>{clearTimeout(e)}},[o,n]),t},Wt=$t;var Nt=process.env.NODE_ENV==="production",Ee="Invariant failed";function Qe(o,n){if(!o){if(Nt)throw new Error(Ee);var t=typeof n=="function"?n():n,r=t?"".concat(Ee,": ").concat(t):Ee;throw new Error(r)}}var ye=function(n){var t=n.top,r=n.right,e=n.bottom,i=n.left,a=r-i,u=e-t,s={top:t,right:r,bottom:e,left:i,width:a,height:u,x:i,y:t,center:{x:(r+i)/2,y:(e+t)/2}};return s},Yt=function(n,t){return{top:n.top-t.top,left:n.left-t.left,bottom:n.bottom+t.bottom,right:n.right+t.right}},Ve=function(n,t){return{top:n.top+t.top,left:n.left+t.left,bottom:n.bottom-t.bottom,right:n.right-t.right}},Ue={top:0,right:0,bottom:0,left:0},_t=function(n){var t=n.borderBox,r=n.margin,e=r===void 0?Ue:r,i=n.border,a=i===void 0?Ue:i,u=n.padding,s=u===void 0?Ue:u,l=ye(Yt(t,e)),c=ye(Ve(t,a)),f=ye(Ve(c,s));return{marginBox:l,borderBox:ye(t),paddingBox:c,contentBox:f,margin:e,border:a,padding:s}},X=function(n){var t=n.slice(0,-2),r=n.slice(-2);if(r!=="px")return 0;var e=Number(t);return isNaN(e)&&(process.env.NODE_ENV!=="production"?Qe(!1,"Could not parse value [raw: "+n+", without suffix: "+t+"]"):Qe(!1)),e},At=function(n,t){var r={top:X(t.marginTop),right:X(t.marginRight),bottom:X(t.marginBottom),left:X(t.marginLeft)},e={top:X(t.paddingTop),right:X(t.paddingRight),bottom:X(t.paddingBottom),left:X(t.paddingLeft)},i={top:X(t.borderTopWidth),right:X(t.borderRightWidth),bottom:X(t.borderBottomWidth),left:X(t.borderLeftWidth)};return _t({borderBox:n,margin:r,padding:e,border:i})},St=function(n){var t=n.getBoundingClientRect(),r=window.getComputedStyle(n);return At(t,r)};const Lt=nt?P.useLayoutEffect:P.useEffect,at=Lt,It=(o,n)=>{const[t,r]=P.useState(null),e=P.useRef();return at(()=>{const i=()=>{const a=o.current;a&&(e.current=requestAnimationFrame(()=>{const u=St(a);r(u)}))};return i(),n&&(window.addEventListener("resize",i),window.addEventListener("scroll",i)),()=>{n&&(window.removeEventListener("resize",i),window.removeEventListener("scroll",i)),e.current&&cancelAnimationFrame(e.current)}},[n]),t},Rt=It,Ht=({onClose:o,onOpen:n,isOpen:t,defaultIsOpen:r,id:e}={})=>{const[i,a]=P.useState(r||!1),u=t!==void 0?t:i,s=t!==void 0,l=P.useId(),c=e??`disclosure-${l}`,f=Te(n),h=Te(o),v=P.useCallback(()=>{s||a(!1),h==null||h()},[s,h]),b=P.useCallback(()=>{s||a(!0),f==null||f()},[s,f]),C=P.useCallback(()=>{u?v():b()},[u,b,v]);return{onClose:v,onOpen:b,onToggle:C,getButtonProps:({onClick:N,...H}={})=>({...H,"aria-expanded":u,"aria-controls":c,onClick(q){N==null||N(q),C()}}),getDisclosureProps:({...N}={})=>({...N,hidden:!u,id:c}),isOpen:u}},qt=Ht,Ft=(o,n={})=>{const{ssr:t=!0,fallback:r}=n,e=Array.isArray(o)?o:[o];let i=Array.isArray(r)?r:[r];i=i.filter(s=>s!=null);const[a,u]=P.useState(()=>e.map((s,l)=>({media:s,matches:t?!!i[l]:window.matchMedia(s).matches})));return P.useEffect(()=>{const s=window;u(e.map(f=>({media:f,matches:s.matchMedia(f).matches})));const l=e.map(f=>s.matchMedia(f)),c=f=>{u(h=>h.slice().map(v=>v.media===f.media?{...v,matches:f.matches}:v))};return l.forEach(f=>{f.addEventListener("change",c)}),()=>{l.forEach(f=>{f.removeEventListener("change",c)})}},[window]),a.map(s=>s.matches)},Bt=Ft,jt=({value:o,thousandSeparator:n=".",decimalLength:t,decimalSeparator:r=",",prefix:e=""})=>{const a=(u=>{const s=u.toString().split("."),l=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,n);let c="";return t!==void 0?s.length>1&&t>0?c=r+s[1].padEnd(t,"0").slice(0,t):t>0&&(c=r+"0".repeat(t)):s.length>1&&(c=r+s[1]),l+c})(o);return a.charAt(0)==="-"?a.replace(/^-/g,`-${e}`):`${e}${a}`},le=jt,Qt=()=>{const[o,n]=P.useState(navigator.onLine);return P.useEffect(()=>{const t=()=>n(navigator.onLine);return window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}},[]),{isOnline:o,isOffline:!o}},Vt=Qt,Xt=({enabled:o=!0,ref:n,handler:t})=>{const r=Te(t),i=P.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;P.useEffect(()=>{if(!o)return;const a=c=>{be(c,n)&&(i.isPointerDown=!0)},u=c=>{if(i.ignoreEmulatedMouseEvents){i.ignoreEmulatedMouseEvents=!1;return}i.isPointerDown&&t&&be(c,n)&&(i.isPointerDown=!1,r(c))},s=c=>{i.ignoreEmulatedMouseEvents=!0,t&&i.isPointerDown&&be(c,n)&&(i.isPointerDown=!1,r(c))},l=Ye(n.current);return l.addEventListener("mousedown",a,!0),l.addEventListener("mouseup",u,!0),l.addEventListener("touchstart",a,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",a,!0),l.removeEventListener("mouseup",u,!0),l.removeEventListener("touchstart",a,!0),l.removeEventListener("touchend",s,!0)}},[t,n,r,i,o])},Gt=Xt;var G=(o=>(o.product="Product",o.order="Order",o.gift="Gift",o.freeShipping="Free Shipping",o.freeInsurance="Free Insurance",o.bundling="Bundling",o.payment="Payment",o))(G||{}),ke=(o=>(o.percentage="percentage",o.amount="amount",o))(ke||{});function Kt(o){let n="";const{type:t,collections:r=[],brands:e=[],eligibilityType:i,payment:a}=o;if(t===G.product)r.length>0?n=`Voucher hanya berlaku untuk collection ${r.map(u=>u.name).join(", ")}.`:e.length>0?n=`Voucher hanya berlaku untuk produk brand ${e.map(u=>u.name).join(", ")}.`:i==="selected_products"&&(n="Voucher hanya berlaku untuk produk tertentu.");else if(t===G.payment){const{bankName:u,paymentMethod:s,creditBinGroup:l,debitBinGroup:c}=a||{},f=(s||[]).some(E=>(E||"").includes("(Full Payment)")),h=(s||[]).some(E=>(E||"").includes("(Cicilan 3x)")),v=(s||[]).some(E=>(E||"").includes("(Cicilan 6x)")),b=(s||[]).some(E=>(E||"").includes("(Cicilan 12x)")),C=h||v||b,O=f||C,N=[...(s||[]).some(E=>(E||"").includes("Debit Card"))&&(c||[]).length>0?["Kartu Debit"]:[],...O&&(l||[]).length>0?["Kartu Kredit"]:[]],H=f&&h&&v&&b;let q="";if(O&&!H){const E=[...f?["sistem pembayaran penuh"]:[],...C?["sistem cicilan"]:[]],Y=[...h?["3"]:[],...v?["6"]:[],...b?["12"]:[]];let I=Y.join(" dan ");if(Y.length>2){const S=Y.join(", "),F=S.lastIndexOf(","),j=S.slice(0,F),K=S.slice(F+1,S.length);I=[j,K].join(", dan")}q=["dengan",E.join(" dan "),...C?[`(${I} bulan)`]:[]].join(" ")}N.length>0&&(n=`${["Voucher berlaku untuk pembayaran menggunakan",N.join(" dan "),u,q].filter(E=>(E||"").length>0).join(" ")}.`)}return n}function Jt(o){const{bankName:n,creditBinGroup:t,debitBinGroup:r}=o,e=(t||[]).join(", "),i=(r||[]).join(", ");return[...n&&e?[`Voucher berlaku untuk Kartu Kredit ${n} dengan 6-digit Bank Identification Number (BIN): ${e}.`]:[],...n&&i?[`Voucher berlaku untuk Kartu Debit ${n} dengan 6-digit Bank Identification Number (BIN): ${i}.`]:[]]}function te(o){return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},te(o)}function B(o){if(o===null||o===!0||o===!1)return NaN;var n=Number(o);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function _(o,n){if(n.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+n.length+" present")}function R(o){_(1,arguments);var n=Object.prototype.toString.call(o);return o instanceof Date||te(o)==="object"&&n==="[object Date]"?new Date(o.getTime()):typeof o=="number"||n==="[object Number]"?new Date(o):((typeof o=="string"||n==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function zt(o,n){_(2,arguments);var t=R(o).getTime(),r=B(n);return new Date(t+r)}var Zt={};function fe(){return Zt}function it(o){var n=new Date(Date.UTC(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()));return n.setUTCFullYear(o.getFullYear()),o.getTime()-n.getTime()}var er=6e4,tr=36e5,rr=1e3;function nr(o){return _(1,arguments),o instanceof Date||te(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function $e(o){if(_(1,arguments),!nr(o)&&typeof o!="number")return!1;var n=R(o);return!isNaN(Number(n))}function ot(o,n){_(2,arguments);var t=B(n);return zt(o,-t)}var ar=864e5;function ir(o){_(1,arguments);var n=R(o),t=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var r=n.getTime(),e=t-r;return Math.floor(e/ar)+1}function de(o){_(1,arguments);var n=1,t=R(o),r=t.getUTCDay(),e=(r<n?7:0)+r-n;return t.setUTCDate(t.getUTCDate()-e),t.setUTCHours(0,0,0,0),t}function ut(o){_(1,arguments);var n=R(o),t=n.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var e=de(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var a=de(i);return n.getTime()>=e.getTime()?t+1:n.getTime()>=a.getTime()?t:t-1}function or(o){_(1,arguments);var n=ut(o),t=new Date(0);t.setUTCFullYear(n,0,4),t.setUTCHours(0,0,0,0);var r=de(t);return r}var ur=6048e5;function st(o){_(1,arguments);var n=R(o),t=de(n).getTime()-or(n).getTime();return Math.round(t/ur)+1}function ue(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=fe(),f=B((t=(r=(e=(i=n==null?void 0:n.weekStartsOn)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&e!==void 0?e:c.weekStartsOn)!==null&&r!==void 0?r:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=R(o),v=h.getUTCDay(),b=(v<f?7:0)+v-f;return h.setUTCDate(h.getUTCDate()-b),h.setUTCHours(0,0,0,0),h}function _e(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=R(o),f=c.getUTCFullYear(),h=fe(),v=B((t=(r=(e=(i=n==null?void 0:n.firstWeekContainsDate)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:h.firstWeekContainsDate)!==null&&r!==void 0?r:(s=h.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(f+1,0,v),b.setUTCHours(0,0,0,0);var C=ue(b,n),O=new Date(0);O.setUTCFullYear(f,0,v),O.setUTCHours(0,0,0,0);var W=ue(O,n);return c.getTime()>=C.getTime()?f+1:c.getTime()>=W.getTime()?f:f-1}function sr(o,n){var t,r,e,i,a,u,s,l;_(1,arguments);var c=fe(),f=B((t=(r=(e=(i=n==null?void 0:n.firstWeekContainsDate)!==null&&i!==void 0?i:n==null||(a=n.locale)===null||a===void 0||(u=a.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&e!==void 0?e:c.firstWeekContainsDate)!==null&&r!==void 0?r:(s=c.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=_e(o,n),v=new Date(0);v.setUTCFullYear(h,0,f),v.setUTCHours(0,0,0,0);var b=ue(v,n);return b}var lr=6048e5;function lt(o,n){_(1,arguments);var t=R(o),r=ue(t,n).getTime()-sr(t,n).getTime();return Math.round(r/lr)+1}function k(o,n){for(var t=o<0?"-":"",r=Math.abs(o).toString();r.length<n;)r="0"+r;return t+r}var cr={y:function(n,t){var r=n.getUTCFullYear(),e=r>0?r:1-r;return k(t==="yy"?e%100:e,t.length)},M:function(n,t){var r=n.getUTCMonth();return t==="M"?String(r+1):k(r+1,2)},d:function(n,t){return k(n.getUTCDate(),t.length)},a:function(n,t){var r=n.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(n,t){return k(n.getUTCHours()%12||12,t.length)},H:function(n,t){return k(n.getUTCHours(),t.length)},m:function(n,t){return k(n.getUTCMinutes(),t.length)},s:function(n,t){return k(n.getUTCSeconds(),t.length)},S:function(n,t){var r=t.length,e=n.getUTCMilliseconds(),i=Math.floor(e*Math.pow(10,r-3));return k(i,t.length)}};const re=cr;var se={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dr={G:function(n,t,r){var e=n.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})}},y:function(n,t,r){if(t==="yo"){var e=n.getUTCFullYear(),i=e>0?e:1-e;return r.ordinalNumber(i,{unit:"year"})}return re.y(n,t)},Y:function(n,t,r,e){var i=_e(n,e),a=i>0?i:1-i;if(t==="YY"){var u=a%100;return k(u,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):k(a,t.length)},R:function(n,t){var r=ut(n);return k(r,t.length)},u:function(n,t){var r=n.getUTCFullYear();return k(r,t.length)},Q:function(n,t,r){var e=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"Q":return String(e);case"QQ":return k(e,2);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,t,r){var e=Math.ceil((n.getUTCMonth()+1)/3);switch(t){case"q":return String(e);case"qq":return k(e,2);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,t,r){var e=n.getUTCMonth();switch(t){case"M":case"MM":return re.M(n,t);case"Mo":return r.ordinalNumber(e+1,{unit:"month"});case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})}},L:function(n,t,r){var e=n.getUTCMonth();switch(t){case"L":return String(e+1);case"LL":return k(e+1,2);case"Lo":return r.ordinalNumber(e+1,{unit:"month"});case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})}},w:function(n,t,r,e){var i=lt(n,e);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):k(i,t.length)},I:function(n,t,r){var e=st(n);return t==="Io"?r.ordinalNumber(e,{unit:"week"}):k(e,t.length)},d:function(n,t,r){return t==="do"?r.ordinalNumber(n.getUTCDate(),{unit:"date"}):re.d(n,t)},D:function(n,t,r){var e=ir(n);return t==="Do"?r.ordinalNumber(e,{unit:"dayOfYear"}):k(e,t.length)},E:function(n,t,r){var e=n.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})}},e:function(n,t,r,e){var i=n.getUTCDay(),a=(i-e.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return k(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(n,t,r,e){var i=n.getUTCDay(),a=(i-e.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return k(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(n,t,r){var e=n.getUTCDay(),i=e===0?7:e;switch(t){case"i":return String(i);case"ii":return k(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(e,{width:"short",context:"formatting"});case"iiii":default:return r.day(e,{width:"wide",context:"formatting"})}},a:function(n,t,r){var e=n.getUTCHours(),i=e/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(n,t,r){var e=n.getUTCHours(),i;switch(e===12?i=se.noon:e===0?i=se.midnight:i=e/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(n,t,r){var e=n.getUTCHours(),i;switch(e>=17?i=se.evening:e>=12?i=se.afternoon:e>=4?i=se.morning:i=se.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(n,t,r){if(t==="ho"){var e=n.getUTCHours()%12;return e===0&&(e=12),r.ordinalNumber(e,{unit:"hour"})}return re.h(n,t)},H:function(n,t,r){return t==="Ho"?r.ordinalNumber(n.getUTCHours(),{unit:"hour"}):re.H(n,t)},K:function(n,t,r){var e=n.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(e,{unit:"hour"}):k(e,t.length)},k:function(n,t,r){var e=n.getUTCHours();return e===0&&(e=24),t==="ko"?r.ordinalNumber(e,{unit:"hour"}):k(e,t.length)},m:function(n,t,r){return t==="mo"?r.ordinalNumber(n.getUTCMinutes(),{unit:"minute"}):re.m(n,t)},s:function(n,t,r){return t==="so"?r.ordinalNumber(n.getUTCSeconds(),{unit:"second"}):re.s(n,t)},S:function(n,t){return re.S(n,t)},X:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return Ge(a);case"XXXX":case"XX":return oe(a);case"XXXXX":case"XXX":default:return oe(a,":")}},x:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"x":return Ge(a);case"xxxx":case"xx":return oe(a);case"xxxxx":case"xxx":default:return oe(a,":")}},O:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xe(a,":");case"OOOO":default:return"GMT"+oe(a,":")}},z:function(n,t,r,e){var i=e._originalDate||n,a=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xe(a,":");case"zzzz":default:return"GMT"+oe(a,":")}},t:function(n,t,r,e){var i=e._originalDate||n,a=Math.floor(i.getTime()/1e3);return k(a,t.length)},T:function(n,t,r,e){var i=e._originalDate||n,a=i.getTime();return k(a,t.length)}};function Xe(o,n){var t=o>0?"-":"+",r=Math.abs(o),e=Math.floor(r/60),i=r%60;if(i===0)return t+String(e);var a=n||"";return t+String(e)+a+k(i,2)}function Ge(o,n){if(o%60===0){var t=o>0?"-":"+";return t+k(Math.abs(o)/60,2)}return oe(o,n)}function oe(o,n){var t=n||"",r=o>0?"-":"+",e=Math.abs(o),i=k(Math.floor(e/60),2),a=k(e%60,2);return r+i+t+a}const fr=dr;var Ke=function(n,t){switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ct=function(n,t){switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},mr=function(n,t){var r=n.match(/(P+)(p+)?/)||[],e=r[1],i=r[2];if(!i)return Ke(n,t);var a;switch(e){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",Ke(e,t)).replace("{{time}}",ct(i,t))},vr={p:ct,P:mr};const We=vr;var hr=["D","DD"],gr=["YY","YYYY"];function dt(o){return hr.indexOf(o)!==-1}function ft(o){return gr.indexOf(o)!==-1}function De(o,n,t){if(o==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(o==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var pr={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"}},wr=function(n,t,r){var e,i=pr[n];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+e:e+" ago":e};const yr=wr;function ce(o){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.width?String(n.width):o.defaultWidth,r=o.formats[t]||o.formats[o.defaultWidth];return r}}var br={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dr={date:ce({formats:br,defaultWidth:"full"}),time:ce({formats:Tr,defaultWidth:"full"}),dateTime:ce({formats:kr,defaultWidth:"full"})};const Pr=Dr;var Mr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Cr=function(n,t,r,e){return Mr[n]};const xr=Cr;function J(o){return function(n,t){var r=t!=null&&t.context?String(t.context):"standalone",e;if(r==="formatting"&&o.formattingValues){var i=o.defaultFormattingWidth||o.defaultWidth,a=t!=null&&t.width?String(t.width):i;e=o.formattingValues[a]||o.formattingValues[i]}else{var u=o.defaultWidth,s=t!=null&&t.width?String(t.width):o.defaultWidth;e=o.values[s]||o.values[u]}var l=o.argumentCallback?o.argumentCallback(n):n;return e[l]}}var Or={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Er={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ur={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"]},$r={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"]},Wr={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"}},Nr={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"}},Yr=function(n,t){var r=Number(n),e=r%100;if(e>20||e<10)switch(e%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},_r={ordinalNumber:Yr,era:J({values:Or,defaultWidth:"wide"}),quarter:J({values:Er,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:J({values:Ur,defaultWidth:"wide"}),day:J({values:$r,defaultWidth:"wide"}),dayPeriod:J({values:Wr,defaultWidth:"wide",formattingValues:Nr,defaultFormattingWidth:"wide"})};const Ar=_r;function z(o){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,e=r&&o.matchPatterns[r]||o.matchPatterns[o.defaultMatchWidth],i=n.match(e);if(!i)return null;var a=i[0],u=r&&o.parsePatterns[r]||o.parsePatterns[o.defaultParseWidth],s=Array.isArray(u)?Lr(u,function(f){return f.test(a)}):Sr(u,function(f){return f.test(a)}),l;l=o.valueCallback?o.valueCallback(s):s,l=t.valueCallback?t.valueCallback(l):l;var c=n.slice(a.length);return{value:l,rest:c}}}function Sr(o,n){for(var t in o)if(o.hasOwnProperty(t)&&n(o[t]))return t}function Lr(o,n){for(var t=0;t<o.length;t++)if(n(o[t]))return t}function mt(o){return function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.match(o.matchPattern);if(!r)return null;var e=r[0],i=n.match(o.parsePattern);if(!i)return null;var a=o.valueCallback?o.valueCallback(i[0]):i[0];a=t.valueCallback?t.valueCallback(a):a;var u=n.slice(e.length);return{value:a,rest:u}}}var Ir=/^(\d+)(th|st|nd|rd)?/i,Rr=/\d+/i,Hr={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},qr={any:[/^b/i,/^(a|c)/i]},Fr={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Br={any:[/1/i,/2/i,/3/i,/4/i]},jr={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},Qr={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]},Vr={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},Xr={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]},Gr={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},Kr={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}},Jr={ordinalNumber:mt({matchPattern:Ir,parsePattern:Rr,valueCallback:function(n){return parseInt(n,10)}}),era:z({matchPatterns:Hr,defaultMatchWidth:"wide",parsePatterns:qr,defaultParseWidth:"any"}),quarter:z({matchPatterns:Fr,defaultMatchWidth:"wide",parsePatterns:Br,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:z({matchPatterns:jr,defaultMatchWidth:"wide",parsePatterns:Qr,defaultParseWidth:"any"}),day:z({matchPatterns:Vr,defaultMatchWidth:"wide",parsePatterns:Xr,defaultParseWidth:"any"}),dayPeriod:z({matchPatterns:Gr,defaultMatchWidth:"any",parsePatterns:Kr,defaultParseWidth:"any"})};const zr=Jr;var Zr={code:"en-US",formatDistance:yr,formatLong:Pr,formatRelative:xr,localize:Ar,match:zr,options:{weekStartsOn:0,firstWeekContainsDate:1}};const vt=Zr;var en=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rn=/^'([^]*?)'?$/,nn=/''/g,an=/[a-zA-Z]/;function ne(o,n,t){var r,e,i,a,u,s,l,c,f,h,v,b,C,O,W,N,H,q;_(2,arguments);var E=String(n),Y=fe(),I=(r=(e=t==null?void 0:t.locale)!==null&&e!==void 0?e:Y.locale)!==null&&r!==void 0?r:vt,S=B((i=(a=(u=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(l=t.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&u!==void 0?u:Y.firstWeekContainsDate)!==null&&a!==void 0?a:(f=Y.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var F=B((v=(b=(C=(O=t==null?void 0:t.weekStartsOn)!==null&&O!==void 0?O:t==null||(W=t.locale)===null||W===void 0||(N=W.options)===null||N===void 0?void 0:N.weekStartsOn)!==null&&C!==void 0?C:Y.weekStartsOn)!==null&&b!==void 0?b:(H=Y.locale)===null||H===void 0||(q=H.options)===null||q===void 0?void 0:q.weekStartsOn)!==null&&v!==void 0?v:0);if(!(F>=0&&F<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!I.localize)throw new RangeError("locale must contain localize property");if(!I.formatLong)throw new RangeError("locale must contain formatLong property");var j=R(o);if(!$e(j))throw new RangeError("Invalid time value");var K=it(j),me=ot(j,K),ve={firstWeekContainsDate:S,weekStartsOn:F,locale:I,_originalDate:j},Ce=E.match(tn).map(function(L){var Q=L[0];if(Q==="p"||Q==="P"){var ie=We[Q];return ie(L,I.formatLong)}return L}).join("").match(en).map(function(L){if(L==="''")return"'";var Q=L[0];if(Q==="'")return on(L);var ie=fr[Q];if(ie)return!(t!=null&&t.useAdditionalWeekYearTokens)&&ft(L)&&De(L,n,String(o)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&dt(L)&&De(L,n,String(o)),ie(me,L,I.localize,ve);if(Q.match(an))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");return L}).join("");return Ce}function on(o){var n=o.match(rn);return n?n[1].replace(nn,"'"):o}function un(o,n){if(o==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t]);return o}function Je(o,n){(n==null||n>o.length)&&(n=o.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=o[t];return r}function sn(o,n){if(o){if(typeof o=="string")return Je(o,n);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(o);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Je(o,n)}}function ze(o,n){var t=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!t){if(Array.isArray(o)||(t=sn(o))||n&&o&&typeof o.length=="number"){t&&(o=t);var r=0,e=function(){};return{s:e,n:function(){return r>=o.length?{done:!0}:{done:!1,value:o[r++]}},e:function(l){throw l},f:e}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,u;return{s:function(){t=t.call(o)},n:function(){var l=t.next();return i=l.done,l},e:function(l){a=!0,u=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(a)throw u}}}}function m(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function Ne(o,n){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},Ne(o,n)}function w(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),n&&Ne(o,n)}function Pe(o){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pe(o)}function ln(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cn(o,n){if(n&&(te(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return m(o)}function y(o){var n=ln();return function(){var r=Pe(o),e;if(n){var i=Pe(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return cn(this,e)}}function g(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function dn(o,n){if(te(o)!=="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,n||"default");if(te(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(o)}function ht(o){var n=dn(o,"string");return te(n)==="symbol"?n:String(n)}function Ze(o,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,ht(r.key),r)}}function p(o,n,t){return n&&Ze(o.prototype,n),t&&Ze(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function d(o,n,t){return n=ht(n),n in o?Object.defineProperty(o,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[n]=t,o}var fn=10,gt=function(){function o(){g(this,o),d(this,"priority",void 0),d(this,"subPriority",0)}return p(o,[{key:"validate",value:function(t,r){return!0}}]),o}(),mn=function(o){w(t,o);var n=y(t);function t(r,e,i,a,u){var s;return g(this,t),s=n.call(this),s.value=r,s.validateValue=e,s.setValue=i,s.priority=a,u&&(s.subPriority=u),s}return p(t,[{key:"validate",value:function(e,i){return this.validateValue(e,this.value,i)}},{key:"set",value:function(e,i,a){return this.setValue(e,i,this.value,a)}}]),t}(gt),vn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",fn),d(m(r),"subPriority",-1),r}return p(t,[{key:"set",value:function(e,i){if(i.timestampIsSet)return e;var a=new Date(0);return a.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),a.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),a}}]),t}(gt),T=function(){function o(){g(this,o),d(this,"incompatibleTokens",void 0),d(this,"priority",void 0),d(this,"subPriority",void 0)}return p(o,[{key:"run",value:function(t,r,e,i){var a=this.parse(t,r,e,i);return a?{setter:new mn(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(t,r,e){return!0}}]),o}(),hn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",140),d(m(r),"incompatibleTokens",["R","u","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"G":case"GG":case"GGG":return a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"});case"GGGGG":return a.era(e,{width:"narrow"});case"GGGG":default:return a.era(e,{width:"wide"})||a.era(e,{width:"abbreviated"})||a.era(e,{width:"narrow"})}}},{key:"set",value:function(e,i,a){return i.era=a,e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),U={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}/},Z={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 $(o,n){return o&&{value:n(o.value),rest:o.rest}}function M(o,n){var t=n.match(o);return t?{value:parseInt(t[0],10),rest:n.slice(t[0].length)}:null}function ee(o,n){var t=n.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:n.slice(1)};var r=t[1]==="+"?1:-1,e=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,a=t[5]?parseInt(t[5],10):0;return{value:r*(e*tr+i*er+a*rr),rest:n.slice(t[0].length)}}function pt(o){return M(U.anyDigitsSigned,o)}function x(o,n){switch(o){case 1:return M(U.singleDigit,n);case 2:return M(U.twoDigits,n);case 3:return M(U.threeDigits,n);case 4:return M(U.fourDigits,n);default:return M(new RegExp("^\\d{1,"+o+"}"),n)}}function Me(o,n){switch(o){case 1:return M(U.singleDigitSigned,n);case 2:return M(U.twoDigitsSigned,n);case 3:return M(U.threeDigitsSigned,n);case 4:return M(U.fourDigitsSigned,n);default:return M(new RegExp("^-?\\d{1,"+o+"}"),n)}}function Ae(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function wt(o,n){var t=n>0,r=t?n:1-n,e;if(r<=50)e=o||100;else{var i=r+50,a=Math.floor(i/100)*100,u=o>=i%100;e=o+a-(u?100:0)}return t?e:1-e}function yt(o){return o%400===0||o%4===0&&o%100!==0}var gn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return{year:l,isTwoDigitYear:i==="yy"}};switch(i){case"y":return $(x(4,e),u);case"yo":return $(a.ordinalNumber(e,{unit:"year"}),u);default:return $(x(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,a){var u=e.getUTCFullYear();if(a.isTwoDigitYear){var s=wt(a.year,u);return e.setUTCFullYear(s,0,1),e.setUTCHours(0,0,0,0),e}var l=!("era"in i)||i.era===1?a.year:1-a.year;return e.setUTCFullYear(l,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),pn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return{year:l,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return $(x(4,e),u);case"Yo":return $(a.ordinalNumber(e,{unit:"year"}),u);default:return $(x(i.length,e),u)}}},{key:"validate",value:function(e,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(e,i,a,u){var s=_e(e,u);if(a.isTwoDigitYear){var l=wt(a.year,s);return e.setUTCFullYear(l,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ue(e,u)}var c=!("era"in i)||i.era===1?a.year:1-a.year;return e.setUTCFullYear(c,0,u.firstWeekContainsDate),e.setUTCHours(0,0,0,0),ue(e,u)}}]),t}(T),wn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i){return Me(i==="R"?4:i.length,e)}},{key:"set",value:function(e,i,a){var u=new Date(0);return u.setUTCFullYear(a,0,4),u.setUTCHours(0,0,0,0),de(u)}}]),t}(T),yn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",130),d(m(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i){return Me(i==="u"?4:i.length,e)}},{key:"set",value:function(e,i,a){return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),bn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",120),d(m(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"Q":case"QQ":return x(i.length,e);case"Qo":return a.ordinalNumber(e,{unit:"quarter"});case"QQQ":return a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(e,{width:"wide",context:"formatting"})||a.quarter(e,{width:"abbreviated",context:"formatting"})||a.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,a){return e.setUTCMonth((a-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),Tn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",120),d(m(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"q":case"qq":return x(i.length,e);case"qo":return a.ordinalNumber(e,{unit:"quarter"});case"qqq":return a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(e,{width:"wide",context:"standalone"})||a.quarter(e,{width:"abbreviated",context:"standalone"})||a.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=1&&i<=4}},{key:"set",value:function(e,i,a){return e.setUTCMonth((a-1)*3,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),kn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),d(m(r),"priority",110),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l-1};switch(i){case"M":return $(M(U.month,e),u);case"MM":return $(x(2,e),u);case"Mo":return $(a.ordinalNumber(e,{unit:"month"}),u);case"MMM":return a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(e,{width:"wide",context:"formatting"})||a.month(e,{width:"abbreviated",context:"formatting"})||a.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){return e.setUTCMonth(a,1),e.setUTCHours(0,0,0,0),e}}]),t}(T),Dn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",110),d(m(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l-1};switch(i){case"L":return $(M(U.month,e),u);case"LL":return $(x(2,e),u);case"Lo":return $(a.ordinalNumber(e,{unit:"month"}),u);case"LLL":return a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(e,{width:"wide",context:"standalone"})||a.month(e,{width:"abbreviated",context:"standalone"})||a.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){return e.setUTCMonth(a,1),e.setUTCHours(0,0,0,0),e}}]),t}(T);function Pn(o,n,t){_(2,arguments);var r=R(o),e=B(n),i=lt(r,t)-e;return r.setUTCDate(r.getUTCDate()-i*7),r}var Mn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",100),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"w":return M(U.week,e);case"wo":return a.ordinalNumber(e,{unit:"week"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,a,u){return ue(Pn(e,a,u),u)}}]),t}(T);function Cn(o,n){_(2,arguments);var t=R(o),r=B(n),e=st(t)-r;return t.setUTCDate(t.getUTCDate()-e*7),t}var xn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",100),d(m(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"I":return M(U.week,e);case"Io":return a.ordinalNumber(e,{unit:"week"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=53}},{key:"set",value:function(e,i,a){return de(Cn(e,a))}}]),t}(T),On=[31,28,31,30,31,30,31,31,30,31,30,31],En=[31,29,31,30,31,30,31,31,30,31,30,31],Un=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"subPriority",1),d(m(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"d":return M(U.date,e);case"do":return a.ordinalNumber(e,{unit:"date"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){var a=e.getUTCFullYear(),u=yt(a),s=e.getUTCMonth();return u?i>=1&&i<=En[s]:i>=1&&i<=On[s]}},{key:"set",value:function(e,i,a){return e.setUTCDate(a),e.setUTCHours(0,0,0,0),e}}]),t}(T),$n=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"subpriority",1),d(m(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"D":case"DD":return M(U.dayOfYear,e);case"Do":return a.ordinalNumber(e,{unit:"date"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){var a=e.getUTCFullYear(),u=yt(a);return u?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(e,i,a){return e.setUTCMonth(0,a),e.setUTCHours(0,0,0,0),e}}]),t}(T);function Se(o,n,t){var r,e,i,a,u,s,l,c;_(2,arguments);var f=fe(),h=B((r=(e=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(u=t.locale)===null||u===void 0||(s=u.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&e!==void 0?e:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var v=R(o),b=B(n),C=v.getUTCDay(),O=b%7,W=(O+7)%7,N=(W<h?7:0)+b-C;return v.setUTCDate(v.getUTCDate()+N),v}var Wn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"E":case"EE":case"EEE":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T),Nn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a,u){var s=function(c){var f=Math.floor((c-1)/7)*7;return(c+u.weekStartsOn+6)%7+f};switch(i){case"e":case"ee":return $(x(i.length,e),s);case"eo":return $(a.ordinalNumber(e,{unit:"day"}),s);case"eee":return a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeeee":return a.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T),Yn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a,u){var s=function(c){var f=Math.floor((c-1)/7)*7;return(c+u.weekStartsOn+6)%7+f};switch(i){case"c":case"cc":return $(x(i.length,e),s);case"co":return $(a.ordinalNumber(e,{unit:"day"}),s);case"ccc":return a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"ccccc":return a.day(e,{width:"narrow",context:"standalone"});case"cccccc":return a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(e,{width:"wide",context:"standalone"})||a.day(e,{width:"abbreviated",context:"standalone"})||a.day(e,{width:"short",context:"standalone"})||a.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,i){return i>=0&&i<=6}},{key:"set",value:function(e,i,a,u){return e=Se(e,a,u),e.setUTCHours(0,0,0,0),e}}]),t}(T);function _n(o,n){_(2,arguments);var t=B(n);t%7===0&&(t=t-7);var r=1,e=R(o),i=e.getUTCDay(),a=t%7,u=(a+7)%7,s=(u<r?7:0)+t-i;return e.setUTCDate(e.getUTCDate()+s),e}var An=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",90),d(m(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){var u=function(l){return l===0?7:l};switch(i){case"i":case"ii":return x(i.length,e);case"io":return a.ordinalNumber(e,{unit:"day"});case"iii":return $(a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u);case"iiiii":return $(a.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return $(a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return $(a.day(e,{width:"wide",context:"formatting"})||a.day(e,{width:"abbreviated",context:"formatting"})||a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u)}}},{key:"validate",value:function(e,i){return i>=1&&i<=7}},{key:"set",value:function(e,i,a){return e=_n(e,a),e.setUTCHours(0,0,0,0),e}}]),t}(T),Sn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"a":case"aa":case"aaa":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),Ln=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"b":case"bb":case"bbb":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),In=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",80),d(m(r),"incompatibleTokens",["a","b","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"B":case"BB":case"BBB":return a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(e,{width:"wide",context:"formatting"})||a.dayPeriod(e,{width:"abbreviated",context:"formatting"})||a.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,i,a){return e.setUTCHours(Ae(a),0,0,0),e}}]),t}(T),Rn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["H","K","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"h":return M(U.hour12h,e);case"ho":return a.ordinalNumber(e,{unit:"hour"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=12}},{key:"set",value:function(e,i,a){var u=e.getUTCHours()>=12;return u&&a<12?e.setUTCHours(a+12,0,0,0):!u&&a===12?e.setUTCHours(0,0,0,0):e.setUTCHours(a,0,0,0),e}}]),t}(T),Hn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"H":return M(U.hour23h,e);case"Ho":return a.ordinalNumber(e,{unit:"hour"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=23}},{key:"set",value:function(e,i,a){return e.setUTCHours(a,0,0,0),e}}]),t}(T),qn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["h","H","k","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"K":return M(U.hour11h,e);case"Ko":return a.ordinalNumber(e,{unit:"hour"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=11}},{key:"set",value:function(e,i,a){var u=e.getUTCHours()>=12;return u&&a<12?e.setUTCHours(a+12,0,0,0):e.setUTCHours(a,0,0,0),e}}]),t}(T),Fn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",70),d(m(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"k":return M(U.hour24h,e);case"ko":return a.ordinalNumber(e,{unit:"hour"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){return i>=1&&i<=24}},{key:"set",value:function(e,i,a){var u=a<=24?a%24:a;return e.setUTCHours(u,0,0,0),e}}]),t}(T),Bn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",60),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"m":return M(U.minute,e);case"mo":return a.ordinalNumber(e,{unit:"minute"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,a){return e.setUTCMinutes(a,0,0),e}}]),t}(T),jn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",50),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i,a){switch(i){case"s":return M(U.second,e);case"so":return a.ordinalNumber(e,{unit:"second"});default:return x(i.length,e)}}},{key:"validate",value:function(e,i){return i>=0&&i<=59}},{key:"set",value:function(e,i,a){return e.setUTCSeconds(a,0),e}}]),t}(T),Qn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",30),d(m(r),"incompatibleTokens",["t","T"]),r}return p(t,[{key:"parse",value:function(e,i){var a=function(s){return Math.floor(s*Math.pow(10,-i.length+3))};return $(x(i.length,e),a)}},{key:"set",value:function(e,i,a){return e.setUTCMilliseconds(a),e}}]),t}(T),Vn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",10),d(m(r),"incompatibleTokens",["t","T","x"]),r}return p(t,[{key:"parse",value:function(e,i){switch(i){case"X":return ee(Z.basicOptionalMinutes,e);case"XX":return ee(Z.basic,e);case"XXXX":return ee(Z.basicOptionalSeconds,e);case"XXXXX":return ee(Z.extendedOptionalSeconds,e);case"XXX":default:return ee(Z.extended,e)}}},{key:"set",value:function(e,i,a){return i.timestampIsSet?e:new Date(e.getTime()-a)}}]),t}(T),Xn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",10),d(m(r),"incompatibleTokens",["t","T","X"]),r}return p(t,[{key:"parse",value:function(e,i){switch(i){case"x":return ee(Z.basicOptionalMinutes,e);case"xx":return ee(Z.basic,e);case"xxxx":return ee(Z.basicOptionalSeconds,e);case"xxxxx":return ee(Z.extendedOptionalSeconds,e);case"xxx":default:return ee(Z.extended,e)}}},{key:"set",value:function(e,i,a){return i.timestampIsSet?e:new Date(e.getTime()-a)}}]),t}(T),Gn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",40),d(m(r),"incompatibleTokens","*"),r}return p(t,[{key:"parse",value:function(e){return pt(e)}},{key:"set",value:function(e,i,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),t}(T),Kn=function(o){w(t,o);var n=y(t);function t(){var r;g(this,t);for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return r=n.call.apply(n,[this].concat(i)),d(m(r),"priority",20),d(m(r),"incompatibleTokens","*"),r}return p(t,[{key:"parse",value:function(e){return pt(e)}},{key:"set",value:function(e,i,a){return[new Date(a),{timestampIsSet:!0}]}}]),t}(T),Jn={G:new hn,y:new gn,Y:new pn,R:new wn,u:new yn,Q:new bn,q:new Tn,M:new kn,L:new Dn,w:new Mn,I:new xn,d:new Un,D:new $n,E:new Wn,e:new Nn,c:new Yn,i:new An,a:new Sn,b:new Ln,B:new In,h:new Rn,H:new Hn,K:new qn,k:new Fn,m:new Bn,s:new jn,S:new Qn,X:new Vn,x:new Xn,t:new Gn,T:new Kn},zn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ea=/^'([^]*?)'?$/,ta=/''/g,ra=/\S/,na=/[a-zA-Z]/;function et(o,n,t,r){var e,i,a,u,s,l,c,f,h,v,b,C,O,W,N,H,q,E;_(3,arguments);var Y=String(o),I=String(n),S=fe(),F=(e=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:S.locale)!==null&&e!==void 0?e:vt;if(!F.match)throw new RangeError("locale must contain match property");var j=B((a=(u=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(c=r.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&u!==void 0?u:(h=S.locale)===null||h===void 0||(v=h.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var K=B((b=(C=(O=(W=r==null?void 0:r.weekStartsOn)!==null&&W!==void 0?W:r==null||(N=r.locale)===null||N===void 0||(H=N.options)===null||H===void 0?void 0:H.weekStartsOn)!==null&&O!==void 0?O:S.weekStartsOn)!==null&&C!==void 0?C:(q=S.locale)===null||q===void 0||(E=q.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&b!==void 0?b:0);if(!(K>=0&&K<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(I==="")return Y===""?R(t):new Date(NaN);var me={firstWeekContainsDate:j,weekStartsOn:K,locale:F},ve=[new vn],Ce=I.match(Zn).map(function(A){var D=A[0];if(D in We){var V=We[D];return V(A,F.formatLong)}return A}).join("").match(zn),L=[],Q=ze(Ce),ie;try{var bt=function(){var D=ie.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&ft(D)&&De(D,I,o),!(r!=null&&r.useAdditionalDayOfYearTokens)&&dt(D)&&De(D,I,o);var V=D[0],we=Jn[V];if(we){var qe=we.incompatibleTokens;if(Array.isArray(qe)){var Fe=L.find(function(Be){return qe.includes(Be.token)||Be.token===V});if(Fe)throw new RangeError("The format string mustn't contain `".concat(Fe.fullToken,"` and `").concat(D,"` at the same time"))}else if(we.incompatibleTokens==="*"&&L.length>0)throw new RangeError("The format string mustn't contain `".concat(D,"` and any other token at the same time"));L.push({token:V,fullToken:D});var Oe=we.run(Y,D,F.match,me);if(!Oe)return{v:new Date(NaN)};ve.push(Oe.setter),Y=Oe.rest}else{if(V.match(na))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");if(D==="''"?D="'":V==="'"&&(D=aa(D)),Y.indexOf(D)===0)Y=Y.slice(D.length);else return{v:new Date(NaN)}}};for(Q.s();!(ie=Q.n()).done;){var Le=bt();if(te(Le)==="object")return Le.v}}catch(A){Q.e(A)}finally{Q.f()}if(Y.length>0&&ra.test(Y))return new Date(NaN);var Tt=ve.map(function(A){return A.priority}).sort(function(A,D){return D-A}).filter(function(A,D,V){return V.indexOf(A)===D}).map(function(A){return ve.filter(function(D){return D.priority===A}).sort(function(D,V){return V.subPriority-D.subPriority})}).map(function(A){return A[0]}),xe=R(t);if(isNaN(xe.getTime()))return new Date(NaN);var he=ot(xe,it(xe)),Ie={},ge=ze(Tt),Re;try{for(ge.s();!(Re=ge.n()).done;){var He=Re.value;if(!He.validate(he,me))return new Date(NaN);var pe=He.set(he,Ie,me);Array.isArray(pe)?(he=pe[0],un(Ie,pe[1])):he=pe}}catch(A){ge.e(A)}finally{ge.f()}return he}function aa(o){return o.match(ea)[1].replace(ta,"'")}var ia={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},oa=function(n,t,r){var e,i=ia[n];return typeof i=="string"?e=i:t===1?e=i.one:e=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"dalam waktu "+e:e+" yang lalu":e};const ua=oa;var sa={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},la={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},ca={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},da={date:ce({formats:sa,defaultWidth:"full"}),time:ce({formats:la,defaultWidth:"full"}),dateTime:ce({formats:ca,defaultWidth:"full"})};const fa=da;var ma={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},va=function(n,t,r,e){return ma[n]};const ha=va;var ga={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},pa={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},wa={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},ya={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},ba={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},Ta={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},ka=function(n,t){var r=Number(n);return"ke-"+r},Da={ordinalNumber:ka,era:J({values:ga,defaultWidth:"wide"}),quarter:J({values:pa,defaultWidth:"wide",argumentCallback:function(n){return n-1}}),month:J({values:wa,defaultWidth:"wide"}),day:J({values:ya,defaultWidth:"wide"}),dayPeriod:J({values:ba,defaultWidth:"wide",formattingValues:Ta,defaultFormattingWidth:"wide"})};const Pa=Da;var Ma=/^ke-(\d+)?/i,Ca=/\d+/i,xa={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},Oa={any:[/^s/i,/^(m|e)/i]},Ea={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},Ua={any:[/1/i,/2/i,/3/i,/4/i]},$a={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},Wa={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,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Na={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},Ya={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},_a={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},Aa={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},Sa={ordinalNumber:mt({matchPattern:Ma,parsePattern:Ca,valueCallback:function(n){return parseInt(n,10)}}),era:z({matchPatterns:xa,defaultMatchWidth:"wide",parsePatterns:Oa,defaultParseWidth:"any"}),quarter:z({matchPatterns:Ea,defaultMatchWidth:"wide",parsePatterns:Ua,defaultParseWidth:"any",valueCallback:function(n){return n+1}}),month:z({matchPatterns:$a,defaultMatchWidth:"wide",parsePatterns:Wa,defaultParseWidth:"any"}),day:z({matchPatterns:Na,defaultMatchWidth:"wide",parsePatterns:Ya,defaultParseWidth:"any"}),dayPeriod:z({matchPatterns:_a,defaultMatchWidth:"any",parsePatterns:Aa,defaultParseWidth:"any"})};const La=Sa;var Ia={code:"id",formatDistance:ua,formatLong:fa,formatRelative:ha,localize:Pa,match:La,options:{weekStartsOn:1,firstWeekContainsDate:1}};const ae=Ia;function Ra(o){let n="";const{dateStart:t,dateEnd:r}=o,e=$e(et(t,"yyyy-MM-dd HH:mm",new Date)),i=$e(et(r,"yyyy-MM-dd HH:mm",new Date));if(e&&i){const a=t.split(" "),u=a[0].split("-"),s=u[0],l=u[1],c=r.split(" "),f=c[0].split("-"),h=f[0],v=f[1];a[0]===c[0]?n=`Voucher hanya berlaku di tanggal ${ne(new Date(t),"d MMM yyyy",{locale:ae})}.`:s!==h?n=`Voucher berlaku dari ${ne(new Date(t),"d MMM yyyy",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`:s===h&&(l===v?n=`Voucher berlaku dari ${ne(new Date(t),"d",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`:n=`Voucher berlaku dari ${ne(new Date(t),"d MMM",{locale:ae})} - ${ne(new Date(r),"d MMM yyyy",{locale:ae})}.`)}else e&&!i&&(n=`Voucher berlaku dari ${ne(new Date(t),"d MMM yyyy",{locale:ae})}.`);return n}function Ha(o){const{isOneTimeUsage:n,isOneTimeUsagePerCard:t}=o;if(!n&&!t)return"";let r="";return n&&(r="Voucher hanya dapat digunakan 1x per member selama masa berlaku."),t&&(r="Voucher hanya dapat digunakan 1x per kartu selama masa berlaku."),n&&t&&(r="Voucher hanya dapat digunakan 1x transaksi untuk 1 kartu dan 1 member selama masa berlaku."),r}function qa(o){let n="";const{type:t,discountType:r,discountValue:e,isCheckedMaxFee:i,maxDiscountAmount:a,transactionTerms:u,termsMinTotalAmount:s,termsMinQty:l,limitFee:c}=o,f=W=>typeof W=="number"?W:Number.isNaN(Number(W))?0:Number(W),h=le({value:f(a),prefix:"Rp"}),v=le({value:f(e),prefix:"Rp"}),b=le({value:f(c),prefix:"Rp"}),C=le({value:f(s),prefix:"Rp"}),O=le({value:f(l)});switch(t===G.product||t===G.order||t===G.gift||t===G.payment?r===ke.percentage&&t!==G.gift?(n=`Diskon ${e||0}%`,i&&(n+=` (hingga ${h})`)):r===ke.amount&&t!==G.gift?n=`Potongan ${v}`:n=`Potongan ${b}`:t===G.freeShipping?(n="Shipping fee ditanggung oleh voilà.id",i&&(n+=` (hingga ${b})`)):t===G.freeInsurance&&(n="Insurance fee ditanggung oleh voilà.id",i&&(n+=` (hingga ${b})`)),u){case 0:n+=" tanpa minimum pembelian.";break;case 1:n+=` dengan min. pembelian ${C}.`;break;case 2:n+=` dengan min. pembelian ${l?O:0} item.`;break;default:n+=""}return n}const Fa=o=>{const n=[],{dateEnd:t,dateStart:r,type:e,discountType:i,discountValue:a,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:c,termsMinQty:f,limitFee:h,collections:v,brands:b,eligibilityType:C,isOneTimeUsage:O,quota:W,isOneTimeUsagePerCard:N,payment:H}=o,{bankName:q="",creditBinGroup:E=[],debitBinGroup:Y=[]}=H||{},I=Ra({dateStart:r,dateEnd:t}),S=Kt({type:e,collections:v,brands:b,eligibilityType:C,payment:H}),F=qa({type:e,discountType:i,discountValue:a,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:c,termsMinQty:f,limitFee:h}),j=Ha({isOneTimeUsage:O,isOneTimeUsagePerCard:N}),K=Jt({bankName:q,creditBinGroup:E,debitBinGroup:Y});return I&&n.push(I),F&&n.push(F),S&&n.push(S),j&&n.push(j),W>0&&n.push("Kuota voucher terbatas."),(K||[]).length>0&&n.push(...K),n},Ba=Fa;exports.DiscountType=ke;exports.VoucherType=G;exports.canUseDOM=rt;exports.getOwnerDocument=Ye;exports.isBrowser=nt;exports.isElement=tt;exports.isValidEvent=be;exports.useCallbackRef=Te;exports.useClipboard=Ut;exports.useDebounce=Wt;exports.useDimensions=Rt;exports.useDisclosure=qt;exports.useMediaQuery=Bt;exports.useNumberFormatter=le;exports.useOnlineStatus=Vt;exports.useOutsideClick=Gt;exports.useSafeLayoutEffect=at;exports.useVoucherTnc=Ba;
|