(()=>{var e={895(e,t,n){var r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||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 g(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=s.test(e);return n||a.test(e)?i(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r,o,s,a,i,l,c=0,u=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var n=r,s=o;return r=o=void 0,c=t,a=e.apply(s,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=s}function S(){var e=m();if(b(e))return v(e);i=setTimeout(S,function(e){var n=t-(e-l);return d?f(n,s-(e-c)):n}(e))}function v(e){return i=void 0,y&&r?w(e):(r=o=void 0,a)}function k(){var e=m(),n=b(e);if(r=arguments,o=this,l=e,n){if(void 0===i)return function(e){return c=e,i=setTimeout(S,t),u?w(e):a}(l);if(d)return i=setTimeout(S,t),w(l)}return void 0===i&&(i=setTimeout(S,t)),a}return t=g(t)||0,p(n)&&(u=!!n.leading,s=(d="maxWait"in n)?h(g(n.maxWait)||0,t):s,y="trailing"in n?!!n.trailing:y),k.cancel=function(){void 0!==i&&clearTimeout(i),c=0,r=l=o=i=void 0},k.flush=function(){return void 0===i?a:v(m())},k}},995(){"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]})}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;rObject.prototype.hasOwnProperty.call(e,t),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.dn=e=>{var t=Object.getOwnPropertyDescriptor(e,"name");(!t||!t.writable&&t.configurable)&&Object.defineProperty(e,"name",{value:"default",configurable:!0})},n.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports},(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>Be,hasStandardBrowserEnv:()=>ze,hasStandardBrowserWebWorkerEnv:()=>He,navigator:()=>We,origin:()=>Ze});var t={};n.r(t),n.d(t,{activateAllItems:()=>va,getActiveItems:()=>Sa,removeAcoAttributes:()=>ba,syncAnimationPhase:()=>ya,syncStickerAnimations:()=>wa});const r=n.cjs(function(e,t){t.R=void 0,t.R="2026-04"}).R;function o(e){return`https://${e}/api/${r}/graphql.json`}window.cachingDisabled=void 0===window.cachingDisabled||window.cachingDisabled;const s=e=>{throw new Error(e)};let a={};const i=(e,t,n)=>{const r={...a,[e]:{...a[e],[t]:Array.from(new Set(n))}};return a=r,localStorage.setItem("nodePositions",JSON.stringify(r)),labeler.nodePositions=r,r},l=localStorage.getItem("nodePositions");l&&(a=JSON.parse(l)),labeler.setNodePositions=i;const{customWorkerCode:c}=window,u=c||`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, country }) => {\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, country });\n cache.put(\n generateLocationKey(key),\n new Response(JSON.stringify(fetchedData))\n );\n } else {\n const fetchedData = await fetchProduct({ data, key, country });\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, country }) => {\n const { shopifyDomain, storefrontApi } = data;\n const rawCountry =\n typeof country === "string" ? country.toUpperCase() : "US";\n const validatedCountry = /^[A-Z]{2}$/.test(rawCountry) ? rawCountry : "";\n const inContextDirective = validatedCountry\n ? \`@inContext(country: \${validatedCountry})\`\n : "";\n return new Promise(async (resolve, reject) => {\n const data = {\n query: \`#graphql\n query ProductPricing \${inContextDirective} {\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/${r}/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 `,d=new Map,h=(e,t="",n=0)=>{if(!e)return t.toLowerCase().trim();if(d.has(e))return d.get(e);let r=e.tagName;const o=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&&o.length){r=`${r}:nth-child(${o.indexOf(e)+1})`}if(e.className.includes("aco-title")||e.className.includes("aco-price"))return h(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?(d.set(e,r.toLowerCase().trim()),r.toLowerCase().trim()):h(e.parentElement,r,n+1)},f=()=>(window.CacheHandler.postMessage({type:"CLEAR_CACHES"}),localStorage.removeItem("nodePositions"),a={},"Labeler cache cleared ✅"),m=new Map,p=(e,t="a",n=0)=>{if(m.has(t)){const n=m.get(t);if(n===e)return n}if(n>=20||!e)return null;const r=e.querySelector(t);return r?(m.set(t,r),r):e.parentElement?p(e.parentElement,t,n+1):null},g=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}},y=e=>{const t=localStorage.getItem("CachingfailedCount")||0;e&&t>=3?window.cachingDisabled=!0:e||localStorage.setItem("CachingfailedCount",(parseInt(t)+1).toString())};function w(e,t){return function(){return e.apply(t,arguments)}}labeler.findNearestElementWithSelector=p;const{toString:b}=Object.prototype,{getPrototypeOf:S}=Object,{iterator:v,toStringTag:k}=Symbol,E=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),T=(e,t)=>{let n=e;const r=[];for(;null!=n&&n!==Object.prototype;){if(-1!==r.indexOf(n))return!1;if(r.push(n),E(n,t))return!0;n=S(n)}return!1},O=(A=Object.create(null),e=>{const t=b.call(e);return A[t]||(A[t]=t.slice(8,-1).toLowerCase())});var A;const C=e=>(e=e.toLowerCase(),t=>O(t)===e),N=e=>t=>typeof t===e,{isArray:P}=Array,R=N("undefined");function I(e){return null!==e&&!R(e)&&null!==e.constructor&&!R(e.constructor)&&$(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const x=C("ArrayBuffer");const D=N("string"),$=N("function"),L=N("number"),M=e=>null!==e&&"object"==typeof e,_=e=>{if(!M(e))return!1;const t=S(e);return!(null!==t&&t!==Object.prototype&&null!==S(t)||T(e,k)||T(e,v))},F=C("Date"),j=C("File"),q=C("Blob"),U=C("FileList");const V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},B=void 0!==V.FormData?V.FormData:void 0,W=C("URLSearchParams"),[z,H,Z,J]=["ReadableStream","Request","Response","Headers"].map(C);function G(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),P(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,X=e=>!R(e)&&e!==Y;const Q=(ee="undefined"!=typeof Uint8Array&&S(Uint8Array),e=>ee&&e instanceof ee);var ee;const te=C("HTMLFormElement"),{propertyIsEnumerable:ne}=Object.prototype,re=C("RegExp"),oe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};G(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)};const se=C("AsyncFunction"),ae=(ie="function"==typeof setImmediate,le=$(Y.postMessage),ie?setImmediate:le?(ce=`axios@${Math.random()}`,ue=[],Y.addEventListener("message",({source:e,data:t})=>{e===Y&&t===ce&&ue.length&&ue.shift()()},!1),e=>{ue.push(e),Y.postMessage(ce,"*")}):e=>setTimeout(e));var ie,le,ce,ue;const de="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Y):"undefined"!=typeof process&&process.nextTick||ae,he=e=>null!=e&&$(e[v]),fe={isArray:P,isArrayBuffer:x,isBuffer:I,isFormData:e=>{if(!e)return!1;if(B&&e instanceof B)return!0;const t=S(e);if(!t||t===Object.prototype)return!1;if(!$(e.append))return!1;const n=O(e);return"formdata"===n||"object"===n&&$(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&x(e.buffer),t},isString:D,isNumber:L,isBoolean:e=>!0===e||!1===e,isObject:M,isPlainObject:_,isEmptyObject:e=>{if(!M(e)||I(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:z,isRequest:H,isResponse:Z,isHeaders:J,isUndefined:R,isDate:F,isFile:j,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:q,isRegExp:re,isFunction:$,isStream:e=>M(e)&&$(e.pipe),isURLSearchParams:W,isTypedArray:Q,isFileList:U,forEach:G,merge:function e(...t){const{caseless:n,skipUndefined:r}=X(this)&&this||{},o={},s=(t,s)=>{if("__proto__"===s||"constructor"===s||"prototype"===s)return;const a=n&&"string"==typeof s&&K(o,s)||s,i=E(o,a)?o[a]:void 0;_(i)&&_(t)?o[a]=e(i,t):_(t)?o[a]=e({},t):P(t)?o[a]=t.slice():r&&R(t)||(o[a]=t)};for(let e=0,n=t.length;e(G(t,(t,r)=>{n&&$(t)?Object.defineProperty(e,r,{__proto__:null,value:w(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{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),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||i[a]||(t[a]=e[a],i[a]=!0);e=!1!==n&&S(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:O,kindOfTest:C,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(P(e))return e;let t=e.length;if(!L(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[v]).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:te,hasOwnProperty:E,hasOwnProp:E,hasOwnInPrototypeChain:T,getSafeProp:(e,t)=>null!=e&&T(e,t)?e[t]:void 0,reduceDescriptors:oe,freezeMethods:e=>{oe(e,(t,n)=>{if($(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];$(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 P(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:K,global:Y,isContextDefined:X,isSpecCompliantForm:function(e){return!!(e&&$(e.append)&&"FormData"===e[k]&&e[v])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(M(e)){if(t.has(e))return;if(I(e))return e;if(!("toJSON"in e)){t.add(e);const r=P(e)?[]:{};return G(e,(e,t)=>{const o=n(e);!R(o)&&(r[t]=o)}),t.delete(e),r}}return e};return n(e)},isAsyncFn:se,isThenable:e=>e&&(M(e)||$(e))&&$(e.then)&&$(e.catch),setImmediate:ae,asap:de,isIterable:he,isSafeIterable:e=>null!=e&&T(e,v)&&he(e)},me=fe.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"]),pe=e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&me[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};n.dn(pe);const ge=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ye=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function we(e,t){return fe.isArray(e)?e.map(e=>we(e,t)):function(e){let t=0,n=e.length;for(;tt;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function be(e){const t=Object.create(null);return fe.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>we(e,ye))(e)}),t}const Se=Symbol("internals");function ve(e){return e&&String(e).trim().toLowerCase()}function ke(e){return!1===e||null==e?e:fe.isArray(e)?e.map(ke):(e=>we(e,ge))(String(e))}function Ee(e,t,n,r,o){return fe.isFunction(r)?r.call(this,t,n):(o&&(t=n),fe.isString(t)?fe.isString(r)?-1!==t.indexOf(r):fe.isRegExp(r)?r.test(t):void 0:void 0)}class Te{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ve(t);if(!o)return;const s=fe.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ke(e))}const s=(e,t)=>fe.forEach(e,(e,n)=>o(e,n,t));if(fe.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(fe.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s(pe(e),t);else if(fe.isObject(e)&&fe.isSafeIterable(e)){let n,r,o=Object.create(null);for(const t of e){if(!fe.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],fe.hasOwnProp(o,r)?(n=o[r],o[r]=fe.isArray(n)?[...n,t[1]]:[n,t[1]]):o[r]=t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=ve(e)){const n=fe.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(fe.isFunction(t))return t.call(this,e,n);if(fe.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ve(e)){const n=fe.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ee(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ve(e)){const o=fe.findKey(n,e);!o||t&&!Ee(0,n[o],o,t)||(delete n[o],r=!0)}}return fe.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ee(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return fe.forEach(this,(r,o)=>{const s=fe.findKey(n,o);if(s)return t[s]=ke(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=ke(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return fe.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&fe.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[Se]=this[Se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ve(e);t[r]||(!function(e,t){const n=fe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return fe.isArray(e)?e.forEach(r):r(e),this}}Te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),fe.reduceDescriptors(Te.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),fe.freezeMethods(Te);const Oe=Te;function Ae(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(fe.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof Oe&&(e=e.toJSON()),r.push(e),fe.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);fe.isUndefined(r)||(t[n]=r)});else{if(!fe.isPlainObject(e)&&function(e){if(fe.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(fe.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,s]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":o(s);fe.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}class Ce extends Error{static from(e,t,n,r,o,s){const a=new Ce(e.message,t||e.code,n,r,o);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,null!=e.status&&null==a.status&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&fe.hasOwnProp(e,"redact")?e.redact:void 0,n=fe.isArray(t)&&t.length>0?Ae(e,t):fe.toJSONObject(e);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:n,code:this.code,status:this.status}}}Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ce.ERR_BAD_OPTION="ERR_BAD_OPTION",Ce.ECONNABORTED="ECONNABORTED",Ce.ETIMEDOUT="ETIMEDOUT",Ce.ECONNREFUSED="ECONNREFUSED",Ce.ERR_NETWORK="ERR_NETWORK",Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ce.ERR_DEPRECATED="ERR_DEPRECATED",Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ce.ERR_CANCELED="ERR_CANCELED",Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ce.ERR_INVALID_URL="ERR_INVALID_URL",Ce.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Ne=Ce;function Pe(e){return fe.isPlainObject(e)||fe.isArray(e)}function Re(e){return fe.endsWith(e,"[]")?e.slice(0,-2):e}function Ie(e,t,n){return e?e.concat(t).map(function(e,t){return e=Re(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const xe=fe.toFlatObject(fe,{},null,function(e){return/^is[A-Z]/.test(e)});const De=function(e,t,n){if(!fe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=fe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!fe.isUndefined(t[e])})).metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,i=n.Blob||"undefined"!=typeof Blob&&Blob,l=void 0===n.maxDepth?100:n.maxDepth,c=i&&fe.isSpecCompliantForm(t),u=[];if(!fe.isFunction(o))throw new TypeError("visitor must be a function");function d(e){if(null===e)return"";if(fe.isDate(e))return e.toISOString();if(fe.isBoolean(e))return e.toString();if(!c&&fe.isBlob(e))throw new Ne("Blob is not supported. Use a Buffer instead.");if(fe.isArrayBuffer(e)||fe.isTypedArray(e)){if(c&&"function"==typeof i)return new i([e]);if("undefined"!=typeof Buffer)return Buffer.from(e);throw new Ne("Blob is not supported. Use a Buffer instead.",Ne.ERR_NOT_SUPPORT)}return e}function h(e){if(e>l)throw new Ne("Object is too deeply nested ("+e+" levels). Max depth: "+l,Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function f(e,n,o){let i=e;if(fe.isReactNative(t)&&fe.isReactNativeBlob(e))return t.append(Ie(o,n,s),d(e)),!1;if(e&&!o&&"object"==typeof e)if(fe.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!fe.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),h(t+n.length-1),r})}(e,1);else if(fe.isArray(e)&&function(e){return fe.isArray(e)&&!e.some(Pe)}(e)||(fe.isFileList(e)||fe.endsWith(n,"[]"))&&(i=fe.toArray(e)))return n=Re(n),i.forEach(function(e,r){!fe.isUndefined(e)&&null!==e&&t.append(!0===a?Ie([n],r,s):null===a?n:n+"[]",d(e))}),!1;return!!Pe(e)||(t.append(Ie(o,n,s),d(e)),!1)}const m=Object.assign(xe,{defaultVisitor:f,convertValue:d,isVisitable:Pe});if(!fe.isObject(e))throw new TypeError("data must be an object");return function e(n,r,s=0){if(!fe.isUndefined(n)){if(h(s),-1!==u.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));u.push(n),fe.forEach(n,function(n,a){!0===(!(fe.isUndefined(n)||null===n)&&o.call(t,n,fe.isString(a)?a.trim():a,r,m))&&e(n,r?r.concat(a):[a],s+1)}),u.pop()}}(e),t};function $e(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Le(e,t){this._pairs=[],e&&De(e,this,t)}const Me=Le.prototype;Me.append=function(e,t){this._pairs.push([e,t])},Me.toString=function(e){const t=e?t=>e.call(this,t,$e):$e;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const _e=Le;function Fe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function je(e,t,n){if(!t)return e;e=e||"";const r=fe.isFunction(n)?{serialize:n}:n,o=fe.getSafeProp(r,"encode")||Fe,s=fe.getSafeProp(r,"serialize");let a;if(a=s?s(t,r):fe.isURLSearchParams(t)?t.toString():new _e(t,r).toString(o),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const qe=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){fe.forEach(this.handlers,function(t){null!==t&&e(t)})}},Ue={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Ve={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:_e,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Be="undefined"!=typeof window&&"undefined"!=typeof document,We="object"==typeof navigator&&navigator||void 0,ze=Be&&(!We||["ReactNative","NativeScript","NS"].indexOf(We.product)<0),He="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ze=Be&&window.location.href||"http://localhost",Je={...e,...Ve};function Ge(e){if(e>100)throw new Ne("FormData field is too deeply nested ("+e+" levels). Max depth: 100",Ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}const Ke=function(e){function t(e,n,r,o){Ge(o);let s=e[o++];if("__proto__"===s)return!0;const a=Number.isFinite(+s),i=o>=e.length;if(s=!s&&fe.isArray(r)?r.length:s,i)return fe.hasOwnProp(r,s)?r[s]=fe.isArray(r[s])?r[s].concat(n):[r[s],n]:r[s]=n,!a;fe.hasOwnProp(r,s)&&fe.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&fe.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r{t(function(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;null!==(r=n.exec(e));)Ge(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),n}return null},Ye=(e,t)=>null!=e&&fe.hasOwnProp(e,t)?e[t]:void 0;const Xe={transitional:Ue,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=fe.isObject(e);o&&fe.isHTMLForm(e)&&(e=new FormData(e));if(fe.isFormData(e))return r?JSON.stringify(Ke(e)):e;if(fe.isArrayBuffer(e)||fe.isBuffer(e)||fe.isStream(e)||fe.isFile(e)||fe.isBlob(e)||fe.isReadableStream(e))return e;if(fe.isArrayBufferView(e))return e.buffer;if(fe.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){const t=Ye(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return De(e,new Je.classes.URLSearchParams,{visitor:function(e,t,n,r){return Je.isNode&&fe.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((s=fe.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Ye(this,"env"),r=n&&n.FormData;return De(s?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(fe.isString(e))try{return(t||JSON.parse)(e),fe.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Ye(this,"transitional")||Xe.transitional,n=t&&t.forcedJSONParsing,r=Ye(this,"responseType"),o="json"===r;if(fe.isResponse(e)||fe.isReadableStream(e))return e;if(e&&fe.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,Ye(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw Ne.from(e,Ne.ERR_BAD_RESPONSE,this,null,Ye(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Je.classes.FormData,Blob:Je.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(["delete","get","head","post","put","patch","query"],e=>{Xe.headers[e]={}});const Qe=Xe;function et(e,t){const n=this||Qe,r=t||n,o=Oe.from(r.headers);let s=r.data;return fe.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function tt(e){return!(!e||!e.__CANCEL__)}const nt=class extends Ne{constructor(e,t,n){super(e??"canceled",Ne.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function rt(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?Ne.ERR_BAD_REQUEST:Ne.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const ot=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,a=0;return t=void 0!==t?t:1e3,function(i){const l=Date.now(),c=r[a];o||(o=l),n[s]=i,r[s]=l;let u=a,d=0;for(;u!==s;)d+=n[u++],u%=e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),l-o{o=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-o;i>=s?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},s-i)))},()=>n&&a(n)]},at=(e,t,n=3)=>{let r=0;const o=ot(50,250);return st(n=>{if(!n||"number"!=typeof n.loaded)return;const s=n.loaded,a=n.lengthComputable?n.total:void 0,i=null!=a?Math.min(s,a):s,l=Math.max(0,i-r),c=o(l);r=Math.max(r,i);e({loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a?(a-i)/c:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},it=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},lt=e=>(...t)=>fe.asap(()=>e(...t)),ct=Je.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Je.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Je.origin),Je.navigator&&/(msie|trident)/i.test(Je.navigator.userAgent)):()=>!0,ut=Je.hasStandardBrowserEnv?{write(e,t,n,r,o,s,a){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];fe.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),fe.isString(r)&&i.push(`path=${r}`),fe.isString(o)&&i.push(`domain=${o}`),!0===s&&i.push("secure"),fe.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;nnull,remove(){}};const dt=/^https?:(?!\/\/)/i,ht=/[\t\n\r]/g;function ft(e,t){if("string"==typeof e&&dt.test(function(e){return function(e){let t=0;for(;te instanceof Oe?{...e}:e;function gt(e,t){e=e||{},t=t||{};const n=Object.create(null);function r(e,t,n,r){return fe.isPlainObject(e)&&fe.isPlainObject(t)?fe.merge.call({caseless:r},e,t):fe.isPlainObject(t)?fe.merge({},t):fe.isArray(t)?t.slice():t}function o(e,t,n,o){return fe.isUndefined(t)?fe.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!fe.isUndefined(t))return r(void 0,t)}function a(e,t){return fe.isUndefined(t)?fe.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,o,s){return fe.hasOwnProp(t,s)?r(n,o):fe.hasOwnProp(e,s)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:i,headers:(e,t,n)=>o(pt(e),pt(t),0,!0)};return fe.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const s=fe.hasOwnProp(l,r)?l[r]:o,a=s(fe.hasOwnProp(e,r)?e[r]:void 0,fe.hasOwnProp(t,r)?t[r]:void 0,r);fe.isUndefined(a)&&s!==i||(n[r]=a)}),fe.hasOwnProp(t,"validateStatus")&&fe.isUndefined(t.validateStatus)&&!1===function(n){const r=fe.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!fe.isUndefined(r)){if(!fe.isPlainObject(r))return;if(fe.hasOwnProp(r,n))return r[n]}const o=fe.hasOwnProp(e,"transitional")?e.transitional:void 0;if(fe.isPlainObject(o)&&fe.hasOwnProp(o,n))return o[n]}("validateStatusUndefinedResolves")&&(fe.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const yt=["content-type","content-length"];const wt=function(e){const t=gt({},e),n=e=>fe.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),a=n("xsrfCookieName");let i=n("headers");const l=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");if(t.headers=i=Oe.from(i),t.url=je(mt(c,d,u,t),n("params"),n("paramsSerializer")),l){const t=fe.getSafeProp(l,"username")||"",n=fe.getSafeProp(l,"password")||"";try{i.set("Authorization","Basic "+btoa(t+":"+(n?encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}catch(t){throw Ne.from(t,Ne.ERR_BAD_OPTION_VALUE,e)}}if(fe.isFormData(r)&&(Je.hasStandardBrowserEnv||Je.hasStandardBrowserWebWorkerEnv||fe.isReactNative(r)?i.setContentType(void 0):fe.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{yt.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(i,r.getHeaders(),n("formDataHeaderPolicy"))),Je.hasStandardBrowserEnv){fe.isFunction(o)&&(o=o(t));if(!0===o||null==o&&ct(t.url)){const e=s&&a&&ut.read(a);e&&i.set(s,e)}}return t},bt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=wt(e);let o=r.data;const s=Oe.from(r.headers).normalize();let a,i,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=r;function m(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let p=new XMLHttpRequest;function g(){if(!p)return;const r=Oe.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());rt(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=g:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&p.responseURL.startsWith("file:"))&&setTimeout(g)},p.onabort=function(){p&&(n(new Ne("Request aborted",Ne.ECONNABORTED,e,p)),m(),p=null)},p.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new Ne(r,Ne.ERR_NETWORK,e,p);o.event=t||null,n(o),m(),p=null},p.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Ue;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ne(t,o.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,e,p)),m(),p=null},void 0===o&&s.setContentType(null),"setRequestHeader"in p&&fe.forEach(be(s),function(e,t){p.setRequestHeader(t,e)}),fe.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),d&&"json"!==d&&(p.responseType=r.responseType),f&&([l,u]=at(f,!0),p.addEventListener("progress",l)),h&&p.upload&&([i,c]=at(h),p.upload.addEventListener("progress",i),p.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{p&&(n(!t||t.type?new nt(null,e,p):t),p.abort(),m(),p=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);if(y&&!Je.protocols.includes(y))return n(new Ne("Unsupported protocol "+y+":",Ne.ERR_BAD_REQUEST,e)),void m();p.send(o||null)})},St=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Ne?t:new nt(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new Ne(`timeout of ${t}ms exceeded`,Ne.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o,{once:!0}));const{signal:i}=n;return i.unsubscribe=()=>fe.asap(a),i},vt=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of kt(e))yield*vt(n,t)}(e,t);let s,a=0,i=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return i(),void e.close();let s=r.byteLength;if(n){let e=a+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw i(e),e}},cancel:e=>(i(e),o.return())},{highWaterMark:2})},Tt=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Ot=(e,t,n)=>t+2{if(!fe.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Nt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Pt=e=>{const t=void 0!==fe.global&&null!==fe.global?fe.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=fe.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:a}=e,i=o?At(o):"function"==typeof fetch,l=At(s),c=At(a);if(!i)return!1;const u=i&&At(n),d=i&&("function"==typeof r?(h=new r,e=>h.encode(e)):async e=>new Uint8Array(await new s(e).arrayBuffer()));var h;const f=l&&u&&Nt(()=>{let e=!1;const t=new s(Je.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),m=c&&u&&Nt(()=>fe.isReadableStream(new a("").body)),p={stream:m&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p[e]&&(p[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ne(`Response type '${e}' is not supported`,Ne.ERR_NOT_SUPPORT,n)})});const g=async e=>{if(null==e)return 0;if(fe.isBlob(e))return e.size;if(fe.isSpecCompliantForm(e)){const t=new s(Je.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return fe.isArrayBufferView(e)||fe.isArrayBuffer(e)?e.byteLength:(fe.isURLSearchParams(e)&&(e+=""),fe.isString(e)?(await d(e)).byteLength:void 0)};return async e=>{let{url:t,method:n,data:i,signal:c,cancelToken:d,timeout:h,onDownloadProgress:y,onUploadProgress:w,responseType:b,headers:S,withCredentials:v="same-origin",fetchOptions:k,maxContentLength:E,maxBodyLength:T}=wt(e);const O=fe.isNumber(E)&&E>-1,A=fe.isNumber(T)&&T>-1;let C=o||fetch;b=b?(b+"").toLowerCase():"text";let N=St([c,d&&d.toAbortSignal()],h),P=null;const R=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let I,x=null;const D=()=>new Ne("Request body larger than maxBodyLength limit",Ne.ERR_BAD_REQUEST,e,P);try{let o;const c=(L="auth",fe.hasOwnProp(e,L)?e[L]:void 0);if(c){const e=fe.getSafeProp(c,"username")||"";o={username:e,password:fe.getSafeProp(c,"password")||""}}if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,Je.origin);if(!o&&(e.username||e.password)){const t=Ct(e.username);o={username:t,password:Ct(e.password)}}(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(o&&(S.delete("authorization"),S.set("Authorization","Basic "+btoa(($=(o.username||"")+":"+(o.password||""),encodeURIComponent($).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),O&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let n=0;ne>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));o>=0&&(61===r.charCodeAt(o)?(n++,o--):s(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||s(o))&&n++;const a=3*Math.floor(e/4)-(n||0);return a>0?a:0}let o=0;for(let e=0,t=r.length;e=55296&&n<=56319&&e+1=56320&&t<=57343?(o+=4,e++):o+=3}else o+=3}return o}(t);if(n>E)throw new Ne("maxContentLength size of "+E+" exceeded",Ne.ERR_BAD_RESPONSE,e,P)}if(A&&"get"!==n&&"head"!==n){const e=await g(i);if("number"==typeof e&&isFinite(e)&&(I=e,e>T))throw D()}const d=A&&(fe.isReadableStream(i)||fe.isStream(i)),h=(e,t,n)=>Et(e,65536,e=>{if(A&&e>T)throw x=D();t&&t(e)},n);if(f&&"get"!==n&&"head"!==n&&(w||d)){if(I=I??await(async(e,t)=>{const n=fe.toFiniteNumber(e.getContentLength());return n??g(t)})(S,i),0!==I||d){let e,n=new s(t,{method:"POST",body:i,duplex:"half"});if(fe.isFormData(i)&&(e=n.headers.get("content-type"))&&S.setContentType(e),n.body){const[e,t]=w&&it(I,at(lt(w)))||[];i=h(n.body,e,t)}}}else if(d&&!l&&u&&"get"!==n&&"head"!==n)i=h(i);else if(d&&l&&!f&&"get"!==n&&"head"!==n)throw new Ne("Stream request bodies are not supported by the current fetch implementation",Ne.ERR_NOT_SUPPORT,e,P);fe.isString(v)||(v=v?"include":"omit");const M=l&&"credentials"in s.prototype;if(fe.isFormData(i)){const e=S.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&S.delete("content-type")}S.set("User-Agent","axios/1.18.1",!1);const _={...k,signal:N,method:n.toUpperCase(),headers:be(S.normalize()),body:i,duplex:"half",credentials:M?v:void 0};P=l&&new s(t,_);let F=await(l?C(P,k):C(t,_));const j=Oe.from(F.headers);if(O){const t=fe.toFiniteNumber(j.getContentLength());if(null!=t&&t>E)throw new Ne("maxContentLength size of "+E+" exceeded",Ne.ERR_BAD_RESPONSE,e,P)}const q=m&&("stream"===b||"response"===b);if(m&&F.body&&(y||O||q&&R)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=F[e]});const n=fe.toFiniteNumber(j.getContentLength()),[r,o]=y&&it(n,at(lt(y),!0))||[];let s=0;const i=t=>{if(O&&(s=t,s>E))throw new Ne("maxContentLength size of "+E+" exceeded",Ne.ERR_BAD_RESPONSE,e,P);r&&r(t)};F=new a(Et(F.body,65536,i,()=>{o&&o(),R&&R()}),t)}b=b||"text";let U=await p[fe.findKey(p,b)||"text"](F,e);if(O&&!m&&!q){let t;if(null!=U&&("number"==typeof U.byteLength?t=U.byteLength:"number"==typeof U.size?t=U.size:"string"==typeof U&&(t="function"==typeof r?(new r).encode(U).byteLength:U.length)),"number"==typeof t&&t>E)throw new Ne("maxContentLength size of "+E+" exceeded",Ne.ERR_BAD_RESPONSE,e,P)}return!q&&R&&R(),await new Promise((t,n)=>{rt(t,n,{data:U,headers:Oe.from(F.headers),status:F.status,statusText:F.statusText,config:e,request:P})})}catch(t){if(R&&R(),N&&N.aborted&&N.reason instanceof Ne){const n=N.reason;throw n.config=e,P&&(n.request=P),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(x)throw P&&!x.request&&(x.request=P),x;if(t instanceof Ne)throw P&&!t.request&&(t.request=P),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new Ne("Network Error",Ne.ERR_NETWORK,e,P,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw Ne.from(t,t&&t.code,e,P,t&&t.response)}var $,L}},Rt=new Map,It=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let a,i,l=s.length,c=Rt;for(;l--;)a=s[l],i=c.get(a),void 0===i&&c.set(a,i=l?new Map:Pt(t)),c=i;return i},xt=(It(),{http:null,xhr:bt,fetch:{get:It}});fe.forEach(xt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Dt=e=>`- ${e}`,$t=e=>fe.isFunction(e)||null===e||!1===e;const Lt={getAdapter:function(e,t){e=fe.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let a=0;a`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(Dt).join("\n"):" "+Dt(e[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+t,Ne.ERR_NOT_SUPPORT)}return o},adapters:xt};function Mt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new nt(null,e)}function _t(e){Mt(e),e.headers=Oe.from(e.headers),e.data=et.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Lt.getAdapter(e.adapter||Qe.adapter,e)(e).then(function(t){Mt(e),e.response=t;try{t.data=et.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=Oe.from(t.headers),t},function(t){if(!tt(t)&&(Mt(e),t&&t.response)){e.response=t.response;try{t.response.data=et.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=Oe.from(t.response.headers)}return Promise.reject(t)})}const Ft={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ft[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const jt={};Ft.transitional=function(e,t,n){function r(e,t){return"[Axios v1.18.1] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new Ne(r(o," has been removed"+(t?" in "+t:"")),Ne.ERR_DEPRECATED);return t&&!jt[o]&&(jt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},Ft.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const qt={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(a){const t=e[s],n=void 0===t||a(t,s,e);if(!0!==n)throw new Ne("option "+s+" must be "+n,Ne.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ne("Unknown option "+s,Ne.ERR_BAD_OPTION)}},validators:Ft},Ut=qt.validators;class Vt{constructor(e){this.defaults=e||{},this.interceptors={request:new qe,response:new qe}}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=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf("\n"),r=-1===t?-1:n.indexOf("\n",t+1),o=-1===r?"":n.slice(r+1);String(e.stack).endsWith(o)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=gt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&qt.assertOptions(n,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean),legacyInterceptorReqResOrdering:Ut.transitional(Ut.boolean),advertiseZstdAcceptEncoding:Ut.transitional(Ut.boolean),validateStatusUndefinedResolves:Ut.transitional(Ut.boolean)},!1),null!=r&&(fe.isFunction(r)?t.paramsSerializer={serialize:r}:qt.assertOptions(r,{encode:Ut.function,serialize:Ut.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),qt.assertOptions(t,{baseUrl:Ut.spelling("baseURL"),withXsrfToken:Ut.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&fe.merge(o.common,o[t.method]);o&&fe.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=Oe.concat(s,o);const a=[];let i=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;i=i&&e.synchronous;const n=t.transitional||Ue;n&&n.legacyInterceptorReqResOrdering?a.unshift(e.fulfilled,e.rejected):a.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!i){const e=[_t.bind(this),void 0];for(e.unshift(...a),e.push(...l),u=e.length,c=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,o){n.reason||(n.reason=new nt(e,r,o),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 Wt(function(t){e=t}),cancel:e}}}const zt=Wt;const Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ht).forEach(([e,t])=>{Ht[t]=e});const Zt=Ht;const Jt=function e(t){const n=new Bt(t),r=w(Bt.prototype.request,n);return fe.extend(r,Bt.prototype,n,{allOwnKeys:!0}),fe.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(gt(t,n))},r}(Qe);Jt.Axios=Bt,Jt.CanceledError=nt,Jt.CancelToken=zt,Jt.isCancel=tt,Jt.VERSION="1.18.1",Jt.toFormData=De,Jt.AxiosError=Ne,Jt.Cancel=Jt.CanceledError,Jt.all=function(e){return Promise.all(e)},Jt.spread=function(e){return function(t){return e.apply(null,t)}},Jt.isAxiosError=function(e){return fe.isObject(e)&&!0===e.isAxiosError},Jt.mergeConfig=gt,Jt.AxiosHeaders=Oe,Jt.formToJSON=e=>Ke(fe.isHTMLForm(e)?new FormData(e):e),Jt.getAdapter=Lt.getAdapter,Jt.HttpStatusCode=Zt,Jt.default=Jt;const Gt=Jt;class Kt extends Error{}class Yt extends Kt{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Xt extends Kt{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Qt extends Kt{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class en extends Kt{}class tn extends Kt{constructor(e){super(`Invalid unit ${e}`)}}class nn extends Kt{}class rn extends Kt{constructor(){super("Zone is an abstract class")}}const on="numeric",sn="short",an="long",ln={year:on,month:on,day:on},cn={year:on,month:sn,day:on},un={year:on,month:sn,day:on,weekday:sn},dn={year:on,month:an,day:on},hn={year:on,month:an,day:on,weekday:an},fn={hour:on,minute:on},mn={hour:on,minute:on,second:on},pn={hour:on,minute:on,second:on,timeZoneName:sn},gn={hour:on,minute:on,second:on,timeZoneName:an},yn={hour:on,minute:on,hourCycle:"h23"},wn={hour:on,minute:on,second:on,hourCycle:"h23"},bn={hour:on,minute:on,second:on,hourCycle:"h23",timeZoneName:sn},Sn={hour:on,minute:on,second:on,hourCycle:"h23",timeZoneName:an},vn={year:on,month:on,day:on,hour:on,minute:on},kn={year:on,month:on,day:on,hour:on,minute:on,second:on},En={year:on,month:sn,day:on,hour:on,minute:on},Tn={year:on,month:sn,day:on,hour:on,minute:on,second:on},On={year:on,month:sn,day:on,weekday:sn,hour:on,minute:on},An={year:on,month:an,day:on,hour:on,minute:on,timeZoneName:sn},Cn={year:on,month:an,day:on,hour:on,minute:on,second:on,timeZoneName:sn},Nn={year:on,month:an,day:on,weekday:an,hour:on,minute:on,timeZoneName:an},Pn={year:on,month:an,day:on,weekday:an,hour:on,minute:on,second:on,timeZoneName:an};class Rn{get type(){throw new rn}get name(){throw new rn}get ianaName(){return this.name}get isUniversal(){throw new rn}offsetName(e,t){throw new rn}formatOffset(e,t){throw new rn}offset(e){throw new rn}equals(e){throw new rn}get isValid(){throw new rn}}let In=null;class xn extends Rn{static get instance(){return null===In&&(In=new xn),In}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Xr(e,t,n)}formatOffset(e,t){return no(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const Dn=new Map;const $n={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const Ln=new Map;class Mn extends Rn{static create(e){let t=Ln.get(e);return void 0===t&&Ln.set(e,t=new Mn(e)),t}static resetCache(){Ln.clear(),Dn.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=Mn.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Xr(e,t,n,this.name)}formatOffset(e,t){return no(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=Dn.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"}),Dn.set(e,t)),t}(this.name);let[r,o,s,a,i,l,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let e=0;e=0?d:1e3+d,(Jr({year:r,month:o,day:s,hour:24===i?0:i,minute:l,second:c,millisecond:0})-u)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let _n={};const Fn=new Map;function jn(e,t={}){const n=JSON.stringify([e,t]);let r=Fn.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),Fn.set(n,r)),r}const qn=new Map;const Un=new Map;let Vn=null;const Bn=new Map;function Wn(e){let t=Bn.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Bn.set(e,t)),t}const zn=new Map;function Hn(e,t,n,r){const o=e.listingMode();return"error"===o?null:"en"===o?n(t):r(t)}class Zn{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:o,...s}=n;if(!t||Object.keys(s).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=qn.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),qn.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 qr(this.floor?Math.floor(e):Wr(e,3),this.padTo)}}class Jn{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&&Mn.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 o={...this.opts};o.timeZone=o.timeZone||r,this.dtf=jn(t,o)}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 Gn{constructor(e,t,n){this.opts={style:"long",...n},!t&&$r()&&(this.rtf=function(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let s=Un.get(o);return void 0===s&&(s=new Intl.RelativeTimeFormat(e,t),Un.set(o,s)),s}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",r=!1){const o={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."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${o[e][0]}`;case-1:return n?"yesterday":`last ${o[e][0]}`;case 0:return n?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,i=Math.abs(t),l=1===i,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${i} ${u} ago`:`in ${i} ${u}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Kn={firstDay:1,minimalDays:4,weekend:[6,7]};class Yn{static fromOpts(e){return Yn.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r,o=!1){const s=e||pr.defaultLocale,a=s||(o?"en-US":Vn||(Vn=(new Intl.DateTimeFormat).resolvedOptions().locale,Vn)),i=t||pr.defaultNumberingSystem,l=n||pr.defaultOutputCalendar,c=Fr(r)||pr.defaultWeekSettings;return new Yn(a,i,l,c,s)}static resetCache(){Vn=null,Fn.clear(),qn.clear(),Un.clear(),Bn.clear(),zn.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}={}){return Yn.create(e,t,n,r)}constructor(e,t,n,r,o){const[s,a,i]=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=jn(e).resolvedOptions(),r=e}catch(o){const s=e.substring(0,n);t=jn(s).resolvedOptions(),r=s}const{numberingSystem:o,calendar:s}=t;return[r,o,s]}}(e);this.locale=s,this.numberingSystem=t||a||null,this.outputCalendar=n||i||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=o,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"===Wn(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?Yn.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Fr(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 Hn(this,e,io,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-"),r=(t&=!n)?{month:e,day:"numeric"}:{month:e},o=t?"format":"standalone";if(!this.monthsCache[o][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[o][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=fa.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[o][e]})}weekdays(e,t=!1){return Hn(this,e,ho,()=>{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=fa.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return Hn(this,void 0,()=>fo,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[fa.utc(2016,11,13,9),fa.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Hn(this,e,yo,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[fa.utc(-40,1,1),fa.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 Zn(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Jn(e,this.intl,t)}relFormatter(e={}){return new Gn(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let r=_n[n];return r||(r=new Intl.ListFormat(e,t),_n[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Wn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Lr()?function(e){let t=zn.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...Kn,...t}),zn.set(e,t)}return t}(this.locale):Kn}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 Xn=null;class Qn extends Rn{static get utcInstance(){return null===Xn&&(Xn=new Qn(0)),Xn}static instance(e){return 0===e?Qn.utcInstance:new Qn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Qn(Qr(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${no(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${no(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return no(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 er extends Rn{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 tr(e,t){if(Ir(e)||null===e)return t;if(e instanceof Rn)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?xn.instance:"utc"===n||"gmt"===n?Qn.utcInstance:Qn.parseSpecifier(n)||Mn.create(e)}return xr(e)?Qn.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new er(e)}const nr={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},rr={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]},or=nr.hanidec.replace(/[\[|\]]/g,"").split("");const sr=new Map;function ar({numberingSystem:e},t=""){const n=e||"latn";let r=sr.get(n);void 0===r&&(r=new Map,sr.set(n,r));let o=r.get(t);return void 0===o&&(o=new RegExp(`${nr[n]}${t}`),r.set(t,o)),o}let ir,lr=()=>Date.now(),cr="system",ur=null,dr=null,hr=null,fr=60,mr=null;class pr{static get now(){return lr}static set now(e){lr=e}static set defaultZone(e){cr=e}static get defaultZone(){return tr(cr,xn.instance)}static get defaultLocale(){return ur}static set defaultLocale(e){ur=e}static get defaultNumberingSystem(){return dr}static set defaultNumberingSystem(e){dr=e}static get defaultOutputCalendar(){return hr}static set defaultOutputCalendar(e){hr=e}static get defaultWeekSettings(){return mr}static set defaultWeekSettings(e){mr=Fr(e)}static get twoDigitCutoffYear(){return fr}static set twoDigitCutoffYear(e){fr=e%100}static get throwOnInvalid(){return ir}static set throwOnInvalid(e){ir=e}static resetCaches(){Yn.resetCache(),Mn.resetCache(),fa.resetCache(),sr.clear()}}class gr{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const yr=[0,31,59,90,120,151,181,212,243,273,304,334],wr=[0,31,60,91,121,152,182,213,244,274,305,335];function br(e,t){return new gr("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Sr(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return 0===o?7:o}function vr(e,t,n){return n+(zr(e)?wr:yr)[t-1]}function kr(e,t){const n=zr(e)?wr:yr,r=n.findIndex(e=>eKr(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:i,...ro(e)}}function Or(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:s}=e,a=Er(Sr(r,1,t),n),i=Hr(r);let l,c=7*o+s-a-7+t;c<1?(l=r-1,c+=Hr(l)):c>i?(l=r+1,c-=Hr(r)):l=r;const{month:u,day:d}=kr(l,c);return{year:l,month:u,day:d,...ro(e)}}function Ar(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:vr(t,n,r),...ro(e)}}function Cr(e){const{year:t,ordinal:n}=e,{month:r,day:o}=kr(t,n);return{year:t,month:r,day:o,...ro(e)}}function Nr(e,t){if(!Ir(e.localWeekday)||!Ir(e.localWeekNumber)||!Ir(e.localWeekYear)){if(!Ir(e.weekday)||!Ir(e.weekNumber)||!Ir(e.weekYear))throw new en("Cannot mix locale-based week fields with ISO-based week fields");return Ir(e.localWeekday)||(e.weekday=e.localWeekday),Ir(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ir(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 Pr(e){const t=Dr(e.year),n=jr(e.month,1,12),r=jr(e.day,1,Zr(e.year,e.month));return t?n?!r&&br("day",e.day):br("month",e.month):br("year",e.year)}function Rr(e){const{hour:t,minute:n,second:r,millisecond:o}=e,s=jr(t,0,23)||24===t&&0===n&&0===r&&0===o,a=jr(n,0,59),i=jr(r,0,59),l=jr(o,0,999);return s?a?i?!l&&br("millisecond",o):br("second",r):br("minute",n):br("hour",t)}function Ir(e){return void 0===e}function xr(e){return"number"==typeof e}function Dr(e){return"number"==typeof e&&e%1==0}function $r(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Lr(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Mr(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const o=[t(r),r];return e&&n(e[0],o[0])===e[0]?e:o},null)[1]}function _r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Fr(e){if(null==e)return null;if("object"!=typeof e)throw new nn("Week settings must be an object");if(!jr(e.firstDay,1,7)||!jr(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!jr(e,1,7)))throw new nn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function jr(e,t,n){return Dr(e)&&e>=t&&e<=n}function qr(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Ur(e){return Ir(e)||null===e||""===e?void 0:parseInt(e,10)}function Vr(e){return Ir(e)||null===e||""===e?void 0:parseFloat(e)}function Br(e){if(!Ir(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Wr(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 zr(e){return e%4==0&&(e%100!=0||e%400==0)}function Hr(e){return zr(e)?366:365}function Zr(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?zr(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Jr(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 Gr(e,t,n){return-Er(Sr(e,1,t),n)+t-1}function Kr(e,t=4,n=1){const r=Gr(e,t,n),o=Gr(e+1,t,n);return(Hr(e)-r+o)/7}function Yr(e){return e>99?e:e>pr.twoDigitCutoffYear?1900+e:2e3+e}function Xr(e,t,n,r=null){const o=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const a={timeZoneName:t,...s},i=new Intl.DateTimeFormat(n,a).formatToParts(o).find(e=>"timezonename"===e.type.toLowerCase());return i?i.value:null}function Qr(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 eo(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new nn(`Invalid unit value ${e}`);return t}function to(e,t){const n={};for(const r in e)if(_r(e,r)){const o=e[r];if(null==o)continue;n[t(r)]=eo(o)}return n}function no(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${qr(n,2)}:${qr(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${qr(n,2)}${qr(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ro(e){return function(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}(e,["hour","minute","second","millisecond"])}const oo=["January","February","March","April","May","June","July","August","September","October","November","December"],so=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ao=["J","F","M","A","M","J","J","A","S","O","N","D"];function io(e){switch(e){case"narrow":return[...ao];case"short":return[...so];case"long":return[...oo];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 lo=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],co=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],uo=["M","T","W","T","F","S","S"];function ho(e){switch(e){case"narrow":return[...uo];case"short":return[...co];case"long":return[...lo];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const fo=["AM","PM"],mo=["Before Christ","Anno Domini"],po=["BC","AD"],go=["B","A"];function yo(e){switch(e){case"narrow":return[...go];case"short":return[...po];case"long":return[...mo];default:return null}}function wo(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const bo={D:ln,DD:cn,DDD:dn,DDDD:hn,t:fn,tt:mn,ttt:pn,tttt:gn,T:yn,TT:wn,TTT:bn,TTTT:Sn,f:vn,ff:En,fff:An,ffff:Nn,F:kn,FF:Tn,FFF:Cn,FFFF:Pn};class So{static create(e,t={}){return new So(e,t)}static parseFormat(e){let t=null,n="",r=!1;const o=[];for(let s=0;s0||r)&&o.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&o.push({literal:r||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return bo[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 qr(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,o=(t,n)=>this.loc.extract(e,t,n),s=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>n?function(e){return fo[e.hour<12?0:1]}(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),i=(t,r)=>n?function(e,t){return io(t)[e.month-1]}(e,t):o(r?{month:t}:{month:t,day:"numeric"},"month"),l=(t,r)=>n?function(e,t){return ho(t)[e.weekday-1]}(e,t):o(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),c=t=>{const n=So.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},u=t=>n?function(e,t){return yo(t)[e.year<0?0:1]}(e,t):o({era:t},"era");return wo(So.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 s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({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 a();case"d":return r?o({day:"numeric"},"day"):this.num(e.day);case"dd":return r?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return i("short",!0);case"LLLL":return i("long",!0);case"LLLLL":return i("narrow",!0);case"M":return r?o({month:"numeric"},"month"):this.num(e.month);case"MM":return r?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return i("short",!1);case"MMMM":return i("long",!1);case"MMMMM":return i("narrow",!1);case"y":return r?o({year:"numeric"},"year"):this.num(e.year);case"yy":return r?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?o({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 c(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}},o=So.parseFormat(t),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),a=e.shiftTo(...s.map(r).filter(e=>e));return wo(o,((e,t)=>o=>{const s=r(o);if(s){const r=t.isNegativeDuration&&s!==t.largestUnit?n:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&s!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(s)*r,o.length,a)}return o})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}}const vo=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ko(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function Eo(...e){return t=>e.reduce(([e,n,r],o)=>{const[s,a,i]=o(t,r);return[{...e,...s},a||n,i]},[{},null,1]).slice(0,2)}function To(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 Oo(...e){return(t,n)=>{const r={};let o;for(o=0;ovoid 0!==e&&(t||e&&u)?-e:e;return[{years:h(Vr(n)),months:h(Vr(r)),weeks:h(Vr(o)),days:h(Vr(s)),hours:h(Vr(a)),minutes:h(Vr(i)),seconds:h(Vr(l),"-0"===l),milliseconds:h(Br(c),d)}]}const Uo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Vo(e,t,n,r,o,s,a){const i={year:2===t.length?Yr(Ur(t)):Ur(t),month:so.indexOf(n)+1,day:Ur(r),hour:Ur(o),minute:Ur(s)};return a&&(i.second=Ur(a)),e&&(i.weekday=e.length>3?lo.indexOf(e)+1:co.indexOf(e)+1),i}const Bo=/^(?:(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 Wo(e){const[,t,n,r,o,s,a,i,l,c,u,d]=e,h=Vo(t,o,r,n,s,a,i);let f;return f=l?Uo[l]:c?0:Qr(u,d),[h,new Qn(f)]}const zo=/^(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$/,Ho=/^(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$/,Zo=/^(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 Jo(e){const[,t,n,r,o,s,a,i]=e;return[Vo(t,o,r,n,s,a,i),Qn.utcInstance]}function Go(e){const[,t,n,r,o,s,a,i]=e;return[Vo(t,i,n,r,o,s,a),Qn.utcInstance]}const Ko=ko(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Po),Yo=ko(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Po),Xo=ko(/(\d{4})-?(\d{3})/,Po),Qo=ko(No),es=Eo(function(e,t){return[{year:$o(e,t),month:$o(e,t+1,1),day:$o(e,t+2,1)},null,t+3]},Lo,Mo,_o),ts=Eo(Ro,Lo,Mo,_o),ns=Eo(Io,Lo,Mo,_o),rs=Eo(Lo,Mo,_o);const os=Eo(Lo);const ss=ko(/(\d{4})-(\d\d)-(\d\d)/,Do),as=ko(xo),is=Eo(Lo,Mo,_o);const ls="Invalid Duration",cs={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}},us={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},...cs},ds=365.2425,hs=30.436875,fs={years:{quarters:4,months:12,weeks:52.1775,days:ds,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:hs,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...cs},ms=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ps=ms.slice(0).reverse();function gs(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 Ss(r)}function ys(e,t){let n=t.milliseconds??0;for(const r of ps.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function ws(e,t){const n=ys(e,t)<0?-1:1;ms.reduceRight((r,o)=>{if(Ir(t[o]))return r;if(r){const s=t[r]*n,a=e[o][r],i=Math.floor(s/a);t[o]+=i*n,t[r]-=i*a*n}return o},null),ms.reduce((n,r)=>{if(Ir(t[r]))return n;if(n){const o=t[n]%1;t[n]-=o,t[r]+=o*e[n][r]}return r},null)}function bs(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class Ss{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?fs:us;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Yn.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Ss.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new nn("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Ss({values:to(e,Ss.normalizeUnit),loc:Yn.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(xr(e))return Ss.fromMillis(e);if(Ss.isDuration(e))return e;if("object"==typeof e)return Ss.fromObject(e);throw new nn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return To(e,[jo,qo])}(e);return n?Ss.fromObject(n,t):Ss.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return To(e,[Fo,os])}(e);return n?Ss.fromObject(n,t):Ss.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new nn("need to specify a reason the Duration is invalid");const n=e instanceof gr?e:new gr(e,t);if(pr.throwOnInvalid)throw new Qt(n);return new Ss({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 tn(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?So.create(this.loc,n).formatDurationFromString(this,e):ls}toHuman(e={}){if(!this.isValid)return ls;const t=!1!==e.showZeros,n=ms.map(n=>{const r=this.values[n];return Ir(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+=Wr(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 fa.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?ys(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Ss.fromDurationLike(e),n={};for(const e of ms)(_r(t.values,e)||_r(this.values,e))&&(n[e]=t.get(e)+this.get(e));return gs(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Ss.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]=eo(e(this.values[n],n));return gs(this,{values:t},!0)}get(e){return this[Ss.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return gs(this,{values:{...this.values,...to(e,Ss.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){return gs(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 ws(this.matrix,e),gs(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return gs(this,{values:bs(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>Ss.normalizeUnit(e));const t={},n={},r=this.toObject();let o;for(const s of ms)if(e.indexOf(s)>=0){o=s;let e=0;for(const t in n)e+=this.matrix[t][s]*n[t],n[t]=0;xr(r[s])&&(e+=r[s]);const a=Math.trunc(e);t[s]=a,n[s]=(1e3*e-1e3*a)/1e3}else xr(r[s])&&(n[s]=r[s]);for(const e in n)0!==n[e]&&(t[o]+=e===o?n[e]:n[e]/this.matrix[o][e]);return ws(this.matrix,t),gs(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 gs(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return gs(this,{values:bs(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 ms)if(!t(this.values[n],e.values[n]))return!1;return!0}}const vs="Invalid Interval";class ks{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 nn("need to specify a reason the Interval is invalid");const n=e instanceof gr?e:new gr(e,t);if(pr.throwOnInvalid)throw new Xt(n);return new ks({invalid:n})}static fromDateTimes(e,t){const n=ma(e),r=ma(t),o=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?ks.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ma).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),n=[];let{s:r}=this,o=0;for(;r+this.e?this.e:e;n.push(ks.fromDateTimes(r,s)),r=s,o+=1}return n}splitBy(e){const t=Ss.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,o=1;const s=[];for(;re*o));n=+e>+this.e?this.e:e,s.push(ks.fromDateTimes(r,n)),r=n,o+=1}return s}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:ks.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return ks.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=[],o=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),s=Array.prototype.concat(...o).sort((e,t)=>e.time-t.time);for(const e of s)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!==+e.time&&r.push(ks.fromDateTimes(t,e.time)),t=null);return ks.merge(r)}difference(...e){return ks.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:vs}[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=ln,t={}){return this.isValid?So.create(this.s.loc.clone(t),e).formatInterval(this):vs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:vs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:vs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:vs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:vs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Ss.invalid(this.invalidReason)}mapEndpoints(e){return ks.fromDateTimes(e(this.s),e(this.e))}}class Es{static hasDST(e=pr.defaultZone){const t=fa.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Mn.isValidZone(e)}static normalizeZone(e){return tr(e,pr.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Yn.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Yn.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Yn.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||Yn.create(t,n,o)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:o="gregory"}={}){return(r||Yn.create(t,n,o)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||Yn.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||Yn.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Yn.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Yn.create(t,null,"gregory").eras(e)}static features(){return{relative:$r(),localeWeek:Lr()}}}function Ts(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Ss.fromMillis(r).as("days"))}function Os(e,t,n,r){let[o,s,a,i]=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=Ts(e,t);return(n-n%7)/7}],["days",Ts]],o={},s=e;let a,i;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),i=s.plus(o),i>t?(o[l]--,(e=s.plus(o))>t&&(i=e,o[l]--,e=s.plus(o))):e=i);return[e,o,i,a]}(e,t,n);const l=t-o,c=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===c.length&&(a0?Ss.fromMillis(l,r).shiftTo(...c).plus(u):u}function As(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<=o&&(t+=r-n)}}return parseInt(t,10)}return t}(e))}}const Cs=`[ ${String.fromCharCode(160)}]`,Ns=new RegExp(Cs,"g");function Ps(e){return e.replace(/\./g,"\\.?").replace(Ns,Cs)}function Rs(e){return e.replace(/\./g,"").replace(Ns," ").toLowerCase()}function Is(e,t){return null===e?null:{regex:RegExp(e.map(Ps).join("|")),deser:([n])=>e.findIndex(e=>Rs(n)===Rs(e))+t}}function xs(e,t){return{regex:e,deser:([,e,t])=>Qr(e,t),groups:t}}function Ds(e){return{regex:e,deser:([e])=>e}}const $s={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 Ls=null;function Ms(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=js(So.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class _s{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Ms(So.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=ar(t),r=ar(t,"{2}"),o=ar(t,"{3}"),s=ar(t,"{4}"),a=ar(t,"{6}"),i=ar(t,"{1,2}"),l=ar(t,"{1,3}"),c=ar(t,"{1,6}"),u=ar(t,"{1,9}"),d=ar(t,"{2,4}"),h=ar(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 Is(t.eras("short"),0);case"GG":return Is(t.eras("long"),0);case"y":return As(c);case"yy":case"kk":return As(d,Yr);case"yyyy":case"kkkk":return As(s);case"yyyyy":return As(h);case"yyyyyy":return As(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return As(i);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return As(r);case"MMM":return Is(t.months("short",!0),1);case"MMMM":return Is(t.months("long",!0),1);case"LLL":return Is(t.months("short",!1),1);case"LLLL":return Is(t.months("long",!1),1);case"o":case"S":return As(l);case"ooo":case"SSS":return As(o);case"u":return Ds(u);case"uu":return Ds(i);case"uuu":case"E":case"c":return As(n);case"a":return Is(t.meridiems(),0);case"EEE":return Is(t.weekdays("short",!1),1);case"EEEE":return Is(t.weekdays("long",!1),1);case"ccc":return Is(t.weekdays("short",!0),1);case"cccc":return Is(t.weekdays("long",!0),1);case"Z":case"ZZ":return xs(new RegExp(`([+-]${i.source})(?::(${r.source}))?`),2);case"ZZZ":return xs(new RegExp(`([+-]${i.source})(${r.source})?`),2);case"z":return Ds(/[a-z_+-/]{1,256}?/i);case" ":return Ds(/[^\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 o in n)if(_r(n,o)){const s=n[o],a=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,o,s]=n?function(e){let t,n=null;Ir(e.z)||(n=Mn.create(e.z)),Ir(e.Z)||(n||(n=new Qn(e.Z)),t=e.Z),Ir(e.q)||(e.M=3*(e.q-1)+1),Ir(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),Ir(e.u)||(e.S=Br(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(_r(n,"a")&&_r(n,"H"))throw new en("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:o,specificOffset:s}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Fs(e,t,n){return new _s(e,n).explainFromTokens(t)}function js(e,t){if(!e)return null;const n=So.create(t,e).dtFormatter((Ls||(Ls=fa.fromMillis(1555555555555)),Ls)),r=n.formatToParts(),o=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:o}=e;if("literal"===r){const e=/^\s+$/.test(o);return{literal:!e,val:e?" ":o}}const s=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let i=$s[a];if("object"==typeof i&&(i=i[s]),i)return{literal:!1,val:i}}(t,e,o))}const qs="Invalid DateTime",Us=864e13;function Vs(e){return new gr("unsupported zone",`the zone "${e.name}" is not supported`)}function Bs(e){return null===e.weekData&&(e.weekData=Tr(e.c)),e.weekData}function Ws(e){return null===e.localWeekData&&(e.localWeekData=Tr(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function zs(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new fa({...n,...t,old:n})}function Hs(e,t,n){let r=e-60*t*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=60*(o-t)*1e3;const s=n.offset(r);return o===s?[r,o]:[e-60*Math.min(o,s)*1e3,Math.max(o,s)]}function Zs(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 Js(e,t,n){return Hs(Jr(e),t,n)}function Gs(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:r,month:o,day:Math.min(e.c.day,Zr(r,o))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=Ss.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"),i=Jr(s);let[l,c]=Hs(i,n,e.zone);return 0!==a&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function Ks(e,t,n,r,o,s){const{setZone:a,zone:i}=n;if(e&&0!==Object.keys(e).length||t){const r=t||i,o=fa.fromObject(e,{...n,zone:r,specificOffset:s});return a?o:o.setZone(i)}return fa.invalid(new gr("unparsable",`the input "${o}" can't be parsed as ${r}`))}function Ys(e,t,n=!0){return e.isValid?So.create(Yn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Xs(e,t,n){const r=e.c.year>9999||e.c.year<0;let o="";if(r&&e.c.year>=0&&(o+="+"),o+=qr(e.c.year,r?6:4),"year"===n)return o;if(t){if(o+="-",o+=qr(e.c.month),"month"===n)return o;o+="-"}else if(o+=qr(e.c.month),"month"===n)return o;return o+=qr(e.c.day),o}function Qs(e,t,n,r,o,s,a){let i=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=qr(e.c.hour),"hour"===a)break;if(t){if(l+=":",l+=qr(e.c.minute),"minute"===a)break;i&&(l+=":",l+=qr(e.c.second))}else{if(l+=qr(e.c.minute),"minute"===a)break;i&&(l+=qr(e.c.second))}if("second"===a)break;!i||r&&0===e.c.millisecond||(l+=".",l+=qr(e.c.millisecond,3))}return o&&(e.isOffsetFixed&&0===e.offset&&!s?l+="Z":e.o<0?(l+="-",l+=qr(Math.trunc(-e.o/60)),l+=":",l+=qr(Math.trunc(-e.o%60))):(l+="+",l+=qr(Math.trunc(e.o/60)),l+=":",l+=qr(Math.trunc(e.o%60)))),s&&(l+="["+e.zone.ianaName+"]"),l}const ea={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ta={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},na={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ra=["year","month","day","hour","minute","second","millisecond"],oa=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],sa=["year","ordinal","hour","minute","second","millisecond"];function aa(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 tn(e);return t}function ia(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return aa(e)}}function la(e,t){const n=tr(t.zone,pr.defaultZone);if(!n.isValid)return fa.invalid(Vs(n));const r=Yn.fromObject(t);let o,s;if(Ir(e.year))o=pr.now();else{for(const t of ra)Ir(e[t])&&(e[t]=ea[t]);const t=Pr(e)||Rr(e);if(t)return fa.invalid(t);const r=function(e){if(void 0===da&&(da=pr.now()),"iana"!==e.type)return e.offset(da);const t=e.name;let n=ha.get(t);return void 0===n&&(n=e.offset(da),ha.set(t,n)),n}(n);[o,s]=Js(e,r,n)}return new fa({ts:o,zone:n,loc:r,o:s})}function ca(e,t,n){const r=!!Ir(n.round)||n.round,o=Ir(n.rounding)?"trunc":n.rounding,s=(e,s)=>{e=Wr(e,r||n.calendary?0:2,n.calendary?"round":o);return t.loc.clone(n).relFormatter(n).format(e,s)},a=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 s(a(n.unit),n.unit);for(const e of n.units){const t=a(e);if(Math.abs(t)>=1)return s(t,e)}return s(e>t?-0:0,n.units[n.units.length-1])}function ua(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 da;const ha=new Map;class fa{constructor(e){const t=e.zone||pr.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new gr("invalid input"):null)||(t.isValid?null:Vs(t));this.ts=Ir(e.ts)?pr.now():e.ts;let r=null,o=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,o]=[e.old.c,e.old.o];else{const s=xr(e.o)&&!e.old?e.o:t.offset(this.ts);r=Zs(this.ts,s),n=Number.isNaN(r.year)?new gr("invalid input"):null,r=n?null:r,o=n?null:s}}this._zone=t,this.loc=e.loc||Yn.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=o,this.isLuxonDateTime=!0}static now(){return new fa({})}static local(){const[e,t]=ua(arguments),[n,r,o,s,a,i,l]=t;return la({year:n,month:r,day:o,hour:s,minute:a,second:i,millisecond:l},e)}static utc(){const[e,t]=ua(arguments),[n,r,o,s,a,i,l]=t;return e.zone=Qn.utcInstance,la({year:n,month:r,day:o,hour:s,minute:a,second:i,millisecond:l},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 fa.invalid("invalid input");const o=tr(t.zone,pr.defaultZone);return o.isValid?new fa({ts:n,zone:o,loc:Yn.fromObject(t)}):fa.invalid(Vs(o))}static fromMillis(e,t={}){if(xr(e))return e<-Us||e>Us?fa.invalid("Timestamp out of range"):new fa({ts:e,zone:tr(t.zone,pr.defaultZone),loc:Yn.fromObject(t)});throw new nn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(xr(e))return new fa({ts:1e3*e,zone:tr(t.zone,pr.defaultZone),loc:Yn.fromObject(t)});throw new nn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=tr(t.zone,pr.defaultZone);if(!n.isValid)return fa.invalid(Vs(n));const r=Yn.fromObject(t),o=to(e,ia),{minDaysInFirstWeek:s,startOfWeek:a}=Nr(o,r),i=pr.now(),l=Ir(t.specificOffset)?n.offset(i):t.specificOffset,c=!Ir(o.ordinal),u=!Ir(o.year),d=!Ir(o.month)||!Ir(o.day),h=u||d,f=o.weekYear||o.weekNumber;if((h||c)&&f)throw new en("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new en("Can't mix ordinal dates with month/day");const m=f||o.weekday&&!h;let p,g,y=Zs(i,l);m?(p=oa,g=ta,y=Tr(y,s,a)):c?(p=sa,g=na,y=Ar(y)):(p=ra,g=ea);let w=!1;for(const e of p){Ir(o[e])?o[e]=w?g[e]:y[e]:w=!0}const b=m?function(e,t=4,n=1){const r=Dr(e.weekYear),o=jr(e.weekNumber,1,Kr(e.weekYear,t,n)),s=jr(e.weekday,1,7);return r?o?!s&&br("weekday",e.weekday):br("week",e.weekNumber):br("weekYear",e.weekYear)}(o,s,a):c?function(e){const t=Dr(e.year),n=jr(e.ordinal,1,Hr(e.year));return t?!n&&br("ordinal",e.ordinal):br("year",e.year)}(o):Pr(o),S=b||Rr(o);if(S)return fa.invalid(S);const v=m?Or(o,s,a):c?Cr(o):o,[k,E]=Js(v,l,n),T=new fa({ts:k,zone:n,o:E,loc:r});return o.weekday&&h&&e.weekday!==T.weekday?fa.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${T.toISO()}`):T.isValid?T:fa.invalid(T.invalid)}static fromISO(e,t={}){const[n,r]=function(e){return To(e,[Ko,es],[Yo,ts],[Xo,ns],[Qo,rs])}(e);return Ks(n,r,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,r]=function(e){return To(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Bo,Wo])}(e);return Ks(n,r,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,r]=function(e){return To(e,[zo,Jo],[Ho,Jo],[Zo,Go])}(e);return Ks(n,r,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Ir(e)||Ir(t))throw new nn("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:o=null}=n,s=Yn.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),[a,i,l,c]=function(e,t,n){const{result:r,zone:o,specificOffset:s,invalidReason:a}=Fs(e,t,n);return[r,o,s,a]}(s,e,t);return c?fa.invalid(c):Ks(a,i,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return fa.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,r]=function(e){return To(e,[ss,es],[as,is])}(e);return Ks(n,r,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new nn("need to specify a reason the DateTime is invalid");const n=e instanceof gr?e:new gr(e,t);if(pr.throwOnInvalid)throw new Yt(n);return new fa({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=js(e,Yn.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return Ms(So.parseFormat(e),Yn.fromObject(t)).map(e=>e.val).join("")}static resetCache(){da=void 0,ha.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?Bs(this).weekYear:NaN}get weekNumber(){return this.isValid?Bs(this).weekNumber:NaN}get weekday(){return this.isValid?Bs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ws(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ws(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ws(this).weekYear:NaN}get ordinal(){return this.isValid?Ar(this.c).ordinal:NaN}get monthShort(){return this.isValid?Es.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Es.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Es.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Es.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=Jr(this.c),r=this.zone.offset(n-e),o=this.zone.offset(n+e),s=this.zone.offset(n-r*t),a=this.zone.offset(n-o*t);if(s===a)return[this];const i=n-s*t,l=n-a*t,c=Zs(i,s),u=Zs(l,a);return c.hour===u.hour&&c.minute===u.minute&&c.second===u.second&&c.millisecond===u.millisecond?[zs(this,{ts:i}),zs(this,{ts:l})]:[this]}get isInLeapYear(){return zr(this.year)}get daysInMonth(){return Zr(this.year,this.month)}get daysInYear(){return this.isValid?Hr(this.year):NaN}get weeksInWeekYear(){return this.isValid?Kr(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Kr(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:r}=So.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(Qn.instance(e),t)}toLocal(){return this.setZone(pr.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=tr(e,pr.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]=Js(n,t,e)}return zs(this,{ts:r,zone:e})}return fa.invalid(Vs(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return zs(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=to(e,ia),{minDaysInFirstWeek:n,startOfWeek:r}=Nr(t,this.loc),o=!Ir(t.weekYear)||!Ir(t.weekNumber)||!Ir(t.weekday),s=!Ir(t.ordinal),a=!Ir(t.year),i=!Ir(t.month)||!Ir(t.day),l=a||i,c=t.weekYear||t.weekNumber;if((l||s)&&c)throw new en("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&s)throw new en("Can't mix ordinal dates with month/day");let u;o?u=Or({...Tr(this.c,n,r),...t},n,r):Ir(t.ordinal)?(u={...this.toObject(),...t},Ir(t.day)&&(u.day=Math.min(Zr(u.year,u.month),u.day))):u=Cr({...Ar(this.c),...t});const[d,h]=Js(u,this.o,this.zone);return zs(this,{ts:d,o:h})}plus(e){if(!this.isValid)return this;return zs(this,Gs(this,Ss.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return zs(this,Gs(this,Ss.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},r=Ss.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&&(i+="T"),i+=Qs(this,a,t,n,r,o,s),i}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?Xs(this,"extended"===e,aa(t)):null}toISOWeekDate(){return Ys(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:o=!1,format:s="extended",precision:a="milliseconds"}={}){if(!this.isValid)return null;return a=aa(a),(r&&ra.indexOf(a)>=3?"T":"")+Qs(this,"extended"===s,t,e,n,o,a)}toRFC2822(){return Ys(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ys(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Xs(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")),Ys(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():qs}[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 Ss.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=(i=t,Array.isArray(i)?i:[i]).map(Ss.normalizeUnit),s=e.valueOf()>this.valueOf(),a=Os(s?this:e,s?e:this,o,r);var i;return s?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(fa.now(),e,t)}until(e){return this.isValid?ks.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(t,n)<=r&&r<=o.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||fa.fromObject({},{zone:this.zone}),n=e.padding?thise.valueOf(),Math.min)}static max(...e){if(!e.every(fa.isDateTime))throw new nn("max requires all arguments be DateTimes");return Mr(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:r=null,numberingSystem:o=null}=n;return Fs(Yn.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return fa.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:r=null}=t,o=Yn.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new _s(o,e)}static fromFormatParser(e,t,n={}){if(Ir(e)||Ir(t))throw new nn("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:o=null}=n,s=Yn.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});if(!s.equals(t.locale))throw new nn(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${t.locale}`);const{result:a,zone:i,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?fa.invalid(c):Ks(a,i,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return ln}static get DATE_MED(){return cn}static get DATE_MED_WITH_WEEKDAY(){return un}static get DATE_FULL(){return dn}static get DATE_HUGE(){return hn}static get TIME_SIMPLE(){return fn}static get TIME_WITH_SECONDS(){return mn}static get TIME_WITH_SHORT_OFFSET(){return pn}static get TIME_WITH_LONG_OFFSET(){return gn}static get TIME_24_SIMPLE(){return yn}static get TIME_24_WITH_SECONDS(){return wn}static get TIME_24_WITH_SHORT_OFFSET(){return bn}static get TIME_24_WITH_LONG_OFFSET(){return Sn}static get DATETIME_SHORT(){return vn}static get DATETIME_SHORT_WITH_SECONDS(){return kn}static get DATETIME_MED(){return En}static get DATETIME_MED_WITH_SECONDS(){return Tn}static get DATETIME_MED_WITH_WEEKDAY(){return On}static get DATETIME_FULL(){return An}static get DATETIME_FULL_WITH_SECONDS(){return Cn}static get DATETIME_HUGE(){return Nn}static get DATETIME_HUGE_WITH_SECONDS(){return Pn}}function ma(e){if(fa.isDateTime(e))return e;if(e&&e.valueOf&&xr(e.valueOf()))return fa.fromJSDate(e);if(e&&"object"==typeof e)return fa.fromObject(e);throw new nn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}function pa(){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,o,s)=>{const{property:a,element:i}=t,l=`aco-${a}-wrapper-${n}`;if(window?.addClassToElement){window.addClassToElement(l,n,o,s,t)}e(i)||i.classList.contains("aco-image-wrapper")||i.classList.add(l),i.attributes.getNamedItem(`aco-${o}-id`)||i.setAttribute(`aco-${o}-id`,s+""),!i.attributes.getNamedItem("aco-product-id")&&n&&i.setAttribute("aco-product-id",n+""),!i.attributes.getNamedItem("aco-product-handle")&&r&&i.setAttribute("aco-product-handle",r)},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)):[]},addTimerAttrToElement:(e,t)=>{if(!e||!t?.timerOptions)return e;const n=t.timerOptions,{setupTimerOptions:r}=window;if(r)return r(n,e);try{if(n.status){e.setAttribute("aco-timer-enabled","true");const t=n.timezone||"(UTC+00:00) UTC",r=t.includes(") ")?t.split(") ").at(-1)||"UTC":t,o=String(n.endDate||""),s=o.includes("T")?o.split("T")[0]:o,[a,i]=(n.endTime||"00:00").split(":").map(e=>parseInt(e,10)),l=fa.fromFormat(`${s} ${(n.endTime||"00:00").slice(0,5)}`,"yyyy-LL-dd HH:mm",{zone:r}).set({hour:Number.isNaN(a)?0:a,minute:Number.isNaN(i)?0:i,second:0,millisecond:0}),c=l.isValid?l.toMillis():new Date(n.endDate).getTime(),u=c{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," "),o=n.length>1?n[1]:"";if(o.length>2)o=o.substring(0,2);else for(;o.length<2;)o+="0";return r+"."+o},checkImageTag:(e,t,n)=>{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 o=r.split("_"),s=o.length;for(let n=0;n{const t=e.split("?")[0].split("#")[0].split("/").pop()||e,o=t.replace(/\.[^/.]+$/,"");return t.toLowerCase()===n||o.toLowerCase()===r}))return!0;if(o.pop(),0===o.length)return!1}}}catch(e){return!1}},addFeaturedAttrToElement:(e,t)=>{if(!e||!t?.configurations)return e;return t.configurations.onlyOnFeaturedImage&&(e.setAttribute("aco-only-on-featured-image","true"),window.acoOnlyOnFeaturedImageEnabled=!0),e},addDisabledBlockAttrToElement:(e,t)=>{if(!e||!t?.configurations)return e;const n=t.configurations.disabledBlocks;return n&&n.length>0&&e.setAttribute("aco-disabled-blocks",JSON.stringify(n)),e},addHiddenClasses:(e,t)=>{if(!e||!t?.configurations)return e;const n=t.configurations,{mobileHiddenClass:r="mobile-hidden",desktopHiddenClass:o="desktop-hidden"}=window;return n.onlyOnDesktop?e.classList.add(r):n.onlyOnMobile&&e.classList.add(o),e},addToolTipElements:(e,t)=>{if(!e||!t?.configurations)return e;const n=t.configurations.tooltip,{toolTipParentClass:r="tooltip-box",toolTipContentClass:o="tooltip-content"}=window;if(n.status){const t=`tooltip-${n.direction}-${Date.now()}`,s=document.createElement("div");s.classList.add(r),s.setAttribute("id",t),s.setAttribute("role","tooltip"),s.setAttribute("direction",n.direction);const a=document.createElement("span");a.classList.add(o),a.textContent=n.content,s.appendChild(a),e.appendChild(s),e.classList.add("aco-tooltip",`aco-tooltip-${n.direction}`),e.setAttribute("role","img"),e.setAttribute("aria-label",n.content),e.setAttribute("tabindex","0"),e.setAttribute("aria-describedby",t)}return e}})}const ga=new Map,ya=e=>{const t=Array.from(e.classList).find(e=>e.startsWith("animate__"));if(!t)return;const n=t.slice(9);if(!n||"none"===n)return;const r=parseFloat(e.style.animationDuration||"0");if(!r||r<=0)return;const o=e.closest("[aco-sticker-id]")?.getAttribute("aco-sticker-id")||e.id||`${n}:${r}`;ga.has(o)||ga.set(o,performance.now());const s=-(performance.now()-ga.get(o))%(1e3*r)/1e3;e.style.setProperty("animation-delay",`${s}s`)},wa=e=>{if(!e)return;var t;t=e,Array.from(t.classList).some(e=>e.startsWith("animate__"))&&ya(e),e.querySelectorAll("[class*='animate__']").forEach(ya)},ba=(e,t="aco-")=>{const n=e.attributes;Array.from(n).forEach(n=>{n.name.startsWith(t)&&e.removeAttribute(n.name)})},Sa=()=>labelerCdnData.badges.concat(labelerCdnData.labels).filter(e=>e.isActivated),va=()=>{labelerCdnData.badges.forEach(e=>e.isActivated=!0),labelerCdnData.labels.forEach(e=>e.isActivated=!0)},ka=new Set,Ea=new Set,Ta=async(e,t)=>{let n="";const r=sessionStorage.getItem(`svg-${e}`);if(r)n=r;else{const t=await g(`https://cdn.labeler.apps.acowebs.com/${e}`);if(!t.ok)return void Ea.add(e);n=await t.text(),sessionStorage.setItem(`svg-${e}`,n)}const o=(new DOMParser).parseFromString(n,"image/svg+xml").querySelector("svg");return o&&(o.style.setProperty("width","100%"),o.style.setProperty("height","100%"),t&&(t.shape&&t.shape.forEach((e,t)=>{e.key||console.log("shape key is missing",e,t),o.querySelectorAll(`#${e.key}`).forEach(t=>{t?.setAttribute("linearGradient"==e.type?"stop-color":"fill",e.fill),t?.setAttribute("fill-opacity",e?.opacity?.toString()),"rect"!=e.type||e?.stroke||t?.setAttribute("stroke","none")})}),t.text&&t.text.forEach(e=>{o.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)"),ka.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),ka.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)})}))),o};let Oa=new Map,Aa=new Set,Ca=!1;const Na=(e,t,n)=>{const r=document.createElement("a");return r.href=e,r.target=t,r.setAttribute("aco-visited","true"),r.setAttribute("aco-ignore","true"),r.rel="noopener noreferrer",r.appendChild(n.cloneNode(!0)),r.cloneNode(!0)};var Pa;!function(e){e._blank="_blank",e._self="_self"}(Pa||(Pa={}));let Ra={link:{status:!1,href:"",target:Pa._blank},priority:1,tooltip:{status:!1,content:"",direction:"right"},onlyOnFeaturedImage:!1,onlyOnDesktop:!1,onlyOnMobile:!1,showOnAllDevices:!0,customCss:{status:!1,css:""}};const Ia=pa(),xa=(e,t)=>{if(!t.customCss.status)return;if(document.getElementById(`aco-custom-css-${e}`))return;let n=t.customCss.css;n=n.replaceAll("aco-box",`aco-box[aco-sticker-id="${e}"]`);const r=document.createElement("style");r.type="text/css",r.id=`aco-custom-css-${e}`,r.appendChild(document.createTextNode(n)),document.head.appendChild(r)},Da=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 o=document.createElement("div");const s={...Ra,...t?.options?.configurations},a=t.style,i="percentage"===a.type?`${a.width}%`:`${a.width}px`,l="percentage"===a.type&&"LABEL"!==n?`${a.height}%`:`${a.height}px`,c=a.aspectRatio?"auto":l;if(!0===t.svgToStoreFront&&t.svgUrl){let e=await Ta(t.svgUrl,{...t.style.svgStyle});if(!e)continue;a.aspectRatio?(e.style.objectFit="contain",e.setAttribute("preserveAspectRatio","xMidYMid meet"),o.style.minHeight="10px"):(e.setAttribute("preserveAspectRatio","none"),e.style.objectFit="fill"),o.style.overflow="unset",e.style.setProperty("transform",`rotate(${a.angle}deg)`),e.classList.add("aco-image"),e.classList.add("aco-svg"),e&&o.appendChild(e)}else if(!Oa.has(e)||window.ignoreImageCaching){if(Aa.has(e))continue;const n=new Image;n.className="aco-image",n.alt=t?.title;try{const t=await g(e);let r;if(!t.ok){Aa.add(e);continue}r=await t.blob();const s=URL.createObjectURL(r),i=window.ignoreImageCaching?e:s;n.src=i,Oa.set(e,n),n.style.setProperty("object-fit",a.aspectRatio?"contain":"fill"),a.aspectRatio&&(o.style.minHeight="10px"),n.style.setProperty("transform",`rotate(${a.angle}deg)`),Oa.set(e,n),o.appendChild(n)}catch(t){Aa.add(e);continue}}else{const t=Oa.get(e);if(t){const e=t.cloneNode(!0);e.style.setProperty("transform",`rotate(${a.angle}deg)`),e.style.setProperty("object-fit",a.aspectRatio?"contain":"fill"),a.aspectRatio&&o.style.setProperty("min-height","10px"),o.appendChild(e)}}const u="percentage"===a.type?`${a.margin?.top}%`:`${a.margin?.top}px`,d="percentage"===a.type?`${a.margin?.left}%`:`${a.margin?.left}px`,h="percentage"===a.type?`${a.margin?.right}%`:`${a.margin?.right}px`,f="percentage"===a.type?`${a.margin?.bottom}%`:`${a.margin?.bottom}px`;let m={};switch(a.position){case"LT":case"LC":m={top:u,left:d,right:"unset",bottom:"unset"};break;case"TC":m={top:u,left:d.includes("%")?parseFloat(d)-parseFloat(i)/2+"%":d,bottom:"unset",right:"unset"};break;case"RT":case"RC":m={top:u,right:h,left:"unset",bottom:"unset"};break;case"LB":m={bottom:f,left:d,right:"unset",top:"unset"};break;case"BC":m={bottom:f,left:d.includes("%")?parseFloat(d)-parseFloat(i)/2+"%":d,right:"unset",top:"unset"};break;case"RB":m={bottom:f,right:h,left:"unset",top:"unset"};break;case"belowProductName":case"belowProductPrice":case"belowProductImage":m={margin:`${u} 0 ${f} 0`}}o.classList.add("aco-box"),o.setAttribute("aco-sticker-id",t.id),o.setAttribute("aco-og-image-url",t.imageUrl),Ia.addFeaturedAttrToElement(o,t.options),Ia.addDisabledBlockAttrToElement(o,t.options),Ia.addHiddenClasses(o,t.options),Ia.addToolTipElements(o,t.options),Ia.addTimerAttrToElement(o,t.options),o.id=t.id,o.style.width=i,o.style.setProperty("height",c,"important");for(const[e,t]of Object.entries(m))o.style.setProperty(e,t);const p=o.querySelector(".aco-image");p.style.setProperty("opacity",a.opacity+""),p.classList.add(`animate__${a.animation.name}`),p.style.setProperty("animation-duration",a.animation.duration+"s"),p.style.setProperty("animation-iteration-count",a.animation.iteration),ya(p);const y=1e4-s.priority;if(o.style.setProperty("z-index",`${y}`),window.acoBoxElementCreator&&(o=window.acoBoxElementCreator(o,m,c,i)),s.link.status)try{const e=s.link;o.setAttribute("aco-clickable","true");const t=o.querySelector(".aco-image"),n=Na(e.href,e.target,t);o.replaceChild(n,t)}catch(e){}if("LABEL"!==n)r.appendChild(o);else{switch(o.style.setProperty("position","relative"),r.style.setProperty("justify-content","space-between"),a.alignment){case"left":default:r.querySelector(".aco-left-label")?.appendChild(o),r.querySelector(".aco-left-label")?.style.setProperty("width","100%"),Ca||(r.querySelector(".aco-left-label")?.style.setProperty("position","relative"),Ca=!0);break;case"right":r.querySelector(".aco-right-label")?.appendChild(o),r.querySelector(".aco-right-label")?.style.setProperty("width","100%"),Ca||(r.querySelector(".aco-right-label")?.style.setProperty("position","relative"),Ca=!0);break;case"center":r.querySelector(".aco-center-label")?.appendChild(o),r.querySelector(".aco-center-label")?.style.setProperty("width","100%"),Ca||(r.querySelector(".aco-center-label")?.style.setProperty("position","relative"),Ca=!0)}}xa(t.id,s)}return Ca=!1,r};let $a=new Map,La=new Set,Ma=new Set;const _a=async e=>{const t=document.createElement("div");return t.className="aco-badge-wrapper",await Da(e,t)},Fa=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),o=e.filter(e=>"belowProductImage"===e.style.position);t.className="aco-label-wrapper";let s=[];if(n.length>0){const e=await Da(n,t.cloneNode(!0),"LABEL");s.push({position:"belowProductName",element:e})}if(r.length>0){const e=await Da(r,t.cloneNode(!0),"LABEL");s.push({position:"belowProductPrice",element:e})}if(o.length>0){const e=await Da(o,t.cloneNode(!0),"LABEL");s.push({position:"belowProductImage",element:e})}return s},ja=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 Da([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`),Ma.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),Ma.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},qa=e=>{const t=decodeURIComponent(e).indexOf("/products");return-1===t?null:decodeURIComponent(e).slice(t)?.split("/").pop()?.split("?")[0]?.split("#")[0]?.split("&")[0]};function Ua(e){return null==e?"":String(e)}function Va(e,t){const n=Ua(e);return n.startsWith("gid://shopify/")?n.split("/").pop()||"":n}function Ba(e){const t=Ua(e);return t.startsWith("gid://shopify/ProductVariant/")?t:`gid://shopify/ProductVariant/${Va(e)}`}function Wa(e,t){return Va(e??"")===Va(t??"")}function za(e,t){return Va(e??"")===Va(t??"")}function Ha(e,t){return!(!t||!e?.length)&&e.some(e=>{return n=t,Va(e??"")===Va(n??"");var n})}function Za(e){const t=window.Shopify.currency.rate;return t?e*parseFloat(t):e}function Ja(e,t){return e>=Za(+t.min)&&e<=Za(+t.max)}function Ga(e,t){const n=new Date,r=e.split(" ")[0],o=new Date(r),s=n.getTime()-o.getTime();return Math.floor(s/864e5)<=+t}function Ka(e,t){return t.includes(e)}const Ya=(e,t)=>{const n=decodeURIComponent(window.location.pathname),r=qa(n),o=new URLSearchParams(window.location.search).get("variant"),s=Ba(o||(t.first_variant?.id??t.variants[0].id));const{checkCustomRules:a=()=>({})}=labeler,i={checkAllProducts:function(){return e.allProducts},checkSpecificProducts:function(){return!!e.specificProducts.length&&(n=e.specificProducts,!(!(r=t.id)||!n?.length)&&n.some(e=>Wa(e,r)));var n,r},checkSpecificVariants:function(){if(e.specificVariants.length){if(window.checkSpecificVariantRule)return window.checkSpecificVariantRule(t,s,r,n);for(let o of e.specificVariants){if(n.includes("/products")&&r===t.handle&&Wa(o.id,t.id)&&o.variants&&o.variants.some(e=>za(e.id,s)))return!0;if(!n.includes("/products")&&Wa(o.id,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=>Ha(n,e.id))&&!t.collections.some(e=>Ha(r,e.id)):!t.collections.some(e=>Ha(r,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||Ka(t.vendor,r),Ka(t.vendor,n)&&!Ka(t.vendor,r)},checkProductType:function(){const n=e.productType?.includeTypes||[],r=e.productType?.excludeTypes||[];return n.length||Ka(t.productType,r),Ka(t.productType,n)&&!Ka(t.productType,r)},checkPriceRange:function(){return t.variants.some(t=>{const n=t.price.amount.split("").filter(e=>","===e||"."===e).at(-1);return Ja("."===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)&&Ga(t.createdAt,e.comingSoon)},checkNewArrival:function(){return Ga(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?Ka(e,t)&&!Ka(e,n):!Ka(e,n)}return!1},checkPublishedDate:()=>{const{publishedDate:n}=e,r=new Date(n.from),o=new Date(n.to),s=new Date(t.publishedAt);return s.getTime()>=r.setHours(0,0,0,0)&&s.getTime()<=o.setHours(23,59,0,0)},...a({rules:e,product:t,variantId:s,handle:r,currentPage:n})};return Object.freeze(i)};function Xa(e){return/^\/([a-z]{2}(-[a-z]{2,6})?)?\/?$/.test(e)}const Qa=(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:Xa,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,o=Ya(r,t),s=o.checkAllProducts(),a=o.checkSpecificProducts(),i=o.checkSpecificVariants(),l=o.checkSpecificCollection(),c=o.checkSpecificTags(),u=o.checkProductVendor(),d=o.checkProductType(),h=o.checkPriceRange(),f=o.checkComingSoon(),m=o.checkNewArrival(),p=o.checkInStock(),g=o.checkLowStock(),y=o.checkOutOfStock(),w=o.checkCountryRestriction(),b=o.checkPublishedDate();let S={};S.allProducts=!!s,S.specificProducts=!(!a||s),S={...S,specificVariants:i,specificCollection:l,specificTags:c,productVendor:u,productType:d,priceRange:h,comingSoon:f,newArrivals:m,inStock:p,lowStock:g,outOfStock:y,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)=>Qa(e,t,!0);const ei=Qa,ti=()=>Object.freeze({getMatchingVariantImages:(e,t)=>t.variants.filter(t=>e.rules.specificVariants.some(e=>!!e.variants&&e.variants.some(e=>za(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=>Wa(e.id,t.id))?t.variants.filter(e=>r.rules.specificVariants.some(t=>t.variants.some(t=>za(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}}),ni=ti(),ri=decodeURIComponent(window.location.pathname);let oi=new Map,si=new Set;const ai=async(e,t,n=window.aco_debug)=>{const r=[];for(const o of t){if(n&&console.log("Product start --\x3e ",o.handle),si.has(o.handle))continue;if(oi.has(o.handle)){const e=new URLSearchParams(window.location.search).get("variant"),t=e?o.variants.find(t=>za(t.id,e)):o.variants[0],n=t?.image?.url||o?.featuredImage?.url||o?.featuredImage;let s=oi.get(o.handle);oi.set(o.handle,{...s,...e&&{featuredImage:n}}),r.push({...s,...e&&{featuredImage:n},element:s.element.cloneNode(!0)});continue}const t=[];for(const r of e)n&&console.log("\tBadge start --\x3e ",r.title),ei(r,o)&&t.push(r);if(!t.length){si.add(o.handle);continue}n&&console.log("\tList of badges --\x3e ",t);let s=t.reduce((e,t)=>e.concat(0!==t.rules.specificVariants.length&&t.rules.selected.includes("specificVariants")?ni.getMatchingVariantImages(t,o):o.images),[]);window.addAllImagesOnBadgeData&&(s=o.images),n&&console.log("\tImage src --\x3e ",s);const a=t.reduce((e,t)=>(t.rules.scheduler.status&&e.push({badgeId:t.id,schedule:t.rules.scheduler}),e),[]);n&&console.log("\tScheduled Stickers --\x3e ",a);const i=await _a(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)return;const t=Array.from(i.childNodes).find(t=>t.id===e.id),r=t?.querySelector("#tchange");if(!r)return;let s=(parseFloat(o.compareAtPriceRange.minVariantPrice.amount.replaceAll(",",""))-parseFloat(o.priceRange.minVariantPrice.amount.replaceAll(",","")))/parseFloat(o.compareAtPriceRange.minVariantPrice.amount.replaceAll(",",""))*100;if(n&&console.log("\t\t Sale On Calculated percentage --\x3e ",s),ri.includes("/products")&&ri.includes(o.handle)){const e=new URLSearchParams(window.location.search).get("variant"),t=Ba(e||(o.first_variant?.id??o.variants[0].id)),r=o.variants.find(e=>za(e.id,t));r&&(s=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 ",s))}s=s!==1/0&&s!==-1/0?+s.toFixed(2):0,n&&console.log("\t\t Sale On final Calculated percentage --\x3e ",s),n&&console.log("\t\t is Sale on valid --\x3e ",!(se.options.percentageInBetweenForSaleOn.max)),(se.options.percentageInBetweenForSaleOn.max)&&t.remove(),r.textContent=Math.round(s)+"%"}),n&&console.log("Product end --\x3e ",o.handle);const c=new URLSearchParams(window.location.search).get("variant"),u=c?o.variants.find(e=>za(e.id,c)):o.variants[0],d=u?.image?.url||o.featuredImage?.url||o.featuredImage;r.push({badgeId:t[0].id,includedBadges:t.map(e=>e.title),productId:o.id,element:i,handle:o.handle,productTitle:o.title,options:t[0].options,imageSrc:s,scheduledStickers:a,featuredImage:d}),oi.set(o.handle,{badgeId:t[0].id,includedBadges:t.map(e=>e.title),productId:o.id,element:i.cloneNode(!0),handle:o.handle,productTitle:o.title,options:t[0].options,imageSrc:s,scheduledStickers:a,featuredImage:d})}return r};labeler.badgeData=(e,t)=>ai(e,t,!0),labeler.cachedBadgeData=oi,labeler.cachedBadgeLessProducts=si;const ii=ti(),li=decodeURIComponent(window.location.pathname);let ci=new Map,ui=new Set;const di=async(e,t,n=window.aco_debug)=>{const r=[];for(const o of t){if(ui.has(o.handle))continue;if(ci.has(o.handle)){let e=ci.get(o.handle);const t=new URLSearchParams(window.location.search).get("variant"),n=t?o.variants.find(e=>za(e.id,t)):o.variants[0],s=n?.image?.url||o?.featuredImage?.url||o?.featuredImage;r.push({...e,element:e.element.map(e=>({...e,...t&&{featuredImage:s},element:e.element.cloneNode(!0)}))});continue}const t=[];for(const n of e)ei(n,o)&&t.push(n);if(!t.length){ui.add(o.handle);continue}let s=t.reduce((e,t)=>e.concat(0!==t.rules.specificVariants.length&&t.rules.selected.includes("specificVariants")?ii.getMatchingVariantImages(t,o):o.images),[]);window.addAllImagesOnLabelData&&(s=o.images);const a=ii.generatePriceList(t,o),i=t.reduce((e,t)=>(t.rules.scheduler.status&&e.push({labelId:t.id,schedule:t.rules.scheduler}),e),[]),l=await Fa(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)for(let t of l)for(const r of t.element.childNodes){const t=Array.from(r.childNodes).find(t=>t.id===e.id),s=t?.querySelector("#tchange");if(!s)continue;let a=(parseFloat(o.compareAtPriceRange.minVariantPrice.amount.replaceAll(",",""))-parseFloat(o.priceRange.minVariantPrice.amount.replaceAll(",","")))/parseFloat(o.compareAtPriceRange.minVariantPrice.amount.replaceAll(",",""))*100;if(n&&console.log("\t\t Sale On Calculated percentage --\x3e ",a),li.includes("/products")&&li.includes(o.handle)){const e=new URLSearchParams(window.location.search).get("variant"),t=Ba(e||(o.first_variant?.id??o.variants[0].id)),r=o.variants.find(e=>za(e.id,t));r&&(a=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 ",a))}a=a!==1/0&&a!==-1/0?+a.toFixed(2):0,n&&console.log("\t\t Sale On final Calculated percentage --\x3e ",a),n&&console.log("\t\t is Sale on valid --\x3e ",!(ae.options.percentageInBetweenForSaleOn.max)),(ae.options.percentageInBetweenForSaleOn.max)&&t.remove(),s.textContent=Math.round(a)+"%"}});const u=new URLSearchParams(window.location.search).get("variant"),d=u?o.variants.find(e=>za(e.id,u)):o.variants[0],h=d?.image?.url||o.featuredImage?.url||o.featuredImage;r.push({labelId:t[0].id,includedLabels:t.map(e=>e.title),productId:o.id,element:l,handle:o.handle,productTitle:o.title,options:t[0].options,imageSrc:s,priceList:a,scheduledStickers:i,featuredImage:h}),ci.set(o.handle,{labelId:t[0].id,includedLabels:t.map(e=>e.title),productId:o.id,element:l.map(e=>({position:e.position,element:e.element.cloneNode(!0)})),options:t[0].options,handle:o.handle,productTitle:o.title,imageSrc:s,priceList:a,scheduledStickers:i,featuredImage:h})}return r};labeler.labelData=di,labeler.cachedLabelData=ci,labeler.cachedLabelLessProducts=ui;let hi=decodeURIComponent(window.location.pathname).includes("/products");const fi=async e=>{if(!hi)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"),Ma.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),Ma.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 o=`https://cdn.labeler.apps.acowebs.com/${t}`;if("svg"===o.split(".").pop()){let n=window.Shopify.shop;if(!o.includes(n)&&"normal"!==e.style.badgeType){let t=o.split("/");t[t.length-1]=`${e.style.badgeType}_${t.at(-1)}`,o=t.join("/")}let s="";const a=sessionStorage.getItem(`svg-${t}`);if(a)s=a;else{const e=await g(o);if(!e.ok)continue;s=await e.text(),sessionStorage.setItem(`svg-${t}`,s)}const i=(new DOMParser).parseFromString(s,"image/svg+xml").querySelector("svg");i&&(i.querySelectorAll("#aco_change").forEach(t=>{e.style.fill&&t.setAttribute("fill",e.style.fill)}),i.style.setProperty("width","100%"),i.style.setProperty("height","100%"),r.append(i))}else if($a.has(o)){const e=$a.get(o);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(La.has(o))continue;const t=new Image;let n;t.className="aco-image",t.alt=e?.title;try{const e=await fetch(o);if(!e.ok){La.add(o);continue}n=await e.blob();const s=URL.createObjectURL(n);t.src=s,$a.set(o,t),r.appendChild(t),t.style.setProperty("width","100%"),t.style.setProperty("height","100%"),t.style.setProperty("object-fit","contain")}catch(e){La.add(o);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 mi(e){return/^\/([a-z]{2}(-[a-z]{2,6})?)?\/?$/.test(e)}function pi(e){if(e.includes("allPages"))return!0;const t=decodeURIComponent(window.location.pathname),n=[{check:mi,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 gi(e,t){return t.includes(e)}function yi(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?gi(e,t)&&!gi(e,n):!gi(e,n)}return!1}labeler.trustBadgeData=fi;const wi=async e=>{const t=[];for(const n of e){if(!n.isActivated)continue;const e=await ja(n),r=n.selectedPages;r.length&&!pi(r)||(n.rules.selected.includes("countryRestriction")&&!yi(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};labeler.announcementData=wi;const bi=(e,t=["aco-ignore"])=>{for(let n of t)if(e.hasAttribute(n))return!0;return!1};function Si(e,t=new Set,n=null){if(!e||t.has(e))return null;if(t.add(e),"A"===e.tagName)return bi(e)?null:e;for(let r of Array.from(e.children)){if(r!==n&&"A"===r.tagName){if(bi(r))continue;return r}const e=Si(r,t);if(e)return e}let r=e.previousElementSibling;for(;r;){if("A"===r.tagName){if(bi(r))continue;return r}const e=Si(r,t);if(e)return e;r=r.previousElementSibling}for(r=e.nextElementSibling;r;){if("A"===r.tagName){if(bi(r))continue;return r}const e=Si(r,t);if(e)return e;r=r.nextElementSibling}return Si(e.parentElement,t,e)}const vi=pa(),ki=window.aco_depth||30,{aco_debug:Ei}=window;Ei&&console.log(`depth: ${ki}`);const Ti=window.maxAllowedNodeKeys||2,Oi={title:new Map,price:new Map},Ai=window.firstProductsToVerify||3,Ci=decodeURIComponent(window.location.pathname.split("/").pop());const Ni=async(e,t,n)=>{if("image"==e)return;const r=h(t),o=`${e}_wrapper`;let s=`${labeler.page}_${o}`;n==qa(window.location.href)&&(s=`main_product_${o}`);const l=o.startsWith("title")?"title":"price",c=Oi[l].get(r);Oi[l].set(r,{property:l,count:c?c.count+1:1});let u=function(e){if(!Oi[e])return[];const t=Array.from(Oi[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:d}=window;d&&(u=d(Oi,l));const f=n==qa(window.location.href)?"main_product":labeler.page;u.length>1&&"main_product"==f&&(u=u.pop()),u=u.flat(10);const m=a[f];if(m?.[l]?.length>=Ti||m?.[l]?.includes(r))return;const p=n==Ci?0:Ai,{saveLabelPosition:g}=window;if(g&&g(s,u),u?.length&&u[1].count>=p){Ei&&console.log(`[${f.toUpperCase()}] : saving label position for ${s} with maxEntry`,u);const e=u.filter(e=>!e?.property);i(f,l,e),window.CacheHandler.postMessage({type:"SAVE_STICKER_POSITION",key:s,value:e})}};const Pi=function(e,t,n,r,o=new Set,s=0){const i=[];let l=0,c=0;const u=(e,t=["visually-hidden","aco-label-wrapper","aco-badge-wrapper"])=>o.has(e)||t.some(t=>e.classList.contains(t))||vi.elementHasClass(e)||["SCRIPT","STYLE","NOSCRIPT","IFRAME","INPUT","BUTTON"].includes(e.nodeName)||s>ki,d=(e,s)=>{if(u(e))return;o.add(e);const a=Si(e),h=qa(window.location.href)===t;if((a&&a?.href.split("/").pop()?.split("?")[0])!==t&&!h)return;const f=vi.getTextWithoutChildElements(e);f.includes(n)&&"LABEL"!==e.nodeName&&(i.push({property:"title",element:e}),l++);const m=vi.extractNumbers(f);if(m.length>0){const t=m.map(e=>vi.toSIStandard(e+"")),n=r.map(e=>vi.toSIStandard(e));c<=3&&n.some(e=>t.includes(e))&&"LABEL"!==e.nodeName&&(i.push({property:"price",element:e}),c++)}if(l>2||c>2)return;e.childNodes.forEach(e=>{e instanceof Element&&d(e,s+1)});const p=e.parentElement;p&&!u(p)&&d(p,s+1)};if(window.cachingDisabled)d(e,s);else{const{havePositionsCached:l,failedPropertys:c,currentPagePositions:u}=(()=>{const n=t==qa(window.location.href)?"main_product":labeler.page,r=a[n],s={};for(let[t,a]of Object.entries(r||{}))a?.length&&"image"!=t&&a.forEach(r=>{let a;"main_product"==n&&(a=document.querySelector(r));const{findNearestElement:l}=window;if(l&&(a=l(e,r,n)),a||(a=p(e,r)),!a)return s[t]=r;o.add(a),i.push({property:t,element:a})});Object.values(s).length&&(y(),Ei&&console.log(`%c[FLUSHING] : Failed to find cached positions: ${JSON.stringify(s)} `,"color:yellow",a),f());const l=Object.values({...r.title,...r.price})?.flat(5).length;return!l&&Ei&&console.log("%c[ERROR] : no cached positions found for :","color:red",n,a),{havePositionsCached:l,failedPropertys:s,currentPagePositions:r}})(),h=n.length,m=r.length,g=!u?.title?.length&&h||!u?.price?.length&&m;(!l||Object.values(c).length||g)&&(Ei&&console.log("%c[ERROR] : labeler is traversing , ensure caching is working","color:red"),d(e,s))}return i.length&&!window.cachingDisabled&&i.forEach(e=>{Ni(e.property,e.element,t)}),i};function Ri(e){return e.replace(/_[0-9]+x\./,".")}const{pathname:Ii}=window.location,xi=Ii.split("/").pop(),Di=pa(),$i=(e,t,n,r)=>{const o=JSON.parse(window.productMarked||"{}"),s=JSON.parse(window.imageMarked||"{}");let i=`img:not([aco-visited-${n}="true"]):not(.aco-image):not([aco-visited="true"]):not([aco-ignored-${n}="true"])`;if(r||(i=`img:not([aco-visited-${n}="true"]):not(.aco-image):not([aco-ignored-${n}="true"])`),window.labelerSelectString)switch(typeof window.labelerSelectString){case"string":i=window.labelerSelectString;break;case"function":i=window.labelerSelectString(n)}let l=Array.from(document.querySelectorAll(i));if(l.length){for(const r of e){const e=r.imageSrc.map(e=>Di.getFileNameFromURL(e.url)),i=new Set(e),c=r.productId;let u=labeler.page;xi===r.handle&&(u="main_product");const d=a[u],h=d?.image;if(h&&!window.cachingDisabled){h.filter(e=>e.length&&document.querySelectorAll(e).length).length!=h.length&&f()}for(const a of l){let{className:u,currentSrc:h,parentElement:f,alt:m,classList:g,src:y}=a;if(![a.clientHeight,a.clientWidth].filter(e=>e<100&&0!=e&&!window.considerSmallImages).length)if(!window.cachingDisabled&&d?.image?.length)for(const m of d?.image){let d=m;if(!d)continue;f=p(f,d);a.clientWidth;if(!f)continue;const{checkParentSearchClass:w=!0}=window;if(u.includes("search")&&w){l=l.filter(e=>e!==a),a.setAttribute("aco-visited","true");continue}if(f?.className.includes("search")&&w){l=l.filter(e=>e!==a),a.setAttribute("aco-visited","true");continue}const b=Ri(h),S=Di.checkImageTag(b,e),v=Di.checkImageTag(y,e),k=Array.from(i).find(e=>b.includes(e));if("product"===labeler.page&&xi===r.handle&&window.skipProductMarked&&o[n]&&o[n].includes(c))break;const E=Array.from(g).some(e=>e.toLowerCase().includes("thumbnail"))||Array.from(f?.classList).some(e=>e.toLowerCase().includes("thumbnail")),T=Array.from(g).some(e=>e.toLowerCase().includes("cart"))||Array.from(f?.classList).some(e=>e.toLowerCase().includes("cart"));if(window.identifyImage){if(!window.identifyImage(c,n,r.handle,r.id,b,k,r.imageSrc,a))continue}if(E||T)continue;const O=!f?.attributes.getNamedItem(`aco-${n.toLowerCase()}-id`);if((S||v)&&O){if(a.setAttribute("aco-product-id",c),a.classList.add(`aco-image-${c}`),a.setAttribute(`aco-visited-${n}`,"true"),Di.addClassToElement({property:"image",element:f},c,r.handle,n,r.id),"LABEL"===n){const e=document.querySelector(`.aco-title-wrapper-${c}`),o=document.querySelector(`.aco-price-wrapper-${c}`);e&&o&&!window.ignoreTitlePriceCheck||(window.findElementsByContent&&window.findElementsByContent(a,r.handle,r.productTitle,[...t],c,r.id),Pi(a,r.handle,r.productTitle,[...t]).forEach(e=>Di.addClassToElement(e,c,r.handle,n,r.id)))}s[c]?.length?s[c].push(k):s[c]=[k],window.imageMarked=JSON.stringify(s),l=l.filter(e=>e!==a)}else if(Ii.includes("/products")&&xi===r.handle&&f?.classList.contains(`aco-image-wrapper-${c}`)&&"LABEL"===n){const e=document.querySelector(`.aco-title-wrapper-${c}`),o=document.querySelector(`.aco-price-wrapper-${c}`);e&&o&&!window.ignoreTitlePriceCheck||Pi(a,r.handle,r.productTitle,[...t]).forEach(e=>Di.addClassToElement(e,c,r.handle,n,r.id))}s[c]?.length&&Array.from(i).every(e=>s[c].includes(e))&&(o[r.id]=o[r.id]?o[r.id].concat(c):[c],window.productMarked=JSON.stringify(o))}else{const d=a.clientWidth;if(!f)continue;const{checkParentSearchClass:m=!0}=window;if(u.includes("search")&&m){l=l.filter(e=>e!==a),a.setAttribute("aco-visited","true");continue}if(f?.className.includes("search")&&m){l=l.filter(e=>e!==a),a.setAttribute("aco-visited","true");continue}const p=Ri(h),w=Di.checkImageTag(p,e),b=Di.checkImageTag(y,e),S=Array.from(i).find(e=>p.includes(e)),v=r.featuredImage?.split("/")?.pop()?.split("?")?.[0];if(f.getAttribute("aco-featured-image")||(window.compareFeaturedImages?window.compareFeaturedImages(v,S)&&f.setAttribute("aco-featured-image","true"):v===S&&f.setAttribute("aco-featured-image","true")),"product"===labeler.page&&xi===r.handle&&window.skipProductMarked&&o[n]&&o[n].includes(c))break;const k=Array.from(g).some(e=>e.toLowerCase().includes("thumbnail"))||Array.from(f?.classList).some(e=>e.toLowerCase().includes("thumbnail")),E=Array.from(g).some(e=>e.toLowerCase().includes("cart"))||Array.from(f?.classList).some(e=>e.toLowerCase().includes("cart"));if(window.identifyImage){if(!window.identifyImage(c,n,r.handle,r.id,p,S,r.imageSrc,a))continue}if(window.clientWidth&&dDi.addClassToElement(e,c,r.handle,n,r.id)))}s[c]?.length?s[c].push(S):s[c]=[S],window.imageMarked=JSON.stringify(s),l=l.filter(e=>e!==a)}else if(Ii.includes("/products")&&xi===r.handle&&f?.classList.contains(`aco-image-wrapper-${c}`)&&"LABEL"===n){const e=document.querySelector(`.aco-title-wrapper-${c}`),o=document.querySelector(`.aco-price-wrapper-${c}`);e&&o&&!window.ignoreTitlePriceCheck||Pi(a,r.handle,r.productTitle,[...t]).forEach(e=>Di.addClassToElement(e,c,r.handle,n,r.id))}s[c]?.length&&Array.from(i).every(e=>s[c].includes(e))&&(o[r.id]=o[r.id]?o[r.id].concat(c):[c],window.productMarked=JSON.stringify(o))}}}e.length>1&&r&&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")})}},Li="labeler:boot",Mi="labeler:first-inject",_i={boot:!1,cdn:!1,batch:!1,inject:!1},Fi={t0:0,milestones:{},spans:new Map,counters:new Map,longTasks:[],cls:0,observersOn:!1,autoReported:!1,lastActivity:0},ji=()=>!!window.labelerPerf,qi=()=>{try{return performance.now()}catch{return 0}},Ui=e=>{try{performance.mark(e)}catch{}},Vi=e=>isFinite(e)?0===e?"0":e<1?`${(1e3*e).toFixed(0)} µs`:e<1e3?`${e.toFixed(2)} ms`:`${(e/1e3).toFixed(2)} s`:"—",Bi=e=>null==e?"—":`${(e/1024).toFixed(1)} KiB`,Wi=(e,t)=>e+" ".repeat(Math.max(0,t-e.length)),zi=(e,t)=>" ".repeat(Math.max(0,t-e.length))+e,Hi=(e,t,n)=>{const r=e.map(([e,r])=>[Math.max(e,t),Math.min(r,n)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]);let o=0,s=null,a=0;for(const[e,t]of r)null===s?(s=e,a=t):e>a?(o+=a-s,s=e,a=t):a=Math.max(a,t);return null!==s&&(o+=a-s),o},Zi=e=>{const t=Math.max(0,Math.min(1,isFinite(e)?e:0)),n=Math.round(34*t);return"█".repeat(n)+"·".repeat(34-n)},Ji=e=>{ji()&&(void 0===Fi.milestones[e]&&(Fi.milestones[e]=Fi.t0?qi()-Fi.t0:qi()),Fi.lastActivity=qi())},Gi=e=>{if(!ji())return()=>{};const t=qi();let n=!1;return()=>{if(n)return;n=!0;const r=qi()-t,o=Fi.spans.get(e);o?(o.calls+=1,o.total+=r,o.min=Math.min(o.min,r),o.max=Math.max(o.max,r),o.last=r):Fi.spans.set(e,{calls:1,total:r,min:r,max:r,last:r}),Fi.lastActivity=qi()}},Ki=(e,t=1)=>{ji()&&(Fi.counters.set(e,(Fi.counters.get(e)||0)+t),Fi.lastActivity=qi())},Yi=()=>{ji()&&!_i.inject&&(_i.inject=!0,Ji("first-badge-painted"),Ui(Mi),_i.boot&&((e,t,n)=>{try{performance.measure(e,t,n)}catch{}})("labeler:boot-to-inject",Li,Mi))},Xi=()=>{try{if(document.querySelector('script[src*="bundle-alpha"]'))return"alpha";if(document.querySelector('script[src*="bundle.js"]'))return"beta"}catch{}const e=window;return e.labeler?.channel||"unknown"},Qi=()=>{const e=window,t=Array.from(Fi.spans.values()).reduce((e,t)=>e+t.total,0),n=Array.from(Fi.spans.entries()).map(([e,n])=>({name:e,calls:n.calls,totalMs:n.total,meanMs:n.total/n.calls,minMs:n.min,maxMs:n.max,sharePct:t>0?n.total/t*100:0})).sort((e,t)=>t.totalMs-e.totalMs),r=(()=>{let e=[];try{e=performance.getEntriesByType("resource")}catch{e=[]}const t=e=>{const t=e.transferSize||e.encodedBodySize||0;return t>0?t:null},n=e.find(e=>/bundle(-alpha)?\.js/.test(String(e.name))),r=e.filter(e=>String(e.name).includes("graphql.json"));return{bundle:n?{name:String(n.name).split("/").pop()||"bundle",wireKiB:t(n),decodedKiB:n.decodedBodySize||null,durationMs:n.duration,compressed:(e=>{const t=e.encodedBodySize||0,n=e.decodedBodySize||0;return t&&n?t<.95*n:null})(n)}:null,graphql:{count:r.length,totalMs:r.reduce((e,t)=>e+(t.duration||0),0),wireKiB:r.length&&r.reduce((e,n)=>e+(t(n)||0),0)||null},gqlIntervals:r.map(e=>[e.startTime,e.responseEnd||e.startTime+e.duration])}})(),o=Fi.t0,s=Fi.milestones["first-badge-painted"],a=Math.max(Fi.lastActivity||Fi.t0,void 0!==s?Fi.t0+s:Fi.t0),i=Fi.longTasks.filter(e=>e.end>o&&e.start{const e=e=>{try{return document.querySelectorAll(e).length}catch{return 0}};return{"badges injected":e(".aco-badge-wrapper"),"labels injected":e(".aco-label-wrapper"),"announcements injected":e(".aco-announcement-wrapper"),"trust badges injected":e(".aco-trust-badge-wrapper"),"images on page":e("img"),"images visited":e("img[aco-visited-BADGE], img[aco-visited-LABEL]"),"product links":e('a[href*="/products/"]')}})(),h=(d["badges injected"]||0)+(d["labels injected"]||0);return{channel:Xi(),version:String(e.labeler?.version||"—"),page:String(e.labeler?.page||"—"),shop:String(e.Shopify?.shop||"—"),url:String(location.pathname+location.search),gate:{skipped:!!e.labelerAlpha?.skipped,reason:e.labelerAlpha?.skipReason||null},milestones:{...Fi.milestones},bootToFirstBadgeMs:void 0!==Fi.milestones["first-badge-painted"]?Fi.milestones["first-badge-painted"]:null,phases:n,counters:Object.fromEntries(Fi.counters),network:{bundle:r.bundle,graphql:{count:r.graphql.count,totalMs:r.graphql.totalMs,wireKiB:r.graphql.wireKiB,blockingMs:c}},mainThread:{longTaskCount:i.length,longTaskTotalMs:i.reduce((e,t)=>e+t.duration,0),longTaskWorstMs:i.reduce((e,t)=>Math.max(e,t.duration),0),pageLongTaskCount:l.length,pageLongTaskTotalMs:l.reduce((e,t)=>e+t.duration,0),pageLongTaskWorstMs:l.reduce((e,t)=>Math.max(e,t.duration),0),clsAfterBoot:Number(Fi.cls.toFixed(4))},redundancy:{injected:u,skipped:(Fi.counters.get("badges.skipped")||0)+(Fi.counters.get("labels.skipped")||0),candidates:(Fi.counters.get("badges.candidates")||0)+(Fi.counters.get("labels.candidates")||0),inDom:h,ratio:h>0?u/h:null},dom:d,trackedTotalMs:t}},el=26,tl=e=>`\n ${e}\n ${"─".repeat(64)}`,nl=()=>{if(!ji())return console.log("[labeler-perf] disabled. Set window.labelerPerf = true and hard-reload."),Qi();const e=Qi(),t=[];t.push(`\n┌─ Labeler performance — ${e.channel.toUpperCase()} ${e.version} · ${e.page} · ${e.shop}`),t.push(`│ ${e.url}`),t.push(`│ gate: ${e.gate.skipped?`SKIPPED (${e.gate.reason||"no reason given"})`:"active"} · ${(()=>{const e=window,t=e.labeler?.products;if(!t)return 0;if(Array.isArray(t))return t.length;const n=t;return"number"==typeof n.size?n.size:0})()} products fetched`);const n=Object.entries(e.milestones).sort((e,t)=>e[1]-t[1]);if(n.length){const r=n[n.length-1][1]||1;t.push(tl("TIMELINE (offset from boot)"));for(const[e,o]of n)t.push(` ${Wi(e,el)} ${zi(Vi(o),10)} ${Zi(o/r)}`);null!=e.bootToFirstBadgeMs&&t.push(` ${Wi("",el)} ${zi("",10)} └ boot → first badge: ${Vi(e.bootToFirstBadgeMs)}`)}if(e.phases.length){t.push(tl("PHASES (aggregated across every pass)")),t.push(` ${Wi("phase",el)} ${zi("calls",6)} ${zi("total",11)} ${zi("mean",11)} ${zi("max",11)} ${zi("share",7)}`);for(const n of e.phases)t.push(` ${Wi(n.name,el)} ${zi(String(n.calls),6)} ${zi(Vi(n.totalMs),11)} ${zi(Vi(n.meanMs),11)} ${zi(Vi(n.maxMs),11)} ${zi(`${n.sharePct.toFixed(1)}%`,7)}`);t.push(` ${Wi("TOTAL tracked",el)} ${zi("",6)} ${zi(Vi(e.trackedTotalMs),11)}`)}else t.push(tl("PHASES")),t.push(" no spans recorded — add span()/count() calls at the hot paths you care about");const r=Object.entries(e.counters).sort((e,t)=>t[1]-e[1]);if(r.length){t.push(tl("COUNTERS"));for(const[e,n]of r)t.push(` ${Wi(e,el)} ${zi(String(n),10)}`)}if(t.push(tl("NETWORK")),e.network.bundle&&t.push(` ${Wi(e.network.bundle.name,el)} ${zi(Bi(e.network.bundle.wireKiB),10)} over the wire, fetched in ${Vi(e.network.bundle.durationMs)}`),e.network.bundle){const n=e.network.bundle.compressed;t.push(` ${Wi("",el)} ${zi("",10)} ${!1===n?"⚠ served UNCOMPRESSED — check Content-Encoding; gzip would cut this ~70%":!0===n?"compressed ✓":"compression unknown (no Timing-Allow-Origin)"}`)}t.push(` ${Wi("graphql.json",el)} ${zi(`×${e.network.graphql.count}`,10)} ${Vi(e.network.graphql.blockingMs)} blocking · ${Vi(e.network.graphql.totalMs)} summed · ${Bi(e.network.graphql.wireKiB)}`),e.network.graphql.count>1&&t.push(` ${Wi("",el)} ${zi("",10)} "summed" counts concurrent requests twice; "blocking" is wall-clock`),t.push(tl("MAIN THREAD")),t.push(` ${Wi("long tasks, Labeler window",el)} ${zi(String(e.mainThread.longTaskCount),10)} total ${Vi(e.mainThread.longTaskTotalMs)} · worst ${Vi(e.mainThread.longTaskWorstMs)}`),t.push(` ${Wi("long tasks, whole page",el)} ${zi(String(e.mainThread.pageLongTaskCount),10)} total ${Vi(e.mainThread.pageLongTaskTotalMs)} · worst ${Vi(e.mainThread.pageLongTaskWorstMs)}`),t.push(` ${Wi("",el)} ${zi("",10)} long tasks are page-wide; only the first row overlaps Labeler`),t.push(` ${Wi("layout shift since boot",el)} ${zi(e.mainThread.clsAfterBoot.toFixed(4),10)}${e.mainThread.clsAfterBoot>.1?" ⚠ above the 0.1 CLS budget":""}`),t.push(tl("DOM"));for(const[n,r]of Object.entries(e.dom))t.push(` ${Wi(n,el)} ${zi(String(r),10)}`);if(t.push(tl("READ THIS FIRST")),e.gate.skipped)t.push(" ⚠ The page gate SKIPPED all work, so these numbers are not comparable"),t.push(" against a channel that did render. Compare only pages where both render.");else if(null==e.bootToFirstBadgeMs)t.push(" ⚠ No badge was ever painted. Either no rule matched this page, or"),t.push(" rendering failed — check for errors before trusting timings.");else{const n=e.bootToFirstBadgeMs>0?Math.min(100,e.network.graphql.blockingMs/e.bootToFirstBadgeMs*100):0;t.push(` boot → first badge: ${Vi(e.bootToFirstBadgeMs)} — ${n.toFixed(0)}% blocked on the Storefront API, ${Vi(e.trackedTotalMs)} of it our own CPU.`),t.push(" "+(n>50?"NETWORK-bound: fewer or smaller queries move this number. CPU work is not the problem.":"CPU-bound: scanning, generation and injection dominate, not the network."))}const o=e.redundancy;if(null!=o.ratio&&o.ratio>1.5&&(t.push(` ⚠ ${o.injected} DOM insertions but only ${o.inDom} stickers remain (${o.ratio.toFixed(1)}× churn).`),t.push(" Stickers are being inserted and then removed — that is real wasted"),t.push(" layout work, not just a cheap re-check.")),o.skipped>0&&o.injected>=0){const e=o.candidates>0?o.skipped/o.candidates*100:0;t.push(` ${o.candidates} sticker candidates generated → ${o.injected} inserted, ${o.skipped} skipped as already-present (${e.toFixed(0)}% discarded).`),e>60&&(t.push(" The injector discards these cheaply, but the GENERATOR still paid to"),t.push(" build them every pass — see generate:sticker-data above. Gating"),t.push(" generation on genuinely-new targets is where the CPU win actually is."))}return e.network.bundle&&!1===e.network.bundle.compressed&&(t.push(` ⚠ ${e.network.bundle.name} is served uncompressed. That is the single`),t.push(" biggest transfer win available and needs no code change at all.")),t.push(" Single page load — not a benchmark. Median 10+ hard reloads per channel."),t.push(""),console.log(t.join("\n")),e},rl=(e,t)=>{const n=[],r=(r,o,s)=>{const a=null!=o&&null!=s&&0!==o?`${s-o>=0?"+":""}${((s-o)/o*100).toFixed(1)}%`:"—";n.push({metric:r,[e.channel]:null==o?"—":Vi(o),[t.channel]:null==s?"—":Vi(s),delta:a})};return r("boot → first badge",e.bootToFirstBadgeMs,t.bootToFirstBadgeMs),r("config ready",e.milestones["config-ready"],t.milestones["config-ready"]),r("first products",e.milestones["first-products"],t.milestones["first-products"]),r("tracked CPU total",e.trackedTotalMs,t.trackedTotalMs),r("graphql total",e.network.graphql.totalMs,t.network.graphql.totalMs),r("long task total",e.mainThread.longTaskTotalMs,t.mainThread.longTaskTotalMs),console.table&&console.table(n),n},ol=()=>{const e=performance.getEntriesByType("mark").filter(e=>e.name.startsWith("labeler:")),t=performance.getEntriesByType("measure").filter(e=>e.name.startsWith("labeler:")),n=[...e.map(e=>({type:"mark",name:e.name,startTime:Number(e.startTime.toFixed(3)),duration:0})),...t.map(e=>({type:"measure",name:e.name,startTime:Number(e.startTime.toFixed(3)),duration:Number(e.duration.toFixed(3))}))].sort((e,t)=>e.startTime-t.startTime);return"undefined"!=typeof console&&console.table&&console.table(n),n},sl=()=>{if(!1===window.labelerPerfAutoReport)return;const e=qi(),t=()=>{if(Fi.autoReported)return;const n=qi()-(Fi.lastActivity||e),r=qi()-e;if(n>=1200||r>=12e3){Fi.autoReported=!0;try{nl()}catch(e){console.log("[labeler-perf] report failed",e)}}else setTimeout(t,300)};setTimeout(t,1200)},al=()=>{"undefined"!=typeof labeler&&(labeler.dumpPerf=ol,labeler.perfReport=nl,labeler.perfJson=Qi,labeler.perfCompare=rl)},il=e=>{const t=e.split(" ").pop();if(!t)throw new Error("Invalid timezone string format");return t},ll=(e,t=window.aco_debug)=>{const n={status:!1,timeRemaining:0,respawn:!1,respawnTime:0};if(!e.status)return n;const{timezone:r,startDate:o,endDate:s,startTime:a,endTime:i,weekdays:l}=e,c=fa.utc().toISO();t&&console.log("current Utc Time",c);const u=((e,t)=>{const n=il(t);return{startDateTime:fa.fromISO(`${e.startDate.split("T")[0]}T${e.startTime}`,{zone:n}),endDateTime:fa.fromISO(`${e.endDate.split("T")[0]}T${e.endTime}`,{zone:n})}})({startDate:o,startTime:a,endDate:s,endTime:i},r),d=((e,t)=>{const n=il(t);return fa.fromISO(e,{zone:"utc"}).setZone(n)})(c,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(),g=l[m];if(!g.status||!((e,t)=>{const[n,r]=t.start.split(":").map(Number),[o,s]=t.end.split(":").map(Number);return(e.hour>n||e.hour===n&&e.minute>=r)&&(e.hourll(e,!0);const cl=ll,ul=window.location.pathname.split("/").pop(),dl=(e,t,n=window.acoOnlyOnFeaturedImageEnabled)=>{if(!e||!t||!n)return!1;const r=t.getAttribute("aco-only-on-featured-image");if(!r||"false"===r)return!1;const{checkFeaturedImage:o}=window;if(o)return o(e,t);const s=e.getAttribute("aco-product-handle"),a="product"===labeler.page;return!!a&&((!a||s===ul)&&(!e.hasAttribute("aco-featured-image")&&!e.closest("[aco-featured-image]")))},hl=(e,t)=>{if(!e||!t)return!1;const n=t.getAttribute("aco-disabled-blocks");if(!n)return!1;const{checkExcludedBlocks:r}=window;return r?r(e):!!e.closest(n.replaceAll('"',""))},fl=e=>{if(!e)return!1;const t=JSON.parse(e.getAttribute("aco-options")||"{}");if(!t||!t.status)return!1;const{setupTimerCountDown:n}=window;if(n)return!!n(t,e);const r=e.getAttribute("aco-timer-end-time");if("ended"==r)return!!t.hideAfterTimeOut||(e.querySelector(".aco-title").textContent=t.endText,!1);if(isNaN(parseInt(r)))return!1;const o=parseInt(r,10),s=e.getAttribute("aco-sticker-id");if(r){let e;const n=()=>{const n=o-Date.now(),r=document.querySelectorAll(`.aco-box[aco-sticker-id="${s}"]`);n<0?(r.forEach(e=>{if(t.hideAfterTimeOut)e.remove();else{const n=e.querySelector(".aco-title");n&&(n.textContent=t.endText)}}),clearInterval(e)):r.forEach(e=>{[{label:"days",value:Math.floor(n/864e5)},{label:"hrs",value:Math.floor(n%864e5/36e5)},{label:"mins",value:Math.floor(n%36e5/6e4)},{label:"secs",value:Math.floor(n%6e4/1e3)}].forEach(t=>{const n=e.querySelector(`.aco-${t.label}`);n&&(n.textContent=t.value.toString().padStart(2,"0"))})})};e=setInterval(n,1e3),n()}return!1},ml=e=>{const t=`id-${Math.random().toString(36).substr(2,9)}`;e.querySelectorAll("[id]").forEach(n=>{e.querySelectorAll("[fill]:not([aco-fill-changed])").forEach(e=>{const n=e.getAttribute("fill")?.includes("url(#");if(n){const n=e.getAttribute("fill")?.split("url(#")[1].split(")")[0];e.setAttribute("fill",`url(#${n}-${t})`),e.setAttribute("aco-fill-changed","true")}});const r=n.getAttribute("id"),o=`${r}-${t}`;n.classList.add(`aco-${r}`),n.setAttribute("id",o)})},pl=decodeURIComponent(window.location.pathname.split("/").pop()),gl=(e,t)=>{let n=t,r="afterend";if("product"===labeler.page&&e.handle===pl&&(n=t,r="beforeend"),t.attributes.getNamedItem("aco-badge-id")?.value!==e.badgeId||t.parentElement.querySelector(".aco-badge-wrapper"))return Ki("badges.skipped"),void e.element.remove();Ki("badges.injected");const o=e.element.cloneNode(!0),s=Array.from(o.childNodes).map(e=>e.id),a=e.scheduledStickers.filter(e=>s.includes(e.badgeId));for(const e of a){const t=Array.from(o.childNodes).find(t=>t.id===e.badgeId),n=cl(e.schedule);n.status||t.remove(),setTimeout(()=>{n.respawn?(t.style.display="none",setTimeout(()=>{wa(t),t.style.display="block"},n.respawnTime)):t.remove()},n.timeRemaining)}o.querySelectorAll(".aco-box").forEach(e=>{if(!dl(t,e)&&!hl(t,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 o=r/(t.naturalWidth/t.naturalHeight)/n.clientHeight*100;e.style.height=o?`${o}%`: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 o=parseFloat(r.getAttribute("width")??"0"),s=parseFloat(r.getAttribute("height")??"0");if(o&&s){let r=t/(o/s)/n.clientHeight*100;e.style.height=`${r}%`}else{let o=r.getAttribute("viewBox");if(o){let r=o.split(" "),s=t/(parseFloat(r[2])/parseFloat(r[3]))/n.clientHeight*100;e.style.height=`${s}%`}else e.style.height=e.style.width}}}wa(e),n.insertAdjacentElement(r,e)}}),o.style.width="0px",o.style.height="0px",n.setAttribute("aco-badge-inserted","true"),n.insertAdjacentElement(r,o.cloneNode())},yl=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))gl(t,n);else t.element.remove()}},wl=window.aco_debug,bl=window.maxAllowedNodeKeys||2,Sl={title:new Map,price:new Map},vl=window.firstProductsToVerify||3,kl=decodeURIComponent(window.location.pathname.split("/").pop()),El=async(e,t,n,r,o,s)=>{if("belowProductImage"==e.position&&o==kl)return;const l=h(t),c=e.position.includes("Price")?"price_wrapper":"title_wrapper";let u=`${labeler.page}_${c}`;o==qa(window.location.href)&&(u=`main_product_${c}`);const d=c.startsWith("title")?"title":"price",f=Sl[d].get(l);Sl[d].set(l,{property:d,count:f?f.count+1:1});let m=function(e){if(!Sl[e])return[];const t=Array.from(Sl[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}(d);const{findMaxKeyCountEntries:p}=window;p&&(m=p(Sl,d));const g=o==qa(window.location.href)?"main_product":labeler.page;m.length>1&&"main_product"==g&&(m=m.pop()),m=m.flat(10);const y=a[g];if(y?.[d]?.length>=bl||y?.[d]?.includes(l))return;const w=o==kl?0:vl,b=document.querySelectorAll(`[aco-label-id="${r.labelId}"]`).length,{saveLabelPosition:S}=window;if(S&&S(u,m),m?.length&&m[1].count>=w||m[1].count>=b){wl&&console.log(`[${g.toUpperCase()}] : saving label position for ${u} with maxEntry`,m);const e=m.filter(e=>!e?.property);i(g,d,e),window.CacheHandler.postMessage({type:"SAVE_STICKER_POSITION",key:u,value:e})}};const Tl=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,o=e.handle===kl;let s=t[n.position],a="afterend";"belowProductImage"===n.position&&(r&&o?s="aco-image-wrapper":a="beforebegin");const i={belowProductImage:"bi",belowProductName:"bt",belowProductPrice:"bp"}[n.position];let l=document.querySelectorAll(`.${s}-${e.productId}:not([aco-label-${i}-inserted=true])`);window.labelElementPlacingLocation&&(l=window.labelElementPlacingLocation(l,e.productId,e.labelId,e.handle,`.${s}-${e.productId}`,n.position,n.element)),l.length&&l.forEach(t=>{const l=t.querySelector("img");if(!(l&&l.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&&!o))){const r=n.element.cloneNode(!0),o=r.querySelectorAll(".aco-box");for(const e of o)e&&(dl(t,e,"belowProductImage"===n.position)||hl(t,e)?e.remove():(ml(e),fl(e)&&e.remove()));if(!r.querySelector(".aco-box"))return;const l=Array.from(r.childNodes).map(e=>Array.from(e.childNodes).map(e=>e.id)).flat(),c=e.scheduledStickers.filter(e=>l.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=cl(e.schedule);n.status||t.remove(),setTimeout(()=>{n.respawn?(t.style.display="none",setTimeout(()=>{wa(t),t.style.display="block"},n.respawnTime)):t.remove()},n.timeRemaining)}if(!r.querySelector(".aco-box"))return;if(t.setAttribute(`aco-label-${i}-inserted`,"true"),wa(r),t.insertAdjacentElement(a,r),window.cachingDisabled)return;El(n,t,s,e,e.handle,e.productId)}})})})},Ol=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")}},Al=new Set,Cl=e=>{for(const t of e)if(Al.has(t.announcementId))t.element.remove();else{if(t.scheduledSticker.isScheduled){const e=cl(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(Al.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 Nl={badgeData:[],labelData:[],priceData:new Set,badgeCombinedData:[],labelCombinedData:[]};const Pl=new Set,Rl=async(e,t,n=!1)=>{let r,o,s,i,l,c,u;!window.enableScrollledProductCaching&&window.cachingDisabled||"product"===labeler.page||(t=new Set(Array.from(t).filter((e,t)=>{if(!Pl.has(`${e.handle}_${t}`))return Pl.add(`${e.handle}_${t}`),!0})));const d=Gi("generate:sticker-data");if(r=(await ai(e.badges,t)).filter(Boolean),Nl.badgeData=r,n&&console.log("badge-data",r),o=(await di(e.labels,t)).filter(Boolean),Nl.labelData=o,n&&console.log("label-data",o),s=o.reduce((e,t)=>t?new Set([...e,...t.priceList]):e,new Set),Nl.priceData=s,n&&console.log("price-data",s),i=r.map(e=>({id:e.badgeId,productId:e.productId,imageSrc:e.imageSrc,handle:e.handle,productTitle:e.productTitle,scheduledStickers:e.scheduledStickers,options:e.options,featuredImage:e.featuredImage})),Nl.badgeCombinedData=i,n&&console.log("combined-badge-data",i),l=o.map(e=>({id:e.labelId,productId:e.productId,imageSrc:e.imageSrc,handle:e.handle,productTitle:e.productTitle,scheduledStickers:e.scheduledStickers,options:e.options,featuredImage:e.featuredImage})),Nl.labelCombinedData=l,n&&console.log("combined-label-data",l),d(),0!==r.length){const e=Gi("scan:badge-targets");$i(i,s,"BADGE",!1),e();const t=Gi("inject:badges");yl(r),t(),Ki("badges.candidates",r.length),Yi()}if(0!==o.length){const e=Gi("scan:label-targets");$i(l,s,"LABEL",!1),e();const t=Gi("inject:labels");Tl(o),t(),Ki("labels.candidates",o.length),Yi()}if(c=await fi(e.trustBadges),n&&console.log("trustbadge-data",c),u=await wi(e.announcements),n&&console.log("announcement-data",u),0!==c.length&&Ol(c),0!==u.length&&Cl(u),!window.cachingDisabled){let e="main_product";const t={},n=async()=>{const n=document.querySelectorAll("[aco-badge-id]");for(const r of n){const n=h(r),o=r.getAttribute("aco-product-id")||"",s=qa(window.location.href),i=labeler.products.find(e=>Wa(e.id,o));if(e=i&&i.handle===s?"main_product":labeler.page,a[e]?.image?.length)return;t[e]||(t[e]=new Map);const l=t[e],c=l.get(n)?.count??0;l.set(n,{count:c+1});const u=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:u,key:`${e}_badge_wrapper`})}};n()}if(n)return{badgeData:r,labelData:o,trustBadgeData:c,announcementData:u,priceData:s,badgeCombinedData:i,labelCombinedData:l}},Il=async(e,t,n)=>{if(aco_allProducts){let t=aco_allProducts.get(e);if(t)return t}const{customFetchProducts:r}=window;if(r){const t=await r(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 Gt.post(o(n),r,{headers:{"X-Shopify-Storefront-Access-Token":t,"Content-Type":"application/json"}})).data.data.product;if(!s)return;return{...s,id:Va(s.id),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:Ba(s.variants.edges[0].node.id)}}}return window.CacheHandler.postMessage({key:e,type:"FETCH_PRODUCT",value:null,country:window.Shopify?.country||"US",data:{shopifyDomain:n,storefrontApi:t}}),null},xl=e=>[...e.badges,...e.labels,...e.announcements].some(e=>!(!e.rules||!e.rules.selected)&&e.rules.selected.includes("countryRestriction")),Dl=async()=>{const e=await Gt.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:$l}=window,Ll=[],Ml=(e,t,n)=>{Ll.push({type:e,fn:t,id:n})};if(!window.cachingDisabled){const e=new Blob([u],{type:"application/javascript"}),t=URL.createObjectURL(e);window.CacheHandler=new Worker(t),y(!0),window.CacheHandler.onmessage=e=>{const{key:t,value:n,type:r}=e.data,{cacheManager:o}=window;if(o&&o({taskQueue:Ll,key:t,value:n}),r?.length){const e=Ll.find(e=>{const n=e.type==r;return e.id&&t?n&&e.id==t:n});if($l&&console.log(`[CacheHandler] : executing task ${r}`,n),!e)throw new Error(`Invalid entry for the task ${r}`);return e.fn(t,n)}}}const _l=new Set;let Fl={},jl=!1,ql=new Set,Ul=[],Vl=!1;function Bl(e){Ul.push(e),Wl()}async function Wl(){if(!Vl&&0!==Ul.length){Vl=!0;try{const e=Ul.shift();e&&await e.fn()}catch(e){console.error("Task failed",e)}Vl=!1,Wl()}}const zl=async(e,t,n)=>{let r=new Set;for(const o of e)if(_l.has(o)){if(Ul.find(e=>"RERENDER"===e.type))return;Bl({type:"RERENDER",fn:async()=>await Rl(Fl,ql)})}else{window.cachingDisabled||Ml("FETCH_PRODUCT",(t,n)=>{let s=n;if(_l.add(o),!s)return;let a={...s,id:Va(s.id),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:Ba(s.variants.edges[0].node.id)}};return Hl(a,r,e)},o);let s=await Il(o,t,n);s&&Hl(s,r,e)}},Hl=async(e,t=new Set,n)=>{e&&(ql.add(e),t.add(e),labeler.products=Array.from(ql),sessionStorage.setItem("products",JSON.stringify(Array.from(ql)))),t.size===n.length&&(ji()&&!_i.batch&&(_i.batch=!0,Ji("first-products"),Ui("labeler:first-batch-done")),Bl({type:"INITIAL_RENDER",fn:async()=>await Rl(Fl,t)}))};let Zl=!1;async function Jl(e){const t=window.Shopify.shop;if(await new Promise(e=>{const t=setInterval(()=>{jl||(clearInterval(t),e(null))},100)}),ji()&&!_i.cdn&&(_i.cdn=!0,Ji("config-ready"),Ui("labeler:cdn-ready")),Fl=labelerCdnData||Fl,!Fl?.version&&!labelerCdnData){jl=!0;const e=localStorage.getItem("labelerCdnTimestamp"),n=localStorage.getItem("labelerCdnData"),r=await Gt.get(`https://cdn.labeler.apps.acowebs.com/V3/${t}/timestamp.unix?v=${Date.now()}`);if(e&&n&&r.data===parseFloat(e))Fl=JSON.parse(n),jl=!1;else{const e=await Gt.get(`https://cdn.labeler.apps.acowebs.com/V3/${t}/${t}.json?v=${Date.now()}`);Fl=e.data,localStorage.setItem("labelerCdnTimestamp",r.data),localStorage.setItem("labelerCdnData",JSON.stringify(Fl)),jl=!1}}if(Fl=Fl||labelerCdnData,!Fl.status)return;if(xl(Fl)){sessionStorage.getItem("ipCountry")||(await Dl(),await new Promise(e=>{const t=setInterval(()=>{sessionStorage.getItem("ipCountry")&&(clearInterval(t),e(null))},100)}))}Zl||(Zl=!0,Bl({type:"RERENDER",fn:async()=>await Rl(Fl,ql)}));const n=document.querySelectorAll('a:not([aco-visited="true"])')||[];if("VARIANT_CHANGE"!==e){if(0===n.length){if(Ul.find(e=>"RERENDER"===e.type))return;return Bl({type:"RERENDER",fn:async()=>await Rl(Fl,ql)}),{labelerData:Fl,products:ql}}{let e=new Set;if("product"===labeler.page){const t=qa(decodeURIComponent(window.location.pathname));t&&e.add(t)}for(const t of Array.from(n)){t.setAttribute("aco-visited","true");const n=qa(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;Bl({type:"RERENDER",fn:async()=>await Rl(Fl,ql)})}var r;return{labelerData:Fl,products:ql}}labeler.forceRender=async(e,t)=>!e&&t?await Rl(Fl,t,!0):e&&!t?await Rl(e,ql,!0):e||t?e&&t?await Rl(e,t,!0):void 0:await Rl(Fl,ql,!0);var Gl=n(895),Kl=n.n(Gl);const Yl=e=>/^(aco-title-wrapper|aco-price-wrapper)-[a-zA-Z0-9]+$/.test(e),Xl=["aco-label-wrapper","aco-badge-wrapper","aco-image-wrapper","aco-box","aco-price-wrapper","aco-title-wrapper","aco-announcement-wrapper","aco-trust-badge-wrapper"],Ql=["input","textarea","select","button","form","label","option","fieldset"],ec=["script","style","noscript","link","meta","template"],tc=e=>e.nodeType===Node.ELEMENT_NODE,nc=e=>e.filter(e=>{const t=(e=>{if("childList"!==e.type)return!1;const t=Array.from(e.addedNodes).some(e=>{if(!tc(e))return!1;const t=e.querySelector("img"),n=Xl.some(t=>e.className.includes(t));return t&&!n}),n=Array.from(e.removedNodes).some(e=>!!tc(e)&&(e.querySelector("[aco-sticker-id]")||e.className.includes("aco-")));return t||n})(e),n=(e=>{if("attributes"!==e.type)return!1;const t="class"===e.attributeName&&!e.target.className.includes("aco-"),n=(()=>{if("class"===e.attributeName)return!1;const t=e.attributeName?.startsWith("aco-");return!t})();return t||n})(e),r=(e=>{const t=e.target;if(!(t instanceof Element))return!0;const n=t.tagName.toLowerCase(),r=Boolean(t.closest("footer, header, nav, head, aside, [role='navigation'], [role='banner'], [role='contentinfo'], [role='search']")),o=Ql.includes(n)||ec.includes(n);return!r&&!o})(e);return("childList"===e.type&&t||"attributes"===e.type&&n)&&r});let rc=0;const oc=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)||Yl(r.className)||e("ADDED_NODE"),r.shadowRoot){t(r.shadowRoot,"*").forEach(n)}}else e()}let r=!1,o=!1,s=!1;const a=window.attribute_mutation_interval||500,i=window.child_mutation_interval||0,l=window.mutation_count_limit||0,c=Kl()(t=>{const c=document.documentElement.scrollHeight;if(document.querySelectorAll(".aco-announcement-wrapper").forEach(e=>{`${c}px`===e?.style?.height||e.querySelector(".aco-announcement-bar")||(e.style.height=`${c}px`)}),s)return;s=!0;const u=window.filterMutation,{mutationFilters:d}=window;let h=[];h=d?d(t):u?nc(t):t;try{h.forEach(t=>{if(!t.target.closest(".aco-box")){if(window.mutationHandler){if(!window.mutationHandler(t))return}"attributes"===t.type&&(rc++,r||(rc=0,r=!0,window.attributMutation&&window.attributMutation(),e("ATTRIBUTE_CHANGE"),setTimeout(()=>{r=!1},a))),"childList"===t.type&&t.addedNodes.length>0&&(o||(o=!0,window.childMutation&&window.childMutation(),t.addedNodes.forEach(n),setTimeout(()=>{o=!1},i)))}})}finally{setTimeout(()=>{s=!1},l)}},200);return new MutationObserver(c)};n(995);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==")))})()&&s("Labeler status is set to false"),ji()&&!_i.boot&&(_i.boot=!0,Fi.t0=qi(),Fi.lastActivity=Fi.t0,Fi.milestones.boot=0,Ui(Li),(()=>{if(!Fi.observersOn&&"undefined"!=typeof PerformanceObserver){Fi.observersOn=!0;try{new PerformanceObserver(e=>{for(const t of e.getEntries())Fi.longTasks.push({start:t.startTime,end:t.startTime+t.duration,duration:t.duration})}).observe({type:"longtask",buffered:!0})}catch{}try{new PerformanceObserver(e=>{for(const t of e.getEntries()){const e=t;e.hadRecentInput||t.startTime>=Fi.t0&&(Fi.cls+=e.value||0)}}).observe({type:"layout-shift",buffered:!0})}catch{}}})(),sl()),al();const sc=()=>{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)};"requestIdleCallback"in window?requestIdleCallback(sc):setTimeout(sc,200),labelerCdnData&&!1===labelerCdnData.status&&s("Labeler status is set to false");const{aco_debug:ac}=window;let ic,lc=new Set,cc=[],uc=!1;window.cachingDisabled?ac&&console.log("%c[WARNING] : Labeler caching is turned off","color:yellow"):(Ml("GET_STICKER_POSITION",(e,t)=>{let n=labeler.page;e.includes("main_product")&&(n="main_product"),ac&&console.log(`[TASK] : setting ${t} for key ${e} , PAGE : ${n}`);const r=e.includes("title")?"title":e.includes("price")?"price":"image";i(n,r,t)}),Ml("GET_BADGE_POSITION",(e,t)=>{let n=labeler.page;e.includes("main_product")&&(n="main_product"),ac&&console.log(`[TASK] : setting ${t} for key ${e} , PAGE : ${n}`),i(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 dc=async()=>{if(cc.length>0&&!uc){uc=!0;const e=cc.shift();e&&await Kl()(e,200)(),uc=!1,dc()}},hc=(e="default")=>{cc.push(async()=>{Ki("passes.total"),Ki("pass:"+(e||"default"));let t=await(async(e,t)=>{if(!ji())return t();const n=Gi(e);try{return await t()}finally{n()}})("render-pass",()=>Jl(e));if(!t)return;const{labelerData:n,products:r}=t;ic=n,lc=r}),dc()};hc();const fc=oc(hc);let mc=window.mutationParams||{childList:!0};window.bodyObserverElement?Array.from(document.querySelectorAll(window.bodyObserverElement)).forEach(e=>{fc.observe(e,mc)}):window.disableObserver||fc.observe(document.body,{childList:!0,subtree:!0,attributes:!0}),labeler.observer=fc,labeler.clearCaches=f,al(),labeler.initializeRendering=(e="default")=>{hc(e)};const pc=history.pushState.bind(history),gc=history.replaceState.bind(history);history.pushState=function(e,t,n){pc(e,t,n),window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange"))},history.replaceState=function(e,t,n){gc(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=qa(e),n=new URLSearchParams(window.location.search).get("variant"),r=n?Ba(n):"",o=t&&lc.size&&Array.from(lc).find(e=>e.handle===t)?.id;if(!o)return;const s=labelerCdnData.labels.filter(e=>e.rules.selected.includes("specificVariants")&&e.isActivated&&e.rules?.specificVariants?.some(e=>Wa(e.id,o))).concat(labelerCdnData.badges.filter(e=>e.rules.selected.includes("specificVariants")&&e.rules?.specificVariants.some(e=>Wa(e.id,o)))).map(e=>e.rules.specificVariants.find(e=>Wa(e.id,o))),{checkVariantChange:a}=window;if(a){if(a(t,r))return}else{const e=s&&s[0]?.variants.find(e=>za(e.id,r))?.length;if((!s.length||e)&&!window.acoOnlyOnFeaturedImageEnabled)return}labeler.cachedBadgeData.delete(t),labeler.cachedLabelData.delete(t),labeler.cachedBadgeLessProducts.delete(t),labeler.cachedLabelLessProducts.delete(t);const i=JSON.parse(window.productMarked||"{}");i&&(i.BADGE=i.BADGE?.filter(e=>e!==o)||[],i.LABEL=i.LABEL?.filter(e=>e!==o)||[],window.productMarked=JSON.stringify(i));const l=JSON.parse(window.imageMarked||"{}");delete l[o],window.imageMarked=JSON.stringify(l);const c=document.querySelectorAll(`.aco-price-wrapper-${o}`),u=document.querySelectorAll(`.aco-image-wrapper-${o}`),d=document.querySelectorAll(`.aco-title-wrapper-${o}`);document.querySelectorAll(`.aco-image-${o}`).forEach(e=>{e.classList.remove(`aco-image-${o}`),ba(e)}),u.forEach(e=>{ba(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=>{ba(e,"aco-label-bp");const t=e.nextElementSibling;t?.className.includes("aco-label-wrapper")&&t.remove()}),d.forEach(e=>{ba(e,"aco-label-bt");const t=e.nextElementSibling;t?.className.includes("aco-label-wrapper")&&t.remove()}),Kl()(hc,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=>{ba(e),e.classList.remove("aco-image-wrapper")})}},labeler.utils={...t},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=o(n.shop);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}},o={method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":n.token},body:JSON.stringify(t)};return fetch(r,o).then(e=>e.json()).then(e=>e).catch(e=>e)}labeler.products.forEach(e=>{const t=e.variants?.filter(e=>za(e.id,n.gid));if(t&&t.length>0){const{handle:t,id:n,tags:r,collections:o}=e,s={handle:t,id:n,tags:r,collections:o};console.log(s)}})}})()})();