@ctlyst.id/utils 1.1.5 → 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 +157 -152
- 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}},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"?je(!1,"Could not parse value [raw: "+n+", without suffix: "+t+"]"):je(!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:W,...H}={})=>({...H,"aria-expanded":u,"aria-controls":c,onClick(q){W==null||W(q),C()}}),getDisclosureProps:({...W}={})=>({...W,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 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(Y=>(Y||"").includes("(Full Payment)")),h=(s||[]).some(Y=>(Y||"").includes("(Cicilan 3x)")),v=(s||[]).some(Y=>(Y||"").includes("(Cicilan 6x)")),b=(s||[]).some(Y=>(Y||"").includes("(Cicilan 12x)")),C=h||v||b,O=f||C,W=[...(s||[]).some(Y=>(Y||"").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 Y=[...f?["sistem pembayaran penuh"]:[],...C?["sistem cicilan"]:[]],_=[...h?["3"]:[],...v?["6"]:[],...b?["12"]:[]],A=_.join(", "),R=A.lastIndexOf(","),Q=A.slice(0,R),F=A.slice(R+1,A.length),K=_.length>1?[Q,F].join(" dan"):F;q=["dengan",Y.join(" dan "),...C?[`(${K} bulan)`]:[]].join(" ")}W.length>0&&(n=["Voucher berlaku untuk pembayaran menggunakan",W.join(" dan "),u,q].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 N(o,n){if(n.length<o)throw new TypeError(o+" argument"+(o>1?"s":"")+" required, but only "+n.length+" present")}function I(o){N(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){N(2,arguments);var t=I(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 N(1,arguments),o instanceof Date||te(o)==="object"&&Object.prototype.toString.call(o)==="[object Date]"}function $e(o){if(N(1,arguments),!nr(o)&&typeof o!="number")return!1;var n=I(o);return!isNaN(Number(n))}function ot(o,n){N(2,arguments);var t=B(n);return zt(o,-t)}var ar=864e5;function ir(o){N(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){N(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){N(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){N(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){N(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;N(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=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;N(1,arguments);var c=I(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 $=ue(O,n);return c.getTime()>=C.getTime()?f+1:c.getTime()>=$.getTime()?f:f-1}function sr(o,n){var t,r,e,i,a,u,s,l;N(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){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 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]},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: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:Qr,defaultMatchWidth:"wide",parsePatterns:jr,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,H,q;N(2,arguments);var Y=String(n),_=fe(),A=(r=(e=t==null?void 0:t.locale)!==null&&e!==void 0?e:_.locale)!==null&&r!==void 0?r:vt,R=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:_.firstWeekContainsDate)!==null&&a!==void 0?a:(f=_.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Q=B((v=(b=(C=(O=t==null?void 0:t.weekStartsOn)!==null&&O!==void 0?O:t==null||($=t.locale)===null||$===void 0||(W=$.options)===null||W===void 0?void 0:W.weekStartsOn)!==null&&C!==void 0?C:_.weekStartsOn)!==null&&b!==void 0?b:(H=_.locale)===null||H===void 0||(q=H.options)===null||q===void 0?void 0:q.weekStartsOn)!==null&&v!==void 0?v:0);if(!(Q>=0&&Q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!A.localize)throw new RangeError("locale must contain localize property");if(!A.formatLong)throw new RangeError("locale must contain formatLong property");var F=I(o);if(!$e(F))throw new RangeError("Invalid time value");var K=it(F),me=ot(F,K),ve={firstWeekContainsDate:R,weekStartsOn:Q,locale:A,_originalDate:F},Ce=Y.match(tn).map(function(L){var j=L[0];if(j==="p"||j==="P"){var ie=We[j];return ie(L,A.formatLong)}return L}).join("").match(en).map(function(L){if(L==="''")return"'";var j=L[0];if(j==="'")return on(L);var ie=fr[j];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,A.localize,ve);if(j.match(an))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");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),E={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 U(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(E.anyDigitsSigned,o)}function x(o,n){switch(o){case 1:return M(E.singleDigit,n);case 2:return M(E.twoDigits,n);case 3:return M(E.threeDigits,n);case 4:return M(E.fourDigits,n);default:return M(new RegExp("^\\d{1,"+o+"}"),n)}}function Me(o,n){switch(o){case 1:return M(E.singleDigitSigned,n);case 2:return M(E.twoDigitsSigned,n);case 3:return M(E.threeDigitsSigned,n);case 4:return M(E.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 U(x(4,e),u);case"yo":return U(a.ordinalNumber(e,{unit:"year"}),u);default:return U(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 U(x(4,e),u);case"Yo":return U(a.ordinalNumber(e,{unit:"year"}),u);default:return U(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 U(M(E.month,e),u);case"MM":return U(x(2,e),u);case"Mo":return U(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 U(M(E.month,e),u);case"LL":return U(x(2,e),u);case"Lo":return U(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){N(2,arguments);var r=I(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(E.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){N(2,arguments);var t=I(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(E.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(E.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(E.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;N(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=I(o),b=B(n),C=v.getUTCDay(),O=b%7,$=(O+7)%7,W=($<h?7:0)+b-C;return v.setUTCDate(v.getUTCDate()+W),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 U(x(i.length,e),s);case"eo":return U(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 U(x(i.length,e),s);case"co":return U(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){N(2,arguments);var t=B(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 x(i.length,e);case"io":return a.ordinalNumber(e,{unit:"day"});case"iii":return U(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 U(a.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return U(a.day(e,{width:"short",context:"formatting"})||a.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return U(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(E.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(E.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(E.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(E.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(E.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),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 M(E.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),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 U(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 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,C,O,$,W,H,q,Y;N(3,arguments);var _=String(o),A=String(n),R=fe(),Q=(e=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:R.locale)!==null&&e!==void 0?e:vt;if(!Q.match)throw new RangeError("locale must contain match property");var F=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:R.firstWeekContainsDate)!==null&&u!==void 0?u:(h=R.locale)===null||h===void 0||(v=h.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(F>=1&&F<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var K=B((b=(C=(O=($=r==null?void 0:r.weekStartsOn)!==null&&$!==void 0?$:r==null||(W=r.locale)===null||W===void 0||(H=W.options)===null||H===void 0?void 0:H.weekStartsOn)!==null&&O!==void 0?O:R.weekStartsOn)!==null&&C!==void 0?C:(q=R.locale)===null||q===void 0||(Y=q.options)===null||Y===void 0?void 0:Y.weekStartsOn)!==null&&b!==void 0?b:0);if(!(K>=0&&K<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(A==="")return _===""?I(t):new Date(NaN);var me={firstWeekContainsDate:F,weekStartsOn:K,locale:Q},ve=[new vn],Ce=A.match(Zn).map(function(S){var D=S[0];if(D in We){var V=We[D];return V(S,Q.formatLong)}return S}).join("").match(zn),L=[],j=ze(Ce),ie;try{var bt=function(){var D=ie.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&ft(D)&&De(D,A,o),!(r!=null&&r.useAdditionalDayOfYearTokens)&&dt(D)&&De(D,A,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(_,D,Q.match,me);if(!Oe)return{v:new Date(NaN)};ve.push(Oe.setter),_=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)),_.indexOf(D)===0)_=_.slice(D.length);else return{v:new Date(NaN)}}};for(j.s();!(ie=j.n()).done;){var Le=bt();if(te(Le)==="object")return Le.v}}catch(S){j.e(S)}finally{j.f()}if(_.length>0&&ra.test(_))return new Date(NaN);var Tt=ve.map(function(S){return S.priority}).sort(function(S,D){return D-S}).filter(function(S,D,V){return V.indexOf(S)===D}).map(function(S){return ve.filter(function(D){return D.priority===S}).sort(function(D,V){return V.subPriority-D.subPriority})}).map(function(S){return S[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(S){ge.e(S)}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=$=>typeof $=="number"?$:Number.isNaN(Number($))?0:Number($),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:$,isOneTimeUsagePerCard:W,payment:H}=o,{bankName:q="",creditBinGroup:Y=[],debitBinGroup:_=[]}=H||{},A=Ra({dateStart:r,dateEnd:t}),R=Kt({type:e,collections:v,brands:b,eligibilityType:C,payment:H}),Q=qa({type:e,discountType:i,discountValue:a,isCheckedMaxFee:u,maxDiscountAmount:s,transactionTerms:l,termsMinTotalAmount:c,termsMinQty:f,limitFee:h}),F=Ha({isOneTimeUsage:O,isOneTimeUsagePerCard:W}),K=Jt({bankName:q,creditBinGroup:Y,debitBinGroup:_});return A&&n.push(A),Q&&n.push(Q),R&&n.push(R),F&&n.push(F),$>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;
|
|
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;
|
package/dist/index.mjs
CHANGED
|
@@ -222,16 +222,16 @@ const Ht = Mt ? Tt : ae, Rt = Ht, qt = (o, n) => {
|
|
|
222
222
|
onClose: v,
|
|
223
223
|
onOpen: b,
|
|
224
224
|
onToggle: M,
|
|
225
|
-
getButtonProps: ({ onClick:
|
|
225
|
+
getButtonProps: ({ onClick: W, ...H } = {}) => ({
|
|
226
226
|
...H,
|
|
227
227
|
"aria-expanded": u,
|
|
228
228
|
"aria-controls": c,
|
|
229
229
|
onClick(R) {
|
|
230
|
-
|
|
230
|
+
W == null || W(R), M();
|
|
231
231
|
}
|
|
232
232
|
}),
|
|
233
|
-
getDisclosureProps: ({
|
|
234
|
-
|
|
233
|
+
getDisclosureProps: ({ ...W } = {}) => ({
|
|
234
|
+
...W,
|
|
235
235
|
hidden: !u,
|
|
236
236
|
id: c
|
|
237
237
|
}),
|
|
@@ -316,32 +316,37 @@ function Xt(o) {
|
|
|
316
316
|
if (t === X.product)
|
|
317
317
|
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.");
|
|
318
318
|
else if (t === X.payment) {
|
|
319
|
-
const { bankName: u, paymentMethod: s, creditBinGroup: l, debitBinGroup: c } = a || {}, f = (s || []).some((
|
|
320
|
-
...(s || []).some((
|
|
319
|
+
const { bankName: u, paymentMethod: s, creditBinGroup: l, debitBinGroup: c } = a || {}, f = (s || []).some((O) => (O || "").includes("(Full Payment)")), h = (s || []).some((O) => (O || "").includes("(Cicilan 3x)")), v = (s || []).some((O) => (O || "").includes("(Cicilan 6x)")), b = (s || []).some((O) => (O || "").includes("(Cicilan 12x)")), M = h || v || b, x = f || M, W = [
|
|
320
|
+
...(s || []).some((O) => (O || "").includes("Debit Card")) && (c || []).length > 0 ? ["Kartu Debit"] : [],
|
|
321
321
|
...x && (l || []).length > 0 ? ["Kartu Kredit"] : []
|
|
322
322
|
], H = f && h && v && b;
|
|
323
323
|
let R = "";
|
|
324
324
|
if (x && !H) {
|
|
325
|
-
const
|
|
325
|
+
const O = [
|
|
326
326
|
...f ? ["sistem pembayaran penuh"] : [],
|
|
327
327
|
...M ? ["sistem cicilan"] : []
|
|
328
|
-
],
|
|
328
|
+
], N = [
|
|
329
329
|
...h ? ["3"] : [],
|
|
330
330
|
...v ? ["6"] : [],
|
|
331
331
|
...b ? ["12"] : []
|
|
332
|
-
]
|
|
332
|
+
];
|
|
333
|
+
let S = N.join(" dan ");
|
|
334
|
+
if (N.length > 2) {
|
|
335
|
+
const A = N.join(", "), q = A.lastIndexOf(","), B = A.slice(0, q), G = A.slice(q + 1, A.length);
|
|
336
|
+
S = [B, G].join(", dan");
|
|
337
|
+
}
|
|
333
338
|
R = [
|
|
334
339
|
"dengan",
|
|
335
|
-
|
|
336
|
-
...M ? [`(${
|
|
340
|
+
O.join(" dan "),
|
|
341
|
+
...M ? [`(${S} bulan)`] : []
|
|
337
342
|
].join(" ");
|
|
338
343
|
}
|
|
339
|
-
|
|
344
|
+
W.length > 0 && (n = `${[
|
|
340
345
|
"Voucher berlaku untuk pembayaran menggunakan",
|
|
341
|
-
|
|
346
|
+
W.join(" dan "),
|
|
342
347
|
u,
|
|
343
348
|
R
|
|
344
|
-
].join(" "));
|
|
349
|
+
].filter((O) => (O || "").length > 0).join(" ")}.`);
|
|
345
350
|
}
|
|
346
351
|
return n;
|
|
347
352
|
}
|
|
@@ -369,18 +374,18 @@ function F(o) {
|
|
|
369
374
|
var n = Number(o);
|
|
370
375
|
return isNaN(n) ? n : n < 0 ? Math.ceil(n) : Math.floor(n);
|
|
371
376
|
}
|
|
372
|
-
function
|
|
377
|
+
function Y(o, n) {
|
|
373
378
|
if (n.length < o)
|
|
374
379
|
throw new TypeError(o + " argument" + (o > 1 ? "s" : "") + " required, but only " + n.length + " present");
|
|
375
380
|
}
|
|
376
|
-
function
|
|
377
|
-
|
|
381
|
+
function I(o) {
|
|
382
|
+
Y(1, arguments);
|
|
378
383
|
var n = Object.prototype.toString.call(o);
|
|
379
384
|
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));
|
|
380
385
|
}
|
|
381
386
|
function Kt(o, n) {
|
|
382
|
-
|
|
383
|
-
var t =
|
|
387
|
+
Y(2, arguments);
|
|
388
|
+
var t = I(o).getTime(), r = F(n);
|
|
384
389
|
return new Date(t + r);
|
|
385
390
|
}
|
|
386
391
|
var Jt = {};
|
|
@@ -393,35 +398,35 @@ function at(o) {
|
|
|
393
398
|
}
|
|
394
399
|
var zt = 6e4, Zt = 36e5, er = 1e3;
|
|
395
400
|
function tr(o) {
|
|
396
|
-
return
|
|
401
|
+
return Y(1, arguments), o instanceof Date || ee(o) === "object" && Object.prototype.toString.call(o) === "[object Date]";
|
|
397
402
|
}
|
|
398
403
|
function Ne(o) {
|
|
399
|
-
if (
|
|
404
|
+
if (Y(1, arguments), !tr(o) && typeof o != "number")
|
|
400
405
|
return !1;
|
|
401
|
-
var n =
|
|
406
|
+
var n = I(o);
|
|
402
407
|
return !isNaN(Number(n));
|
|
403
408
|
}
|
|
404
409
|
function it(o, n) {
|
|
405
|
-
|
|
410
|
+
Y(2, arguments);
|
|
406
411
|
var t = F(n);
|
|
407
412
|
return Kt(o, -t);
|
|
408
413
|
}
|
|
409
414
|
var rr = 864e5;
|
|
410
415
|
function nr(o) {
|
|
411
|
-
|
|
412
|
-
var n =
|
|
416
|
+
Y(1, arguments);
|
|
417
|
+
var n = I(o), t = n.getTime();
|
|
413
418
|
n.setUTCMonth(0, 1), n.setUTCHours(0, 0, 0, 0);
|
|
414
419
|
var r = n.getTime(), e = t - r;
|
|
415
420
|
return Math.floor(e / rr) + 1;
|
|
416
421
|
}
|
|
417
422
|
function de(o) {
|
|
418
|
-
|
|
419
|
-
var n = 1, t =
|
|
423
|
+
Y(1, arguments);
|
|
424
|
+
var n = 1, t = I(o), r = t.getUTCDay(), e = (r < n ? 7 : 0) + r - n;
|
|
420
425
|
return t.setUTCDate(t.getUTCDate() - e), t.setUTCHours(0, 0, 0, 0), t;
|
|
421
426
|
}
|
|
422
427
|
function ot(o) {
|
|
423
|
-
|
|
424
|
-
var n =
|
|
428
|
+
Y(1, arguments);
|
|
429
|
+
var n = I(o), t = n.getUTCFullYear(), r = new Date(0);
|
|
425
430
|
r.setUTCFullYear(t + 1, 0, 4), r.setUTCHours(0, 0, 0, 0);
|
|
426
431
|
var e = de(r), i = new Date(0);
|
|
427
432
|
i.setUTCFullYear(t, 0, 4), i.setUTCHours(0, 0, 0, 0);
|
|
@@ -429,7 +434,7 @@ function ot(o) {
|
|
|
429
434
|
return n.getTime() >= e.getTime() ? t + 1 : n.getTime() >= a.getTime() ? t : t - 1;
|
|
430
435
|
}
|
|
431
436
|
function ar(o) {
|
|
432
|
-
|
|
437
|
+
Y(1, arguments);
|
|
433
438
|
var n = ot(o), t = new Date(0);
|
|
434
439
|
t.setUTCFullYear(n, 0, 4), t.setUTCHours(0, 0, 0, 0);
|
|
435
440
|
var r = de(t);
|
|
@@ -437,35 +442,35 @@ function ar(o) {
|
|
|
437
442
|
}
|
|
438
443
|
var ir = 6048e5;
|
|
439
444
|
function ut(o) {
|
|
440
|
-
|
|
441
|
-
var n =
|
|
445
|
+
Y(1, arguments);
|
|
446
|
+
var n = I(o), t = de(n).getTime() - ar(n).getTime();
|
|
442
447
|
return Math.round(t / ir) + 1;
|
|
443
448
|
}
|
|
444
449
|
function se(o, n) {
|
|
445
450
|
var t, r, e, i, a, u, s, l;
|
|
446
|
-
|
|
451
|
+
Y(1, arguments);
|
|
447
452
|
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);
|
|
448
453
|
if (!(f >= 0 && f <= 6))
|
|
449
454
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
450
|
-
var h =
|
|
455
|
+
var h = I(o), v = h.getUTCDay(), b = (v < f ? 7 : 0) + v - f;
|
|
451
456
|
return h.setUTCDate(h.getUTCDate() - b), h.setUTCHours(0, 0, 0, 0), h;
|
|
452
457
|
}
|
|
453
458
|
function Le(o, n) {
|
|
454
459
|
var t, r, e, i, a, u, s, l;
|
|
455
|
-
|
|
456
|
-
var c =
|
|
460
|
+
Y(1, arguments);
|
|
461
|
+
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);
|
|
457
462
|
if (!(v >= 1 && v <= 7))
|
|
458
463
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
459
464
|
var b = new Date(0);
|
|
460
465
|
b.setUTCFullYear(f + 1, 0, v), b.setUTCHours(0, 0, 0, 0);
|
|
461
466
|
var M = se(b, n), x = new Date(0);
|
|
462
467
|
x.setUTCFullYear(f, 0, v), x.setUTCHours(0, 0, 0, 0);
|
|
463
|
-
var
|
|
464
|
-
return c.getTime() >= M.getTime() ? f + 1 : c.getTime() >=
|
|
468
|
+
var $ = se(x, n);
|
|
469
|
+
return c.getTime() >= M.getTime() ? f + 1 : c.getTime() >= $.getTime() ? f : f - 1;
|
|
465
470
|
}
|
|
466
471
|
function or(o, n) {
|
|
467
472
|
var t, r, e, i, a, u, s, l;
|
|
468
|
-
|
|
473
|
+
Y(1, arguments);
|
|
469
474
|
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 = Le(o, n), v = new Date(0);
|
|
470
475
|
v.setUTCFullYear(h, 0, f), v.setUTCHours(0, 0, 0, 0);
|
|
471
476
|
var b = se(v, n);
|
|
@@ -473,8 +478,8 @@ function or(o, n) {
|
|
|
473
478
|
}
|
|
474
479
|
var ur = 6048e5;
|
|
475
480
|
function st(o, n) {
|
|
476
|
-
|
|
477
|
-
var t =
|
|
481
|
+
Y(1, arguments);
|
|
482
|
+
var t = I(o), r = se(t, n).getTime() - or(t, n).getTime();
|
|
478
483
|
return Math.round(r / ur) + 1;
|
|
479
484
|
}
|
|
480
485
|
function D(o, n) {
|
|
@@ -1583,31 +1588,31 @@ var Jr = {
|
|
|
1583
1588
|
const mt = Jr;
|
|
1584
1589
|
var zr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Zr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, en = /^'([^]*?)'?$/, tn = /''/g, rn = /[a-zA-Z]/;
|
|
1585
1590
|
function re(o, n, t) {
|
|
1586
|
-
var r, e, i, a, u, s, l, c, f, h, v, b, M, x,
|
|
1587
|
-
|
|
1588
|
-
var
|
|
1589
|
-
if (!(
|
|
1591
|
+
var r, e, i, a, u, s, l, c, f, h, v, b, M, x, $, W, H, R;
|
|
1592
|
+
Y(2, arguments);
|
|
1593
|
+
var O = String(n), N = fe(), S = (r = (e = t == null ? void 0 : t.locale) !== null && e !== void 0 ? e : N.locale) !== null && r !== void 0 ? r : mt, A = 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 : N.firstWeekContainsDate) !== null && a !== void 0 ? a : (f = N.locale) === null || f === void 0 || (h = f.options) === null || h === void 0 ? void 0 : h.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
|
|
1594
|
+
if (!(A >= 1 && A <= 7))
|
|
1590
1595
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
1591
|
-
var
|
|
1592
|
-
if (!(
|
|
1596
|
+
var q = F((v = (b = (M = (x = t == null ? void 0 : t.weekStartsOn) !== null && x !== void 0 ? x : t == null || ($ = t.locale) === null || $ === void 0 || (W = $.options) === null || W === void 0 ? void 0 : W.weekStartsOn) !== null && M !== void 0 ? M : N.weekStartsOn) !== null && b !== void 0 ? b : (H = N.locale) === null || H === void 0 || (R = H.options) === null || R === void 0 ? void 0 : R.weekStartsOn) !== null && v !== void 0 ? v : 0);
|
|
1597
|
+
if (!(q >= 0 && q <= 6))
|
|
1593
1598
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
1594
|
-
if (!
|
|
1599
|
+
if (!S.localize)
|
|
1595
1600
|
throw new RangeError("locale must contain localize property");
|
|
1596
|
-
if (!
|
|
1601
|
+
if (!S.formatLong)
|
|
1597
1602
|
throw new RangeError("locale must contain formatLong property");
|
|
1598
|
-
var
|
|
1599
|
-
if (!Ne(
|
|
1603
|
+
var B = I(o);
|
|
1604
|
+
if (!Ne(B))
|
|
1600
1605
|
throw new RangeError("Invalid time value");
|
|
1601
|
-
var G = at(
|
|
1602
|
-
firstWeekContainsDate:
|
|
1603
|
-
weekStartsOn:
|
|
1604
|
-
locale:
|
|
1605
|
-
_originalDate:
|
|
1606
|
-
}, Me =
|
|
1606
|
+
var G = at(B), me = it(B, G), ve = {
|
|
1607
|
+
firstWeekContainsDate: A,
|
|
1608
|
+
weekStartsOn: q,
|
|
1609
|
+
locale: S,
|
|
1610
|
+
_originalDate: B
|
|
1611
|
+
}, Me = O.match(Zr).map(function(L) {
|
|
1607
1612
|
var Q = L[0];
|
|
1608
1613
|
if (Q === "p" || Q === "P") {
|
|
1609
1614
|
var ie = Ye[Q];
|
|
1610
|
-
return ie(L,
|
|
1615
|
+
return ie(L, S.formatLong);
|
|
1611
1616
|
}
|
|
1612
1617
|
return L;
|
|
1613
1618
|
}).join("").match(zr).map(function(L) {
|
|
@@ -1618,7 +1623,7 @@ function re(o, n, t) {
|
|
|
1618
1623
|
return nn(L);
|
|
1619
1624
|
var ie = cr[Q];
|
|
1620
1625
|
if (ie)
|
|
1621
|
-
return !(t != null && t.useAdditionalWeekYearTokens) && dt(L) && De(L, n, String(o)), !(t != null && t.useAdditionalDayOfYearTokens) && ct(L) && De(L, n, String(o)), ie(me, L,
|
|
1626
|
+
return !(t != null && t.useAdditionalWeekYearTokens) && dt(L) && De(L, n, String(o)), !(t != null && t.useAdditionalDayOfYearTokens) && ct(L) && De(L, n, String(o)), ie(me, L, S.localize, ve);
|
|
1622
1627
|
if (Q.match(rn))
|
|
1623
1628
|
throw new RangeError("Format string contains an unescaped latin alphabet character `" + Q + "`");
|
|
1624
1629
|
return L;
|
|
@@ -1908,7 +1913,7 @@ var cn = 10, ht = /* @__PURE__ */ function() {
|
|
|
1908
1913
|
return i.era = a, e.setUTCFullYear(a, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
|
|
1909
1914
|
}
|
|
1910
1915
|
}]), t;
|
|
1911
|
-
}(T),
|
|
1916
|
+
}(T), E = {
|
|
1912
1917
|
month: /^(1[0-2]|0?\d)/,
|
|
1913
1918
|
// 0 to 12
|
|
1914
1919
|
date: /^(3[0-1]|[0-2]?\d)/,
|
|
@@ -1953,7 +1958,7 @@ var cn = 10, ht = /* @__PURE__ */ function() {
|
|
|
1953
1958
|
extended: /^([+-])(\d{2}):(\d{2})|Z/,
|
|
1954
1959
|
extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
|
|
1955
1960
|
};
|
|
1956
|
-
function
|
|
1961
|
+
function U(o, n) {
|
|
1957
1962
|
return o && {
|
|
1958
1963
|
value: n(o.value),
|
|
1959
1964
|
rest: o.rest
|
|
@@ -1982,18 +1987,18 @@ function Z(o, n) {
|
|
|
1982
1987
|
};
|
|
1983
1988
|
}
|
|
1984
1989
|
function gt(o) {
|
|
1985
|
-
return P(
|
|
1990
|
+
return P(E.anyDigitsSigned, o);
|
|
1986
1991
|
}
|
|
1987
1992
|
function C(o, n) {
|
|
1988
1993
|
switch (o) {
|
|
1989
1994
|
case 1:
|
|
1990
|
-
return P(
|
|
1995
|
+
return P(E.singleDigit, n);
|
|
1991
1996
|
case 2:
|
|
1992
|
-
return P(
|
|
1997
|
+
return P(E.twoDigits, n);
|
|
1993
1998
|
case 3:
|
|
1994
|
-
return P(
|
|
1999
|
+
return P(E.threeDigits, n);
|
|
1995
2000
|
case 4:
|
|
1996
|
-
return P(
|
|
2001
|
+
return P(E.fourDigits, n);
|
|
1997
2002
|
default:
|
|
1998
2003
|
return P(new RegExp("^\\d{1," + o + "}"), n);
|
|
1999
2004
|
}
|
|
@@ -2001,13 +2006,13 @@ function C(o, n) {
|
|
|
2001
2006
|
function Pe(o, n) {
|
|
2002
2007
|
switch (o) {
|
|
2003
2008
|
case 1:
|
|
2004
|
-
return P(
|
|
2009
|
+
return P(E.singleDigitSigned, n);
|
|
2005
2010
|
case 2:
|
|
2006
|
-
return P(
|
|
2011
|
+
return P(E.twoDigitsSigned, n);
|
|
2007
2012
|
case 3:
|
|
2008
|
-
return P(
|
|
2013
|
+
return P(E.threeDigitsSigned, n);
|
|
2009
2014
|
case 4:
|
|
2010
|
-
return P(
|
|
2015
|
+
return P(E.fourDigitsSigned, n);
|
|
2011
2016
|
default:
|
|
2012
2017
|
return P(new RegExp("^-?\\d{1," + o + "}"), n);
|
|
2013
2018
|
}
|
|
@@ -2063,13 +2068,13 @@ var vn = /* @__PURE__ */ function(o) {
|
|
|
2063
2068
|
};
|
|
2064
2069
|
switch (i) {
|
|
2065
2070
|
case "y":
|
|
2066
|
-
return
|
|
2071
|
+
return U(C(4, e), u);
|
|
2067
2072
|
case "yo":
|
|
2068
|
-
return
|
|
2073
|
+
return U(a.ordinalNumber(e, {
|
|
2069
2074
|
unit: "year"
|
|
2070
2075
|
}), u);
|
|
2071
2076
|
default:
|
|
2072
|
-
return
|
|
2077
|
+
return U(C(i.length, e), u);
|
|
2073
2078
|
}
|
|
2074
2079
|
}
|
|
2075
2080
|
}, {
|
|
@@ -2110,13 +2115,13 @@ var vn = /* @__PURE__ */ function(o) {
|
|
|
2110
2115
|
};
|
|
2111
2116
|
switch (i) {
|
|
2112
2117
|
case "Y":
|
|
2113
|
-
return
|
|
2118
|
+
return U(C(4, e), u);
|
|
2114
2119
|
case "Yo":
|
|
2115
|
-
return
|
|
2120
|
+
return U(a.ordinalNumber(e, {
|
|
2116
2121
|
unit: "year"
|
|
2117
2122
|
}), u);
|
|
2118
2123
|
default:
|
|
2119
|
-
return
|
|
2124
|
+
return U(C(i.length, e), u);
|
|
2120
2125
|
}
|
|
2121
2126
|
}
|
|
2122
2127
|
}, {
|
|
@@ -2315,11 +2320,11 @@ var vn = /* @__PURE__ */ function(o) {
|
|
|
2315
2320
|
};
|
|
2316
2321
|
switch (i) {
|
|
2317
2322
|
case "M":
|
|
2318
|
-
return
|
|
2323
|
+
return U(P(E.month, e), u);
|
|
2319
2324
|
case "MM":
|
|
2320
|
-
return
|
|
2325
|
+
return U(C(2, e), u);
|
|
2321
2326
|
case "Mo":
|
|
2322
|
-
return
|
|
2327
|
+
return U(a.ordinalNumber(e, {
|
|
2323
2328
|
unit: "month"
|
|
2324
2329
|
}), u);
|
|
2325
2330
|
case "MMM":
|
|
@@ -2378,11 +2383,11 @@ var vn = /* @__PURE__ */ function(o) {
|
|
|
2378
2383
|
};
|
|
2379
2384
|
switch (i) {
|
|
2380
2385
|
case "L":
|
|
2381
|
-
return
|
|
2386
|
+
return U(P(E.month, e), u);
|
|
2382
2387
|
case "LL":
|
|
2383
|
-
return
|
|
2388
|
+
return U(C(2, e), u);
|
|
2384
2389
|
case "Lo":
|
|
2385
|
-
return
|
|
2390
|
+
return U(a.ordinalNumber(e, {
|
|
2386
2391
|
unit: "month"
|
|
2387
2392
|
}), u);
|
|
2388
2393
|
case "LLL":
|
|
@@ -2425,8 +2430,8 @@ var vn = /* @__PURE__ */ function(o) {
|
|
|
2425
2430
|
}]), t;
|
|
2426
2431
|
}(T);
|
|
2427
2432
|
function Dn(o, n, t) {
|
|
2428
|
-
|
|
2429
|
-
var r =
|
|
2433
|
+
Y(2, arguments);
|
|
2434
|
+
var r = I(o), e = F(n), i = st(r, t) - e;
|
|
2430
2435
|
return r.setUTCDate(r.getUTCDate() - i * 7), r;
|
|
2431
2436
|
}
|
|
2432
2437
|
var kn = /* @__PURE__ */ function(o) {
|
|
@@ -2444,7 +2449,7 @@ var kn = /* @__PURE__ */ function(o) {
|
|
|
2444
2449
|
value: function(e, i, a) {
|
|
2445
2450
|
switch (i) {
|
|
2446
2451
|
case "w":
|
|
2447
|
-
return P(
|
|
2452
|
+
return P(E.week, e);
|
|
2448
2453
|
case "wo":
|
|
2449
2454
|
return a.ordinalNumber(e, {
|
|
2450
2455
|
unit: "week"
|
|
@@ -2466,8 +2471,8 @@ var kn = /* @__PURE__ */ function(o) {
|
|
|
2466
2471
|
}]), t;
|
|
2467
2472
|
}(T);
|
|
2468
2473
|
function Pn(o, n) {
|
|
2469
|
-
|
|
2470
|
-
var t =
|
|
2474
|
+
Y(2, arguments);
|
|
2475
|
+
var t = I(o), r = F(n), e = ut(t) - r;
|
|
2471
2476
|
return t.setUTCDate(t.getUTCDate() - e * 7), t;
|
|
2472
2477
|
}
|
|
2473
2478
|
var Mn = /* @__PURE__ */ function(o) {
|
|
@@ -2485,7 +2490,7 @@ var Mn = /* @__PURE__ */ function(o) {
|
|
|
2485
2490
|
value: function(e, i, a) {
|
|
2486
2491
|
switch (i) {
|
|
2487
2492
|
case "I":
|
|
2488
|
-
return P(
|
|
2493
|
+
return P(E.week, e);
|
|
2489
2494
|
case "Io":
|
|
2490
2495
|
return a.ordinalNumber(e, {
|
|
2491
2496
|
unit: "week"
|
|
@@ -2520,7 +2525,7 @@ var Mn = /* @__PURE__ */ function(o) {
|
|
|
2520
2525
|
value: function(e, i, a) {
|
|
2521
2526
|
switch (i) {
|
|
2522
2527
|
case "d":
|
|
2523
|
-
return P(
|
|
2528
|
+
return P(E.date, e);
|
|
2524
2529
|
case "do":
|
|
2525
2530
|
return a.ordinalNumber(e, {
|
|
2526
2531
|
unit: "date"
|
|
@@ -2557,7 +2562,7 @@ var Mn = /* @__PURE__ */ function(o) {
|
|
|
2557
2562
|
switch (i) {
|
|
2558
2563
|
case "D":
|
|
2559
2564
|
case "DD":
|
|
2560
|
-
return P(
|
|
2565
|
+
return P(E.dayOfYear, e);
|
|
2561
2566
|
case "Do":
|
|
2562
2567
|
return a.ordinalNumber(e, {
|
|
2563
2568
|
unit: "date"
|
|
@@ -2581,12 +2586,12 @@ var Mn = /* @__PURE__ */ function(o) {
|
|
|
2581
2586
|
}(T);
|
|
2582
2587
|
function Ie(o, n, t) {
|
|
2583
2588
|
var r, e, i, a, u, s, l, c;
|
|
2584
|
-
|
|
2589
|
+
Y(2, arguments);
|
|
2585
2590
|
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);
|
|
2586
2591
|
if (!(h >= 0 && h <= 6))
|
|
2587
2592
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
2588
|
-
var v =
|
|
2589
|
-
return v.setUTCDate(v.getUTCDate() +
|
|
2593
|
+
var v = I(o), b = F(n), M = v.getUTCDay(), x = b % 7, $ = (x + 7) % 7, W = ($ < h ? 7 : 0) + b - M;
|
|
2594
|
+
return v.setUTCDate(v.getUTCDate() + W), v;
|
|
2590
2595
|
}
|
|
2591
2596
|
var Un = /* @__PURE__ */ function(o) {
|
|
2592
2597
|
w(t, o);
|
|
@@ -2676,9 +2681,9 @@ var Un = /* @__PURE__ */ function(o) {
|
|
|
2676
2681
|
switch (i) {
|
|
2677
2682
|
case "e":
|
|
2678
2683
|
case "ee":
|
|
2679
|
-
return
|
|
2684
|
+
return U(C(i.length, e), s);
|
|
2680
2685
|
case "eo":
|
|
2681
|
-
return
|
|
2686
|
+
return U(a.ordinalNumber(e, {
|
|
2682
2687
|
unit: "day"
|
|
2683
2688
|
}), s);
|
|
2684
2689
|
case "eee":
|
|
@@ -2753,9 +2758,9 @@ var Un = /* @__PURE__ */ function(o) {
|
|
|
2753
2758
|
switch (i) {
|
|
2754
2759
|
case "c":
|
|
2755
2760
|
case "cc":
|
|
2756
|
-
return
|
|
2761
|
+
return U(C(i.length, e), s);
|
|
2757
2762
|
case "co":
|
|
2758
|
-
return
|
|
2763
|
+
return U(a.ordinalNumber(e, {
|
|
2759
2764
|
unit: "day"
|
|
2760
2765
|
}), s);
|
|
2761
2766
|
case "ccc":
|
|
@@ -2812,10 +2817,10 @@ var Un = /* @__PURE__ */ function(o) {
|
|
|
2812
2817
|
}]), t;
|
|
2813
2818
|
}(T);
|
|
2814
2819
|
function Nn(o, n) {
|
|
2815
|
-
|
|
2820
|
+
Y(2, arguments);
|
|
2816
2821
|
var t = F(n);
|
|
2817
2822
|
t % 7 === 0 && (t = t - 7);
|
|
2818
|
-
var r = 1, e =
|
|
2823
|
+
var r = 1, e = I(o), i = e.getUTCDay(), a = t % 7, u = (a + 7) % 7, s = (u < r ? 7 : 0) + t - i;
|
|
2819
2824
|
return e.setUTCDate(e.getUTCDate() + s), e;
|
|
2820
2825
|
}
|
|
2821
2826
|
var Yn = /* @__PURE__ */ function(o) {
|
|
@@ -2843,7 +2848,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
2843
2848
|
unit: "day"
|
|
2844
2849
|
});
|
|
2845
2850
|
case "iii":
|
|
2846
|
-
return
|
|
2851
|
+
return U(a.day(e, {
|
|
2847
2852
|
width: "abbreviated",
|
|
2848
2853
|
context: "formatting"
|
|
2849
2854
|
}) || a.day(e, {
|
|
@@ -2854,12 +2859,12 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
2854
2859
|
context: "formatting"
|
|
2855
2860
|
}), u);
|
|
2856
2861
|
case "iiiii":
|
|
2857
|
-
return
|
|
2862
|
+
return U(a.day(e, {
|
|
2858
2863
|
width: "narrow",
|
|
2859
2864
|
context: "formatting"
|
|
2860
2865
|
}), u);
|
|
2861
2866
|
case "iiiiii":
|
|
2862
|
-
return
|
|
2867
|
+
return U(a.day(e, {
|
|
2863
2868
|
width: "short",
|
|
2864
2869
|
context: "formatting"
|
|
2865
2870
|
}) || a.day(e, {
|
|
@@ -2868,7 +2873,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
2868
2873
|
}), u);
|
|
2869
2874
|
case "iiii":
|
|
2870
2875
|
default:
|
|
2871
|
-
return
|
|
2876
|
+
return U(a.day(e, {
|
|
2872
2877
|
width: "wide",
|
|
2873
2878
|
context: "formatting"
|
|
2874
2879
|
}) || a.day(e, {
|
|
@@ -3056,7 +3061,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
3056
3061
|
value: function(e, i, a) {
|
|
3057
3062
|
switch (i) {
|
|
3058
3063
|
case "h":
|
|
3059
|
-
return P(
|
|
3064
|
+
return P(E.hour12h, e);
|
|
3060
3065
|
case "ho":
|
|
3061
3066
|
return a.ordinalNumber(e, {
|
|
3062
3067
|
unit: "hour"
|
|
@@ -3092,7 +3097,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
3092
3097
|
value: function(e, i, a) {
|
|
3093
3098
|
switch (i) {
|
|
3094
3099
|
case "H":
|
|
3095
|
-
return P(
|
|
3100
|
+
return P(E.hour23h, e);
|
|
3096
3101
|
case "Ho":
|
|
3097
3102
|
return a.ordinalNumber(e, {
|
|
3098
3103
|
unit: "hour"
|
|
@@ -3127,7 +3132,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
3127
3132
|
value: function(e, i, a) {
|
|
3128
3133
|
switch (i) {
|
|
3129
3134
|
case "K":
|
|
3130
|
-
return P(
|
|
3135
|
+
return P(E.hour11h, e);
|
|
3131
3136
|
case "Ko":
|
|
3132
3137
|
return a.ordinalNumber(e, {
|
|
3133
3138
|
unit: "hour"
|
|
@@ -3163,7 +3168,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
3163
3168
|
value: function(e, i, a) {
|
|
3164
3169
|
switch (i) {
|
|
3165
3170
|
case "k":
|
|
3166
|
-
return P(
|
|
3171
|
+
return P(E.hour24h, e);
|
|
3167
3172
|
case "ko":
|
|
3168
3173
|
return a.ordinalNumber(e, {
|
|
3169
3174
|
unit: "hour"
|
|
@@ -3199,7 +3204,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
3199
3204
|
value: function(e, i, a) {
|
|
3200
3205
|
switch (i) {
|
|
3201
3206
|
case "m":
|
|
3202
|
-
return P(
|
|
3207
|
+
return P(E.minute, e);
|
|
3203
3208
|
case "mo":
|
|
3204
3209
|
return a.ordinalNumber(e, {
|
|
3205
3210
|
unit: "minute"
|
|
@@ -3234,7 +3239,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
3234
3239
|
value: function(e, i, a) {
|
|
3235
3240
|
switch (i) {
|
|
3236
3241
|
case "s":
|
|
3237
|
-
return P(
|
|
3242
|
+
return P(E.second, e);
|
|
3238
3243
|
case "so":
|
|
3239
3244
|
return a.ordinalNumber(e, {
|
|
3240
3245
|
unit: "second"
|
|
@@ -3270,7 +3275,7 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
3270
3275
|
var a = function(s) {
|
|
3271
3276
|
return Math.floor(s * Math.pow(10, -i.length + 3));
|
|
3272
3277
|
};
|
|
3273
|
-
return
|
|
3278
|
+
return U(C(i.length, e), a);
|
|
3274
3279
|
}
|
|
3275
3280
|
}, {
|
|
3276
3281
|
key: "set",
|
|
@@ -3424,35 +3429,35 @@ var Yn = /* @__PURE__ */ function(o) {
|
|
|
3424
3429
|
T: new Xn()
|
|
3425
3430
|
}, Kn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Jn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, zn = /^'([^]*?)'?$/, Zn = /''/g, ea = /\S/, ta = /[a-zA-Z]/;
|
|
3426
3431
|
function rt(o, n, t, r) {
|
|
3427
|
-
var e, i, a, u, s, l, c, f, h, v, b, M, x,
|
|
3428
|
-
|
|
3429
|
-
var
|
|
3430
|
-
if (!
|
|
3432
|
+
var e, i, a, u, s, l, c, f, h, v, b, M, x, $, W, H, R, O;
|
|
3433
|
+
Y(3, arguments);
|
|
3434
|
+
var N = String(o), S = String(n), A = fe(), q = (e = (i = r == null ? void 0 : r.locale) !== null && i !== void 0 ? i : A.locale) !== null && e !== void 0 ? e : mt;
|
|
3435
|
+
if (!q.match)
|
|
3431
3436
|
throw new RangeError("locale must contain match property");
|
|
3432
|
-
var
|
|
3433
|
-
if (!(
|
|
3437
|
+
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 : A.firstWeekContainsDate) !== null && u !== void 0 ? u : (h = A.locale) === null || h === void 0 || (v = h.options) === null || v === void 0 ? void 0 : v.firstWeekContainsDate) !== null && a !== void 0 ? a : 1);
|
|
3438
|
+
if (!(B >= 1 && B <= 7))
|
|
3434
3439
|
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
3435
|
-
var G = F((b = (M = (x = (
|
|
3440
|
+
var G = F((b = (M = (x = ($ = r == null ? void 0 : r.weekStartsOn) !== null && $ !== void 0 ? $ : r == null || (W = r.locale) === null || W === void 0 || (H = W.options) === null || H === void 0 ? void 0 : H.weekStartsOn) !== null && x !== void 0 ? x : A.weekStartsOn) !== null && M !== void 0 ? M : (R = A.locale) === null || R === void 0 || (O = R.options) === null || O === void 0 ? void 0 : O.weekStartsOn) !== null && b !== void 0 ? b : 0);
|
|
3436
3441
|
if (!(G >= 0 && G <= 6))
|
|
3437
3442
|
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
3438
|
-
if (
|
|
3439
|
-
return
|
|
3443
|
+
if (S === "")
|
|
3444
|
+
return N === "" ? I(t) : new Date(NaN);
|
|
3440
3445
|
var me = {
|
|
3441
|
-
firstWeekContainsDate:
|
|
3446
|
+
firstWeekContainsDate: B,
|
|
3442
3447
|
weekStartsOn: G,
|
|
3443
|
-
locale:
|
|
3444
|
-
}, ve = [new fn()], Me =
|
|
3445
|
-
var k =
|
|
3448
|
+
locale: q
|
|
3449
|
+
}, ve = [new fn()], Me = S.match(Jn).map(function(_) {
|
|
3450
|
+
var k = _[0];
|
|
3446
3451
|
if (k in Ye) {
|
|
3447
3452
|
var j = Ye[k];
|
|
3448
|
-
return j(
|
|
3453
|
+
return j(_, q.formatLong);
|
|
3449
3454
|
}
|
|
3450
|
-
return
|
|
3455
|
+
return _;
|
|
3451
3456
|
}).join("").match(Kn), L = [], Q = et(Me), ie;
|
|
3452
3457
|
try {
|
|
3453
3458
|
var yt = function() {
|
|
3454
3459
|
var k = ie.value;
|
|
3455
|
-
!(r != null && r.useAdditionalWeekYearTokens) && dt(k) && De(k,
|
|
3460
|
+
!(r != null && r.useAdditionalWeekYearTokens) && dt(k) && De(k, S, o), !(r != null && r.useAdditionalDayOfYearTokens) && ct(k) && De(k, S, o);
|
|
3456
3461
|
var j = k[0], be = Gn[j];
|
|
3457
3462
|
if (be) {
|
|
3458
3463
|
var Be = be.incompatibleTokens;
|
|
@@ -3468,17 +3473,17 @@ function rt(o, n, t, r) {
|
|
|
3468
3473
|
token: j,
|
|
3469
3474
|
fullToken: k
|
|
3470
3475
|
});
|
|
3471
|
-
var xe = be.run(
|
|
3476
|
+
var xe = be.run(N, k, q.match, me);
|
|
3472
3477
|
if (!xe)
|
|
3473
3478
|
return {
|
|
3474
3479
|
v: new Date(NaN)
|
|
3475
3480
|
};
|
|
3476
|
-
ve.push(xe.setter),
|
|
3481
|
+
ve.push(xe.setter), N = xe.rest;
|
|
3477
3482
|
} else {
|
|
3478
3483
|
if (j.match(ta))
|
|
3479
3484
|
throw new RangeError("Format string contains an unescaped latin alphabet character `" + j + "`");
|
|
3480
|
-
if (k === "''" ? k = "'" : j === "'" && (k = ra(k)),
|
|
3481
|
-
|
|
3485
|
+
if (k === "''" ? k = "'" : j === "'" && (k = ra(k)), N.indexOf(k) === 0)
|
|
3486
|
+
N = N.slice(k.length);
|
|
3482
3487
|
else
|
|
3483
3488
|
return {
|
|
3484
3489
|
v: new Date(NaN)
|
|
@@ -3490,28 +3495,28 @@ function rt(o, n, t, r) {
|
|
|
3490
3495
|
if (ee(He) === "object")
|
|
3491
3496
|
return He.v;
|
|
3492
3497
|
}
|
|
3493
|
-
} catch (
|
|
3494
|
-
Q.e(
|
|
3498
|
+
} catch (_) {
|
|
3499
|
+
Q.e(_);
|
|
3495
3500
|
} finally {
|
|
3496
3501
|
Q.f();
|
|
3497
3502
|
}
|
|
3498
|
-
if (
|
|
3503
|
+
if (N.length > 0 && ea.test(N))
|
|
3499
3504
|
return new Date(NaN);
|
|
3500
|
-
var bt = ve.map(function(
|
|
3501
|
-
return
|
|
3502
|
-
}).sort(function(
|
|
3503
|
-
return k -
|
|
3504
|
-
}).filter(function(
|
|
3505
|
-
return j.indexOf(
|
|
3506
|
-
}).map(function(
|
|
3505
|
+
var bt = ve.map(function(_) {
|
|
3506
|
+
return _.priority;
|
|
3507
|
+
}).sort(function(_, k) {
|
|
3508
|
+
return k - _;
|
|
3509
|
+
}).filter(function(_, k, j) {
|
|
3510
|
+
return j.indexOf(_) === k;
|
|
3511
|
+
}).map(function(_) {
|
|
3507
3512
|
return ve.filter(function(k) {
|
|
3508
|
-
return k.priority ===
|
|
3513
|
+
return k.priority === _;
|
|
3509
3514
|
}).sort(function(k, j) {
|
|
3510
3515
|
return j.subPriority - k.subPriority;
|
|
3511
3516
|
});
|
|
3512
|
-
}).map(function(
|
|
3513
|
-
return
|
|
3514
|
-
}), Ce =
|
|
3517
|
+
}).map(function(_) {
|
|
3518
|
+
return _[0];
|
|
3519
|
+
}), Ce = I(t);
|
|
3515
3520
|
if (isNaN(Ce.getTime()))
|
|
3516
3521
|
return new Date(NaN);
|
|
3517
3522
|
var he = it(Ce, at(Ce)), Re = {}, we = et(bt), qe;
|
|
@@ -3523,8 +3528,8 @@ function rt(o, n, t, r) {
|
|
|
3523
3528
|
var ye = Fe.set(he, Re, me);
|
|
3524
3529
|
Array.isArray(ye) ? (he = ye[0], an(Re, ye[1])) : he = ye;
|
|
3525
3530
|
}
|
|
3526
|
-
} catch (
|
|
3527
|
-
we.e(
|
|
3531
|
+
} catch (_) {
|
|
3532
|
+
we.e(_);
|
|
3528
3533
|
} finally {
|
|
3529
3534
|
we.f();
|
|
3530
3535
|
}
|
|
@@ -3892,7 +3897,7 @@ function Ha(o) {
|
|
|
3892
3897
|
termsMinTotalAmount: s,
|
|
3893
3898
|
termsMinQty: l,
|
|
3894
3899
|
limitFee: c
|
|
3895
|
-
} = o, f = (
|
|
3900
|
+
} = o, f = ($) => typeof $ == "number" ? $ : Number.isNaN(Number($)) ? 0 : Number($), h = ge({ value: f(a), prefix: "Rp" }), v = ge({ value: f(e), prefix: "Rp" }), b = ge({ value: f(c), prefix: "Rp" }), M = ge({ value: f(s), prefix: "Rp" }), x = ge({ value: f(l) });
|
|
3896
3901
|
switch (t === X.product || t === X.order || t === X.gift || t === X.payment ? r === We.percentage && t !== X.gift ? (n = `Diskon ${e || 0}%`, i && (n += ` (hingga ${h})`)) : r === We.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) {
|
|
3897
3902
|
case 0:
|
|
3898
3903
|
n += " tanpa minimum pembelian.";
|
|
@@ -3925,10 +3930,10 @@ const Ra = (o) => {
|
|
|
3925
3930
|
brands: b,
|
|
3926
3931
|
eligibilityType: M,
|
|
3927
3932
|
isOneTimeUsage: x,
|
|
3928
|
-
quota:
|
|
3929
|
-
isOneTimeUsagePerCard:
|
|
3933
|
+
quota: $,
|
|
3934
|
+
isOneTimeUsagePerCard: W,
|
|
3930
3935
|
payment: H
|
|
3931
|
-
} = o, { bankName: R = "", creditBinGroup:
|
|
3936
|
+
} = o, { bankName: R = "", creditBinGroup: O = [], debitBinGroup: N = [] } = H || {}, S = Sa({ dateStart: r, dateEnd: t }), A = Xt({ type: e, collections: v, brands: b, eligibilityType: M, payment: H }), q = Ha({
|
|
3932
3937
|
type: e,
|
|
3933
3938
|
discountType: i,
|
|
3934
3939
|
discountValue: a,
|
|
@@ -3938,8 +3943,8 @@ const Ra = (o) => {
|
|
|
3938
3943
|
termsMinTotalAmount: c,
|
|
3939
3944
|
termsMinQty: f,
|
|
3940
3945
|
limitFee: h
|
|
3941
|
-
}),
|
|
3942
|
-
return
|
|
3946
|
+
}), B = Ia({ isOneTimeUsage: x, isOneTimeUsagePerCard: W }), G = Gt({ bankName: R, creditBinGroup: O, debitBinGroup: N });
|
|
3947
|
+
return S && n.push(S), q && n.push(q), A && n.push(A), B && n.push(B), $ > 0 && n.push("Kuota voucher terbatas."), (G || []).length > 0 && n.push(...G), n;
|
|
3943
3948
|
}, Ka = Ra;
|
|
3944
3949
|
export {
|
|
3945
3950
|
We as DiscountType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ctlyst.id/utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Utilities library for voila user facing library.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"@vanilla-extract/vite-plugin": "^3.8.0",
|
|
39
39
|
"ts-dedent": "^2.2.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "7a9af98a12318a5ec93e48a9044ee268bf34281f"
|
|
42
42
|
}
|