(()=>{var e={2864:(e,t,r)=>{"use strict";var o=r(28487),n=r(25592),a=n(o("String.prototype.indexOf"));e.exports=function(e,t){var r=o(e,!!t);return"function"==typeof r&&a(e,".prototype.")>-1?n(r):r}},25592:(e,t,r)=>{"use strict";var o=r(22698),n=r(28487),a=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),c=n("%Reflect.apply%",!0)||o.call(i,a),l=n("%Object.getOwnPropertyDescriptor%",!0),p=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(p)try{p({},"a",{value:1})}catch(e){p=null}e.exports=function(e){var t=c(o,i,arguments);if(l&&p){var r=l(t,"length");r.configurable&&p(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var f=function(){return c(o,a,arguments)};p?p(e.exports,"apply",{value:f}):e.exports.apply=f},59748:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,n="[object Function]";e.exports=function(e){var a=this;if("function"!=typeof a||o.call(a)!==n)throw new TypeError(t+a);for(var i,c=r.call(arguments,1),l=function(){if(this instanceof i){var t=a.apply(this,c.concat(r.call(arguments)));return Object(t)===t?t:this}return a.apply(e,c.concat(r.call(arguments)))},p=Math.max(0,a.length-c.length),u=[],f=0;f<p;f++)u.push("$"+f);if(i=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(l),a.prototype){var y=function(){};y.prototype=a.prototype,i.prototype=new y,y.prototype=null}return i}},22698:(e,t,r)=>{"use strict";var o=r(59748);e.exports=Function.prototype.bind||o},28487:(e,t,r)=>{"use strict";var o,n=SyntaxError,a=Function,i=TypeError,c=function(e){try{return a('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var p=function(){throw new i},u=l?function(){try{return p}catch(e){try{return l(arguments,"callee").get}catch(e){return p}}}():p,f=r(72770)(),y=Object.getPrototypeOf||function(e){return e.__proto__},s={},d="undefined"==typeof Uint8Array?o:y(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":f?y([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":s,"%AsyncGenerator%":s,"%AsyncGeneratorFunction%":s,"%AsyncIteratorPrototype%":s,"%Atomics%":"undefined"==typeof Atomics?o:Atomics,"%BigInt%":"undefined"==typeof BigInt?o:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?o:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?o:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?o:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":s,"%Int8Array%":"undefined"==typeof Int8Array?o:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?o:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?y(y([][Symbol.iterator]())):o,"%JSON%":"object"==typeof JSON?JSON:o,"%Map%":"undefined"==typeof Map?o:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?y((new Map)[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?o:Promise,"%Proxy%":"undefined"==typeof Proxy?o:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?o:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?y((new Set)[Symbol.iterator]()):o,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?y(""[Symbol.iterator]()):o,"%Symbol%":f?Symbol:o,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":d,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?o:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?o:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?o:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?o:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?o:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?o:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?o:WeakSet},b=function e(t){var r;if("%AsyncFunction%"===t)r=c("async function () {}");else if("%GeneratorFunction%"===t)r=c("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=c("async function* () {}");else if("%AsyncGenerator%"===t){var o=e("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&(r=y(n.prototype))}return m[t]=r,r},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},h=r(22698),v=r(22786),w=h.call(Function.call,Array.prototype.concat),S=h.call(Function.apply,Array.prototype.splice),j=h.call(Function.call,String.prototype.replace),A=h.call(Function.call,String.prototype.slice),O=h.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_=/\\(\\)?/g,x=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var o=[];return j(e,P,(function(e,t,r,n){o[o.length]=r?j(n,_,"$1"):t||e})),o},k=function(e,t){var r,o=e;if(v(g,o)&&(o="%"+(r=g[o])[0]+"%"),v(m,o)){var a=m[o];if(a===s&&(a=b(o)),void 0===a&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:a}}throw new n("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,e))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=x(e),o=r.length>0?r[0]:"",a=k("%"+o+"%",t),c=a.name,p=a.value,u=!1,f=a.alias;f&&(o=f[0],S(r,w([0,1],f)));for(var y=1,s=!0;y<r.length;y+=1){var d=r[y],b=A(d,0,1),g=A(d,-1);if(('"'===b||"'"===b||"`"===b||'"'===g||"'"===g||"`"===g)&&b!==g)throw new n("property names with quotes must have matching quotes");if("constructor"!==d&&s||(u=!0),v(m,c="%"+(o+="."+d)+"%"))p=m[c];else if(null!=p){if(!(d in p)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&y+1>=r.length){var h=l(p,d);p=(s=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:p[d]}else s=v(p,d),p=p[d];s&&!u&&(m[c]=p)}}return p}},72770:(e,t,r)=>{"use strict";var o="undefined"!=typeof Symbol&&Symbol,n=r(69578);e.exports=function(){return"function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&n()}},69578:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},22786:(e,t,r)=>{"use strict";var o=r(22698);e.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},31741:(e,t,r)=>{var o="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=o&&n&&"function"==typeof n.get?n.get:null,i=o&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=c&&l&&"function"==typeof l.get?l.get:null,u=c&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,y="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,s="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,m=Object.prototype.toString,b=Function.prototype.toString,g=String.prototype.match,h=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,j=RegExp.prototype.test,A=Array.prototype.concat,O=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,F="function"==typeof Symbol&&"object"==typeof Symbol.iterator,M="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,Y=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function I(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||j.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var o=e<0?-_(-e):_(e);if(o!==e){var n=String(o),a=h.call(t,n.length+1);return v.call(n,r,"$&_")+"."+v.call(v.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var R=r(50189),N=R.custom,L=W(N)?N:null;function T(e,t,r){var o="double"===(r.quoteStyle||t)?'"':"'";return o+e+o}function U(e){return v.call(String(e),/"/g,"&quot;")}function B(e){return!("[object Array]"!==H(e)||M&&"object"==typeof e&&M in e)}function C(e){return!("[object RegExp]"!==H(e)||M&&"object"==typeof e&&M in e)}function W(e){if(F)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,n){var c=r||{};if(q(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!q(c,"customInspect")||c.customInspect;if("boolean"!=typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?I(t,w):w}if("bigint"==typeof t){var j=String(t)+"n";return m?I(t,j):j}var _=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=_&&_>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var k,N=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=O.call(Array(e.indent+1)," ")}return{base:r,prev:O.call(Array(t+1),r)}}(c,o);if(void 0===n)n=[];else if(V(n,t)>=0)return"[Circular]";function $(t,r,a){if(r&&(n=P.call(n)).push(r),a){var i={depth:c.depth};return q(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),e(t,i,o+1,n)}return e(t,c,o+1,n)}if("function"==typeof t&&!C(t)){var z=function(e){if(e.name)return e.name;var t=g.call(b.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=X(t,$);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(ee.length>0?" { "+O.call(ee,", ")+" }":"")}if(W(t)){var te=F?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):E.call(t);return"object"!=typeof t||F?te:Q(te)}if((k=t)&&"object"==typeof k&&("undefined"!=typeof HTMLElement&&k instanceof HTMLElement||"string"==typeof k.nodeName&&"function"==typeof k.getAttribute)){for(var re="<"+S.call(String(t.nodeName)),oe=t.attributes||[],ne=0;ne<oe.length;ne++)re+=" "+oe[ne].name+"="+T(U(oe[ne].value),"double",c);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+"</"+S.call(String(t.nodeName))+">"}if(B(t)){if(0===t.length)return"[]";var ae=X(t,$);return N&&!function(e){for(var t=0;t<e.length;t++)if(V(e[t],"\n")>=0)return!1;return!0}(ae)?"["+K(ae,N)+"]":"[ "+O.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==H(e)||M&&"object"==typeof e&&M in e)}(t)){var ie=X(t,$);return"cause"in Error.prototype||!("cause"in t)||D.call(t,"cause")?0===ie.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(ie,", ")+" }":"{ ["+String(t)+"] "+O.call(A.call("[cause]: "+$(t.cause),ie),", ")+" }"}if("object"==typeof t&&l){if(L&&"function"==typeof t[L]&&R)return R(t,{depth:_-o});if("symbol"!==l&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!=typeof e)return!1;try{a.call(e);try{p.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return i.call(t,(function(e,r){ce.push($(r,t,!0)+" => "+$(e,t))})),Z("Map",a.call(t),ce,N)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e);try{a.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return u.call(t,(function(e){le.push($(e,t))})),Z("Set",p.call(t),le,N)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{y.call(e,y)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!y||!e||"object"!=typeof e)return!1;try{y.call(e,y);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!s||!e||"object"!=typeof e)return!1;try{return s.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==H(e)||M&&"object"==typeof e&&M in e)}(t))return Q($(Number(t)));if(function(e){if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}(t))return Q($(x.call(t)));if(function(e){return!("[object Boolean]"!==H(e)||M&&"object"==typeof e&&M in e)}(t))return Q(d.call(t));if(function(e){return!("[object String]"!==H(e)||M&&"object"==typeof e&&M in e)}(t))return Q($(String(t)));if(!function(e){return!("[object Date]"!==H(e)||M&&"object"==typeof e&&M in e)}(t)&&!C(t)){var pe=X(t,$),ue=Y?Y(t)===Object.prototype:t instanceof Object||t.constructor===Object,fe=t instanceof Object?"":"null prototype",ye=!ue&&M&&Object(t)===t&&M in t?h.call(H(t),8,-1):fe?"Object":"",se=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ye||fe?"["+O.call(A.call([],ye||[],fe||[]),": ")+"] ":"");return 0===pe.length?se+"{}":N?se+"{"+K(pe,N)+"}":se+"{ "+O.call(pe,", ")+" }"}return String(t)};var $=Object.prototype.hasOwnProperty||function(e){return e in this};function q(e,t){return $.call(e,t)}function H(e){return m.call(e)}function V(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,o=e.length;r<o;r++)if(e[r]===t)return r;return-1}function G(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return G(h.call(e,0,t.maxStringLength),t)+o}return T(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",t)}function z(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function Q(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function Z(e,t,r,o){return e+" ("+t+") {"+(o?K(r,o):O.call(r,", "))+"}"}function K(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+O.call(e,","+r)+"\n"+t.prev}function X(e,t){var r=B(e),o=[];if(r){o.length=e.length;for(var n=0;n<e.length;n++)o[n]=q(e,n)?t(e[n],e):""}var a,i="function"==typeof k?k(e):[];if(F){a={};for(var c=0;c<i.length;c++)a["$"+i[c]]=i[c]}for(var l in e)q(e,l)&&(r&&String(Number(l))===l&&l<e.length||F&&a["$"+l]instanceof Symbol||(j.call(/[^\w$]/,l)?o.push(t(l,e)+": "+t(e[l],e)):o.push(l+": "+t(e[l],e))));if("function"==typeof k)for(var p=0;p<i.length;p++)D.call(e,i[p])&&o.push("["+t(i[p])+"]: "+t(e[i[p]],e));return o}},38243:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:o}},79119:(e,t,r)=>{"use strict";var o=r(67576),n=r(93649),a=r(38243);e.exports={formats:a,parse:n,stringify:o}},93649:(e,t,r)=>{"use strict";var o=r(7173),n=Object.prototype.hasOwnProperty,a=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:o.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},p=function(e,t,r,o){if(e){var a=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,c=r.depth>0&&/(\[[^[\]]*])/.exec(a),p=c?a.slice(0,c.index):a,u=[];if(p){if(!r.plainObjects&&n.call(Object.prototype,p)&&!r.allowPrototypes)return;u.push(p)}for(var f=0;r.depth>0&&null!==(c=i.exec(a))&&f<r.depth;){if(f+=1,!r.plainObjects&&n.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+a.slice(c.index)+"]"),function(e,t,r,o){for(var n=o?t:l(t,r),a=e.length-1;a>=0;--a){var i,c=e[a];if("[]"===c&&r.parseArrays)i=[].concat(n);else{i=r.plainObjects?Object.create(null):{};var p="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=parseInt(p,10);r.parseArrays||""!==p?!isNaN(u)&&c!==p&&String(u)===p&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(i=[])[u]=n:"__proto__"!==p&&(i[p]=n):i={0:n}}n=i}return n}(u,t,r,o)}};e.exports=function(e,t){var r=function(e){if(!e)return i;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?i.charset:e.charset;return{allowDots:void 0===e.allowDots?i.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:i.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:i.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:i.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:i.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:i.comma,decoder:"function"==typeof e.decoder?e.decoder:i.decoder,delimiter:"string"==typeof e.delimiter||o.isRegExp(e.delimiter)?e.delimiter:i.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:i.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:i.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:i.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:i.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,p={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,y=u.split(t.delimiter,f),s=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r<y.length;++r)0===y[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===y[r]?d="utf-8":"utf8=%26%2310003%3B"===y[r]&&(d="iso-8859-1"),s=r,r=y.length);for(r=0;r<y.length;++r)if(r!==s){var m,b,g=y[r],h=g.indexOf("]="),v=-1===h?g.indexOf("="):h+1;-1===v?(m=t.decoder(g,i.decoder,d,"key"),b=t.strictNullHandling?null:""):(m=t.decoder(g.slice(0,v),i.decoder,d,"key"),b=o.maybeMap(l(g.slice(v+1),t),(function(e){return t.decoder(e,i.decoder,d,"value")}))),b&&t.interpretNumericEntities&&"iso-8859-1"===d&&(b=c(b)),g.indexOf("[]=")>-1&&(b=a(b)?[b]:b),n.call(p,m)?p[m]=o.combine(p[m],b):p[m]=b}return p}(e,r):e,f=r.plainObjects?Object.create(null):{},y=Object.keys(u),s=0;s<y.length;++s){var d=y[s],m=p(d,u[d],r,"string"==typeof e);f=o.merge(f,m,r)}return!0===r.allowSparse?f:o.compact(f)}},67576:(e,t,r)=>{"use strict";var o=r(44852),n=r(7173),a=r(38243),i=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,p=String.prototype.split,u=Array.prototype.push,f=function(e,t){u.apply(e,l(t)?t:[t])},y=Date.prototype.toISOString,s=a.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:s,formatter:a.formatters[s],indices:!1,serializeDate:function(e){return y.call(e)},skipNulls:!1,strictNullHandling:!1},m={},b=function e(t,r,a,i,c,u,y,s,b,g,h,v,w,S,j){for(var A,O=t,P=j,_=0,x=!1;void 0!==(P=P.get(m))&&!x;){var k=P.get(t);if(_+=1,void 0!==k){if(k===_)throw new RangeError("Cyclic object value");x=!0}void 0===P.get(m)&&(_=0)}if("function"==typeof y?O=y(r,O):O instanceof Date?O=g(O):"comma"===a&&l(O)&&(O=n.maybeMap(O,(function(e){return e instanceof Date?g(e):e}))),null===O){if(i)return u&&!w?u(r,d.encoder,S,"key",h):r;O=""}if("string"==typeof(A=O)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||n.isBuffer(O)){if(u){var E=w?r:u(r,d.encoder,S,"key",h);if("comma"===a&&w){for(var F=p.call(String(O),","),M="",D=0;D<F.length;++D)M+=(0===D?"":",")+v(u(F[D],d.encoder,S,"value",h));return[v(E)+"="+M]}return[v(E)+"="+v(u(O,d.encoder,S,"value",h))]}return[v(r)+"="+v(String(O))]}var Y,I=[];if(void 0===O)return I;if("comma"===a&&l(O))Y=[{value:O.length>0?O.join(",")||null:void 0}];else if(l(y))Y=y;else{var R=Object.keys(O);Y=s?R.sort(s):R}for(var N=0;N<Y.length;++N){var L=Y[N],T="object"==typeof L&&void 0!==L.value?L.value:O[L];if(!c||null!==T){var U=l(O)?"function"==typeof a?a(r,L):r:r+(b?"."+L:"["+L+"]");j.set(t,_);var B=o();B.set(m,j),f(I,e(T,U,a,i,c,u,y,s,b,g,h,v,w,S,B))}}return I};e.exports=function(e,t){var r,n=e,p=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=a.default;if(void 0!==e.format){if(!i.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var o=a.formatters[r],n=d.filter;return("function"==typeof e.filter||l(e.filter))&&(n=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:n,format:r,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof p.filter?n=(0,p.filter)("",n):l(p.filter)&&(r=p.filter);var u,y=[];if("object"!=typeof n||null===n)return"";u=t&&t.arrayFormat in c?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=c[u];r||(r=Object.keys(n)),p.sort&&r.sort(p.sort);for(var m=o(),g=0;g<r.length;++g){var h=r[g];p.skipNulls&&null===n[h]||f(y,b(n[h],h,s,p.strictNullHandling,p.skipNulls,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,m))}var v=y.join(p.delimiter),w=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),v.length>0?w+v:""}},7173:(e,t,r)=>{"use strict";var o=r(38243),n=Object.prototype.hasOwnProperty,a=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)void 0!==e[o]&&(r[o]=e[o]);return r};e.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],o=0;o<t.length;++o)for(var n=t[o],i=n.obj[n.prop],c=Object.keys(i),l=0;l<c.length;++l){var p=c[l],u=i[p];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:i,prop:p}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);t.obj[t.prop]=o}}}(t),e},decode:function(e,t,r){var o=e.replace(/\+/g," ");if("iso-8859-1"===r)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(e){return o}},encode:function(e,t,r,n,a){if(0===e.length)return e;var c=e;if("symbol"==typeof e?c=Symbol.prototype.toString.call(e):"string"!=typeof e&&(c=String(e)),"iso-8859-1"===r)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",p=0;p<c.length;++p){var u=c.charCodeAt(p);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===o.RFC1738&&(40===u||41===u)?l+=c.charAt(p):u<128?l+=i[u]:u<2048?l+=i[192|u>>6]+i[128|63&u]:u<55296||u>=57344?l+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u]:(p+=1,u=65536+((1023&u)<<10|1023&c.charCodeAt(p)),l+=i[240|u>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],o=0;o<e.length;o+=1)r.push(t(e[o]));return r}return t(e)},merge:function e(t,r,o){if(!r)return t;if("object"!=typeof r){if(a(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var i=t;return a(t)&&!a(r)&&(i=c(t,o)),a(t)&&a(r)?(r.forEach((function(r,a){if(n.call(t,a)){var i=t[a];i&&"object"==typeof i&&r&&"object"==typeof r?t[a]=e(i,r,o):t.push(r)}else t[a]=r})),t):Object.keys(r).reduce((function(t,a){var i=r[a];return n.call(t,a)?t[a]=e(t[a],i,o):t[a]=i,t}),i)}}},44852:(e,t,r)=>{"use strict";var o=r(28487),n=r(2864),a=r(31741),i=o("%TypeError%"),c=o("%WeakMap%",!0),l=o("%Map%",!0),p=n("WeakMap.prototype.get",!0),u=n("WeakMap.prototype.set",!0),f=n("WeakMap.prototype.has",!0),y=n("Map.prototype.get",!0),s=n("Map.prototype.set",!0),d=n("Map.prototype.has",!0),m=function(e,t){for(var r,o=e;null!==(r=o.next);o=r)if(r.key===t)return o.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,o={assert:function(e){if(!o.has(e))throw new i("Side channel does not contain "+a(e))},get:function(o){if(c&&o&&("object"==typeof o||"function"==typeof o)){if(e)return p(e,o)}else if(l){if(t)return y(t,o)}else if(r)return function(e,t){var r=m(e,t);return r&&r.value}(r,o)},has:function(o){if(c&&o&&("object"==typeof o||"function"==typeof o)){if(e)return f(e,o)}else if(l){if(t)return d(t,o)}else if(r)return function(e,t){return!!m(e,t)}(r,o);return!1},set:function(o,n){c&&o&&("object"==typeof o||"function"==typeof o)?(e||(e=new c),u(e,o,n)):l?(t||(t=new l),s(t,o,n)):(r||(r={key:{},next:null}),function(e,t,r){var o=m(e,t);o?o.value=r:e.next={key:t,next:e.next,value:r}}(r,o,n))}};return o}},50189:()=>{}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{appendTimestamp:()=>y,dateValidationMessages:()=>R,dayTicksThreshold:()=>k,defaultDateTimeFormat:()=>l,defaultTableDateFormat:()=>F,getAllowedIntervalsForQuery:()=>P,getChartTypeForQuery:()=>x,getCurrentDates:()=>j,getCurrentPeriod:()=>g,getDateDifferenceInDays:()=>A,getDateFormatsForInterval:()=>Y,getDateFormatsForIntervalD3:()=>M,getDateFormatsForIntervalPhp:()=>D,getDateParamsFromQuery:()=>w,getIntervalForQuery:()=>_,getLastPeriod:()=>b,getPreviousDate:()=>O,getRangeLabel:()=>d,getStoreTimeZoneMoment:()=>m,isoDateFormat:()=>c,loadLocaleData:()=>I,periods:()=>u,presetValues:()=>p,toMoment:()=>s,validateDateInputForRange:()=>N,weekTicksThreshold:()=>E});const e=window.moment;var t=r.n(e);const n=window.lodash,a=window.wp.i18n;var i=r(79119);const c="YYYY-MM-DD",l="YYYY-MM-DDTHH:mm:ss",p=[{value:"today",label:(0,a.__)("Today","woocommerce")},{value:"yesterday",label:(0,a.__)("Yesterday","woocommerce")},{value:"week",label:(0,a.__)("Week to date","woocommerce")},{value:"last_week",label:(0,a.__)("Last week","woocommerce")},{value:"month",label:(0,a.__)("Month to date","woocommerce")},{value:"last_month",label:(0,a.__)("Last month","woocommerce")},{value:"quarter",label:(0,a.__)("Quarter to date","woocommerce")},{value:"last_quarter",label:(0,a.__)("Last quarter","woocommerce")},{value:"year",label:(0,a.__)("Year to date","woocommerce")},{value:"last_year",label:(0,a.__)("Last year","woocommerce")},{value:"custom",label:(0,a.__)("Custom","woocommerce")}],u=[{value:"previous_period",label:(0,a.__)("Previous period","woocommerce")},{value:"previous_year",label:(0,a.__)("Previous year","woocommerce")}],f=e=>t()(e).isValid(),y=(e,t)=>{if("start"===t)return e.startOf("day").format(l);if("now"===t)return e.format(l);if("end"===t)return e.endOf("day").format(l);throw new Error("appendTimestamp requires second parameter to be either `start`, `now` or `end`")};function s(e,r){if(t().isMoment(r))return r.isValid()?r:null;if("string"==typeof r){const o=t()(r,[c,e],!0);return o.isValid()?o:null}throw new Error("toMoment requires a string to be passed as an argument")}function d(e,t){const r=e.year()===t.year(),o=r&&e.month()===t.month(),n=r&&o&&e.isSame(t,"day"),i=(0,a.__)("MMM D, YYYY","woocommerce");if(n)return e.format(i);if(o){const r=e.date();return e.format(i).replace(String(r),`${r} - ${t.date()}`)}if(r){const r=(0,a.__)("MMM D","woocommerce");return`${e.format(r)} - ${t.format(i)}`}return`${e.format(i)} - ${t.format(i)}`}function m(){return window.wcSettings&&window.wcSettings.timeZone?["+","-"].includes(window.wcSettings.timeZone.charAt(0))?t()().utcOffset(window.wcSettings.timeZone):t()().tz(window.wcSettings.timeZone):t()()}function b(e,r){const o=m().startOf(e).subtract(1,e),n=o.clone().endOf(e);let a,i;if("previous_period"===r)if("year"===e)a=t()().startOf(e).subtract(2,e),i=a.clone().endOf(e);else{const e=n.diff(o,"days");i=o.clone().subtract(1,"days"),a=i.clone().subtract(e,"days")}else"week"===e?(a=o.clone().subtract(1,"years"),i=n.clone().subtract(1,"years")):(a=o.clone().subtract(1,"years"),i=a.clone().endOf(e));return"month"===e&&(i=i.clone().endOf("month")),{primaryStart:o,primaryEnd:n,secondaryStart:a,secondaryEnd:i}}function g(e,t){const r=m().startOf(e),o=m(),n=o.diff(r,"days");let a,i;return"previous_period"===t?(a=r.clone().subtract(1,e),i=o.clone().subtract(1,e)):(a=r.clone().subtract(1,"years"),i=a.clone().add(n+1,"days").subtract(1,"seconds")),{primaryStart:r,primaryEnd:o,secondaryStart:a,secondaryEnd:i}}const h=(0,n.memoize)(((e,t,r,o)=>{switch(e){case"today":return g("day",t);case"yesterday":return b("day",t);case"week":return g("week",t);case"last_week":return b("week",t);case"month":return g("month",t);case"last_month":return b("month",t);case"quarter":return g("quarter",t);case"last_quarter":return b("quarter",t);case"year":return g("year",t);case"last_year":return b("year",t);case"custom":if(!r||!o)throw Error("Custom date range requires both after and before dates.");const e=o.diff(r,"days");if("previous_period"===t){const t=r.clone().subtract(1,"days");return{primaryStart:r,primaryEnd:o,secondaryStart:t.clone().subtract(e,"days"),secondaryEnd:t}}return{primaryStart:r,primaryEnd:o,secondaryStart:r.clone().subtract(1,"years"),secondaryEnd:o.clone().subtract(1,"years")}}}),((e,t,r,o)=>[e,t,r&&r.format(),o&&o.format()].join(":"))),v=(0,n.memoize)(((e,r,o,n,a)=>{if(e&&r)return{period:e,compare:r,after:o?t()(o):null,before:n?t()(n):null};const c=(0,i.parse)(a.replace(/&amp;/g,"&"));return"string"!=typeof c.period&&(console.warn(`Unexpected default period type ${c.period}`),c.period=""),"string"!=typeof c.compare&&(console.warn(`Unexpected default compare type ${c.compare}`),c.compare=""),{period:c.period,compare:c.compare,after:c.after&&f(c.after)?t()(c.after):null,before:c.before&&f(c.before)?t()(c.before):null}}),((e,t,r,o,n)=>[e,t,r,o,n].join(":"))),w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"period=month&compare=previous_year";const{period:r,compare:o,after:n,before:a}=e;return v(r,o,n,a,t)},S=(0,n.memoize)(((e,t,r,o,a,i)=>{const c=(0,n.find)(p,(t=>t.value===e));if(!c)throw new Error(`Cannot find period: ${e}`);const l=(0,n.find)(u,(e=>e.value===t));if(!l)throw new Error(`Cannot find compare: ${t}`);return{primary:{label:c.label,range:d(r,o),after:r,before:o},secondary:{label:l.label,range:d(a,i),after:a,before:i}}}),((e,t,r,o,n,a)=>[e,t,r&&r.format(),o&&o.format(),n&&n.format(),a&&a.format()].join(":"))),j=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"period=month&compare=previous_year";const{period:r,compare:o,after:n,before:a}=w(e,t),i=h(r,o,n,a);if(!i)throw Error("Invalid date range");const{primaryStart:c,primaryEnd:l,secondaryStart:p,secondaryEnd:u}=i;return S(r,o,c,l,p,u)},A=(e,r)=>{const o=t()(e),n=t()(r);return o.diff(n,"days")},O=(e,r,o,n,a)=>{const i=t()(e);if("previous_year"===n)return i.clone().subtract(1,"years");const c=t()(r),l=t()(o),p=c.diff(l,a);return i.clone().subtract(p,a)};function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"period=&compare=previous_year";const{period:r}=w(e,t);let o=[];if("custom"===r){const{primary:t}=j(e),r=A(t.before,t.after);o=r>=365?["day","week","month","quarter","year"]:r>=90?["day","week","month","quarter"]:r>=28?["day","week","month"]:r>=7?["day","week"]:r>1&&r<7?["day"]:["hour","day"]}else switch(r){case"today":case"yesterday":o=["hour","day"];break;case"week":case"last_week":default:o=["day"];break;case"month":case"last_month":o=["day","week"];break;case"quarter":case"last_quarter":o=["day","week","month"];break;case"year":case"last_year":o=["day","week","month","quarter"]}return o}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"period=&compare=previous_year";const r=P(e,t),o=r[0];let n=e.interval||o;return e.interval&&!r.includes(e.interval)&&(n=o),n}function x(e){let{chartType:t}=e;return void 0!==t&&["line","bar"].includes(t)?t:"line"}const k=63,E=9,F="m/d/Y";function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="%B %-d, %Y",o="%B %-d, %Y",n="%Y-%m-%d",i="%b %Y",c=F;switch(e){case"hour":r="%_I%p %B %-d, %Y",o="%_I%p %b %-d, %Y",n="%_I%p",i="%b %-d, %Y",c="h A";break;case"day":t<k?n="%-d":(n="%b",i="%Y");break;case"week":t<E?(n="%-d",i="%b %Y"):(n="%b",i="%Y"),r=(0,a.__)("Week of %B %-d, %Y","woocommerce"),o=(0,a.__)("Week of %B %-d, %Y","woocommerce");break;case"quarter":case"month":r="%B %Y",o="%B %Y",n="%b",i="%Y";break;case"year":r="%Y",o="%Y",n="%Y"}return{screenReaderFormat:r,tooltipLabelFormat:o,xFormat:n,x2Format:i,tableFormat:c}}function D(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="F j, Y",o="F j, Y",n="Y-m-d",i="M Y",c=F;switch(e){case"hour":r="gA F j, Y",o="gA M j, Y",n="gA",i="M j, Y",c="h A";break;case"day":t<k?n="j":(n="M",i="Y");break;case"week":t<E?(n="j",i="M Y"):(n="M",i="Y");const e=(0,a.__)("Week of","woocommerce").replace(/(\w)/g,"\\$1");r=`${e} F j, Y`,o=`${e} F j, Y`;break;case"quarter":case"month":r="F Y",o="F Y",n="M",i="Y";break;case"year":r="Y",o="Y",n="Y"}return{screenReaderFormat:r,tooltipLabelFormat:o,xFormat:n,x2Format:i,tableFormat:c}}function Y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{type:"d3"};return"php"===r.type?D(e,t):M(e,t)}function I(e){let{userLocale:r,weekdaysShort:o}=e;"en"!==t().locale()&&t().updateLocale(r,{longDateFormat:{L:(0,a.__)("MM/DD/YYYY","woocommerce"),LL:(0,a.__)("MMMM D, YYYY","woocommerce"),LLL:(0,a.__)("D MMMM YYYY LT","woocommerce"),LLLL:(0,a.__)("dddd, D MMMM YYYY LT","woocommerce"),LT:(0,a.__)("HH:mm","woocommerce"),LTS:"h:mm:ss A"},weekdaysMin:o})}const R={invalid:(0,a.__)("Invalid date","woocommerce"),future:(0,a.__)("Select a date in the past","woocommerce"),startAfterEnd:(0,a.__)("Start date must be before end date","woocommerce"),endBeforeStart:(0,a.__)("Start date must be before end date","woocommerce")};function N(e,r,o,n,a){const i=s(a,r);return i?t()().isBefore(i,"day")?{date:null,error:R.future}:"after"===e&&o&&i.isAfter(o,"day")?{date:null,error:R.startAfterEnd}:"before"===e&&n&&i.isBefore(n,"day")?{date:null,error:R.endBeforeStart}:{date:i}:{date:null,error:R.invalid}}})(),(window.wc=window.wc||{}).date=o})();