(()=>{var e={181:(e,t,n)=>{var r=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,u=c||l||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,m=function(){return u.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=i.test(e);return n||o.test(e)?a(e.slice(2),n?2:8):s.test(e)?NaN:+e}e.exports=function(e,t,n){var r,s,i,o,a,c,l=0,u=!1,d=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var n=r,i=s;return r=s=void 0,l=t,o=e.apply(i,n)}function b(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-l>=i}function S(){var e=m();if(b(e))return v(e);a=setTimeout(S,function(e){var n=t-(e-c);return d?f(n,i-(e-l)):n}(e))}function v(e){return a=void 0,g&&r?w(e):(r=s=void 0,o)}function k(){var e=m(),n=b(e);if(r=arguments,s=this,c=e,n){if(void 0===a)return function(e){return l=e,a=setTimeout(S,t),u?w(e):o}(c);if(d)return a=setTimeout(S,t),w(c)}return void 0===a&&(a=setTimeout(S,t)),o}return t=y(t)||0,p(n)&&(u=!!n.leading,i=(d="maxWait"in n)?h(y(n.maxWait)||0,t):i,g="trailing"in n?!!n.trailing:g),k.cancel=function(){void 0!==a&&clearTimeout(a),l=0,r=c=s=a=void 0},k.flush=function(){return void 0===a?o:v(m())},k}},351:()=>{"use strict";void 0===Array.prototype.at&&(Array.prototype.at=function(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]})}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>ke,hasStandardBrowserEnv:()=>Te,hasStandardBrowserWebWorkerEnv:()=>Oe,navigator:()=>Ee,origin:()=>Ne}),window.cachingDisabled=void 0===window.cachingDisabled||window.cachingDisabled;const t=e=>{throw new Error(e)};let r={};const s=(e,t,n)=>{const s={...r,[e]:{...r[e],[t]:Array.from(new Set(n))}};return r=s,localStorage.setItem("nodePositions",JSON.stringify(s)),labeler.nodePositions=s,s},i=localStorage.getItem("nodePositions");i&&(r=JSON.parse(i)),labeler.setNodePositions=s;const o=new Map,a=(e,t="",n=0)=>{if(!e)return t.toLowerCase().trim();if(o.has(e))return o.get(e);let r=e.tagName;const s=e.parentElement?Array.from(e.parentElement.children).filter(e=>!e.className.includes("aco-label")&&!e.className.includes("aco-box")&&!e.className.includes("aco-badge")):[];if(0==n&&s.length){r=`${r}:nth-child(${s.indexOf(e)+1})`}if(e.className.includes("aco-title")||e.className.includes("aco-price"))return a(e.parentElement,r,n+1);if(e.className){const t=Array.from(e.classList).filter(e=>!e.includes("aco-image")).toString().replace(/,/g,".");t.length&&(r+=`.${t}`)}return t&&(r=`${r} ${t}`),n>1?(o.set(e,r.toLowerCase().trim()),r.toLowerCase().trim()):a(e.parentElement,r,n+1)},c=()=>(window.CacheHandler.postMessage({type:"CLEAR_CACHES"}),localStorage.removeItem("nodePositions"),r={},"Labeler cache cleared ✅"),l=new Map,u=(e,t="a",n=0)=>{if(l.has(t)){const n=l.get(t);if(n===e)return n}if(n>=20||!e)return null;const r=e.querySelector(t);return r?(l.set(t,r),r):e.parentElement?u(e.parentElement,t,n+1):null},d=async(e,t)=>{if(window.cdnCachingDisabled)return fetch(e,t);const n=await caches.open("labeler-cache"),r=await n.match(e);if(r)return r;{const r=await fetch(e,t);return n.put(e,r.clone()),r}},h=e=>{const t=localStorage.getItem("CachingfailedCount")||0;e&&t>=3?window.cachingDisabled=!0:e||localStorage.setItem("CachingfailedCount",(parseInt(t)+1).toString())};function f(e,t){return function(){return e.apply(t,arguments)}}labeler.findNearestElementWithSelector=u;const{toString:m}=Object.prototype,{getPrototypeOf:p}=Object,{iterator:y,toStringTag:g}=Symbol,w=(b=Object.create(null),e=>{const t=m.call(e);return b[t]||(b[t]=t.slice(8,-1).toLowerCase())});var b;const S=e=>(e=e.toLowerCase(),t=>w(t)===e),v=e=>t=>typeof t===e,{isArray:k}=Array,E=v("undefined");function T(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const O=S("ArrayBuffer");const N=v("string"),C=v("function"),A=v("number"),I=e=>null!==e&&"object"==typeof e,P=e=>{if("object"!==w(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||g in e||y in e)},D=S("Date"),x=S("File"),R=S("Blob"),L=S("FileList"),F=S("URLSearchParams"),[$,M,_,V]=["ReadableStream","Request","Response","Headers"].map(S);function j(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),k(e))for(r=0,s=e.length;r0;)if(r=n[s],t===r.toLowerCase())return r;return null}const U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,W=e=>!E(e)&&e!==U;const B=(z="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>z&&e instanceof z);var z;const Z=S("HTMLFormElement"),H=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),J=S("RegExp"),G=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};j(n,(n,s)=>{let i;!1!==(i=t(n,s,e))&&(r[s]=i||n)}),Object.defineProperties(e,r)};const Y=S("AsyncFunction"),K=(X="function"==typeof setImmediate,Q=C(U.postMessage),X?setImmediate:Q?(ee=`axios@${Math.random()}`,te=[],U.addEventListener("message",({source:e,data:t})=>{e===U&&t===ee&&te.length&&te.shift()()},!1),e=>{te.push(e),U.postMessage(ee,"*")}):e=>setTimeout(e));var X,Q,ee,te;const ne="undefined"!=typeof queueMicrotask?queueMicrotask.bind(U):"undefined"!=typeof process&&process.nextTick||K,re={isArray:k,isArrayBuffer:O,isBuffer:T,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||C(e.append)&&("formdata"===(t=w(e))||"object"===t&&C(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&O(e.buffer),t},isString:N,isNumber:A,isBoolean:e=>!0===e||!1===e,isObject:I,isPlainObject:P,isEmptyObject:e=>{if(!I(e)||T(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:$,isRequest:M,isResponse:_,isHeaders:V,isUndefined:E,isDate:D,isFile:x,isBlob:R,isRegExp:J,isFunction:C,isStream:e=>I(e)&&C(e.pipe),isURLSearchParams:F,isTypedArray:B,isFileList:L,forEach:j,merge:function e(){const{caseless:t}=W(this)&&this||{},n={},r=(r,s)=>{const i=t&&q(n,s)||s;P(n[i])&&P(r)?n[i]=e(n[i],r):P(r)?n[i]=e({},r):k(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e(j(t,(t,r)=>{n&&C(t)?e[r]=f(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],r&&!r(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:w,kindOfTest:S,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(k(e))return e;let t=e.length;if(!A(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[y]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Z,hasOwnProperty:H,hasOwnProp:H,reduceDescriptors:G,freezeMethods:e=>{G(e,(t,n)=>{if(C(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];C(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return k(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:q,global:U,isContextDefined:W,isSpecCompliantForm:function(e){return!!(e&&C(e.append)&&"FormData"===e[g]&&e[y])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(I(e)){if(t.indexOf(e)>=0)return;if(T(e))return e;if(!("toJSON"in e)){t[r]=e;const s=k(e)?[]:{};return j(e,(e,t)=>{const i=n(e,r+1);!E(i)&&(s[t]=i)}),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:Y,isThenable:e=>e&&(I(e)||C(e))&&C(e.then)&&C(e.catch),setImmediate:K,asap:ne,isIterable:e=>null!=e&&C(e[y])};function se(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}re.inherits(se,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.status}}});const ie=se.prototype,oe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{oe[e]={value:e}}),Object.defineProperties(se,oe),Object.defineProperty(ie,"isAxiosError",{value:!0}),se.from=(e,t,n,r,s,i)=>{const o=Object.create(ie);return re.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),se.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const ae=se;function ce(e){return re.isPlainObject(e)||re.isArray(e)}function le(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function ue(e,t,n){return e?e.concat(t).map(function(e,t){return e=le(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const de=re.toFlatObject(re,{},null,function(e){return/^is[A-Z]/.test(e)});const he=function(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!re.isUndefined(t[e])})).metaTokens,s=n.visitor||l,i=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&re.isSpecCompliantForm(t);if(!re.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(re.isDate(e))return e.toISOString();if(re.isBoolean(e))return e.toString();if(!a&&re.isBlob(e))throw new ae("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(e)||re.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,s){let a=e;if(e&&!s&&"object"==typeof e)if(re.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(re.isArray(e)&&function(e){return re.isArray(e)&&!e.some(ce)}(e)||(re.isFileList(e)||re.endsWith(n,"[]"))&&(a=re.toArray(e)))return n=le(n),a.forEach(function(e,r){!re.isUndefined(e)&&null!==e&&t.append(!0===o?ue([n],r,i):null===o?n:n+"[]",c(e))}),!1;return!!ce(e)||(t.append(ue(s,n,i),c(e)),!1)}const u=[],d=Object.assign(de,{defaultVisitor:l,convertValue:c,isVisitable:ce});if(!re.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!re.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),re.forEach(n,function(n,i){!0===(!(re.isUndefined(n)||null===n)&&s.call(t,n,re.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t};function fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function me(e,t){this._pairs=[],e&&he(e,this,t)}const pe=me.prototype;pe.append=function(e,t){this._pairs.push([e,t])},pe.toString=function(e){const t=e?function(t){return e.call(this,t,fe)}:fe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const ye=me;function ge(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function we(e,t,n){if(!t)return e;const r=n&&n.encode||ge;re.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(i=s?s(t,n):re.isURLSearchParams(t)?t.toString():new ye(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const be=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){re.forEach(this.handlers,function(t){null!==t&&e(t)})}},Se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ve={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ye,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ke="undefined"!=typeof window&&"undefined"!=typeof document,Ee="object"==typeof navigator&&navigator||void 0,Te=ke&&(!Ee||["ReactNative","NativeScript","NS"].indexOf(Ee.product)<0),Oe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ne=ke&&window.location.href||"http://localhost",Ce={...e,...ve};const Ae=function(e){function t(e,n,r,s){let i=e[s++];if("__proto__"===i)return!0;const o=Number.isFinite(+i),a=s>=e.length;if(i=!i&&re.isArray(r)?r.length:i,a)return re.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!o;r[i]&&re.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],s)&&re.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r{t(function(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null};const Ie={transitional:Se,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=re.isObject(e);s&&re.isHTMLForm(e)&&(e=new FormData(e));if(re.isFormData(e))return r?JSON.stringify(Ae(e)):e;if(re.isArrayBuffer(e)||re.isBuffer(e)||re.isStream(e)||re.isFile(e)||re.isBlob(e)||re.isReadableStream(e))return e;if(re.isArrayBufferView(e))return e.buffer;if(re.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return he(e,new Ce.classes.URLSearchParams,{visitor:function(e,t,n,r){return Ce.isNode&&re.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=re.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return he(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e,t,n){if(re.isString(e))try{return(t||JSON.parse)(e),re.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ie.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(re.isResponse(e)||re.isReadableStream(e))return e;if(e&&re.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw ae.from(e,ae.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ce.classes.FormData,Blob:Ce.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],e=>{Ie.headers[e]={}});const Pe=Ie,De=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xe=Symbol("internals");function Re(e){return e&&String(e).trim().toLowerCase()}function Le(e){return!1===e||null==e?e:re.isArray(e)?e.map(Le):String(e)}function Fe(e,t,n,r,s){return re.isFunction(r)?r.call(this,t,n):(s&&(t=n),re.isString(t)?re.isString(r)?-1!==t.indexOf(r):re.isRegExp(r)?r.test(t):void 0:void 0)}class $e{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=Re(t);if(!s)throw new Error("header name must be a non-empty string");const i=re.findKey(r,s);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Le(e))}const i=(e,t)=>re.forEach(e,(e,n)=>s(e,n,t));if(re.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(re.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&De[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(re.isObject(e)&&re.isIterable(e)){let n,r,s={};for(const t of e){if(!re.isArray(t))throw TypeError("Object iterator must return a key-value pair");s[r=t[0]]=(n=s[r])?re.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=Re(e)){const n=re.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(re.isFunction(t))return t.call(this,e,n);if(re.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Re(e)){const n=re.findKey(this,e);return!(!n||void 0===this[n]||t&&!Fe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=Re(e)){const s=re.findKey(n,e);!s||t&&!Fe(0,n[s],s,t)||(delete n[s],r=!0)}}return re.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!Fe(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return re.forEach(this,(r,s)=>{const i=re.findKey(n,s);if(i)return t[i]=Le(r),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(s):String(s).trim();o!==s&&delete t[s],t[o]=Le(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return re.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&re.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[xe]=this[xe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Re(e);t[r]||(!function(e,t){const n=re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})})}(n,e),t[r]=!0)}return re.isArray(e)?e.forEach(r):r(e),this}}$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors($e.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),re.freezeMethods($e);const Me=$e;function _e(e,t){const n=this||Pe,r=t||n,s=Me.from(r.headers);let i=r.data;return re.forEach(e,function(e){i=e.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Ve(e){return!(!e||!e.__CANCEL__)}function je(e,t,n){ae.call(this,null==e?"canceled":e,ae.ERR_CANCELED,t,n),this.name="CanceledError"}re.inherits(je,ae,{__CANCEL__:!0});const qe=je;function Ue(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ae("Request failed with status code "+n.status,[ae.ERR_BAD_REQUEST,ae.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const We=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,i=0,o=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[o];s||(s=c),n[i]=a,r[i]=c;let u=o,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s{s=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-s;a>=i?o(e,t):(n=e,r||(r=setTimeout(()=>{r=null,o(n)},i-a)))},()=>n&&o(n)]},ze=(e,t,n=3)=>{let r=0;const s=We(50,250);return Be(n=>{const i=n.loaded,o=n.lengthComputable?n.total:void 0,a=i-r,c=s(a);r=i;e({loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&i<=o?(o-i)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},Ze=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},He=e=>(...t)=>re.asap(()=>e(...t)),Je=Ce.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ce.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ce.origin),Ce.navigator&&/(msie|trident)/i.test(Ce.navigator.userAgent)):()=>!0,Ge=Ce.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];re.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),re.isString(r)&&o.push("path="+r),re.isString(s)&&o.push("domain="+s),!0===i&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ye(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ke=e=>e instanceof Me?{...e}:e;function Xe(e,t){t=t||{};const n={};function r(e,t,n,r){return re.isPlainObject(e)&&re.isPlainObject(t)?re.merge.call({caseless:r},e,t):re.isPlainObject(t)?re.merge({},t):re.isArray(t)?t.slice():t}function s(e,t,n,s){return re.isUndefined(t)?re.isUndefined(e)?void 0:r(void 0,e,0,s):r(e,t,0,s)}function i(e,t){if(!re.isUndefined(t))return r(void 0,t)}function o(e,t){return re.isUndefined(t)?re.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,s,i){return i in t?r(n,s):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,n)=>s(Ke(e),Ke(t),0,!0)};return re.forEach(Object.keys({...e,...t}),function(r){const i=c[r]||s,o=i(e[r],t[r],r);re.isUndefined(o)&&i!==a||(n[r]=o)}),n}const Qe=e=>{const t=Xe({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:c}=t;if(t.headers=a=Me.from(a),t.url=we(Ye(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),re.isFormData(r))if(Ce.hasStandardBrowserEnv||Ce.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Ce.hasStandardBrowserEnv&&(s&&re.isFunction(s)&&(s=s(t)),s||!1!==s&&Je(t.url))){const e=i&&o&&Ge.read(o);e&&a.set(i,e)}return t},et="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Qe(e);let s=r.data;const i=Me.from(r.headers).normalize();let o,a,c,l,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=r;function m(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let p=new XMLHttpRequest;function y(){if(!p)return;const r=Me.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());Ue(function(e){t(e),m()},function(e){n(e),m()},{data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p}),p=null}p.open(r.method.toUpperCase(),r.url,!0),p.timeout=r.timeout,"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(y)},p.onabort=function(){p&&(n(new ae("Request aborted",ae.ECONNABORTED,e,p)),p=null)},p.onerror=function(){n(new ae("Network Error",ae.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||Se;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ae(t,s.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,e,p)),p=null},void 0===s&&i.setContentType(null),"setRequestHeader"in p&&re.forEach(i.toJSON(),function(e,t){p.setRequestHeader(t,e)}),re.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),d&&"json"!==d&&(p.responseType=r.responseType),f&&([c,u]=ze(f,!0),p.addEventListener("progress",c)),h&&p.upload&&([a,l]=ze(h),p.upload.addEventListener("progress",a),p.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{p&&(n(!t||t.type?new qe(null,e,p):t),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);g&&-1===Ce.protocols.indexOf(g)?n(new ae("Unsupported protocol "+g+":",ae.ERR_BAD_REQUEST,e)):p.send(s||null)})},tt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ae?t:new qe(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,s(new ae(`timeout ${t} of ms exceeded`,ae.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const{signal:a}=r;return a.unsubscribe=()=>re.asap(o),a}},nt=function*(e,t){let n=e.byteLength;if(!t||n{const s=async function*(e,t){for await(const n of rt(e))yield*nt(n,t)}(e,t);let i,o=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await s.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=o+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),s.return())},{highWaterMark:2})},it="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ot=it&&"function"==typeof ReadableStream,at=it&&("function"==typeof TextEncoder?(ct=new TextEncoder,e=>ct.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var ct;const lt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ut=ot&<(()=>{let e=!1;const t=new Request(Ce.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),dt=ot&<(()=>re.isReadableStream(new Response("").body)),ht={stream:dt&&(e=>e.body)};var ft;it&&(ft=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ht[e]&&(ht[e]=re.isFunction(ft[e])?t=>t[e]():(t,n)=>{throw new ae(`Response type '${e}' is not supported`,ae.ERR_NOT_SUPPORT,n)})}));const mt=async(e,t)=>{const n=re.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(re.isBlob(e))return e.size;if(re.isSpecCompliantForm(e)){const t=new Request(Ce.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return re.isArrayBufferView(e)||re.isArrayBuffer(e)?e.byteLength:(re.isURLSearchParams(e)&&(e+=""),re.isString(e)?(await at(e)).byteLength:void 0)})(t):n},pt={http:null,xhr:et,fetch:it&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:h}=Qe(e);l=l?(l+"").toLowerCase():"text";let f,m=tt([s,i&&i.toAbortSignal()],o);const p=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(c&&ut&&"get"!==n&&"head"!==n&&0!==(y=await mt(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(re.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Ze(y,ze(He(c)));r=st(n.body,65536,e,t)}}re.isString(d)||(d=d?"include":"omit");const s="credentials"in Request.prototype;f=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:s?d:void 0});let i=await fetch(f,h);const o=dt&&("stream"===l||"response"===l);if(dt&&(a||o&&p)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=re.toFiniteNumber(i.headers.get("content-length")),[n,r]=a&&Ze(t,ze(He(a),!0))||[];i=new Response(st(i.body,65536,n,()=>{r&&r(),p&&p()}),e)}l=l||"text";let g=await ht[re.findKey(ht,l)||"text"](i,e);return!o&&p&&p(),await new Promise((t,n)=>{Ue(t,n,{data:g,headers:Me.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})})}catch(t){if(p&&p(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new ae("Network Error",ae.ERR_NETWORK,e,f),{cause:t.cause||t});throw ae.from(t,t&&t.code,e,f)}})};re.forEach(pt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const yt=e=>`- ${e}`,gt=e=>re.isFunction(e)||null===e||!1===e,wt=e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let n=t?e.length>1?"since :\n"+e.map(yt).join("\n"):" "+yt(e[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function bt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qe(null,e)}function St(e){bt(e),e.headers=Me.from(e.headers),e.data=_e.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return wt(e.adapter||Pe.adapter)(e).then(function(t){return bt(e),t.data=_e.call(e,e.transformResponse,t),t.headers=Me.from(t.headers),t},function(t){return Ve(t)||(bt(e),t&&t.response&&(t.response.data=_e.call(e,e.transformResponse,t.response),t.response.headers=Me.from(t.response.headers))),Promise.reject(t)})}const vt="1.11.0",kt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{kt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Et={};kt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+vt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,i)=>{if(!1===e)throw new ae(r(s," has been removed"+(t?" in "+t:"")),ae.ERR_DEPRECATED);return t&&!Et[s]&&(Et[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,i)}},kt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Tt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ae("options must be an object",ae.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const t=e[i],n=void 0===t||o(t,i,e);if(!0!==n)throw new ae("option "+i+" must be "+n,ae.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new ae("Unknown option "+i,ae.ERR_BAD_OPTION)}},validators:kt},Ot=Tt.validators;class Nt{constructor(e){this.defaults=e||{},this.interceptors={request:new be,response:new be}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Xe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&Tt.assertOptions(n,{silentJSONParsing:Ot.transitional(Ot.boolean),forcedJSONParsing:Ot.transitional(Ot.boolean),clarifyTimeoutError:Ot.transitional(Ot.boolean)},!1),null!=r&&(re.isFunction(r)?t.paramsSerializer={serialize:r}:Tt.assertOptions(r,{encode:Ot.function,serialize:Ot.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Tt.assertOptions(t,{baseUrl:Ot.spelling("baseURL"),withXsrfToken:Ot.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=s&&re.merge(s.common,s[t.method]);s&&re.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=Me.concat(i,s);const o=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[St.bind(this),void 0];for(e.unshift(...o),e.push(...c),u=e.length,l=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,s){n.reason||(n.reason=new qe(e,r,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new At(function(t){e=t}),cancel:e}}}const It=At;const Pt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pt).forEach(([e,t])=>{Pt[t]=e});const Dt=Pt;const xt=function e(t){const n=new Ct(t),r=f(Ct.prototype.request,n);return re.extend(r,Ct.prototype,n,{allOwnKeys:!0}),re.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Xe(t,n))},r}(Pe);xt.Axios=Ct,xt.CanceledError=qe,xt.CancelToken=It,xt.isCancel=Ve,xt.VERSION=vt,xt.toFormData=he,xt.AxiosError=ae,xt.Cancel=xt.CanceledError,xt.all=function(e){return Promise.all(e)},xt.spread=function(e){return function(t){return e.apply(null,t)}},xt.isAxiosError=function(e){return re.isObject(e)&&!0===e.isAxiosError},xt.mergeConfig=Xe,xt.AxiosHeaders=Me,xt.formToJSON=e=>Ae(re.isHTMLForm(e)?new FormData(e):e),xt.getAdapter=wt,xt.HttpStatusCode=Dt,xt.default=xt;const Rt=xt,Lt=new Set,Ft=new Set,$t=async(e,t)=>{let n="";const r=sessionStorage.getItem(`svg-${e}`);if(r)n=r;else{const t=await d(`https://cdn.labeler.apps.acowebs.com/${e}`);if(!t.ok)return void Ft.add(e);n=await t.text(),sessionStorage.setItem(`svg-${e}`,n)}const s=(new DOMParser).parseFromString(n,"image/svg+xml").querySelector("svg");return s&&(s.style.setProperty("width","100%"),s.style.setProperty("height","100%"),t&&(t.shape&&t.shape.forEach((e,t)=>{e.key||console.log("shape key is missing",e,t),s.querySelectorAll(`#${e.key}`).forEach(t=>{t?.setAttribute("fill",e.fill)})}),t.text&&t.text.forEach(e=>{s.querySelectorAll(`#${e.key}`).forEach(t=>{if(t?.setAttribute("x",e.x),t?.setAttribute("y",e.y),t?.setAttribute("fill",e.fill),t?.setAttribute("font-size",e.fontSize),t?.setAttribute("transform",e.transform||"translate(0,0)"),Lt.has(e.fontFamily))t?.setAttribute("font-family",e.fontFamily);else{let n=document.createElement("link");n.href=`https://fonts.bunny.net/css?family=${e.fontFamily}&display=swap`,n.rel="stylesheet",document.head.appendChild(n),Lt.add(e.fontFamily),t?.setAttribute("font-family",e.fontFamily)}t?.setAttribute("font-weight",e.fontWeight),t?.setAttribute("letter-spacing",e.letterSpacing),t&&(t.textContent=e.text)})}))),s};let Mt=new Map,_t=new Set,Vt=!1;const jt=async(e,t,n="BADGE")=>{const r=t.cloneNode(!0);for(const t of e){const e=`https://cdn.labeler.apps.acowebs.com/${t.imageUrl}`;let s=document.createElement("div");const i=t.style,o="percentage"===i.type?`${i.width}%`:`${i.width}px`,a="percentage"===i.type?`${i.height}%`:`${i.height}px`,c=i.aspectRatio?"auto":a;if(!0===t.svgToStoreFront&&t.svgUrl){const e=await $t(t.svgUrl,{...t.style.svgStyle});if(!e)continue;i.aspectRatio?(e.style.objectFit="contain",s.style.minHeight="10px"):e.setAttribute("preserveAspectRatio","none"),s.style.overflow="unset",e.style.setProperty("transform",`rotate(${i.angle}deg)`),e.classList.add("aco-image"),e.classList.add("aco-svg"),e&&s.appendChild(e)}else if(Mt.has(e)){const t=Mt.get(e);if(t){const e=t.cloneNode(!0);e.style.setProperty("transform",`rotate(${i.angle}deg)`),i.aspectRatio&&(e.style.objectFit="contain",s.style.setProperty("min-height","10px")),s.appendChild(e)}}else{if(_t.has(e))continue;const n=new Image;n.className="aco-image",n.alt=t?.title;try{const t=await d(e);let r;if(!t.ok){_t.add(e);continue}r=await t.blob();const o=URL.createObjectURL(r);n.src=o,Mt.set(e,n),i.aspectRatio&&(n.style.objectFit="contain",s.style.minHeight="10px"),n.style.setProperty("transform",`rotate(${i.angle}deg)`),Mt.set(e,n),s.appendChild(n)}catch(t){_t.add(e);continue}}const l="percentage"===i.type?`${i.margin?.top}%`:`${i.margin?.top}px`,u="percentage"===i.type?`${i.margin?.left}%`:`${i.margin?.left}px`,h="percentage"===i.type?`${i.margin?.right}%`:`${i.margin?.right}px`,f="percentage"===i.type?`${i.margin?.bottom}%`:`${i.margin?.bottom}px`;let m={};switch(i.position){case"LT":case"LC":m={top:l,left:u,right:"unset",bottom:"unset"};break;case"TC":m={top:l,left:u.includes("%")?parseFloat(u)-parseFloat(o)/2+"%":u,bottom:"unset",right:"unset"};break;case"RT":case"RC":m={top:l,right:h,left:"unset",bottom:"unset"};break;case"LB":m={bottom:f,left:u,right:"unset",top:"unset"};break;case"BC":m={bottom:f,left:u.includes("%")?parseFloat(u)-parseFloat(o)/2+"%":u,right:"unset",top:"unset"};break;case"RB":m={bottom:f,right:h,left:"unset",top:"unset"}}s.classList.add("aco-box"),s.classList.add(`animate__${i.animation.name}`),s.setAttribute("aco-sticker-id",t.id),s.id=t.id,s.style.width=o,s.style.setProperty("height",c,"important"),s.style.setProperty("animation-duration",i.animation.duration+"s"),s.style.setProperty("animation-iteration-count",i.animation.iteration);for(const[e,t]of Object.entries(m))s.style.setProperty(e,t);if(s.querySelector(".aco-image").style.setProperty("opacity",i.opacity+""),s.style.setProperty("z-index","9999"),window.acoBoxElementCreator&&(s=window.acoBoxElementCreator(s,m,c,o)),"LABEL"!==n)r.appendChild(s);else{switch(s.style.setProperty("position","relative"),r.style.setProperty("justify-content","space-between"),i.alignment){case"left":default:r.querySelector(".aco-left-label")?.appendChild(s),r.querySelector(".aco-left-label")?.style.setProperty("width","100%"),Vt||(r.querySelector(".aco-left-label")?.style.setProperty("position","relative"),Vt=!0);break;case"right":r.querySelector(".aco-right-label")?.appendChild(s),r.querySelector(".aco-right-label")?.style.setProperty("width","100%"),Vt||(r.querySelector(".aco-right-label")?.style.setProperty("position","relative"),Vt=!0);break;case"center":r.querySelector(".aco-center-label")?.appendChild(s),r.querySelector(".aco-center-label")?.style.setProperty("width","100%"),Vt||(r.querySelector(".aco-center-label")?.style.setProperty("position","relative"),Vt=!0)}}}return Vt=!1,r};let qt=new Map,Ut=new Set,Wt=new Set;const Bt=async e=>{const t=document.createElement("div");return t.className="aco-badge-wrapper",await jt(e,t)},zt=async e=>{const t=document.createElement("div");for(let e=0;e<3;e++){let n=document.createElement("div");n.style.setProperty("display","flex"),n.style.setProperty("position","absolute"),0===e&&(n.classList.add("aco-left-label"),n.style.setProperty("justify-content","flex-start")),1===e&&(n.classList.add("aco-center-label"),n.style.setProperty("justify-content","center")),2===e&&(n.classList.add("aco-right-label"),n.style.setProperty("justify-content","flex-end")),t.appendChild(n.cloneNode(!0))}const n=e.filter(e=>"belowProductName"===e.style.position),r=e.filter(e=>"belowProductPrice"===e.style.position),s=e.filter(e=>"belowProductImage"===e.style.position);t.className="aco-label-wrapper";let i=[];if(n.length>0){const e=await jt(n,t.cloneNode(!0),"LABEL");i.push({position:"belowProductName",element:e})}if(r.length>0){const e=await jt(r,t.cloneNode(!0),"LABEL");i.push({position:"belowProductPrice",element:e})}if(s.length>0){const e=await jt(s,t.cloneNode(!0),"LABEL");i.push({position:"belowProductImage",element:e})}return i},Zt=async e=>{const t=document.createElement("div");if(t.classList.add("aco-announcement-wrapper"),t.style.setProperty("overflow","hidden"),"bar"!==e.properties.type){const n=await jt([e],t);n.style.setProperty("position","absolute"),n.style.setProperty("top","0");const r=document.documentElement.scrollHeight;return n.style.setProperty("height",`${r}px`),n.style.setProperty("width","100%"),n.style.setProperty("display","block"),n}{e.properties.sticky&&(t.style.setProperty("position","sticky"),t.style.setProperty("top","0"),t.style.setProperty("z-index","9999"));const n=document.createElement("div"),r=document.createElement("p");if(r.style.setProperty("margin","0"),r.innerText=e.properties.text,e.properties.action&&(n.style.setProperty("cursor","pointer"),n.onclick=()=>{window.open(e.properties.action,"_blank")}),n.appendChild(r),n.classList.add("aco-announcement-bar"),n.style.setProperty("background-color",e.properties.bgColor),n.style.setProperty("position","sticky"),n.style.setProperty("color",e.properties.fontColor),n.style.setProperty("font-size",`${e.properties.fontSize}px`),Wt.has(e.properties.fontFamily))n.style.setProperty("font-family",e.properties.fontFamily);else{let t=document.createElement("link");t.href=`https://fonts.bunny.net/css?family=${e.properties.fontFamily}&display=swap`,t.rel="stylesheet",document.head.appendChild(t),Wt.add(e.properties.fontFamily),n.style.setProperty("font-family",e.properties.fontFamily)}n.style.setProperty("font-weight",e.properties.fontWeight),n.style.setProperty("text-align",e.properties.textAlignment),e.properties.marqueeDirection&&"none"!==e.properties.marqueeDirection&&(r.style.setProperty("overflow","unset"),r.classList.add(`aco-marquee-${e.properties.marqueeDirection.toLowerCase()}`),r.style.setProperty("animation-duration",`${e.properties.marqueeDelay}s`),n.classList.add(`animate__${e.style.animation.name}`),n.style.setProperty("animation-duration",e.style.animation.duration+"s"),n.style.setProperty("animation-iteration-count",e.style.animation.iteration)),t.appendChild(n)}return t},Ht=e=>{const t=decodeURIComponent(e).indexOf("/products");return-1===t?null:decodeURIComponent(e).slice(t)?.split("/").pop()?.split("?")[0]?.split("#")[0]?.split("&")[0]};function Jt(e){const t=window.Shopify.currency.rate;return t?e*parseFloat(t):e}function Gt(e,t){return e>=Jt(+t.min)&&e<=Jt(+t.max)}function Yt(e,t){const n=new Date,r=e.split(" ")[0],s=new Date(r),i=n.getTime()-s.getTime();return Math.floor(i/864e5)<=+t}function Kt(e,t){return t.includes(e)}const Xt=(e,t)=>{const n=decodeURIComponent(window.location.pathname),r=Ht(n),s=new URLSearchParams(window.location.search).get("variant"),i=s?`gid://shopify/ProductVariant/${s}`:`gid://shopify/ProductVariant/${t.first_variant?.id?t.first_variant.id:t.variants[0].id}`;return Object.freeze({checkAllProducts:function(){return e.allProducts},checkSpecificProducts:function(){return!!e.specificProducts.length&&(e.specificProducts?.length&&Kt(`gid://shopify/Product/${t.id}`,e.specificProducts))},checkSpecificVariants:function(){if(e.specificVariants.length){for(let s of e.specificVariants){if(n.includes("/products")&&r===t.handle&&s.id===`gid://shopify/Product/${t.id}`&&s.variants&&s.variants.some(e=>e.id===i))return!0;if(!n.includes("/products")&&s.id===`gid://shopify/Product/${t.id}`)return!0}return!1}return!1},checkSpecificCollection:function(){const n=e.specificCollection?.includeCollections||[],r=e.specificCollection?.excludeCollections||[];return n.length?t.collections.some(e=>n.includes("number"==typeof e.id?`gid://shopify/Collection/${e.id}`:e.id))&&!t.collections.some(e=>r.includes("number"==typeof e.id?`gid://shopify/Collection/${e.id}`:e.id)):!t.collections.some(e=>r.includes("number"==typeof e.id?`gid://shopify/Collection/${e.id}`:e.id))},checkSpecificTags:function(){const n=e.specificTags?.includeTags||[],r=e.specificTags?.excludeTags||[];return n.length?t.tags.some(e=>n.includes(e))&&!t.tags.some(e=>r.includes(e)):!t.tags.some(e=>r.includes(e))},checkProductVendor:function(){const n=e.productVendor?.includeVendors||[],r=e.productVendor?.excludeVendors||[];return n.length||Kt(t.vendor,r),Kt(t.vendor,n)&&!Kt(t.vendor,r)},checkProductType:function(){const n=e.productType?.includeTypes||[],r=e.productType?.excludeTypes||[];return n.length||Kt(t.productType,r),Kt(t.productType,n)&&!Kt(t.productType,r)},checkPriceRange:function(){return t.variants.some(t=>{const n=t.price.amount.split("").filter(e=>","===e||"."===e).at(-1);return Gt("."===n?parseFloat(t.price.amount.replaceAll(",","")):","===n?parseFloat(t.price.amount.replaceAll(".","").replaceAll(",",".")):parseFloat(t.price.amount),e.priceRange)})},checkComingSoon:function(){return!(t.totalInventory>0)&&Yt(t.createdAt,e.comingSoon)},checkNewArrival:function(){return Yt(t.createdAt,e.newArrivals)},checkInStock:function(){return t.totalInventory>0||t.availableForSale},checkLowStock:function(){return t.totalInventory<=+e.lowStock},checkOutOfStock:function(){return t.totalInventory<=0&&!t.availableForSale},checkCountryRestriction:function(){if(!e.selected.includes("countryRestriction"))return!1;const t=e.countryRestriction?.includedCountry||[],n=e.countryRestriction?.excludedCountry||[],r=sessionStorage.getItem("ipCountry");if(r){const{country:e}=JSON.parse(r);return t.length?Kt(e,t)&&!Kt(e,n):!Kt(e,n)}return!1},checkPublishedDate:()=>{const{publishedDate:n}=e,r=new Date(n.from),s=new Date(n.to),i=new Date(t.publishedAt);return i.getTime()>=r.setHours(0,0,0,0)&&i.getTime()<=s.setHours(23,59,0,0)}})};function Qt(e){return/^\/([a-z]{2}(-[a-z]{2,6})?)?\/?$/.test(e)}const en=(e,t,n=!1)=>{if(!e.isActivated||!function(e){if(labeler.page)switch(labeler.page.includes("collection.")&&(labeler.page="collection"),labeler.page.includes("product.")&&(labeler.page="product"),labeler.page){case"index":return e.includes("home");case"product":return e.includes("products");case"collection":return e.includes("collections");case"search":return e.includes("search");default:return!1}const t=decodeURIComponent(window.location.pathname),n=[{check:Qt,type:"home"},{check:()=>t.includes("/products"),type:"products"},{check:()=>["/collections","/pages"].some(e=>t.includes(e)),type:"collections"},{check:()=>t.includes("/search"),type:"search"}].filter(e=>e.check(t));return!!n&&n.some(t=>e.includes(t.type))}(e.selectedPages))return!1;const r=e.rules,s=Xt(r,t),i=s.checkAllProducts(),o=s.checkSpecificProducts(),a=s.checkSpecificVariants(),c=s.checkSpecificCollection(),l=s.checkSpecificTags(),u=s.checkProductVendor(),d=s.checkProductType(),h=s.checkPriceRange(),f=s.checkComingSoon(),m=s.checkNewArrival(),p=s.checkInStock(),y=s.checkLowStock(),g=s.checkOutOfStock(),w=s.checkCountryRestriction(),b=s.checkPublishedDate();let S={};S.allProducts=!!i,S.specificProducts=!(!o||i),S={...S,specificVariants:a,specificCollection:c,specificTags:l,productVendor:u,productType:d,priceRange:h,comingSoon:f,newArrivals:m,inStock:p,lowStock:y,outOfStock:g,countryRestriction:w,publishedDate:b},n&&console.log(S);return r.selected.reduce((e,t)=>"scheduler"===t?e:e&&!!S[t],!0)};labeler.filter=(e,t)=>en(e,t,!0);const tn=en,nn=()=>Object.freeze({getMatchingVariantImages:(e,t)=>t.variants.filter(t=>e.rules.specificVariants.some(e=>!!e.variants&&e.variants.some(e=>e.id===t.id))).map(e=>e.image),generatePriceList:(e,t)=>{let n=[];for(const r of e){const e=r.rules.specificVariants.some(e=>e.id===t.id)?t.variants.filter(e=>r.rules.specificVariants.some(t=>t.variants.some(t=>t.id===e.id))):t.variants;n=n.concat(e.map(e=>e.price.amount)),r.rules.selected.includes("priceRange")&&(n=n.filter(e=>parseFloat(e)<=+r.rules.priceRange.max&&parseFloat(e)>=+r.rules.priceRange.min))}return n}}),rn=nn(),sn=decodeURIComponent(window.location.pathname);let on=new Map,an=new Set;const cn=async(e,t,n=!1)=>{const r=[];for(const s of t){if(n&&console.log("Product start --\x3e ",s.handle),an.has(s.handle))continue;if(on.has(s.handle)){let e=on.get(s.handle);r.push({...e,element:e.element.cloneNode(!0)});continue}const t=[];for(const r of e)n&&console.log("\tBadge start --\x3e ",r.title),tn(r,s)&&t.push(r);if(!t.length){an.add(s.handle);continue}n&&console.log("\tList of badges --\x3e ",t);let i=t.reduce((e,t)=>e.concat(0!==t.rules.specificVariants.length&&t.rules.selected.includes("specificVariants")?rn.getMatchingVariantImages(t,s):s.images),[]);window.addAllImagesOnBadgeData&&(i=s.images),n&&console.log("\tImage src --\x3e ",i);const o=t.reduce((e,t)=>(t.rules.scheduler.status&&e.push({badgeId:t.id,schedule:t.rules.scheduler}),e),[]);n&&console.log("\tScheduled Stickers --\x3e ",o);const a=await Bt(t),c=t.filter(e=>"Sale On"===e.Category?.name);c.length&&c.forEach(e=>{if(n&&console.log("\t\t Sale on --\x3e ",e.title),!e.options.percentageInBetweenForSaleOn.status)return;const t=Array.from(a.childNodes).find(t=>t.id===e.id),r=t?.querySelector("#tchange");if(!r)return;let i=(parseFloat(s.compareAtPriceRange.minVariantPrice.amount.replaceAll(",",""))-parseFloat(s.priceRange.minVariantPrice.amount.replaceAll(",","")))/parseFloat(s.compareAtPriceRange.minVariantPrice.amount.replaceAll(",",""))*100;if(n&&console.log("\t\t Sale On Calculated percentage --\x3e ",i),sn.includes("/products")&&sn.includes(s.handle)){const e=new URLSearchParams(window.location.search).get("variant"),t=e?`gid://shopify/ProductVariant/${e}`:`gid://shopify/ProductVariant/${s.first_variant?.id?s.first_variant.id:s.variants[0].id}`,r=s.variants.find(e=>e.id===t);r&&(i=r.compareAtPrice?.amount?(parseFloat(r.compareAtPrice.amount.replaceAll(",",""))-parseFloat(r.price.amount.replaceAll(",","")))/parseFloat(r.compareAtPrice.amount.replaceAll(",",""))*100:0,n&&console.log("\t\t Sale On Calculated percentage for variants --\x3e ",i))}i=i!==1/0&&i!==-1/0?+i.toFixed(2):0,n&&console.log("\t\t Sale On final Calculated percentage --\x3e ",i),n&&console.log("\t\t is Sale on valid --\x3e ",!(ie.options.percentageInBetweenForSaleOn.max)),(ie.options.percentageInBetweenForSaleOn.max)&&t.remove(),r.textContent=Math.round(i)+"%"}),n&&console.log("Product end --\x3e ",s.handle),r.push({badgeId:t[0].id,includedBadges:t.map(e=>e.title),productId:s.id,element:a,handle:s.handle,productTitle:s.title,imageSrc:i,scheduledStickers:o}),on.set(s.handle,{badgeId:t[0].id,includedBadges:t.map(e=>e.title),productId:s.id,element:a.cloneNode(!0),handle:s.handle,productTitle:s.title,imageSrc:i,scheduledStickers:o})}return r};labeler.badgeData=(e,t)=>cn(e,t,!0),labeler.cachedBadgeData=on,labeler.cachedBadgeLessProducts=an;const ln=nn(),un=decodeURIComponent(window.location.pathname);let dn=new Map,hn=new Set;const fn=async(e,t,n=!1)=>{const r=[];for(const s of t){if(hn.has(s.handle))continue;if(dn.has(s.handle)){let e=dn.get(s.handle);r.push({...e,element:e.element.map(e=>({...e,element:e.element.cloneNode(!0)}))});continue}const t=[];for(const n of e)tn(n,s)&&t.push(n);if(!t.length){hn.add(s.handle);continue}let i=t.reduce((e,t)=>e.concat(0!==t.rules.specificVariants.length&&t.rules.selected.includes("specificVariants")?ln.getMatchingVariantImages(t,s):s.images),[]);window.addAllImagesOnLabelData&&(i=s.images);const o=ln.generatePriceList(t,s),a=t.reduce((e,t)=>(t.rules.scheduler.status&&e.push({labelId:t.id,schedule:t.rules.scheduler}),e),[]),c=await zt(t),l=t.filter(e=>"Sale On"===e.Category?.name);l.length&&l.forEach(e=>{if(n&&console.log("\t\t Sale on --\x3e ",e.title),e.options.percentageInBetweenForSaleOn.status)for(let t of c)for(const r of t.element.childNodes){const t=Array.from(r.childNodes).find(t=>t.id===e.id),i=t?.querySelector("#tchange");if(!i)continue;let o=(parseFloat(s.compareAtPriceRange.minVariantPrice.amount.replaceAll(",",""))-parseFloat(s.priceRange.minVariantPrice.amount.replaceAll(",","")))/parseFloat(s.compareAtPriceRange.minVariantPrice.amount.replaceAll(",",""))*100;if(n&&console.log("\t\t Sale On Calculated percentage --\x3e ",o),un.includes("/products")&&un.includes(s.handle)){const e=new URLSearchParams(window.location.search).get("variant"),t=e?`gid://shopify/ProductVariant/${e}`:`gid://shopify/ProductVariant/${s.first_variant?.id?s.first_variant.id:s.variants[0].id}`,r=s.variants.find(e=>e.id===t);r&&(o=r.compareAtPrice?.amount?(parseFloat(r.compareAtPrice.amount.replaceAll(",",""))-parseFloat(r.price.amount.replaceAll(",","")))/parseFloat(r.compareAtPrice.amount.replaceAll(",",""))*100:0,n&&console.log("\t\t Sale On Calculated percentage for variants --\x3e ",o))}o=o!==1/0&&o!==-1/0?+o.toFixed(2):0,n&&console.log("\t\t Sale On final Calculated percentage --\x3e ",o),n&&console.log("\t\t is Sale on valid --\x3e ",!(oe.options.percentageInBetweenForSaleOn.max)),(oe.options.percentageInBetweenForSaleOn.max)&&t.remove(),i.textContent=Math.round(o)+"%"}}),r.push({labelId:t[0].id,includedLabels:t.map(e=>e.title),productId:s.id,element:c,handle:s.handle,productTitle:s.title,imageSrc:i,priceList:o,scheduledStickers:a}),dn.set(s.handle,{labelId:t[0].id,includedLabels:t.map(e=>e.title),productId:s.id,element:c.map(e=>({position:e.position,element:e.element.cloneNode(!0)})),handle:s.handle,productTitle:s.title,imageSrc:i,priceList:o,scheduledStickers:a})}return r};labeler.labelData=fn,labeler.cachedLabelData=dn,labeler.cachedLabelLessProducts=hn;let mn=decodeURIComponent(window.location.pathname).includes("/products");const pn=async e=>{if(!mn)return[];return await e.reduce(async(e,t)=>{const n=await e;if(!t.isActivated)return n;const r=await(async e=>{const t=document.createElement("div");if(t.classList.add("aco-trust-badge-wrapper"),e.header.status){const n=document.createElement("div");n.classList.add("aco-trust-badge-header");const r=document.createElement("p");if(r.classList.add("aco-trust-badge-header-text"),r.innerText=e.header.text,r.style.color=e.header.color,r.style.setProperty("margin","0"),r.style.setProperty("font-size",`${e.header.fontSize}px`),r.style.setProperty("margin","0"),Wt.has(e.header.fontFamily))r.style.setProperty("font-family",e.header.fontFamily);else{let t=document.createElement("link");t.href=`https://fonts.bunny.net/css?family=${e.header.fontFamily}&display=swap`,t.rel="stylesheet",document.head.appendChild(t),Wt.add(e.header.fontFamily),r.style.setProperty("font-family",e.header.fontFamily)}n.appendChild(r),t.appendChild(n)}t.classList.add(`animate__${e.style.animation}`),t.style.setProperty("text-align",e.style.textAlign),t.style.setProperty("width","100%");const n=document.createElement("div");n.classList.add("aco-trust-badge-sticker"),n.style.setProperty("display","flex"),n.style.setProperty("flex-wrap","wrap"),n.style.setProperty("justify-content","center"),"left"===e.style.textAlign&&n.style.setProperty("justify-content","flex-start"),"right"===e.style.textAlign&&n.style.setProperty("justify-content","flex-end");for(const t of e.imageUrls){const r=document.createElement("div");r.classList.add("aco-box"),r.style.setProperty("position","relative");let s=`https://cdn.labeler.apps.acowebs.com/${t}`;if("svg"===s.split(".").pop()){let n=window.Shopify.shop;if(!s.includes(n)&&"normal"!==e.style.badgeType){let t=s.split("/");t[t.length-1]=`${e.style.badgeType}_${t.at(-1)}`,s=t.join("/")}let i="";const o=sessionStorage.getItem(`svg-${t}`);if(o)i=o;else{const e=await d(s);if(!e.ok)continue;i=await e.text(),sessionStorage.setItem(`svg-${t}`,i)}const a=(new DOMParser).parseFromString(i,"image/svg+xml").querySelector("svg");a&&(a.querySelectorAll("#aco_change").forEach(t=>{e.style.fill&&t.setAttribute("fill",e.style.fill)}),a.style.setProperty("width","100%"),a.style.setProperty("height","100%"),r.append(a))}else if(qt.has(s)){const e=qt.get(s);if(e){let t=e.cloneNode(!0);t.style.setProperty("width","100%"),t.style.setProperty("height","100%"),t.style.setProperty("object-fit","contain"),r.appendChild(t)}}else{if(Ut.has(s))continue;const t=new Image;let n;t.className="aco-image",t.alt=e?.title;try{const e=await fetch(s);if(!e.ok){Ut.add(s);continue}n=await e.blob();const i=URL.createObjectURL(n);t.src=i,qt.set(s,t),r.appendChild(t),t.style.setProperty("width","100%"),t.style.setProperty("height","100%"),t.style.setProperty("object-fit","contain")}catch(e){Ut.add(s);continue}}r.style.setProperty("width",`${e.style.width}px`),r.style.setProperty("height","auto"),n.appendChild(r)}return t.appendChild(n),t})(t);return[...n,{trustBadgeId:t.id,element:r,visibleInProductPage:t.isVisibleOnProductPage}]},Promise.resolve([]))};function yn(e){return/^\/([a-z]{2}(-[a-z]{2,6})?)?\/?$/.test(e)}function gn(e){if(e.includes("allPages"))return!0;const t=decodeURIComponent(window.location.pathname),n=[{check:yn,type:"home"},{check:()=>t.includes("/products"),type:"products"},{check:()=>["/collections"].some(e=>t.includes(e)),type:"collections"},{check:()=>t.includes("/search"),type:"search"}].find(e=>e.check(t));return!!n&&e.includes(n.type)}function wn(e,t){return t.includes(e)}function bn(e){if(!e.selected.includes("countryRestriction"))return!1;const t=e.countryRestriction?.includedCountry||[],n=e.countryRestriction?.excludedCountry||[],r=sessionStorage.getItem("ipCountry");if(r){const{country:e}=JSON.parse(r);return t.length?wn(e,t)&&!wn(e,n):!wn(e,n)}return!1}labeler.trustBadgeData=pn;const Sn=async e=>{const t=[];for(const n of e){if(!n.isActivated)continue;const e=await Zt(n),r=n.selectedPages;r.length&&!gn(r)||(n.rules.selected.includes("countryRestriction")&&!bn(n.rules)||t.push({announcementId:n.id,element:e,isBar:"bar"===n.properties.type,position:n.properties.position,scheduledSticker:{isScheduled:n.rules.selected.includes("scheduler"),schedule:n.rules?.scheduler}}))}return t};function vn(){const e=e=>{const t=/^(aco-title-wrapper|aco-price-wrapper)-[a-zA-Z0-9]+$/;return Array.from(e.classList).some(e=>t.test(e))};return Object.freeze({getIdFromProduct:e=>e.id,getFileNameFromURL:e=>{try{return new URL(e.replace("//","https://")).pathname.split("/").pop()}catch(t){return e.split("/").pop()}},elementHasClass:e,addClassToElement:(t,n,r,s)=>{const{property:i,element:o}=t,a=`aco-${i}-wrapper-${n}`;if(window?.addClassToElement){window.addClassToElement(a,n,r,s,t)}e(o)||o.classList.contains("aco-image-wrapper")||o.classList.add(a),o.attributes.getNamedItem(`aco-${r}-id`)||o.setAttribute(`aco-${r}-id`,s+""),!o.attributes.getNamedItem("aco-product-id")&&n&&o.setAttribute("aco-product-id",n+"")},matchesPattern:e=>/^(aco-title-wrapper|aco-price-wrapper)-[a-zA-Z0-9]+$/.test(e),getTextWithoutChildElements:e=>{let t="";return Array.from(e.childNodes).forEach(e=>{3===e.nodeType&&(t+=e.textContent)}),t.trim()},extractNumbers:e=>{let t=e.match(/-?\d{1,3}((,|\.)\d{3})*(,|\.)\d+|-?\d+/g);return t?t.map(e=>/,.*\./.test(e)?parseFloat(e.replace(/,/g,"")):/\..*,/.test(e)?parseFloat(e.replace(/\./g,"").replace(",",".")):e.includes(",")?parseFloat(e.replace(",",".")):parseFloat(e)):[]},toSIStandard:e=>{let t;t=/,.*\./.test(e)?e.replace(/,/g,""):/\..*,/.test(e)?e.replace(/\./g,"").replace(",","."):e.replace(",",".");let n=t.split("."),r=n[0].replace(/\B(?=(\d{3})+(?!\d))/g," "),s=n.length>1?n[1]:"";if(s.length>2)s=s.substring(0,2);else for(;s.length<2;)s+="0";return r+"."+s},checkImageTag:(e,t)=>{try{let n=new URL(e);if(n){let e=n.pathname.split(".").pop(),r=n.pathname?.split("/")?.pop()?.replace(`.${e}`,"");if(!r)return!1;let s=r.split("_"),i=s.length;for(let n=0;nt.includes(`${s.join("_")}.${e}`)))return!0;if(s.pop(),0===s.length)return!1}}}catch(e){return!1}}})}function kn(e,t=new Set,n=null){if(!e||t.has(e))return null;if(t.add(e),"A"===e.tagName)return e;for(let r of Array.from(e.children)){if(r!==n&&"A"===r.tagName)return r;const e=kn(r,t);if(e)return e}let r=e.previousElementSibling;for(;r;){if("A"===r.tagName)return r;const e=kn(r,t);if(e)return e;r=r.previousElementSibling}for(r=e.nextElementSibling;r;){if("A"===r.tagName)return r;const e=kn(r,t);if(e)return e;r=r.nextElementSibling}return kn(e.parentElement,t,e)}labeler.announcementData=Sn;const En=vn(),Tn=window.aco_depth||30,{aco_debug:On}=window;On&&console.log(`depth: ${Tn}`);const Nn=window.maxAllowedNodeKeys||2,Cn={title:new Map,price:new Map},An=window.firstProductsToVerify||3,In=decodeURIComponent(window.location.pathname.split("/").pop());const Pn=async(e,t,n)=>{if("image"==e)return;const i=a(t),o=`${e}_wrapper`;let c=`${labeler.page}_${o}`;n==Ht(window.location.href)&&(c=`main_product_${o}`);const l=o.startsWith("title")?"title":"price",u=Cn[l].get(i);Cn[l].set(i,{property:l,count:u?u.count+1:1});let d=function(e){if(!Cn[e])return[];const t=Array.from(Cn[e].entries()).reduce((e,t)=>(t[1].count>e.maxCount?(e.maxCount=t[1].count,e.entries=[t]):t[1].count===e.maxCount&&e.entries.push(t),e),{maxCount:0,entries:[]});return t.entries}(l);const{findMaxKeyCountEntries:h}=window;h&&(d=h(Cn,l));const f=n==Ht(window.location.href)?"main_product":labeler.page;d.length>1&&"main_product"==f&&(d=d.pop()),d=d.flat(10);const m=r[f];if(m?.[l]?.length>=Nn||m?.[l]?.includes(i))return;const p=n==In?0:An,{saveLabelPosition:y}=window;if(y&&y(c,d),d?.length&&d[1].count>=p){On&&console.log(`[${f.toUpperCase()}] : saving label position for ${c} with maxEntry`,d);const e=d.filter(e=>!e?.property);s(f,l,e),window.CacheHandler.postMessage({type:"SAVE_STICKER_POSITION",key:c,value:e})}};const Dn=function(e,t,n,s,i=new Set,o=0){const a=[];let l=0,d=0;const f=(e,t=["visually-hidden","aco-label-wrapper","aco-badge-wrapper"])=>i.has(e)||t.some(t=>e.classList.contains(t))||En.elementHasClass(e)||["SCRIPT","STYLE","NOSCRIPT","IFRAME","INPUT","BUTTON"].includes(e.nodeName)||o>Tn,m=(e,r)=>{if(f(e))return;i.add(e);const o=kn(e),c=Ht(window.location.href)===t;if(o&&Ht(o.href)!==t&&!c)return;const u=En.getTextWithoutChildElements(e);u.includes(n)&&"LABEL"!==e.nodeName&&(a.push({property:"title",element:e}),l++);const h=En.extractNumbers(u);if(h.length>0){const t=h.map(e=>En.toSIStandard(e+"")),n=s.map(e=>En.toSIStandard(e));d<=3&&n.some(e=>t.includes(e))&&"LABEL"!==e.nodeName&&(a.push({property:"price",element:e}),d++)}if(l>2||d>2)return;e.childNodes.forEach(e=>{e instanceof Element&&m(e,r+1)});const p=e.parentElement;p&&!f(p)&&m(p,r+1)};if(window.cachingDisabled)m(e,o);else{const{havePositionsCached:l,failedPropertys:d,currentPagePositions:f}=(()=>{const n=t==Ht(window.location.href)?"main_product":labeler.page,s=r[n],o={};for(let[t,r]of Object.entries(s||{}))r?.length&&"image"!=t&&r.forEach(r=>{let s;"main_product"==n&&(s=document.querySelector(r));const{findNearestElement:c}=window;if(c&&(s=c(e,r,n)),s||(s=u(e,r)),!s)return o[t]=r;i.add(s),a.push({property:t,element:s})});Object.values(o).length&&(h(),On&&console.log(`%c[FLUSHING] : Failed to find cached positions: ${JSON.stringify(o)} `,"color:yellow",r),c());const l=Object.values({...s.title,...s.price})?.flat(5).length;return!l&&On&&console.log("%c[ERROR] : no cached positions found for :","color:red",n,r),{havePositionsCached:l,failedPropertys:o,currentPagePositions:s}})(),p=n.length,y=s.length,g=!f?.title?.length&&p||!f?.price?.length&&y;(!l||Object.values(d).length||g)&&(On&&console.log("%c[ERROR] : labeler is traversing , ensure caching is working","color:red"),m(e,o))}return a.length&&!window.cachingDisabled&&a.forEach(e=>{Pn(e.property,e.element,t)}),a};function xn(e){return e.replace(/_[0-9]+x\./,".")}const{pathname:Rn}=window.location,Ln=Rn.split("/").pop(),Fn=vn(),$n=(e,t,n,s)=>{const i=JSON.parse(window.productMarked||"{}"),o=JSON.parse(window.imageMarked||"{}");let a=`img:not([aco-visited-${n}="true"]):not(.aco-image):not([aco-visited="true"]):not([aco-ignored-${n}="true"])`;if(s||(a=`img:not([aco-visited-${n}="true"]):not(.aco-image):not([aco-ignored-${n}="true"])`),window.labelerSelectString)switch(typeof window.labelerSelectString){case"string":a=window.labelerSelectString;break;case"function":a=window.labelerSelectString()}let l=Array.from(document.querySelectorAll(a));if(l.length){for(const s of e){const e=s.imageSrc.map(e=>Fn.getFileNameFromURL(e.url)),a=new Set(e),d=s.imageSrc.map(e=>e.altText?e.altText.toLowerCase().trim():""),h=s.productId;let f=labeler.page;Ln===s.handle&&(f="main_product");const m=r[f],p=m?.image;if(p&&!window.cachingDisabled){p.filter(e=>e.length&&document.querySelectorAll(e).length).length!=p.length&&c()}for(const r of l){let{className:c,currentSrc:f,parentElement:p,alt:y,classList:g,src:w}=r;if(![r.clientHeight,r.clientWidth].filter(e=>e<100&&0!=e&&!window.considerSmallImages).length)if(!window.cachingDisabled&&m?.image?.length)for(const b of m?.image){let m=b;if(!m)continue;p=u(p,m);r.clientWidth;if(!p)continue;if(c.includes("search")){l=l.filter(e=>e!==r),r.setAttribute("aco-visited","true");continue}if(p?.className.includes("search")){l=l.filter(e=>e!==r),r.setAttribute("aco-visited","true");continue}const S=xn(f),v=Fn.checkImageTag(S,e),k=Fn.checkImageTag(w,e),E=Array.from(a).find(e=>S.includes(e));if("product"===labeler.page&&Ln===s.handle&&window.skipProductMarked&&i[n]&&i[n].includes(h))break;const T=Array.from(g).some(e=>e.toLowerCase().includes("thumbnail"))||Array.from(p?.classList).some(e=>e.toLowerCase().includes("thumbnail")),O=Array.from(g).some(e=>e.toLowerCase().includes("cart"))||Array.from(p?.classList).some(e=>e.toLowerCase().includes("cart"));if(window.identifyImage){if(!window.identifyImage(h,n,s.handle,s.id,S,E,s.imageSrc,r))continue}if(T||O)continue;const N=!!y&&d.includes(y.toLowerCase().trim()),C=!p?.attributes.getNamedItem(`aco-${n.toLowerCase()}-id`);if((v||k||N)&&C){if(r.setAttribute("aco-product-id",h),r.classList.add(`aco-image-${h}`),r.setAttribute(`aco-visited-${n}`,"true"),Fn.addClassToElement({property:"image",element:p},h,n,s.id),"LABEL"===n){const e=document.querySelector(`.aco-title-wrapper-${h}`),i=document.querySelector(`.aco-price-wrapper-${h}`);e&&i&&!window.ignoreTitlePriceCheck||(window.findElementsByContent&&window.findElementsByContent(r,s.handle,s.productTitle,[...t],h,s.id),Dn(r,s.handle,s.productTitle,[...t]).forEach(e=>Fn.addClassToElement(e,h,n,s.id)))}o[h]?.length?o[h].push(E):o[h]=[E],window.imageMarked=JSON.stringify(o),l=l.filter(e=>e!==r)}else if(Rn.includes("/products")&&Ln===s.handle&&p?.classList.contains(`aco-image-wrapper-${h}`)&&"LABEL"===n){const e=document.querySelector(`.aco-title-wrapper-${h}`),i=document.querySelector(`.aco-price-wrapper-${h}`);e&&i&&!window.ignoreTitlePriceCheck||Dn(r,s.handle,s.productTitle,[...t]).forEach(e=>Fn.addClassToElement(e,h,n,s.id))}o[h]?.length&&Array.from(a).every(e=>o[h].includes(e))&&(i[s.id]=i[s.id]?i[s.id].concat(h):[h],window.productMarked=JSON.stringify(i))}else{const u=r.clientWidth;if(!p)continue;if(c.includes("search")){l=l.filter(e=>e!==r),r.setAttribute("aco-visited","true");continue}if(p?.className.includes("search")){l=l.filter(e=>e!==r),r.setAttribute("aco-visited","true");continue}const m=xn(f),b=Fn.checkImageTag(m,e),S=Fn.checkImageTag(w,e),v=Array.from(a).find(e=>m.includes(e));if("product"===labeler.page&&Ln===s.handle&&window.skipProductMarked&&i[n]&&i[n].includes(h))break;const k=Array.from(g).some(e=>e.toLowerCase().includes("thumbnail"))||Array.from(p?.classList).some(e=>e.toLowerCase().includes("thumbnail")),E=Array.from(g).some(e=>e.toLowerCase().includes("cart"))||Array.from(p?.classList).some(e=>e.toLowerCase().includes("cart"));if(window.identifyImage){if(!window.identifyImage(h,n,s.handle,s.id,m,v,s.imageSrc,r))continue}if(window.clientWidth&&uFn.addClassToElement(e,h,n,s.id)))}o[h]?.length?o[h].push(v):o[h]=[v],window.imageMarked=JSON.stringify(o),l=l.filter(e=>e!==r)}else if(Rn.includes("/products")&&Ln===s.handle&&p?.classList.contains(`aco-image-wrapper-${h}`)&&"LABEL"===n){const e=document.querySelector(`.aco-title-wrapper-${h}`),i=document.querySelector(`.aco-price-wrapper-${h}`);e&&i&&!window.ignoreTitlePriceCheck||Dn(r,s.handle,s.productTitle,[...t]).forEach(e=>Fn.addClassToElement(e,h,n,s.id))}o[h]?.length&&Array.from(a).every(e=>o[h].includes(e))&&(i[s.id]=i[s.id]?i[s.id].concat(h):[h],window.productMarked=JSON.stringify(i))}}}e.length>1&&s&&l.forEach(e=>{if(!e.src||!e.currentSrc)return;let t=e.getAttribute(`aco-visited-count-${n}`);t=t||"0",e.setAttribute(`aco-visited-count-${n}`,`${parseInt(t)+1}`),parseInt(t)>=5&&e.setAttribute(`aco-ignored-${n}`,"true")})}};class Mn extends Error{}class _n extends Mn{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Vn extends Mn{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class jn extends Mn{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class qn extends Mn{}class Un extends Mn{constructor(e){super(`Invalid unit ${e}`)}}class Wn extends Mn{}class Bn extends Mn{constructor(){super("Zone is an abstract class")}}const zn="numeric",Zn="short",Hn="long",Jn={year:zn,month:zn,day:zn},Gn={year:zn,month:Zn,day:zn},Yn={year:zn,month:Zn,day:zn,weekday:Zn},Kn={year:zn,month:Hn,day:zn},Xn={year:zn,month:Hn,day:zn,weekday:Hn},Qn={hour:zn,minute:zn},er={hour:zn,minute:zn,second:zn},tr={hour:zn,minute:zn,second:zn,timeZoneName:Zn},nr={hour:zn,minute:zn,second:zn,timeZoneName:Hn},rr={hour:zn,minute:zn,hourCycle:"h23"},sr={hour:zn,minute:zn,second:zn,hourCycle:"h23"},ir={hour:zn,minute:zn,second:zn,hourCycle:"h23",timeZoneName:Zn},or={hour:zn,minute:zn,second:zn,hourCycle:"h23",timeZoneName:Hn},ar={year:zn,month:zn,day:zn,hour:zn,minute:zn},cr={year:zn,month:zn,day:zn,hour:zn,minute:zn,second:zn},lr={year:zn,month:Zn,day:zn,hour:zn,minute:zn},ur={year:zn,month:Zn,day:zn,hour:zn,minute:zn,second:zn},dr={year:zn,month:Zn,day:zn,weekday:Zn,hour:zn,minute:zn},hr={year:zn,month:Hn,day:zn,hour:zn,minute:zn,timeZoneName:Zn},fr={year:zn,month:Hn,day:zn,hour:zn,minute:zn,second:zn,timeZoneName:Zn},mr={year:zn,month:Hn,day:zn,weekday:Hn,hour:zn,minute:zn,timeZoneName:Hn},pr={year:zn,month:Hn,day:zn,weekday:Hn,hour:zn,minute:zn,second:zn,timeZoneName:Hn};class yr{get type(){throw new Bn}get name(){throw new Bn}get ianaName(){return this.name}get isUniversal(){throw new Bn}offsetName(e,t){throw new Bn}formatOffset(e,t){throw new Bn}offset(e){throw new Bn}equals(e){throw new Bn}get isValid(){throw new Bn}}let gr=null;class wr extends yr{static get instance(){return null===gr&&(gr=new wr),gr}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return _s(e,t,n)}formatOffset(e,t){return Us(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const br=new Map;const Sr={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const vr=new Map;class kr extends yr{static create(e){let t=vr.get(e);return void 0===t&&vr.set(e,t=new kr(e)),t}static resetCache(){vr.clear(),br.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=kr.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return _s(e,t,n,this.name)}formatOffset(e,t){return Us(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=br.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),br.set(e,t)),t}(this.name);let[r,s,i,o,a,c,l]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e=0?d:1e3+d,(Ls({year:r,month:s,day:i,hour:24===a?0:a,minute:c,second:l,millisecond:0})-u)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let Er={};const Tr=new Map;function Or(e,t={}){const n=JSON.stringify([e,t]);let r=Tr.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),Tr.set(n,r)),r}const Nr=new Map;const Cr=new Map;let Ar=null;const Ir=new Map;function Pr(e){let t=Ir.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Ir.set(e,t)),t}const Dr=new Map;function xr(e,t,n,r){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):r(t)}class Rr{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:s,...i}=n;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let r=Nr.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),Nr.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Ns(this.floor?Math.floor(e):Ps(e,3),this.padTo)}}class Lr{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&kr.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=Or(t,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Fr{constructor(e,t,n){this.opts={style:"long",...n},!t&&Ss()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,s=JSON.stringify([e,r]);let i=Cr.get(s);return void 0===i&&(i=new Intl.RelativeTimeFormat(e,t),Cr.set(s,i)),i}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${s[e][0]}`;case-1:return n?"yesterday":`last ${s[e][0]}`;case 0:return n?"today":`this ${s[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),c=1===a,l=s[e],u=r?c?l[1]:l[2]||l[1]:c?s[e][0]:e;return o?`${a} ${u} ago`:`in ${a} ${u}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const $r={firstDay:1,minimalDays:4,weekend:[6,7]};class Mr{static fromOpts(e){return Mr.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,s=!1){const i=e||ts.defaultLocale,o=i||(s?"en-US":Ar||(Ar=(new Intl.DateTimeFormat).resolvedOptions().locale,Ar)),a=t||ts.defaultNumberingSystem,c=n||ts.defaultOutputCalendar,l=Ts(r)||ts.defaultWeekSettings;return new Mr(o,a,c,l,i)}static resetCache(){Ar=null,Tr.clear(),Nr.clear(),Cr.clear(),Ir.clear(),Dr.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return Mr.create(e,t,n,r)}constructor(e,t,n,r,s){const[i,o,a]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,r;try{t=Or(e).resolvedOptions(),r=e}catch(s){const i=e.substring(0,n);t=Or(i).resolvedOptions(),r=i}const{numberingSystem:s,calendar:i}=t;return[r,s,i]}}(e);this.locale=i,this.numberingSystem=t||o||null,this.outputCalendar=n||a||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===Pr(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Mr.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ts(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return xr(this,e,Hs,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";if(!this.monthsCache[s][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[s][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=Qo.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[s][e]})}weekdays(e,t=!1){return xr(this,e,Ks,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=Qo.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return xr(this,void 0,()=>Xs,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Qo.utc(2016,11,13,9),Qo.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return xr(this,e,ni,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Qo.utc(-40,1,1),Qo.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Rr(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Lr(e,this.intl,t)}relFormatter(e={}){return new Fr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=Er[n];return r||(r=new Intl.ListFormat(e,t),Er[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Pr(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:vs()?function(e){let t=Dr.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...$r,...t}),Dr.set(e,t)}return t}(this.locale):$r}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let _r=null;class Vr extends yr{static get utcInstance(){return null===_r&&(_r=new Vr(0)),_r}static instance(e){return 0===e?Vr.utcInstance:new Vr(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Vr(Vs(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Us(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Us(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Us(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class jr extends yr{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function qr(e,t){if(gs(e)||null===e)return t;if(e instanceof yr)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?wr.instance:"utc"===n||"gmt"===n?Vr.utcInstance:Vr.parseSpecifier(n)||kr.create(e)}return ws(e)?Vr.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new jr(e)}const Ur={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Wr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Br=Ur.hanidec.replace(/[\[|\]]/g,"").split("");const zr=new Map;function Zr({numberingSystem:e},t=""){const n=e||"latn";let r=zr.get(n);void 0===r&&(r=new Map,zr.set(n,r));let s=r.get(t);return void 0===s&&(s=new RegExp(`${Ur[n]}${t}`),r.set(t,s)),s}let Hr,Jr=()=>Date.now(),Gr="system",Yr=null,Kr=null,Xr=null,Qr=60,es=null;class ts{static get now(){return Jr}static set now(e){Jr=e}static set defaultZone(e){Gr=e}static get defaultZone(){return qr(Gr,wr.instance)}static get defaultLocale(){return Yr}static set defaultLocale(e){Yr=e}static get defaultNumberingSystem(){return Kr}static set defaultNumberingSystem(e){Kr=e}static get defaultOutputCalendar(){return Xr}static set defaultOutputCalendar(e){Xr=e}static get defaultWeekSettings(){return es}static set defaultWeekSettings(e){es=Ts(e)}static get twoDigitCutoffYear(){return Qr}static set twoDigitCutoffYear(e){Qr=e%100}static get throwOnInvalid(){return Hr}static set throwOnInvalid(e){Hr=e}static resetCaches(){Mr.resetCache(),kr.resetCache(),Qo.resetCache(),zr.clear()}}class ns{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const rs=[0,31,59,90,120,151,181,212,243,273,304,334],ss=[0,31,60,91,121,152,182,213,244,274,305,335];function is(e,t){return new ns("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function os(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return 0===s?7:s}function as(e,t,n){return n+(Ds(e)?ss:rs)[t-1]}function cs(e,t){const n=Ds(e)?ss:rs,r=n.findIndex(e=>e$s(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:a,...Ws(e)}}function ds(e,t=4,n=1){const{weekYear:r,weekNumber:s,weekday:i}=e,o=ls(os(r,1,t),n),a=xs(r);let c,l=7*s+i-o-7+t;l<1?(c=r-1,l+=xs(c)):l>a?(c=r+1,l-=xs(r)):c=r;const{month:u,day:d}=cs(c,l);return{year:c,month:u,day:d,...Ws(e)}}function hs(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:as(t,n,r),...Ws(e)}}function fs(e){const{year:t,ordinal:n}=e,{month:r,day:s}=cs(t,n);return{year:t,month:r,day:s,...Ws(e)}}function ms(e,t){if(!gs(e.localWeekday)||!gs(e.localWeekNumber)||!gs(e.localWeekYear)){if(!gs(e.weekday)||!gs(e.weekNumber)||!gs(e.weekYear))throw new qn("Cannot mix locale-based week fields with ISO-based week fields");return gs(e.localWeekday)||(e.weekday=e.localWeekday),gs(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),gs(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function ps(e){const t=bs(e.year),n=Os(e.month,1,12),r=Os(e.day,1,Rs(e.year,e.month));return t?n?!r&&is("day",e.day):is("month",e.month):is("year",e.year)}function ys(e){const{hour:t,minute:n,second:r,millisecond:s}=e,i=Os(t,0,23)||24===t&&0===n&&0===r&&0===s,o=Os(n,0,59),a=Os(r,0,59),c=Os(s,0,999);return i?o?a?!c&&is("millisecond",s):is("second",r):is("minute",n):is("hour",t)}function gs(e){return void 0===e}function ws(e){return"number"==typeof e}function bs(e){return"number"==typeof e&&e%1==0}function Ss(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function vs(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function ks(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const s=[t(r),r];return e&&n(e[0],s[0])===e[0]?e:s},null)[1]}function Es(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ts(e){if(null==e)return null;if("object"!=typeof e)throw new Wn("Week settings must be an object");if(!Os(e.firstDay,1,7)||!Os(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Os(e,1,7)))throw new Wn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Os(e,t,n){return bs(e)&&e>=t&&e<=n}function Ns(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Cs(e){return gs(e)||null===e||""===e?void 0:parseInt(e,10)}function As(e){return gs(e)||null===e||""===e?void 0:parseFloat(e)}function Is(e){if(!gs(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ps(e,t,n="round"){const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Ds(e){return e%4==0&&(e%100!=0||e%400==0)}function xs(e){return Ds(e)?366:365}function Rs(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?Ds(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ls(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Fs(e,t,n){return-ls(os(e,1,t),n)+t-1}function $s(e,t=4,n=1){const r=Fs(e,t,n),s=Fs(e+1,t,n);return(xs(e)-r+s)/7}function Ms(e){return e>99?e:e>ts.twoDigitCutoffYear?1900+e:2e3+e}function _s(e,t,n,r=null){const s=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const o={timeZoneName:t,...i},a=new Intl.DateTimeFormat(n,o).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return a?a.value:null}function Vs(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function js(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new Wn(`Invalid unit value ${e}`);return t}function qs(e,t){const n={};for(const r in e)if(Es(e,r)){const s=e[r];if(null==s)continue;n[t(r)]=js(s)}return n}function Us(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Ns(n,2)}:${Ns(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${Ns(n,2)}${Ns(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Ws(e){return function(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}(e,["hour","minute","second","millisecond"])}const Bs=["January","February","March","April","May","June","July","August","September","October","November","December"],zs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Zs=["J","F","M","A","M","J","J","A","S","O","N","D"];function Hs(e){switch(e){case"narrow":return[...Zs];case"short":return[...zs];case"long":return[...Bs];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Js=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Gs=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ys=["M","T","W","T","F","S","S"];function Ks(e){switch(e){case"narrow":return[...Ys];case"short":return[...Gs];case"long":return[...Js];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Xs=["AM","PM"],Qs=["Before Christ","Anno Domini"],ei=["BC","AD"],ti=["B","A"];function ni(e){switch(e){case"narrow":return[...ti];case"short":return[...ei];case"long":return[...Qs];default:return null}}function ri(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const si={D:Jn,DD:Gn,DDD:Kn,DDDD:Xn,t:Qn,tt:er,ttt:tr,tttt:nr,T:rr,TT:sr,TTT:ir,TTTT:or,f:ar,ff:lr,fff:hr,ffff:mr,F:cr,FF:ur,FFF:fr,FFFF:pr};class ii{static create(e,t={}){return new ii(e,t)}static parseFormat(e){let t=null,n="",r=!1;const s=[];for(let i=0;i0||r)&&s.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||o===t?n+=o:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return si[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return Ns(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",o=()=>n?function(e){return Xs[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(t,r)=>n?function(e,t){return Hs(t)[e.month-1]}(e,t):s(r?{month:t}:{month:t,day:"numeric"},"month"),c=(t,r)=>n?function(e,t){return Ks(t)[e.weekday-1]}(e,t):s(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const n=ii.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},u=t=>n?function(e,t){return ni(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return ri(ii.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return r?s({day:"numeric"},"day"):this.num(e.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(e.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(e.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=ii.parseFormat(t),i=s.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),o=e.shiftTo(...i.map(r).filter(e=>e));return ri(s,((e,t)=>s=>{const i=r(s);if(i){const r=t.isNegativeDuration&&i!==t.largestUnit?n:1;let o;return o="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*r,s.length,o)}return s})(o,{isNegativeDuration:o<0,largestUnit:Object.keys(o.values)[0]}))}}const oi=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ai(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function ci(...e){return t=>e.reduce(([e,n,r],s)=>{const[i,o,a]=s(t,r);return[{...e,...i},o||n,a]},[{},null,1]).slice(0,2)}function li(e,...t){if(null==e)return[null,null];for(const[n,r]of t){const t=n.exec(e);if(t)return r(t)}return[null,null]}function ui(...e){return(t,n)=>{const r={};let s;for(s=0;svoid 0!==e&&(t||e&&u)?-e:e;return[{years:h(As(n)),months:h(As(r)),weeks:h(As(s)),days:h(As(i)),hours:h(As(o)),minutes:h(As(a)),seconds:h(As(c),"-0"===c),milliseconds:h(Is(l),d)}]}const Ni={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ci(e,t,n,r,s,i,o){const a={year:2===t.length?Ms(Cs(t)):Cs(t),month:zs.indexOf(n)+1,day:Cs(r),hour:Cs(s),minute:Cs(i)};return o&&(a.second=Cs(o)),e&&(a.weekday=e.length>3?Js.indexOf(e)+1:Gs.indexOf(e)+1),a}const Ai=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ii(e){const[,t,n,r,s,i,o,a,c,l,u,d]=e,h=Ci(t,s,r,n,i,o,a);let f;return f=c?Ni[c]:l?0:Vs(u,d),[h,new Vr(f)]}const Pi=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Di=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,xi=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ri(e){const[,t,n,r,s,i,o,a]=e;return[Ci(t,s,r,n,i,o,a),Vr.utcInstance]}function Li(e){const[,t,n,r,s,i,o,a]=e;return[Ci(t,a,n,r,s,i,o),Vr.utcInstance]}const Fi=ai(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,mi),$i=ai(/(\d{4})-?W(\d\d)(?:-?(\d))?/,mi),Mi=ai(/(\d{4})-?(\d{3})/,mi),_i=ai(fi),Vi=ci(function(e,t){return[{year:bi(e,t),month:bi(e,t+1,1),day:bi(e,t+2,1)},null,t+3]},Si,vi,ki),ji=ci(pi,Si,vi,ki),qi=ci(yi,Si,vi,ki),Ui=ci(Si,vi,ki);const Wi=ci(Si);const Bi=ai(/(\d{4})-(\d\d)-(\d\d)/,wi),zi=ai(gi),Zi=ci(Si,vi,ki);const Hi="Invalid Duration",Ji={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Gi={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...Ji},Yi=365.2425,Ki=30.436875,Xi={years:{quarters:4,months:12,weeks:52.1775,days:Yi,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Ki,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...Ji},Qi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],eo=Qi.slice(0).reverse();function to(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new io(r)}function no(e,t){let n=t.milliseconds??0;for(const r of eo.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function ro(e,t){const n=no(e,t)<0?-1:1;Qi.reduceRight((r,s)=>{if(gs(t[s]))return r;if(r){const i=t[r]*n,o=e[s][r],a=Math.floor(i/o);t[s]+=a*n,t[r]-=a*o*n}return s},null),Qi.reduce((n,r)=>{if(gs(t[r]))return n;if(n){const s=t[n]%1;t[n]-=s,t[r]+=s*e[n][r]}return r},null)}function so(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class io{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?Xi:Gi;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Mr.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return io.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new Wn("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new io({values:qs(e,io.normalizeUnit),loc:Mr.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(ws(e))return io.fromMillis(e);if(io.isDuration(e))return e;if("object"==typeof e)return io.fromObject(e);throw new Wn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return li(e,[Ti,Oi])}(e);return n?io.fromObject(n,t):io.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return li(e,[Ei,Wi])}(e);return n?io.fromObject(n,t):io.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Wn("need to specify a reason the Duration is invalid");const n=e instanceof ns?e:new ns(e,t);if(ts.throwOnInvalid)throw new jn(n);return new io({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new Un(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?ii.create(this.loc,n).formatDurationFromString(this,e):Hi}toHuman(e={}){if(!this.isValid)return Hi;const t=!1!==e.showZeros,n=Qi.map(n=>{const r=this.values[n];return gs(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ps(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return Qo.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?no(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=io.fromDurationLike(e),n={};for(const e of Qi)(Es(t.values,e)||Es(this.values,e))&&(n[e]=t.get(e)+this.get(e));return to(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=io.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=js(e(this.values[n],n));return to(this,{values:t},!0)}get(e){return this[io.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return to(this,{values:{...this.values,...qs(e,io.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return to(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return ro(this.matrix,e),to(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return to(this,{values:so(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>io.normalizeUnit(e));const t={},n={},r=this.toObject();let s;for(const i of Qi)if(e.indexOf(i)>=0){s=i;let e=0;for(const t in n)e+=this.matrix[t][i]*n[t],n[t]=0;ws(r[i])&&(e+=r[i]);const o=Math.trunc(e);t[i]=o,n[i]=(1e3*e-1e3*o)/1e3}else ws(r[i])&&(n[i]=r[i]);for(const e in n)0!==n[e]&&(t[s]+=e===s?n[e]:n[e]/this.matrix[s][e]);return ro(this.matrix,t),to(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return to(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return to(this,{values:so(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of Qi)if(!t(this.values[n],e.values[n]))return!1;return!0}}const oo="Invalid Interval";class ao{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new Wn("need to specify a reason the Interval is invalid");const n=e instanceof ns?e:new ns(e,t);if(ts.throwOnInvalid)throw new Vn(n);return new ao({invalid:n})}static fromDateTimes(e,t){const n=ea(e),r=ea(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?ao.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ea).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,s=0;for(;r+this.e?this.e:e;n.push(ao.fromDateTimes(r,i)),r=i,s+=1}return n}splitBy(e){const t=io.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,s=1;const i=[];for(;re*s));n=+e>+this.e?this.e:e,i.push(ao.fromDateTimes(r,n)),r=n,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e=n?null:ao.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return ao.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],s=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...s).sort((e,t)=>e.time-t.time);for(const e of i)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(ao.fromDateTimes(t,e.time)),t=null);return ao.merge(r)}difference(...e){return ao.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:oo}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Jn,t={}){return this.isValid?ii.create(this.s.loc.clone(t),e).formatInterval(this):oo}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:oo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:oo}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:oo}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:oo}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):io.invalid(this.invalidReason)}mapEndpoints(e){return ao.fromDateTimes(e(this.s),e(this.e))}}class co{static hasDST(e=ts.defaultZone){const t=Qo.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return kr.isValidZone(e)}static normalizeZone(e){return qr(e,ts.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Mr.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Mr.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Mr.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||Mr.create(t,n,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}={}){return(r||Mr.create(t,n,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||Mr.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||Mr.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Mr.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Mr.create(t,null,"gregory").eras(e)}static features(){return{relative:Ss(),localeWeek:vs()}}}function lo(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(io.fromMillis(r).as("days"))}function uo(e,t,n,r){let[s,i,o,a]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=lo(e,t);return(n-n%7)/7}],["days",lo]],s={},i=e;let o,a;for(const[c,l]of r)n.indexOf(c)>=0&&(o=c,s[c]=l(e,t),a=i.plus(s),a>t?(s[c]--,(e=i.plus(s))>t&&(a=e,s[c]--,e=i.plus(s))):e=a);return[e,s,a,o]}(e,t,n);const c=t-s,l=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===l.length&&(o0?io.fromMillis(c,r).shiftTo(...l).plus(u):u}function ho(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=s&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const fo=`[ ${String.fromCharCode(160)}]`,mo=new RegExp(fo,"g");function po(e){return e.replace(/\./g,"\\.?").replace(mo,fo)}function yo(e){return e.replace(/\./g,"").replace(mo," ").toLowerCase()}function go(e,t){return null===e?null:{regex:RegExp(e.map(po).join("|")),deser:([n])=>e.findIndex(e=>yo(n)===yo(e))+t}}function wo(e,t){return{regex:e,deser:([,e,t])=>Vs(e,t),groups:t}}function bo(e){return{regex:e,deser:([e])=>e}}const So={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let vo=null;function ko(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Oo(ii.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class Eo{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=ko(ii.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=Zr(t),r=Zr(t,"{2}"),s=Zr(t,"{3}"),i=Zr(t,"{4}"),o=Zr(t,"{6}"),a=Zr(t,"{1,2}"),c=Zr(t,"{1,3}"),l=Zr(t,"{1,6}"),u=Zr(t,"{1,9}"),d=Zr(t,"{2,4}"),h=Zr(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},m=(m=>{if(e.literal)return f(m);switch(m.val){case"G":return go(t.eras("short"),0);case"GG":return go(t.eras("long"),0);case"y":return ho(l);case"yy":case"kk":return ho(d,Ms);case"yyyy":case"kkkk":return ho(i);case"yyyyy":return ho(h);case"yyyyyy":return ho(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return ho(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return ho(r);case"MMM":return go(t.months("short",!0),1);case"MMMM":return go(t.months("long",!0),1);case"LLL":return go(t.months("short",!1),1);case"LLLL":return go(t.months("long",!1),1);case"o":case"S":return ho(c);case"ooo":case"SSS":return ho(s);case"u":return bo(u);case"uu":return bo(a);case"uuu":case"E":case"c":return ho(n);case"a":return go(t.meridiems(),0);case"EEE":return go(t.weekdays("short",!1),1);case"EEEE":return go(t.weekdays("long",!1),1);case"ccc":return go(t.weekdays("short",!0),1);case"cccc":return go(t.weekdays("long",!0),1);case"Z":case"ZZ":return wo(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return wo(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return bo(/[a-z_+-/]{1,256}?/i);case" ":return bo(/[^\S\n\r]/);default:return f(m)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=e,m}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const s in n)if(Es(n,s)){const i=n[s],o=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(r.slice(t,t+o))),t+=o}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,s,i]=n?function(e){let t,n=null;gs(e.z)||(n=kr.create(e.z)),gs(e.Z)||(n||(n=new Vr(e.Z)),t=e.Z),gs(e.q)||(e.M=3*(e.q-1)+1),gs(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),gs(e.u)||(e.S=Is(e.u));const r=Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{});return[r,n,t]}(n):[null,null,void 0];if(Es(n,"a")&&Es(n,"H"))throw new qn("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:s,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function To(e,t,n){return new Eo(e,n).explainFromTokens(t)}function Oo(e,t){if(!e)return null;const n=ii.create(t,e).dtFormatter((vo||(vo=Qo.fromMillis(1555555555555)),vo)),r=n.formatToParts(),s=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:s}=e;if("literal"===r){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const i=t[r];let o=r;"hour"===r&&(o=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let a=So[o];if("object"==typeof a&&(a=a[i]),a)return{literal:!1,val:a}}(t,e,s))}const No="Invalid DateTime",Co=864e13;function Ao(e){return new ns("unsupported zone",`the zone "${e.name}" is not supported`)}function Io(e){return null===e.weekData&&(e.weekData=us(e.c)),e.weekData}function Po(e){return null===e.localWeekData&&(e.localWeekData=us(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Do(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Qo({...n,...t,old:n})}function xo(e,t,n){let r=e-60*t*1e3;const s=n.offset(r);if(t===s)return[r,t];r-=60*(s-t)*1e3;const i=n.offset(r);return s===i?[r,s]:[e-60*Math.min(s,i)*1e3,Math.max(s,i)]}function Ro(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Lo(e,t,n){return xo(Ls(e),t,n)}function Fo(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:r,month:s,day:Math.min(e.c.day,Rs(r,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=io.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=Ls(i);let[c,l]=xo(a,n,e.zone);return 0!==o&&(c+=o,l=e.zone.offset(c)),{ts:c,o:l}}function $o(e,t,n,r,s,i){const{setZone:o,zone:a}=n;if(e&&0!==Object.keys(e).length||t){const r=t||a,s=Qo.fromObject(e,{...n,zone:r,specificOffset:i});return o?s:s.setZone(a)}return Qo.invalid(new ns("unparsable",`the input "${s}" can't be parsed as ${r}`))}function Mo(e,t,n=!0){return e.isValid?ii.create(Mr.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function _o(e,t,n){const r=e.c.year>9999||e.c.year<0;let s="";if(r&&e.c.year>=0&&(s+="+"),s+=Ns(e.c.year,r?6:4),"year"===n)return s;if(t){if(s+="-",s+=Ns(e.c.month),"month"===n)return s;s+="-"}else if(s+=Ns(e.c.month),"month"===n)return s;return s+=Ns(e.c.day),s}function Vo(e,t,n,r,s,i,o){let a=!n||0!==e.c.millisecond||0!==e.c.second,c="";switch(o){case"day":case"month":case"year":break;default:if(c+=Ns(e.c.hour),"hour"===o)break;if(t){if(c+=":",c+=Ns(e.c.minute),"minute"===o)break;a&&(c+=":",c+=Ns(e.c.second))}else{if(c+=Ns(e.c.minute),"minute"===o)break;a&&(c+=Ns(e.c.second))}if("second"===o)break;!a||r&&0===e.c.millisecond||(c+=".",c+=Ns(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&0===e.offset&&!i?c+="Z":e.o<0?(c+="-",c+=Ns(Math.trunc(-e.o/60)),c+=":",c+=Ns(Math.trunc(-e.o%60))):(c+="+",c+=Ns(Math.trunc(e.o/60)),c+=":",c+=Ns(Math.trunc(e.o%60)))),i&&(c+="["+e.zone.ianaName+"]"),c}const jo={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},qo={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Uo={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Wo=["year","month","day","hour","minute","second","millisecond"],Bo=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],zo=["year","ordinal","hour","minute","second","millisecond"];function Zo(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Un(e);return t}function Ho(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Zo(e)}}function Jo(e,t){const n=qr(t.zone,ts.defaultZone);if(!n.isValid)return Qo.invalid(Ao(n));const r=Mr.fromObject(t);let s,i;if(gs(e.year))s=ts.now();else{for(const t of Wo)gs(e[t])&&(e[t]=jo[t]);const t=ps(e)||ys(e);if(t)return Qo.invalid(t);const r=function(e){if(void 0===Ko&&(Ko=ts.now()),"iana"!==e.type)return e.offset(Ko);const t=e.name;let n=Xo.get(t);return void 0===n&&(n=e.offset(Ko),Xo.set(t,n)),n}(n);[s,i]=Lo(e,r,n)}return new Qo({ts:s,zone:n,loc:r,o:i})}function Go(e,t,n){const r=!!gs(n.round)||n.round,s=gs(n.rounding)?"trunc":n.rounding,i=(e,i)=>{e=Ps(e,r||n.calendary?0:2,n.calendary?"round":s);return t.loc.clone(n).relFormatter(n).format(e,i)},o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return i(o(n.unit),n.unit);for(const e of n.units){const t=o(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,n.units[n.units.length-1])}function Yo(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let Ko;const Xo=new Map;class Qo{constructor(e){const t=e.zone||ts.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new ns("invalid input"):null)||(t.isValid?null:Ao(t));this.ts=gs(e.ts)?ts.now():e.ts;let r=null,s=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,s]=[e.old.c,e.old.o];else{const i=ws(e.o)&&!e.old?e.o:t.offset(this.ts);r=Ro(this.ts,i),n=Number.isNaN(r.year)?new ns("invalid input"):null,r=n?null:r,s=n?null:i}}this._zone=t,this.loc=e.loc||Mr.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new Qo({})}static local(){const[e,t]=Yo(arguments),[n,r,s,i,o,a,c]=t;return Jo({year:n,month:r,day:s,hour:i,minute:o,second:a,millisecond:c},e)}static utc(){const[e,t]=Yo(arguments),[n,r,s,i,o,a,c]=t;return e.zone=Vr.utcInstance,Jo({year:n,month:r,day:s,hour:i,minute:o,second:a,millisecond:c},e)}static fromJSDate(e,t={}){const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return Qo.invalid("invalid input");const s=qr(t.zone,ts.defaultZone);return s.isValid?new Qo({ts:n,zone:s,loc:Mr.fromObject(t)}):Qo.invalid(Ao(s))}static fromMillis(e,t={}){if(ws(e))return e<-Co||e>Co?Qo.invalid("Timestamp out of range"):new Qo({ts:e,zone:qr(t.zone,ts.defaultZone),loc:Mr.fromObject(t)});throw new Wn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ws(e))return new Qo({ts:1e3*e,zone:qr(t.zone,ts.defaultZone),loc:Mr.fromObject(t)});throw new Wn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=qr(t.zone,ts.defaultZone);if(!n.isValid)return Qo.invalid(Ao(n));const r=Mr.fromObject(t),s=qs(e,Ho),{minDaysInFirstWeek:i,startOfWeek:o}=ms(s,r),a=ts.now(),c=gs(t.specificOffset)?n.offset(a):t.specificOffset,l=!gs(s.ordinal),u=!gs(s.year),d=!gs(s.month)||!gs(s.day),h=u||d,f=s.weekYear||s.weekNumber;if((h||l)&&f)throw new qn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&l)throw new qn("Can't mix ordinal dates with month/day");const m=f||s.weekday&&!h;let p,y,g=Ro(a,c);m?(p=Bo,y=qo,g=us(g,i,o)):l?(p=zo,y=Uo,g=hs(g)):(p=Wo,y=jo);let w=!1;for(const e of p){gs(s[e])?s[e]=w?y[e]:g[e]:w=!0}const b=m?function(e,t=4,n=1){const r=bs(e.weekYear),s=Os(e.weekNumber,1,$s(e.weekYear,t,n)),i=Os(e.weekday,1,7);return r?s?!i&&is("weekday",e.weekday):is("week",e.weekNumber):is("weekYear",e.weekYear)}(s,i,o):l?function(e){const t=bs(e.year),n=Os(e.ordinal,1,xs(e.year));return t?!n&&is("ordinal",e.ordinal):is("year",e.year)}(s):ps(s),S=b||ys(s);if(S)return Qo.invalid(S);const v=m?ds(s,i,o):l?fs(s):s,[k,E]=Lo(v,c,n),T=new Qo({ts:k,zone:n,o:E,loc:r});return s.weekday&&h&&e.weekday!==T.weekday?Qo.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${T.toISO()}`):T.isValid?T:Qo.invalid(T.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return li(e,[Fi,Vi],[$i,ji],[Mi,qi],[_i,Ui])}(e);return $o(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return li(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Ai,Ii])}(e);return $o(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return li(e,[Pi,Ri],[Di,Ri],[xi,Li])}(e);return $o(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(gs(e)||gs(t))throw new Wn("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=n,i=Mr.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[o,a,c,l]=function(e,t,n){const{result:r,zone:s,specificOffset:i,invalidReason:o}=To(e,t,n);return[r,s,i,o]}(i,e,t);return l?Qo.invalid(l):$o(o,a,n,`format ${t}`,e,c)}static fromString(e,t,n={}){return Qo.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return li(e,[Bi,Vi],[zi,Zi])}(e);return $o(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Wn("need to specify a reason the DateTime is invalid");const n=e instanceof ns?e:new ns(e,t);if(ts.throwOnInvalid)throw new _n(n);return new Qo({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Oo(e,Mr.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return ko(ii.parseFormat(e),Mr.fromObject(t)).map(e=>e.val).join("")}static resetCache(){Ko=void 0,Xo.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Io(this).weekYear:NaN}get weekNumber(){return this.isValid?Io(this).weekNumber:NaN}get weekday(){return this.isValid?Io(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Po(this).weekday:NaN}get localWeekNumber(){return this.isValid?Po(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Po(this).weekYear:NaN}get ordinal(){return this.isValid?hs(this.c).ordinal:NaN}get monthShort(){return this.isValid?co.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?co.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?co.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?co.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Ls(this.c),r=this.zone.offset(n-e),s=this.zone.offset(n+e),i=this.zone.offset(n-r*t),o=this.zone.offset(n-s*t);if(i===o)return[this];const a=n-i*t,c=n-o*t,l=Ro(a,i),u=Ro(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[Do(this,{ts:a}),Do(this,{ts:c})]:[this]}get isInLeapYear(){return Ds(this.year)}get daysInMonth(){return Rs(this.year,this.month)}get daysInYear(){return this.isValid?xs(this.year):NaN}get weeksInWeekYear(){return this.isValid?$s(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?$s(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=ii.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(Vr.instance(e),t)}toLocal(){return this.setZone(ts.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=qr(e,ts.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Lo(n,t,e)}return Do(this,{ts:r,zone:e})}return Qo.invalid(Ao(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return Do(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=qs(e,Ho),{minDaysInFirstWeek:n,startOfWeek:r}=ms(t,this.loc),s=!gs(t.weekYear)||!gs(t.weekNumber)||!gs(t.weekday),i=!gs(t.ordinal),o=!gs(t.year),a=!gs(t.month)||!gs(t.day),c=o||a,l=t.weekYear||t.weekNumber;if((c||i)&&l)throw new qn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&i)throw new qn("Can't mix ordinal dates with month/day");let u;s?u=ds({...us(this.c,n,r),...t},n,r):gs(t.ordinal)?(u={...this.toObject(),...t},gs(t.day)&&(u.day=Math.min(Rs(u.year,u.month),u.day))):u=fs({...hs(this.c),...t});const[d,h]=Lo(u,this.o,this.zone);return Do(this,{ts:d,o:h})}plus(e){if(!this.isValid)return this;return Do(this,Fo(this,io.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Do(this,Fo(this,io.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=io.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t=3&&(a+="T"),a+=Vo(this,o,t,n,r,s,i),a}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?_o(this,"extended"===e,Zo(t)):null}toISOWeekDate(){return Mo(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:s=!1,format:i="extended",precision:o="milliseconds"}={}){if(!this.isValid)return null;return o=Zo(o),(r&&Wo.indexOf(o)>=3?"T":"")+Vo(this,"extended"===i,t,e,n,s,o)}toRFC2822(){return Mo(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Mo(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?_o(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),Mo(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():No}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return io.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(a=t,Array.isArray(a)?a:[a]).map(io.normalizeUnit),i=e.valueOf()>this.valueOf(),o=uo(i?this:e,i?e:this,s,r);var a;return i?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(Qo.now(),e,t)}until(e){return this.isValid?ao.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,n)<=r&&r<=s.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Qo.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf(),Math.min)}static max(...e){if(!e.every(Qo.isDateTime))throw new Wn("max requires all arguments be DateTimes");return ks(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:s=null}=n;return To(Mr.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return Qo.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,s=Mr.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new Eo(s,e)}static fromFormatParser(e,t,n={}){if(gs(e)||gs(t))throw new Wn("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=n,i=Mr.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!i.equals(t.locale))throw new Wn(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:o,zone:a,specificOffset:c,invalidReason:l}=t.explainFromTokens(e);return l?Qo.invalid(l):$o(o,a,n,`format ${t.format}`,e,c)}static get DATE_SHORT(){return Jn}static get DATE_MED(){return Gn}static get DATE_MED_WITH_WEEKDAY(){return Yn}static get DATE_FULL(){return Kn}static get DATE_HUGE(){return Xn}static get TIME_SIMPLE(){return Qn}static get TIME_WITH_SECONDS(){return er}static get TIME_WITH_SHORT_OFFSET(){return tr}static get TIME_WITH_LONG_OFFSET(){return nr}static get TIME_24_SIMPLE(){return rr}static get TIME_24_WITH_SECONDS(){return sr}static get TIME_24_WITH_SHORT_OFFSET(){return ir}static get TIME_24_WITH_LONG_OFFSET(){return or}static get DATETIME_SHORT(){return ar}static get DATETIME_SHORT_WITH_SECONDS(){return cr}static get DATETIME_MED(){return lr}static get DATETIME_MED_WITH_SECONDS(){return ur}static get DATETIME_MED_WITH_WEEKDAY(){return dr}static get DATETIME_FULL(){return hr}static get DATETIME_FULL_WITH_SECONDS(){return fr}static get DATETIME_HUGE(){return mr}static get DATETIME_HUGE_WITH_SECONDS(){return pr}}function ea(e){if(Qo.isDateTime(e))return e;if(e&&e.valueOf&&ws(e.valueOf()))return Qo.fromJSDate(e);if(e&&"object"==typeof e)return Qo.fromObject(e);throw new Wn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const ta=e=>{const t=e.split(" ").pop();if(!t)throw new Error("Invalid timezone string format");return t},na=(e,t=!1)=>{const n={status:!1,timeRemaining:0,respawn:!1,respawnTime:0};if(!e.status)return n;const{timezone:r,startDate:s,endDate:i,startTime:o,endTime:a,weekdays:c}=e,l=Qo.utc().toISO();t&&console.log("current Utc Time",l);const u=((e,t)=>{const n=ta(t);return{startDateTime:Qo.fromISO(`${e.startDate.split("T")[0]}T${e.startTime}`,{zone:n}),endDateTime:Qo.fromISO(`${e.endDate.split("T")[0]}T${e.endTime}`,{zone:n})}})({startDate:s,startTime:o,endDate:i,endTime:a},r),d=((e,t)=>{const n=ta(t);return Qo.fromISO(e,{zone:"utc"}).setZone(n)})(l,r);if(t&&console.log("startDate",u.startDateTime.toISO(),"EndDate",u.endDateTime.toISO(),"currentDate",d.toISO()),!((h=d)>=(f=u).startDateTime&&h<=f.endDateTime))return n;var h,f;const m=d.toFormat("EEEE").toLowerCase(),p=d.plus({days:1}).toFormat("EEEE").toLowerCase(),y=c[m];if(!y.status||!((e,t)=>{const[n,r]=t.start.split(":").map(Number),[s,i]=t.end.split(":").map(Number);return(e.hour>n||e.hour===n&&e.minute>=r)&&(e.hourna(e,!0);const ra=na,sa=decodeURIComponent(window.location.pathname.split("/").pop()),ia=(e,t)=>{let n=t,r="afterend";if("product"===labeler.page&&e.handle===sa&&(n=t,r="beforeend"),t.attributes.getNamedItem("aco-badge-id")?.value!==e.badgeId||t.parentElement.querySelector(".aco-badge-wrapper"))return void e.element.remove();const s=e.element.cloneNode(!0),i=Array.from(s.childNodes).map(e=>e.id),o=e.scheduledStickers.filter(e=>i.includes(e.badgeId));for(const e of o){const t=Array.from(s.childNodes).find(t=>t.id===e.badgeId),n=ra(e.schedule);n.status||t.remove(),setTimeout(()=>{n.respawn?(t.style.display="none",setTimeout(()=>{t.style.display="block"},n.respawnTime)):t.remove()},n.timeRemaining)}s.querySelectorAll(".aco-box").forEach(e=>{if("auto"===e.style.height){let t=e.querySelector("img"),r=e.querySelector("svg");if(t){const r=()=>{let r=0;if(e.style.width.includes("%")){let t=parseInt(e.style.width);r=n.clientWidth*(t/100)}else r=parseInt(e.style.width);let s=r/(t.naturalWidth/t.naturalHeight)/n.clientHeight*100;e.style.height=s?`${s}%`:e.style.width};t.complete?r():t.addEventListener("load",r)}else if(r){let t=0;if(e.style.width.includes("%")){let r=parseInt(e.style.width);t=n.clientWidth*(r/100)}else t=parseInt(e.style.width);let s=parseFloat(r.getAttribute("width")??"0"),i=parseFloat(r.getAttribute("height")??"0");if(s&&i){let r=t/(s/i)/n.clientHeight*100;e.style.height=`${r}%`}else{let s=r.getAttribute("viewBox");if(s){let r=s.split(" "),i=t/(parseFloat(r[2])/parseFloat(r[3]))/n.clientHeight*100;e.style.height=`${i}%`}else e.style.height=e.style.width}}}n.insertAdjacentElement(r,e)}),s.style.width="0px",s.style.height="0px",n.setAttribute("aco-badge-inserted","true"),n.insertAdjacentElement(r,s.cloneNode())},oa=e=>{for(const t of e){if(!t)continue;let e=document.querySelectorAll(`.aco-image-wrapper-${t.productId}:not([aco-badge-inserted=true])`);if(window.badgeElementPlacingLocation&&(e=window.badgeElementPlacingLocation(e,t.productId,t.badgeId,t.handle,t.element)),e.length)for(const n of Array.from(e))ia(t,n);else t.element.remove()}},aa=window.aco_debug,ca=window.maxAllowedNodeKeys||2,la={title:new Map,price:new Map},ua=window.firstProductsToVerify||3,da=decodeURIComponent(window.location.pathname.split("/").pop()),ha=async(e,t,n,i,o,c)=>{if("belowProductImage"==e.position&&o==da)return;const l=a(t),u=e.position.includes("Price")?"price_wrapper":"title_wrapper";let d=`${labeler.page}_${u}`;o==Ht(window.location.href)&&(d=`main_product_${u}`);const h=u.startsWith("title")?"title":"price",f=la[h].get(l);la[h].set(l,{property:h,count:f?f.count+1:1});let m=function(e){if(!la[e])return[];const t=Array.from(la[e].entries()).reduce((e,t)=>(t[1].count>e.maxCount?(e.maxCount=t[1].count,e.entries=[t]):t[1].count===e.maxCount&&e.entries.push(t),e),{maxCount:0,entries:[]});return t.entries}(h);const{findMaxKeyCountEntries:p}=window;p&&(m=p(la,h));const y=o==Ht(window.location.href)?"main_product":labeler.page;m.length>1&&"main_product"==y&&(m=m.pop()),m=m.flat(10);const g=r[y];if(g?.[h]?.length>=ca||g?.[h]?.includes(l))return;const w=o==da?0:ua,b=document.querySelectorAll(`[aco-label-id="${i.labelId}"]`).length,{saveLabelPosition:S}=window;if(S&&S(d,m),m?.length&&m[1].count>=w||m[1].count>=b){aa&&console.log(`[${y.toUpperCase()}] : saving label position for ${d} with maxEntry`,m);const e=m.filter(e=>!e?.property);s(y,h,e),window.CacheHandler.postMessage({type:"SAVE_STICKER_POSITION",key:d,value:e})}};const fa=e=>{const t={belowProductName:"aco-title-wrapper",belowProductPrice:"aco-price-wrapper",belowProductImage:"aco-title-wrapper"};e.forEach(e=>{e&&e.element.forEach(n=>{const r="product"===labeler.page,s=e.handle===da;let i=t[n.position],o="afterend";"belowProductImage"===n.position&&(r&&s?i="aco-image-wrapper":o="beforebegin");const a={belowProductImage:"bi",belowProductName:"bt",belowProductPrice:"bp"}[n.position];let c=document.querySelectorAll(`.${i}-${e.productId}:not([aco-label-${a}-inserted=true])`);window.labelElementPlacingLocation&&(c=window.labelElementPlacingLocation(c,e.productId,e.labelId,e.handle,`.${i}-${e.productId}`,n.position,n.element)),c.length&&c.forEach(t=>{const c=t.querySelector("img");if(!(c&&c.clientHeight>1e3)&&t.attributes.getNamedItem("aco-label-id")?.value===e.labelId&&(!t.parentElement?.querySelector(".aco-label-wrapper")||"aco-label-wrapper"!==t.previousElementSibling?.className&&"belowProductImage"===n.position&&(!r||r&&!s))){const r=n.element.cloneNode(!0),s=Array.from(r.childNodes).map(e=>Array.from(e.childNodes).map(e=>e.id)).flat(),c=e.scheduledStickers.filter(e=>s.includes(e.labelId));for(const e of c){const t=Array.from(r.childNodes).map(e=>Array.from(e.childNodes).map(e=>e)).flat().find(t=>t.id===e.labelId);if(!t)continue;const n=ra(e.schedule);n.status||t.remove(),setTimeout(()=>{n.respawn?(t.style.display="none",setTimeout(()=>{t.style.display="block"},n.respawnTime)):t.remove()},n.timeRemaining)}if(t.setAttribute(`aco-label-${a}-inserted`,"true"),t.insertAdjacentElement(o,r),window.cachingDisabled)return;ha(n,t,i,e,e.handle,e.productId)}})})})},ma=e=>{const t=document.querySelector('form[action="/cart/add"]'),n="product"===labeler.page;if(t&&"true"!==t?.attributes.getNamedItem("aco-trust-badge")?.value){for(const r of e)n&&r.visibleInProductPage&&t.insertAdjacentElement("beforeend",r.element);t.setAttribute("aco-trust-badge","true")}},pa=new Set,ya=e=>{for(const t of e)if(pa.has(t.announcementId))t.element.remove();else{if(t.scheduledSticker.isScheduled){const e=ra(t.scheduledSticker.schedule);if(!e.status){t.element.remove();continue}setTimeout(()=>{e.respawn?(t.element.style.display="none",setTimeout(()=>{t.element.style.display="block"},e.respawnTime)):t.element.remove()},e.timeRemaining)}if(pa.add(t.announcementId),t.isBar){if("top"===t.position){document.body.insertAdjacentElement("afterbegin",t.element);continue}document.body.insertAdjacentElement("beforeend",t.element)}else document.body.insertAdjacentElement("afterbegin",t.element)}};let ga={badgeData:[],labelData:[],priceData:new Set,badgeCombinedData:[],labelCombinedData:[]};const wa=new Set,ba=async(e,t,n=!1)=>{let s,i,o,c,l,u,d;if(window.enableScrollledProductCaching&&"product"!==labeler.page&&(t=new Set(Array.from(t).filter((e,t)=>{if(!wa.has(`${e.handle}_${t}`))return wa.add(`${e.handle}_${t}`),!0}))),s=(await cn(e.badges,t)).filter(Boolean),ga.badgeData=s,n&&console.log("badge-data",s),i=(await fn(e.labels,t)).filter(Boolean),ga.labelData=i,n&&console.log("label-data",i),o=i.reduce((e,t)=>t?new Set([...e,...t.priceList]):e,new Set),ga.priceData=o,n&&console.log("price-data",o),c=s.map(e=>({id:e.badgeId,productId:e.productId,imageSrc:e.imageSrc,handle:e.handle,productTitle:e.productTitle,scheduledStickers:e.scheduledStickers})),ga.badgeCombinedData=c,n&&console.log("combined-badge-data",c),l=i.map(e=>({id:e.labelId,productId:e.productId,imageSrc:e.imageSrc,handle:e.handle,productTitle:e.productTitle,scheduledStickers:e.scheduledStickers})),ga.labelCombinedData=l,n&&console.log("combined-label-data",l),0!==s.length&&($n(c,o,"BADGE",!1),oa(s)),0!==i.length&&($n(l,o,"LABEL",!1),fa(i)),u=await pn(e.trustBadges),n&&console.log("trustbadge-data",u),d=await Sn(e.announcements),n&&console.log("announcement-data",d),0!==u.length&&ma(u),0!==d.length&&ya(d),!window.cachingDisabled){let e="main_product";const t={},n=async()=>{const n=document.querySelectorAll("[aco-badge-id]");for(const s of n){const n=a(s),i=s.getAttribute("aco-product-id")||"",o=Ht(window.location.href),c=labeler.products.find(e=>e.id===i);if(e=c&&c.handle===o?"main_product":labeler.page,r[e]?.image?.length)return;t[e]||(t[e]=new Map);const l=t[e],u=l.get(n)?.count??0;l.set(n,{count:u+1});const d=Array.from(l.entries()).reduce((e,t)=>(t[1].count>e.maxCount?(e.maxCount=t[1].count,e.entries=[t]):t[1].count===e.maxCount&&e.entries.push(t),e),{maxCount:0,entries:[]}).entries.flat(10).filter(e=>!e?.count);CacheHandler.postMessage({type:"SAVE_BADGE_POSITION",value:d,key:`${e}_badge_wrapper`})}};n()}if(n)return{badgeData:s,labelData:i,trustBadgeData:u,announcementData:d,priceData:o,badgeCombinedData:c,labelCombinedData:l}},Sa=async(e,t,n)=>{if(aco_allProducts){let t=aco_allProducts.get(e);if(t)return t}if(window.cachingDisabled){const r={query:`#graphql\n query ProductPricing @inContext(country: ${window.Shopify.country}){\n product(handle: "${e}") { \n id\n title\n descriptionHtml\n vendor\n availableForSale\n totalInventory\n createdAt\n handle\n productType\n publishedAt\n tags\n featuredImage {\n url\n }\n variants(first: 250) {\n edges {\n node {\n id\n availableForSale\n title\n quantityAvailable\n price {\n amount\n currencyCode\n }\n image {\n altText\n url\n id\n }\n compareAtPrice {\n amount,\n currencyCode\n }\n }\n }\n }\n images(first: 250) {\n edges {\n node {\n id\n url\n altText\n }\n }\n }\n collections(first: 250) {\n edges {\n node {\n id\n handle\n title\n }\n }\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n }\n }\n `},s=(await Rt.post(`https://${n}/api/2023-07/graphql.json`,r,{headers:{"X-Shopify-Storefront-Access-Token":t,"Content-Type":"application/json"}})).data.data.product;if(!s)return;return{...s,id:s.id.replace("gid://shopify/Product/",""),collections:s.collections.edges.map(e=>e.node),images:s.images.edges.map(e=>e.node),variants:s.variants.edges.map(e=>e.node),first_variant:{id:s.variants.edges[0].node.id}}}return window.CacheHandler.postMessage({key:e,type:"FETCH_PRODUCT",value:null,data:{shopifyDomain:n,storefrontApi:t}}),null},va=e=>[...e.badges,...e.labels,...e.announcements].some(e=>!(!e.rules||!e.rules.selected)&&e.rules.selected.includes("countryRestriction")),ka=async()=>{const e=await Rt.get("/cdn-cgi/trace"),t=e.data.split("\n").reduce((e,t)=>{const[n,r]=t.split("=");return""!==n&&r?(e[n]=r,e):e},{});return sessionStorage.setItem("ipCountry",JSON.stringify({country:t.loc,ip:t.ip})),labeler.ipCountry={country:t.loc,ip:t.ip},e.data},{aco_debug:Ea}=window,Ta=[],Oa=(e,t,n)=>{Ta.push({type:e,fn:t,id:n})};if(!window.cachingDisabled){const e=new Blob(['try {\n let cache;\n let isCacheOpened = false;\n let cacheName = "labeler-cache";\n \n const openCache = async () => {\n const openedCache = await caches.open(cacheName);\n if (!openedCache) throw new Error("Unable to open cache");\n cache = openedCache;\n isCacheOpened = true;\n };\n \n const localResults = {};\n \n openCache();\n \n const pendingTasks = [];\n \n const waitForLoadingCache = async () => {\n return new Promise((resolve) => {\n const myInterval = setInterval(() => {\n if (isCacheOpened) {\n resolve(null);\n return clearInterval(myInterval);\n }\n return openCache();\n }, 500);\n });\n };\n \n const appendToPendingAndExec = (fn, data) => {\n pendingTasks.push({ fn, data });\n const { type } = data;\n while (pendingTasks.length) {\n const { fn, data } = pendingTasks.shift();\n fn(data);\n }\n };\n \n const getCorrespondingFun = (type) => {\n if (type) {\n switch (type) {\n case "FETCH_PRODUCT":\n return getCacheProduct;\n case "SAVE_STICKER_POSITION":\n return cacheStickerPosition;\n case "SAVE_BADGE_POSITION":\n return cacheStickerPosition; \n case "GET_STICKER_POSITION":\n return getStickerPosition;\n case "GET_BADGE_POSITION":\n return getBadgePosition;\n case "FLUSH_DATA":\n return flushData;\n case "CLEAR_CACHES":\n return clearCaches;\n default:\n throw new Error(`No handle found for ${type || key}`);\n }\n }\n };\n \n const generateLocationKey = (key) =>\n `${self.location.origin}/labeler/${key}`;\n \n self.onmessage = async (event) => {\n let { key, data, type, value, isUpdate } = event.data;\n \n if (!isCacheOpened) await waitForLoadingCache();\n \n appendToPendingAndExec(getCorrespondingFun(type), event.data);\n };\n \n const clearCaches = () => {\n caches.has(cacheName).then((hasCache) => {\n if (hasCache)\n caches.delete(cacheName).then((isDeleted) => {\n if (!isDeleted) {\n console.error("[WORKER : Err while deleting cache ");\n }\n });\n });\n };\n \n const flushData = ({ key }) => {\n cache.match(generateLocationKey(key)).then((cachedResponse) => {\n if (cachedResponse) cache.delete(cacheUrl);\n });\n };\n \n const getStickerPosition = async ({ key }) => {\n const cachedResponse = await cache.match(generateLocationKey(key));\n if (cachedResponse) {\n const cachedData = await cachedResponse.json();\n self.postMessage({\n key,\n value: cachedData.value,\n type: "GET_STICKER_POSITION",\n });\n } else {\n self.postMessage({ key, value: null, type: "GET_STICKER_POSITION" });\n }\n };\n \n const getBadgePosition = async (key) => {\n const cachedResponse = await cache.match(generateLocationKey(key));\n if (cachedResponse) {\n const cachedData = await cachedResponse.json();\n self.postMessage({\n key,\n value: cachedData.value,\n type: "GET_BADGE_POSITION",\n });\n } else {\n self.postMessage({ key, value: null, type: "GET_BADGE_POSITION" });\n }\n };\n \n \n const cacheStickerPosition = async ({ key, value }) => {\n const cachedResponse = await cache.match(generateLocationKey(key));\n localResults[key] = Array.from(new Set([...(localResults[key] || []), ...value]));\n if (cachedResponse) {\n const res = await cachedResponse.json();\n return await cache\n .put(\n generateLocationKey(key),\n new Response(\n JSON.stringify({\n key,\n value: Array.from(new Set(localResults[key]?.concat(value))),\n })\n )\n )\n }\n return await cache\n .put(\n generateLocationKey(key),\n new Response(\n JSON.stringify({ key, value: localResults[key]?.flat(100) })\n )\n )\n };\n \n const getCacheProduct = async ({ key, data, type }) => {\n const cachedResponse = await cache.match(generateLocationKey(key));\n if (cachedResponse) {\n const cachedData = await cachedResponse.json();\n self.postMessage({ key, value: cachedData, type });\n const fetchedData = await fetchProduct({ data, key });\n cache.put(\n generateLocationKey(key),\n new Response(JSON.stringify(fetchedData))\n );\n } else {\n const fetchedData = await fetchProduct({ data, key });\n cache.put(\n generateLocationKey(key),\n new Response(JSON.stringify(fetchedData))\n );\n self.postMessage({ key, value: fetchedData, type });\n }\n };\n \n const fetchProduct = ({ data, key }) => {\n const { shopifyDomain, storefrontApi } = data;\n return new Promise(async (resolve, reject) => {\n const data = {\n query: `#graphql\n query ProductPricing @inContext(country: IN) {\n product(handle: "${key}") {\n id\n title\n descriptionHtml\n vendor\n availableForSale\n totalInventory\n createdAt\n handle\n productType\n publishedAt\n tags\n featuredImage {\n url\n }\n variants(first: 250) {\n edges {\n node {\n id\n availableForSale\n title\n quantityAvailable\n price {\n amount\n currencyCode\n }\n image {\n altText\n url\n id\n }\n compareAtPrice {\n amount\n currencyCode\n }\n }\n }\n }\n images(first: 250) {\n edges {\n node {\n id\n url\n altText\n }\n }\n }\n collections(first: 250) {\n edges {\n node {\n id\n handle\n title\n }\n }\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n }\n }\n `,\n };\n const response = await fetch(\n `https://${shopifyDomain}/api/2022-07/graphql.json`,\n {\n method: "POST",\n headers: {\n "X-Shopify-Storefront-Access-Token": storefrontApi,\n "Content-Type": "application/json",\n },\n body: JSON.stringify(data),\n }\n );\n if (response.ok) {\n resolve(response.json().then((res) => res?.data?.product));\n } else {\n reject();\n }\n });\n };\n } catch (error) {\n console.log("error occurred", error);\n }\n '],{type:"application/javascript"}),t=URL.createObjectURL(e);window.CacheHandler=new Worker(t),h(!0),window.CacheHandler.onmessage=e=>{const{key:t,value:n,type:r}=e.data,{cacheManager:s}=window;if(s&&s({taskQueue:Ta,key:t,value:n}),r?.length){const e=Ta.find(e=>{const n=e.type==r;return e.id&&t?n&&e.id==t:n});if(Ea&&console.log(`[CacheHandler] : executing task ${r}`,n),!e)throw new Error(`Invalid entry for the task ${r}`);return e.fn(t,n)}}}const Na=new Set;let Ca={},Aa=!1,Ia=new Set,Pa=[],Da=!1;function xa(e){Pa.push(e),Ra()}async function Ra(){if(!Da&&0!==Pa.length){Da=!0;try{const e=Pa.shift();e&&await e.fn()}catch(e){console.error("Task failed",e)}Da=!1,Ra()}}const La=async(e,t,n)=>{let r=new Set;for(const s of e)if(Na.has(s)){if(Pa.find(e=>"RERENDER"===e.type))return;xa({type:"RERENDER",fn:async()=>await ba(Ca,Ia)})}else{window.cachingDisabled||Oa("FETCH_PRODUCT",(t,n)=>{let i=n;if(Na.add(s),!i)return;let o={...i,id:i.id.replace("gid://shopify/Product/",""),collections:i.collections.edges.map(e=>e.node),images:i.images.edges.map(e=>e.node),variants:i.variants.edges.map(e=>e.node),first_variant:{id:i.variants.edges[0].node.id}};return Fa(o,r,e)},s);let i=await Sa(s,t,n);i&&Fa(i,r,e)}},Fa=async(e,t=new Set,n)=>{e&&(Ia.add(e),t.add(e),labeler.products=Array.from(Ia),sessionStorage.setItem("products",JSON.stringify(Array.from(Ia)))),t.size===n.length&&xa({type:"INITIAL_RENDER",fn:async()=>await ba(Ca,t)})};let $a=!1;async function Ma(e){const t=window.Shopify.shop;if(await new Promise(e=>{const t=setInterval(()=>{Aa||(clearInterval(t),e(null))},100)}),Ca=labelerCdnData||Ca,!Ca&&!labelerCdnData){Aa=!0;const e=localStorage.getItem("labelerCdnTimestamp"),n=localStorage.getItem("labelerCdnData"),r=await Rt.get(`https://cdn.labeler.apps.acowebs.com/V3/${t}/timestamp.unix?v=${Date.now()}`);if(e&&n&&r.data===parseFloat(e))Ca=JSON.parse(n),Aa=!1;else{const e=await Rt.get(`https://cdn.labeler.apps.acowebs.com/V3/${t}/${t}.json?v=${Date.now()}`);Ca=e.data,localStorage.setItem("labelerCdnTimestamp",r.data),localStorage.setItem("labelerCdnData",JSON.stringify(Ca)),Aa=!1}}if(Ca=Ca||labelerCdnData,!Ca.status)return;if(va(Ca)){sessionStorage.getItem("ipCountry")||(await ka(),await new Promise(e=>{const t=setInterval(()=>{sessionStorage.getItem("ipCountry")&&(clearInterval(t),e(null))},100)}))}$a||($a=!0,xa({type:"RERENDER",fn:async()=>await ba(Ca,Ia)}));const n=document.querySelectorAll('a:not([aco-visited="true"])')||[];if("VARIANT_CHANGE"!==e){if(0===n.length){if(Pa.find(e=>"RERENDER"===e.type))return;return xa({type:"RERENDER",fn:async()=>await ba(Ca,Ia)}),{labelerData:Ca,products:Ia}}{let e=new Set;if("product"===labeler.page){const t=Ht(decodeURIComponent(window.location.pathname));t&&e.add(t)}for(const t of Array.from(n)){t.setAttribute("aco-visited","true");const n=Ht(t.getAttribute("href")??"");n&&e.add(n)}if(window.identifyHandle){let{identifyHandle:t}=window;e="function"==typeof(r=t)&&"AsyncFunction"==r.constructor.name?await t(e):t(e)}for(let n=0;n"RERENDER"===e.type))return;xa({type:"RERENDER",fn:async()=>await ba(Ca,Ia)})}var r;return{labelerData:Ca,products:Ia}}labeler.forceRender=async(e,t)=>!e&&t?await ba(Ca,t,!0):e&&!t?await ba(e,Ia,!0):e||t?e&&t?await ba(e,t,!0):void 0:await ba(Ca,Ia,!0);var _a=n(181),Va=n.n(_a);const ja=e=>/^(aco-title-wrapper|aco-price-wrapper)-[a-zA-Z0-9]+$/.test(e),qa=["aco-label-wrapper","aco-badge-wrapper","aco-image-wrapper","aco-box","aco-price-wrapper","aco-title-wrapper","aco-announcement-wrapper","aco-trust-badge-wrapper"],Ua=e=>e.filter(e=>{const t=(e=>{if("childList"!==e.type)return!0;const t=Array.from(e.addedNodes).some(e=>{const t=e.querySelector("img"),n=qa.some(t=>e.className.includes(t));return t&&!n}),n=Array.from(e.removedNodes).some(e=>e.querySelector("[aco-sticker-id]")||e.className.includes("aco-"));return t||n})(e),n=(e=>{if("attributes"!==e.type)return;const t=(()=>{if("class"===e.attributeName)return!e.target.className.includes("aco-")})(),n=(()=>{if("class"==e.attributeName)return;const t=e.attributeName?.startsWith("aco-");return!t})();return t||n})(e);return t||n});let Wa=0;const Ba=e=>{function t(e,n){let r=Array.from(e.querySelectorAll(n));return Array.from(e.querySelectorAll("*")).forEach(e=>{e.shadowRoot&&(r=r.concat(t(e.shadowRoot,n)))}),r}function n(r){if(r instanceof HTMLElement){if(["aco-image-wrapper","aco-label-wrapper","aco-badge-wrapper","aco-title-wrapper","aco-price-wrapper"].includes(r.className)||ja(r.className)||e("ADDED_NODE"),r.shadowRoot){t(r.shadowRoot,"*").forEach(n)}}else e()}let r=!1,s=!1,i=!1;const o=window.attribute_mutation_interval||500,a=window.child_mutation_interval||0,c=window.mutation_count_limit||0,l=Va()(t=>{const l=document.documentElement.scrollHeight;if(document.querySelectorAll(".aco-announcement-wrapper").forEach(e=>{`${l}px`===e?.style?.height||e.querySelector(".aco-announcement-bar")||(e.style.height=`${l}px`)}),i)return;i=!0;const u=window.filterMutation,{mutationFilters:d}=window;let h=[];h=d?d(t):u?Ua(t):t;try{h.forEach(t=>{if(window.mutationHandler){if(!window.mutationHandler(t))return}"attributes"===t.type&&(Wa++,r||(Wa=0,r=!0,window.attributMutation&&window.attributMutation(),e("ATTRIBUTE_CHANGE"),setTimeout(()=>{r=!1},o))),"childList"===t.type&&t.addedNodes.length>0&&(s||(s=!0,window.childMutation&&window.childMutation(),t.addedNodes.forEach(n),setTimeout(()=>{s=!1},a)))})}finally{setTimeout(()=>{i=!1},c)}},200);return new MutationObserver(l)},za=(e,t="aco-")=>{const n=e.attributes;Array.from(n).forEach(n=>{n.name.startsWith(t)&&e.removeAttribute(n.name)})};n(351);window.skipLt&&(()=>{let e="cGVyZm9ybWFuY2U=";return window[atob("bmF2aWdhdG9y")][atob("dXNlckFnZW50")]?.indexOf(atob("Q2hyb21lLUxpZ2h0aG91c2U="))>=0||window[atob("X19saWdodGhvdXNl")]||window[atob(e)]&&window[atob(e)].getEntriesByType(atob("cmVzb3VyY2U=")).some(e=>e.name.includes(atob("bGlnaHRob3VzZQ==")))})()&&t("Labeler status is set to false"),"requestIdleCallback"in window?requestIdleCallback(()=>{const e=document.createElement("link");e.rel="preconnect",e.href="https://fonts.bunny.net",e.crossOrigin="anonymous",document.head.appendChild(e);const t=document.createElement("link");t.rel="stylesheet",t.href="https://fonts.bunny.net/css?family=Inter:wght@100&family=Poppins&display=swap",document.head.appendChild(t)}):setTimeout(()=>{const e=document.createElement("link");e.rel="preconnect",e.href="https://fonts.bunny.net",e.crossOrigin="anonymous",document.head.appendChild(e);const t=document.createElement("link");t.rel="stylesheet",t.href="https://fonts.bunny.net/css?family=Inter:wght@100&family=Poppins&display=swap",document.head.appendChild(t)},200),labelerCdnData.status||t("Labeler status is set to false");const{aco_debug:Za}=window;let Ha,Ja=new Set,Ga=[],Ya=!1;window.cachingDisabled?Za&&console.log("%c[WARNING] : Labeler caching is turned off","color:yellow"):(Oa("GET_STICKER_POSITION",(e,t)=>{let n=labeler.page;e.includes("main_product")&&(n="main_product"),Za&&console.log(`[TASK] : setting ${t} for key ${e} , PAGE : ${n}`);const r=e.includes("title")?"title":e.includes("price")?"price":"image";s(n,r,t)}),Oa("GET_BADGE_POSITION",(e,t)=>{let n=labeler.page;e.includes("main_product")&&(n="main_product"),Za&&console.log(`[TASK] : setting ${t} for key ${e} , PAGE : ${n}`),s(n,"image",t)}),(()=>{let e=labeler.page;const t=window.CacheHandler;["main_product_title_wrapper","{currentPage}_price_wrapper","{currentPage}_title_wrapper","{currentPage}_badge_wrapper","main_product_badge_wrapper","main_product_price_wrapper"].forEach(n=>{const r=n.replace("{currentPage}",e);t.postMessage({type:"GET_STICKER_POSITION",key:r})})})());const Ka=async()=>{if(Ga.length>0&&!Ya){Ya=!0;const e=Ga.shift();e&&await Va()(e,200)(),Ya=!1,Ka()}},Xa=(e="default")=>{Ga.push(async()=>{let t=await Ma(e);if(!t)return;const{labelerData:n,products:r}=t;Ha=n,Ja=r}),Ka()};Xa();const Qa=Ba(Xa);let ec=window.mutationParams||{childList:!0};window.bodyObserverElement?Array.from(document.querySelectorAll(window.bodyObserverElement)).forEach(e=>{Qa.observe(e,ec)}):window.disableObserver||Qa.observe(document.body,{childList:!0,subtree:!0,attributes:!0}),labeler.observer=Qa,labeler.clearCaches=c,labeler.initializeRendering=(e="default")=>{Xa(e)};const tc=history.pushState.bind(history),nc=history.replaceState.bind(history);history.pushState=function(e,t,n){tc(e,t,n),window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange"))},history.replaceState=function(e,t,n){nc(e,t,n),window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange"))},window.addEventListener("popstate",()=>{window.dispatchEvent(new Event("locationchange"))}),window.addEventListener("locationchange",function(){const{pathname:e}=window.location,t=Ht(e),n=`gid://shopify/ProductVariant/${new URLSearchParams(window.location.search).get("variant")}`,r=t&&Ja.size&&Array.from(Ja).find(e=>e.handle===t)?.id;if(!r)return;const s=labelerCdnData.labels.filter(e=>e.rules.selected.includes("specificVariants")&&e.isActivated&&e.rules?.specificVariants?.some(e=>e.id===`gid://shopify/Product/${r}`)).concat(labelerCdnData.badges.filter(e=>e.rules.selected.includes("specificVariants")&&e.rules?.specificVariants.some(e=>e.id===`gid://shopify/Product/${r}`))).map(e=>e.rules.specificVariants.find(e=>e.id===`gid://shopify/Product/${r}`)),i=s&&s[0]?.variants.find(e=>e.id==n)?.length;if(!s.length||i)return;labeler.cachedBadgeData.delete(t),labeler.cachedLabelData.delete(t),labeler.cachedBadgeLessProducts.delete(t),labeler.cachedLabelLessProducts.delete(t);const o=JSON.parse(window.productMarked||"{}");o&&(o.BADGE=o.BADGE?.filter(e=>e!==r)||[],o.LABEL=o.LABEL?.filter(e=>e!==r)||[],window.productMarked=JSON.stringify(o));const a=JSON.parse(window.imageMarked||"{}");delete a[r],window.imageMarked=JSON.stringify(a);const c=document.querySelectorAll(`.aco-price-wrapper-${r}`),l=document.querySelectorAll(`.aco-image-wrapper-${r}`),u=document.querySelectorAll(`.aco-title-wrapper-${r}`);document.querySelectorAll(`.aco-image-${r}`).forEach(e=>{e.classList.remove(`aco-image-${r}`),za(e)}),l.forEach(e=>{za(e),e.querySelector(".aco-badge-wrapper")?.remove(),e.parentElement?.querySelectorAll(".aco-box").forEach(e=>{e.remove()}),e.nextElementSibling?.className.includes("aco-label-wrapper")&&e.nextElementSibling.remove()}),c.forEach(e=>{za(e,"aco-label-bp");const t=e.nextElementSibling;t?.className.includes("aco-label-wrapper")&&t.remove()}),u.forEach(e=>{za(e,"aco-label-bt");const t=e.nextElementSibling;t?.className.includes("aco-label-wrapper")&&t.remove()}),Va()(Xa,400)("VARIANT_CHANGE")}),labeler.remove=async()=>{document.querySelectorAll(".aco-badge-wrapper").forEach(e=>e.remove());document.querySelectorAll(".aco-label-wrapper").forEach(e=>e.remove());document.querySelectorAll(".aco-announcement-wrapper").forEach(e=>e.remove());document.querySelectorAll(".aco-trust-badge-wrapper").forEach(e=>e.remove());for(const e of labeler.products){const t=document.querySelectorAll(`[aco-product-id="${e.id}"]`),n=JSON.parse(window.productMarked||"{}");n&&(n.BADGE=n.BADGE?.filter(t=>t!==e.id)||[],n.LABEL=n.LABEL?.filter(t=>t!==e.id)||[]),t.forEach(e=>{za(e),e.classList.remove("aco-image-wrapper")})}},labeler.findItem=e=>{let t="handle";e.includes("ProductVariant")?t="productVariant":e.includes("Product")?t="product":e.includes("Collection")&&(t="collection");let n={type:t,shop:window.Shopify.shop,gid:e,token:labelerCdnData.storeFrontApi};const r=`https://${n.shop}/api/2024-01/graphql.json`;if("productVariant"!=n.type){const t={query:(()=>"product"==n.type?"query getproductById($id: ID!) {\n product(id: $id) {\n id\n title\n handle\n onlineStoreUrl\n collections(first: 1) {\n edges {\n node {\n id\n title\n handle\n updatedAt\n }\n }\n }\n }\n }":"handle"!=n.type?`query get${n.type}ById($id: ID!) {\n ${n.type}(id: $id) {\n id\n title\n handle\n onlineStoreUrl\n }\n }`:` {\n productByHandle(handle: "${e}") {\n id\n title\n descriptionHtml\n vendor\n availableForSale\n totalInventory\n createdAt\n handle\n productType\n publishedAt\n tags\n featuredImage {\n url\n }\n variants(first: 250) {\n edges {\n node {\n id\n availableForSale\n title\n quantityAvailable\n price {\n amount\n currencyCode\n }\n image {\n altText\n url\n id\n }\n compareAtPrice {\n amount\n currencyCode\n }\n }\n }\n }\n images(first: 250) {\n edges {\n node {\n id\n url\n altText\n }\n }\n }\n collections(first: 250) {\n edges {\n node {\n id\n handle\n title\n }\n }\n }\n priceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n compareAtPriceRange {\n maxVariantPrice {\n amount\n currencyCode\n }\n minVariantPrice {\n amount\n currencyCode\n }\n }\n }\n }`)(),variables:{id:n.gid}},s={method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":n.token},body:JSON.stringify(t)};return fetch(r,s).then(e=>e.json()).then(e=>e).catch(e=>e)}labeler.products.forEach(e=>{const t=e.variants?.filter(e=>e.id===n.gid);if(t&&t.length>0){const{handle:t,id:n,tags:r,collections:s}=e,i={handle:t,id:n,tags:r,collections:s};console.log(i)}})}})()})();