var gd=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports);var vd=gd((exports,module)=>{(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"2.57.5"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6d5f53c8-9a88-404f-958c-389b44e74275",t._sentryDebugIdIdentifier="sentry-dbid-6d5f53c8-9a88-404f-958c-389b44e74275")})()}catch{}(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[new t.Error().stack]=function(n){for(var r=1;ri[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};var hasRequiredReact_production_min;function requireReact_production_min(){if(hasRequiredReact_production_min)return react_production_min;hasRequiredReact_production_min=1;var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function y(F){return F===null||typeof F!="object"?null:(F=v&&F[v]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function b(F,M,ne){this.props=F,this.context=M,this.refs=E,this.updater=ne||x}b.prototype.isReactComponent={},b.prototype.setState=function(F,M){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,M,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function k(){}k.prototype=b.prototype;function C(F,M,ne){this.props=F,this.context=M,this.refs=E,this.updater=ne||x}var I=C.prototype=new k;I.constructor=C,S(I,b.prototype),I.isPureReactComponent=!0;var T=Array.isArray,w=Object.prototype.hasOwnProperty,N={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function A(F,M,ne){var z,ie={},se=null,J=null;if(M!=null)for(z in M.ref!==void 0&&(J=M.ref),M.key!==void 0&&(se=""+M.key),M)w.call(M,z)&&!P.hasOwnProperty(z)&&(ie[z]=M[z]);var re=arguments.length-2;if(re===1)ie.children=ne;else if(1"u"||__SENTRY_DEBUG__,GLOBAL_OBJ=globalThis,SDK_VERSION="10.10.0";function getMainCarrier(){return getSentryCarrier(GLOBAL_OBJ),GLOBAL_OBJ}function getSentryCarrier(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||SDK_VERSION,n[SDK_VERSION]=n[SDK_VERSION]||{}}function getGlobalSingleton(t,n,r=GLOBAL_OBJ){const i=r.__SENTRY__=r.__SENTRY__||{},o=i[SDK_VERSION]=i[SDK_VERSION]||{};return o[t]||(o[t]=n())}const CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],PREFIX="Sentry Logger ",originalConsoleMethods={};function consoleSandbox(t){if(!("console"in GLOBAL_OBJ))return t();const n=GLOBAL_OBJ.console,r={},i=Object.keys(originalConsoleMethods);i.forEach(o=>{const u=originalConsoleMethods[o];r[o]=n[o],n[o]=u});try{return t()}finally{i.forEach(o=>{n[o]=r[o]})}}function enable(){_getLoggerSettings().enabled=!0}function disable(){_getLoggerSettings().enabled=!1}function isEnabled(){return _getLoggerSettings().enabled}function log(...t){_maybeLog("log",...t)}function warn(...t){_maybeLog("warn",...t)}function error(...t){_maybeLog("error",...t)}function _maybeLog(t,...n){DEBUG_BUILD$3&&isEnabled()&&consoleSandbox(()=>{GLOBAL_OBJ.console[t](`${PREFIX}[${t}]:`,...n)})}function _getLoggerSettings(){return DEBUG_BUILD$3?getGlobalSingleton("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const debug={enable,disable,isEnabled,log,warn,error},STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...t){const n=t.sort((r,i)=>r[0]-i[0]).map(r=>r[1]);return(r,i=0,o=0)=>{const u=[],c=r.split(` `);for(let d=i;d1024&&(f=f.slice(0,1024));const m=WEBPACK_ERROR_REGEXP.test(f)?f.replace(WEBPACK_ERROR_REGEXP,"$1"):f;if(!m.match(/\S*Error: /)){for(const g of n){const v=g(m);if(v){u.push(v);break}}if(u.length>=STACKTRACE_FRAME_LIMIT+o)break}}return stripSentryFramesAndReverse(u.slice(o))}}function stackParserFromStackParserOptions(t){return Array.isArray(t)?createStackParser(...t):t}function stripSentryFramesAndReverse(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test(getLastStackFrame(n).function||"")&&n.pop(),n.reverse(),STRIP_FRAME_REGEXP.test(getLastStackFrame(n).function||"")&&(n.pop(),STRIP_FRAME_REGEXP.test(getLastStackFrame(n).function||"")&&n.pop()),n.slice(0,STACKTRACE_FRAME_LIMIT).map(r=>({...r,filename:r.filename||getLastStackFrame(n).filename,function:r.function||UNKNOWN_FUNCTION}))}function getLastStackFrame(t){return t[t.length-1]||{}}const defaultFunctionName="";function getFunctionName(t){try{return!t||typeof t!="function"?defaultFunctionName:t.name||defaultFunctionName}catch{return defaultFunctionName}}function getFramesFromEvent(t){const n=t.exception;if(n){const r=[];try{return n.values.forEach(i=>{i.stacktrace.frames&&r.push(...i.stacktrace.frames)}),r}catch{return}}}const handlers={},instrumented={};function addHandler(t,n){handlers[t]=handlers[t]||[],handlers[t].push(n)}function maybeInstrument(t,n){if(!instrumented[t]){instrumented[t]=!0;try{n()}catch(r){DEBUG_BUILD$3&&debug.error(`Error while instrumenting ${t}`,r)}}}function triggerHandlers(t,n){const r=t&&handlers[t];if(r)for(const i of r)try{i(n)}catch(o){DEBUG_BUILD$3&&debug.error(`Error while triggering instrumentation handler. Type: ${t} Name: ${getFunctionName(i)} Error:`,o)}}let _oldOnErrorHandler=null;function addGlobalErrorInstrumentationHandler(t){const n="error";addHandler(n,t),maybeInstrument(n,instrumentError)}function instrumentError(){_oldOnErrorHandler=GLOBAL_OBJ.onerror,GLOBAL_OBJ.onerror=function(t,n,r,i,o){return triggerHandlers("error",{column:i,error:o,line:r,msg:t,url:n}),_oldOnErrorHandler?_oldOnErrorHandler.apply(this,arguments):!1},GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}let _oldOnUnhandledRejectionHandler=null;function addGlobalUnhandledRejectionInstrumentationHandler(t){const n="unhandledrejection";addHandler(n,t),maybeInstrument(n,instrumentUnhandledRejection)}function instrumentUnhandledRejection(){_oldOnUnhandledRejectionHandler=GLOBAL_OBJ.onunhandledrejection,GLOBAL_OBJ.onunhandledrejection=function(t){return triggerHandlers("unhandledrejection",t),_oldOnUnhandledRejectionHandler?_oldOnUnhandledRejectionHandler.apply(this,arguments):!0},GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const objectToString$1=Object.prototype.toString;function isError$2(t){switch(objectToString$1.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return isInstanceOf(t,Error)}}function isBuiltin(t,n){return objectToString$1.call(t)===`[object ${n}]`}function isErrorEvent$1(t){return isBuiltin(t,"ErrorEvent")}function isDOMError(t){return isBuiltin(t,"DOMError")}function isDOMException(t){return isBuiltin(t,"DOMException")}function isString(t){return isBuiltin(t,"String")}function isParameterizedString(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function isPrimitive(t){return t===null||isParameterizedString(t)||typeof t!="object"&&typeof t!="function"}function isPlainObject$2(t){return isBuiltin(t,"Object")}function isEvent(t){return typeof Event<"u"&&isInstanceOf(t,Event)}function isElement(t){return typeof Element<"u"&&isInstanceOf(t,Element)}function isRegExp(t){return isBuiltin(t,"RegExp")}function isThenable(t){return!!(t!=null&&t.then&&typeof t.then=="function")}function isSyntheticEvent(t){return isPlainObject$2(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function isInstanceOf(t,n){try{return t instanceof n}catch{return!1}}function isVueViewModel(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function isRequest(t){return typeof Request<"u"&&isInstanceOf(t,Request)}const WINDOW$3=GLOBAL_OBJ,DEFAULT_MAX_STRING_LENGTH=80;function htmlTreeAsString(t,n={}){if(!t)return"";try{let r=t;const i=5,o=[];let u=0,c=0;const d=" > ",f=d.length;let m;const g=Array.isArray(n)?n:n.keyAttrs,v=!Array.isArray(n)&&n.maxStringLength||DEFAULT_MAX_STRING_LENGTH;for(;r&&u++1&&c+o.length*f+m.length>=v));)o.push(m),c+=m.length,r=r.parentNode;return o.reverse().join(d)}catch{return""}}function _htmlElementAsString(t,n){const r=t,i=[];if(!(r!=null&&r.tagName))return"";if(WINDOW$3.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}i.push(r.tagName.toLowerCase());const o=n!=null&&n.length?n.filter(c=>r.getAttribute(c)).map(c=>[c,r.getAttribute(c)]):null;if(o!=null&&o.length)o.forEach(c=>{i.push(`[${c[0]}="${c[1]}"]`)});else{r.id&&i.push(`#${r.id}`);const c=r.className;if(c&&isString(c)){const d=c.split(/\s+/);for(const f of d)i.push(`.${f}`)}}const u=["aria-label","type","name","title","alt"];for(const c of u){const d=r.getAttribute(c);d&&i.push(`[${c}="${d}"]`)}return i.join("")}function getLocationHref(){try{return WINDOW$3.document.location.href}catch{return""}}function getComponentName(t){if(!WINDOW$3.HTMLElement)return null;let n=t;const r=5;for(let i=0;iisMatchingPattern(t,i,r))}function fill(t,n,r){if(!(n in t))return;const i=t[n];if(typeof i!="function")return;const o=r(i);typeof o=="function"&&markFunctionWrapped(o,i);try{t[n]=o}catch{DEBUG_BUILD$3&&debug.log(`Failed to replace method "${n}" in object`,t)}}function addNonEnumerableProperty(t,n,r){try{Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0})}catch{DEBUG_BUILD$3&&debug.log(`Failed to add non-enumerable property "${n}" to object`,t)}}function markFunctionWrapped(t,n){try{const r=n.prototype||{};t.prototype=n.prototype=r,addNonEnumerableProperty(t,"__sentry_original__",n)}catch{}}function getOriginalFunction(t){return t.__sentry_original__}function convertToPlainObject(t){if(isError$2(t))return{message:t.message,name:t.name,stack:t.stack,...getOwnProperties(t)};if(isEvent(t)){const n={type:t.type,target:serializeEventTarget(t.target),currentTarget:serializeEventTarget(t.currentTarget),...getOwnProperties(t)};return typeof CustomEvent<"u"&&isInstanceOf(t,CustomEvent)&&(n.detail=t.detail),n}else return t}function serializeEventTarget(t){try{return isElement(t)?htmlTreeAsString(t):Object.prototype.toString.call(t)}catch{return""}}function getOwnProperties(t){if(typeof t=="object"&&t!==null){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}else return{}}function extractExceptionKeysForMessage(t,n=40){const r=Object.keys(convertToPlainObject(t));r.sort();const i=r[0];if(!i)return"[object has no keys]";if(i.length>=n)return truncate(i,n);for(let o=r.length;o>0;o--){const u=r.slice(0,o).join(", ");if(!(u.length>n))return o===r.length?u:truncate(u,n)}return""}function getCrypto(){const t=GLOBAL_OBJ;return t.crypto||t.msCrypto}function uuid4(t=getCrypto()){let n=()=>Math.random()*16;try{if(t!=null&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t!=null&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function getFirstException(t){var n,r;return(r=(n=t.exception)==null?void 0:n.values)==null?void 0:r[0]}function getEventDescription(t){const{message:n,event_id:r}=t;if(n)return n;const i=getFirstException(t);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||r||"":r||""}function addExceptionTypeValue(t,n,r){const i=t.exception=t.exception||{},o=i.values=i.values||[],u=o[0]=o[0]||{};u.value||(u.value=n||""),u.type||(u.type="Error")}function addExceptionMechanism(t,n){const r=getFirstException(t);if(!r)return;const i={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...i,...o,...n},n&&"data"in n){const u={...o==null?void 0:o.data,...n.data};r.mechanism.data=u}}function checkOrSetAlreadyCaught(t){if(isAlreadyCaptured(t))return!0;try{addNonEnumerableProperty(t,"__sentry_captured__",!0)}catch{}return!1}function isAlreadyCaptured(t){try{return t.__sentry_captured__}catch{}}const ONE_SECOND_IN_MS=1e3;function dateTimestampInSeconds(){return Date.now()/ONE_SECOND_IN_MS}function createUnixTimestampInSecondsFunc(){const{performance:t}=GLOBAL_OBJ;if(!(t!=null&&t.now)||!t.timeOrigin)return dateTimestampInSeconds;const n=t.timeOrigin;return()=>(n+t.now())/ONE_SECOND_IN_MS}let _cachedTimestampInSeconds;function timestampInSeconds(){return(_cachedTimestampInSeconds??(_cachedTimestampInSeconds=createUnixTimestampInSecondsFunc()))()}function makeSession(t){const n=timestampInSeconds(),r={sid:uuid4(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>sessionToJSON(r)};return t&&updateSession(r,t),r}function updateSession(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),!t.did&&!n.did&&(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||timestampInSeconds(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=n.sid.length===32?n.sid:uuid4()),n.init!==void 0&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),typeof n.started=="number"&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if(typeof n.duration=="number")t.duration=n.duration;else{const r=t.timestamp-t.started;t.duration=r>=0?r:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),typeof n.errors=="number"&&(t.errors=n.errors),n.status&&(t.status=n.status)}function closeSession(t,n){let r={};t.status==="ok"&&(r={status:"exited"}),updateSession(t,r)}function sessionToJSON(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function merge(t,n,r=2){if(!n||typeof n!="object"||r<=0)return n;if(t&&Object.keys(n).length===0)return t;const i={...t};for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&(i[o]=merge(i[o],n[o],r-1));return i}function generateTraceId(){return uuid4()}function generateSpanId(){return uuid4().substring(16)}const SCOPE_SPAN_FIELD="_sentrySpan";function _setSpanForScope(t,n){n?addNonEnumerableProperty(t,SCOPE_SPAN_FIELD,n):delete t[SCOPE_SPAN_FIELD]}function _getSpanForScope(t){return t[SCOPE_SPAN_FIELD]}const DEFAULT_MAX_BREADCRUMBS=100;class Scope{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:generateTraceId(),sampleRand:Math.random()}}clone(){const n=new Scope;return n._breadcrumbs=[...this._breadcrumbs],n._tags={...this._tags},n._extra={...this._extra},n._contexts={...this._contexts},this._contexts.flags&&(n._contexts.flags={values:[...this._contexts.flags.values]}),n._user=this._user,n._level=this._level,n._session=this._session,n._transactionName=this._transactionName,n._fingerprint=this._fingerprint,n._eventProcessors=[...this._eventProcessors],n._attachments=[...this._attachments],n._sdkProcessingMetadata={...this._sdkProcessingMetadata},n._propagationContext={...this._propagationContext},n._client=this._client,n._lastEventId=this._lastEventId,_setSpanForScope(n,_getSpanForScope(this)),n}setClient(n){this._client=n}setLastEventId(n){this._lastEventId=n}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(n){this._scopeListeners.push(n)}addEventProcessor(n){return this._eventProcessors.push(n),this}setUser(n){return this._user=n||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&updateSession(this._session,{user:n}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(n){return this._tags={...this._tags,...n},this._notifyScopeListeners(),this}setTag(n,r){return this._tags={...this._tags,[n]:r},this._notifyScopeListeners(),this}setExtras(n){return this._extra={...this._extra,...n},this._notifyScopeListeners(),this}setExtra(n,r){return this._extra={...this._extra,[n]:r},this._notifyScopeListeners(),this}setFingerprint(n){return this._fingerprint=n,this._notifyScopeListeners(),this}setLevel(n){return this._level=n,this._notifyScopeListeners(),this}setTransactionName(n){return this._transactionName=n,this._notifyScopeListeners(),this}setContext(n,r){return r===null?delete this._contexts[n]:this._contexts[n]=r,this._notifyScopeListeners(),this}setSession(n){return n?this._session=n:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(n){if(!n)return this;const r=typeof n=="function"?n(this):n,i=r instanceof Scope?r.getScopeData():isPlainObject$2(r)?n:void 0,{tags:o,extra:u,user:c,contexts:d,level:f,fingerprint:m=[],propagationContext:g}=i||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...u},this._contexts={...this._contexts,...d},c&&Object.keys(c).length&&(this._user=c),f&&(this._level=f),m.length&&(this._fingerprint=m),g&&(this._propagationContext=g),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,_setSpanForScope(this,void 0),this._attachments=[],this.setPropagationContext({traceId:generateTraceId(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(n,r){var u;const i=typeof r=="number"?r:DEFAULT_MAX_BREADCRUMBS;if(i<=0)return this;const o={timestamp:dateTimestampInSeconds(),...n,message:n.message?truncate(n.message,2048):n.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>i&&(this._breadcrumbs=this._breadcrumbs.slice(-i),(u=this._client)==null||u.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(n){return this._attachments.push(n),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:_getSpanForScope(this)}}setSDKProcessingMetadata(n){return this._sdkProcessingMetadata=merge(this._sdkProcessingMetadata,n,2),this}setPropagationContext(n){return this._propagationContext=n,this}getPropagationContext(){return this._propagationContext}captureException(n,r){const i=(r==null?void 0:r.event_id)||uuid4();if(!this._client)return DEBUG_BUILD$3&&debug.warn("No client configured on scope - will not capture exception!"),i;const o=new Error("Sentry syntheticException");return this._client.captureException(n,{originalException:n,syntheticException:o,...r,event_id:i},this),i}captureMessage(n,r,i){const o=(i==null?void 0:i.event_id)||uuid4();if(!this._client)return DEBUG_BUILD$3&&debug.warn("No client configured on scope - will not capture message!"),o;const u=new Error(n);return this._client.captureMessage(n,r,{originalException:n,syntheticException:u,...i,event_id:o},this),o}captureEvent(n,r){const i=(r==null?void 0:r.event_id)||uuid4();return this._client?(this._client.captureEvent(n,{...r,event_id:i},this),i):(DEBUG_BUILD$3&&debug.warn("No client configured on scope - will not capture event!"),i)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(n=>{n(this)}),this._notifyingListeners=!1)}}function getDefaultCurrentScope(){return getGlobalSingleton("defaultCurrentScope",()=>new Scope)}function getDefaultIsolationScope(){return getGlobalSingleton("defaultIsolationScope",()=>new Scope)}class AsyncContextStack{constructor(n,r){let i;n?i=n:i=new Scope;let o;r?o=r:o=new Scope,this._stack=[{scope:i}],this._isolationScope=o}withScope(n){const r=this._pushScope();let i;try{i=n(r)}catch(o){throw this._popScope(),o}return isThenable(i)?i.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),i)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const n=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:n}),n}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function getAsyncContextStack(){const t=getMainCarrier(),n=getSentryCarrier(t);return n.stack=n.stack||new AsyncContextStack(getDefaultCurrentScope(),getDefaultIsolationScope())}function withScope$1(t){return getAsyncContextStack().withScope(t)}function withSetScope(t,n){const r=getAsyncContextStack();return r.withScope(()=>(r.getStackTop().scope=t,n(t)))}function withIsolationScope(t){return getAsyncContextStack().withScope(()=>t(getAsyncContextStack().getIsolationScope()))}function getStackAsyncContextStrategy(){return{withIsolationScope,withScope:withScope$1,withSetScope,withSetIsolationScope:(t,n)=>withIsolationScope(n),getCurrentScope:()=>getAsyncContextStack().getScope(),getIsolationScope:()=>getAsyncContextStack().getIsolationScope()}}function getAsyncContextStrategy(t){const n=getSentryCarrier(t);return n.acs?n.acs:getStackAsyncContextStrategy()}function getCurrentScope(){const t=getMainCarrier();return getAsyncContextStrategy(t).getCurrentScope()}function getIsolationScope(){const t=getMainCarrier();return getAsyncContextStrategy(t).getIsolationScope()}function getGlobalScope(){return getGlobalSingleton("globalScope",()=>new Scope)}function withScope(...t){const n=getMainCarrier(),r=getAsyncContextStrategy(n);if(t.length===2){const[i,o]=t;return i?r.withSetScope(i,o):r.withScope(o)}return r.withScope(t[0])}function getClient(){return getCurrentScope().getClient()}function getTraceContextFromScope(t){const n=t.getPropagationContext(),{traceId:r,parentSpanId:i,propagationSpanId:o}=n,u={trace_id:r,span_id:o||generateSpanId()};return i&&(u.parent_span_id=i),u}const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE="sentry.source",SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE="sentry.sample_rate",SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE="sentry.previous_trace_sample_rate",SEMANTIC_ATTRIBUTE_SENTRY_OP="sentry.op",SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN="sentry.origin",SEMANTIC_ATTRIBUTE_PROFILE_ID="sentry.profile_id",SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME="sentry.exclusive_time",SPAN_STATUS_UNSET=0,SPAN_STATUS_OK=1,SCOPE_ON_START_SPAN_FIELD="_sentryScope",ISOLATION_SCOPE_ON_START_SPAN_FIELD="_sentryIsolationScope";function getCapturedScopesOnSpan(t){return{scope:t[SCOPE_ON_START_SPAN_FIELD],isolationScope:t[ISOLATION_SCOPE_ON_START_SPAN_FIELD]}}const SENTRY_BAGGAGE_KEY_PREFIX="sentry-",SENTRY_BAGGAGE_KEY_PREFIX_REGEX=/^sentry-/;function baggageHeaderToDynamicSamplingContext(t){const n=parseBaggageHeader(t);if(!n)return;const r=Object.entries(n).reduce((i,[o,u])=>{if(o.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)){const c=o.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);i[c]=u}return i},{});if(Object.keys(r).length>0)return r}function parseBaggageHeader(t){if(!(!t||!isString(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((n,r)=>{const i=baggageHeaderToObject(r);return Object.entries(i).forEach(([o,u])=>{n[o]=u}),n},{}):baggageHeaderToObject(t)}function baggageHeaderToObject(t){return t.split(",").map(n=>n.split("=").map(r=>{try{return decodeURIComponent(r.trim())}catch{return}})).reduce((n,[r,i])=>(r&&i&&(n[r]=i),n),{})}const ORG_ID_REGEX=/^o(\d+)\./,DSN_REGEX=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function isValidProtocol(t){return t==="http"||t==="https"}function dsnToString(t,n=!1){const{host:r,path:i,pass:o,port:u,projectId:c,protocol:d,publicKey:f}=t;return`${d}://${f}${n&&o?`:${o}`:""}@${r}${u?`:${u}`:""}/${i&&`${i}/`}${c}`}function dsnFromString(t){const n=DSN_REGEX.exec(t);if(!n){consoleSandbox(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[r,i,o="",u="",c="",d=""]=n.slice(1);let f="",m=d;const g=m.split("/");if(g.length>1&&(f=g.slice(0,-1).join("/"),m=g.pop()),m){const v=m.match(/^\d+/);v&&(m=v[0])}return dsnFromComponents({host:u,pass:o,path:f,projectId:m,port:c,protocol:r,publicKey:i})}function dsnFromComponents(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function validateDsn(t){if(!DEBUG_BUILD$3)return!0;const{port:n,projectId:r,protocol:i}=t;return["protocol","publicKey","host","projectId"].find(c=>t[c]?!1:(debug.error(`Invalid Sentry Dsn: ${c} missing`),!0))?!1:r.match(/^\d+$/)?isValidProtocol(i)?n&&isNaN(parseInt(n,10))?(debug.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(debug.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(debug.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function extractOrgIdFromDsnHost(t){const n=t.match(ORG_ID_REGEX);return n==null?void 0:n[1]}function extractOrgIdFromClient(t){const n=t.getOptions(),{host:r}=t.getDsn()||{};let i;return n.orgId?i=String(n.orgId):r&&(i=extractOrgIdFromDsnHost(r)),i}function makeDsn(t){const n=typeof t=="string"?dsnFromString(t):dsnFromComponents(t);if(!(!n||!validateDsn(n)))return n}function parseSampleRate(t){if(typeof t=="boolean")return Number(t);const n=typeof t=="string"?parseFloat(t):t;if(!(typeof n!="number"||isNaN(n)||n<0||n>1))return n}const TRACE_FLAG_SAMPLED=1;let hasShownSpanDropWarning=!1;function spanToTraceContext(t){const{spanId:n,traceId:r,isRemote:i}=t.spanContext(),o=i?n:spanToJSON(t).parent_span_id,u=getCapturedScopesOnSpan(t).scope,c=i?(u==null?void 0:u.getPropagationContext().propagationSpanId)||generateSpanId():n;return{parent_span_id:o,span_id:c,trace_id:r}}function convertSpanLinksForEnvelope(t){if(t&&t.length>0)return t.map(({context:{spanId:n,traceId:r,traceFlags:i,...o},attributes:u})=>({span_id:n,trace_id:r,sampled:i===TRACE_FLAG_SAMPLED,attributes:u,...o}))}function spanTimeInputToSeconds(t){return typeof t=="number"?ensureTimestampInSeconds(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?ensureTimestampInSeconds(t.getTime()):timestampInSeconds()}function ensureTimestampInSeconds(t){return t>9999999999?t/1e3:t}function spanToJSON(t){var i;if(spanIsSentrySpan(t))return t.getSpanJSON();const{spanId:n,traceId:r}=t.spanContext();if(spanIsOpenTelemetrySdkTraceBaseSpan(t)){const{attributes:o,startTime:u,name:c,endTime:d,status:f,links:m}=t,g="parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?(i=t.parentSpanContext)==null?void 0:i.spanId:void 0;return{span_id:n,trace_id:r,data:o,description:c,parent_span_id:g,start_timestamp:spanTimeInputToSeconds(u),timestamp:spanTimeInputToSeconds(d)||void 0,status:getStatusMessage(f),op:o[SEMANTIC_ATTRIBUTE_SENTRY_OP],origin:o[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],links:convertSpanLinksForEnvelope(m)}}return{span_id:n,trace_id:r,start_timestamp:0,data:{}}}function spanIsOpenTelemetrySdkTraceBaseSpan(t){const n=t;return!!n.attributes&&!!n.startTime&&!!n.name&&!!n.endTime&&!!n.status}function spanIsSentrySpan(t){return typeof t.getSpanJSON=="function"}function spanIsSampled(t){const{traceFlags:n}=t.spanContext();return n===TRACE_FLAG_SAMPLED}function getStatusMessage(t){if(!(!t||t.code===SPAN_STATUS_UNSET))return t.code===SPAN_STATUS_OK?"ok":t.message||"unknown_error"}const ROOT_SPAN_FIELD="_sentryRootSpan";function getRootSpan(t){return t[ROOT_SPAN_FIELD]||t}function showSpanDropWarning(){hasShownSpanDropWarning||(consoleSandbox(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),hasShownSpanDropWarning=!0)}function hasSpansEnabled(t){var r;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const n=(r=getClient())==null?void 0:r.getOptions();return!!n&&(n.tracesSampleRate!=null||!!n.tracesSampler)}const DEFAULT_ENVIRONMENT="production",FROZEN_DSC_FIELD="_frozenDsc";function getDynamicSamplingContextFromClient(t,n){const r=n.getOptions(),{publicKey:i}=n.getDsn()||{},o={environment:r.environment||DEFAULT_ENVIRONMENT,release:r.release,public_key:i,trace_id:t,org_id:extractOrgIdFromClient(n)};return n.emit("createDsc",o),o}function getDynamicSamplingContextFromScope(t,n){const r=n.getPropagationContext();return r.dsc||getDynamicSamplingContextFromClient(r.traceId,t)}function getDynamicSamplingContextFromSpan(t){var S;const n=getClient();if(!n)return{};const r=getRootSpan(t),i=spanToJSON(r),o=i.data,u=r.spanContext().traceState,c=(u==null?void 0:u.get("sentry.sample_rate"))??o[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]??o[SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE];function d(E){return(typeof c=="number"||typeof c=="string")&&(E.sample_rate=`${c}`),E}const f=r[FROZEN_DSC_FIELD];if(f)return d(f);const m=u==null?void 0:u.get("sentry.dsc"),g=m&&baggageHeaderToDynamicSamplingContext(m);if(g)return d(g);const v=getDynamicSamplingContextFromClient(t.spanContext().traceId,n),y=o[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE],x=i.description;return y!=="url"&&x&&(v.transaction=x),hasSpansEnabled()&&(v.sampled=String(spanIsSampled(r)),v.sample_rand=(u==null?void 0:u.get("sentry.sample_rand"))??((S=getCapturedScopesOnSpan(r).scope)==null?void 0:S.getPropagationContext().sampleRand.toString())),d(v),n.emit("createDsc",v,r),v}function normalize(t,n=100,r=1/0){try{return visit$1("",t,n,r)}catch(i){return{ERROR:`**non-serializable** (${i})`}}}function normalizeToSize(t,n=3,r=100*1024){const i=normalize(t,n);return jsonSize(i)>r?normalizeToSize(t,n-1,r):i}function visit$1(t,n,r=1/0,i=1/0,o=memoBuilder()){const[u,c]=o;if(n==null||["boolean","string"].includes(typeof n)||typeof n=="number"&&Number.isFinite(n))return n;const d=stringifyValue(t,n);if(!d.startsWith("[object "))return d;if(n.__sentry_skip_normalization__)return n;const f=typeof n.__sentry_override_normalization_depth__=="number"?n.__sentry_override_normalization_depth__:r;if(f===0)return d.replace("object ","");if(u(n))return"[Circular ~]";const m=n;if(m&&typeof m.toJSON=="function")try{const x=m.toJSON();return visit$1("",x,f-1,i,o)}catch{}const g=Array.isArray(n)?[]:{};let v=0;const y=convertToPlainObject(n);for(const x in y){if(!Object.prototype.hasOwnProperty.call(y,x))continue;if(v>=i){g[x]="[MaxProperties ~]";break}const S=y[x];g[x]=visit$1(x,S,f-1,i,o),v++}return c(n),g}function stringifyValue(t,n){try{if(t==="domain"&&n&&typeof n=="object"&&n._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&n===global)return"[Global]";if(typeof window<"u"&&n===window)return"[Window]";if(typeof document<"u"&&n===document)return"[Document]";if(isVueViewModel(n))return"[VueViewModel]";if(isSyntheticEvent(n))return"[SyntheticEvent]";if(typeof n=="number"&&!Number.isFinite(n))return`[${n}]`;if(typeof n=="function")return`[Function: ${getFunctionName(n)}]`;if(typeof n=="symbol")return`[${String(n)}]`;if(typeof n=="bigint")return`[BigInt: ${String(n)}]`;const r=getConstructorName(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function getConstructorName(t){const n=Object.getPrototypeOf(t);return n!=null&&n.constructor?n.constructor.name:"null prototype"}function utf8Length(t){return~-encodeURI(t).split(/%..|./).length}function jsonSize(t){return utf8Length(JSON.stringify(t))}function memoBuilder(){const t=new WeakSet;function n(i){return t.has(i)?!0:(t.add(i),!1)}function r(i){t.delete(i)}return[n,r]}function createEnvelope(t,n=[]){return[t,n]}function addItemToEnvelope(t,n){const[r,i]=t;return[r,[...i,n]]}function forEachEnvelopeItem(t,n){const r=t[1];for(const i of r){const o=i[0].type;if(n(i,o))return!0}return!1}function encodeUTF8(t){const n=getSentryCarrier(GLOBAL_OBJ);return n.encodePolyfill?n.encodePolyfill(t):new TextEncoder().encode(t)}function serializeEnvelope(t){const[n,r]=t;let i=JSON.stringify(n);function o(u){typeof i=="string"?i=typeof u=="string"?i+u:[encodeUTF8(i),u]:i.push(typeof u=="string"?encodeUTF8(u):u)}for(const u of r){const[c,d]=u;if(o(` ${JSON.stringify(c)} `),typeof d=="string"||d instanceof Uint8Array)o(d);else{let f;try{f=JSON.stringify(d)}catch{f=JSON.stringify(normalize(d))}o(f)}}return typeof i=="string"?i:concatBuffers(i)}function concatBuffers(t){const n=t.reduce((o,u)=>o+u.length,0),r=new Uint8Array(n);let i=0;for(const o of t)r.set(o,i),i+=o.length;return r}function createAttachmentEnvelopeItem(t){const n=typeof t.data=="string"?encodeUTF8(t.data):t.data;return[{type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},n]}const ITEM_TYPE_TO_DATA_CATEGORY_MAP={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function envelopeItemTypeToDataCategory(t){return ITEM_TYPE_TO_DATA_CATEGORY_MAP[t]}function getSdkMetadataForEnvelopeHeader(t){if(!(t!=null&&t.sdk))return;const{name:n,version:r}=t.sdk;return{name:n,version:r}}function createEventEnvelopeHeaders(t,n,r,i){var u;const o=(u=t.sdkProcessingMetadata)==null?void 0:u.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...n&&{sdk:n},...!!r&&i&&{dsn:dsnToString(i)},...o&&{trace:o}}}function shouldIgnoreSpan(t,n){if(!(n!=null&&n.length)||!t.description)return!1;for(const r of n){if(isStringOrRegExp(r)){if(isMatchingPattern(t.description,r))return!0;continue}if(!r.name&&!r.op)continue;const i=r.name?isMatchingPattern(t.description,r.name):!0,o=r.op?t.op&&isMatchingPattern(t.op,r.op):!0;if(i&&o)return!0}return!1}function reparentChildSpans(t,n){const r=n.parent_span_id,i=n.span_id;if(r)for(const o of t)o.parent_span_id===i&&(o.parent_span_id=r)}function isStringOrRegExp(t){return typeof t=="string"||t instanceof RegExp}function _enhanceEventWithSdkInfo(t,n){var i,o,u,c;if(!n)return t;const r=t.sdk||{};return t.sdk={...r,name:r.name||n.name,version:r.version||n.version,integrations:[...((i=t.sdk)==null?void 0:i.integrations)||[],...n.integrations||[]],packages:[...((o=t.sdk)==null?void 0:o.packages)||[],...n.packages||[]],settings:(u=t.sdk)!=null&&u.settings||n.settings?{...(c=t.sdk)==null?void 0:c.settings,...n.settings}:void 0},t}function createSessionEnvelope(t,n,r,i){const o=getSdkMetadataForEnvelopeHeader(r),u={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!i&&n&&{dsn:dsnToString(n)}},c="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return createEnvelope(u,[c])}function createEventEnvelope(t,n,r,i){const o=getSdkMetadataForEnvelopeHeader(r),u=t.type&&t.type!=="replay_event"?t.type:"event";_enhanceEventWithSdkInfo(t,r==null?void 0:r.sdk);const c=createEventEnvelopeHeaders(t,o,i,n);return delete t.sdkProcessingMetadata,createEnvelope(c,[[{type:u},t]])}const STATE_PENDING=0,STATE_RESOLVED=1,STATE_REJECTED=2;function resolvedSyncPromise(t){return new SyncPromise(n=>{n(t)})}function rejectedSyncPromise(t){return new SyncPromise((n,r)=>{r(t)})}class SyncPromise{constructor(n){this._state=STATE_PENDING,this._handlers=[],this._runExecutor(n)}then(n,r){return new SyncPromise((i,o)=>{this._handlers.push([!1,u=>{if(!n)i(u);else try{i(n(u))}catch(c){o(c)}},u=>{if(!r)o(u);else try{i(r(u))}catch(c){o(c)}}]),this._executeHandlers()})}catch(n){return this.then(r=>r,n)}finally(n){return new SyncPromise((r,i)=>{let o,u;return this.then(c=>{u=!1,o=c,n&&n()},c=>{u=!0,o=c,n&&n()}).then(()=>{if(u){i(o);return}r(o)})})}_executeHandlers(){if(this._state===STATE_PENDING)return;const n=this._handlers.slice();this._handlers=[],n.forEach(r=>{r[0]||(this._state===STATE_RESOLVED&&r[1](this._value),this._state===STATE_REJECTED&&r[2](this._value),r[0]=!0)})}_runExecutor(n){const r=(u,c)=>{if(this._state===STATE_PENDING){if(isThenable(c)){c.then(i,o);return}this._state=u,this._value=c,this._executeHandlers()}},i=u=>{r(STATE_RESOLVED,u)},o=u=>{r(STATE_REJECTED,u)};try{n(i,o)}catch(u){o(u)}}}function notifyEventProcessors(t,n,r,i=0){return new SyncPromise((o,u)=>{const c=t[i];if(n===null||typeof c!="function")o(n);else{const d=c({...n},r);DEBUG_BUILD$3&&c.id&&d===null&&debug.log(`Event processor "${c.id}" dropped event`),isThenable(d)?d.then(f=>notifyEventProcessors(t,f,r,i+1).then(o)).then(null,u):notifyEventProcessors(t,d,r,i+1).then(o).then(null,u)}})}function applyScopeDataToEvent(t,n){const{fingerprint:r,span:i,breadcrumbs:o,sdkProcessingMetadata:u}=n;applyDataToEvent(t,n),i&&applySpanToEvent(t,i),applyFingerprintToEvent(t,r),applyBreadcrumbsToEvent(t,o),applySdkMetadataToEvent(t,u)}function mergeScopeData(t,n){const{extra:r,tags:i,user:o,contexts:u,level:c,sdkProcessingMetadata:d,breadcrumbs:f,fingerprint:m,eventProcessors:g,attachments:v,propagationContext:y,transactionName:x,span:S}=n;mergeAndOverwriteScopeData(t,"extra",r),mergeAndOverwriteScopeData(t,"tags",i),mergeAndOverwriteScopeData(t,"user",o),mergeAndOverwriteScopeData(t,"contexts",u),t.sdkProcessingMetadata=merge(t.sdkProcessingMetadata,d,2),c&&(t.level=c),x&&(t.transactionName=x),S&&(t.span=S),f.length&&(t.breadcrumbs=[...t.breadcrumbs,...f]),m.length&&(t.fingerprint=[...t.fingerprint,...m]),g.length&&(t.eventProcessors=[...t.eventProcessors,...g]),v.length&&(t.attachments=[...t.attachments,...v]),t.propagationContext={...t.propagationContext,...y}}function mergeAndOverwriteScopeData(t,n,r){t[n]=merge(t[n],r,1)}function applyDataToEvent(t,n){const{extra:r,tags:i,user:o,contexts:u,level:c,transactionName:d}=n;Object.keys(r).length&&(t.extra={...r,...t.extra}),Object.keys(i).length&&(t.tags={...i,...t.tags}),Object.keys(o).length&&(t.user={...o,...t.user}),Object.keys(u).length&&(t.contexts={...u,...t.contexts}),c&&(t.level=c),d&&t.type!=="transaction"&&(t.transaction=d)}function applyBreadcrumbsToEvent(t,n){const r=[...t.breadcrumbs||[],...n];t.breadcrumbs=r.length?r:void 0}function applySdkMetadataToEvent(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}function applySpanToEvent(t,n){t.contexts={trace:spanToTraceContext(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:getDynamicSamplingContextFromSpan(n),...t.sdkProcessingMetadata};const r=getRootSpan(n),i=spanToJSON(r).description;i&&!t.transaction&&t.type==="transaction"&&(t.transaction=i)}function applyFingerprintToEvent(t,n){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],n&&(t.fingerprint=t.fingerprint.concat(n)),t.fingerprint.length||delete t.fingerprint}let parsedStackResults,lastKeysCount,cachedFilenameDebugIds;function getFilenameToDebugIdMap(t){const n=GLOBAL_OBJ._sentryDebugIds;if(!n)return{};const r=Object.keys(n);return cachedFilenameDebugIds&&r.length===lastKeysCount||(lastKeysCount=r.length,cachedFilenameDebugIds=r.reduce((i,o)=>{parsedStackResults||(parsedStackResults={});const u=parsedStackResults[o];if(u)i[u[0]]=u[1];else{const c=t(o);for(let d=c.length-1;d>=0;d--){const f=c[d],m=f==null?void 0:f.filename,g=n[o];if(m&&g){i[m]=g,parsedStackResults[o]=[m,g];break}}}return i},{})),cachedFilenameDebugIds}function prepareEvent(t,n,r,i,o,u){const{normalizeDepth:c=3,normalizeMaxBreadth:d=1e3}=t,f={...n,event_id:n.event_id||r.event_id||uuid4(),timestamp:n.timestamp||dateTimestampInSeconds()},m=r.integrations||t.integrations.map(b=>b.name);applyClientOptions(f,t),applyIntegrationsMetadata(f,m),o&&o.emit("applyFrameMetadata",n),n.type===void 0&&applyDebugIds(f,t.stackParser);const g=getFinalScope(i,r.captureContext);r.mechanism&&addExceptionMechanism(f,r.mechanism);const v=o?o.getEventProcessors():[],y=getGlobalScope().getScopeData();if(u){const b=u.getScopeData();mergeScopeData(y,b)}if(g){const b=g.getScopeData();mergeScopeData(y,b)}const x=[...r.attachments||[],...y.attachments];x.length&&(r.attachments=x),applyScopeDataToEvent(f,y);const S=[...v,...y.eventProcessors];return notifyEventProcessors(S,f,r).then(b=>(b&&applyDebugMeta(b),typeof c=="number"&&c>0?normalizeEvent(b,c,d):b))}function applyClientOptions(t,n){const{environment:r,release:i,dist:o,maxValueLength:u=250}=n;t.environment=t.environment||r||DEFAULT_ENVIRONMENT,!t.release&&i&&(t.release=i),!t.dist&&o&&(t.dist=o);const c=t.request;c!=null&&c.url&&(c.url=truncate(c.url,u))}function applyDebugIds(t,n){var i,o;const r=getFilenameToDebugIdMap(n);(o=(i=t.exception)==null?void 0:i.values)==null||o.forEach(u=>{var c,d;(d=(c=u.stacktrace)==null?void 0:c.frames)==null||d.forEach(f=>{f.filename&&(f.debug_id=r[f.filename])})})}function applyDebugMeta(t){var i,o;const n={};if((o=(i=t.exception)==null?void 0:i.values)==null||o.forEach(u=>{var c,d;(d=(c=u.stacktrace)==null?void 0:c.frames)==null||d.forEach(f=>{f.debug_id&&(f.abs_path?n[f.abs_path]=f.debug_id:f.filename&&(n[f.filename]=f.debug_id),delete f.debug_id)})}),Object.keys(n).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const r=t.debug_meta.images;Object.entries(n).forEach(([u,c])=>{r.push({type:"sourcemap",code_file:u,debug_id:c})})}function applyIntegrationsMetadata(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}function normalizeEvent(t,n,r){var o,u;if(!t)return null;const i={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(c=>({...c,...c.data&&{data:normalize(c.data,n,r)}}))},...t.user&&{user:normalize(t.user,n,r)},...t.contexts&&{contexts:normalize(t.contexts,n,r)},...t.extra&&{extra:normalize(t.extra,n,r)}};return(o=t.contexts)!=null&&o.trace&&i.contexts&&(i.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(i.contexts.trace.data=normalize(t.contexts.trace.data,n,r))),t.spans&&(i.spans=t.spans.map(c=>({...c,...c.data&&{data:normalize(c.data,n,r)}}))),(u=t.contexts)!=null&&u.flags&&i.contexts&&(i.contexts.flags=normalize(t.contexts.flags,3,r)),i}function getFinalScope(t,n){if(!n)return t;const r=t?t.clone():new Scope;return r.update(n),r}function parseEventHintOrCaptureContext(t){if(t)return hintIsScopeOrFunction(t)?{captureContext:t}:hintIsScopeContext(t)?{captureContext:t}:t}function hintIsScopeOrFunction(t){return t instanceof Scope||typeof t=="function"}const captureContextKeys=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function hintIsScopeContext(t){return Object.keys(t).some(n=>captureContextKeys.includes(n))}function captureException(t,n){return getCurrentScope().captureException(t,parseEventHintOrCaptureContext(n))}function captureMessage(t,n){const r=typeof n=="string"?n:void 0,i=typeof n!="string"?{captureContext:n}:void 0;return getCurrentScope().captureMessage(t,r,i)}function captureEvent(t,n){return getCurrentScope().captureEvent(t,n)}function setContext(t,n){getIsolationScope().setContext(t,n)}function lastEventId(){return getIsolationScope().lastEventId()}function startSession(t){const n=getIsolationScope(),r=getCurrentScope(),{userAgent:i}=GLOBAL_OBJ.navigator||{},o=makeSession({user:r.getUser()||n.getUser(),...i&&{userAgent:i},...t}),u=n.getSession();return(u==null?void 0:u.status)==="ok"&&updateSession(u,{status:"exited"}),endSession(),n.setSession(o),o}function endSession(){const t=getIsolationScope(),r=getCurrentScope().getSession()||t.getSession();r&&closeSession(r),_sendSessionUpdate(),t.setSession()}function _sendSessionUpdate(){const t=getIsolationScope(),n=getClient(),r=t.getSession();r&&n&&n.captureSession(r)}function captureSession(t=!1){if(t){endSession();return}_sendSessionUpdate()}const SENTRY_API_VERSION="7";function getBaseApiEndpoint(t){const n=t.protocol?`${t.protocol}:`:"",r=t.port?`:${t.port}`:"";return`${n}//${t.host}${r}${t.path?`/${t.path}`:""}/api/`}function _getIngestEndpoint(t){return`${getBaseApiEndpoint(t)}${t.projectId}/envelope/`}function _encodedAuth(t,n){const r={sentry_version:SENTRY_API_VERSION};return t.publicKey&&(r.sentry_key=t.publicKey),n&&(r.sentry_client=`${n.name}/${n.version}`),new URLSearchParams(r).toString()}function getEnvelopeEndpointWithUrlEncodedAuth(t,n,r){return n||`${_getIngestEndpoint(t)}?${_encodedAuth(t,r)}`}function getReportDialogEndpoint(t,n){const r=makeDsn(t);if(!r)return"";const i=`${getBaseApiEndpoint(r)}embed/error-page/`;let o=`dsn=${dsnToString(r)}`;for(const u in n)if(u!=="dsn"&&u!=="onClose")if(u==="user"){const c=n.user;if(!c)continue;c.name&&(o+=`&name=${encodeURIComponent(c.name)}`),c.email&&(o+=`&email=${encodeURIComponent(c.email)}`)}else o+=`&${encodeURIComponent(u)}=${encodeURIComponent(n[u])}`;return`${i}?${o}`}const installedIntegrations=[];function filterDuplicates(t){const n={};return t.forEach(r=>{const{name:i}=r,o=n[i];o&&!o.isDefaultInstance&&r.isDefaultInstance||(n[i]=r)}),Object.values(n)}function getIntegrationsToSetup(t){const n=t.defaultIntegrations||[],r=t.integrations;n.forEach(o=>{o.isDefaultInstance=!0});let i;if(Array.isArray(r))i=[...n,...r];else if(typeof r=="function"){const o=r(n);i=Array.isArray(o)?o:[o]}else i=n;return filterDuplicates(i)}function setupIntegrations(t,n){const r={};return n.forEach(i=>{i&&setupIntegration(t,i,r)}),r}function afterSetupIntegrations(t,n){for(const r of n)r!=null&&r.afterAllSetup&&r.afterAllSetup(t)}function setupIntegration(t,n,r){if(r[n.name]){DEBUG_BUILD$3&&debug.log(`Integration skipped because it was already installed: ${n.name}`);return}if(r[n.name]=n,installedIntegrations.indexOf(n.name)===-1&&typeof n.setupOnce=="function"&&(n.setupOnce(),installedIntegrations.push(n.name)),n.setup&&typeof n.setup=="function"&&n.setup(t),typeof n.preprocessEvent=="function"){const i=n.preprocessEvent.bind(n);t.on("preprocessEvent",(o,u)=>i(o,u,t))}if(typeof n.processEvent=="function"){const i=n.processEvent.bind(n),o=Object.assign((u,c)=>i(u,c,t),{id:n.name});t.addEventProcessor(o)}DEBUG_BUILD$3&&debug.log(`Integration installed: ${n.name}`)}function defineIntegration(t){return t}function createClientReportEnvelope(t,n,r){const i=[{type:"client_report"},{timestamp:dateTimestampInSeconds(),discarded_events:t}];return createEnvelope(n?{dsn:n}:{},[i])}function getPossibleEventMessages(t){const n=[];t.message&&n.push(t.message);try{const r=t.exception.values[t.exception.values.length-1];r!=null&&r.value&&(n.push(r.value),r.type&&n.push(`${r.type}: ${r.value}`))}catch{}return n}function convertTransactionEventToSpanJson(t){var f;const{trace_id:n,parent_span_id:r,span_id:i,status:o,origin:u,data:c,op:d}=((f=t.contexts)==null?void 0:f.trace)??{};return{data:c??{},description:t.transaction,op:d,parent_span_id:r,span_id:i??"",start_timestamp:t.start_timestamp??0,status:o,timestamp:t.timestamp,trace_id:n??"",origin:u,profile_id:c==null?void 0:c[SEMANTIC_ATTRIBUTE_PROFILE_ID],exclusive_time:c==null?void 0:c[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME],measurements:t.measurements,is_segment:!0}}function convertSpanJsonToTransactionEvent(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:{...t.data,...t.profile_id&&{[SEMANTIC_ATTRIBUTE_PROFILE_ID]:t.profile_id},...t.exclusive_time&&{[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]:t.exclusive_time}}}},measurements:t.measurements}}const ALREADY_SEEN_ERROR="Not capturing exception because it's already been captured.",MISSING_RELEASE_FOR_SESSION_ERROR="Discarded session because of missing or non-string release",INTERNAL_ERROR_SYMBOL=Symbol.for("SentryInternalError"),DO_NOT_SEND_EVENT_SYMBOL=Symbol.for("SentryDoNotSendEventError");function _makeInternalError(t){return{message:t,[INTERNAL_ERROR_SYMBOL]:!0}}function _makeDoNotSendEventError(t){return{message:t,[DO_NOT_SEND_EVENT_SYMBOL]:!0}}function _isInternalError(t){return!!t&&typeof t=="object"&&INTERNAL_ERROR_SYMBOL in t}function _isDoNotSendEventError(t){return!!t&&typeof t=="object"&&DO_NOT_SEND_EVENT_SYMBOL in t}class Client{constructor(n){if(this._options=n,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],n.dsn?this._dsn=makeDsn(n.dsn):DEBUG_BUILD$3&&debug.warn("No DSN provided, client will not send events."),this._dsn){const r=getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,n.tunnel,n._metadata?n._metadata.sdk:void 0);this._transport=n.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...n.transportOptions,url:r})}}captureException(n,r,i){const o=uuid4();if(checkOrSetAlreadyCaught(n))return DEBUG_BUILD$3&&debug.log(ALREADY_SEEN_ERROR),o;const u={event_id:o,...r};return this._process(this.eventFromException(n,u).then(c=>this._captureEvent(c,u,i))),u.event_id}captureMessage(n,r,i,o){const u={event_id:uuid4(),...i},c=isParameterizedString(n)?n:String(n),d=isPrimitive(n)?this.eventFromMessage(c,r,u):this.eventFromException(n,u);return this._process(d.then(f=>this._captureEvent(f,u,o))),u.event_id}captureEvent(n,r,i){const o=uuid4();if(r!=null&&r.originalException&&checkOrSetAlreadyCaught(r.originalException))return DEBUG_BUILD$3&&debug.log(ALREADY_SEEN_ERROR),o;const u={event_id:o,...r},c=n.sdkProcessingMetadata||{},d=c.capturedSpanScope,f=c.capturedSpanIsolationScope;return this._process(this._captureEvent(n,u,d||i,f)),u.event_id}captureSession(n){this.sendSession(n),updateSession(n,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(n){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(n).then(i=>r.flush(n).then(o=>i&&o))):resolvedSyncPromise(!0)}close(n){return this.flush(n).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(n){this._eventProcessors.push(n)}init(){(this._isEnabled()||this._options.integrations.some(({name:n})=>n.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(n){return this._integrations[n]}addIntegration(n){const r=this._integrations[n.name];setupIntegration(this,n,this._integrations),r||afterSetupIntegrations(this,[n])}sendEvent(n,r={}){this.emit("beforeSendEvent",n,r);let i=createEventEnvelope(n,this._dsn,this._options._metadata,this._options.tunnel);for(const u of r.attachments||[])i=addItemToEnvelope(i,createAttachmentEnvelopeItem(u));const o=this.sendEnvelope(i);o&&o.then(u=>this.emit("afterSendEvent",n,u),null)}sendSession(n){const{release:r,environment:i=DEFAULT_ENVIRONMENT}=this._options;if("aggregates"in n){const u=n.attrs||{};if(!u.release&&!r){DEBUG_BUILD$3&&debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);return}u.release=u.release||r,u.environment=u.environment||i,n.attrs=u}else{if(!n.release&&!r){DEBUG_BUILD$3&&debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);return}n.release=n.release||r,n.environment=n.environment||i}this.emit("beforeSendSession",n);const o=createSessionEnvelope(n,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(n,r,i=1){if(this._options.sendClientReports){const o=`${n}:${r}`;DEBUG_BUILD$3&&debug.log(`Recording outcome: "${o}"${i>1?` (${i} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+i}}on(n,r){const i=this._hooks[n]=this._hooks[n]||[];return i.push(r),()=>{const o=i.indexOf(r);o>-1&&i.splice(o,1)}}emit(n,...r){const i=this._hooks[n];i&&i.forEach(o=>o(...r))}sendEnvelope(n){return this.emit("beforeEnvelope",n),this._isEnabled()&&this._transport?this._transport.send(n).then(null,r=>(DEBUG_BUILD$3&&debug.error("Error while sending envelope:",r),r)):(DEBUG_BUILD$3&&debug.error("Transport disabled"),resolvedSyncPromise({}))}_setupIntegrations(){const{integrations:n}=this._options;this._integrations=setupIntegrations(this,n),afterSetupIntegrations(this,n)}_updateSessionFromEvent(n,r){var f;let i=r.level==="fatal",o=!1;const u=(f=r.exception)==null?void 0:f.values;if(u){o=!0;for(const m of u){const g=m.mechanism;if((g==null?void 0:g.handled)===!1){i=!0;break}}}const c=n.status==="ok";(c&&n.errors===0||c&&i)&&(updateSession(n,{...i&&{status:"crashed"},errors:n.errors||Number(o||i)}),this.captureSession(n))}_isClientDoneProcessing(n){return new SyncPromise(r=>{let i=0;const o=1,u=setInterval(()=>{this._numProcessing==0?(clearInterval(u),r(!0)):(i+=o,n&&i>=n&&(clearInterval(u),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(n,r,i,o){const u=this.getOptions(),c=Object.keys(this._integrations);return!r.integrations&&(c!=null&&c.length)&&(r.integrations=c),this.emit("preprocessEvent",n,r),n.type||o.setLastEventId(n.event_id||r.event_id),prepareEvent(u,n,r,i,this,o).then(d=>{if(d===null)return d;this.emit("postprocessEvent",d,r),d.contexts={trace:getTraceContextFromScope(i),...d.contexts};const f=getDynamicSamplingContextFromScope(this,i);return d.sdkProcessingMetadata={dynamicSamplingContext:f,...d.sdkProcessingMetadata},d})}_captureEvent(n,r={},i=getCurrentScope(),o=getIsolationScope()){return DEBUG_BUILD$3&&isErrorEvent(n)&&debug.log(`Captured error event \`${getPossibleEventMessages(n)[0]||""}\``),this._processEvent(n,r,i,o).then(u=>u.event_id,u=>{DEBUG_BUILD$3&&(_isDoNotSendEventError(u)?debug.log(u.message):_isInternalError(u)?debug.warn(u.message):debug.warn(u))})}_processEvent(n,r,i,o){const u=this.getOptions(),{sampleRate:c}=u,d=isTransactionEvent(n),f=isErrorEvent(n),m=n.type||"error",g=`before send for type \`${m}\``,v=typeof c>"u"?void 0:parseSampleRate(c);if(f&&typeof v=="number"&&Math.random()>v)return this.recordDroppedEvent("sample_rate","error"),rejectedSyncPromise(_makeDoNotSendEventError(`Discarding event because it's not included in the random sample (sampling rate = ${c})`));const y=m==="replay_event"?"replay":m;return this._prepareEvent(n,r,i,o).then(x=>{if(x===null)throw this.recordDroppedEvent("event_processor",y),_makeDoNotSendEventError("An event processor returned `null`, will not send event.");if(r.data&&r.data.__sentry__===!0)return x;const E=processBeforeSend(this,u,x,r);return _validateBeforeSendResult(E,g)}).then(x=>{var b;if(x===null){if(this.recordDroppedEvent("before_send",y),d){const C=1+(n.spans||[]).length;this.recordDroppedEvent("before_send","span",C)}throw _makeDoNotSendEventError(`${g} returned \`null\`, will not send event.`)}const S=i.getSession()||o.getSession();if(f&&S&&this._updateSessionFromEvent(S,x),d){const k=((b=x.sdkProcessingMetadata)==null?void 0:b.spanCountBeforeProcessing)||0,C=x.spans?x.spans.length:0,I=k-C;I>0&&this.recordDroppedEvent("before_send","span",I)}const E=x.transaction_info;if(d&&E&&x.transaction!==n.transaction){const k="custom";x.transaction_info={...E,source:k}}return this.sendEvent(x,r),x}).then(null,x=>{throw _isDoNotSendEventError(x)||_isInternalError(x)?x:(this.captureException(x,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:x}),_makeInternalError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${x}`))})}_process(n){this._numProcessing++,n.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const n=this._outcomes;return this._outcomes={},Object.entries(n).map(([r,i])=>{const[o,u]=r.split(":");return{reason:o,category:u,quantity:i}})}_flushOutcomes(){DEBUG_BUILD$3&&debug.log("Flushing outcomes...");const n=this._clearOutcomes();if(n.length===0){DEBUG_BUILD$3&&debug.log("No outcomes to send");return}if(!this._dsn){DEBUG_BUILD$3&&debug.log("No dsn provided, will not send outcomes");return}DEBUG_BUILD$3&&debug.log("Sending outcomes:",n);const r=createClientReportEnvelope(n,this._options.tunnel&&dsnToString(this._dsn));this.sendEnvelope(r)}}function _validateBeforeSendResult(t,n){const r=`${n} must return \`null\` or a valid event.`;if(isThenable(t))return t.then(i=>{if(!isPlainObject$2(i)&&i!==null)throw _makeInternalError(r);return i},i=>{throw _makeInternalError(`${n} rejected with ${i}`)});if(!isPlainObject$2(t)&&t!==null)throw _makeInternalError(r);return t}function processBeforeSend(t,n,r,i){const{beforeSend:o,beforeSendTransaction:u,beforeSendSpan:c,ignoreSpans:d}=n;let f=r;if(isErrorEvent(f)&&o)return o(f,i);if(isTransactionEvent(f)){if(c||d){const m=convertTransactionEventToSpanJson(f);if(d!=null&&d.length&&shouldIgnoreSpan(m,d))return null;if(c){const g=c(m);g?f=merge(r,convertSpanJsonToTransactionEvent(g)):showSpanDropWarning()}if(f.spans){const g=[],v=f.spans;for(const x of v){if(d!=null&&d.length&&shouldIgnoreSpan(x,d)){reparentChildSpans(v,x);continue}if(c){const S=c(x);S?g.push(S):(showSpanDropWarning(),g.push(x))}else g.push(x)}const y=f.spans.length-g.length;y&&t.recordDroppedEvent("before_send","span",y),f.spans=g}}if(u){if(f.spans){const m=f.spans.length;f.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:m}}return u(f,i)}}return f}function isErrorEvent(t){return t.type===void 0}function isTransactionEvent(t){return t.type==="transaction"}function createLogContainerEnvelopeItem(t){return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{items:t}]}function createLogEnvelope(t,n,r,i){const o={};return n!=null&&n.sdk&&(o.sdk={name:n.sdk.name,version:n.sdk.version}),r&&i&&(o.dsn=dsnToString(i)),createEnvelope(o,[createLogContainerEnvelopeItem(t)])}function _INTERNAL_flushLogsBuffer(t,n){const r=_INTERNAL_getLogBuffer(t)??[];if(r.length===0)return;const i=t.getOptions(),o=createLogEnvelope(r,i._metadata,i.tunnel,t.getDsn());_getBufferMap().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(o)}function _INTERNAL_getLogBuffer(t){return _getBufferMap().get(t)}function _getBufferMap(){return getGlobalSingleton("clientToLogBufferMap",()=>new WeakMap)}function initAndBind(t,n){n.debug===!0&&(DEBUG_BUILD$3?debug.enable():consoleSandbox(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),getCurrentScope().update(n.initialScope);const i=new t(n);return setCurrentClient(i),i.init(),i}function setCurrentClient(t){getCurrentScope().setClient(t)}const SENTRY_BUFFER_FULL_ERROR=Symbol.for("SentryBufferFullError");function makePromiseBuffer(t){const n=[];function r(){return t===void 0||n.lengthi(d)).then(null,()=>i(d).then(null,()=>{})),d}function u(c){return new SyncPromise((d,f)=>{let m=n.length;if(!m)return d(!0);const g=setTimeout(()=>{c&&c>0&&d(!1)},c);n.forEach(v=>{resolvedSyncPromise(v).then(()=>{--m||(clearTimeout(g),d(!0))},f)})})}return{$:n,add:o,drain:u}}const DEFAULT_RETRY_AFTER=60*1e3;function parseRetryAfterHeader(t,n=Date.now()){const r=parseInt(`${t}`,10);if(!isNaN(r))return r*1e3;const i=Date.parse(`${t}`);return isNaN(i)?DEFAULT_RETRY_AFTER:i-n}function disabledUntil(t,n){return t[n]||t.all||0}function isRateLimited(t,n,r=Date.now()){return disabledUntil(t,n)>r}function updateRateLimits(t,{statusCode:n,headers:r},i=Date.now()){const o={...t},u=r==null?void 0:r["x-sentry-rate-limits"],c=r==null?void 0:r["retry-after"];if(u)for(const d of u.trim().split(",")){const[f,m,,,g]=d.split(":",5),v=parseInt(f,10),y=(isNaN(v)?60:v)*1e3;if(!m)o.all=i+y;else for(const x of m.split(";"))x==="metric_bucket"?(!g||g.split(";").includes("custom"))&&(o[x]=i+y):o[x]=i+y}else c?o.all=i+parseRetryAfterHeader(c,i):n===429&&(o.all=i+60*1e3);return o}const DEFAULT_TRANSPORT_BUFFER_SIZE=64;function createTransport(t,n,r=makePromiseBuffer(t.bufferSize||DEFAULT_TRANSPORT_BUFFER_SIZE)){let i={};const o=c=>r.drain(c);function u(c){const d=[];if(forEachEnvelopeItem(c,(v,y)=>{const x=envelopeItemTypeToDataCategory(y);isRateLimited(i,x)?t.recordDroppedEvent("ratelimit_backoff",x):d.push(v)}),d.length===0)return resolvedSyncPromise({});const f=createEnvelope(c[0],d),m=v=>{forEachEnvelopeItem(f,(y,x)=>{t.recordDroppedEvent(v,envelopeItemTypeToDataCategory(x))})},g=()=>n({body:serializeEnvelope(f)}).then(v=>(v.statusCode!==void 0&&(v.statusCode<200||v.statusCode>=300)&&DEBUG_BUILD$3&&debug.warn(`Sentry responded with status code ${v.statusCode} to sent event.`),i=updateRateLimits(i,v),v),v=>{throw m("network_error"),DEBUG_BUILD$3&&debug.error("Encountered error running transport request:",v),v});return r.add(g).then(v=>v,v=>{if(v===SENTRY_BUFFER_FULL_ERROR)return DEBUG_BUILD$3&&debug.error("Skipped sending event because buffer is full."),m("queue_overflow"),resolvedSyncPromise({});throw v})}return{send:u,flush:o}}function parseUrl(t){if(!t)return{};const n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};const r=n[6]||"",i=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],search:r,hash:i,relative:n[5]+r+i}}function addAutoIpAddressToSession(t){var n;"aggregates"in t?((n=t.attrs)==null?void 0:n.ip_address)===void 0&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function applySdkMetadata(t,n,r=[n],i="npm"){const o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${n}`,packages:r.map(u=>({name:`${i}:@sentry/${u}`,version:SDK_VERSION})),version:SDK_VERSION}),t._metadata=o}const DEFAULT_BREADCRUMBS=100;function addBreadcrumb(t,n){const r=getClient(),i=getIsolationScope();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:u=DEFAULT_BREADCRUMBS}=r.getOptions();if(u<=0)return;const d={timestamp:dateTimestampInSeconds(),...t},f=o?consoleSandbox(()=>o(d,n)):d;f!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",f,n),i.addBreadcrumb(f,u))}let originalFunctionToString;const INTEGRATION_NAME$6="FunctionToString",SETUP_CLIENTS=new WeakMap,_functionToStringIntegration=()=>({name:INTEGRATION_NAME$6,setupOnce(){originalFunctionToString=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=getOriginalFunction(this),r=SETUP_CLIENTS.has(getClient())&&n!==void 0?n:this;return originalFunctionToString.apply(r,t)}}catch{}},setup(t){SETUP_CLIENTS.set(t,!0)}}),functionToStringIntegration=_functionToStringIntegration,DEFAULT_IGNORE_ERRORS=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],INTEGRATION_NAME$5="EventFilters",eventFiltersIntegration=(t={})=>{let n;return{name:INTEGRATION_NAME$5,setup(r){const i=r.getOptions();n=_mergeOptions(t,i)},processEvent(r,i,o){if(!n){const u=o.getOptions();n=_mergeOptions(t,u)}return _shouldDropEvent$1(r,n)?null:r}}},inboundFiltersIntegration=(t={})=>({...eventFiltersIntegration(t),name:"InboundFilters"});function _mergeOptions(t={},n={}){return{allowUrls:[...t.allowUrls||[],...n.allowUrls||[]],denyUrls:[...t.denyUrls||[],...n.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...n.ignoreErrors||[],...t.disableErrorDefaults?[]:DEFAULT_IGNORE_ERRORS],ignoreTransactions:[...t.ignoreTransactions||[],...n.ignoreTransactions||[]]}}function _shouldDropEvent$1(t,n){if(t.type){if(t.type==="transaction"&&_isIgnoredTransaction(t,n.ignoreTransactions))return DEBUG_BUILD$3&&debug.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${getEventDescription(t)}`),!0}else{if(_isIgnoredError(t,n.ignoreErrors))return DEBUG_BUILD$3&&debug.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${getEventDescription(t)}`),!0;if(_isUselessError(t))return DEBUG_BUILD$3&&debug.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${getEventDescription(t)}`),!0;if(_isDeniedUrl(t,n.denyUrls))return DEBUG_BUILD$3&&debug.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${getEventDescription(t)}. Url: ${_getEventFilterUrl(t)}`),!0;if(!_isAllowedUrl(t,n.allowUrls))return DEBUG_BUILD$3&&debug.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${getEventDescription(t)}. Url: ${_getEventFilterUrl(t)}`),!0}return!1}function _isIgnoredError(t,n){return n!=null&&n.length?getPossibleEventMessages(t).some(r=>stringMatchesSomePattern(r,n)):!1}function _isIgnoredTransaction(t,n){if(!(n!=null&&n.length))return!1;const r=t.transaction;return r?stringMatchesSomePattern(r,n):!1}function _isDeniedUrl(t,n){if(!(n!=null&&n.length))return!1;const r=_getEventFilterUrl(t);return r?stringMatchesSomePattern(r,n):!1}function _isAllowedUrl(t,n){if(!(n!=null&&n.length))return!0;const r=_getEventFilterUrl(t);return r?stringMatchesSomePattern(r,n):!0}function _getLastValidUrl(t=[]){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r&&r.filename!==""&&r.filename!=="[native code]")return r.filename||null}return null}function _getEventFilterUrl(t){var n,r;try{const i=[...((n=t.exception)==null?void 0:n.values)??[]].reverse().find(u=>{var c,d,f;return((c=u.mechanism)==null?void 0:c.parent_id)===void 0&&((f=(d=u.stacktrace)==null?void 0:d.frames)==null?void 0:f.length)}),o=(r=i==null?void 0:i.stacktrace)==null?void 0:r.frames;return o?_getLastValidUrl(o):null}catch{return DEBUG_BUILD$3&&debug.error(`Cannot extract url for event ${getEventDescription(t)}`),null}}function _isUselessError(t){var n,r;return(r=(n=t.exception)==null?void 0:n.values)!=null&&r.length?!t.message&&!t.exception.values.some(i=>i.stacktrace||i.type&&i.type!=="Error"||i.value):!1}function applyAggregateErrorsToEvent(t,n,r,i,o,u){var d;if(!((d=o.exception)!=null&&d.values)||!u||!isInstanceOf(u.originalException,Error))return;const c=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;c&&(o.exception.values=aggregateExceptionsFromError(t,n,i,u.originalException,r,o.exception.values,c,0))}function aggregateExceptionsFromError(t,n,r,i,o,u,c,d){if(u.length>=r+1)return u;let f=[...u];if(isInstanceOf(i[o],Error)){applyExceptionGroupFieldsForParentException(c,d);const m=t(n,i[o]),g=f.length;applyExceptionGroupFieldsForChildException(m,o,g,d),f=aggregateExceptionsFromError(t,n,r,i[o],o,[m,...f],m,g)}return Array.isArray(i.errors)&&i.errors.forEach((m,g)=>{if(isInstanceOf(m,Error)){applyExceptionGroupFieldsForParentException(c,d);const v=t(n,m),y=f.length;applyExceptionGroupFieldsForChildException(v,`errors[${g}]`,y,d),f=aggregateExceptionsFromError(t,n,r,m,o,[v,...f],v,y)}}),f}function applyExceptionGroupFieldsForParentException(t,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:n}}function applyExceptionGroupFieldsForChildException(t,n,r,i){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:n,exception_id:r,parent_id:i}}const filenameMetadataMap=new Map,parsedStacks=new Set;function ensureMetadataStacksAreParsed(t){if(GLOBAL_OBJ._sentryModuleMetadata)for(const n of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)){const r=GLOBAL_OBJ._sentryModuleMetadata[n];if(parsedStacks.has(n))continue;parsedStacks.add(n);const i=t(n);for(const o of i.reverse())if(o.filename){filenameMetadataMap.set(o.filename,r);break}}}function getMetadataForUrl(t,n){return ensureMetadataStacksAreParsed(t),filenameMetadataMap.get(n)}function addMetadataToStackFrames(t,n){try{n.exception.values.forEach(r=>{if(r.stacktrace)for(const i of r.stacktrace.frames||[]){if(!i.filename||i.module_metadata)continue;const o=getMetadataForUrl(t,i.filename);o&&(i.module_metadata=o)}})}catch{}}function stripMetadataFromStackFrames(t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(const r of n.stacktrace.frames||[])delete r.module_metadata})}catch{}}function addConsoleInstrumentationHandler(t){const n="console";addHandler(n,t),maybeInstrument(n,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(t){t in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,t,function(n){return originalConsoleMethods[t]=n,function(...r){triggerHandlers("console",{args:r,level:t});const o=originalConsoleMethods[t];o==null||o.apply(GLOBAL_OBJ.console,r)}})})}function severityLevelFromString(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let t;return{name:INTEGRATION_NAME$4,processEvent(n){if(n.type)return n;try{if(_shouldDropEvent(n,t))return DEBUG_BUILD$3&&debug.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=n}}},dedupeIntegration=_dedupeIntegration;function _shouldDropEvent(t,n){return n?!!(_isSameMessageEvent(t,n)||_isSameExceptionEvent(t,n)):!1}function _isSameMessageEvent(t,n){const r=t.message,i=n.message;return!(!r&&!i||r&&!i||!r&&i||r!==i||!_isSameFingerprint(t,n)||!_isSameStacktrace(t,n))}function _isSameExceptionEvent(t,n){const r=_getExceptionFromEvent(n),i=_getExceptionFromEvent(t);return!(!r||!i||r.type!==i.type||r.value!==i.value||!_isSameFingerprint(t,n)||!_isSameStacktrace(t,n))}function _isSameStacktrace(t,n){let r=getFramesFromEvent(t),i=getFramesFromEvent(n);if(!r&&!i)return!0;if(r&&!i||!r&&i||(r=r,i=i,i.length!==r.length))return!1;for(let o=0;o({name:"ThirdPartyErrorsFilter",setup(n){n.on("beforeEnvelope",r=>{forEachEnvelopeItem(r,(i,o)=>{if(o==="event"){const u=Array.isArray(i)?i[1]:void 0;u&&(stripMetadataFromStackFrames(u),i[1]=u)}})}),n.on("applyFrameMetadata",r=>{if(r.type)return;const i=n.getOptions().stackParser;addMetadataToStackFrames(i,r)})},processEvent(n){const r=getBundleKeysForAllFramesWithFilenames(n);if(r){const i=t.behaviour==="drop-error-if-contains-third-party-frames"||t.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(r[i](u=>!u.some(c=>t.filterKeys.includes(c)))){if(t.behaviour==="drop-error-if-contains-third-party-frames"||t.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;n.tags={...n.tags,third_party_code:!0}}}return n}});function getBundleKeysForAllFramesWithFilenames(t){const n=getFramesFromEvent(t);if(n)return n.filter(r=>!!r.filename).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(i=>i.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX)).map(i=>i.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length)):[])}const BUNDLER_PLUGIN_APP_KEY_PREFIX="_sentryBundlerPluginAppKey:";function getBreadcrumbLogLevelFromHttpStatusCode(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){return"history"in WINDOW$2&&!!WINDOW$2.history}function _isFetchSupported(){if(!("fetch"in WINDOW$2))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFunction(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function supportsNativeFetch(){var r;if(typeof EdgeRuntime=="string")return!0;if(!_isFetchSupported())return!1;if(isNativeFunction(WINDOW$2.fetch))return!0;let t=!1;const n=WINDOW$2.document;if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i),(r=i.contentWindow)!=null&&r.fetch&&(t=isNativeFunction(i.contentWindow.fetch)),n.head.removeChild(i)}catch(i){DEBUG_BUILD$3&&debug.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return t}function addFetchInstrumentationHandler(t,n){const r="fetch";addHandler(r,t),maybeInstrument(r,()=>instrumentFetch(void 0,n))}function instrumentFetch(t,n=!1){n&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",function(r){return function(...i){const o=new Error,{method:u,url:c}=parseFetchArgs(i),d={args:i,fetchData:{method:u,url:c},startTimestamp:timestampInSeconds()*1e3,virtualError:o,headers:getHeadersFromFetchArgs(i)};return triggerHandlers("fetch",{...d}),r.apply(GLOBAL_OBJ,i).then(async f=>(triggerHandlers("fetch",{...d,endTimestamp:timestampInSeconds()*1e3,response:f}),f),f=>{if(triggerHandlers("fetch",{...d,endTimestamp:timestampInSeconds()*1e3,error:f}),isError$2(f)&&f.stack===void 0&&(f.stack=o.stack,addNonEnumerableProperty(f,"framesToPop",1)),f instanceof TypeError&&(f.message==="Failed to fetch"||f.message==="Load failed"||f.message==="NetworkError when attempting to fetch resource."))try{const m=new URL(d.fetchData.url);f.message=`${f.message} (${m.host})`}catch{}throw f})}})}function hasProp(t,n){return!!t&&typeof t=="object"&&!!t[n]}function getUrlFromResource(t){return typeof t=="string"?t:t?hasProp(t,"url")?t.url:t.toString?t.toString():"":""}function parseFetchArgs(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[r,i]=t;return{url:getUrlFromResource(r),method:hasProp(i,"method")?String(i.method).toUpperCase():"GET"}}const n=t[0];return{url:getUrlFromResource(n),method:hasProp(n,"method")?String(n.method).toUpperCase():"GET"}}function getHeadersFromFetchArgs(t){const[n,r]=t;try{if(typeof r=="object"&&r!==null&&"headers"in r&&r.headers)return new Headers(r.headers);if(isRequest(n))return new Headers(n.headers)}catch{}}function getSDKSource(){return"npm"}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap$1(t,n={}){function r(o){return typeof o=="function"}if(!r(t))return t;try{const o=t.__sentry_wrapped__;if(o)return typeof o=="function"?o:t;if(getOriginalFunction(t))return t}catch{return t}const i=function(...o){try{const u=o.map(c=>wrap$1(c,n));return t.apply(this,u)}catch(u){throw ignoreNextOnError(),withScope(c=>{c.addEventProcessor(d=>(n.mechanism&&(addExceptionTypeValue(d,void 0),addExceptionMechanism(d,n.mechanism)),d.extra={...d.extra,arguments:o},d)),captureException(u)}),u}};try{for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}catch{}markFunctionWrapped(i,t),addNonEnumerableProperty(t,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get(){return t.name}})}catch{}return i}function getHttpRequestData(){const t=getLocationHref(),{referrer:n}=WINDOW$1.document||{},{userAgent:r}=WINDOW$1.navigator||{},i={...n&&{Referer:n},...r&&{"User-Agent":r}};return{url:t,headers:i}}function exceptionFromError(t,n){const r=parseStackFrames(t,n),i={type:extractType(n),value:extractMessage(n)};return r.length&&(i.stacktrace={frames:r}),i.type===void 0&&i.value===""&&(i.value="Unrecoverable error caught"),i}function eventFromPlainObject(t,n,r,i){const o=getClient(),u=o==null?void 0:o.getOptions().normalizeDepth,c=getErrorPropertyFromObject(n),d={__serialized__:normalizeToSize(n,u)};if(c)return{exception:{values:[exceptionFromError(t,c)]},extra:d};const f={exception:{values:[{type:isEvent(n)?n.constructor.name:i?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(n,{isUnhandledRejection:i})}]},extra:d};if(r){const m=parseStackFrames(t,r);m.length&&(f.exception.values[0].stacktrace={frames:m})}return f}function eventFromError(t,n){return{exception:{values:[exceptionFromError(t,n)]}}}function parseStackFrames(t,n){const r=n.stacktrace||n.stack||"",i=getSkipFirstStackStringLines(n),o=getPopFirstTopFrames(n);try{return t(r,i,o)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(t){return t&&reactMinifiedRegexp.test(t.message)?1:0}function getPopFirstTopFrames(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function isWebAssemblyException(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function extractType(t){const n=t==null?void 0:t.name;return!n&&isWebAssemblyException(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":n}function extractMessage(t){const n=t==null?void 0:t.message;return isWebAssemblyException(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":n?n.error&&typeof n.error.message=="string"?n.error.message:n:"No error message"}function eventFromException(t,n,r,i){const o=(r==null?void 0:r.syntheticException)||void 0,u=eventFromUnknownInput(t,n,o,i);return addExceptionMechanism(u),u.level="error",r!=null&&r.event_id&&(u.event_id=r.event_id),resolvedSyncPromise(u)}function eventFromMessage(t,n,r="info",i,o){const u=(i==null?void 0:i.syntheticException)||void 0,c=eventFromString(t,n,u,o);return c.level=r,i!=null&&i.event_id&&(c.event_id=i.event_id),resolvedSyncPromise(c)}function eventFromUnknownInput(t,n,r,i,o){let u;if(isErrorEvent$1(n)&&n.error)return eventFromError(t,n.error);if(isDOMError(n)||isDOMException(n)){const c=n;if("stack"in n)u=eventFromError(t,n);else{const d=c.name||(isDOMError(c)?"DOMError":"DOMException"),f=c.message?`${d}: ${c.message}`:d;u=eventFromString(t,f,r,i),addExceptionTypeValue(u,f)}return"code"in c&&(u.tags={...u.tags,"DOMException.code":`${c.code}`}),u}return isError$2(n)?eventFromError(t,n):isPlainObject$2(n)||isEvent(n)?(u=eventFromPlainObject(t,n,r,o),addExceptionMechanism(u,{synthetic:!0}),u):(u=eventFromString(t,n,r,i),addExceptionTypeValue(u,`${n}`),addExceptionMechanism(u,{synthetic:!0}),u)}function eventFromString(t,n,r,i){const o={};if(i&&r){const u=parseStackFrames(t,r);u.length&&(o.exception={values:[{value:n,stacktrace:{frames:u}}]}),addExceptionMechanism(o,{synthetic:!0})}if(isParameterizedString(n)){const{__sentry_template_string__:u,__sentry_template_values__:c}=n;return o.logentry={message:u,params:c},o}return o.message=n,o}function getNonErrorObjectExceptionValue(t,{isUnhandledRejection:n}){const r=extractExceptionKeysForMessage(t),i=n?"promise rejection":"exception";return isErrorEvent$1(t)?`Event \`ErrorEvent\` captured as ${i} with message \`${t.message}\``:isEvent(t)?`Event \`${getObjectClassName(t)}\` (type=${t.type}) captured as ${i}`:`Object captured as ${i} with keys: ${r}`}function getObjectClassName(t){try{const n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{}}function getErrorPropertyFromObject(t){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];if(r instanceof Error)return r}}const DEFAULT_FLUSH_INTERVAL=5e3;class BrowserClient extends Client{constructor(n){var d;const r=applyDefaultOptions(n),i=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(r,"browser",["browser"],i),(d=r._metadata)!=null&&d.sdk&&(r._metadata.sdk.settings={infer_ip:r.sendDefaultPii?"auto":"never",...r._metadata.sdk.settings}),super(r);const{sendDefaultPii:o,sendClientReports:u,enableLogs:c}=this._options;WINDOW$1.document&&(u||c)&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&(u&&this._flushOutcomes(),c&&_INTERNAL_flushLogsBuffer(this))}),c&&(this.on("flush",()=>{_INTERNAL_flushLogsBuffer(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{_INTERNAL_flushLogsBuffer(this)},DEFAULT_FLUSH_INTERVAL)})),o&&this.on("beforeSendSession",addAutoIpAddressToSession)}eventFromException(n,r){return eventFromException(this._options.stackParser,n,r,this._options.attachStacktrace)}eventFromMessage(n,r="info",i){return eventFromMessage(this._options.stackParser,n,r,i,this._options.attachStacktrace)}_prepareEvent(n,r,i,o){return n.platform=n.platform||"javascript",super._prepareEvent(n,r,i,o)}}function applyDefaultOptions(t){var n;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(n=WINDOW$1.SENTRY_RELEASE)==null?void 0:n.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...t}}const DEBUG_BUILD$2=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function addClickKeypressInstrumentationHandler(t){const n="dom";addHandler(n,t),maybeInstrument(n,instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const t=triggerHandlers.bind(null,"dom"),n=makeDOMEventHandler(t,!0);WINDOW.document.addEventListener("click",n,!1),WINDOW.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach(r=>{var u,c;const o=(u=WINDOW[r])==null?void 0:u.prototype;(c=o==null?void 0:o.hasOwnProperty)!=null&&c.call(o,"addEventListener")&&(fill(o,"addEventListener",function(d){return function(f,m,g){if(f==="click"||f=="keypress")try{const v=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},y=v[f]=v[f]||{refCount:0};if(!y.handler){const x=makeDOMEventHandler(t);y.handler=x,d.call(this,f,x,g)}y.refCount++}catch{}return d.call(this,f,m,g)}}),fill(o,"removeEventListener",function(d){return function(f,m,g){if(f==="click"||f=="keypress")try{const v=this.__sentry_instrumentation_handlers__||{},y=v[f];y&&(y.refCount--,y.refCount<=0&&(d.call(this,f,y.handler,g),y.handler=void 0,delete v[f]),Object.keys(v).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return d.call(this,f,m,g)}}))})}function isSimilarToLastCapturedEvent(t){if(t.type!==lastCapturedEventType)return!1;try{if(!t.target||t.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(t,n){return t!=="keypress"?!1:n!=null&&n.tagName?!(n.tagName==="INPUT"||n.tagName==="TEXTAREA"||n.isContentEditable):!0}function makeDOMEventHandler(t,n=!1){return r=>{if(!r||r._sentryCaptured)return;const i=getEventTarget(r);if(shouldSkipDOMEvent(r.type,i))return;addNonEnumerableProperty(r,"_sentryCaptured",!0),i&&!i._sentryId&&addNonEnumerableProperty(i,"_sentryId",uuid4());const o=r.type==="keypress"?"input":r.type;isSimilarToLastCapturedEvent(r)||(t({event:r,name:o,global:n}),lastCapturedEventType=r.type,lastCapturedEventTargetId=i?i._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function getEventTarget(t){try{return t.target}catch{return null}}let lastHref;function addHistoryInstrumentationHandler(t){const n="history";addHandler(n,t),maybeInstrument(n,instrumentHistory)}function instrumentHistory(){if(WINDOW.addEventListener("popstate",()=>{const n=WINDOW.location.href,r=lastHref;if(lastHref=n,r===n)return;triggerHandlers("history",{from:r,to:n})}),!supportsHistory())return;function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const o=lastHref,u=getAbsoluteUrl(String(i));if(lastHref=u,o===u)return n.apply(this,r);triggerHandlers("history",{from:o,to:u})}return n.apply(this,r)}}fill(WINDOW.history,"pushState",t),fill(WINDOW.history,"replaceState",t)}function getAbsoluteUrl(t){try{return new URL(t,WINDOW.location.origin).toString()}catch{return t}}const cachedImplementations={};function getNativeImplementation(t){const n=cachedImplementations[t];if(n)return n;let r=WINDOW[t];if(isNativeFunction(r))return cachedImplementations[t]=r.bind(WINDOW);const i=WINDOW.document;if(i&&typeof i.createElement=="function")try{const o=i.createElement("iframe");o.hidden=!0,i.head.appendChild(o);const u=o.contentWindow;u!=null&&u[t]&&(r=u[t]),i.head.removeChild(o)}catch(o){DEBUG_BUILD$2&&debug.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,o)}return r&&(cachedImplementations[t]=r.bind(WINDOW))}function clearCachedImplementation(t){cachedImplementations[t]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(t){const n="xhr";addHandler(n,t),maybeInstrument(n,instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(n,r,i){const o=new Error,u=timestampInSeconds()*1e3,c=isString(i[0])?i[0].toUpperCase():void 0,d=parseXhrUrlArg(i[1]);if(!c||!d)return n.apply(r,i);r[SENTRY_XHR_DATA_KEY]={method:c,url:d,request_headers:{}},c==="POST"&&d.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const f=()=>{const m=r[SENTRY_XHR_DATA_KEY];if(m&&r.readyState===4){try{m.status_code=r.status}catch{}const g={endTimestamp:timestampInSeconds()*1e3,startTimestamp:u,xhr:r,virtualError:o};triggerHandlers("xhr",g)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(m,g,v){return f(),m.apply(g,v)}}):r.addEventListener("readystatechange",f),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(m,g,v){const[y,x]=v,S=g[SENTRY_XHR_DATA_KEY];return S&&isString(y)&&isString(x)&&(S.request_headers[y.toLowerCase()]=x),m.apply(g,v)}}),n.apply(r,i)}}),t.send=new Proxy(t.send,{apply(n,r,i){const o=r[SENTRY_XHR_DATA_KEY];if(!o)return n.apply(r,i);i[0]!==void 0&&(o.body=i[0]);const u={startTimestamp:timestampInSeconds()*1e3,xhr:r};return triggerHandlers("xhr",u),n.apply(r,i)}})}function parseXhrUrlArg(t){if(isString(t))return t;try{return t.toString()}catch{}}function makeFetchTransport(t,n=getNativeImplementation("fetch")){let r=0,i=0;function o(u){const c=u.body.length;r+=c,i++;const d={body:u.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:r<=6e4&&i<15,...t.fetchOptions};if(!n)return clearCachedImplementation("fetch"),rejectedSyncPromise("No fetch implementation available");try{return n(t.url,d).then(f=>(r-=c,i--,{statusCode:f.status,headers:{"x-sentry-rate-limits":f.headers.get("X-Sentry-Rate-Limits"),"retry-after":f.headers.get("Retry-After")}}))}catch(f){return clearCachedImplementation("fetch"),r-=c,i--,rejectedSyncPromise(f)}}return createTransport(t,o)}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(t,n,r,i){const o={filename:t,function:n===""?UNKNOWN_FUNCTION:n,in_app:!0};return r!==void 0&&(o.lineno=r),i!==void 0&&(o.colno=i),o}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeDataUriRegex=/at (.+?) ?\(data:(.+?),/,chromeStackParserFn=t=>{const n=t.match(chromeDataUriRegex);if(n)return{filename:``,function:n[1]};const r=chromeRegexNoFnName.exec(t);if(r){const[,o,u,c]=r;return createFrame(o,UNKNOWN_FUNCTION,+u,+c)}const i=chromeRegex.exec(t);if(i){if(i[2]&&i[2].indexOf("eval")===0){const d=chromeEvalRegex.exec(i[2]);d&&(i[2]=d[1],i[3]=d[2],i[4]=d[3])}const[u,c]=extractSafariExtensionDetails(i[1]||UNKNOWN_FUNCTION,i[2]);return createFrame(c,u,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=t=>{const n=geckoREgex.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const u=geckoEvalRegex.exec(n[3]);u&&(n[1]=n[1]||"eval",n[3]=u[1],n[4]=u[2],n[5]="")}let i=n[3],o=n[1]||UNKNOWN_FUNCTION;return[o,i]=extractSafariExtensionDetails(o,i),createFrame(i,o,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(t,n)=>{const r=t.indexOf("safari-extension")!==-1,i=t.indexOf("safari-web-extension")!==-1;return r||i?[t.indexOf("@")!==-1?t.split("@")[0]:UNKNOWN_FUNCTION,r?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]},DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(t={})=>{const n={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:INTEGRATION_NAME$3,setup(r){n.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(r)),n.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(r,n.dom)),n.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(r)),n.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(r)),n.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(r)),n.sentry&&r.on("beforeSendEvent",_getSentryBreadcrumbHandler(r))}}},breadcrumbsIntegration=_breadcrumbsIntegration;function _getSentryBreadcrumbHandler(t){return function(r){getClient()===t&&addBreadcrumb({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:getEventDescription(r)},{event:r})}}function _getDomBreadcrumbHandler(t,n){return function(i){if(getClient()!==t)return;let o,u,c=typeof n=="object"?n.serializeAttribute:void 0,d=typeof n=="object"&&typeof n.maxStringLength=="number"?n.maxStringLength:void 0;d&&d>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD$1&&debug.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${d} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),d=MAX_ALLOWED_STRING_LENGTH),typeof c=="string"&&(c=[c]);try{const m=i.event,g=_isEvent(m)?m.target:m;o=htmlTreeAsString(g,{keyAttrs:c,maxStringLength:d}),u=getComponentName(g)}catch{o=""}if(o.length===0)return;const f={category:`ui.${i.name}`,message:o};u&&(f.data={"ui.component_name":u}),addBreadcrumb(f,{event:i.event,name:i.name,global:i.global})}}function _getConsoleBreadcrumbHandler(t){return function(r){if(getClient()!==t)return;const i={category:"console",data:{arguments:r.args,logger:"console"},level:severityLevelFromString(r.level),message:safeJoin(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)i.message=`Assertion failed: ${safeJoin(r.args.slice(1)," ")||"console.assert"}`,i.data.arguments=r.args.slice(1);else return;addBreadcrumb(i,{input:r.args,level:r.level})}}function _getXhrBreadcrumbHandler(t){return function(r){if(getClient()!==t)return;const{startTimestamp:i,endTimestamp:o}=r,u=r.xhr[SENTRY_XHR_DATA_KEY];if(!i||!o||!u)return;const{method:c,url:d,status_code:f,body:m}=u,g={method:c,url:d,status_code:f},v={xhr:r.xhr,input:m,startTimestamp:i,endTimestamp:o},y={category:"xhr",data:g,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(f)};t.emit("beforeOutgoingRequestBreadcrumb",y,v),addBreadcrumb(y,v)}}function _getFetchBreadcrumbHandler(t){return function(r){if(getClient()!==t)return;const{startTimestamp:i,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.fetchData.method,r.fetchData.url,r.error){const u=r.fetchData,c={data:r.error,input:r.args,startTimestamp:i,endTimestamp:o},d={category:"fetch",data:u,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",d,c),addBreadcrumb(d,c)}else{const u=r.response,c={...r.fetchData,status_code:u==null?void 0:u.status};r.fetchData.request_body_size,r.fetchData.response_body_size,u==null||u.status;const d={input:r.args,response:u,startTimestamp:i,endTimestamp:o},f={category:"fetch",data:c,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(c.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",f,d),addBreadcrumb(f,d)}}}function _getHistoryBreadcrumbHandler(t){return function(r){if(getClient()!==t)return;let i=r.from,o=r.to;const u=parseUrl(WINDOW$1.location.href);let c=i?parseUrl(i):void 0;const d=parseUrl(o);c!=null&&c.path||(c=u),u.protocol===d.protocol&&u.host===d.host&&(o=d.relative),u.protocol===c.protocol&&u.host===c.host&&(i=c.relative),addBreadcrumb({category:"navigation",data:{from:i,to:o}})}}function _isEvent(t){return!!t&&!!t.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(t={})=>{const n={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:INTEGRATION_NAME$2,setupOnce(){n.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),n.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),n.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),n.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const r=n.eventTarget;r&&(Array.isArray(r)?r:DEFAULT_EVENT_TARGET).forEach(o=>_wrapEventTarget(o,n))}}},browserApiErrorsIntegration=_browserApiErrorsIntegration;function _wrapTimeFunction(t){return function(...n){const r=n[0];return n[0]=wrap$1(r,{mechanism:{data:{function:getFunctionName(t)},handled:!1,type:"instrument"}}),t.apply(this,n)}}function _wrapRAF(t){return function(n){return t.apply(this,[wrap$1(n,{mechanism:{data:{function:"requestAnimationFrame",handler:getFunctionName(t)},handled:!1,type:"instrument"}})])}}function _wrapXHR(t){return function(...n){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&fill(r,o,function(u){const c={mechanism:{data:{function:o,handler:getFunctionName(u)},handled:!1,type:"instrument"}},d=getOriginalFunction(u);return d&&(c.mechanism.data.handler=getFunctionName(d)),wrap$1(u,c)})}),t.apply(this,n)}}function _wrapEventTarget(t,n){var o,u;const i=(o=WINDOW$1[t])==null?void 0:o.prototype;(u=i==null?void 0:i.hasOwnProperty)!=null&&u.call(i,"addEventListener")&&(fill(i,"addEventListener",function(c){return function(d,f,m){try{isEventListenerObject(f)&&(f.handleEvent=wrap$1(f.handleEvent,{mechanism:{data:{function:"handleEvent",handler:getFunctionName(f),target:t},handled:!1,type:"instrument"}}))}catch{}return n.unregisterOriginalCallbacks&&unregisterOriginalCallback(this,d,f),c.apply(this,[d,wrap$1(f,{mechanism:{data:{function:"addEventListener",handler:getFunctionName(f),target:t},handled:!1,type:"instrument"}}),m])}}),fill(i,"removeEventListener",function(c){return function(d,f,m){try{const g=f.__sentry_wrapped__;g&&c.call(this,d,g,m)}catch{}return c.call(this,d,f,m)}}))}function isEventListenerObject(t){return typeof t.handleEvent=="function"}function unregisterOriginalCallback(t,n,r){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(n,r)}const browserSessionIntegration=()=>({name:"BrowserSession",setupOnce(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD$1&&debug.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler(({from:t,to:n})=>{t!==void 0&&t!==n&&(startSession({ignoreDuration:!0}),captureSession())})}}),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(t={})=>{const n={onerror:!0,onunhandledrejection:!0,...t};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(r){n.onerror&&(_installGlobalOnErrorHandler(r),globalHandlerLog("onerror")),n.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(r),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=_globalHandlersIntegration;function _installGlobalOnErrorHandler(t){addGlobalErrorInstrumentationHandler(n=>{const{stackParser:r,attachStacktrace:i}=getOptions();if(getClient()!==t||shouldIgnoreOnError())return;const{msg:o,url:u,line:c,column:d,error:f}=n,m=_enhanceEventWithInitialFrame(eventFromUnknownInput(r,f||o,void 0,i,!1),u,c,d);m.level="error",captureEvent(m,{originalException:f,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(t){addGlobalUnhandledRejectionInstrumentationHandler(n=>{const{stackParser:r,attachStacktrace:i}=getOptions();if(getClient()!==t||shouldIgnoreOnError())return;const o=_getUnhandledRejectionError(n),u=isPrimitive(o)?_eventFromRejectionWithPrimitive(o):eventFromUnknownInput(r,o,void 0,i,!0);u.level="error",captureEvent(u,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function _getUnhandledRejectionError(t){if(isPrimitive(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function _eventFromRejectionWithPrimitive(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function _enhanceEventWithInitialFrame(t,n,r,i){const o=t.exception=t.exception||{},u=o.values=o.values||[],c=u[0]=u[0]||{},d=c.stacktrace=c.stacktrace||{},f=d.frames=d.frames||[],m=i,g=r,v=getFilenameFromUrl(n)??getLocationHref();return f.length===0&&f.push({colno:m,filename:v,function:UNKNOWN_FUNCTION,in_app:!0,lineno:g}),t}function globalHandlerLog(t){DEBUG_BUILD$1&&debug.log(`Global Handler attached: ${t}`)}function getOptions(){const t=getClient();return(t==null?void 0:t.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function getFilenameFromUrl(t){if(!(!isString(t)||t.length===0)){if(t.startsWith("data:")){const n=t.match(/^data:([^;]+)/),r=n?n[1]:"text/javascript",i=t.includes("base64,");return``}return t.slice(0,1024)}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(t){var i;if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const n=getHttpRequestData(),r={...n.headers,...(i=t.request)==null?void 0:i.headers};t.request={...n,...t.request,headers:r}}}),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(t={})=>{const n=t.limit||DEFAULT_LIMIT,r=t.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(i,o,u){const c=u.getOptions();applyAggregateErrorsToEvent(exceptionFromError,c.stackParser,r,n,i,o)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function checkAndWarnIfIsEmbeddedBrowserExtension(){return _isEmbeddedBrowserExtension()?(DEBUG_BUILD$1&&consoleSandbox(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function _isEmbeddedBrowserExtension(){var u;if(typeof WINDOW$1.window>"u")return!1;const t=WINDOW$1;if(t.nw)return!1;const n=t.chrome||t.browser;if(!((u=n==null?void 0:n.runtime)!=null&&u.id))return!1;const r=getLocationHref(),i=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(WINDOW$1===WINDOW$1.top&&i.some(c=>r.startsWith(`${c}://`)))}function getDefaultIntegrations(t){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),browserSessionIntegration()]}function init$1(t={}){const n=!t.skipBrowserExtensionCheck&&checkAndWarnIfIsEmbeddedBrowserExtension(),r={...t,enabled:n?!1:t.enabled,stackParser:stackParserFromStackParserOptions(t.stackParser||defaultStackParser),integrations:getIntegrationsToSetup({integrations:t.integrations,defaultIntegrations:t.defaultIntegrations==null?getDefaultIntegrations():t.defaultIntegrations}),transport:t.transport||makeFetchTransport};return initAndBind(BrowserClient,r)}function showReportDialog(t={}){const n=WINDOW$1.document,r=(n==null?void 0:n.head)||(n==null?void 0:n.body);if(!r){DEBUG_BUILD$1&&debug.error("[showReportDialog] Global document not defined");return}const i=getCurrentScope(),o=getClient(),u=o==null?void 0:o.getDsn();if(!u){DEBUG_BUILD$1&&debug.error("[showReportDialog] DSN not configured");return}const c={...t,user:{...i.getUser(),...t.user},eventId:t.eventId||lastEventId()},d=WINDOW$1.document.createElement("script");d.async=!0,d.crossOrigin="anonymous",d.src=getReportDialogEndpoint(u,c);const{onLoad:f,onClose:m}=c;if(f&&(d.onload=f),m){const g=v=>{if(v.data==="__sentry_reportdialog_closed__")try{m()}finally{WINDOW$1.removeEventListener("message",g)}};WINDOW$1.addEventListener("message",g)}r.appendChild(d)}var reactExports=requireReact();const React=getDefaultExportFromCjs(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React},[reactExports]);function init(t){const n={...t};return applySdkMetadata(n,"react"),setContext("react",{version:reactExports.version}),init$1(n)}function isAtLeastReact17(t){const n=t.match(/^([^.]+)/);return n!==null&&parseInt(n[0])>=17}function setCause(t,n){const r=new WeakSet;function i(o,u){if(!r.has(o)){if(o.cause)return r.add(o),i(o.cause,u);o.cause=u}}i(t,n)}function captureReactException(t,{componentStack:n},r){if(isAtLeastReact17(reactExports.version)&&isError$2(t)&&n){const i=new Error(t.message);i.name=`React ErrorBoundary ${t.name}`,i.stack=n,setCause(t,i)}return withScope(i=>(i.setContext("react",{componentStack:n}),captureException(t,r)))}var reactIs$1={exports:{}},reactIs_production_min$1={};var hasRequiredReactIs_production_min$1;function requireReactIs_production_min$1(){if(hasRequiredReactIs_production_min$1)return reactIs_production_min$1;hasRequiredReactIs_production_min$1=1;var t=typeof Symbol=="function"&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,u=t?Symbol.for("react.profiler"):60114,c=t?Symbol.for("react.provider"):60109,d=t?Symbol.for("react.context"):60110,f=t?Symbol.for("react.async_mode"):60111,m=t?Symbol.for("react.concurrent_mode"):60111,g=t?Symbol.for("react.forward_ref"):60112,v=t?Symbol.for("react.suspense"):60113,y=t?Symbol.for("react.suspense_list"):60120,x=t?Symbol.for("react.memo"):60115,S=t?Symbol.for("react.lazy"):60116,E=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,k=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function I(w){if(typeof w=="object"&&w!==null){var N=w.$$typeof;switch(N){case n:switch(w=w.type,w){case f:case m:case i:case u:case o:case v:return w;default:switch(w=w&&w.$$typeof,w){case d:case g:case S:case x:case c:return w;default:return N}}case r:return N}}}function T(w){return I(w)===m}return reactIs_production_min$1.AsyncMode=f,reactIs_production_min$1.ConcurrentMode=m,reactIs_production_min$1.ContextConsumer=d,reactIs_production_min$1.ContextProvider=c,reactIs_production_min$1.Element=n,reactIs_production_min$1.ForwardRef=g,reactIs_production_min$1.Fragment=i,reactIs_production_min$1.Lazy=S,reactIs_production_min$1.Memo=x,reactIs_production_min$1.Portal=r,reactIs_production_min$1.Profiler=u,reactIs_production_min$1.StrictMode=o,reactIs_production_min$1.Suspense=v,reactIs_production_min$1.isAsyncMode=function(w){return T(w)||I(w)===f},reactIs_production_min$1.isConcurrentMode=T,reactIs_production_min$1.isContextConsumer=function(w){return I(w)===d},reactIs_production_min$1.isContextProvider=function(w){return I(w)===c},reactIs_production_min$1.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===n},reactIs_production_min$1.isForwardRef=function(w){return I(w)===g},reactIs_production_min$1.isFragment=function(w){return I(w)===i},reactIs_production_min$1.isLazy=function(w){return I(w)===S},reactIs_production_min$1.isMemo=function(w){return I(w)===x},reactIs_production_min$1.isPortal=function(w){return I(w)===r},reactIs_production_min$1.isProfiler=function(w){return I(w)===u},reactIs_production_min$1.isStrictMode=function(w){return I(w)===o},reactIs_production_min$1.isSuspense=function(w){return I(w)===v},reactIs_production_min$1.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===i||w===m||w===u||w===o||w===v||w===y||typeof w=="object"&&w!==null&&(w.$$typeof===S||w.$$typeof===x||w.$$typeof===c||w.$$typeof===d||w.$$typeof===g||w.$$typeof===b||w.$$typeof===k||w.$$typeof===C||w.$$typeof===E)},reactIs_production_min$1.typeOf=I,reactIs_production_min$1}var hasRequiredReactIs$1;function requireReactIs$1(){return hasRequiredReactIs$1||(hasRequiredReactIs$1=1,reactIs$1.exports=requireReactIs_production_min$1()),reactIs$1.exports}var hoistNonReactStatics_cjs,hasRequiredHoistNonReactStatics_cjs;function requireHoistNonReactStatics_cjs(){if(hasRequiredHoistNonReactStatics_cjs)return hoistNonReactStatics_cjs;hasRequiredHoistNonReactStatics_cjs=1;var t=requireReactIs$1(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};u[t.ForwardRef]=i,u[t.Memo]=o;function c(S){return t.isMemo(S)?o:u[S.$$typeof]||n}var d=Object.defineProperty,f=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,v=Object.getPrototypeOf,y=Object.prototype;function x(S,E,b){if(typeof E!="string"){if(y){var k=v(E);k&&k!==y&&x(S,k,b)}var C=f(E);m&&(C=C.concat(m(E)));for(var I=c(S),T=c(E),w=0;w"u"||__SENTRY_DEBUG__,INITIAL_STATE={componentStack:null,error:null,eventId:null};class ErrorBoundary extends reactExports.Component{constructor(n){super(n),this.state=INITIAL_STATE,this._openFallbackReportDialog=!0;const r=getClient();r&&n.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",i=>{!i.type&&this._lastEventId&&i.event_id===this._lastEventId&&showReportDialog({...n.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(n,r){const{componentStack:i}=r,{beforeCapture:o,onError:u,showDialog:c,dialogOptions:d}=this.props;withScope(f=>{o&&o(f,n,i);const m=this.props.handled!=null?this.props.handled:!!this.props.fallback,g=captureReactException(n,r,{mechanism:{handled:m}});u&&u(n,i,g),c&&(this._lastEventId=g,this._openFallbackReportDialog&&showReportDialog({...d,eventId:g})),this.setState({error:n,componentStack:i,eventId:g})})}componentDidMount(){const{onMount:n}=this.props;n&&n()}componentWillUnmount(){const{error:n,componentStack:r,eventId:i}=this.state,{onUnmount:o}=this.props;o&&(this.state===INITIAL_STATE?o(null,null,null):o(n,r,i)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:n}=this.props,{error:r,componentStack:i,eventId:o}=this.state;n&&n(r,i,o),this.setState(INITIAL_STATE)}render(){const{fallback:n,children:r}=this.props,i=this.state;if(i.componentStack===null)return typeof r=="function"?r():r;const o=typeof n=="function"?reactExports.createElement(n,{error:i.error,componentStack:i.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:i.eventId}):n;return reactExports.isValidElement(o)?o:(n&&DEBUG_BUILD&&debug.warn("fallback did not produce a valid ReactElement"),null)}}var client={},reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};var hasRequiredScheduler_production_min;function requireScheduler_production_min(){return hasRequiredScheduler_production_min||(hasRequiredScheduler_production_min=1,function(t){function n(G,te){var H=G.length;G.push(te);e:for(;0>>1,M=G[F];if(0>>1;Fo(ie,H))seo(J,ie)?(G[F]=J,G[se]=H,F=se):(G[F]=ie,G[z]=H,F=z);else if(seo(J,H))G[F]=J,G[se]=H,F=se;else break e}}return te}function o(G,te){var H=G.sortIndex-te.sortIndex;return H!==0?H:G.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var f=[],m=[],g=1,v=null,y=3,x=!1,S=!1,E=!1,b=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function I(G){for(var te=r(m);te!==null;){if(te.callback===null)i(m);else if(te.startTime<=G)i(m),te.sortIndex=te.expirationTime,n(f,te);else break;te=r(m)}}function T(G){if(E=!1,I(G),!S)if(r(f)!==null)S=!0,ve(w);else{var te=r(m);te!==null&&ye(T,te.startTime-G)}}function w(G,te){S=!1,E&&(E=!1,k(A),A=-1),x=!0;var H=y;try{for(I(te),v=r(f);v!==null&&(!(v.expirationTime>te)||G&&!Q());){var F=v.callback;if(typeof F=="function"){v.callback=null,y=v.priorityLevel;var M=F(v.expirationTime<=te);te=t.unstable_now(),typeof M=="function"?v.callback=M:v===r(f)&&i(f),I(te)}else i(f);v=r(f)}if(v!==null)var ne=!0;else{var z=r(m);z!==null&&ye(T,z.startTime-te),ne=!1}return ne}finally{v=null,y=H,x=!1}}var N=!1,P=null,A=-1,B=5,X=-1;function Q(){return!(t.unstable_now()-XG||125F?(G.sortIndex=H,n(m,G),r(f)===null&&G===r(m)&&(E?(k(A),A=-1):E=!0,ye(T,H-F))):(G.sortIndex=M,n(f,G),S||x||(S=!0,ve(w))),G},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(G){var te=y;return function(){var H=y;y=te;try{return G.apply(this,arguments)}finally{y=H}}}}(scheduler_production_min)),scheduler_production_min}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production_min()),scheduler.exports}var hasRequiredReactDom_production_min;function requireReactDom_production_min(){if(hasRequiredReactDom_production_min)return reactDom_production_min;hasRequiredReactDom_production_min=1;var t=requireReact(),n=requireScheduler();function r(a){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+a,l=1;l"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function y(a){return f.call(v,a)?!0:f.call(g,a)?!1:m.test(a)?v[a]=!0:(g[a]=!0,!1)}function x(a,s,l,p){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return p?!1:l!==null?!l.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function S(a,s,l,p){if(s===null||typeof s>"u"||x(a,s,l,p))return!0;if(p)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function E(a,s,l,p,h,_,R){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=p,this.attributeNamespace=h,this.mustUseProperty=l,this.propertyName=a,this.type=s,this.sanitizeURL=_,this.removeEmptyString=R}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){b[a]=new E(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var s=a[0];b[s]=new E(s,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){b[a]=new E(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){b[a]=new E(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){b[a]=new E(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){b[a]=new E(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){b[a]=new E(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){b[a]=new E(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){b[a]=new E(a,5,!1,a.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function C(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var s=a.replace(k,C);b[s]=new E(s,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var s=a.replace(k,C);b[s]=new E(s,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var s=a.replace(k,C);b[s]=new E(s,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){b[a]=new E(a,1,!1,a.toLowerCase(),null,!1,!1)}),b.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){b[a]=new E(a,1,!1,a.toLowerCase(),null,!0,!0)});function I(a,s,l,p){var h=b.hasOwnProperty(s)?b[s]:null;(h!==null?h.type!==0:p||!(2j||h[R]!==_[j]){var O=` `+h[R].replace(" at new "," at ");return a.displayName&&O.includes("")&&(O=O.replace("",a.displayName)),O}while(1<=R&&0<=j);break}}}finally{ne=!1,Error.prepareStackTrace=l}return(a=a?a.displayName||a.name:"")?M(a):""}function ie(a){switch(a.tag){case 5:return M(a.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return a=z(a.type,!1),a;case 11:return a=z(a.type.render,!1),a;case 1:return a=z(a.type,!0),a;default:return""}}function se(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case P:return"Fragment";case N:return"Portal";case B:return"Profiler";case A:return"StrictMode";case q:return"Suspense";case de:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case Q:return(a.displayName||"Context")+".Consumer";case X:return(a._context.displayName||"Context")+".Provider";case Z:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case me:return s=a.displayName||null,s!==null?s:se(a.type)||"Memo";case ve:s=a._payload,a=a._init;try{return se(a(s))}catch{}}return null}function J(a){var s=a.type;switch(a.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=s.render,a=a.displayName||a.name||"",s.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return se(s);case 8:return s===A?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function re(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function he(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Se(a){var s=he(a)?"checked":"value",l=Object.getOwnPropertyDescriptor(a.constructor.prototype,s),p=""+a[s];if(!a.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,_=l.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return h.call(this)},set:function(R){p=""+R,_.call(this,R)}}),Object.defineProperty(a,s,{enumerable:l.enumerable}),{getValue:function(){return p},setValue:function(R){p=""+R},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Ee(a){a._valueTracker||(a._valueTracker=Se(a))}function Ae(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var l=s.getValue(),p="";return a&&(p=he(a)?a.checked?"true":"false":a.value),a=p,a!==l?(s.setValue(a),!0):!1}function Pe(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}function ze(a,s){var l=s.checked;return H({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??a._wrapperState.initialChecked})}function _e(a,s){var l=s.defaultValue==null?"":s.defaultValue,p=s.checked!=null?s.checked:s.defaultChecked;l=re(s.value!=null?s.value:l),a._wrapperState={initialChecked:p,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Ze(a,s){s=s.checked,s!=null&&I(a,"checked",s,!1)}function xe(a,s){Ze(a,s);var l=re(s.value),p=s.type;if(l!=null)p==="number"?(l===0&&a.value===""||a.value!=l)&&(a.value=""+l):a.value!==""+l&&(a.value=""+l);else if(p==="submit"||p==="reset"){a.removeAttribute("value");return}s.hasOwnProperty("value")?ct(a,s.type,l):s.hasOwnProperty("defaultValue")&&ct(a,s.type,re(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(a.defaultChecked=!!s.defaultChecked)}function et(a,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var p=s.type;if(!(p!=="submit"&&p!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+a._wrapperState.initialValue,l||s===a.value||(a.value=s),a.defaultValue=s}l=a.name,l!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,l!==""&&(a.name=l)}function ct(a,s,l){(s!=="number"||Pe(a.ownerDocument)!==a)&&(l==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+l&&(a.defaultValue=""+l))}var ln=Array.isArray;function yt(a,s,l,p){if(a=a.options,s){s={};for(var h=0;h"+s.valueOf().toString()+"",s=_t.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;s.firstChild;)a.appendChild(s.firstChild)}});function Vt(a,s){if(s){var l=a.firstChild;if(l&&l===a.lastChild&&l.nodeType===3){l.nodeValue=s;return}}a.textContent=s}var pn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dr=["Webkit","ms","Moz","O"];Object.keys(pn).forEach(function(a){Dr.forEach(function(s){s=s+a.charAt(0).toUpperCase()+a.substring(1),pn[s]=pn[a]})});function xt(a,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||pn.hasOwnProperty(a)&&pn[a]?(""+s).trim():s+"px"}function wt(a,s){a=a.style;for(var l in s)if(s.hasOwnProperty(l)){var p=l.indexOf("--")===0,h=xt(l,s[l],p);l==="float"&&(l="cssFloat"),p?a.setProperty(l,h):a[l]=h}}var Sl=H({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hi(a,s){if(s){if(Sl[a]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,a));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Gi(a,s){if(a.indexOf("-")===-1)return typeof s.is=="string";switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zi=null;function Ki(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Wi=null,wn=null,An=null;function Os(a){if(a=xr(a)){if(typeof Wi!="function")throw Error(r(280));var s=a.stateNode;s&&(s=ai(s),Wi(a.stateNode,a.type,s))}}function Ds(a){wn?An?An.push(a):An=[a]:wn=a}function Ls(){if(wn){var a=wn,s=An;if(An=wn=null,Os(a),s)for(a=0;a>>=0,a===0?32:31-(jl(a)/Pl|0)|0}var Ur=64,Vr=4194304;function nr(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Br(a,s){var l=a.pendingLanes;if(l===0)return 0;var p=0,h=a.suspendedLanes,_=a.pingedLanes,R=l&268435455;if(R!==0){var j=R&~h;j!==0?p=nr(j):(_&=R,_!==0&&(p=nr(_)))}else R=l&~h,R!==0?p=nr(R):_!==0&&(p=nr(_));if(p===0)return 0;if(s!==0&&s!==p&&(s&h)===0&&(h=p&-p,_=s&-s,h>=_||h===16&&(_&4194240)!==0))return s;if((p&4)!==0&&(p|=l&16),s=a.entangledLanes,s!==0)for(a=a.entanglements,s&=p;0l;l++)s.push(a);return s}function rr(a,s,l){a.pendingLanes|=s,s!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,s=31-St(s),a[s]=l}function Ll(a,s){var l=a.pendingLanes&~s;a.pendingLanes=s,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=s,a.mutableReadLanes&=s,a.entangledLanes&=s,s=a.entanglements;var p=a.eventTimes;for(a=a.expirationTimes;0=dr),po=" ",mo=!1;function ho(a,s){switch(a){case"keyup":return dc.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function go(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var jn=!1;function pc(a,s){switch(a){case"compositionend":return go(s);case"keypress":return s.which!==32?null:(mo=!0,po);case"textInput":return a=s.data,a===po&&mo?null:a;default:return null}}function mc(a,s){if(jn)return a==="compositionend"||!fa&&ho(a,s)?(a=so(),Wr=sa=Kt=null,jn=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1=s)return{node:l,offset:s-a};a=p}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ko(l)}}function Ro(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Ro(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function No(){for(var a=window,s=Pe();s instanceof a.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)a=s.contentWindow;else break;s=Pe(a.document)}return s}function ha(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}function kc(a){var s=No(),l=a.focusedElem,p=a.selectionRange;if(s!==l&&l&&l.ownerDocument&&Ro(l.ownerDocument.documentElement,l)){if(p!==null&&ha(l)){if(s=p.start,a=p.end,a===void 0&&(a=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(a,l.value.length);else if(a=(s=l.ownerDocument||document)&&s.defaultView||window,a.getSelection){a=a.getSelection();var h=l.textContent.length,_=Math.min(p.start,h);p=p.end===void 0?_:Math.min(p.end,h),!a.extend&&_>p&&(h=p,p=_,_=h),h=bo(l,_);var R=bo(l,p);h&&R&&(a.rangeCount!==1||a.anchorNode!==h.node||a.anchorOffset!==h.offset||a.focusNode!==R.node||a.focusOffset!==R.offset)&&(s=s.createRange(),s.setStart(h.node,h.offset),a.removeAllRanges(),_>p?(a.addRange(s),a.extend(R.node,R.offset)):(s.setEnd(R.node,R.offset),a.addRange(s)))}}for(s=[],a=l;a=a.parentNode;)a.nodeType===1&&s.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l=document.documentMode,Pn=null,ga=null,hr=null,va=!1;function To(a,s,l){var p=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;va||Pn==null||Pn!==Pe(p)||(p=Pn,"selectionStart"in p&&ha(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),hr&&mr(hr,p)||(hr=p,p=ni(ga,"onSelect"),0Mn||(a.current=Aa[Mn],Aa[Mn]=null,Mn--)}function Ne(a,s){Mn++,Aa[Mn]=a.current,a.current=s}var Zt={},Ke=Yt(Zt),tt=Yt(!1),gn=Zt;function qn(a,s){var l=a.type.contextTypes;if(!l)return Zt;var p=a.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===s)return p.__reactInternalMemoizedMaskedChildContext;var h={},_;for(_ in l)h[_]=s[_];return p&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=s,a.__reactInternalMemoizedMaskedChildContext=h),h}function nt(a){return a=a.childContextTypes,a!=null}function si(){we(tt),we(Ke)}function Vo(a,s,l){if(Ke.current!==Zt)throw Error(r(168));Ne(Ke,s),Ne(tt,l)}function Bo(a,s,l){var p=a.stateNode;if(s=s.childContextTypes,typeof p.getChildContext!="function")return l;p=p.getChildContext();for(var h in p)if(!(h in s))throw Error(r(108,J(a)||"Unknown",h));return H({},l,p)}function oi(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Zt,gn=Ke.current,Ne(Ke,a),Ne(tt,tt.current),!0}function Ho(a,s,l){var p=a.stateNode;if(!p)throw Error(r(169));l?(a=Bo(a,s,gn),p.__reactInternalMemoizedMergedChildContext=a,we(tt),we(Ke),Ne(Ke,a)):we(tt),Ne(tt,l)}var Ot=null,ui=!1,Ca=!1;function Go(a){Ot===null?Ot=[a]:Ot.push(a)}function Oc(a){ui=!0,Go(a)}function Xt(){if(!Ca&&Ot!==null){Ca=!0;var a=0,s=Re;try{var l=Ot;for(Re=1;a>=R,h-=R,Dt=1<<32-St(s)+h|l<ge?(Ve=pe,pe=null):Ve=pe.sibling;var be=K(L,pe,$[ge],ee);if(be===null){pe===null&&(pe=Ve);break}a&&pe&&be.alternate===null&&s(L,pe),D=_(be,D,ge),fe===null?ce=be:fe.sibling=be,fe=be,pe=Ve}if(ge===$.length)return l(L,pe),Ce&&yn(L,ge),ce;if(pe===null){for(;ge<$.length;ge++)pe=Y(L,$[ge],ee),pe!==null&&(D=_(pe,D,ge),fe===null?ce=pe:fe.sibling=pe,fe=pe);return Ce&&yn(L,ge),ce}for(pe=p(L,pe);ge<$.length;ge++)Ve=ae(pe,L,ge,$[ge],ee),Ve!==null&&(a&&Ve.alternate!==null&&pe.delete(Ve.key===null?ge:Ve.key),D=_(Ve,D,ge),fe===null?ce=Ve:fe.sibling=Ve,fe=Ve);return a&&pe.forEach(function(un){return s(L,un)}),Ce&&yn(L,ge),ce}function le(L,D,$,ee){var ce=te($);if(typeof ce!="function")throw Error(r(150));if($=ce.call($),$==null)throw Error(r(151));for(var fe=ce=null,pe=D,ge=D=0,Ve=null,be=$.next();pe!==null&&!be.done;ge++,be=$.next()){pe.index>ge?(Ve=pe,pe=null):Ve=pe.sibling;var un=K(L,pe,be.value,ee);if(un===null){pe===null&&(pe=Ve);break}a&&pe&&un.alternate===null&&s(L,pe),D=_(un,D,ge),fe===null?ce=un:fe.sibling=un,fe=un,pe=Ve}if(be.done)return l(L,pe),Ce&&yn(L,ge),ce;if(pe===null){for(;!be.done;ge++,be=$.next())be=Y(L,be.value,ee),be!==null&&(D=_(be,D,ge),fe===null?ce=be:fe.sibling=be,fe=be);return Ce&&yn(L,ge),ce}for(pe=p(L,pe);!be.done;ge++,be=$.next())be=ae(pe,L,ge,be.value,ee),be!==null&&(a&&be.alternate!==null&&pe.delete(be.key===null?ge:be.key),D=_(be,D,ge),fe===null?ce=be:fe.sibling=be,fe=be);return a&&pe.forEach(function(hd){return s(L,hd)}),Ce&&yn(L,ge),ce}function De(L,D,$,ee){if(typeof $=="object"&&$!==null&&$.type===P&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case w:e:{for(var ce=$.key,fe=D;fe!==null;){if(fe.key===ce){if(ce=$.type,ce===P){if(fe.tag===7){l(L,fe.sibling),D=h(fe,$.props.children),D.return=L,L=D;break e}}else if(fe.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===ve&&Zo(ce)===fe.type){l(L,fe.sibling),D=h(fe,$.props),D.ref=Sr(L,fe,$),D.return=L,L=D;break e}l(L,fe);break}else s(L,fe);fe=fe.sibling}$.type===P?(D=Nn($.props.children,L.mode,ee,$.key),D.return=L,L=D):(ee=Di($.type,$.key,$.props,null,L.mode,ee),ee.ref=Sr(L,D,$),ee.return=L,L=ee)}return R(L);case N:e:{for(fe=$.key;D!==null;){if(D.key===fe)if(D.tag===4&&D.stateNode.containerInfo===$.containerInfo&&D.stateNode.implementation===$.implementation){l(L,D.sibling),D=h(D,$.children||[]),D.return=L,L=D;break e}else{l(L,D);break}else s(L,D);D=D.sibling}D=As($,L.mode,ee),D.return=L,L=D}return R(L);case ve:return fe=$._init,De(L,D,fe($._payload),ee)}if(ln($))return ue(L,D,$,ee);if(te($))return le(L,D,$,ee);fi(L,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,D!==null&&D.tag===6?(l(L,D.sibling),D=h(D,$),D.return=L,L=D):(l(L,D),D=ws($,L.mode,ee),D.return=L,L=D),R(L)):l(L,D)}return De}var Bn=Xo(!0),Jo=Xo(!1),pi=Yt(null),mi=null,Hn=null,Da=null;function La(){Da=Hn=mi=null}function Ma(a){var s=pi.current;we(pi),a._currentValue=s}function qa(a,s,l){for(;a!==null;){var p=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,p!==null&&(p.childLanes|=s)):p!==null&&(p.childLanes&s)!==s&&(p.childLanes|=s),a===l)break;a=a.return}}function Gn(a,s){mi=a,Da=Hn=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&s)!==0&&(rt=!0),a.firstContext=null)}function mt(a){var s=a._currentValue;if(Da!==a)if(a={context:a,memoizedValue:s,next:null},Hn===null){if(mi===null)throw Error(r(308));Hn=a,mi.dependencies={lanes:0,firstContext:a}}else Hn=Hn.next=a;return s}var _n=null;function $a(a){_n===null?_n=[a]:_n.push(a)}function eu(a,s,l,p){var h=s.interleaved;return h===null?(l.next=l,$a(s)):(l.next=h.next,h.next=l),s.interleaved=l,Mt(a,p)}function Mt(a,s){a.lanes|=s;var l=a.alternate;for(l!==null&&(l.lanes|=s),l=a,a=a.return;a!==null;)a.childLanes|=s,l=a.alternate,l!==null&&(l.childLanes|=s),l=a,a=a.return;return l.tag===3?l.stateNode:null}var Jt=!1;function Ua(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tu(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function qt(a,s){return{eventTime:a,lane:s,tag:0,payload:null,callback:null,next:null}}function en(a,s,l){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(ke&2)!==0){var h=p.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),p.pending=s,Mt(a,l)}return h=p.interleaved,h===null?(s.next=s,$a(p)):(s.next=h.next,h.next=s),p.interleaved=s,Mt(a,l)}function hi(a,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var p=s.lanes;p&=a.pendingLanes,l|=p,s.lanes=l,ta(a,l)}}function nu(a,s){var l=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,l===p)){var h=null,_=null;if(l=l.firstBaseUpdate,l!==null){do{var R={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};_===null?h=_=R:_=_.next=R,l=l.next}while(l!==null);_===null?h=_=s:_=_.next=s}else h=_=s;l={baseState:p.baseState,firstBaseUpdate:h,lastBaseUpdate:_,shared:p.shared,effects:p.effects},a.updateQueue=l;return}a=l.lastBaseUpdate,a===null?l.firstBaseUpdate=s:a.next=s,l.lastBaseUpdate=s}function gi(a,s,l,p){var h=a.updateQueue;Jt=!1;var _=h.firstBaseUpdate,R=h.lastBaseUpdate,j=h.shared.pending;if(j!==null){h.shared.pending=null;var O=j,U=O.next;O.next=null,R===null?_=U:R.next=U,R=O;var W=a.alternate;W!==null&&(W=W.updateQueue,j=W.lastBaseUpdate,j!==R&&(j===null?W.firstBaseUpdate=U:j.next=U,W.lastBaseUpdate=O))}if(_!==null){var Y=h.baseState;R=0,W=U=O=null,j=_;do{var K=j.lane,ae=j.eventTime;if((p&K)===K){W!==null&&(W=W.next={eventTime:ae,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var ue=a,le=j;switch(K=s,ae=l,le.tag){case 1:if(ue=le.payload,typeof ue=="function"){Y=ue.call(ae,Y,K);break e}Y=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=le.payload,K=typeof ue=="function"?ue.call(ae,Y,K):ue,K==null)break e;Y=H({},Y,K);break e;case 2:Jt=!0}}j.callback!==null&&j.lane!==0&&(a.flags|=64,K=h.effects,K===null?h.effects=[j]:K.push(j))}else ae={eventTime:ae,lane:K,tag:j.tag,payload:j.payload,callback:j.callback,next:null},W===null?(U=W=ae,O=Y):W=W.next=ae,R|=K;if(j=j.next,j===null){if(j=h.shared.pending,j===null)break;K=j,j=K.next,K.next=null,h.lastBaseUpdate=K,h.shared.pending=null}}while(!0);if(W===null&&(O=Y),h.baseState=O,h.firstBaseUpdate=U,h.lastBaseUpdate=W,s=h.shared.interleaved,s!==null){h=s;do R|=h.lane,h=h.next;while(h!==s)}else _===null&&(h.shared.lanes=0);En|=R,a.lanes=R,a.memoizedState=Y}}function ru(a,s,l){if(a=s.effects,s.effects=null,a!==null)for(s=0;sl?l:4,a(!0);var p=za.transition;za.transition={};try{a(!1),s()}finally{Re=l,za.transition=p}}function Eu(){return ht().memoizedState}function qc(a,s,l){var p=an(a);if(l={lane:p,action:l,hasEagerState:!1,eagerState:null,next:null},ku(a))bu(s,l);else if(l=eu(a,s,l,p),l!==null){var h=Je();Tt(l,a,p,h),Ru(l,s,p)}}function $c(a,s,l){var p=an(a),h={lane:p,action:l,hasEagerState:!1,eagerState:null,next:null};if(ku(a))bu(s,h);else{var _=a.alternate;if(a.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var R=s.lastRenderedState,j=_(R,l);if(h.hasEagerState=!0,h.eagerState=j,Et(j,R)){var O=s.interleaved;O===null?(h.next=h,$a(s)):(h.next=O.next,O.next=h),s.interleaved=h;return}}catch{}finally{}l=eu(a,s,h,p),l!==null&&(h=Je(),Tt(l,a,p,h),Ru(l,s,p))}}function ku(a){var s=a.alternate;return a===je||s!==null&&s===je}function bu(a,s){Rr=_i=!0;var l=a.pending;l===null?s.next=s:(s.next=l.next,l.next=s),a.pending=s}function Ru(a,s,l){if((l&4194240)!==0){var p=s.lanes;p&=a.pendingLanes,l|=p,s.lanes=l,ta(a,l)}}var Ei={readContext:mt,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},Uc={readContext:mt,useCallback:function(a,s){return jt().memoizedState=[a,s===void 0?null:s],a},useContext:mt,useEffect:mu,useImperativeHandle:function(a,s,l){return l=l!=null?l.concat([a]):null,xi(4194308,4,vu.bind(null,s,a),l)},useLayoutEffect:function(a,s){return xi(4194308,4,a,s)},useInsertionEffect:function(a,s){return xi(4,2,a,s)},useMemo:function(a,s){var l=jt();return s=s===void 0?null:s,a=a(),l.memoizedState=[a,s],a},useReducer:function(a,s,l){var p=jt();return s=l!==void 0?l(s):s,p.memoizedState=p.baseState=s,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:s},p.queue=a,a=a.dispatch=qc.bind(null,je,a),[p.memoizedState,a]},useRef:function(a){var s=jt();return a={current:a},s.memoizedState=a},useState:fu,useDebugValue:Ja,useDeferredValue:function(a){return jt().memoizedState=a},useTransition:function(){var a=fu(!1),s=a[0];return a=Mc.bind(null,a[1]),jt().memoizedState=a,[s,a]},useMutableSource:function(){},useSyncExternalStore:function(a,s,l){var p=je,h=jt();if(Ce){if(l===void 0)throw Error(r(407));l=l()}else{if(l=s(),Ue===null)throw Error(r(349));(Sn&30)!==0||ou(p,s,l)}h.memoizedState=l;var _={value:l,getSnapshot:s};return h.queue=_,mu(lu.bind(null,p,_,a),[a]),p.flags|=2048,wr(9,uu.bind(null,p,_,l,s),void 0,null),l},useId:function(){var a=jt(),s=Ue.identifierPrefix;if(Ce){var l=Lt,p=Dt;l=(p&~(1<<32-St(p)-1)).toString(32)+l,s=":"+s+"R"+l,l=Nr++,0<\/script>",a=a.removeChild(a.firstChild)):typeof p.is=="string"?a=R.createElement(l,{is:p.is}):(a=R.createElement(l),l==="select"&&(R=a,p.multiple?R.multiple=!0:p.size&&(R.size=p.size))):a=R.createElementNS(a,l),a[Ct]=s,a[_r]=p,Gu(a,s,!1,!1),s.stateNode=a;e:{switch(R=Gi(l,p),l){case"dialog":Te("cancel",a),Te("close",a),h=p;break;case"iframe":case"object":case"embed":Te("load",a),h=p;break;case"video":case"audio":for(h=0;hYn&&(s.flags|=128,p=!0,Ar(_,!1),s.lanes=4194304)}else{if(!p)if(a=vi(R),a!==null){if(s.flags|=128,p=!0,l=a.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Ar(_,!0),_.tail===null&&_.tailMode==="hidden"&&!R.alternate&&!Ce)return Qe(s),null}else 2*Oe()-_.renderingStartTime>Yn&&l!==1073741824&&(s.flags|=128,p=!0,Ar(_,!1),s.lanes=4194304);_.isBackwards?(R.sibling=s.child,s.child=R):(l=_.last,l!==null?l.sibling=R:s.child=R,_.last=R)}return _.tail!==null?(s=_.tail,_.rendering=s,_.tail=s.sibling,_.renderingStartTime=Oe(),s.sibling=null,l=Ie.current,Ne(Ie,p?l&1|2:l&1),s):(Qe(s),null);case 22:case 23:return Rs(),p=s.memoizedState!==null,a!==null&&a.memoizedState!==null!==p&&(s.flags|=8192),p&&(s.mode&1)!==0?(lt&1073741824)!==0&&(Qe(s),s.subtreeFlags&6&&(s.flags|=8192)):Qe(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function Qc(a,s){switch(ja(s),s.tag){case 1:return nt(s.type)&&si(),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return zn(),we(tt),we(Ke),Ga(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 5:return Ba(s),null;case 13:if(we(Ie),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Vn()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return we(Ie),null;case 4:return zn(),null;case 10:return Ma(s.type._context),null;case 22:case 23:return Rs(),null;case 24:return null;default:return null}}var Ni=!1,Ye=!1,Yc=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Wn(a,s){var l=a.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(p){Fe(a,s,p)}else l.current=null}function ps(a,s,l){try{l()}catch(p){Fe(a,s,p)}}var Wu=!1;function Zc(a,s){if(ka=zr,a=No(),ha(a)){if("selectionStart"in a)var l={start:a.selectionStart,end:a.selectionEnd};else e:{l=(l=a.ownerDocument)&&l.defaultView||window;var p=l.getSelection&&l.getSelection();if(p&&p.rangeCount!==0){l=p.anchorNode;var h=p.anchorOffset,_=p.focusNode;p=p.focusOffset;try{l.nodeType,_.nodeType}catch{l=null;break e}var R=0,j=-1,O=-1,U=0,W=0,Y=a,K=null;t:for(;;){for(var ae;Y!==l||h!==0&&Y.nodeType!==3||(j=R+h),Y!==_||p!==0&&Y.nodeType!==3||(O=R+p),Y.nodeType===3&&(R+=Y.nodeValue.length),(ae=Y.firstChild)!==null;)K=Y,Y=ae;for(;;){if(Y===a)break t;if(K===l&&++U===h&&(j=R),K===_&&++W===p&&(O=R),(ae=Y.nextSibling)!==null)break;Y=K,K=Y.parentNode}Y=ae}l=j===-1||O===-1?null:{start:j,end:O}}else l=null}l=l||{start:0,end:0}}else l=null;for(ba={focusedElem:a,selectionRange:l},zr=!1,oe=s;oe!==null;)if(s=oe,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,oe=a;else for(;oe!==null;){s=oe;try{var ue=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ue!==null){var le=ue.memoizedProps,De=ue.memoizedState,L=s.stateNode,D=L.getSnapshotBeforeUpdate(s.elementType===s.type?le:bt(s.type,le),De);L.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var $=s.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ee){Fe(s,s.return,ee)}if(a=s.sibling,a!==null){a.return=s.return,oe=a;break}oe=s.return}return ue=Wu,Wu=!1,ue}function Cr(a,s,l){var p=s.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var h=p=p.next;do{if((h.tag&a)===a){var _=h.destroy;h.destroy=void 0,_!==void 0&&ps(s,l,_)}h=h.next}while(h!==p)}}function Ti(a,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&a)===a){var p=l.create;l.destroy=p()}l=l.next}while(l!==s)}}function ms(a){var s=a.ref;if(s!==null){var l=a.stateNode;switch(a.tag){case 5:a=l;break;default:a=l}typeof s=="function"?s(a):s.current=a}}function Qu(a){var s=a.alternate;s!==null&&(a.alternate=null,Qu(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&(delete s[Ct],delete s[_r],delete s[wa],delete s[Pc],delete s[Fc])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function Yu(a){return a.tag===5||a.tag===3||a.tag===4}function Zu(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Yu(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function hs(a,s,l){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(a,s):l.insertBefore(a,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(a,l)):(s=l,s.appendChild(a)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=ii));else if(p!==4&&(a=a.child,a!==null))for(hs(a,s,l),a=a.sibling;a!==null;)hs(a,s,l),a=a.sibling}function gs(a,s,l){var p=a.tag;if(p===5||p===6)a=a.stateNode,s?l.insertBefore(a,s):l.appendChild(a);else if(p!==4&&(a=a.child,a!==null))for(gs(a,s,l),a=a.sibling;a!==null;)gs(a,s,l),a=a.sibling}var He=null,Rt=!1;function tn(a,s,l){for(l=l.child;l!==null;)Xu(a,s,l),l=l.sibling}function Xu(a,s,l){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount($r,l)}catch{}switch(l.tag){case 5:Ye||Wn(l,s);case 6:var p=He,h=Rt;He=null,tn(a,s,l),He=p,Rt=h,He!==null&&(Rt?(a=He,l=l.stateNode,a.nodeType===8?a.parentNode.removeChild(l):a.removeChild(l)):He.removeChild(l.stateNode));break;case 18:He!==null&&(Rt?(a=He,l=l.stateNode,a.nodeType===8?Ta(a.parentNode,l):a.nodeType===1&&Ta(a,l),ur(a)):Ta(He,l.stateNode));break;case 4:p=He,h=Rt,He=l.stateNode.containerInfo,Rt=!0,tn(a,s,l),He=p,Rt=h;break;case 0:case 11:case 14:case 15:if(!Ye&&(p=l.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){h=p=p.next;do{var _=h,R=_.destroy;_=_.tag,R!==void 0&&((_&2)!==0||(_&4)!==0)&&ps(l,s,R),h=h.next}while(h!==p)}tn(a,s,l);break;case 1:if(!Ye&&(Wn(l,s),p=l.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=l.memoizedProps,p.state=l.memoizedState,p.componentWillUnmount()}catch(j){Fe(l,s,j)}tn(a,s,l);break;case 21:tn(a,s,l);break;case 22:l.mode&1?(Ye=(p=Ye)||l.memoizedState!==null,tn(a,s,l),Ye=p):tn(a,s,l);break;default:tn(a,s,l)}}function Ju(a){var s=a.updateQueue;if(s!==null){a.updateQueue=null;var l=a.stateNode;l===null&&(l=a.stateNode=new Yc),s.forEach(function(p){var h=sd.bind(null,a,p);l.has(p)||(l.add(p),p.then(h,h))})}}function Nt(a,s){var l=s.deletions;if(l!==null)for(var p=0;ph&&(h=R),p&=~_}if(p=h,p=Oe()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*Jc(p/1960))-p,10a?16:a,rn===null)var p=!1;else{if(a=rn,rn=null,ji=0,(ke&6)!==0)throw Error(r(331));var h=ke;for(ke|=4,oe=a.current;oe!==null;){var _=oe,R=_.child;if((oe.flags&16)!==0){var j=_.deletions;if(j!==null){for(var O=0;OOe()-_s?bn(a,0):ys|=l),at(a,s)}function fl(a,s){s===0&&((a.mode&1)===0?s=1:(s=Vr,Vr<<=1,(Vr&130023424)===0&&(Vr=4194304)));var l=Je();a=Mt(a,s),a!==null&&(rr(a,s,l),at(a,l))}function ad(a){var s=a.memoizedState,l=0;s!==null&&(l=s.retryLane),fl(a,l)}function sd(a,s){var l=0;switch(a.tag){case 13:var p=a.stateNode,h=a.memoizedState;h!==null&&(l=h.retryLane);break;case 19:p=a.stateNode;break;default:throw Error(r(314))}p!==null&&p.delete(s),fl(a,l)}var pl;pl=function(a,s,l){if(a!==null)if(a.memoizedProps!==s.pendingProps||tt.current)rt=!0;else{if((a.lanes&l)===0&&(s.flags&128)===0)return rt=!1,Kc(a,s,l);rt=(a.flags&131072)!==0}else rt=!1,Ce&&(s.flags&1048576)!==0&&zo(s,ci,s.index);switch(s.lanes=0,s.tag){case 2:var p=s.type;Ri(a,s),a=s.pendingProps;var h=qn(s,Ke.current);Gn(s,l),h=Wa(null,s,p,a,h,l);var _=Qa();return s.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,nt(p)?(_=!0,oi(s)):_=!1,s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Ua(s),h.updater=ki,s.stateNode=h,h._reactInternals=s,ns(s,p,a,l),s=os(null,s,p,!0,_,l)):(s.tag=0,Ce&&_&&Ia(s),Xe(null,s,h,l),s=s.child),s;case 16:p=s.elementType;e:{switch(Ri(a,s),a=s.pendingProps,h=p._init,p=h(p._payload),s.type=p,h=s.tag=ud(p),a=bt(p,a),h){case 0:s=ss(null,s,p,a,l);break e;case 1:s=qu(null,s,p,a,l);break e;case 11:s=Fu(null,s,p,a,l);break e;case 14:s=Ou(null,s,p,bt(p.type,a),l);break e}throw Error(r(306,p,""))}return s;case 0:return p=s.type,h=s.pendingProps,h=s.elementType===p?h:bt(p,h),ss(a,s,p,h,l);case 1:return p=s.type,h=s.pendingProps,h=s.elementType===p?h:bt(p,h),qu(a,s,p,h,l);case 3:e:{if($u(s),a===null)throw Error(r(387));p=s.pendingProps,_=s.memoizedState,h=_.element,tu(a,s),gi(s,p,null,l);var R=s.memoizedState;if(p=R.element,_.isDehydrated)if(_={element:p,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){h=Kn(Error(r(423)),s),s=Uu(a,s,p,l,h);break e}else if(p!==h){h=Kn(Error(r(424)),s),s=Uu(a,s,p,l,h);break e}else for(ut=Qt(s.stateNode.containerInfo.firstChild),ot=s,Ce=!0,kt=null,l=Jo(s,null,p,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Vn(),p===h){s=$t(a,s,l);break e}Xe(a,s,p,l)}s=s.child}return s;case 5:return iu(s),a===null&&Fa(s),p=s.type,h=s.pendingProps,_=a!==null?a.memoizedProps:null,R=h.children,Ra(p,h)?R=null:_!==null&&Ra(p,_)&&(s.flags|=32),Mu(a,s),Xe(a,s,R,l),s.child;case 6:return a===null&&Fa(s),null;case 13:return Vu(a,s,l);case 4:return Va(s,s.stateNode.containerInfo),p=s.pendingProps,a===null?s.child=Bn(s,null,p,l):Xe(a,s,p,l),s.child;case 11:return p=s.type,h=s.pendingProps,h=s.elementType===p?h:bt(p,h),Fu(a,s,p,h,l);case 7:return Xe(a,s,s.pendingProps,l),s.child;case 8:return Xe(a,s,s.pendingProps.children,l),s.child;case 12:return Xe(a,s,s.pendingProps.children,l),s.child;case 10:e:{if(p=s.type._context,h=s.pendingProps,_=s.memoizedProps,R=h.value,Ne(pi,p._currentValue),p._currentValue=R,_!==null)if(Et(_.value,R)){if(_.children===h.children&&!tt.current){s=$t(a,s,l);break e}}else for(_=s.child,_!==null&&(_.return=s);_!==null;){var j=_.dependencies;if(j!==null){R=_.child;for(var O=j.firstContext;O!==null;){if(O.context===p){if(_.tag===1){O=qt(-1,l&-l),O.tag=2;var U=_.updateQueue;if(U!==null){U=U.shared;var W=U.pending;W===null?O.next=O:(O.next=W.next,W.next=O),U.pending=O}}_.lanes|=l,O=_.alternate,O!==null&&(O.lanes|=l),qa(_.return,l,s),j.lanes|=l;break}O=O.next}}else if(_.tag===10)R=_.type===s.type?null:_.child;else if(_.tag===18){if(R=_.return,R===null)throw Error(r(341));R.lanes|=l,j=R.alternate,j!==null&&(j.lanes|=l),qa(R,l,s),R=_.sibling}else R=_.child;if(R!==null)R.return=_;else for(R=_;R!==null;){if(R===s){R=null;break}if(_=R.sibling,_!==null){_.return=R.return,R=_;break}R=R.return}_=R}Xe(a,s,h.children,l),s=s.child}return s;case 9:return h=s.type,p=s.pendingProps.children,Gn(s,l),h=mt(h),p=p(h),s.flags|=1,Xe(a,s,p,l),s.child;case 14:return p=s.type,h=bt(p,s.pendingProps),h=bt(p.type,h),Ou(a,s,p,h,l);case 15:return Du(a,s,s.type,s.pendingProps,l);case 17:return p=s.type,h=s.pendingProps,h=s.elementType===p?h:bt(p,h),Ri(a,s),s.tag=1,nt(p)?(a=!0,oi(s)):a=!1,Gn(s,l),Tu(s,p,h),ns(s,p,h,l),os(null,s,p,!0,a,l);case 19:return Hu(a,s,l);case 22:return Lu(a,s,l)}throw Error(r(156,s.tag))};function ml(a,s){return Gs(a,s)}function od(a,s,l,p){this.tag=a,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(a,s,l,p){return new od(a,s,l,p)}function Ts(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ud(a){if(typeof a=="function")return Ts(a)?1:0;if(a!=null){if(a=a.$$typeof,a===Z)return 11;if(a===me)return 14}return 2}function on(a,s){var l=a.alternate;return l===null?(l=vt(a.tag,s,a.key,a.mode),l.elementType=a.elementType,l.type=a.type,l.stateNode=a.stateNode,l.alternate=a,a.alternate=l):(l.pendingProps=s,l.type=a.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=a.flags&14680064,l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,s=a.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=a.sibling,l.index=a.index,l.ref=a.ref,l}function Di(a,s,l,p,h,_){var R=2;if(p=a,typeof a=="function")Ts(a)&&(R=1);else if(typeof a=="string")R=5;else e:switch(a){case P:return Nn(l.children,h,_,s);case A:R=8,h|=8;break;case B:return a=vt(12,l,s,h|2),a.elementType=B,a.lanes=_,a;case q:return a=vt(13,l,s,h),a.elementType=q,a.lanes=_,a;case de:return a=vt(19,l,s,h),a.elementType=de,a.lanes=_,a;case ye:return Li(l,h,_,s);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case X:R=10;break e;case Q:R=9;break e;case Z:R=11;break e;case me:R=14;break e;case ve:R=16,p=null;break e}throw Error(r(130,a==null?a:typeof a,""))}return s=vt(R,l,s,h),s.elementType=a,s.type=p,s.lanes=_,s}function Nn(a,s,l,p){return a=vt(7,a,p,s),a.lanes=l,a}function Li(a,s,l,p){return a=vt(22,a,p,s),a.elementType=ye,a.lanes=l,a.stateNode={isHidden:!1},a}function ws(a,s,l){return a=vt(6,a,null,s),a.lanes=l,a}function As(a,s,l){return s=vt(4,a.children!==null?a.children:[],a.key,s),s.lanes=l,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}function ld(a,s,l,p,h){this.tag=s,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ea(0),this.expirationTimes=ea(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ea(0),this.identifierPrefix=p,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function Cs(a,s,l,p,h,_,R,j,O){return a=new ld(a,s,l,j,O),s===1?(s=1,_===!0&&(s|=8)):s=0,_=vt(3,null,null,s),a.current=_,_.stateNode=a,_.memoizedState={element:p,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ua(_),a}function cd(a,s,l){var p=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),reactDom.exports=requireReactDom_production_min(),reactDom.exports}var hasRequiredClient;function requireClient(){if(hasRequiredClient)return client;hasRequiredClient=1;var t=requireReactDom();return client.createRoot=t.createRoot,client.hydrateRoot=t.hydrateRoot,client}var clientExports=requireClient();class Subscribable{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){const r={listener:n};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const isServer=typeof window>"u"||"Deno"in window;function noop$4(){}function functionalUpdate(t,n){return typeof t=="function"?t(n):t}function isValidTimeout(t){return typeof t=="number"&&t>=0&&t!==1/0}function timeUntilStale(t,n){return Math.max(t+(n||0)-Date.now(),0)}function parseQueryArgs(t,n,r){return isQueryKey(t)?typeof n=="function"?{...r,queryKey:t,queryFn:n}:{...n,queryKey:t}:t}function parseFilterArgs(t,n,r){return isQueryKey(t)?[{...n,queryKey:t},r]:[t||{},n]}function matchQuery(t,n){const{type:r="all",exact:i,fetchStatus:o,predicate:u,queryKey:c,stale:d}=t;if(isQueryKey(c)){if(i){if(n.queryHash!==hashQueryKeyByOptions(c,n.options))return!1}else if(!partialMatchKey(n.queryKey,c))return!1}if(r!=="all"){const f=n.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||typeof o<"u"&&o!==n.state.fetchStatus||u&&!u(n))}function matchMutation(t,n){const{exact:r,fetching:i,predicate:o,mutationKey:u}=t;if(isQueryKey(u)){if(!n.options.mutationKey)return!1;if(r){if(hashQueryKey(n.options.mutationKey)!==hashQueryKey(u))return!1}else if(!partialMatchKey(n.options.mutationKey,u))return!1}return!(typeof i=="boolean"&&n.state.status==="loading"!==i||o&&!o(n))}function hashQueryKeyByOptions(t,n){return((n==null?void 0:n.queryKeyHashFn)||hashQueryKey)(t)}function hashQueryKey(t){return JSON.stringify(t,(n,r)=>isPlainObject$1(r)?Object.keys(r).sort().reduce((i,o)=>(i[o]=r[o],i),{}):r)}function partialMatchKey(t,n){return partialDeepEqual(t,n)}function partialDeepEqual(t,n){return t===n?!0:typeof t!=typeof n?!1:t&&n&&typeof t=="object"&&typeof n=="object"?!Object.keys(n).some(r=>!partialDeepEqual(t[r],n[r])):!1}function replaceEqualDeep(t,n){if(t===n)return t;const r=isPlainArray(t)&&isPlainArray(n);if(r||isPlainObject$1(t)&&isPlainObject$1(n)){const i=r?t.length:Object.keys(t).length,o=r?n:Object.keys(n),u=o.length,c=r?[]:{};let d=0;for(let f=0;f"u")return!0;const r=n.prototype;return!(!hasObjectPrototype(r)||!r.hasOwnProperty("isPrototypeOf"))}function hasObjectPrototype(t){return Object.prototype.toString.call(t)==="[object Object]"}function isQueryKey(t){return Array.isArray(t)}function sleep$1(t){return new Promise(n=>{setTimeout(n,t)})}function scheduleMicrotask(t){sleep$1(0).then(t)}function getAbortController(){if(typeof AbortController=="function")return new AbortController}function replaceData(t,n,r){return r.isDataEqual!=null&&r.isDataEqual(t,n)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,n):r.structuralSharing!==!1?replaceEqualDeep(t,n):n}class FocusManager extends Subscribable{constructor(){super(),this.setup=n=>{if(!isServer&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var n;(n=this.cleanup)==null||n.call(this),this.cleanup=void 0}}setEventListener(n){var r;this.setup=n,(r=this.cleanup)==null||r.call(this),this.cleanup=n(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(n){this.focused!==n&&(this.focused=n,this.onFocus())}onFocus(){this.listeners.forEach(({listener:n})=>{n()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const focusManager=new FocusManager,onlineEvents=["online","offline"];class OnlineManager extends Subscribable{constructor(){super(),this.setup=n=>{if(!isServer&&window.addEventListener){const r=()=>n();return onlineEvents.forEach(i=>{window.addEventListener(i,r,!1)}),()=>{onlineEvents.forEach(i=>{window.removeEventListener(i,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var n;(n=this.cleanup)==null||n.call(this),this.cleanup=void 0}}setEventListener(n){var r;this.setup=n,(r=this.cleanup)==null||r.call(this),this.cleanup=n(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(n){this.online!==n&&(this.online=n,this.onOnline())}onOnline(){this.listeners.forEach(({listener:n})=>{n()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const onlineManager=new OnlineManager;function defaultRetryDelay(t){return Math.min(1e3*2**t,3e4)}function canFetch(t){return(t??"online")==="online"?onlineManager.isOnline():!0}class CancelledError{constructor(n){this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}}function isCancelledError(t){return t instanceof CancelledError}function createRetryer(t){let n=!1,r=0,i=!1,o,u,c;const d=new Promise((b,k)=>{u=b,c=k}),f=b=>{i||(x(new CancelledError(b)),t.abort==null||t.abort())},m=()=>{n=!0},g=()=>{n=!1},v=()=>!focusManager.isFocused()||t.networkMode!=="always"&&!onlineManager.isOnline(),y=b=>{i||(i=!0,t.onSuccess==null||t.onSuccess(b),o==null||o(),u(b))},x=b=>{i||(i=!0,t.onError==null||t.onError(b),o==null||o(),c(b))},S=()=>new Promise(b=>{o=k=>{const C=i||!v();return C&&b(k),C},t.onPause==null||t.onPause()}).then(()=>{o=void 0,i||t.onContinue==null||t.onContinue()}),E=()=>{if(i)return;let b;try{b=t.fn()}catch(k){b=Promise.reject(k)}Promise.resolve(b).then(y).catch(k=>{var C,I;if(i)return;const T=(C=t.retry)!=null?C:3,w=(I=t.retryDelay)!=null?I:defaultRetryDelay,N=typeof w=="function"?w(r,k):w,P=T===!0||typeof T=="number"&&r{if(v())return S()}).then(()=>{n?x(k):E()})})};return canFetch(t.networkMode)?E():S().then(E),{promise:d,cancel:f,continue:()=>(o==null?void 0:o())?d:Promise.resolve(),cancelRetry:m,continueRetry:g}}const defaultLogger=console;function createNotifyManager(){let t=[],n=0,r=g=>{g()},i=g=>{g()};const o=g=>{let v;n++;try{v=g()}finally{n--,n||d()}return v},u=g=>{n?t.push(g):scheduleMicrotask(()=>{r(g)})},c=g=>(...v)=>{u(()=>{g(...v)})},d=()=>{const g=t;t=[],g.length&&scheduleMicrotask(()=>{i(()=>{g.forEach(v=>{r(v)})})})};return{batch:o,batchCalls:c,schedule:u,setNotifyFunction:g=>{r=g},setBatchNotifyFunction:g=>{i=g}}}const notifyManager=createNotifyManager();class Removable{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(n){this.cacheTime=Math.max(this.cacheTime||0,n??(isServer?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Query extends Removable{constructor(n){super(),this.abortSignalConsumed=!1,this.defaultOptions=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.cache=n.cache,this.logger=n.logger||defaultLogger,this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.initialState=n.state||getDefaultState$1(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(n){this.options={...this.defaultOptions,...n},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(n,r){const i=replaceData(this.state.data,n,this.options);return this.dispatch({data:i,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),i}setState(n,r){this.dispatch({type:"setState",state:n,setStateOptions:r})}cancel(n){var r;const i=this.promise;return(r=this.retryer)==null||r.cancel(n),i?i.then(noop$4).catch(noop$4):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(n=>n.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(n=>n.getCurrentResult().isStale)}isStaleByTime(n=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!timeUntilStale(this.state.dataUpdatedAt,n)}onFocus(){var n;const r=this.observers.find(i=>i.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(n=this.retryer)==null||n.continue()}onOnline(){var n;const r=this.observers.find(i=>i.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(n=this.retryer)==null||n.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(r=>r!==n),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(n,r){var i,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var u;return(u=this.retryer)==null||u.continueRetry(),this.promise}}if(n&&this.setOptions(n),!this.options.queryFn){const x=this.observers.find(S=>S.options.queryFn);x&&this.setOptions(x.options)}const c=getAbortController(),d={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},f=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>{if(c)return this.abortSignalConsumed=!0,c.signal}})};f(d);const m=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(d)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),g={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:m};if(f(g),(i=this.options.behavior)==null||i.onFetch(g),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=g.fetchOptions)==null?void 0:o.meta)){var v;this.dispatch({type:"fetch",meta:(v=g.fetchOptions)==null?void 0:v.meta})}const y=x=>{if(isCancelledError(x)&&x.silent||this.dispatch({type:"error",error:x}),!isCancelledError(x)){var S,E,b,k;(S=(E=this.cache.config).onError)==null||S.call(E,x,this),(b=(k=this.cache.config).onSettled)==null||b.call(k,this.state.data,x,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=createRetryer({fn:g.fetchFn,abort:c==null?void 0:c.abort.bind(c),onSuccess:x=>{var S,E,b,k;if(typeof x>"u"){y(new Error(this.queryHash+" data is undefined"));return}this.setData(x),(S=(E=this.cache.config).onSuccess)==null||S.call(E,x,this),(b=(k=this.cache.config).onSettled)==null||b.call(k,x,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:y,onFail:(x,S)=>{this.dispatch({type:"failed",failureCount:x,error:S})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(n){const r=i=>{var o,u;switch(n.type){case"failed":return{...i,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=n.meta)!=null?o:null,fetchStatus:canFetch(this.options.networkMode)?"fetching":"paused",...!i.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...i,data:n.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(u=n.dataUpdatedAt)!=null?u:Date.now(),error:null,isInvalidated:!1,status:"success",...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const c=n.error;return isCancelledError(c)&&c.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...i,error:c,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...n.state}}};this.state=r(this.state),notifyManager.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate(n)}),this.cache.notify({query:this,type:"updated",action:n})})}}function getDefaultState$1(t){const n=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof n<"u",i=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class QueryCache extends Subscribable{constructor(n){super(),this.config=n||{},this.queries=[],this.queriesMap={}}build(n,r,i){var o;const u=r.queryKey,c=(o=r.queryHash)!=null?o:hashQueryKeyByOptions(u,r);let d=this.get(c);return d||(d=new Query({cache:this,logger:n.getLogger(),queryKey:u,queryHash:c,options:n.defaultQueryOptions(r),state:i,defaultOptions:n.getQueryDefaults(u)}),this.add(d)),d}add(n){this.queriesMap[n.queryHash]||(this.queriesMap[n.queryHash]=n,this.queries.push(n),this.notify({type:"added",query:n}))}remove(n){const r=this.queriesMap[n.queryHash];r&&(n.destroy(),this.queries=this.queries.filter(i=>i!==n),r===n&&delete this.queriesMap[n.queryHash],this.notify({type:"removed",query:n}))}clear(){notifyManager.batch(()=>{this.queries.forEach(n=>{this.remove(n)})})}get(n){return this.queriesMap[n]}getAll(){return this.queries}find(n,r){const[i]=parseFilterArgs(n,r);return typeof i.exact>"u"&&(i.exact=!0),this.queries.find(o=>matchQuery(i,o))}findAll(n,r){const[i]=parseFilterArgs(n,r);return Object.keys(i).length>0?this.queries.filter(o=>matchQuery(i,o)):this.queries}notify(n){notifyManager.batch(()=>{this.listeners.forEach(({listener:r})=>{r(n)})})}onFocus(){notifyManager.batch(()=>{this.queries.forEach(n=>{n.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.queries.forEach(n=>{n.onOnline()})})}}class Mutation extends Removable{constructor(n){super(),this.defaultOptions=n.defaultOptions,this.mutationId=n.mutationId,this.mutationCache=n.mutationCache,this.logger=n.logger||defaultLogger,this.observers=[],this.state=n.state||getDefaultState(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options={...this.defaultOptions,...n},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(n){this.dispatch({type:"setState",state:n})}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.observers=this.observers.filter(r=>r!==n),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var n,r;return(n=(r=this.retryer)==null?void 0:r.continue())!=null?n:this.execute()}async execute(){const n=()=>{var P;return this.retryer=createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(A,B)=>{this.dispatch({type:"failed",failureCount:A,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(P=this.options.retry)!=null?P:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var i,o,u,c,d,f,m,g;if(!r){var v,y,x,S;this.dispatch({type:"loading",variables:this.options.variables}),await((v=(y=this.mutationCache.config).onMutate)==null?void 0:v.call(y,this.state.variables,this));const A=await((x=(S=this.options).onMutate)==null?void 0:x.call(S,this.state.variables));A!==this.state.context&&this.dispatch({type:"loading",context:A,variables:this.state.variables})}const P=await n();return await((i=(o=this.mutationCache.config).onSuccess)==null?void 0:i.call(o,P,this.state.variables,this.state.context,this)),await((u=(c=this.options).onSuccess)==null?void 0:u.call(c,P,this.state.variables,this.state.context)),await((d=(f=this.mutationCache.config).onSettled)==null?void 0:d.call(f,P,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,P,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:P}),P}catch(P){try{var E,b,k,C,I,T,w,N;throw await((E=(b=this.mutationCache.config).onError)==null?void 0:E.call(b,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onError)==null?void 0:k.call(C,P,this.state.variables,this.state.context)),await((I=(T=this.mutationCache.config).onSettled)==null?void 0:I.call(T,void 0,P,this.state.variables,this.state.context,this)),await((w=(N=this.options).onSettled)==null?void 0:w.call(N,void 0,P,this.state.variables,this.state.context)),P}finally{this.dispatch({type:"error",error:P})}}}dispatch(n){const r=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"loading":return{...i,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!canFetch(this.options.networkMode),status:"loading",variables:n.variables};case"success":return{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"};case"setState":return{...i,...n.state}}};this.state=r(this.state),notifyManager.batch(()=>{this.observers.forEach(i=>{i.onMutationUpdate(n)}),this.mutationCache.notify({mutation:this,type:"updated",action:n})})}}function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class MutationCache extends Subscribable{constructor(n){super(),this.config=n||{},this.mutations=[],this.mutationId=0}build(n,r,i){const o=new Mutation({mutationCache:this,logger:n.getLogger(),mutationId:++this.mutationId,options:n.defaultMutationOptions(r),state:i,defaultOptions:r.mutationKey?n.getMutationDefaults(r.mutationKey):void 0});return this.add(o),o}add(n){this.mutations.push(n),this.notify({type:"added",mutation:n})}remove(n){this.mutations=this.mutations.filter(r=>r!==n),this.notify({type:"removed",mutation:n})}clear(){notifyManager.batch(()=>{this.mutations.forEach(n=>{this.remove(n)})})}getAll(){return this.mutations}find(n){return typeof n.exact>"u"&&(n.exact=!0),this.mutations.find(r=>matchMutation(n,r))}findAll(n){return this.mutations.filter(r=>matchMutation(n,r))}notify(n){notifyManager.batch(()=>{this.listeners.forEach(({listener:r})=>{r(n)})})}resumePausedMutations(){var n;return this.resuming=((n=this.resuming)!=null?n:Promise.resolve()).then(()=>{const r=this.mutations.filter(i=>i.state.isPaused);return notifyManager.batch(()=>r.reduce((i,o)=>i.then(()=>o.continue().catch(noop$4)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function infiniteQueryBehavior(){return{onFetch:t=>{t.fetchFn=()=>{var n,r,i,o,u,c;const d=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,f=(i=t.fetchOptions)==null||(o=i.meta)==null?void 0:o.fetchMore,m=f==null?void 0:f.pageParam,g=(f==null?void 0:f.direction)==="forward",v=(f==null?void 0:f.direction)==="backward",y=((u=t.state.data)==null?void 0:u.pages)||[],x=((c=t.state.data)==null?void 0:c.pageParams)||[];let S=x,E=!1;const b=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>{var P;if((P=t.signal)!=null&&P.aborted)E=!0;else{var A;(A=t.signal)==null||A.addEventListener("abort",()=>{E=!0})}return t.signal}})},k=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),C=(N,P,A,B)=>(S=B?[P,...S]:[...S,P],B?[A,...N]:[...N,A]),I=(N,P,A,B)=>{if(E)return Promise.reject("Cancelled");if(typeof A>"u"&&!P&&N.length)return Promise.resolve(N);const X={queryKey:t.queryKey,pageParam:A,meta:t.options.meta};b(X);const Q=k(X);return Promise.resolve(Q).then(q=>C(N,A,q,B))};let T;if(!y.length)T=I([]);else if(g){const N=typeof m<"u",P=N?m:getNextPageParam(t.options,y);T=I(y,N,P)}else if(v){const N=typeof m<"u",P=N?m:getPreviousPageParam(t.options,y);T=I(y,N,P,!0)}else{S=[];const N=typeof t.options.getNextPageParam>"u";T=(d&&y[0]?d(y[0],0,y):!0)?I([],N,x[0]):Promise.resolve(C([],x[0],y[0]));for(let A=1;A{if(d&&y[A]?d(y[A],A,y):!0){const Q=N?x[A]:getNextPageParam(t.options,B);return I(B,N,Q)}return Promise.resolve(C(B,x[A],y[A]))})}return T.then(N=>({pages:N,pageParams:S}))}}}}function getNextPageParam(t,n){return t.getNextPageParam==null?void 0:t.getNextPageParam(n[n.length-1],n)}function getPreviousPageParam(t,n){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(n[0],n)}class QueryClient{constructor(n={}){this.queryCache=n.queryCache||new QueryCache,this.mutationCache=n.mutationCache||new MutationCache,this.logger=n.logger||defaultLogger,this.defaultOptions=n.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=focusManager.subscribe(()=>{focusManager.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=onlineManager.subscribe(()=>{onlineManager.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var n,r;this.mountCount--,this.mountCount===0&&((n=this.unsubscribeFocus)==null||n.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(n,r){const[i]=parseFilterArgs(n,r);return i.fetchStatus="fetching",this.queryCache.findAll(i).length}isMutating(n){return this.mutationCache.findAll({...n,fetching:!0}).length}getQueryData(n,r){var i;return(i=this.queryCache.find(n,r))==null?void 0:i.state.data}ensureQueryData(n,r,i){const o=parseQueryArgs(n,r,i),u=this.getQueryData(o.queryKey);return u?Promise.resolve(u):this.fetchQuery(o)}getQueriesData(n){return this.getQueryCache().findAll(n).map(({queryKey:r,state:i})=>{const o=i.data;return[r,o]})}setQueryData(n,r,i){const o=this.queryCache.find(n),u=o==null?void 0:o.state.data,c=functionalUpdate(r,u);if(typeof c>"u")return;const d=parseQueryArgs(n),f=this.defaultQueryOptions(d);return this.queryCache.build(this,f).setData(c,{...i,manual:!0})}setQueriesData(n,r,i){return notifyManager.batch(()=>this.getQueryCache().findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,r,i)]))}getQueryState(n,r){var i;return(i=this.queryCache.find(n,r))==null?void 0:i.state}removeQueries(n,r){const[i]=parseFilterArgs(n,r),o=this.queryCache;notifyManager.batch(()=>{o.findAll(i).forEach(u=>{o.remove(u)})})}resetQueries(n,r,i){const[o,u]=parseFilterArgs(n,r,i),c=this.queryCache,d={type:"active",...o};return notifyManager.batch(()=>(c.findAll(o).forEach(f=>{f.reset()}),this.refetchQueries(d,u)))}cancelQueries(n,r,i){const[o,u={}]=parseFilterArgs(n,r,i);typeof u.revert>"u"&&(u.revert=!0);const c=notifyManager.batch(()=>this.queryCache.findAll(o).map(d=>d.cancel(u)));return Promise.all(c).then(noop$4).catch(noop$4)}invalidateQueries(n,r,i){const[o,u]=parseFilterArgs(n,r,i);return notifyManager.batch(()=>{var c,d;if(this.queryCache.findAll(o).forEach(m=>{m.invalidate()}),o.refetchType==="none")return Promise.resolve();const f={...o,type:(c=(d=o.refetchType)!=null?d:o.type)!=null?c:"active"};return this.refetchQueries(f,u)})}refetchQueries(n,r,i){const[o,u]=parseFilterArgs(n,r,i),c=notifyManager.batch(()=>this.queryCache.findAll(o).filter(f=>!f.isDisabled()).map(f=>{var m;return f.fetch(void 0,{...u,cancelRefetch:(m=u==null?void 0:u.cancelRefetch)!=null?m:!0,meta:{refetchPage:o.refetchPage}})}));let d=Promise.all(c).then(noop$4);return u!=null&&u.throwOnError||(d=d.catch(noop$4)),d}fetchQuery(n,r,i){const o=parseQueryArgs(n,r,i),u=this.defaultQueryOptions(o);typeof u.retry>"u"&&(u.retry=!1);const c=this.queryCache.build(this,u);return c.isStaleByTime(u.staleTime)?c.fetch(u):Promise.resolve(c.state.data)}prefetchQuery(n,r,i){return this.fetchQuery(n,r,i).then(noop$4).catch(noop$4)}fetchInfiniteQuery(n,r,i){const o=parseQueryArgs(n,r,i);return o.behavior=infiniteQueryBehavior(),this.fetchQuery(o)}prefetchInfiniteQuery(n,r,i){return this.fetchInfiniteQuery(n,r,i).then(noop$4).catch(noop$4)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(n){this.defaultOptions=n}setQueryDefaults(n,r){const i=this.queryDefaults.find(o=>hashQueryKey(n)===hashQueryKey(o.queryKey));i?i.defaultOptions=r:this.queryDefaults.push({queryKey:n,defaultOptions:r})}getQueryDefaults(n){if(!n)return;const r=this.queryDefaults.find(i=>partialMatchKey(n,i.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(n,r){const i=this.mutationDefaults.find(o=>hashQueryKey(n)===hashQueryKey(o.mutationKey));i?i.defaultOptions=r:this.mutationDefaults.push({mutationKey:n,defaultOptions:r})}getMutationDefaults(n){if(!n)return;const r=this.mutationDefaults.find(i=>partialMatchKey(n,i.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(n){if(n!=null&&n._defaulted)return n;const r={...this.defaultOptions.queries,...this.getQueryDefaults(n==null?void 0:n.queryKey),...n,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=hashQueryKeyByOptions(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...this.defaultOptions.mutations,...this.getMutationDefaults(n==null?void 0:n.mutationKey),...n,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class QueryObserver extends Subscribable{constructor(n,r){super(),this.client=n,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),shouldFetchOnMount(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(n,r){const i=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(n),shallowEqualObjects(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const u=this.hasListeners();u&&shouldFetchOptionally(this.currentQuery,o,this.options,i)&&this.executeFetch(),this.updateResult(r),u&&(this.currentQuery!==o||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const c=this.computeRefetchInterval();u&&(this.currentQuery!==o||this.options.enabled!==i.enabled||c!==this.currentRefetchInterval)&&this.updateRefetchInterval(c)}getOptimisticResult(n){const r=this.client.getQueryCache().build(this.client,n),i=this.createResult(r,n);return shouldAssignObserverCurrentProperties(this,i,n)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(n){const r={};return Object.keys(n).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),n[i])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:n,...r}={}){return this.fetch({...r,meta:{refetchPage:n}})}fetchOptimistic(n){const r=this.client.defaultQueryOptions(n),i=this.client.getQueryCache().build(this.client,r);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,r))}fetch(n){var r;return this.executeFetch({...n,cancelRefetch:(r=n.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(n){this.updateQuery();let r=this.currentQuery.fetch(this.options,n);return n!=null&&n.throwOnError||(r=r.catch(noop$4)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),isServer||this.currentResult.isStale||!isValidTimeout(this.options.staleTime))return;const r=timeUntilStale(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var n;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(n=this.options.refetchInterval)!=null?n:!1}updateRefetchInterval(n){this.clearRefetchInterval(),this.currentRefetchInterval=n,!(isServer||this.options.enabled===!1||!isValidTimeout(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(n,r){const i=this.currentQuery,o=this.options,u=this.currentResult,c=this.currentResultState,d=this.currentResultOptions,f=n!==i,m=f?n.state:this.currentQueryInitialState,g=f?this.currentResult:this.previousQueryResult,{state:v}=n;let{dataUpdatedAt:y,error:x,errorUpdatedAt:S,fetchStatus:E,status:b}=v,k=!1,C=!1,I;if(r._optimisticResults){const A=this.hasListeners(),B=!A&&shouldFetchOnMount(n,r),X=A&&shouldFetchOptionally(n,i,r,o);(B||X)&&(E=canFetch(n.options.networkMode)?"fetching":"paused",y||(b="loading")),r._optimisticResults==="isRestoring"&&(E="idle")}if(r.keepPreviousData&&!v.dataUpdatedAt&&g!=null&&g.isSuccess&&b!=="error")I=g.data,y=g.dataUpdatedAt,b=g.status,k=!0;else if(r.select&&typeof v.data<"u")if(u&&v.data===(c==null?void 0:c.data)&&r.select===this.selectFn)I=this.selectResult;else try{this.selectFn=r.select,I=r.select(v.data),I=replaceData(u==null?void 0:u.data,I,r),this.selectResult=I,this.selectError=null}catch(A){this.selectError=A}else I=v.data;if(typeof r.placeholderData<"u"&&typeof I>"u"&&b==="loading"){let A;if(u!=null&&u.isPlaceholderData&&r.placeholderData===(d==null?void 0:d.placeholderData))A=u.data;else if(A=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof A<"u")try{A=r.select(A),this.selectError=null}catch(B){this.selectError=B}typeof A<"u"&&(b="success",I=replaceData(u==null?void 0:u.data,A,r),C=!0)}this.selectError&&(x=this.selectError,I=this.selectResult,S=Date.now(),b="error");const T=E==="fetching",w=b==="loading",N=b==="error";return{status:b,fetchStatus:E,isLoading:w,isSuccess:b==="success",isError:N,isInitialLoading:w&&T,data:I,dataUpdatedAt:y,error:x,errorUpdatedAt:S,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:T,isRefetching:T&&!w,isLoadingError:N&&v.dataUpdatedAt===0,isPaused:E==="paused",isPlaceholderData:C,isPreviousData:k,isRefetchError:N&&v.dataUpdatedAt!==0,isStale:isStale(n,r),refetch:this.refetch,remove:this.remove}}updateResult(n){const r=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,shallowEqualObjects(i,r))return;this.currentResult=i;const o={cache:!0},u=()=>{if(!r)return!0;const{notifyOnChangeProps:c}=this.options,d=typeof c=="function"?c():c;if(d==="all"||!d&&!this.trackedProps.size)return!0;const f=new Set(d??this.trackedProps);return this.options.useErrorBoundary&&f.add("error"),Object.keys(this.currentResult).some(m=>{const g=m;return this.currentResult[g]!==r[g]&&f.has(g)})};(n==null?void 0:n.listeners)!==!1&&u()&&(o.listeners=!0),this.notify({...o,...n})}updateQuery(){const n=this.client.getQueryCache().build(this.client,this.options);if(n===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=n,this.currentQueryInitialState=n.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),n.addObserver(this))}onQueryUpdate(n){const r={};n.type==="success"?r.onSuccess=!n.manual:n.type==="error"&&!isCancelledError(n.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(n){notifyManager.batch(()=>{if(n.onSuccess){var r,i,o,u;(r=(i=this.options).onSuccess)==null||r.call(i,this.currentResult.data),(o=(u=this.options).onSettled)==null||o.call(u,this.currentResult.data,null)}else if(n.onError){var c,d,f,m;(c=(d=this.options).onError)==null||c.call(d,this.currentResult.error),(f=(m=this.options).onSettled)==null||f.call(m,void 0,this.currentResult.error)}n.listeners&&this.listeners.forEach(({listener:g})=>{g(this.currentResult)}),n.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function shouldLoadOnMount(t,n){return n.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&n.retryOnMount===!1)}function shouldFetchOnMount(t,n){return shouldLoadOnMount(t,n)||t.state.dataUpdatedAt>0&&shouldFetchOn(t,n,n.refetchOnMount)}function shouldFetchOn(t,n,r){if(n.enabled!==!1){const i=typeof r=="function"?r(t):r;return i==="always"||i!==!1&&isStale(t,n)}return!1}function shouldFetchOptionally(t,n,r,i){return r.enabled!==!1&&(t!==n||i.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&isStale(t,r)}function isStale(t,n){return t.isStaleByTime(n.staleTime)}function shouldAssignObserverCurrentProperties(t,n,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?n.isPlaceholderData:!shallowEqualObjects(t.getCurrentResult(),n)}var reactDomExports=requireReactDom(),shim={exports:{}},useSyncExternalStoreShim_production={};var hasRequiredUseSyncExternalStoreShim_production;function requireUseSyncExternalStoreShim_production(){if(hasRequiredUseSyncExternalStoreShim_production)return useSyncExternalStoreShim_production;hasRequiredUseSyncExternalStoreShim_production=1;var t=requireReact();function n(v,y){return v===y&&(v!==0||1/v===1/y)||v!==v&&y!==y}var r=typeof Object.is=="function"?Object.is:n,i=t.useState,o=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function d(v,y){var x=y(),S=i({inst:{value:x,getSnapshot:y}}),E=S[0].inst,b=S[1];return u(function(){E.value=x,E.getSnapshot=y,f(E)&&b({inst:E})},[v,x,y]),o(function(){return f(E)&&b({inst:E}),v(function(){f(E)&&b({inst:E})})},[v]),c(x),x}function f(v){var y=v.getSnapshot;v=v.value;try{var x=y();return!r(v,x)}catch{return!0}}function m(v,y){return y()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:d;return useSyncExternalStoreShim_production.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,useSyncExternalStoreShim_production}var hasRequiredShim;function requireShim(){return hasRequiredShim||(hasRequiredShim=1,shim.exports=requireUseSyncExternalStoreShim_production()),shim.exports}var shimExports=requireShim();const useSyncExternalStore=shimExports.useSyncExternalStore,defaultContext=reactExports.createContext(void 0),QueryClientSharingContext=reactExports.createContext(!1);function getQueryClientContext(t,n){return t||(n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=defaultContext),window.ReactQueryClientContext):defaultContext)}const useQueryClient=({context:t}={})=>{const n=reactExports.useContext(getQueryClientContext(t,reactExports.useContext(QueryClientSharingContext)));if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},QueryClientProvider=({client:t,children:n,context:r,contextSharing:i=!1})=>{reactExports.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const o=getQueryClientContext(r,i);return reactExports.createElement(QueryClientSharingContext.Provider,{value:!r&&i},reactExports.createElement(o.Provider,{value:t},n))},IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext);function shouldThrowError(t,n){return typeof t=="function"?t(...n):!!t}const ensurePreventErrorBoundaryRetry=(t,n)=>{(t.suspense||t.useErrorBoundary)&&(n.isReset()||(t.retryOnMount=!1))},useClearResetErrorBoundary=t=>{reactExports.useEffect(()=>{t.clearReset()},[t])},getHasError=({result:t,errorResetBoundary:n,useErrorBoundary:r,query:i})=>t.isError&&!n.isReset()&&!t.isFetching&&shouldThrowError(r,[t.error,i]),ensureStaleTime=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},willFetch=(t,n)=>t.isLoading&&t.isFetching&&!n,shouldSuspend=(t,n,r)=>(t==null?void 0:t.suspense)&&willFetch(n,r),fetchOptimistic=(t,n,r)=>n.fetchOptimistic(t).then(({data:i})=>{t.onSuccess==null||t.onSuccess(i),t.onSettled==null||t.onSettled(i,null)}).catch(i=>{r.clearReset(),t.onError==null||t.onError(i),t.onSettled==null||t.onSettled(void 0,i)});function useBaseQuery(t,n){const r=useQueryClient({context:t.context}),i=useIsRestoring(),o=useQueryErrorResetBoundary(),u=r.defaultQueryOptions(t);u._optimisticResults=i?"isRestoring":"optimistic",u.onError&&(u.onError=notifyManager.batchCalls(u.onError)),u.onSuccess&&(u.onSuccess=notifyManager.batchCalls(u.onSuccess)),u.onSettled&&(u.onSettled=notifyManager.batchCalls(u.onSettled)),ensureStaleTime(u),ensurePreventErrorBoundaryRetry(u,o),useClearResetErrorBoundary(o);const[c]=reactExports.useState(()=>new n(r,u)),d=c.getOptimisticResult(u);if(useSyncExternalStore(reactExports.useCallback(f=>{const m=i?()=>{}:c.subscribe(notifyManager.batchCalls(f));return c.updateResult(),m},[c,i]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),reactExports.useEffect(()=>{c.setOptions(u,{listeners:!1})},[u,c]),shouldSuspend(u,d,i))throw fetchOptimistic(u,c,o);if(getHasError({result:d,errorResetBoundary:o,useErrorBoundary:u.useErrorBoundary,query:c.getCurrentQuery()}))throw d.error;return u.notifyOnChangeProps?d:c.trackResult(d)}function useQuery(t,n,r){const i=parseQueryArgs(t,n,r);return useBaseQuery(i,QueryObserver)}var ReactReduxContext=React.createContext(null);function defaultNoopBatch(t){t()}var batch=defaultNoopBatch,setBatch=function(n){return batch=n},getBatch=function(){return batch};function createListenerCollection(){var t=getBatch(),n=null,r=null;return{clear:function(){n=null,r=null},notify:function(){t(function(){for(var o=n;o;)o.callback(),o=o.next})},get:function(){for(var o=[],u=n;u;)o.push(u),u=u.next;return o},subscribe:function(o){var u=!0,c=r={callback:o,next:null,prev:r};return c.prev?c.prev.next=c:n=c,function(){!u||n===null||(u=!1,c.next?c.next.prev=c.prev:r=c.prev,c.prev?c.prev.next=c.next:n=c.next)}}}}var nullListeners={notify:function(){},get:function(){return[]}};function createSubscription(t,n){var r,i=nullListeners;function o(v){return f(),i.subscribe(v)}function u(){i.notify()}function c(){g.onStateChange&&g.onStateChange()}function d(){return!!r}function f(){r||(r=n?n.addNestedSub(c):t.subscribe(c),i=createListenerCollection())}function m(){r&&(r(),r=void 0,i.clear(),i=nullListeners)}var g={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:c,isSubscribed:d,trySubscribe:f,tryUnsubscribe:m,getListeners:function(){return i}};return g}var useIsomorphicLayoutEffect$2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function Provider(t){var n=t.store,r=t.context,i=t.children,o=reactExports.useMemo(function(){var d=createSubscription(n);return{store:n,subscription:d}},[n]),u=reactExports.useMemo(function(){return n.getState()},[n]);useIsomorphicLayoutEffect$2(function(){var d=o.subscription;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),u!==n.getState()&&d.notifyNestedSubs(),function(){d.tryUnsubscribe(),d.onStateChange=null}},[o,u]);var c=r||ReactReduxContext;return React.createElement(c.Provider,{value:o},i)}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(t){for(var n=1;n(t,n)=>{const r=(i,o)=>({type:t,payload:i,meta:o,"@CONTEXT":n});return r.type=t,r},makeMetaActionCreator=()=>(t,n)=>{const r=i=>({type:t,meta:i,"@CONTEXT":n});return r.type=t,r};var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto$d=Object.prototype,hasOwnProperty$a=objectProto$d.hasOwnProperty,nativeObjectToString$1=objectProto$d.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(t){var n=hasOwnProperty$a.call(t,symToStringTag$1),r=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var i=!0}catch{}var o=nativeObjectToString$1.call(t);return i&&(n?t[symToStringTag$1]=r:delete t[symToStringTag$1]),o}var objectProto$c=Object.prototype,nativeObjectToString=objectProto$c.toString;function objectToString(t){return nativeObjectToString.call(t)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(t){return t==null?t===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?getRawTag(t):objectToString(t)}function isObjectLike(t){return t!=null&&typeof t=="object"}var symbolTag$1="[object Symbol]";function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&baseGetTag(t)==symbolTag$1}function arrayMap(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r-1}var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(t,n){var r=typeof t;return n=n??MAX_SAFE_INTEGER$1,!!n&&(r=="number"||r!="symbol"&&reIsUint.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isArrayLike(t){return t!=null&&isLength$1(t.length)&&!isFunction(t)}var objectProto$9=Object.prototype;function isPrototype(t){var n=t&&t.constructor,r=typeof n=="function"&&n.prototype||objectProto$9;return t===r}function baseTimes(t,n){for(var r=-1,i=Array(t);++r-1}function listCacheSet(t,n){var r=this.__data__,i=assocIndexOf(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}function ListCache(t){var n=-1,r=t==null?0:t.length;for(this.clear();++no?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var u=Array(o);++i=i?t:baseSlice(t,n,r)}var rsAstralRange$2="\\ud800-\\udfff",rsComboMarksRange$3="\\u0300-\\u036f",reComboHalfMarksRange$3="\\ufe20-\\ufe2f",rsComboSymbolsRange$3="\\u20d0-\\u20ff",rsComboRange$3=rsComboMarksRange$3+reComboHalfMarksRange$3+rsComboSymbolsRange$3,rsVarRange$2="\\ufe0e\\ufe0f",rsZWJ$2="\\u200d",reHasUnicode=RegExp("["+rsZWJ$2+rsAstralRange$2+rsComboRange$3+rsVarRange$2+"]");function hasUnicode(t){return reHasUnicode.test(t)}function asciiToArray(t){return t.split("")}var rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$2="\\u0300-\\u036f",reComboHalfMarksRange$2="\\ufe20-\\ufe2f",rsComboSymbolsRange$2="\\u20d0-\\u20ff",rsComboRange$2=rsComboMarksRange$2+reComboHalfMarksRange$2+rsComboSymbolsRange$2,rsVarRange$1="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange$1+"]",rsCombo$2="["+rsComboRange$2+"]",rsFitz$1="\\ud83c[\\udffb-\\udfff]",rsModifier$1="(?:"+rsCombo$2+"|"+rsFitz$1+")",rsNonAstral$1="[^"+rsAstralRange$1+"]",rsRegional$1="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair$1="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ$1="\\u200d",reOptMod$1=rsModifier$1+"?",rsOptVar$1="["+rsVarRange$1+"]?",rsOptJoin$1="(?:"+rsZWJ$1+"(?:"+[rsNonAstral$1,rsRegional$1,rsSurrPair$1].join("|")+")"+rsOptVar$1+reOptMod$1+")*",rsSeq$1=rsOptVar$1+reOptMod$1+rsOptJoin$1,rsSymbol="(?:"+[rsNonAstral$1+rsCombo$2+"?",rsCombo$2,rsRegional$1,rsSurrPair$1,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz$1+"(?="+rsFitz$1+")|"+rsSymbol+rsSeq$1,"g");function unicodeToArray(t){return t.match(reUnicode)||[]}function stringToArray(t){return hasUnicode(t)?unicodeToArray(t):asciiToArray(t)}function createCaseFirst(t){return function(n){n=toString$1(n);var r=hasUnicode(n)?stringToArray(n):void 0,i=r?r[0]:n.charAt(0),o=r?castSlice(r,1).join(""):n.slice(1);return i[t]()+o}}var upperFirst=createCaseFirst("toUpperCase");function capitalize$1(t){return upperFirst(toString$1(t).toLowerCase())}function arrayReduce(t,n,r,i){for(var o=-1,u=t==null?0:t.length;++o=n?t:n)),t}function clamp$1(t,n,r){return r===void 0&&(r=n,n=void 0),r!==void 0&&(r=toNumber(r),r=r===r?r:0),n!==void 0&&(n=toNumber(n),n=n===n?n:0),baseClamp(toNumber(t),n,r)}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}function stackGet(t){return this.__data__.get(t)}function stackHas(t){return this.__data__.has(t)}var LARGE_ARRAY_SIZE$1=200;function stackSet(t,n){var r=this.__data__;if(r instanceof ListCache){var i=r.__data__;if(!Map$1||i.lengthd))return!1;var m=u.get(t),g=u.get(n);if(m&&g)return m==n&&g==t;var v=-1,y=!0,x=r&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(u.set(t,n),u.set(n,t);++v=n||P<0||v&&A>=u}function k(){var N=now();if(b(N))return C(N);d=setTimeout(k,E(N))}function C(N){return d=void 0,y&&i?x(N):(i=o=void 0,c)}function I(){d!==void 0&&clearTimeout(d),m=0,i=f=o=d=void 0}function T(){return d===void 0?c:C(now())}function w(){var N=now(),P=b(N);if(i=arguments,o=this,f=N,P){if(d===void 0)return S(f);if(v)return clearTimeout(d),d=setTimeout(k,n),x(f)}return d===void 0&&(d=setTimeout(k,n)),c}return w.cancel=I,w.flush=T,w}var FUNC_ERROR_TEXT$1="Expected a function";function negate(t){if(typeof t!="function")throw new TypeError(FUNC_ERROR_TEXT$1);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function baseSet(t,n,r,i){if(!isObject(t))return t;n=castPath(n,t);for(var o=-1,u=n.length,c=u-1,d=t;d!=null&&++o=LARGE_ARRAY_SIZE){var m=n?null:createSet(t);if(m)return setToArray(m);c=!1,o=cacheHas,f=new SetCache}else f=n?[]:d;e:for(;++i{function r(){n(document.readyState)}return document.addEventListener("readystatechange",r),()=>{document.removeEventListener("readystatechange",r)}}),t}function getScrollbarWidth(){const t=document.createElement("div");t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const n=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),n}function isTouchDevice(){return typeof window.ontouchstart=="function"||navigator.maxTouchPoints>0}function toReactProp(t){switch(t){case"class":return"className";case"enctype":return"encType";case"checked":return"defaultChecked";default:return camelCase(t)}}function extractAttributes(t){return Object.entries(t.attributes).reduce((n,[,r])=>Object.assign(n,{[toReactProp(r.name)]:r.value}),{})}function isDefined(t){return t!==void 0}function isPresent(t){return t!=null}function objectEntries(t){return Object.entries(t)}function objectKeys(t){return Object.keys(t)}function range(t,n){return n===void 0&&(n=t,t=0),new Array(Math.abs(n-t)+1).fill(t).map((r,i)=>r+i*Math.sign(n))}const sleep=t=>new Promise(n=>setTimeout(n,t));function includes(t,...n){return t!==void 0&&n.some(r=>t.includes(r))}function objectMap(t,n){return objectEntries(t).reduce((r,[i,o])=>({...r,[i]:n(o,i)}),{})}function hasDecimals(t){return typeof t=="number"&&t%1!==0}function parseNumber(t){return typeof t=="number"&&!isNaN(t)?t:Number.parseFloat(t||"0")||0}function isNonEmptyArray(t){return isArray(t)&&t.length>0}function diffDates(t,n){function r(c){return c=Math.floor(c),c<10?`0${c}`:c}const i=60*60,o=i*24,u=Math.max(n.valueOf()-t.valueOf(),0)/1e3;return{total:u,day:r(u/o),hour:r(u%o/i),minute:r(u%i/60),second:r(u%60)}}const useSelector=useSelector$1,useDispatch=useDispatch$1;function useQuerySelector(t,n={}){const[r,i]=reactExports.useState(document.querySelectorAll(t)),[,o]=reactExports.useReducer(u=>u+1,0);return reactExports.useLayoutEffect(()=>{const u=async f=>{try{typeof(f==null?void 0:f.type.includes)=="function"&&(f!=null&&f.type.includes("shopify"))&&await sleep(100);const m=document.querySelectorAll(t);m&&typeof o=="function"&&o(),i(m)}catch(m){console.warn(m)}},c=new MutationObserver(f=>u());r.forEach(f=>{f.addEventListener("change",u),c.observe(f,{attributes:!0,childList:!1,characterData:!1,...n})});const d=["locationchange","DOMContentLoaded","shopify:section:load","shopify:section:reorder","shopify:section:unload"];return d.forEach(f=>window.addEventListener(f,u)),()=>{d.forEach(f=>window.removeEventListener(f,u)),c.disconnect(),r.forEach(f=>f.removeEventListener("change",u))}},[t,r,n]),n.multiple?r:r[0]??null}function useWindowSize(){const[t,n]=reactExports.useState({width:window.innerWidth,height:window.innerHeight});return reactExports.useEffect(()=>{function r(){n({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",r,{passive:!0}),()=>window.removeEventListener("resize",r)},[]),t}function useScrollbarWidth(){const t=reactExports.useRef(0);return reactExports.useLayoutEffect(()=>{t.current=getScrollbarWidth()}),t.current}function getStoreCountry(){switch(window.Shopify.shop){case"auk-sweden.myshopify.com":return"SE";case"aukstore.myshopify.com":return"NO";case"aukeco.myshopify.com":return"EU"}}var MarketSwitchStatus=(t=>(t[t.None=0]="None",t.Domain="Domain",t.Currency="Currency",t.Store="Store",t))(MarketSwitchStatus||{});function getMarketSwitchConfig(t,n,r){if(n===r)return{status:0,nextMarket:null};const i=t.find(u=>u.countries.includes(r)),o=t.find(u=>n==="EU"?u.store==="EU":u.countries.includes(n));return!i||!o?{status:0,nextMarket:null}:o.id===i.id?{status:0,nextMarket:null}:i.store!==o.store?{status:"Store",nextMarket:i}:i.currency!==o.currency?{status:"Currency",nextMarket:i}:i.webPresences[0].domain!==o.webPresences[0].domain?{status:"Domain",nextMarket:i}:{status:0,nextMarket:null}}function getPrefferedCountryCode(){var o;const t=(o=document.cookie.split("; ").find(u=>u.startsWith("localization")))==null?void 0:o.split("="),n=t?t[1]:null,r=localStorage.getItem("preferredCountryCode");let i=null;return getStoreCountry()==="EU"?i=r??n:i=n??r,i??"EU"}function getPrefferedCountry(){const t=getPrefferedCountryCode();return window.localization.available_countries.find(n=>n.iso_code===t)??null}function getCurrentCountry(){return getPrefferedCountry()??window.localization.country}function getDefaultCountry(){var n;const t={...((n=window.localization)==null?void 0:n.country)??{},iso_code:"EU",name:"Europe"};return getPrefferedCountry()??t}function getCurrentLanguage(){return window.localization.language.shop_locale}function useCurrentCountryCode(){const t=useSelector(r=>{var i;return(i=r.cart.buyerIdentity)==null?void 0:i.countryCode}),n=getPrefferedCountryCode();return t??n}function isMoneyV2(t){return t?!!(t!=null&&t.amount):!1}var xl;const currencies=uniqBy(typeof window<"u"?(xl=window.localization)==null?void 0:xl.available_countries.map(t=>t.currency):[],t=>t.iso_code);function getPrice(t,n=!1,r=0){const i=isMoneyV2(t)?parseNumber(t==null?void 0:t.amount):parseNumber(t);if(n===!0){const o=getCurrentCountry().currency,u=isObject(t)?t.currencyCode:o.iso_code,c=currencies.find(d=>d.iso_code===u);if(!c)return console.warn("Currency not found",u),`${o==null?void 0:o.symbol}${i}`;try{const d=r||hasDecimals(i)?i.toFixed(r||2):i;switch(getStoreCountry()){case"NO":return`${d}${c.symbol}`;case"SE":return`${d} ${c.symbol}`;case"EU":return c.symbol.length>1?`${d} ${c.symbol}`:`${c.symbol}${d}`}}catch(d){return console.warn(getPrice.name,d),`${c.symbol}${i}`}}else return i}function toMoneyV2Numeric(t){return{amount:parseNumber(t.amount),currencyCode:t.currencyCode}}function getDiscountValue(t){return getPrice(t.discountedAmount)}function lineDiscount(t){const{merchandise:n}=t,r=n!=null&&n.compareAtPrice?getPrice(n.compareAtPrice)-getPrice(n.price):0;return getScriptDiscounts(t)+r*t.quantity}function linePrice(t){const{merchandise:n,quantity:r}=t;return n?getPrice(n.compareAtPrice??n.price)*r-lineDiscount(t):-1}function lineComparePrice(t){return linePrice(t)+lineDiscount(t)}function getScriptDiscounts(t){return t!=null&&t.discountAllocations?t.discountAllocations.reduce((n,r)=>n+getDiscountValue(r),0):0}function cartCalcSubTotalDiscount(t){return t.lines.reduce((n,r)=>n+lineDiscount(r),0)}function useShippingCost(t){const n=useShippingSetting(),r=useFreeShippingThreshold();return!t||!t.lines||!t.cost?null:getShippingCost(t,n,r)}function getShippingCost(t,n,r){const i=t.lines.some(g=>{var v;return(v=g.merchandise)==null?void 0:v.requiresShipping});if(!i)return{requiresShipping:i,cost:0,saved:0,threshold:0,maxCost:0,minCost:0};const o=getPrice(t.cost.subtotalAmount);if(!n)return null;const u=n.conditions.filter(g=>g.criteria.every(v=>{if(v.field!=="TOTAL_PRICE")return!1;const y=getPrice(v);switch(v.operator){case"LESS_THAN_OR_EQUAL_TO":return o<=y;case"GREATER_THAN_OR_EQUAL_TO":return o>=y}})).sort((g,v)=>getPrice(v.rate)-getPrice(g.rate)).pop(),c=n.conditions.map(g=>getPrice(g.rate)),d=Math.max(0,...c),f=Math.min(...c.filter(g=>g>0)),m=u?parseNumber(u.rate.amount):0;return{requiresShipping:i,cost:m,saved:f-m,threshold:r??0,minCost:f,maxCost:d}}function useFreeShippingThreshold(){const t=useShippingSetting();return t?getFreeShippingThreshold(t):null}function getFreeShippingThreshold(t){const n=t==null?void 0:t.conditions.flatMap(r=>r.criteria).map(r=>getPrice(r));return n!=null&&n.length?Math.max(...n):null}function useShippingSetting(){const t=useSelector(r=>r.shippingSettings),n=useCurrentCountryCode();return getShippingSetting(t,n)}function getShippingSetting(t,n){return t.find(i=>i.countries.includes(n||""))??t.find(i=>i.conditions.some(o=>o.rate.currencyCode===window.Shopify.currency.active))??t.find(i=>i.countries.includes("restOfWorld"))??t[0]??null}function isWhiteSpace(t){return t===9||t===32}function printBlockString(t,n){const r=t.replace(/"""/g,'\\"""'),i=r.split(/\r\n|[\n\r]/g),o=i.length===1,u=i.length>1&&i.slice(1).every(x=>x.length===0||isWhiteSpace(x.charCodeAt(0))),c=r.endsWith('\\"""'),d=t.endsWith('"')&&!c,f=t.endsWith("\\"),m=d||f,g=!o||t.length>70||m||u||c;let v="";const y=o&&isWhiteSpace(t.charCodeAt(0));return(g&&!y||u)&&(v+=` `),v+=r,(g||m)&&(v+=` `),'"""'+v+'"""'}function printString(t){return`"${t.replace(escapedRegExp,escapedReplacer)}"`}const escapedRegExp=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function escapedReplacer(t){return escapeSequences[t.charCodeAt(0)]}const escapeSequences=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function devAssert(t,n){if(!!!t)throw new Error(n)}const MAX_ARRAY_LENGTH=10,MAX_RECURSIVE_DEPTH=2;function inspect(t){return formatValue(t,[])}function formatValue(t,n){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return formatObjectValue(t,n);default:return String(t)}}function formatObjectValue(t,n){if(t===null)return"null";if(n.includes(t))return"[Circular]";const r=[...n,t];if(isJSONable(t)){const i=t.toJSON();if(i!==t)return typeof i=="string"?i:formatValue(i,r)}else if(Array.isArray(t))return formatArray(t,r);return formatObject(t,r)}function isJSONable(t){return typeof t.toJSON=="function"}function formatObject(t,n){const r=Object.entries(t);return r.length===0?"{}":n.length>MAX_RECURSIVE_DEPTH?"["+getObjectTag(t)+"]":"{ "+r.map(([o,u])=>o+": "+formatValue(u,n)).join(", ")+" }"}function formatArray(t,n){if(t.length===0)return"[]";if(n.length>MAX_RECURSIVE_DEPTH)return"[Array]";const r=Math.min(MAX_ARRAY_LENGTH,t.length),i=t.length-r,o=[];for(let u=0;u1&&o.push(`... ${i} more items`),"["+o.join(", ")+"]"}function getObjectTag(t){const n=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(n==="Object"&&typeof t.constructor=="function"){const r=t.constructor.name;if(typeof r=="string"&&r!=="")return r}return n}const QueryDocumentKeys={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},kindValues=new Set(Object.keys(QueryDocumentKeys));function isNode(t){const n=t==null?void 0:t.kind;return typeof n=="string"&&kindValues.has(n)}var OperationTypeNode;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(OperationTypeNode||(OperationTypeNode={}));var Kind;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(Kind||(Kind={}));const BREAK=Object.freeze({});function visit(t,n,r=QueryDocumentKeys){const i=new Map;for(const k of Object.values(Kind))i.set(k,getEnterLeaveForKind(n,k));let o,u=Array.isArray(t),c=[t],d=-1,f=[],m=t,g,v;const y=[],x=[];do{d++;const k=d===c.length,C=k&&f.length!==0;if(k){if(g=x.length===0?void 0:y[y.length-1],m=v,v=x.pop(),C)if(u){m=m.slice();let T=0;for(const[w,N]of f){const P=w-T;N===null?(m.splice(P,1),T++):m[P]=N}}else{m=Object.defineProperties({},Object.getOwnPropertyDescriptors(m));for(const[T,w]of f)m[T]=w}d=o.index,c=o.keys,f=o.edits,u=o.inArray,o=o.prev}else if(v){if(g=u?d:c[d],m=v[g],m==null)continue;y.push(g)}let I;if(!Array.isArray(m)){var S,E;isNode(m)||devAssert(!1,`Invalid AST Node: ${inspect(m)}.`);const T=k?(S=i.get(m.kind))===null||S===void 0?void 0:S.leave:(E=i.get(m.kind))===null||E===void 0?void 0:E.enter;if(I=T==null?void 0:T.call(n,m,g,v,y,x),I===BREAK)break;if(I===!1){if(!k){y.pop();continue}}else if(I!==void 0&&(f.push([g,I]),!k))if(isNode(I))m=I;else{y.pop();continue}}if(I===void 0&&C&&f.push([g,m]),k)y.pop();else{var b;o={inArray:u,index:d,keys:c,edits:f,prev:o},u=Array.isArray(m),c=u?m:(b=r[m.kind])!==null&&b!==void 0?b:[],d=-1,f=[],v&&x.push(v),v=m}}while(o!==void 0);return f.length!==0?f[f.length-1][1]:t}function getEnterLeaveForKind(t,n){const r=t[n];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:t.enter,leave:t.leave}}function print(t){return visit(t,printDocASTReducer)}const MAX_LINE_LENGTH=80,printDocASTReducer={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>join(t.definitions,` `)},OperationDefinition:{leave(t){const n=wrap("(",join(t.variableDefinitions,", "),")"),r=join([t.operation,join([t.name,n]),join(t.directives," ")]," ");return(r==="query"?"":r+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:n,defaultValue:r,directives:i})=>t+": "+n+wrap(" = ",r)+wrap(" ",join(i," "))},SelectionSet:{leave:({selections:t})=>block(t)},Field:{leave({alias:t,name:n,arguments:r,directives:i,selectionSet:o}){const u=wrap("",t,": ")+n;let c=u+wrap("(",join(r,", "),")");return c.length>MAX_LINE_LENGTH&&(c=u+wrap(`( `,indent(join(r,` `)),` )`)),join([c,join(i," "),o]," ")}},Argument:{leave:({name:t,value:n})=>t+": "+n},FragmentSpread:{leave:({name:t,directives:n})=>"..."+t+wrap(" ",join(n," "))},InlineFragment:{leave:({typeCondition:t,directives:n,selectionSet:r})=>join(["...",wrap("on ",t),join(n," "),r]," ")},FragmentDefinition:{leave:({name:t,typeCondition:n,variableDefinitions:r,directives:i,selectionSet:o})=>`fragment ${t}${wrap("(",join(r,", "),")")} on ${n} ${wrap("",join(i," ")," ")}`+o},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:n})=>n?printBlockString(t):printString(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+join(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+join(t,", ")+"}"},ObjectField:{leave:({name:t,value:n})=>t+": "+n},Directive:{leave:({name:t,arguments:n})=>"@"+t+wrap("(",join(n,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:n,operationTypes:r})=>wrap("",t,` `)+join(["schema",join(n," "),block(r)]," ")},OperationTypeDefinition:{leave:({operation:t,type:n})=>t+": "+n},ScalarTypeDefinition:{leave:({description:t,name:n,directives:r})=>wrap("",t,` `)+join(["scalar",n,join(r," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:n,interfaces:r,directives:i,fields:o})=>wrap("",t,` `)+join(["type",n,wrap("implements ",join(r," & ")),join(i," "),block(o)]," ")},FieldDefinition:{leave:({description:t,name:n,arguments:r,type:i,directives:o})=>wrap("",t,` `)+n+(hasMultilineItems(r)?wrap(`( `,indent(join(r,` `)),` )`):wrap("(",join(r,", "),")"))+": "+i+wrap(" ",join(o," "))},InputValueDefinition:{leave:({description:t,name:n,type:r,defaultValue:i,directives:o})=>wrap("",t,` `)+join([n+": "+r,wrap("= ",i),join(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:n,interfaces:r,directives:i,fields:o})=>wrap("",t,` `)+join(["interface",n,wrap("implements ",join(r," & ")),join(i," "),block(o)]," ")},UnionTypeDefinition:{leave:({description:t,name:n,directives:r,types:i})=>wrap("",t,` `)+join(["union",n,join(r," "),wrap("= ",join(i," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:n,directives:r,values:i})=>wrap("",t,` `)+join(["enum",n,join(r," "),block(i)]," ")},EnumValueDefinition:{leave:({description:t,name:n,directives:r})=>wrap("",t,` `)+join([n,join(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:n,directives:r,fields:i})=>wrap("",t,` `)+join(["input",n,join(r," "),block(i)]," ")},DirectiveDefinition:{leave:({description:t,name:n,arguments:r,repeatable:i,locations:o})=>wrap("",t,` `)+"directive @"+n+(hasMultilineItems(r)?wrap(`( `,indent(join(r,` `)),` )`):wrap("(",join(r,", "),")"))+(i?" repeatable":"")+" on "+join(o," | ")},SchemaExtension:{leave:({directives:t,operationTypes:n})=>join(["extend schema",join(t," "),block(n)]," ")},ScalarTypeExtension:{leave:({name:t,directives:n})=>join(["extend scalar",t,join(n," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:n,directives:r,fields:i})=>join(["extend type",t,wrap("implements ",join(n," & ")),join(r," "),block(i)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:n,directives:r,fields:i})=>join(["extend interface",t,wrap("implements ",join(n," & ")),join(r," "),block(i)]," ")},UnionTypeExtension:{leave:({name:t,directives:n,types:r})=>join(["extend union",t,join(n," "),wrap("= ",join(r," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:n,values:r})=>join(["extend enum",t,join(n," "),block(r)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:n,fields:r})=>join(["extend input",t,join(n," "),block(r)]," ")}};function join(t,n=""){var r;return(r=t==null?void 0:t.filter(i=>i).join(n))!==null&&r!==void 0?r:""}function block(t){return wrap(`{ `,indent(join(t,` `)),` }`)}function wrap(t,n,r=""){return n!=null&&n!==""?t+n+r:""}function indent(t){return wrap(" ",t.replace(/\n/g,` `))}function hasMultilineItems(t){var n;return(n=t==null?void 0:t.some(r=>r.includes(` `)))!==null&&n!==void 0?n:!1}var CountryCode=(t=>(t.AC="AC",t.AD="AD",t.AE="AE",t.AF="AF",t.AG="AG",t.AI="AI",t.AL="AL",t.AM="AM",t.AN="AN",t.AO="AO",t.AR="AR",t.AT="AT",t.AU="AU",t.AW="AW",t.AX="AX",t.AZ="AZ",t.BA="BA",t.BB="BB",t.BD="BD",t.BE="BE",t.BF="BF",t.BG="BG",t.BH="BH",t.BI="BI",t.BJ="BJ",t.BL="BL",t.BM="BM",t.BN="BN",t.BO="BO",t.BQ="BQ",t.BR="BR",t.BS="BS",t.BT="BT",t.BV="BV",t.BW="BW",t.BY="BY",t.BZ="BZ",t.CA="CA",t.CC="CC",t.CD="CD",t.CF="CF",t.CG="CG",t.CH="CH",t.CI="CI",t.CK="CK",t.CL="CL",t.CM="CM",t.CN="CN",t.CO="CO",t.CR="CR",t.CU="CU",t.CV="CV",t.CW="CW",t.CX="CX",t.CY="CY",t.CZ="CZ",t.DE="DE",t.DJ="DJ",t.DK="DK",t.DM="DM",t.DO="DO",t.DZ="DZ",t.EC="EC",t.EE="EE",t.EG="EG",t.EH="EH",t.ER="ER",t.ES="ES",t.ET="ET",t.FI="FI",t.FJ="FJ",t.FK="FK",t.FO="FO",t.FR="FR",t.GA="GA",t.GB="GB",t.GD="GD",t.GE="GE",t.GF="GF",t.GG="GG",t.GH="GH",t.GI="GI",t.GL="GL",t.GM="GM",t.GN="GN",t.GP="GP",t.GQ="GQ",t.GR="GR",t.GS="GS",t.GT="GT",t.GW="GW",t.GY="GY",t.HK="HK",t.HM="HM",t.HN="HN",t.HR="HR",t.HT="HT",t.HU="HU",t.ID="ID",t.IE="IE",t.IL="IL",t.IM="IM",t.IN="IN",t.IO="IO",t.IQ="IQ",t.IR="IR",t.IS="IS",t.IT="IT",t.JE="JE",t.JM="JM",t.JO="JO",t.JP="JP",t.KE="KE",t.KG="KG",t.KH="KH",t.KI="KI",t.KM="KM",t.KN="KN",t.KP="KP",t.KR="KR",t.KW="KW",t.KY="KY",t.KZ="KZ",t.LA="LA",t.LB="LB",t.LC="LC",t.LI="LI",t.LK="LK",t.LR="LR",t.LS="LS",t.LT="LT",t.LU="LU",t.LV="LV",t.LY="LY",t.MA="MA",t.MC="MC",t.MD="MD",t.ME="ME",t.MF="MF",t.MG="MG",t.MK="MK",t.ML="ML",t.MM="MM",t.MN="MN",t.MO="MO",t.MQ="MQ",t.MR="MR",t.MS="MS",t.MT="MT",t.MU="MU",t.MV="MV",t.MW="MW",t.MX="MX",t.MY="MY",t.MZ="MZ",t.NA="NA",t.NC="NC",t.NE="NE",t.NF="NF",t.NG="NG",t.NI="NI",t.NL="NL",t.NO="NO",t.NP="NP",t.NR="NR",t.NU="NU",t.NZ="NZ",t.OM="OM",t.PA="PA",t.PE="PE",t.PF="PF",t.PG="PG",t.PH="PH",t.PK="PK",t.PL="PL",t.PM="PM",t.PN="PN",t.PS="PS",t.PT="PT",t.PY="PY",t.QA="QA",t.RE="RE",t.RO="RO",t.RS="RS",t.RU="RU",t.RW="RW",t.SA="SA",t.SB="SB",t.SC="SC",t.SD="SD",t.SE="SE",t.SG="SG",t.SH="SH",t.SI="SI",t.SJ="SJ",t.SK="SK",t.SL="SL",t.SM="SM",t.SN="SN",t.SO="SO",t.SR="SR",t.SS="SS",t.ST="ST",t.SV="SV",t.SX="SX",t.SY="SY",t.SZ="SZ",t.TA="TA",t.TC="TC",t.TD="TD",t.TF="TF",t.TG="TG",t.TH="TH",t.TJ="TJ",t.TK="TK",t.TL="TL",t.TM="TM",t.TN="TN",t.TO="TO",t.TR="TR",t.TT="TT",t.TV="TV",t.TW="TW",t.TZ="TZ",t.UA="UA",t.UG="UG",t.UM="UM",t.US="US",t.UY="UY",t.UZ="UZ",t.VA="VA",t.VC="VC",t.VE="VE",t.VG="VG",t.VN="VN",t.VU="VU",t.WF="WF",t.WS="WS",t.XK="XK",t.YE="YE",t.YT="YT",t.ZA="ZA",t.ZM="ZM",t.ZW="ZW",t.ZZ="ZZ",t))(CountryCode||{});const SCREEN_SIZES={xs:"375px",sm:"640px",md:"750px",lg:"1024px",xl:"1300px","2xl":"1536px","3xl":"1920px"},CDN_URL=`https://${window.Shopify.cdnHost}/shop`;window.theme.stylesheet.split("/").slice(0,-1).join("/");function getToken(){switch(getStoreCountry()){case"NO":return"db035772af39a34c43cc70d0c7ffd8bd";case"EU":return"8e85aa52c68e5d2b38e916f9e982090b";case"SE":return"7c1922d485362e0ceffa14a3c3491664"}}const STOREFRONT_CONFIG={domain:location.origin,token:getToken()},__PRODUCT_IDS=getStoreCountry()==="NO"?{Auk:"gid://shopify/Product/4347673149517",ExtraNutrients:"gid://shopify/Product/7676091498728",ChiliKit:"gid://shopify/Product/7542740353256"}:getStoreCountry()==="SE"?{Auk:"gid://shopify/Product/7994870006040",ExtraNutrients:"gid://shopify/Product/7994870366488",ChiliKit:"gid://shopify/Product/7994869940504"}:{Auk:"gid://shopify/Product/7535808151798",ExtraNutrients:"gid://shopify/Product/7537534271734",ChiliKit:"gid://shopify/Product/7535808053494"},PRODUCT_IDS=__PRODUCT_IDS,BREAKPOINTS=transform(SCREEN_SIZES,(t,n,r)=>t[r]=Number.parseInt(n,10)),FUNCTIONS_REGION=[CountryCode.US,CountryCode.CA].includes(window.localization.country.iso_code)?"us-central1":"europe-west1",FB_PROJECT_ID="auk-api",AUK_API_URL=`https://${FUNCTIONS_REGION}-${FB_PROJECT_ID}.cloudfunctions.net`;function ENV(){const t=window.Shopify.shop.split(".").shift();switch("production"){case"production":switch(parseNumber(window.theme.id)){case 153421676847:case 129173586152:case 130260992246:case 137505145112:return{type:"production",site:t,sampleRate:.01};default:return{type:"staging",site:t,sampleRate:1}}case"development":default:return{type:"development",site:t,sampleRate:1}}}function isError$1(t){return typeof(t==null?void 0:t.message)=="string"}function captureError(t){captureException(t,{contexts:t.contexts})}class AukError extends Error{constructor(n,r,i={}){super(n),this.name="AukError",this.message=n,isError$1(r)&&(this.message+=`: ${r.message}`),this.error=r,this.contexts={error:isError$1(r)?r:{},...i}}}class GQLError extends AukError{constructor(n){var r;super((isArray(n)?(r=n[0])==null?void 0:r.message:n.message)??"Unknown Error",void 0,isArray(n)?{errors:{...n}}:{error:{...n}}),this.name="GQLError"}}class CartError extends GQLError{constructor(n,r){super(isError(r)?r.errors:[{message:n}]),this.name="CartError",this.message=n}}function imageUrl(t,n){if(!isPresent(t))return;const r=typeof t=="string"?t.toString():"url"in t?t.url:"src"in t?t.src:null;if(!r)return;const i=r.split(".").pop();switch(typeof n){case"string":return r.replace(`.${i}`,`_${n}.${i}`);case"number":return r.replace(`.${i}`,`_x${n}.${i}`);default:{const o=new URL(r.startsWith("//")?`https:${r}`:r),u=window.innerWidth*window.devicePixelRatio,c=n??{width:Math.ceil(u/100)*100};return Object.entries(c).forEach(([d,f])=>o.searchParams.set(d,typeof f=="number"?f.toFixed(0):f)),o.toString()}}}function filesUrl(t){return`${CDN_URL}/files/${t}`}function productUrl(t){if(!t)return;const n=isObject(t)?t.handle:t;return`${window.Shopify.routes.root}products/${n}`}function isShop(){return includes(location.pathname,"/collections","/products")}function hasVariants(t){return t.variants.length>1}function isHome(){return location.pathname==window.Shopify.routes.root}function numberFormatter(t){const n=getCurrentCountry(),r=getCurrentLanguage();return new Intl.NumberFormat(`${r.locale}-${n.iso_code.toUpperCase()}`,t)}function isMediaImage(t){return isPresent(t)&&isImage$1(t.image)}function isImage$1(t){return isPresent(t)&&isPresent(t.url)}function extractNodes(t){return t.edges.map(n=>extractConnections(n.node))}function extractConnections(t){const n=r=>isArray(r==null?void 0:r.edges);return t==null?null:n(t)?extractNodes(t):isArray(t)?t.filter(r=>r).map(r=>extractConnections(r)):Object.entries(t).map(([r,i])=>[r,n(i)?extractNodes(i):isObject(i)&&!isArray(i)?extractConnections(i):i]).reduce((r,[i,o])=>({...r,[i]:o}),{})}function toGqlProduct(t){const n=r=>({currencyCode:getCurrentCountry().currency.symbol,amount:(r/100).toFixed(2)});return{id:toGraphId(t.id,"product"),title:t.title,subtitle:{value:t.subtitle||""},onlineStoreUrl:productUrl(t),availableForSale:!0,handle:t.handle,productType:t.type,variants:t.variants.map(r=>({...r,id:toGraphId(r.id,"variant"),availableForSale:r.available,price:n(r.price),compareAtPrice:r.compare_at_price?n(r.compare_at_price):null})),featuredImage:{url:t.featured_image},images:t.images.map(r=>({url:r})),compareAtPriceRange:{maxVariantPrice:n(t.compare_at_price_max),minVariantPrice:n(t.compare_at_price_min)},priceRange:{maxVariantPrice:n(t.price_max),minVariantPrice:n(t.price_min)},options:t.options.map(r=>({name:r,optionValues:[]})),descriptionHtml:t.description,upsell1:t.upsell1?{value:t.upsell1}:null,upsell2:t.upsell2?{value:t.upsell2}:null,upsell3:t.upsell3?{value:t.upsell3}:null}}function extractUpsells(t,n){return[1,2,3].map(r=>{var d,f,m,g,v,y,x,S;const i=(d=t[`upsell${r}_offer`])==null?void 0:d.value,o=(y=(v=(g=(m=(f=t[`upsell${r}`])==null?void 0:f.reference)==null?void 0:m.variants)==null?void 0:g.nodes)==null?void 0:v[0])==null?void 0:y.id,u=(x=t==null?void 0:t[`upsell${r}_expiry`])==null?void 0:x.value;return{id:((S=n==null?void 0:n[`upsell${r}`])==null?void 0:S.value)||o,label:i,expiration:u?new Date(u):null}}).filter(r=>r.id!==void 0)}function isGiftCard(t){return t.handle==="gift-card"||["Gift Cards","Geschenkkarten","Cartes cadeaux"].includes(t.productType)}function isSeed(t){return["Seeds","Samen","Graines"].includes(t.productType)}function isAccessory(t){return isAukMiniAccessory(t)||["Consumables","Accessories","Zubehör","Verbrauchsmaterialien","Consommables","Accessoires"].includes(t.productType)}function isAukMiniAccessory(t){return["Consumables Auk Mini","Verbrauchsmaterialien Auk Mini","Consommables Auk Mini"].includes(t.productType)}function gidToId(t){var r;const n=(r=t==null?void 0:t.split("/"))==null?void 0:r.pop();if(n){const i=parseNumber(n);return isNaN(i)?t:i}return t}function toGraphId(t,n){if(t!=null&&t.toString().includes("gid://"))return t;switch(n){case"product":return`gid://shopify/Product/${t}`;case"variant":return`gid://shopify/ProductVariant/${t}`}}function isOk(t){return t instanceof Error?!1:isPresent(t)&&isPresent(t.data)}function isError(t){const n=t==null?void 0:t.errors;return isArray(n)?n.length>0:isPresent(n)}async function shopifyFetch(t,n,r){const i={country:getCurrentCountry().iso_code,language:window.localization.language.shop_locale.locale.toUpperCase()};return getShopifyData(t,{...i,...n},r)}function getDocumentName(t){var r;const n=t.definitions.find(i=>i.kind==="OperationDefinition");return n?((r=n.name)==null?void 0:r.value)+capitalize$1(n.operation):null}async function getShopifyData(t,n,r){const i=typeof t=="string"?t:print(t);try{const o=await fetch(`${STOREFRONT_CONFIG.domain}/api/2025-10/graphql.json`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-Shopify-Storefront-Access-Token":STOREFRONT_CONFIG.token},body:JSON.stringify({query:i,variables:n}),signal:r});if(o.ok){const u=await o.json();return extractData(u)}else{const u=`[${o.status}: ${o.statusText}] `,c=(await o.text()).replace(/\s+/g," ");return addBreadcrumb({type:"storefront-api",message:u+c,level:"warning",data:{"http.status":o.status}}),{data:null,errors:[new AukError(c)]}}}catch(o){const u=o;return addBreadcrumb({type:"storefront-api",level:"error",message:u.message,data:{operation:getDocumentName(t),...n,error:u.name,stack:u.stack}}),{data:null,errors:[new AukError(`${getDocumentName(t)??t.kind} operation failed`,o,{variables:n})]}}}function extractData(t){if(isNonEmptyArray(t.errors))return{data:t.data,errors:extractErrors(t)};if(isArray(t.data))return{data:t.data};if(t.data){let n=t.data;n.__typename==="Mutation"&&(n=omitBy(n,(u,c)=>c==="__typename"),n=Object.values(n)[0]);const r=extractErrors({...t,data:n}),i=omitBy(n,(u,c)=>c.toLowerCase().includes("errors")),o=Object.values(i);if(o.length>1){const u=new AukError("Unexpected query result shape");return console.error(u.message,o),captureException(u),{data:null,errors:r!==null?[u,...r]:[u]}}else return{data:extractConnections(o.pop()),errors:r}}else return t}function extractErrors(t){const n=i=>Object.values(pickBy(i,(o,u)=>u.toLowerCase().includes("errors"))),r=[n(t),n(t.data)].flat(3).filter(isPresent).map(i=>new GQLError(i));return r.length>0?r:null}function useShopifyQuery(t,n,r={}){var c,d,f,m;const{signal:i,...o}=r??{},u=useQuery({queryKey:[t,n],queryFn:()=>shopifyFetch(t,n,i),retry:!0,retryDelay:g=>1e3*2**g,...o});return{...u,data:(c=u.data)==null?void 0:c.data,error:u.error??(Array.isArray((d=u.data)==null?void 0:d.errors)?((f=u.data)==null?void 0:f.errors[0])??null:(m=u.data)==null?void 0:m.errors)}}function toShopifyAnalyticsCartLine(t,n){var u;const r=typeof t=="string"?n==null?void 0:n.lines.find(c=>c.merchandise.id===t):t,i=n==null?void 0:n.lines.find(c=>c.merchandise.id===(r==null?void 0:r.id));if(!r)return null;const o=(i==null?void 0:i.merchandise.compareAtPrice)??(i==null?void 0:i.merchandise.price)??("price"in r?r.price:null);return o?{quantity:r.quantity,cost:{totalAmount:toMoneyV2Numeric(o)},merchandise:{...r,...i==null?void 0:i.merchandise,sku:null,untranslatedTitle:((u=i==null?void 0:i.merchandise)==null?void 0:u.title)??null,image:"image"in r&&r.image?{src:r.image.url}:null}}:null}function toConvergeCartLine(t){var n;return{...toConvergeProduct(t),quantity:t.quantity,discount:lineDiscount(t),sku:t.merchandise.sku??void 0,image_url:(n=t.merchandise.image)==null?void 0:n.url}}function toConvergeProduct(t){var n,r,i;return{product_id:gidToId(t.id).toString(),variant_id:t.id,name:(n=t.product)==null?void 0:n.title,variant_name:t.title,price:Number.parseFloat(((r=t.price)==null?void 0:r.amount)??"0"),currency:((i=t.price)==null?void 0:i.currencyCode)??"EUR",image_url:"image"in t&&t.image?t.image.url:void 0}}var classnames$1={exports:{}};var hasRequiredClassnames;function requireClassnames(){return hasRequiredClassnames||(hasRequiredClassnames=1,function(t){(function(){var n={}.hasOwnProperty;function r(){for(var u="",c=0;cd(u)))==null?void 0:c.classGroupId}const arbitraryPropertyRegex=/^\[(.+)\]$/;function getGroupIdForArbitraryProperty(t){if(arbitraryPropertyRegex.test(t)){const n=arbitraryPropertyRegex.exec(t)[1],r=n==null?void 0:n.substring(0,n.indexOf(":"));if(r)return"arbitrary.."+r}}function createClassMap(t){const{theme:n,prefix:r}=t,i={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(t.classGroups),r).forEach(([u,c])=>{processClassesRecursively(c,i,u,n)}),i}function processClassesRecursively(t,n,r,i){t.forEach(o=>{if(typeof o=="string"){const u=o===""?n:getPart(n,o);u.classGroupId=r;return}if(typeof o=="function"){if(isThemeGetter(o)){processClassesRecursively(o(i),n,r,i);return}n.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([u,c])=>{processClassesRecursively(c,getPart(n,u),r,i)})})}function getPart(t,n){let r=t;return n.split(CLASS_PART_SEPARATOR).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i)}),r}function isThemeGetter(t){return t.isThemeGetter}function getPrefixedClassGroupEntries(t,n){return n?t.map(([r,i])=>{const o=i.map(u=>typeof u=="string"?n+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([c,d])=>[n+c,d])):u);return[r,o]}):t}function createLruCache(t){if(t<1)return{get:()=>{},set:()=>{}};let n=0,r=new Map,i=new Map;function o(u,c){r.set(u,c),n++,n>t&&(n=0,i=r,r=new Map)}return{get(u){let c=r.get(u);if(c!==void 0)return c;if((c=i.get(u))!==void 0)return o(u,c),c},set(u,c){r.has(u)?r.set(u,c):o(u,c)}}}const IMPORTANT_MODIFIER="!";function createSplitModifiers(t){const n=t.separator,r=n.length===1,i=n[0],o=n.length;return function(c){const d=[];let f=0,m=0,g;for(let E=0;Em?g-m:void 0;return{modifiers:d,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:S}}}function sortModifiers(t){if(t.length<=1)return t;const n=[];let r=[];return t.forEach(i=>{i[0]==="["?(n.push(...r.sort(),i),r=[]):r.push(i)}),n.push(...r.sort()),n}function createConfigUtils(t){return{cache:createLruCache(t.cacheSize),splitModifiers:createSplitModifiers(t),...createClassUtils(t)}}const SPLIT_CLASSES_REGEX=/\s+/;function mergeClassList(t,n){const{splitModifiers:r,getClassGroupId:i,getConflictingClassGroupIds:o}=n,u=new Set;return t.trim().split(SPLIT_CLASSES_REGEX).map(c=>{const{modifiers:d,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:g}=r(c);let v=i(g?m.substring(0,g):m),y=!!g;if(!v){if(!g)return{isTailwindClass:!1,originalClassName:c};if(v=i(m),!v)return{isTailwindClass:!1,originalClassName:c};y=!1}const x=sortModifiers(d).join(":");return{isTailwindClass:!0,modifierId:f?x+IMPORTANT_MODIFIER:x,classGroupId:v,originalClassName:c,hasPostfixModifier:y}}).reverse().filter(c=>{if(!c.isTailwindClass)return!0;const{modifierId:d,classGroupId:f,hasPostfixModifier:m}=c,g=d+f;return u.has(g)?!1:(u.add(g),o(f,m).forEach(v=>u.add(d+v)),!0)}).reverse().map(c=>c.originalClassName).join(" ")}function twJoin(){let t=0,n,r,i="";for(;tv(g),t());return r=createConfigUtils(m),i=r.cache.get,o=r.cache.set,u=d,d(f)}function d(f){const m=i(f);if(m)return m;const g=mergeClassList(f,r);return o(f,g),g}return function(){return u(twJoin.apply(null,arguments))}}function fromTheme(t){const n=r=>r[t]||[];return n.isThemeGetter=!0,n}const arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,shadowRegex=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function isLength(t){return isNumber(t)||stringLengths.has(t)||fractionRegex.test(t)}function isArbitraryLength(t){return getIsArbitraryValue(t,"length",isLengthOnly)}function isNumber(t){return!!t&&!Number.isNaN(Number(t))}function isArbitraryNumber(t){return getIsArbitraryValue(t,"number",isNumber)}function isInteger(t){return!!t&&Number.isInteger(Number(t))}function isPercent(t){return t.endsWith("%")&&isNumber(t.slice(0,-1))}function isArbitraryValue(t){return arbitraryValueRegex.test(t)}function isTshirtSize(t){return tshirtUnitRegex.test(t)}const sizeLabels=new Set(["length","size","percentage"]);function isArbitrarySize(t){return getIsArbitraryValue(t,sizeLabels,isNever)}function isArbitraryPosition(t){return getIsArbitraryValue(t,"position",isNever)}const imageLabels=new Set(["image","url"]);function isArbitraryImage(t){return getIsArbitraryValue(t,imageLabels,isImage)}function isArbitraryShadow(t){return getIsArbitraryValue(t,"",isShadow)}function isAny(){return!0}function getIsArbitraryValue(t,n,r){const i=arbitraryValueRegex.exec(t);return i?i[1]?typeof n=="string"?i[1]===n:n.has(i[1]):r(i[2]):!1}function isLengthOnly(t){return lengthUnitRegex.test(t)&&!colorFunctionRegex.test(t)}function isNever(){return!1}function isShadow(t){return shadowRegex.test(t)}function isImage(t){return imageRegex.test(t)}function getDefaultConfig(){const t=fromTheme("colors"),n=fromTheme("spacing"),r=fromTheme("blur"),i=fromTheme("brightness"),o=fromTheme("borderColor"),u=fromTheme("borderRadius"),c=fromTheme("borderSpacing"),d=fromTheme("borderWidth"),f=fromTheme("contrast"),m=fromTheme("grayscale"),g=fromTheme("hueRotate"),v=fromTheme("invert"),y=fromTheme("gap"),x=fromTheme("gradientColorStops"),S=fromTheme("gradientColorStopPositions"),E=fromTheme("inset"),b=fromTheme("margin"),k=fromTheme("opacity"),C=fromTheme("padding"),I=fromTheme("saturate"),T=fromTheme("scale"),w=fromTheme("sepia"),N=fromTheme("skew"),P=fromTheme("space"),A=fromTheme("translate"),B=()=>["auto","contain","none"],X=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",isArbitraryValue,n],Z=()=>[isArbitraryValue,n],q=()=>["",isLength,isArbitraryLength],de=()=>["auto",isNumber,isArbitraryValue],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ve=()=>["solid","dashed","dotted","double","none"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],G=()=>["start","end","center","between","around","evenly","stretch"],te=()=>["","0",isArbitraryValue],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[isNumber,isArbitraryNumber],M=()=>[isNumber,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:F(),borderColor:[t],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:Z(),borderWidth:q(),contrast:F(),grayscale:te(),hueRotate:M(),invert:te(),gap:Z(),gradientColorStops:[t],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:Q(),margin:Q(),opacity:F(),padding:Z(),saturate:F(),scale:F(),sepia:te(),skew:M(),space:Z(),translate:Z()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...me(),isArbitraryValue]}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[E]}],"inset-x":[{"inset-x":[E]}],"inset-y":[{"inset-y":[E]}],start:[{start:[E]}],end:[{end:[E]}],top:[{top:[E]}],right:[{right:[E]}],bottom:[{bottom:[E]}],left:[{left:[E]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger,isArbitraryValue]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:te()}],shrink:[{shrink:te()}],order:[{order:["first","last","none",isInteger,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":de()}],"col-end":[{"col-end":de()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":de()}],"row-end":[{"row-end":de()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,n]}],"min-w":[{"min-w":[isArbitraryValue,n,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,n,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,n,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength,isArbitraryValue]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...me(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[k]}],"border-style":[{border:[...ve(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[k]}],"divide-style":[{divide:ve()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...ve()]}],"outline-offset":[{"outline-offset":[isLength,isArbitraryValue]}],"outline-w":[{outline:[isLength,isArbitraryLength]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[isLength,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":ye()}],"bg-blend":[{"bg-blend":ye()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[v]}],saturate:[{saturate:[I]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[I]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[isLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const twMerge=createTailwindMerge(getDefaultConfig);function cn(...t){return twMerge(classnames(...t))}const countryList=[{name:"Norway",iso_code:CountryCode.NO},{name:"Canada",iso_code:CountryCode.CA},{name:"United Kingdom",iso_code:CountryCode.GB},{name:"United States",iso_code:CountryCode.US},{name:"Switzerland",iso_code:CountryCode.CH},{name:"Austria",iso_code:CountryCode.AT},{name:"Belgium",iso_code:CountryCode.BE},{name:"Bulgaria",iso_code:CountryCode.BG},{name:"Croatia",iso_code:CountryCode.HR},{name:"Cyprus",iso_code:CountryCode.CY},{name:"Czechia",iso_code:CountryCode.CZ},{name:"Denmark",iso_code:CountryCode.DK},{name:"Estonia",iso_code:CountryCode.EE},{name:"Finland",iso_code:CountryCode.FI},{name:"France",iso_code:CountryCode.FR},{name:"Germany",iso_code:CountryCode.DE},{name:"Greece",iso_code:CountryCode.GR},{name:"Hungary",iso_code:CountryCode.HU},{name:"Ireland",iso_code:CountryCode.IE},{name:"Italy",iso_code:CountryCode.IT},{name:"Latvia",iso_code:CountryCode.LV},{name:"Lithuania",iso_code:CountryCode.LT},{name:"Luxembourg",iso_code:CountryCode.LU},{name:"Malta",iso_code:CountryCode.MT},{name:"Netherlands",iso_code:CountryCode.NL},{name:"Poland",iso_code:CountryCode.PL},{name:"Portugal",iso_code:CountryCode.PT},{name:"Romania",iso_code:CountryCode.RO},{name:"Slovakia",iso_code:CountryCode.SK},{name:"Slovenia",iso_code:CountryCode.SI},{name:"Spain",iso_code:CountryCode.ES},{name:"Sweden",iso_code:CountryCode.SE}],defaultMarketConfig=[{id:"gid://shopify/Market/2589098230",store:"EU",currency:"EUR",webPresences:[{defaultLocale:"en",domain:"www.auk.com"}],countries:["AT","BE","BG","CY","CZ","DE","EE","ES","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SI","SK"],primary:!0},{id:"gid://shopify/Market/2619736310",store:"EU",currency:"DKK",webPresences:[{defaultLocale:"en",domain:"www.auk.com"}],countries:["DK"],primary:!1},{id:"gid://shopify/Market/2619900150",store:"EU",currency:"CHF",webPresences:[{defaultLocale:"en",domain:"www.auk.com"}],countries:["CH"],primary:!1},{id:"gid://shopify/Market/2619441398",store:"EU",currency:"GBP",webPresences:[{defaultLocale:"en",domain:"www.auk.com"}],countries:["GB"],primary:!1},{id:"gid://shopify/Market/58458344",store:"NO",currency:"NOK",webPresences:[{defaultLocale:"nb",domain:"www.fr-sezane-saison.shop"}],countries:["NO"],primary:!0},{id:"gid://shopify/Market/37164450072",store:"SE",currency:"SEK",webPresences:[{defaultLocale:"sv",domain:"se.auk.com"}],countries:["SE"],primary:!0},{id:"gid://shopify/Market/61351395631",store:"US",currency:"USD",webPresences:[{defaultLocale:"en",domain:"www.auk.com"}],countries:["US"],primary:!1},{id:"gid://shopify/Market/31661949174",store:"EU",currency:"CAD",webPresences:[{defaultLocale:"en",domain:"www.auk.com"}],countries:["CA"],primary:!1}];var vibrant={},color={},util$1={},hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getColorIndex=t.getColorDiffStatus=t.hexDiff=t.rgbDiff=t.deltaE94=t.rgbToCIELab=t.xyzToCIELab=t.rgbToXyz=t.hslToRgb=t.rgbToHsl=t.rgbToHex=t.hexToRgb=t.defer=t.RSHIFT=t.SIGBITS=t.DELTAE94_DIFF_STATUS=void 0,t.DELTAE94_DIFF_STATUS={NA:0,PERFECT:1,CLOSE:2,GOOD:10,SIMILAR:50},t.SIGBITS=5,t.RSHIFT=8-t.SIGBITS;function n(){var S,E,b=new Promise(function(k,C){S=k,E=C});return{resolve:S,reject:E,promise:b}}t.defer=n;function r(S){var E=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(S);return E===null?null:[E[1],E[2],E[3]].map(function(b){return parseInt(b,16)})}t.hexToRgb=r;function i(S,E,b){return"#"+((1<<24)+(S<<16)+(E<<8)+b).toString(16).slice(1,7)}t.rgbToHex=i;function o(S,E,b){S/=255,E/=255,b/=255;var k=Math.max(S,E,b),C=Math.min(S,E,b),I,T,w=(k+C)/2;if(k===C)I=T=0;else{var N=k-C;switch(T=w>.5?N/(2-k-C):N/(k+C),k){case S:I=(E-b)/N+(E1&&(B-=1),B<1/6?P+(A-P)*6*B:B<1/2?A:B<2/3?P+(A-P)*(2/3-B)*6:P}if(E===0)k=C=I=b;else{var w=b<.5?b*(1+E):b+E-b*E,N=2*b-w;k=T(N,w,S+1/3),C=T(N,w,S),I=T(N,w,S-1/3)}return[k*255,C*255,I*255]}t.hslToRgb=u;function c(S,E,b){S/=255,E/=255,b/=255,S=S>.04045?Math.pow((S+.005)/1.055,2.4):S/12.92,E=E>.04045?Math.pow((E+.005)/1.055,2.4):E/12.92,b=b>.04045?Math.pow((b+.005)/1.055,2.4):b/12.92,S*=100,E*=100,b*=100;var k=S*.4124+E*.3576+b*.1805,C=S*.2126+E*.7152+b*.0722,I=S*.0193+E*.1192+b*.9505;return[k,C,I]}t.rgbToXyz=c;function d(S,E,b){var k=95.047,C=100,I=108.883;S/=k,E/=C,b/=I,S=S>.008856?Math.pow(S,1/3):7.787*S+16/116,E=E>.008856?Math.pow(E,1/3):7.787*E+16/116,b=b>.008856?Math.pow(b,1/3):7.787*b+16/116;var T=116*E-16,w=500*(S-E),N=200*(E-b);return[T,w,N]}t.xyzToCIELab=d;function f(S,E,b){var k=c(S,E,b),C=k[0],I=k[1],T=k[2];return d(C,I,T)}t.rgbToCIELab=f;function m(S,E){var b=1,k=1,C=1,I=S[0],T=S[1],w=S[2],N=E[0],P=E[1],A=E[2],B=I-N,X=T-P,Q=w-A,Z=Math.sqrt(T*T+w*w),q=Math.sqrt(P*P+A*A),de=N-I,me=q-Z,ve=Math.sqrt(B*B+X*X+Q*Q),ye=Math.sqrt(ve)>Math.sqrt(Math.abs(de))+Math.sqrt(Math.abs(me))?Math.sqrt(ve*ve-de*de-me*me):0,G=1+.045*Z,te=1+.015*Z;return de/=b,me/=k*G,ye/=C*te,Math.sqrt(de*de+me*me+ye*ye)}t.deltaE94=m;function g(S,E){var b=f.apply(void 0,S),k=f.apply(void 0,E);return m(b,k)}t.rgbDiff=g;function v(S,E){var b=r(S),k=r(E);return g(b,k)}t.hexDiff=v;function y(S){return S-1&&i%1==0&&i-1&&r%1==0&&r<=t}return isLength_1=n,isLength_1}var _baseIsTypedArray,hasRequired_baseIsTypedArray;function require_baseIsTypedArray(){if(hasRequired_baseIsTypedArray)return _baseIsTypedArray;hasRequired_baseIsTypedArray=1;var t=require_baseGetTag(),n=requireIsLength(),r=requireIsObjectLike(),i="[object Arguments]",o="[object Array]",u="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Function]",m="[object Map]",g="[object Number]",v="[object Object]",y="[object RegExp]",x="[object Set]",S="[object String]",E="[object WeakMap]",b="[object ArrayBuffer]",k="[object DataView]",C="[object Float32Array]",I="[object Float64Array]",T="[object Int8Array]",w="[object Int16Array]",N="[object Int32Array]",P="[object Uint8Array]",A="[object Uint8ClampedArray]",B="[object Uint16Array]",X="[object Uint32Array]",Q={};Q[C]=Q[I]=Q[T]=Q[w]=Q[N]=Q[P]=Q[A]=Q[B]=Q[X]=!0,Q[i]=Q[o]=Q[b]=Q[u]=Q[k]=Q[c]=Q[d]=Q[f]=Q[m]=Q[g]=Q[v]=Q[y]=Q[x]=Q[S]=Q[E]=!1;function Z(q){return r(q)&&n(q.length)&&!!Q[t(q)]}return _baseIsTypedArray=Z,_baseIsTypedArray}var _baseUnary,hasRequired_baseUnary;function require_baseUnary(){if(hasRequired_baseUnary)return _baseUnary;hasRequired_baseUnary=1;function t(n){return function(r){return n(r)}}return _baseUnary=t,_baseUnary}var _nodeUtil={exports:{}};_nodeUtil.exports;var hasRequired_nodeUtil;function require_nodeUtil(){return hasRequired_nodeUtil||(hasRequired_nodeUtil=1,function(t,n){var r=require_freeGlobal(),i=n&&!n.nodeType&&n,o=i&&!0&&t&&!t.nodeType&&t,u=o&&o.exports===i,c=u&&r.process,d=function(){try{var f=o&&o.require&&o.require("util").types;return f||c&&c.binding&&c.binding("util")}catch{}}();t.exports=d}(_nodeUtil,_nodeUtil.exports)),_nodeUtil.exports}var isTypedArray_1,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray_1;hasRequiredIsTypedArray=1;var t=require_baseIsTypedArray(),n=require_baseUnary(),r=require_nodeUtil(),i=r&&r.isTypedArray,o=i?n(i):t;return isTypedArray_1=o,isTypedArray_1}var _arrayLikeKeys,hasRequired_arrayLikeKeys;function require_arrayLikeKeys(){if(hasRequired_arrayLikeKeys)return _arrayLikeKeys;hasRequired_arrayLikeKeys=1;var t=require_baseTimes(),n=requireIsArguments(),r=requireIsArray(),i=requireIsBuffer(),o=require_isIndex(),u=requireIsTypedArray(),c=Object.prototype,d=c.hasOwnProperty;function f(m,g){var v=r(m),y=!v&&n(m),x=!v&&!y&&i(m),S=!v&&!y&&!x&&u(m),E=v||y||x||S,b=E?t(m.length,String):[],k=b.length;for(var C in m)(g||d.call(m,C))&&!(E&&(C=="length"||x&&(C=="offset"||C=="parent")||S&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||o(C,k)))&&b.push(C);return b}return _arrayLikeKeys=f,_arrayLikeKeys}var _isPrototype,hasRequired_isPrototype;function require_isPrototype(){if(hasRequired_isPrototype)return _isPrototype;hasRequired_isPrototype=1;var t=Object.prototype;function n(r){var i=r&&r.constructor,o=typeof i=="function"&&i.prototype||t;return r===o}return _isPrototype=n,_isPrototype}var _overArg,hasRequired_overArg;function require_overArg(){if(hasRequired_overArg)return _overArg;hasRequired_overArg=1;function t(n,r){return function(i){return n(r(i))}}return _overArg=t,_overArg}var _nativeKeys,hasRequired_nativeKeys;function require_nativeKeys(){if(hasRequired_nativeKeys)return _nativeKeys;hasRequired_nativeKeys=1;var t=require_overArg(),n=t(Object.keys,Object);return _nativeKeys=n,_nativeKeys}var _baseKeys,hasRequired_baseKeys;function require_baseKeys(){if(hasRequired_baseKeys)return _baseKeys;hasRequired_baseKeys=1;var t=require_isPrototype(),n=require_nativeKeys(),r=Object.prototype,i=r.hasOwnProperty;function o(u){if(!t(u))return n(u);var c=[];for(var d in Object(u))i.call(u,d)&&d!="constructor"&&c.push(d);return c}return _baseKeys=o,_baseKeys}var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function t(n){var r=typeof n;return n!=null&&(r=="object"||r=="function")}return isObject_1=t,isObject_1}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var t=require_baseGetTag(),n=requireIsObject(),r="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",u="[object Proxy]";function c(d){if(!n(d))return!1;var f=t(d);return f==i||f==o||f==r||f==u}return isFunction_1=c,isFunction_1}var isArrayLike_1,hasRequiredIsArrayLike;function requireIsArrayLike(){if(hasRequiredIsArrayLike)return isArrayLike_1;hasRequiredIsArrayLike=1;var t=requireIsFunction(),n=requireIsLength();function r(i){return i!=null&&n(i.length)&&!t(i)}return isArrayLike_1=r,isArrayLike_1}var keys_1,hasRequiredKeys;function requireKeys(){if(hasRequiredKeys)return keys_1;hasRequiredKeys=1;var t=require_arrayLikeKeys(),n=require_baseKeys(),r=requireIsArrayLike();function i(o){return r(o)?t(o):n(o)}return keys_1=i,keys_1}var _baseForOwn,hasRequired_baseForOwn;function require_baseForOwn(){if(hasRequired_baseForOwn)return _baseForOwn;hasRequired_baseForOwn=1;var t=require_baseFor(),n=requireKeys();function r(i,o){return i&&t(i,o,n)}return _baseForOwn=r,_baseForOwn}var _createBaseEach,hasRequired_createBaseEach;function require_createBaseEach(){if(hasRequired_createBaseEach)return _createBaseEach;hasRequired_createBaseEach=1;var t=requireIsArrayLike();function n(r,i){return function(o,u){if(o==null)return o;if(!t(o))return r(o,u);for(var c=o.length,d=i?c:-1,f=Object(o);(i?d--:++d-1}return _listCacheHas=n,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var t=require_assocIndexOf();function n(r,i){var o=this.__data__,u=t(o,r);return u<0?(++this.size,o.push([r,i])):o[u][1]=i,this}return _listCacheSet=n,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var t=require_listCacheClear(),n=require_listCacheDelete(),r=require_listCacheGet(),i=require_listCacheHas(),o=require_listCacheSet();function u(c){var d=-1,f=c==null?0:c.length;for(this.clear();++dx))return!1;var E=v.get(c),b=v.get(d);if(E&&b)return E==d&&b==c;var k=-1,C=!0,I=f&o?new t:void 0;for(v.set(c,d),v.set(d,c);++k0&&this._opts.filters.splice(c),this},o.prototype.clearFilters=function(){return this._opts.filters=[],this},o.prototype.quality=function(u){return this._opts.quality=u,this},o.prototype.useImageClass=function(u){return this._opts.ImageClass=u,this},o.prototype.useGenerator=function(u){return this._opts.generator=u,this},o.prototype.useQuantizer=function(u){return this._opts.quantizer=u,this},o.prototype.build=function(){return new n.default(this._src,this._opts)},o.prototype.getPalette=function(u){return this.build().getPalette(u)},o.prototype.getSwatches=function(u){return this.build().getPalette(u)},o}();return builder.default=i,builder}var quantizer={},mmcq={},vbox={},hasRequiredVbox;function requireVbox(){if(hasRequiredVbox)return vbox;hasRequiredVbox=1,Object.defineProperty(vbox,"__esModule",{value:!0});var t=requireUtil$1(),n=function(){function r(i,o,u,c,d,f,m){this._volume=-1,this._count=-1,this.dimension={r1:i,r2:o,g1:u,g2:c,b1:d,b2:f},this.hist=m}return r.build=function(i,o){var u=1<<3*t.SIGBITS,c=new Uint32Array(u),d,f,m,g,v,y,x,S,E,b;d=m=v=0,f=g=y=Number.MAX_VALUE;for(var k=i.length/4,C=0;C>t.RSHIFT,S=S>>t.RSHIFT,E=E>>t.RSHIFT;var T=t.getColorIndex(x,S,E);c[T]+=1,x>d&&(d=x),xm&&(m=S),Sv&&(v=E),E>=t.RSHIFT,u>>=t.RSHIFT,c>>=t.RSHIFT,o>=f&&o<=m&&u>=g&&u<=v&&c>=y&&c<=x},r.prototype.split=function(){var i=this.hist,o=this.dimension,u=o.r1,c=o.r2,d=o.g1,f=o.g2,m=o.b1,g=o.b2,v=this.count();if(!v)return[];if(v===1)return[this.clone()];var y=c-u+1,x=f-d+1,S=g-m+1,E=Math.max(y,x,S),b=null,k,C;k=C=0;var I=null;if(E===y){I="r",b=new Uint32Array(c+1);for(var T=u;T<=c;T++){k=0;for(var w=d;w<=f;w++)for(var N=m;N<=g;N++){var P=t.getColorIndex(T,w,N);k+=i[P]}C+=k,b[T]=C}}else if(E===x){I="g",b=new Uint32Array(f+1);for(var w=d;w<=f;w++){k=0;for(var T=u;T<=c;T++)for(var N=m;N<=g;N++){var P=t.getColorIndex(T,w,N);k+=i[P]}C+=k,b[w]=C}}else{I="b",b=new Uint32Array(g+1);for(var N=m;N<=g;N++){k=0;for(var T=u;T<=c;T++)for(var w=d;w<=f;w++){var P=t.getColorIndex(T,w,N);k+=i[P]}C+=k,b[N]=C}}for(var A=-1,B=new Uint32Array(b.length),X=0;XC/2&&(A=X),B[X]=C-Q}var Z=this;function q(de){var me=de+"1",ve=de+"2",ye=Z.dimension[me],G=Z.dimension[ve],te=Z.clone(),H=Z.clone(),F=A-ye,M=G-A;for(F<=M?(G=Math.min(G-1,~~(A+M/2)),G=Math.max(0,G)):(G=Math.max(ye,~~(A-1-F/2)),G=Math.min(Z.dimension[ve],G));!b[G];)G++;for(var ne=B[G];!ne&&b[G-1];)ne=B[--G];return te.dimension[ve]=G,H.dimension[me]=G+1,[te,H]}return q(I)},r}();return vbox.default=n,vbox}var pqueue={},hasRequiredPqueue;function requirePqueue(){if(hasRequiredPqueue)return pqueue;hasRequiredPqueue=1,Object.defineProperty(pqueue,"__esModule",{value:!0});var t=function(){function n(r){this._comparator=r,this.contents=[],this._sorted=!1}return n.prototype._sort=function(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)},n.prototype.push=function(r){this.contents.push(r),this._sorted=!1},n.prototype.peek=function(r){return this._sort(),r=typeof r=="number"?r:this.contents.length-1,this.contents[r]},n.prototype.pop=function(){return this._sort(),this.contents.pop()},n.prototype.size=function(){return this.contents.length},n.prototype.map=function(r){return this._sort(),this.contents.map(r)},n}();return pqueue.default=t,pqueue}var hasRequiredMmcq;function requireMmcq(){if(hasRequiredMmcq)return mmcq;hasRequiredMmcq=1;var t=mmcq&&mmcq.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(mmcq,"__esModule",{value:!0});var n=requireColor(),r=t(requireVbox()),i=t(requirePqueue()),o=.75;function u(f,m){for(var g=f.size();f.size()0){var y=v.split(),x=y[0],S=y[1];if(f.push(x),S&&S.count()>0&&f.push(S),f.size()===g)break;g=f.size()}else break}}var c=function(f,m){if(f.length===0||m.colorCount<2||m.colorCount>256)throw new Error("Wrong MMCQ parameters");var g=r.default.build(f),v=g.hist;Object.keys(v).length;var y=new i.default(function(S,E){return S.count()-E.count()});y.push(g),u(y,o*m.colorCount);var x=new i.default(function(S,E){return S.count()*S.volume()-E.count()*E.volume()});return x.contents=y.contents,u(x,m.colorCount-x.size()),d(x)};function d(f){for(var m=[];f.size();){var g=f.pop(),v=g.avg();v[0],v[1],v[2],m.push(new n.Swatch(v,g.count()))}return m}return mmcq.default=c,mmcq}var hasRequiredQuantizer;function requireQuantizer(){return hasRequiredQuantizer||(hasRequiredQuantizer=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WebWorker=void 0;var n=requireMmcq();Object.defineProperty(t,"MMCQ",{enumerable:!0,get:function(){return n.default}}),t.WebWorker=null}(quantizer)),quantizer}var generator={},_default$1={},_apply,hasRequired_apply;function require_apply(){if(hasRequired_apply)return _apply;hasRequired_apply=1;function t(n,r,i){switch(i.length){case 0:return n.call(r);case 1:return n.call(r,i[0]);case 2:return n.call(r,i[0],i[1]);case 3:return n.call(r,i[0],i[1],i[2])}return n.apply(r,i)}return _apply=t,_apply}var _overRest,hasRequired_overRest;function require_overRest(){if(hasRequired_overRest)return _overRest;hasRequired_overRest=1;var t=require_apply(),n=Math.max;function r(i,o,u){return o=n(o===void 0?i.length-1:o,0),function(){for(var c=arguments,d=-1,f=n(c.length-o,0),m=Array(f);++d0){if(++u>=t)return arguments[0]}else u=0;return o.apply(void 0,arguments)}}return _shortOut=i,_shortOut}var _setToString,hasRequired_setToString;function require_setToString(){if(hasRequired_setToString)return _setToString;hasRequired_setToString=1;var t=require_baseSetToString(),n=require_shortOut(),r=n(t);return _setToString=r,_setToString}var _baseRest,hasRequired_baseRest;function require_baseRest(){if(hasRequired_baseRest)return _baseRest;hasRequired_baseRest=1;var t=requireIdentity(),n=require_overRest(),r=require_setToString();function i(o,u){return r(n(o,u,t),o+"")}return _baseRest=i,_baseRest}var _isIterateeCall,hasRequired_isIterateeCall;function require_isIterateeCall(){if(hasRequired_isIterateeCall)return _isIterateeCall;hasRequired_isIterateeCall=1;var t=requireEq(),n=requireIsArrayLike(),r=require_isIndex(),i=requireIsObject();function o(u,c,d){if(!i(d))return!1;var f=typeof c;return(f=="number"?n(d)&&r(c,d.length):f=="string"&&c in d)?t(d[c],u):!1}return _isIterateeCall=o,_isIterateeCall}var defaults_1,hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults_1;hasRequiredDefaults=1;var t=require_baseRest(),n=requireEq(),r=require_isIterateeCall(),i=requireKeysIn(),o=Object.prototype,u=o.hasOwnProperty,c=t(function(d,f){d=Object(d);var m=-1,g=f.length,v=g>2?f[2]:void 0;for(v&&r(f[0],f[1],v)&&(g=1);++m=C&&B<=I&&X>=E&&X<=b&&!u(v,P)){var Q=c(B,k,X,S,P.getPopulation(),x,T);(w===null||Q>N)&&(w=P,N=Q)}}),w}function f(v,y,x){var S={};return S.Vibrant=d(S,v,y,x.targetNormalLuma,x.minNormalLuma,x.maxNormalLuma,x.targetVibrantSaturation,x.minVibrantSaturation,1,x),S.LightVibrant=d(S,v,y,x.targetLightLuma,x.minLightLuma,1,x.targetVibrantSaturation,x.minVibrantSaturation,1,x),S.DarkVibrant=d(S,v,y,x.targetDarkLuma,0,x.maxDarkLuma,x.targetVibrantSaturation,x.minVibrantSaturation,1,x),S.Muted=d(S,v,y,x.targetNormalLuma,x.minNormalLuma,x.maxNormalLuma,x.targetMutesSaturation,0,x.maxMutesSaturation,x),S.LightMuted=d(S,v,y,x.targetLightLuma,x.minLightLuma,1,x.targetMutesSaturation,0,x.maxMutesSaturation,x),S.DarkMuted=d(S,v,y,x.targetDarkLuma,0,x.maxDarkLuma,x.targetMutesSaturation,0,x.maxMutesSaturation,x),S}function m(v,y,x){if(v.Vibrant===null&&v.DarkVibrant===null&&v.LightVibrant===null){if(v.DarkVibrant===null&&v.DarkMuted!==null){var S=v.DarkMuted.getHsl(),E=S[0],b=S[1],k=S[2];k=x.targetDarkLuma,v.DarkVibrant=new t.Swatch(n.hslToRgb(E,b,k),0)}if(v.LightVibrant===null&&v.LightMuted!==null){var C=v.LightMuted.getHsl(),E=C[0],b=C[1],k=C[2];k=x.targetDarkLuma,v.DarkVibrant=new t.Swatch(n.hslToRgb(E,b,k),0)}}if(v.Vibrant===null&&v.DarkVibrant!==null){var I=v.DarkVibrant.getHsl(),E=I[0],b=I[1],k=I[2];k=x.targetNormalLuma,v.Vibrant=new t.Swatch(n.hslToRgb(E,b,k),0)}else if(v.Vibrant===null&&v.LightVibrant!==null){var T=v.LightVibrant.getHsl(),E=T[0],b=T[1],k=T[2];k=x.targetNormalLuma,v.Vibrant=new t.Swatch(n.hslToRgb(E,b,k),0)}if(v.DarkVibrant===null&&v.Vibrant!==null){var w=v.Vibrant.getHsl(),E=w[0],b=w[1],k=w[2];k=x.targetDarkLuma,v.DarkVibrant=new t.Swatch(n.hslToRgb(E,b,k),0)}if(v.LightVibrant===null&&v.Vibrant!==null){var N=v.Vibrant.getHsl(),E=N[0],b=N[1],k=N[2];k=x.targetLightLuma,v.LightVibrant=new t.Swatch(n.hslToRgb(E,b,k),0)}if(v.Muted===null&&v.Vibrant!==null){var P=v.Vibrant.getHsl(),E=P[0],b=P[1],k=P[2];k=x.targetMutesSaturation,v.Muted=new t.Swatch(n.hslToRgb(E,b,k),0)}if(v.DarkMuted===null&&v.DarkVibrant!==null){var A=v.DarkVibrant.getHsl(),E=A[0],b=A[1],k=A[2];k=x.targetMutesSaturation,v.DarkMuted=new t.Swatch(n.hslToRgb(E,b,k),0)}if(v.LightMuted===null&&v.LightVibrant!==null){var B=v.LightVibrant.getHsl(),E=B[0],b=B[1],k=B[2];k=x.targetMutesSaturation,v.LightMuted=new t.Swatch(n.hslToRgb(E,b,k),0)}}var g=function(v,y){y=r({},y,i);var x=o(v),S=f(v,x,y);return m(S,x,y),S};return _default$1.default=g,_default$1}var hasRequiredGenerator;function requireGenerator(){return hasRequiredGenerator||(hasRequiredGenerator=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});var n=require_default$1();Object.defineProperty(t,"Default",{enumerable:!0,get:function(){return n.default}})}(generator)),generator}var filter={},_default={},hasRequired_default;function require_default(){if(hasRequired_default)return _default;hasRequired_default=1,Object.defineProperty(_default,"__esModule",{value:!0});function t(n,r,i,o){return o>=125&&!(n>250&&r>250&&i>250)}return _default.default=t,_default}var hasRequiredFilter;function requireFilter(){return hasRequiredFilter||(hasRequiredFilter=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.combineFilters=void 0;var n=require_default();Object.defineProperty(t,"Default",{enumerable:!0,get:function(){return n.default}});function r(i){return!Array.isArray(i)||i.length===0?null:function(o,u,c,d){if(d===0)return!1;for(var f=0;f0){var c=Math.max(i,o);c>r.maxDimension&&(u=r.maxDimension/c)}else u=1/r.quality;u<1&&this.resize(i*u,o*u,u)},n.prototype.applyFilter=function(r){var i=this.getImageData();if(typeof r=="function")for(var o=i.data,u=o.length/4,c=void 0,d=void 0,f=void 0,m=void 0,g=void 0,v=0;v= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=f-m,w=Math.floor,N=String.fromCharCode,P;function A(H){throw RangeError(I[H])}function B(H,F){for(var M=H.length,ne=[];M--;)ne[M]=F(H[M]);return ne}function X(H,F){var M=H.split("@"),ne="";M.length>1&&(ne=M[0]+"@",H=M[1]),H=H.replace(C,".");var z=H.split("."),ie=B(z,F).join(".");return ne+ie}function Q(H){for(var F=[],M=0,ne=H.length,z,ie;M=55296&&z<=56319&&M65535&&(F-=65536,M+=N(F>>>10&1023|55296),F=56320|F&1023),M+=N(F),M}).join("")}function q(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:f}function de(H,F){return H+22+75*(H<26)-((F!=0)<<5)}function me(H,F,M){var ne=0;for(H=M?w(H/y):H>>1,H+=w(H/F);H>T*g>>1;ne+=f)H=w(H/T);return w(ne+(T+1)*H/(H+v))}function ve(H){var F=[],M=H.length,ne,z=0,ie=S,se=x,J,re,he,Se,Ee,Ae,Pe,ze,_e;for(J=H.lastIndexOf(E),J<0&&(J=0),re=0;re=128&&A("not-basic"),F.push(H.charCodeAt(re));for(he=J>0?J+1:0;he=M&&A("invalid-input"),Pe=q(H.charCodeAt(he++)),(Pe>=f||Pe>w((d-z)/Ee))&&A("overflow"),z+=Pe*Ee,ze=Ae<=se?m:Ae>=se+g?g:Ae-se,!(Pew(d/_e)&&A("overflow"),Ee*=_e;ne=F.length+1,se=me(z-Se,ne,Se==0),w(z/ne)>d-ie&&A("overflow"),ie+=w(z/ne),z%=ne,F.splice(z++,0,ie)}return Z(F)}function ye(H){var F,M,ne,z,ie,se,J,re,he,Se,Ee,Ae=[],Pe,ze,_e,Ze;for(H=Q(H),Pe=H.length,F=S,M=0,ie=x,se=0;se=F&&Eew((d-M)/ze)&&A("overflow"),M+=(J-F)*ze,F=J,se=0;sed&&A("overflow"),Ee==F){for(re=M,he=f;Se=he<=ie?m:he>=ie+g?g:he-ie,!(re0&&f>d&&(f=d);for(var m=0;m=0?(y=g.substr(0,v),x=g.substr(v+1)):(y=g,x=""),S=decodeURIComponent(y),E=decodeURIComponent(x),t(u,S)?Array.isArray(u[S])?u[S].push(E):u[S]=[u[S],E]:u[S]=E}return u},decode}var encode,hasRequiredEncode;function requireEncode(){if(hasRequiredEncode)return encode;hasRequiredEncode=1;var t=function(n){switch(typeof n){case"string":return n;case"boolean":return n?"true":"false";case"number":return isFinite(n)?n:"";default:return""}};return encode=function(n,r,i,o){return r=r||"&",i=i||"=",n===null&&(n=void 0),typeof n=="object"?Object.keys(n).map(function(u){var c=encodeURIComponent(t(u))+i;return Array.isArray(n[u])?n[u].map(function(d){return c+encodeURIComponent(t(d))}).join(r):c+encodeURIComponent(t(n[u]))}).join(r):o?encodeURIComponent(t(o))+i+encodeURIComponent(t(n)):""},encode}var hasRequiredQuerystring;function requireQuerystring(){return hasRequiredQuerystring||(hasRequiredQuerystring=1,querystring.decode=querystring.parse=requireDecode(),querystring.encode=querystring.stringify=requireEncode()),querystring}var hasRequiredUrl;function requireUrl(){if(hasRequiredUrl)return url;hasRequiredUrl=1;var t=requirePunycode(),n=requireUtil();url.parse=C,url.resolve=T,url.resolveObject=w,url.format=I,url.Url=r;function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r",` `," "],d=["{","}","|","\\","^","`"].concat(c),f=["'"].concat(d),m=["%","/","?",";","#"].concat(f),g=["/","?","#"],v=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,x=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,S={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=requireQuerystring();function C(N,P,A){if(N&&n.isObject(N)&&N instanceof r)return N;var B=new r;return B.parse(N,P,A),B}r.prototype.parse=function(N,P,A){if(!n.isString(N))throw new TypeError("Parameter 'url' must be a string, not "+typeof N);var B=N.indexOf("?"),X=B!==-1&&B127?J+="x":J+=se[re];if(!J.match(y)){var Se=z.slice(0,te),Ee=z.slice(te+1),Ae=se.match(x);Ae&&(Se.push(Ae[1]),Ee.unshift(Ae[2])),Ee.length&&(q="/"+Ee.join(".")+q),this.hostname=Se.join(".");break}}}this.hostname.length>v?this.hostname="":this.hostname=this.hostname.toLowerCase(),ne||(this.hostname=t.toASCII(this.hostname));var Pe=this.port?":"+this.port:"",ze=this.hostname||"";this.host=ze+Pe,this.href+=this.host,ne&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),q[0]!=="/"&&(q="/"+q))}if(!S[ve])for(var te=0,ie=f.length;te0?A.host.split("@"):!1;J&&(A.auth=J.shift(),A.host=A.hostname=J.shift())}return A.search=N.search,A.query=N.query,(!n.isNull(A.pathname)||!n.isNull(A.search))&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.href=A.format(),A}if(!z.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var re=z.slice(-1)[0],he=(A.host||N.host||z.length>1)&&(re==="."||re==="..")||re==="",Se=0,Ee=z.length;Ee>=0;Ee--)re=z[Ee],re==="."?z.splice(Ee,1):re===".."?(z.splice(Ee,1),Se++):Se&&(z.splice(Ee,1),Se--);if(!M&&!ne)for(;Se--;Se)z.unshift("..");M&&z[0]!==""&&(!z[0]||z[0].charAt(0)!=="/")&&z.unshift(""),he&&z.join("/").substr(-1)!=="/"&&z.push("");var Ae=z[0]===""||z[0]&&z[0].charAt(0)==="/";if(se){A.hostname=A.host=Ae?"":z.length?z.shift():"";var J=A.host&&A.host.indexOf("@")>0?A.host.split("@"):!1;J&&(A.auth=J.shift(),A.host=A.hostname=J.shift())}return M=M||A.host&&z.length,M&&!Ae&&z.unshift(""),z.length?A.pathname=z.join("/"):(A.pathname=null,A.path=null),(!n.isNull(A.pathname)||!n.isNull(A.search))&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.auth=N.auth||A.auth,A.slashes=A.slashes||N.slashes,A.href=A.format(),A},r.prototype.parseHost=function(){var N=this.host,P=o.exec(N);P&&(P=P[0],P!==":"&&(this.port=P.substr(1)),N=N.substr(0,N.length-P.length)),N&&(this.hostname=N)},url}var hasRequiredBrowser$1;function requireBrowser$1(){if(hasRequiredBrowser$1)return browser$1;hasRequiredBrowser$1=1;var t=browser$1&&browser$1.__extends||function(){var m=function(g,v){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var S in x)x.hasOwnProperty(S)&&(y[S]=x[S])},m(g,v)};return function(g,v){m(g,v);function y(){this.constructor=g}g.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}(),n=browser$1&&browser$1.__createBinding||(Object.create?function(m,g,v,y){y===void 0&&(y=v),Object.defineProperty(m,y,{enumerable:!0,get:function(){return g[v]}})}:function(m,g,v,y){y===void 0&&(y=v),m[y]=g[v]}),r=browser$1&&browser$1.__setModuleDefault||(Object.create?function(m,g){Object.defineProperty(m,"default",{enumerable:!0,value:g})}:function(m,g){m.default=g}),i=browser$1&&browser$1.__importStar||function(m){if(m&&m.__esModule)return m;var g={};if(m!=null)for(var v in m)v!=="default"&&Object.hasOwnProperty.call(m,v)&&n(g,m,v);return r(g,m),g};Object.defineProperty(browser$1,"__esModule",{value:!0});var o=requireBase(),u=i(requireUrl());function c(m){var g=u.parse(m);return g.protocol===null&&g.host===null&&g.port===null}function d(m,g){var v=u.parse(m),y=u.parse(g);return v.protocol===y.protocol&&v.hostname===y.hostname&&v.port===y.port}var f=function(m){t(g,m);function g(){return m!==null&&m.apply(this,arguments)||this}return g.prototype._initCanvas=function(){var v=this.image,y=this._canvas=document.createElement("canvas"),x=this._context=y.getContext("2d");y.className="vibrant-canvas",y.style.display="none",this._width=y.width=v.width,this._height=y.height=v.height,x.drawImage(v,0,0),document.body.appendChild(y)},g.prototype.load=function(v){var y=this,x=null,S=null;if(typeof v=="string")x=document.createElement("img"),!c(v)&&!d(window.location.href,v)&&(x.crossOrigin="anonymous"),S=x.src=v;else if(v instanceof HTMLImageElement)x=v,S=v.src;else return Promise.reject(new Error("Cannot load buffer as an image in browser"));return this.image=x,new Promise(function(E,b){var k=function(){y._initCanvas(),E(y)};x.complete?k():(x.onload=k,x.onerror=function(C){return b(new Error("Fail to load image: "+S))})})},g.prototype.clear=function(){this._context.clearRect(0,0,this._width,this._height)},g.prototype.update=function(v){this._context.putImageData(v,0,0)},g.prototype.getWidth=function(){return this._width},g.prototype.getHeight=function(){return this._height},g.prototype.resize=function(v,y,x){var S=this,E=S._canvas,b=S._context,k=S.image;this._width=E.width=v,this._height=E.height=y,b.scale(x,x),b.drawImage(k,0,0)},g.prototype.getPixelCount=function(){return this._width*this._height},g.prototype.getImageData=function(){return this._context.getImageData(0,0,this._width,this._height)},g.prototype.remove=function(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)},g}(o.ImageBase);return browser$1.default=f,browser$1}var browser,hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;var t=browser&&browser.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=t(requireVibrant()),r=t(requireBrowser$1());return n.default.DefaultOpts.ImageClass=r.default,browser=n.default,browser}var browserExports=requireBrowser();const Vibrant=getDefaultExportFromCjs(browserExports);var utilExports=requireUtil$1();async function getDominantColor(t){try{const n=await new Vibrant(t,{colorCount:4}).getPalette();return Object.values(n).filter(isPresent).sort((i,o)=>o.population-i.population)[0]}catch(n){return console.warn(`${getDominantColor.name}Error`,n),null}}function useDominantColor(t,n={height:100}){const[r,i]=reactExports.useState(null);return reactExports.useEffect(()=>{const o=document.createElement("img");o.className="absolute hidden",o.crossOrigin="anonymous",o.src=imageUrl(t,n),o.addEventListener("load",u);async function u(){const c=await getDominantColor(o);i((c==null?void 0:c.bodyTextColor)==="#fff"?"text-gray-200":"text-gray-800")}return document.body.appendChild(o),()=>{document.body.removeChild(o),o.removeEventListener("load",u)}},[t,n]),r}function getVariantImages(t){var n,r,i,o;return[t,(n=t.image_2)==null?void 0:n.reference,(r=t.image_3)==null?void 0:r.reference,(i=t.image_4)==null?void 0:i.reference,(o=t.image_5)==null?void 0:o.reference].filter(isMediaImage).map(u=>u.image)}function getShadowColor(t){const n=utilExports.hexToRgb(t);if(!n)return null;const[r,i,o]=n,u=Math.floor((r+i+o)/3);return u>200?"shadow-4-25":u>60?"shadow-4-70":"shadow-4-100"}function getGalleryOverrides(t,n){var i;const r=(i=t.gallery_overrides)==null?void 0:i.reference;return r?n.map((o,u)=>{var d,f;const c=(d=r[`image_${u+1}`])==null?void 0:d.reference;return!c||!("image"in c)||(f=c.image)!=null&&f.url.includes("1x1")?o:c.image??o}):n}const CountryContext=reactExports.createContext({country:getDefaultCountry(),setCountry:t=>{}});function useCountry(){return reactExports.useContext(CountryContext).country}class CountryProvider extends React.Component{constructor(){super(...arguments),this.state={country:getDefaultCountry(),setCountry:n=>{this.setState({country:n})}}}render(){return jsxRuntimeExports.jsx(CountryContext.Provider,{value:this.state,children:this.props.children})}}function useMarket(){const t=useSelector(o=>o.markets),r=useCountry().iso_code;return r==="EU"?t==null?void 0:t.filter(o=>o.currency==="EUR").sort((o,u)=>u.countries.length-o.countries.length).pop():t==null?void 0:t.find(o=>o.countries.includes(r))}const CartActions={loadCart:makeActionCreator()("CART_FETCH"),cartFetched:makeActionCreator()("CART_FETCHED"),cartLoaded:makeActionCreator()("CART_LOAD_SUCCESS"),cartUpsellsLoaded:makeActionCreator()("CART_UPSELLS_LOAD_SUCCESS"),addToCart:makeActionCreator()("CART_ADD",{optimistic:!0}),updateQuantity:makeActionCreator()("CART_QUANTITY_UPDATE",{optimistic:!0}),removeFromCart:makeMetaActionCreator()("CART_REMOVE",{optimistic:!0}),updateCartSucess:makeActionCreator()("CART_UPDATE_SUCCESS"),updateCartError:makeActionCreator()("CART_UPDATE_ERROR"),updateCartCountry:makeActionCreator()("CART_COUNTRY_UPDATE"),updateCartCountrySuccesss:makeActionCreator()("CART_COUNTRY_UPDATE_SUCCESS"),updateCartBuyerIdentity:makeActionCreator()("CART_BUYER_IDENTITY_UPDATE"),openCart:makeActionCreator()("CART_OPEN"),addUpsell:makeActionCreator()("UPSELL_ADD"),removeUpsell:makeMetaActionCreator()("UPSELL_REMOVE"),updateUpsell:makeActionCreator()("UPSELL_UPDATE"),loadDeliveryProfiles:makeActionCreator()("SHIPPING_SETTINGS_LOAD"),deliveryProfilesLoaded:makeActionCreator()("SHIPPING_SETTINGS_LOAD_SUCCESS"),loadMarkets:makeActionCreator()("MARKETS_LOAD"),marketsLoaded:makeActionCreator()("MARKETS_LOAD_SUCCESS")},ProductsActions={loadProducts:makeActionCreator()("PRODUCTS_LOAD"),productsLoaded:makeActionCreator()("PRODUCTS_LOAD_SUCCESS"),productsFailed:makeMetaActionCreator()("PRODUCTS_LOAD_ERROR"),loadUpsells:makeActionCreator()("UPSELL_LOAD"),upsellsLoaded:makeActionCreator()("UPSELL_LOAD_SUCCESS"),upsellsCartLoaded:makeActionCreator()("UPSELL_CART_LOAD_SUCCESS")},Actions$1={...CartActions,...ProductsActions},CONSTS={SUPPORT_LINK:"https://support.auk.com",DEV_EMAIL:"dev@auk.com"};function parse$1(t,n={}){if(!t)return null;t=t.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'");const r=()=>y==null?void 0:y.match(/[a-z]/i),i=w=>b(/<[a-z]/,2),o=w=>typeof w=="string"?b(``):b(/<\/[a-z]/,3),u=()=>y!==void 0,c=()=>b(/({{)|(}})/,2),d=()=>!i()&&!o()&&y!==void 0,f=()=>y?['"',"'"].includes(y):!1,m=()=>y==" ",g=t;let v=0,y=g[v++];try{const w=T();return E(!y,`unexpected input: ${y}`),typeof w=="string"?w:reactExports.createElement(reactExports.Fragment,null,w)}catch(w){return console.warn("ParserError",w),t}function x(){const w=y;if(v>g.length)throw new Error("Parser out of bounds");return y=g[v++],w}function S(w,N){for(;N(),y==w;)x()}function E(w,N){w||console.warn("Parser:",N,"while parsing",t)}function b(w,N=0){const P=v-1;if(typeof w=="string"){N=w.length;for(let A=0;A{for(;r();)w+=x();if(w.length!=0){for(S(" ",()=>{if(!r())return;let A="",B="";for(;r();)A+=x();y=="="?(x(),c()?B=k():B=C(()=>f()||m()||y==">")):B=!0,N[toReactProp(A)]=B}),E(y==">",`Expected >, not ${y}`),x(),P=T(),E(o(w),`Expected , not ${y}`);y!==">";)x();x()}}),w.length==0?null:reactExports.createElement(w,N,P)}function T(){const w=[];let N=0;for(;u()&&N++jsxRuntimeExports.jsx(Language.Provider,{value:t,children:n});function useLocale(){return reactExports.useContext(Language).shop_locale}function useTranslations(t,n){const[r,i]=reactExports.useState(null),o=useLocale().locale;return reactExports.useEffect(()=>{async function u(){const c=await loadTranslations(o,t,n);i(c)}u()},[o,t,n]),r}const cacheKey$1=(t,n,r)=>`${t}.${n}.${r&&JSON.stringify(r)})`,loadTranslations=memoize(__lt,cacheKey$1);async function __lt(t,n,r){const i=await loadLanguage(t);return parseTranslations(i,n,r)}function parseTranslations(t,n,r){const i=(n==null?void 0:n.split(".").length)??0,o=n?get(t,n):t;switch(i){case 0:return objectMap(o,u=>objectMap(u,c=>objectMap(c,d=>parse$1(d,r))));case 1:return objectMap(o,u=>objectMap(u,c=>parse$1(c,r)));case 2:return objectMap(o,u=>parse$1(u,r));default:return parse$1(o,r)}}const loadLanguage=memoize(__ll);async function __ll(t){return window.TRANSLATIONS}const Button=t=>{const{active:n,secondary:r,transparent:i,size:o,className:u,children:c,disabled:d,onDisabledClick:f,onClick:m,...g}=t,v=g.href?"a":"button";return jsxRuntimeExports.jsx(v,{className:cn("button select-none whitespace-nowrap rounded-full border-solid no-underline",r?cn("border-2 border-green-600 bg-white text-green-600",!d&&"hocus:text-green-500 hocus:border-green-500"):"bg-green hocus:bg-green-300 border-0 text-white",i&&"hocus:bg-gray-800 hocus:bg-opacity-5 bg-transparent text-inherit",d&&"opacity-50 saturate-[0.8]",getSizeClassnames(o),u,{active:n}),"aria-disabled":d,onClick:y=>d?f&&f(y):m&&m(y),...g,children:c})};function getSizeClassnames(t){switch(t){case"xs":return"text-base font-bold px-5 py-1 tracking-none";case"sm":return"text-sm font-bold px-6 py-3 tracking-[1.5px]";case"md":return"text-xl px-10 py-1.5 font-semibold";case"lg":return"text-xl";case"xl":return"text-xl tracking-[1.5px] font-bold p-5"}return"text-base"}const Bulb="/cdn/shop/t/42/assets/bulb.svg",Calendar="/cdn/shop/t/42/assets/calendar.svg",Capsule="/cdn/shop/t/42/assets/capsule.svg",Caret=({stroke:t="currentColor",...n})=>jsxRuntimeExports.jsx("svg",{viewBox:"0 0 7 5",fill:"none",height:"0.42em",xmlns:"http://www.w3.org/2000/svg",...n,children:jsxRuntimeExports.jsx("path",{d:"M0.5 1L3.5 4L6.5 1",stroke:t})}),CartIcon=({stroke:t="currentColor",fill:n="none",height:r="26px",className:i,...o})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:"none",className:cn("align-middle",i),height:r,stroke:t,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",viewBox:"0 0 22 16",...o,children:[jsxRuntimeExports.jsxs("mask",{id:"cart-mask",children:[jsxRuntimeExports.jsx("rect",{width:22,height:16,fill:"white"}),jsxRuntimeExports.jsx("circle",{cx:9.02,cy:13.88,r:1.63,fill:"black"}),jsxRuntimeExports.jsx("circle",{cx:17.74,cy:13.88,r:1.63,fill:"black"})]}),jsxRuntimeExports.jsx("path",{d:"m6.97 11.03-.81 1.07a.68.68 0 0 0 .46 1.09h11.95M.89.86H3.1l1.03 2.1",mask:"url(#cart-mask)"}),jsxRuntimeExports.jsx("path",{fill:n,d:"M21.3 2.97H4.14l2.94 8.06h11.28l2.94-8.06Z"}),jsxRuntimeExports.jsx("circle",{cx:9.02,cy:13.88,r:1.63,fill:n,stroke:"#3faf6d"}),jsxRuntimeExports.jsx("circle",{cx:17.74,cy:13.88,r:1.63,fill:n,stroke:"#3faf6d"})]}),Checkmark=t=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"#fff",viewBox:"0 0 12 8",height:"1em",...t,children:jsxRuntimeExports.jsx("path",{d:"M9.96.2 4.1 6.05 2.04 3.97a.6.6 0 0 0-.88 0 .6.6 0 0 0 0 .88l2.51 2.52a.6.6 0 0 0 .44.19c.2 0 .32-.07.44-.2l6.29-6.28a.6.6 0 0 0 0-.88.6.6 0 0 0-.88 0Z"})}),Chip="/cdn/shop/t/42/assets/chip.svg",Close=({className:t,height:n="1em",...r})=>jsxRuntimeExports.jsx("svg",{className:cn("align-middle",t),"aria-hidden":"true",focusable:"false",role:"presentation",viewBox:"0 0 16.8 16.8",width:n,height:n,fill:"currentColor",...r,children:jsxRuntimeExports.jsx("path",{d:"M16.8 1.5L15.4.1 8.4 7l-7-7L0 1.4l7 7-7 7 1.4 1.4 7-7 7 7 1.4-1.4-7-7z"})}),Coco="/cdn/shop/t/42/assets/coco.svg",CountryIcon=({isoCode:t})=>jsxRuntimeExports.jsx("span",{className:"text-4xl leading-none",children:jsxRuntimeExports.jsx("span",{className:`fi fi-${t.toLowerCase()} fis overflow-hidden rounded-full bg-cover align-middle`,children:jsxRuntimeExports.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-black opacity-15"})})}),Expand=t=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"currentColor",viewBox:"0 0 299 299",...t,children:jsxRuntimeExports.jsx("path",{d:"M43 192H0v107h107v-43H43zM0 107h43V43h64V0H0zM192 0v43h64v64h43V0zM256 256h-64v43h107V192h-43z"})}),GrownPlant="/cdn/shop/t/42/assets/grown%20plant.svg",Leaf=({fill:t="currentColor",height:n="1em",...r})=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",width:n,height:n,fill:t,...r,viewBox:"0 0 16 16",children:jsxRuntimeExports.jsx("path",{d:"M2.51 8.77a3.7 3.7 0 0 0 2.17.66c.5 0 1.07-.1 1.68-.28.36.38.63.84.79 1.33 0 1.08.35 3.62.37 3.66a.29.29 0 0 0 .53-.22c0-.03-.66-3.31-.07-4.95.78.24 1.5.36 2.16.36 1.04 0 1.97-.28 2.76-.84C15.83 6.45 16 1.43 16 1.22a.29.29 0 0 0-.31-.3c-3.59.3-6.06 1.39-7.36 3.25a5.7 5.7 0 0 0-.84 4.46c-.1.24-.17.49-.23.74a4.2 4.2 0 0 0-.46-.6c.1-.45.33-1.99-.67-3.42C5.1 3.89 3.19 3.05.4 2.82a.29.29 0 0 0-.31.3c0 .16.13 4.06 2.41 5.65ZM14.87 2.1a.3.3 0 0 1-.15.4 12.9 12.9 0 0 0-5.88 5.45.3.3 0 1 1-.52-.29 13.49 13.49 0 0 1 6.15-5.71.3.3 0 0 1 .4.15ZM6.18 8.4a.3.3 0 0 0 .5-.33 12 12 0 0 0-4.85-4.4.3.3 0 0 0-.25.54 11.4 11.4 0 0 1 4.6 4.2Z"})}),KlarnaIcon=({size:t="normal",...n})=>t==="small"?jsxRuntimeExports.jsx(KlarnaIconSmall,{...n}):jsxRuntimeExports.jsx(KlarnaIconMedium,{...n}),KlarnaIconMedium=t=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1512 325",height:"24",role:"img",...t,children:[jsxRuntimeExports.jsx("title",{children:"Klarna Payment Badge"}),jsxRuntimeExports.jsx("rect",{width:"1512",height:"325",fill:"#FFB3C7",rx:"93"}),jsxRuntimeExports.jsx("rect",{width:"30.02",height:"138.74",x:"-15.01",y:"-69.37",rx:".25",transform:"rotate(.02 -466142.95 2715156.52)"}),jsxRuntimeExports.jsx("rect",{width:"32",height:"138.8",x:"-16",y:"-69.4",rx:".3",transform:"translate(816.8 162.9)"}),jsxRuntimeExports.jsx("path",{d:"M881 93.5h30.7c.2 0 .4.1.4.4a110 110 0 0 1-32.2 78c-.2.3-.2.6 0 .9a6074.9 6074.9 0 0 1 43.3 59c.1.3 0 .4-.3.4h-38.3a1 1 0 0 1-.8-.4 21748.7 21748.7 0 0 1-47.2-64.3c-.2-.3-.2-.6.2-.8a323.7 323.7 0 0 0 14.5-11.1 79.6 79.6 0 0 0 21.1-26.4 85 85 0 0 0 8.3-29.8 47 47 0 0 0 0-5.6c0-.2.1-.3.3-.3Z"}),jsxRuntimeExports.jsx("circle",{cx:"622.4",cy:"133.6",r:"8.1"}),jsxRuntimeExports.jsx("rect",{width:"11.6",height:"73",x:"-5.8",y:"-36.5",rx:".3",transform:"translate(299.2 165)"}),jsxRuntimeExports.jsx("path",{d:"M682.1 128.5H693c.2 0 .3 0 .3.3-.2 6-.2 11.8 0 17.2 0 2.6 0 5.9-.2 9.8-.1.8.2 1.1 1 1.1-.2-.2 0-.7.5-1.3 3.6-4.4 8.5-6.7 14.6-6.8 5.4-.2 9.8 1.2 13.5 4 4 3 6 7.3 6.3 12.7.5 11.3.6 23.1.2 35.3 0 .4-.2.7-.7.7h-10.7c-.2 0-.3-.1-.3-.3V170a11.6 11.6 0 0 0-3.2-8.3 9.2 9.2 0 0 0-5.3-2.8c-5.5-1-9.9.6-13.2 4.7a9.9 9.9 0 0 0-2.3 6.1 656.8 656.8 0 0 0-.2 31.5c0 .2 0 .3-.2.3h-10.8c-.3 0-.5-.2-.5-.6v-72c0-.3 0-.4.3-.4ZM96.4 131a321 321 0 0 1 32.3.2c4.8.3 9 2 12.4 5 4 3.2 6.4 7.8 7.1 13.6a25 25 0 0 1-2.7 15.7 17.5 17.5 0 0 1-8.5 7.5 30.9 30.9 0 0 1-12.3 2.5H109c-.4 0-.7.2-.7.7v24.7c0 .4-.2.5-.5.5l-11 .2c-.4 0-.5-.2-.5-.5-.2-22.8-.3-46-.2-69.7 0-.2.1-.4.4-.4Zm35.7 13a12.7 12.7 0 0 0-7.6-2.2c-5.4 0-10.6 0-15.8-.2-.3 0-.5.1-.5.4l.1 22.2c0 .3.2.5.5.5h16.7c2.4 0 4.6-.7 6.5-2 3-2.2 4.5-5.6 4.2-10.2-.1-3.7-1.5-6.6-4-8.4Zm889.1-10.2a49.7 49.7 0 0 1 31.8 8.1c.4.2.5.1.5-.3v-4.8c0-.3.2-.5.6-.5h27.7c.5 0 .7.2.7.6v94.6c0 .5-.2.7-.7.7-10.5.1-19.7 0-27.6-.1-.3 0-.5-.2-.6-.5l-.2-4.8c0-.4-.1-.5-.4-.3a49.1 49.1 0 0 1-24.5 8.2 51 51 0 0 1-28.6-6.6 52.6 52.6 0 0 1-16.6-15.3 50.8 50.8 0 0 1-8.5-23.8 52 52 0 0 1 1.7-19 49.3 49.3 0 0 1 17-25.4 48.5 48.5 0 0 1 27.7-10.8Zm32.1 50.4a25.8 24.6-.1 0 0-51.6.1 25.8 24.6-.1 0 0 51.6-.1Zm174.2-50.5c11 .2 20.3 3.6 28 10.1a32.2 32.2 0 0 1 11.8 25.7c.2 20.7.3 41.5 0 62.3 0 .3-.1.5-.4.5l-27.8-.1c-.4 0-.6-.2-.6-.6V180c0-2.8-.5-5.5-1.4-8a16 16 0 0 0-7-9 22 22 0 0 0-12.9-2.9 19 19 0 0 0-16.1 8.4 22 22 0 0 0-3.6 13.9c0 15.8 0 32.3-.2 49.4 0 .2 0 .3-.2.3h-28.3c-.3 0-.5-.2-.5-.5v-94.8c0-.4.2-.7.6-.7l27.3.1c.3 0 .5.2.5.5l.1 9.2c0 .6.2.7.6.2a27 27 0 0 1 9.2-7.9 41.5 41.5 0 0 1 20.9-4.6Zm103.3 0c9 .5 17.4 3.3 25.2 8.3.3.2.5.1.4-.3V137c0-.3.2-.5.5-.5 9.2-.2 18.6-.3 28 0 .5 0 .7.1.7.6a148.4 148.4 0 0 0-.3 10.7v65.5c0 6.9 0 12.9.2 18.1 0 .6-.3 1-.9 1l-28-.1c-.2 0-.3-.1-.3-.4.1-1.7.2-3.4.1-5 0-.4-.2-.5-.6-.3-9.7 6-19.8 8.7-30.3 8.2a48.4 48.4 0 0 1-17.8-4.1 48.5 48.5 0 0 1-18.5-13.8 48.6 48.6 0 0 1-11.7-30c-.3-7.4.8-14.3 3.3-20.7a49.5 49.5 0 0 1 15-20.9 49 49 0 0 1 35-11.5Zm25.5 50.6a25.9 24.5.2 0 0-51.8-.1 25.9 24.5.2 0 0 51.8.1Zm-976.7-49.6 10.8.1c.4 0 .5.2.6.5 0 2.9 0 6-.3 9.2a6.2 6.2 0 0 1-2.5 4.6c-.3.2-.2.3.1.4H404c.2 0 .3.1.3.3v8.5c-.1.4-.3.5-.6.5l-12.2.1c-.3 0-.5.2-.5.5a442 442 0 0 0 .1 25.7 6 6 0 0 0 4.6 6c2.2.7 5 .6 8.3-.4.6-.1.9 0 .9.7v9c0 .6-.3 1-.8 1-3 .6-6.2.9-9.5.9a15.5 15.5 0 0 1-10.5-4 13.4 13.4 0 0 1-4.5-9.8 704.8 704.8 0 0 1-.2-29.3c0-.3-.2-.4-.5-.4H371c-.3 0-.5-.1-.5-.5a75 75 0 0 1-.1-8.4c0-.3.1-.5.5-.4 2.1.1 3.9 0 5.1-.5a4.7 4.7 0 0 0 3.3-4.7V135c0-.2.2-.3.4-.3Zm267.7.1H658c.2 0 .3 0 .4.3a39.9 39.9 0 0 1-.1 9.6 6.5 6.5 0 0 1-2.5 4.4c-.3.2-.2.3.1.4h15.3c.4 0 .7.2.7.7v8.3c0 .2-.1.2-.3.3-4.4.2-8.8.3-13 .2a445.1 445.1 0 0 1-.3 21c0 3.1.4 5.8 1.3 8.2a4.7 4.7 0 0 0 3.7 2.9c2.8.5 5.5.3 8.3-.4.5-.2.7 0 .7.6-.2 3-.2 6.2-.3 9.4 0 .3-.1.5-.4.6a30.7 30.7 0 0 1-13.7.5 10.8 10.8 0 0 1-7.7-5 21.4 21.4 0 0 1-3.3-11.8v-25.7c0-.4-.2-.5-.6-.5-2.4.2-5 .3-8 .1-.4 0-.6-.2-.5-.6.1-2.9.1-5.5-.1-7.9 0-.7.2-1 1-1 3.6.4 6-.5 7.2-2.5.7-1 1-2.2 1-3.4v-8.2c0-.3.2-.5.5-.5Zm450.6 1.5c10-.1 19.4 0 28.2.1.3 0 .5.2.5.5a200.4 200.4 0 0 1 .4 11c8.8-8 18-11.8 27.4-11.4.4 0 .5.2.5.6a788 788 0 0 0-.1 26.9c0 .2-.1.2-.3.3a33.8 33.8 0 0 0-19.4 7c-5.1 4-7.8 8.6-8.1 14a504 504 0 0 0-.2 46.7c0 .2-.1.2-.3.2-10 .1-19.6 0-28.6-.1-.3 0-.5-.2-.5-.5l.1-5.1a27417 27417 0 0 0-.2-89.5c0-.5.2-.7.6-.7Zm-909.1 14.2a14.5 14.5 0 0 1 8.3 6.6c1.9 3.7 2.8 8 2.7 13.2a937.8 937.8 0 0 0-.2 30.8c0 .3-.2.5-.5.5-3.3 0-6.6 0-10-.3-.2 0-.4-.2-.5-.5a65 65 0 0 1-.2-6c0-.2 0-.2-.2 0a18.3 18.3 0 0 1-14.4 7.4c-5 .3-9.2-.9-12.6-3.4-3.7-3-5.5-7.2-5.5-12.7-.1-3.2.8-6 2.8-8.6 2.6-3.4 6.5-5.4 11.5-6 6-.7 11.8-1.1 17.8-1.3.1 0 .2-.1.2-.3.1-6.1-1.7-9.8-5.3-11-4.4-1.6-8.2-1.4-11.4.7a7.5 7.5 0 0 0-3.6 5c0 .3-.3.4-.6.4-2.7-.4-5.6-.7-8.8-.8-.6 0-.8-.2-.7-.7a15.7 15.7 0 0 1 2.8-7 17 17 0 0 1 10.6-7 33 33 0 0 1 17.8 1ZM170 191.1c2.4 1.4 5.6 1.7 9.6.9a11.7 11.7 0 0 0 5-2.4 8.7 8.7 0 0 0 3.5-7.9c0-.7 0-1.5.2-2 .2-.7 0-1-.7-1l-14 1c-1.5 0-2.7.6-3.9 1.5a6.3 6.3 0 0 0-2.3 5 5.2 5.2 0 0 0 2.6 4.9Zm170-42.3c5 .1 9.4 1.2 13.3 3.3a14.2 14.2 0 0 1 7 9.4c.5 2.6.7 5.6.7 9v30.3c0 .5-.2.7-.7.7h-10c-.3 0-.5-.2-.5-.6v-5.5c0-1-.3-1-.9-.2-3 4.4-7.6 6.7-13.9 7-5 .3-9.1-.9-12.6-3.4-4-3.2-5.8-8-5.3-14.6.1-1.8.7-3.5 1.6-5.1a15 15 0 0 1 8.6-6.6 29.8 29.8 0 0 1 6-1.3l15.6-1c.2 0 .3 0 .3-.3.3-3.7-.3-6.6-1.7-8.5a8 8 0 0 0-7.2-3.3c-6.4.3-10 2.5-11.2 6.5-.2.3-.4.5-.8.4-3-.4-5.9-.7-8.7-.7-.7 0-1-.4-.8-1.1.8-4.5 2.9-8 6.3-10.4 4.2-2.9 9.1-4.2 14.9-4Zm-10.3 33.6c-1.2 1.4-1.5 3.1-1 5.2a5.6 5.6 0 0 0 4.3 4.4c4.6 1.1 9 .2 13.2-2.8.3-.2.5-.4.6-.7 1.9-6.5 2.7-9.7 2.5-9.7a123 123 0 0 0-13.9.8 8.2 8.2 0 0 0-5.7 2.8ZM445.3 150a18.6 18.6 0 0 1 11.6 8.7c3.1 5 4.3 11.4 3.5 18.9 0 .2-.1.3-.3.3h-36c-.4 0-.5.2-.5.5.2 5 2 9 5.8 11.8a11.5 11.5 0 0 0 9.1 2.3c4.6-.8 8-3 10-6.8.1-.3.3-.4.7-.3 3.2.4 6.5 1 9.7 1.9.4 0 .5.3.4.6a18.1 18.1 0 0 1-5.4 8.7 20.3 20.3 0 0 1-10.5 5.2c-4.5.9-9 .8-13.2-.1-6-1.1-10.6-4.4-14.1-10a30.1 30.1 0 0 1-4.1-18.8c.6-8 3.7-14.3 9.3-19A21.2 21.2 0 0 1 433 149a27 27 0 0 1 12.3 1ZM427 163.1a16.6 16.6 0 0 0-2.8 5.5c-.1.4 0 .7.5.7H449c.2 0 .2-.1.2-.3-.5-2.7-1.4-4.9-2.7-6.4-2.5-3.2-6.2-4.5-11.2-4-3.4.3-6.2 1.8-8.3 4.5Zm70.1-14.3c4-.1 6 .2 6 1a97.3 97.3 0 0 0-.2 9.7c0 .2-.1.2-.3.2a16.4 16.4 0 0 0-9.4-.9 11.3 11.3 0 0 0-7.6 5.8 12 12 0 0 0-1.8 5.9 573.6 573.6 0 0 0-.3 30.8c-3.7.3-7.3.3-10.8.2-.4 0-.5-.2-.5-.6.2-16.5.2-33.4 0-50.7 0-.4.2-.5.6-.6a112.6 112.6 0 0 1 10.3.2c0 2.2 0 4.2.3 6 0 0 0 .1.2 0 4-4.6 8.4-7 13.5-7Zm-289 .7a532.3 532.3 0 0 1 12.8.2c4.6 11.3 9 22.4 13.1 33.2.3.6.5.6.8 0l12.8-32.8a.7.7 0 0 1 .7-.4c3.3-.2 7-.3 11.4-.2.4 0 .5.2.4.6-7.5 19.9-15.3 39.7-23.5 59.4-2.4 5.8-6.2 9.4-11.3 10.7a27 27 0 0 1-14.7-.5c-.2 0-.3-.1-.3-.3v-10c0-.7.4-.9 1-.6 2.2.7 5.1 1 8.7.9a6.1 6.1 0 0 0 5-2.7 26.1 26.1 0 0 0 3.2-6 2.7 2.7 0 0 0 0-2 3752.2 3752.2 0 0 1-20.4-49c0-.3 0-.4.4-.4Zm325 0h11.1c.4 0 .6.2.7.5l8.5 34.4c.2 1 .5 1 .8 0 3.2-11.8 6.5-23.2 9.7-34.2 0-.3.3-.5.6-.5 3.2-.2 7-.3 11.4-.2.3 0 .6.2.7.6l9.8 34.7c.1.6.3.6.4 0l8.7-34.7c.1-.4.3-.5.7-.5h11.2c.3 0 .5.2.4.5a20255.8 20255.8 0 0 0-15 51.5l-11-.1c-.4 0-.6-.2-.8-.6l-10.4-35.7c-.2-.8-.4-.8-.7 0a13242.6 13242.6 0 0 1-11 36.3h-11.2c-.2 0-.3 0-.3-.2a4449.9 4449.9 0 0 1-14.6-51.2c0-.4 0-.5.4-.5Z"}),jsxRuntimeExports.jsx("rect",{width:"11.8",height:"52",x:"-5.9",y:"-26",rx:".3",transform:"translate(622.4 175.5)"}),jsxRuntimeExports.jsx("circle",{cx:"1415.7",cy:"216.2",r:"18.1"})]}),KlarnaIconSmall=t=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 800 444.8",height:"24",...t,children:jsxRuntimeExports.jsxs("g",{transform:"translate(.2 .3) scale(17.769)",children:[jsxRuntimeExports.jsx("rect",{width:"45",height:"25",fill:"#ffb3c7",rx:"4.3"}),jsxRuntimeExports.jsx("path",{fill:"#0a0b09",d:"M40.8 14.7a1 1 0 0 0-1 1c0 .6.4 1.1 1 1.1s1-.5 1-1c0-.6-.4-1.1-1-1.1zm-3.5-.9c0-.8-.7-1.4-1.6-1.4s-1.5.6-1.5 1.4c0 .9.7 1.5 1.5 1.5s1.6-.6 1.6-1.5zm0-2.8H39v5.7h-1.7v-.4a3 3 0 0 1-4.7-2.5 3 3 0 0 1 4.7-2.5V11zm-13.6.7V11H22v5.7h1.7V14c0-.9 1-1.4 1.6-1.4V11c-.6 0-1.3.3-1.6.7zm-4.3 2.1c0-.8-.7-1.4-1.6-1.4-.8 0-1.5.6-1.5 1.4 0 .9.7 1.5 1.5 1.5.9 0 1.6-.6 1.6-1.5zm0-2.8H21v5.7h-1.7v-.4a3 3 0 0 1-4.7-2.5 3 3 0 0 1 4.7-2.5V11zm10.2-.2c-.7 0-1.3.2-1.8.8V11h-1.7v5.7H28v-3c0-.9.5-1.3 1.2-1.3.8 0 1.2.4 1.2 1.3v3H32v-3.6c0-1.4-1-2.3-2.4-2.3zm-17.4 5.9H14V8.4h-1.8zm-7.8 0h1.9V8.4H4.4zM11 8.4c0 1.8-.7 3.5-2 4.7l2.7 3.6H9.3l-2.8-3.9.7-.5c1.3-1 2-2.3 2-3.9H11z"})]})}),MastercardIcon=({size:t,...n})=>jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 38 24",xmlns:"http://www.w3.org/2000/svg",role:"img",height:"24","aria-labelledby":"pi-master",...n,children:[jsxRuntimeExports.jsx("title",{id:"pi-master",children:"Mastercard"}),jsxRuntimeExports.jsx("path",{opacity:".07",d:"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32"}),jsxRuntimeExports.jsx("circle",{fill:"#EB001B",cx:"15",cy:"12",r:"7"}),jsxRuntimeExports.jsx("circle",{fill:"#F79E1B",cx:"23",cy:"12",r:"7"}),jsxRuntimeExports.jsx("path",{fill:"#FF5F00",d:"M22 12c0-2.4-1.2-4.5-3-5.7-1.8 1.3-3 3.4-3 5.7s1.2 4.5 3 5.7c1.8-1.2 3-3.3 3-5.7z"})]}),ApplePayIcon=({size:t,...n})=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 60",height:24,...n,children:jsxRuntimeExports.jsxs("g",{fill:"none",fillRule:"evenodd",children:[jsxRuntimeExports.jsx("rect",{y:"1",x:"1",width:"98",height:"58",rx:"10",stroke:"#000",fill:"#FFF",strokeWidth:"2"}),jsxRuntimeExports.jsx("path",{fill:"#000",d:"M33.9 28c0 3.8 3.5 5 3.5 5 0 .2-.5 1.9-1.8 3.7-1.1 1.5-2.2 3-4 3-1.8.1-2.4-1-4.4-1s-2.6 1-4.3 1.1c-1.7 0-3-1.7-4.2-3.2-2.2-3.1-4-8.9-1.6-12.7 1.1-2 3.2-3.2 5.4-3.2 1.7 0 3.3 1.1 4.4 1.1 1 0 3-1.4 5-1.2.9 0 3.3.4 4.8 2.5 0 .1-2.8 1.7-2.8 4.9m-3.3-9.4a5.4 5.4 0 0 0 1.3-4 6 6 0 0 0-3.8 1.8c-.9 1-1.6 2.5-1.4 4a5 5 0 0 0 3.9-1.8m13.3-1.9a41.7 41.7 0 0 1 2.2-.3 24.8 24.8 0 0 1 2.8-.1c1.4 0 2.6.2 3.6.5s1.9.8 2.5 1.4a5.8 5.8 0 0 1 1.4 2c.3.7.4 1.6.4 2.5a7 7 0 0 1-.6 3.1 6.5 6.5 0 0 1-1.8 2.3c-.8.6-1.6 1-2.7 1.3a13.7 13.7 0 0 1-6.2.2v9.8H44V16.7zm1.6 11.5 1.4.2 1.6.1c2 0 3.7-.5 4.9-1.4 1.2-1 1.7-2.4 1.7-4.2a5 5 0 0 0-.4-2.3 4.2 4.2 0 0 0-1.3-1.7 6 6 0 0 0-2-1l-2.6-.2a18.9 18.9 0 0 0-3.3.2v10.3zM70 35.6a56.7 56.7 0 0 0 .3 3.8h-1.6l-.2-2.3h-.1a5.8 5.8 0 0 1-.8 1 6.2 6.2 0 0 1-2.6 1.5 6.6 6.6 0 0 1-1.9.2c-.8 0-1.5-.1-2.1-.4-.7-.2-1.2-.6-1.6-1a4.1 4.1 0 0 1-.9-1.4 4.7 4.7 0 0 1-.3-1.7 5 5 0 0 1 2.6-4.4 14 14 0 0 1 7.6-1.5v-.5c0-.4 0-1-.2-1.5a4.6 4.6 0 0 0-.5-1.6 3 3 0 0 0-1.3-1.2c-.5-.4-1.3-.5-2.3-.5-.7 0-1.4 0-2.1.3a7.4 7.4 0 0 0-2 .9l-.5-1.2a8 8 0 0 1 2.3-1 9.6 9.6 0 0 1 2.5-.4c1.2 0 2.1.2 2.9.6a5 5 0 0 1 1.7 1.5c.4.6.7 1.3.9 2l.2 2.3v6.5zm-1.6-5-2.8.2c-1 0-2 .3-2.7.6-.9.3-1.5.7-2 1.3-.6.6-.9 1.4-.9 2.4 0 1.1.3 2 1 2.5.7.6 1.5.9 2.3.9.7 0 1.3-.1 1.9-.3a4.7 4.7 0 0 0 2.4-1.8l.6-1.2.2-1v-3.5zm4.9-7.5 4.3 10.6a35.4 35.4 0 0 1 1.2 3.6 212 212 0 0 1 1.3-3.7l4-10.5H86L81 35a136.7 136.7 0 0 1-1.4 3.4 32.3 32.3 0 0 1-1.3 2.8c-.4.9-.9 1.6-1.4 2.2a9.3 9.3 0 0 1-1.5 1.7c-.6.6-1.3 1-1.8 1.3a15.8 15.8 0 0 1-1.1.5l-.6-1.4 1.4-.7a7.7 7.7 0 0 0 1.5-1.2 13.7 13.7 0 0 0 2.8-4l.2-.7c0-.2 0-.4-.2-.7L71.5 23h1.8z"})]})}),PaypalIcon=({size:t,...n})=>jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 38 24",xmlns:"http://www.w3.org/2000/svg",height:"24",role:"img","aria-labelledby":"pi-paypal",...n,children:[jsxRuntimeExports.jsx("title",{id:"pi-paypal",children:"PayPal"}),jsxRuntimeExports.jsx("path",{opacity:".07",d:"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32"}),jsxRuntimeExports.jsx("path",{fill:"#003087",d:"M23.9 8.3c.2-1 0-1.7-.6-2.3-.6-.7-1.7-1-3.1-1h-4.1c-.3 0-.5.2-.6.5L14 15.6c0 .2.1.4.3.4H17l.4-3.4 1.8-2.2 4.7-2.1z"}),jsxRuntimeExports.jsx("path",{fill:"#3086C8",d:"M23.9 8.3l-.2.2c-.5 2.8-2.2 3.8-4.6 3.8H18c-.3 0-.5.2-.6.5l-.6 3.9-.2 1c0 .2.1.4.3.4H19c.3 0 .5-.2.5-.4v-.1l.4-2.4v-.1c0-.2.3-.4.5-.4h.3c2.1 0 3.7-.8 4.1-3.2.2-1 .1-1.8-.4-2.4-.1-.5-.3-.7-.5-.8z"}),jsxRuntimeExports.jsx("path",{fill:"#012169",d:"M23.3 8.1c-.1-.1-.2-.1-.3-.1-.1 0-.2 0-.3-.1-.3-.1-.7-.1-1.1-.1h-3c-.1 0-.2 0-.2.1-.2.1-.3.2-.3.4l-.7 4.4v.1c0-.3.3-.5.6-.5h1.3c2.5 0 4.1-1 4.6-3.8v-.2c-.1-.1-.3-.2-.5-.2h-.1z"})]}),ShopPayIcon=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 38 24",height:"24",fill:"none",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#a)",children:[jsxRuntimeExports.jsx("path",{fill:"#5A31F4",d:"M35 0H3C1.3 0 0 1.3 0 3v18a3 3 0 0 0 3 3h32c1.7 0 3-1.3 3-3V3a3 3 0 0 0-3-3Z"}),jsxRuntimeExports.jsx("path",{fill:"#5A31F4",d:"M35 1a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3c0-1.1.9-2 2-2h32Z"}),jsxRuntimeExports.jsx("g",{fill:"#fff",clipPath:"url(#b)",children:jsxRuntimeExports.jsx("path",{d:"M9.86 11.4c-.97-.21-1.4-.3-1.4-.67 0-.36.3-.53.88-.53.5 0 .88.22 1.16.67.02.03.06.04.1.02l1.08-.55a.08.08 0 0 0 .03-.11C11.26 9.43 10.43 9 9.33 9 7.9 9 7 9.72 7 10.87c0 1.21 1.09 1.52 2.05 1.73.97.21 1.4.3 1.4.67 0 .38-.31.56-.94.56-.58 0-1-.27-1.27-.8a.08.08 0 0 0-.1-.03l-1.08.55a.08.08 0 0 0-.04.1c.43.88 1.31 1.37 2.5 1.37 1.5 0 2.4-.7 2.4-1.89 0-1.17-1.1-1.52-2.06-1.73ZM15.67 9c-.61 0-1.16.23-1.55.62a.04.04 0 0 1-.06-.03V7.08a.08.08 0 0 0-.08-.08h-1.36a.08.08 0 0 0-.07.08v7.8c0 .05.03.08.07.08h1.36c.04 0 .08-.03.08-.08v-3.42c0-.66.5-1.17 1.17-1.17.68 0 1.16.5 1.16 1.17v3.42c0 .05.04.08.08.08h1.36c.04 0 .07-.03.07-.08v-3.42c0-1.44-.93-2.46-2.23-2.46ZM20.66 8.78c-.74 0-1.43.23-1.92.56a.08.08 0 0 0-.03.1l.6 1.04c.02.04.07.05.1.03.38-.23.81-.35 1.25-.35 1.19 0 2.06.85 2.06 1.97 0 .96-.7 1.66-1.58 1.66-.72 0-1.22-.42-1.22-1.02 0-.35.14-.63.52-.83a.08.08 0 0 0 .03-.1l-.57-.97a.08.08 0 0 0-.09-.04c-.76.29-1.29.97-1.29 1.9 0 1.38 1.1 2.42 2.62 2.42a2.93 2.93 0 0 0 3.05-3.04c0-1.92-1.48-3.33-3.53-3.33ZM28.16 9c-.68 0-1.3.25-1.74.7-.03.03-.07.01-.07-.02v-.55a.08.08 0 0 0-.08-.08h-1.32a.08.08 0 0 0-.07.08v7.8c0 .04.03.07.07.07h1.36c.04 0 .08-.03.08-.08v-2.55c0-.04.04-.05.06-.03.45.42 1.04.67 1.71.67C29.76 15 31 13.7 31 12c0-1.7-1.24-3-2.84-3Zm-.25 4.69c-.9 0-1.6-.73-1.6-1.7s.69-1.7 1.6-1.7c.9 0 1.59.72 1.59 1.7s-.68 1.7-1.6 1.7Z"})})]}),jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsx("clipPath",{id:"a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h38v24H0z"})}),jsxRuntimeExports.jsx("clipPath",{id:"b",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v10H0z",transform:"translate(7 7)"})})]})]}),VippsIcon=({size:t="normal",...n})=>t==="small"?jsxRuntimeExports.jsx(VippsIconSmall,{...n}):jsxRuntimeExports.jsx(VippsIconMedium,{...n}),VippsIconMedium=t=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 163.5 66.1",height:"24",role:"img",...t,children:[jsxRuntimeExports.jsx("title",{id:"",children:"Vipps"}),jsxRuntimeExports.jsxs("g",{fill:"#FF5B24",children:[jsxRuntimeExports.jsx("path",{d:"m28 22 5.1 14.9 5-14.9H44l-8.8 22.1h-4.4L22 22h6z"}),jsxRuntimeExports.jsx("path",{d:"M57.3 40.6c3.7 0 5.8-1.8 7.8-4.4 1.1-1.4 2.5-1.7 3.5-.9s1.1 2.3 0 3.7a13.9 13.9 0 0 1-11.3 6.1c-5.1 0-9.6-2.8-12.7-7.7-.9-1.3-.7-2.7.3-3.4s2.5-.4 3.4 1c2.2 3.3 5.2 5.6 9 5.6zm6.9-12.3c0 1.8-1.4 3-3 3s-3-1.2-3-3 1.4-3 3-3a3 3 0 0 1 3 3zM78.3 22v3a8.4 8.4 0 0 1 7.2-3.6c4.3 0 9.3 3.6 9.3 11.3 0 8.1-4.8 12-9.8 12a8 8 0 0 1-6.8-3.5v10.6h-5.4V22h5.5zm0 11c0 4.5 2.6 6.9 5.5 6.9 2.8 0 5.6-2.2 5.6-6.9 0-4.6-2.8-6.8-5.6-6.8s-5.5 2.1-5.5 6.8zm26-11v3a8.4 8.4 0 0 1 7.2-3.6c4.3 0 9.3 3.6 9.3 11.3 0 8.1-4.8 12-9.8 12a8 8 0 0 1-6.8-3.5v10.6h-5.4V22h5.5zm0 11c0 4.5 2.6 6.9 5.5 6.9 2.8 0 5.6-2.2 5.6-6.9 0-4.6-2.8-6.8-5.6-6.8-2.9 0-5.5 2.1-5.5 6.8zm28-11.6c4.5 0 7.7 2.1 9.1 7.3l-4.9.8c-.1-2.6-1.7-3.5-4.1-3.5-1.8 0-3.2.8-3.2 2.1 0 1 .7 2 2.8 2.4l3.7.7c3.6.7 5.6 3.1 5.6 6.3 0 4.8-4.3 7.2-8.4 7.2-4.3 0-9.1-2.2-9.8-7.6l4.9-.8c.3 2.8 2 3.8 4.8 3.8 2.1 0 3.5-.8 3.5-2.1 0-1.2-.7-2.1-3-2.5l-3.4-.6c-3.6-.7-5.8-3.2-5.8-6.4.1-5 4.6-7.1 8.2-7.1z"})]})]}),VippsIconSmall=t=>jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 38 24",xmlns:"http://www.w3.org/2000/svg",role:"img",width:"38",height:"24",...t,children:[jsxRuntimeExports.jsx("title",{id:"pi-vipps",children:"Vipps"}),jsxRuntimeExports.jsx("path",{opacity:".07",d:"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"#FF5B24",d:"M27.414 12.07c.357.281.545.667.564 1.155 0 .487-.188.977-.564 1.464C25.218 17.563 22.551 19 19.415 19a9.454 9.454 0 01-5.042-1.437c-1.521-.939-2.836-2.273-3.944-4.001-.319-.469-.451-.929-.394-1.38.038-.432.244-.779.62-1.042.356-.244.76-.31 1.211-.197.469.132.864.432 1.183.901.827 1.239 1.747 2.197 2.761 2.873 1.127.732 2.329 1.099 3.606 1.099 1.22 0 2.29-.291 3.211-.873.751-.47 1.521-1.221 2.31-2.254.395-.47.816-.761 1.268-.873s.852-.028 1.209.254zm-3.746-6.451c.432.413.648.911.648 1.493 0 .639-.217 1.155-.648 1.55-.413.375-.91.563-1.492.563s-1.08-.188-1.494-.563c-.412-.395-.619-.911-.619-1.55 0-.62.207-1.127.619-1.521.414-.394.912-.591 1.494-.591s1.079.206 1.492.619z"})]}),VisaIcon=({size:t,...n})=>jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 38 24",xmlns:"http://www.w3.org/2000/svg",role:"img",height:"24","aria-labelledby":"pi-visa",...n,children:[jsxRuntimeExports.jsx("title",{id:"pi-visa",children:"Visa"}),jsxRuntimeExports.jsx("path",{opacity:".07",d:"M35 0H3C1.3 0 0 1.3 0 3v18c0 1.7 1.4 3 3 3h32c1.7 0 3-1.3 3-3V3c0-1.7-1.4-3-3-3z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M35 1c1.1 0 2 .9 2 2v18c0 1.1-.9 2-2 2H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h32"}),jsxRuntimeExports.jsx("path",{d:"M28.3 10.1H28c-.4 1-.7 1.5-1 3h1.9c-.3-1.5-.3-2.2-.6-3zm2.9 5.9h-1.7c-.1 0-.1 0-.2-.1l-.2-.9-.1-.2h-2.4c-.1 0-.2 0-.2.2l-.3.9c0 .1-.1.1-.1.1h-2.1l.2-.5L27 8.7c0-.5.3-.7.8-.7h1.5c.1 0 .2 0 .2.2l1.4 6.5c.1.4.2.7.2 1.1.1.1.1.1.1.2zm-13.4-.3l.4-1.8c.1 0 .2.1.2.1.7.3 1.4.5 2.1.4.2 0 .5-.1.7-.2.5-.2.5-.7.1-1.1-.2-.2-.5-.3-.8-.5-.4-.2-.8-.4-1.1-.7-1.2-1-.8-2.4-.1-3.1.6-.4.9-.8 1.7-.8 1.2 0 2.5 0 3.1.2h.1c-.1.6-.2 1.1-.4 1.7-.5-.2-1-.4-1.5-.4-.3 0-.6 0-.9.1-.2 0-.3.1-.4.2-.2.2-.2.5 0 .7l.5.4c.4.2.8.4 1.1.6.5.3 1 .8 1.1 1.4.2.9-.1 1.7-.9 2.3-.5.4-.7.6-1.4.6-1.4 0-2.5.1-3.4-.2-.1.2-.1.2-.2.1zm-3.5.3c.1-.7.1-.7.2-1 .5-2.2 1-4.5 1.4-6.7.1-.2.1-.3.3-.3H18c-.2 1.2-.4 2.1-.7 3.2-.3 1.5-.6 3-1 4.5 0 .2-.1.2-.3.2M5 8.2c0-.1.2-.2.3-.2h3.4c.5 0 .9.3 1 .8l.9 4.4c0 .1 0 .1.1.2 0-.1.1-.1.1-.1l2.1-5.1c-.1-.1 0-.2.1-.2h2.1c0 .1 0 .1-.1.2l-3.1 7.3c-.1.2-.1.3-.2.4-.1.1-.3 0-.5 0H9.7c-.1 0-.2 0-.2-.2L7.9 9.5c-.2-.2-.5-.5-.9-.6-.6-.3-1.7-.5-1.9-.5L5 8.2z",fill:"#142688"})]}),PaymentIcons=({className:t,children:n,size:r,...i})=>{const o=useMarket();return jsxRuntimeExports.jsxs("div",{className:cn("list flex h-12 items-center gap-2",t),...i,children:[getStoreCountry()==="NO"&&jsxRuntimeExports.jsx(VippsIcon,{size:r}),jsxRuntimeExports.jsx(KlarnaIcon,{size:"small"}),(o==null?void 0:o.currency)==="EUR"?jsxRuntimeExports.jsx(PaypalIcon,{size:r}):jsxRuntimeExports.jsx(ShopPayIcon,{}),jsxRuntimeExports.jsx(MastercardIcon,{size:r}),jsxRuntimeExports.jsx(VisaIcon,{size:r}),jsxRuntimeExports.jsx(ApplePayIcon,{size:r}),n]})},Plus=({fill:t="currentColor",height:n="0.85em",...r})=>jsxRuntimeExports.jsx("svg",{viewBox:"0 0 9 9",height:n,fill:t,xmlns:"http://www.w3.org/2000/svg",...r,children:jsxRuntimeExports.jsx("path",{d:"M8.25 3.75H5.25V0.75C5.25 0.551088 5.17098 0.360322 5.03033 0.21967C4.88968 0.0790176 4.69891 0 4.5 0C4.30109 0 4.11032 0.0790176 3.96967 0.21967C3.82902 0.360322 3.75 0.551088 3.75 0.75V3.75H0.75C0.551088 3.75 0.360322 3.82902 0.21967 3.96967C0.0790176 4.11032 0 4.30109 0 4.5C0 4.69891 0.0790176 4.88968 0.21967 5.03033C0.360322 5.17098 0.551088 5.25 0.75 5.25H3.75V8.25C3.75 8.44891 3.82902 8.63968 3.96967 8.78033C4.11032 8.92098 4.30109 9 4.5 9C4.69891 9 4.88968 8.92098 5.03033 8.78033C5.17098 8.63968 5.25 8.44891 5.25 8.25V5.25H8.25C8.44891 5.25 8.63968 5.17098 8.78033 5.03033C8.92098 4.88968 9 4.69891 9 4.5C9 4.30109 8.92098 4.11032 8.78033 3.96967C8.63968 3.82902 8.44891 3.75 8.25 3.75Z"})}),Pot="/cdn/shop/t/42/assets/pot.svg",Seedling="/cdn/shop/t/42/assets/seedling.svg",Seeds="/cdn/shop/t/42/assets/seeds.svg",Star=({percent:t=100,height:n="1.1em",stroke:r="currentColor",fill:i="currentColor",...o})=>{const[u]=reactExports.useState(`svg_${Math.random().toString(16)}`);return jsxRuntimeExports.jsxs("svg",{height:n,viewBox:"-2 -2 103 103",...o,children:[jsxRuntimeExports.jsx("mask",{id:u,children:jsxRuntimeExports.jsx("rect",{width:`${t}%`,height:"100%",fill:"white"})}),jsxRuntimeExports.jsx("polygon",{points:"50,2 19,98 98,39 2,39 80,98",mask:`url(#${u})`,fill:i}),jsxRuntimeExports.jsx("polygon",{points:"2,39 38,39 50,2 62,39 98,39 69,61 80,98 50,76 19,98 31,61",fill:"none",strokeWidth:"8",strokeLinejoin:"round",stroke:r})]})},Stars=({className:t,count:n,...r})=>{const i=parseNumber(r.rating),o=Math.floor(i),u=i-o;return jsxRuntimeExports.jsxs("span",{className:"inline-flex items-center space-x-3",children:[jsxRuntimeExports.jsx("span",{className:cn("text-yellow-350 inline-block space-x-1.5 leading-none",t),children:range(1,5).map(c=>jsxRuntimeExports.jsx(Star,{percent:c<=o?100:u*100},c))}),jsxRuntimeExports.jsx("span",{className:"text-xl",children:n?`${parseNumber(n)}`:null})]})},StartKit="/cdn/shop/t/42/assets/startkit.svg",Truck=({stroke:t="currentColor",...n})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",fill:"none",viewBox:"0 0 44 38",...n,children:[jsxRuntimeExports.jsxs("mask",{id:"truck-mask",fill:"black",children:[jsxRuntimeExports.jsx("rect",{width:"100%",height:"100%",fill:"white"}),jsxRuntimeExports.jsx("circle",{cx:"11",cy:"31.5",r:"5"}),jsxRuntimeExports.jsx("circle",{cx:"33",cy:"31.5",r:"5"})]}),jsxRuntimeExports.jsxs("g",{stroke:t,strokeWidth:"3.3",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"20",children:[jsxRuntimeExports.jsx("polyline",{points:"26.5,22 26.5,2 2,2 2,31.5 42,31.5 42,19 36,9 26.5,9",mask:"url(#truck-mask)"}),jsxRuntimeExports.jsx("polyline",{points:"31,13.5 31,19 36.5,19"}),jsxRuntimeExports.jsx("circle",{cx:"11",cy:"31.5",r:"5"}),jsxRuntimeExports.jsx("circle",{cx:"33",cy:"31.5",r:"5"})]})]});function isNodeList(t){return(t==null?void 0:t.length)!==void 0}const DynamicPortal=({selector:t,multiple:n=!1,render:r,children:i})=>{const o=useQuerySelector(t,{multiple:n});return isNodeList(o)?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Array.from(o.values()).map(u=>reactDomExports.createPortal(r?r(u):i,u))}):o?reactDomExports.createPortal(r?r(o):i,o):null},Modal=({className:t,onClick:n,onClose:r,children:i,...o})=>{const u=reactExports.useRef(null);return reactExports.useEffect(()=>{const c=u.current;function d(f){if(f.key==="Escape"&&r&&r(),!c)return;const m=c.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),g=m[0],v=m[m.length-1];f.key==="Tab"&&(f.shiftKey?document.activeElement===g&&(v.focus(),f.preventDefault()):document.activeElement===v&&(g.focus(),f.preventDefault()))}return c==null||c.addEventListener("keydown",d),()=>{c==null||c.removeEventListener("keydown",d)}}),jsxRuntimeExports.jsxs("div",{className:"portal text-2xl","aria-modal":!0,role:"dialog",tabIndex:-1,...o,ref:u,children:[jsxRuntimeExports.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center",children:jsxRuntimeExports.jsx("div",{className:cn("container pointer-events-auto max-h-full bg-white p-8 sm:max-w-4xl sm:rounded-xl xl:max-w-6xl",t),children:i})}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 z-10 bg-gray-200 opacity-70",onClick:n})]})},Portal=({open:t,alwaysRender:n,modal:r,...i})=>(reactExports.useEffect(()=>(t===!0?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden"),()=>document.body.classList.remove("overflow-hidden")),[t]),!t&&!n?null:reactDomExports.createPortal(r?jsxRuntimeExports.jsx(Modal,{...i}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:i.children}),document.body));function isNum(t){return!isNaN(t)}const Price=({price:t,original:n,decimals:r,asText:i=!1,currencyCode:o,allowWrapping:u=!1,...c})=>{const d=useTranslations("react.checkout.free"),f=g=>isMoneyV2(g)?getPrice(g,i,r):i?getPrice(o&&isPresent(g)?{amount:g.toString(),currencyCode:o}:g,!0,r):isNum(g)?numberFormatter().format(g):g,m=n!==t&&(typeof n=="number"?n>0:!!n);return jsxRuntimeExports.jsxs("span",{...c,children:[m&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("s",{className:"whitespace-nowrap text-gray-400",children:f(n)}),u?jsxRuntimeExports.jsx("span",{children:" "}):jsxRuntimeExports.jsx("span",{children:" "})]}),jsxRuntimeExports.jsx("span",{className:cn("whitespace-nowrap",{green:m}),children:t===0&&i&&d?d:f(t)})]})};function getPromoText(t){var i;const n=((i=t.offer)==null?void 0:i.value)||"",r=getPrice(t.compareAtPriceRange.minVariantPrice)-getPrice(t.priceRange.minVariantPrice);return n.replace("{DISCOUNT}",getPrice(r,!0,0))}const Promo=({promo:t,className:n,...r})=>{const i=typeof t=="string"?t:getPromoText(t);return i?jsxRuntimeExports.jsx("aside",{className:cn("z-10 font-semibold leading-none",n),...r,children:i}):null},CountrySelector=()=>{const t=useQuerySelector("#lform-wrapper > #localization_form",{attributeFilter:["class"]}),[{attributes:n,inputs:r},i]=reactExports.useState({attributes:{},inputs:[]}),o=useDispatch(),u=useTranslations("react.actions"),c=useSelector(k=>k.markets),d=useSelector(k=>{var C,I;return(I=(C=k.cart)==null?void 0:C.buyerIdentity)==null?void 0:I.countryCode}),{country:f,setCountry:m}=reactExports.useContext(CountryContext),[g,v]=reactExports.useState(!1),[y,x]=reactExports.useState(!1),S=reactExports.useRef(null),E=reactExports.useRef(null);reactExports.useEffect(()=>{const k=setInterval(()=>{if(!window.localization.ready)return;const C=getPrefferedCountryCode(),I=countryList.find(T=>T.iso_code===C);I&&getStoreCountry()==="EU"&&m(I),setTimeout(()=>x(!0),200),clearInterval(k)},50);return()=>clearInterval(k)},[m]);const b=reactExports.useMemo(()=>{if(!c)return{};const k=uniq(c==null?void 0:c.flatMap(C=>C.webPresences.map(I=>I.domain)).filter(isPresent));return Object.fromEntries(k.map(C=>[C,c.filter(I=>I.webPresences.some(T=>T.domain===C)).flatMap(I=>I.countries)]))},[c]);return reactExports.useLayoutEffect(()=>{var C;if(c===null)return;console.debug({current:f.iso_code,locale:window.localization.country.iso_code,cookie:getPrefferedCountryCode(),store:getStoreCountry(),ready:y});const k=f.iso_code;if(E.current&&(E.current.value=k),k!==void 0)if(window.Shopify.theme.role!=="main"||window.Shopify.designMode)"unit_system"in f&&S.current&&o(Actions$1.updateCartCountry(f,S.current));else if(k=="EU")getStoreCountry()==="EU"&&y&&v(!0);else if(k!==window.localization.country.iso_code)if(!S.current)y&&captureMessage("#localization_form missing","error");else{const I=getMarketSwitchConfig(c,window.localization.country.iso_code,k);switch(console.debug(I),I.status){case MarketSwitchStatus.Store:case MarketSwitchStatus.Domain:case MarketSwitchStatus.Currency:{const T=(C=I.nextMarket.webPresences[0])==null?void 0:C.domain;if(T){const w=new URL(`https://${T}${location.pathname}`);w.searchParams.set("country",k),console.info("Redirecting to",w.toString()),location.replace(w.toString())}else console.error("No domain found for market",I.nextMarket);break}case MarketSwitchStatus.None:S.current&&o(Actions$1.updateCartCountry(f,S.current)),v(!1);break}}else k!==d&&o(Actions$1.updateCartBuyerIdentity(f))},[c,f,y,o]),reactExports.useEffect(()=>{var k;t&&(i({attributes:extractAttributes(t),inputs:Array.from(t.children).filter(C=>{var I;return!includes((I=C.attributes.getNamedItem("name"))==null?void 0:I.value,"return_to","country_code")}).map(extractAttributes)}),(k=t.parentElement)==null||k.remove())},[t]),!n||!y?null:jsxRuntimeExports.jsxs(ErrorBoundary,{children:[(f.iso_code!=="EU"||isShop())&&jsxRuntimeExports.jsxs("button",{className:"button flex items-center space-x-2 rounded-full p-2 hocus:shadow hocus:shadow-black/20 transition-shadow",onClick:k=>v(!0),"aria-label":f.name,children:[jsxRuntimeExports.jsx(CountryIcon,{isoCode:f.iso_code}),jsxRuntimeExports.jsx(Caret,{height:"6px"})]}),jsxRuntimeExports.jsxs(Portal,{open:g,modal:!0,onClick:k=>v(!1),onClose:()=>v(!1),className:"relative flex flex-col xl:p-12",children:[jsxRuntimeExports.jsx("h2",{className:"mb-6 text-center text-5xl md:mb-12",children:u==null?void 0:u.select_country}),jsxRuntimeExports.jsx("ul",{className:"list grid grid-cols-2 gap-2 overflow-scroll p-2 sm:grid-cols-3 xl:grid-cols-4",role:"listbox",children:countryList.map((k,C)=>{var P,A;const{status:I,nextMarket:T}=getMarketSwitchConfig(c??[],f.iso_code,k.iso_code),w=(P=T==null?void 0:T.webPresences[0])==null?void 0:P.domain;let N;return I!==MarketSwitchStatus.None&&(N=new URL(`https://${w}${location.pathname}`),w&&((A=b[w])==null?void 0:A.length)>1&&N.searchParams.set("country",k.iso_code)),jsxRuntimeExports.jsx("li",{role:"option","data-country":k.iso_code,children:jsxRuntimeExports.jsxs(Button,{className:"button hocus:bg-white w-full rounded-xl bg-white p-2 text-black hover:drop-shadow flex items-center space-x-4 text-left",tabIndex:0,href:N==null?void 0:N.toString(),onClick:()=>{const B=countryList.find(X=>X.iso_code===k.iso_code)??k;if(m(B),E.current&&(E.current.value=B.iso_code),I===MarketSwitchStatus.None){const X=new URL(window.location.href);X.searchParams.delete("country"),window.history.replaceState({},"",X.toString()),v(!1)}},autoFocus:C==0,children:[jsxRuntimeExports.jsx(CountryIcon,{isoCode:k.iso_code}),jsxRuntimeExports.jsx("span",{className:"text-xl",role:"presentation",children:k.name})]})},C)})}),jsxRuntimeExports.jsx(Button,{className:"absolute right-0 top-0 rounded-none rounded-bl-md p-4 text-base leading-none sm:-right-5 sm:-top-5 sm:rounded-full",onClick:k=>v(!1),children:jsxRuntimeExports.jsx(Close,{className:"block"})})]}),jsxRuntimeExports.jsxs("form",{...n,ref:S,children:[r.map(k=>jsxRuntimeExports.jsx("input",{...k,style:{display:"none"}},k.name)),jsxRuntimeExports.jsx("input",{type:"hidden",name:"country_code",value:f.iso_code,ref:E}),jsxRuntimeExports.jsx("input",{type:"hidden",name:"return_to",value:`${location.pathname}?country=${f.iso_code}`})]})]})};function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_typeof(t)}function toPrimitive(t,n){if(_typeof(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n);if(_typeof(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}function toPropertyKey(t){var n=toPrimitive(t,"string");return _typeof(n)=="symbol"?n:n+""}function _defineProperty$1(t,n,r){return(n=toPropertyKey(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function ownKeys$1(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,i)}return r}function _objectSpread2$1(t){for(var n=1;n"u"&&(r=n,n=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(formatProdErrorMessage(1));return r(createStore)(t,n)}if(typeof t!="function")throw new Error(formatProdErrorMessage(2));var o=t,u=n,c=[],d=c,f=!1;function m(){d===c&&(d=c.slice())}function g(){if(f)throw new Error(formatProdErrorMessage(3));return u}function v(E){if(typeof E!="function")throw new Error(formatProdErrorMessage(4));if(f)throw new Error(formatProdErrorMessage(5));var b=!0;return m(),d.push(E),function(){if(b){if(f)throw new Error(formatProdErrorMessage(6));b=!1,m();var C=d.indexOf(E);d.splice(C,1),c=null}}}function y(E){if(!isPlainObject(E))throw new Error(formatProdErrorMessage(7));if(typeof E.type>"u")throw new Error(formatProdErrorMessage(8));if(f)throw new Error(formatProdErrorMessage(9));try{f=!0,u=o(u,E)}finally{f=!1}for(var b=c=d,k=0;k"u")throw new Error(formatProdErrorMessage(12));if(typeof r(void 0,{type:ActionTypes.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(formatProdErrorMessage(13))})}function combineReducers(t){for(var n=Object.keys(t),r={},i=0;i"u")throw m&&m.type,new Error(formatProdErrorMessage(14));v[x]=b,g=g||b!==E}return g=g||u.length!==Object.keys(f).length,g?v:f}}function compose(){for(var t=arguments.length,n=new Array(t),r=0;r=0&&t.splice(r,1)}function once$1(t){var n=!1;return function(){n||(n=!0,t())}}var kThrow=function(n){throw n},kReturn=function(n){return{value:n,done:!0}};function makeIterator(t,n,r){n===void 0&&(n=kThrow),r===void 0&&(r="iterator");var i={meta:{name:r},next:t,throw:n,return:kReturn,isSagaIterator:!0};return typeof Symbol<"u"&&(i[Symbol.iterator]=function(){return i}),i}function logError$1(t,n){var r=n.sagaStack;console.error(t),console.error(r)}var createEmptyArray=function(n){return Array.apply(null,new Array(n))},wrapSagaDispatch=function(n){return function(r){return n(Object.defineProperty(r,SAGA_ACTION,{value:!0}))}},shouldTerminate=function(n){return n===TERMINATE},shouldCancel=function(n){return n===TASK_CANCEL},shouldComplete=function(n){return shouldTerminate(n)||shouldCancel(n)};function createAllStyleChildCallbacks(t,n){var r=Object.keys(t),i=r.length,o=0,u,c=array$1(t)?createEmptyArray(i):{},d={};function f(){o===i&&(u=!0,n(c))}return r.forEach(function(m){var g=function(y,x){u||(x||shouldComplete(y)?(n.cancel(),n(y,x)):(c[m]=y,o++,f()))};g.cancel=noop$2,d[m]=g}),n.cancel=function(){u||(u=!0,r.forEach(function(m){return d[m].cancel()}))},d}function getMetaInfo(t){return{name:t.name||"anonymous",location:getLocation(t)}}function getLocation(t){return t[SAGA_LOCATION]}var BUFFER_OVERFLOW="Channel's Buffer overflow!",ON_OVERFLOW_THROW=1,ON_OVERFLOW_SLIDE=3,ON_OVERFLOW_EXPAND=4;function ringBuffer(t,n){t===void 0&&(t=10);var r=new Array(t),i=0,o=0,u=0,c=function(g){r[o]=g,o=(o+1)%t,i++},d=function(){if(i!=0){var g=r[u];return r[u]=null,i--,u=(u+1)%t,g}},f=function(){for(var g=[];i;)g.push(d());return g};return{isEmpty:function(){return i==0},put:function(g){if(i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i2?y-2:0),S=2;Sitem(r,n))};case"CART_REMOVE":return{...t,errors:null,lines:t.lines.filter(r=>r.id!=n.meta),pendingOperation:n.meta};case"CART_COUNTRY_UPDATE_SUCCESS":case"CART_UPDATE_SUCCESS":return{...t,...n.payload,errors:null,pendingOperation:null};case"CART_UPDATE_ERROR":return{...t,...n.payload,open:!0,pendingOperation:null,errors:n.meta};case"CART_UPSELLS_LOAD_SUCCESS":return{...t,upsells:n.payload};case"UPSELL_ADD":return{...t,stagedUpsells:[...t.stagedUpsells,n.payload]};case"UPSELL_UPDATE":return{...t,stagedUpsells:t.stagedUpsells.map(r=>r.id==n.meta?{...r,...n.payload}:r)};case"UPSELL_REMOVE":return{...t,stagedUpsells:t.stagedUpsells.filter(r=>r.id!=n.meta)}}return t}function shippingSettings(t=[],n){switch(n.type){case"SHIPPING_SETTINGS_LOAD_SUCCESS":return n.payload;default:return t}}function markets(t=defaultMarketConfig,n){switch(n.type){case"MARKETS_LOAD_SUCCESS":return n.payload;default:return t}}const initialState={products:null,error:null,upsells:null,upsellCart:null};function products(t=initialState,n){switch(n.type){case"PRODUCTS_LOAD_SUCCESS":return{...t,products:n.payload};case"PRODUCTS_LOAD":return{...t,error:null};case"PRODUCTS_LOAD_ERROR":return{...t,error:n.meta.message};case"UPSELL_LOAD_SUCCESS":return{...t,upsells:n.payload};case"UPSELL_CART_LOAD_SUCCESS":return{...t,upsellCart:n.payload}}return t}const reducers=()=>combineReducers({cart,products,shippingSettings,markets});var done=function(n){return{done:!0,value:n}},qEnd={};function safeName(t){return channel$1(t)?"channel":stringableFunc(t)?String(t):func(t)?t.name:String(t)}function fsmIterator(t,n,r){var i,o,u,c=n;function d(f,m){if(c===qEnd)return done(f);if(m&&!o)throw c=qEnd,m;i&&i(f);var g=m?t[o](m):t[c]();return c=g.nextState,u=g.effect,i=g.stateUpdater,o=g.errorState,c===qEnd?done(f):u}return makeIterator(d,function(f){return d(null,f)},r)}function takeEvery$1(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o2?r-2:0),o=2;o2?r-2:0),o=2;o2?r-2:0),o=2;o2?r-2:0),o=2;o2?r-2:0),o=2;ot.type.startsWith("CART_"),saveState)}function*onCartOpen(t){const n=yield*select(r=>r.cart);n.loaded&&t.payload===!0&&window.Shopify.analytics.publish("cart_viewed",{cart:{id:n.id,attributes:n.attributes.map(r=>({key:r.key,value:r.value??""})),lines:n.lines.map(r=>({id:r.id,quantity:r.quantity,merchandise:{id:r.merchandise.id,title:r.merchandise.title,price:toMoneyV2Numeric(r.merchandise.price),sku:null,untranslatedTitle:r.merchandise.title,image:r.merchandise.image?{src:r.merchandise.image.url}:null,product:{type:r.merchandise.product.productType,url:r.merchandise.product.onlineStoreUrl??null,vendor:r.merchandise.product.vendor,id:r.merchandise.product.id,title:r.merchandise.product.title,handle:r.merchandise.product.handle,untranslatedTitle:r.merchandise.product.title,sku:null}},cost:{totalAmount:toMoneyV2Numeric(r.merchandise.price)}})),cost:{totalAmount:toMoneyV2Numeric(n.cost.totalAmount)},totalQuantity:n.totalQuantity}})}function*saveState(t){const n=yield*select(i=>i.cart),r=["CART_OPEN","CART_FETCH","CART_FETCHED"];n.loaded&&!r.includes(t.type)&&localStorage.setItem("cart",JSON.stringify({...n,...initialState$1}))}function*onCartFetched(t){yield put(Actions$1.cartLoaded(t.payload));const n=t.payload.lines.filter(r=>r.merchandise==null);for(const r of n)yield put(Actions$1.removeFromCart(r.id));yield delay(3e3),addBreadcrumb({category:"checkout",message:`Loaded checkout ${t.payload.id}`,level:"info",data:t.payload})}function*loadUpsells$1(t){var r,i;const n=yield*call$2(()=>shopifyFetch(CartLoadUpsellsDocument,{}));if(!n.errors&&((r=n.data)!=null&&r.items)){const o=(i=n.data.items.references)==null?void 0:i.map(extractConnections).map(u=>{var c,d,f,m,g;return(c=u.item)!=null&&c.reference?{item:(d=u.item)==null?void 0:d.reference,expiry:(f=u.expiry)!=null&&f.value?new Date(u.expiry.value):null,expiryText:((m=u.expiry_text)==null?void 0:m.value)??null,offer:((g=u.offer)==null?void 0:g.value)??void 0}:null}).filter(isPresent);o&&(yield*put(Actions$1.cartUpsellsLoaded(o)))}}function*loadCart(t){let n=0,r=null;for(;++n<=10;){try{const i=JSON.parse(localStorage.getItem("cart"));if(i!=null&&i.id){"lines"in i&&(yield*put(Actions$1.cartFetched(i)));const o=yield*call$2(()=>shopifyFetch(CartLoadDocument,{id:i.id}));if(isError(o)){o.errors.some(c=>c.message.toLowerCase().includes("invalid"))?localStorage.removeItem("cart"):console.warn("Could not load cart",o.errors);continue}const u=o.data;if(console.debug("Checkout loaded",u),u!==null)return console.debug("Checkout loaded",u),i.id.includes(u.id)&&(u.id=i.id),yield*put(Actions$1.cartFetched(u));localStorage.removeItem("cart");continue}else{const o=yield*call$2(()=>shopifyFetch(CartCreateDocument,{}));if(isError(o)){captureException(o.errors[0]),console.error(o.errors);continue}else if(o.data)return console.debug("Checkout created",o.data),yield*put(Actions$1.cartFetched(o.data))}}catch(i){r=i}yield*call$2(sleep,Math.pow(n,2)*500)}if(r){const i=localStorage.getItem("cart");console.warn("Failed to create checkout",r),r.name&&(r.name="CartCreateError"),captureException(r,{extra:{cart:i?JSON.parse(i):null}})}}function*updateCart(t){var o,u;const n=yield*select(c=>c.cart.id);if(!n)return null;const r=(o=t["@CONTEXT"])==null?void 0:o.prevState;let i;switch(t.type){case"CART_ADD":{if(i=yield*call$2(addToCart,t,n),yield*put(Actions$1.openCart(!0)),!isOk(i.res))break;for(const c of t.payload){window.Shopify.analytics.publish("product_added_to_cart",{cartLine:toShopifyAnalyticsCartLine(c,i.res.data)});const d=(u=i.res.data)==null?void 0:u.lines.find(f=>f.merchandise.id===c.id);if(!d)break;window.cvg({method:"track",eventName:"Added To Cart",properties:toConvergeCartLine(d)})}break}case"CART_REMOVE":if(i=yield*call$2(removeFromCart,t,n),isOk(i.res)){window.Shopify.analytics.publish("product_removed_from_cart",{cartLine:toShopifyAnalyticsCartLine(t.meta,r)});const c=r==null?void 0:r.lines.find(d=>d.merchandise.id===t.meta);if(!c)break;window.cvg({method:"track",eventName:"Removed From Cart",properties:toConvergeCartLine(c)})}break;case"CART_QUANTITY_UPDATE":if(i=yield*call$2(updateQuantity,t,n),isOk(i.res)){const c=r==null?void 0:r.lines.find(f=>f.merchandise.id===t.meta);if(!c)break;const d=t.payload-c.quantity;d>0?window.cvg({method:"track",eventName:"Added To Cart",properties:{...toConvergeCartLine(c),quantity:d}}):d<0&&window.cvg({method:"track",eventName:"Removed From Cart",properties:{...toConvergeCartLine(c),quantity:d}})}break;default:return}isOk(i.res)?yield*put(Actions$1.updateCartSucess(i.res.data)):i.message&&(yield*put(Actions$1.updateCartError(i.res.data??r,[new CartError(i.message,i.res)])))}async function removeFromCart(t,n){const r=[toGraphId(t.meta,"variant")],i=await shopifyFetch(CartRemoveDocument,{id:n,lines:r});return cartResponse(i,"Error removing from cart")}async function addToCart(t,n){const r=t.payload.map(o=>({quantity:o.quantity,merchandiseId:toGraphId(o.id,"variant"),attributes:o.attributes})),i=await shopifyFetch(CartAddDocument,{id:n,lines:r});return cartResponse(i,"Error adding to cart")}async function updateQuantity(t,n){const r=[{id:toGraphId(t.meta,"variant"),quantity:t.payload}],i=await shopifyFetch(CartUpdateDocument,{id:n,lines:r});return cartResponse(i,"Error updating quantity")}function cartResponse(t,n){return{res:t,message:isOk(t)?null:n}}function*countrySagas(){yield*takeLatest("CART_COUNTRY_UPDATE",updateCountry),yield*takeLatest("CART_BUYER_IDENTITY_UPDATE",updateCountry),yield*takeLatest("CART_COUNTRY_UPDATE",updateCountryCookie),yield*takeLatest("CART_COUNTRY_UPDATE",updatePrefferedCountry),yield*takeLatest("CART_COUNTRY_UPDATE",loadDeliveryProfiles),yield*takeLatest("SHIPPING_SETTINGS_LOAD",loadDeliveryProfiles),yield*takeLatest("MARKETS_LOAD",loadMarkets)}function*updateCountry(t){const{name:n,iso_code:r}=t.payload,i=yield*select(o=>o.cart.id);if(i&&r!=="EU"){const o=yield*call$2(()=>shopifyFetch(CartLoadDocument,{id:i,country:r})),u={id:i,country:r,shippingAddress:{country:n}},c=yield*call$2(()=>shopifyFetch(CartUpdateCountryDocument,u));isOk(c)?yield*put(Actions$1.updateCartCountrySuccesss(c.data,t.payload)):isOk(o)&&(yield*put(Actions$1.updateCartCountrySuccesss(o.data,t.payload))),isError(c)&&console.info("updateShippingCountryErrors",c.errors)}}function*updateCountryCookie(t){const{payload:n,meta:r}=t,i=document.cookie.split("; ").map(o=>o.includes("localization")?`localization=${n.iso_code}`:o);document.cookie=i.join("; "),yield*call$2(fetch,r.action,{method:"POST",credentials:"include",redirect:"manual",body:new FormData(r)})}function*updatePrefferedCountry(t){const n=t.payload;yield localStorage.setItem("preferredCountry",JSON.stringify({...n,updatedDate:new Date})),yield localStorage.setItem("preferredCountryCode",n.iso_code),yield*delay(50)}function*loadDeliveryProfiles(t){try{const n=t.type==="CART_COUNTRY_UPDATE"?t.payload.iso_code:getCurrentCountry().iso_code;if((yield*select(u=>u.shippingSettings)).some(u=>u.countries.includes(n)))return;const i=yield*call$2(()=>fetch(`${AUK_API_URL}/s?country=${n}&store=${getStoreCountry()}`));if(!i.ok)throw new Error(`Failed to load delivery profiles: ${i.statusText}`);const o=yield*call$2(()=>i.json());yield*put(Actions$1.deliveryProfilesLoaded(Array.isArray(o)?o:[o]))}catch(n){console.error(n)}}function*loadMarkets(t){try{const n=yield*call$2(()=>fetch(`${AUK_API_URL}/m`));if(!n.ok)throw new Error(`Failed to load markets: ${n.statusText}`);const r=yield*call$2(()=>n.json());yield*put(Actions$1.marketsLoaded(r))}catch(n){console.error(n)}}function*productSagas(){yield*takeLeading("PRODUCTS_LOAD",loadProducts),yield*takeEvery("UPSELL_LOAD",loadUpsells),yield*takeEvery("UPSELL_ADD",onUpsellChange),yield*takeEvery("UPSELL_REMOVE",onUpsellChange)}function*loadProducts(t){let n;try{const r=yield*call$2(()=>shopifyFetch(ProductsDocument,{}));if(isOk(r))return yield*put(Actions$1.productsLoaded(r.data));isError(r)&&(n=r.errors[0])}catch{const i=getCurrentLanguage().locale,o=yield*call$2(loadTranslations,i,"react.products.load_error");n=new AukError(o,n,{action:{...t}})}n&&(yield*put(Actions$1.productsFailed(n)))}function*loadUpsells(t){const n=t.payload,r=extractUpsells(n,t.meta).map(o=>o.id),i=[n.variants[0].id,...r].map(o=>({merchandiseId:o,quantity:1}));try{const[o,u]=yield*all([call$2(()=>shopifyFetch(UpsellCheckoutCreateDocument,{lines:i})),call$2(()=>shopifyFetch(UpsellDocument,{variantIds:r}))]);isOk(u)?yield*put(Actions$1.upsellsLoaded(u.data,n.id)):yield*put(Actions$1.upsellsLoaded([],n.id)),isOk(o)&&(yield*put(Actions$1.upsellsCartLoaded(o.data)))}catch{yield*put(Actions$1.upsellsLoaded([],n.id))}}function*onUpsellChange(t){const n=yield*select(o=>o.products.upsellCart);if(!n)return;const r=t.type==="UPSELL_ADD"?t.payload.id:t.meta,i=new AbortController;try{let o;switch(t.type){case"UPSELL_ADD":o=yield*call$2(()=>shopifyFetch(UpsellCartAddDocument,{id:n.id,lines:[{merchandiseId:r,quantity:1}]},i.signal));break;case"UPSELL_REMOVE":{const u=n.lines.find(c=>c.merchandise.id===r);if(!u)return;o=yield*call$2(()=>shopifyFetch(UpsellCartRemoveDocument,{id:n.id,lines:[u.id]},i.signal));break}}if(isOk(o)){yield*put(Actions$1.upsellsCartLoaded(o.data));const u=o.data.lines;if(u)for(const c of u){const d=c.discountAllocations.reduce((f,m)=>f+getDiscountValue(m),0);yield*put(Actions$1.updateUpsell({discounts:d},c.merchandise.id))}}}finally{(yield*cancelled())&&i.abort()}}function*reportingSagas(){yield*takeEvery(t=>t.type.endsWith("ERROR"),logError),yield*takeEvery(t=>!t.type.endsWith("ERROR")&&t.type.includes("CART"),logAction)}function*logError(t){const{meta:n}=t;if(n===void 0)return;const r=isArray(n)?n:[n];for(const i of r)console.warn(i.message,i),yield captureError(i)}function*logAction(t){var r;!(yield*select(i=>i.cart)).loaded||t.type==="CART_OPEN"||(yield*call$2(addBreadcrumb,{category:((r=t.type.split("_")[0])==null?void 0:r.toLowerCase())||"unknown",message:t.type,level:"info",data:t}))}const CANCEL_SAGAS_HMR="CANCEL_SAGAS_HMR",sagas=[cartSagas,countrySagas,productSagas,reportingSagas];function makeRestartable(t){return function*(){for(;;){try{yield*call$2(t);break}catch(n){console.warn(`Saga '${t.name}' failed.`,n)}yield*delay(1e3)}}}function createAbortableSaga(t){return t}const SagaManager={startSagas(t){sagas.map(makeRestartable).map(createAbortableSaga).forEach(n=>t.run(n))},cancelSagas(t){t.dispatch({type:CANCEL_SAGAS_HMR})}},actionInterceptor=t=>n=>t(n),effectMiddleware=t=>actionInterceptor(t),sagaMiddleware=sagaMiddlewareFactory({effectMiddlewares:[effectMiddleware]}),optimisticUpdateHelper=t=>n=>r=>{var i;return(i=r["@CONTEXT"])!=null&&i.optimistic?n({...r,"@CONTEXT":{...r["@CONTEXT"],prevState:t.getState().cart}}):n(r)},middlewares=[optimisticUpdateHelper,sagaMiddleware],composeEnhancers=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||compose;function configureStore(t){const n=createStore(reducers(),{},composeEnhancers(applyMiddleware(...middlewares)));return SagaManager.startSagas(sagaMiddleware),n}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(t){for(var n=1;n"u")throw new Error(n)}function createKey(){return Math.random().toString(36).substr(2,8)}function getHistoryState(t,n){return{usr:t.state,key:t.key,idx:n}}function createLocation(t,n,r,i){return r===void 0&&(r=null),_extends$1({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof n=="string"?parsePath(n):n,{state:r,key:n&&n.key||i||createKey()})}function createPath(t){let{pathname:n="/",search:r="",hash:i=""}=t;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function parsePath(t){let n={};if(t){let r=t.indexOf("#");r>=0&&(n.hash=t.substr(r),t=t.substr(0,r));let i=t.indexOf("?");i>=0&&(n.search=t.substr(i),t=t.substr(0,i)),t&&(n.pathname=t)}return n}function getUrlBasedHistory(t,n,r,i){i===void 0&&(i={});let{window:o=document.defaultView,v5Compat:u=!1}=i,c=o.history,d=Action$1.Pop,f=null,m=g();m==null&&(m=0,c.replaceState(_extends$1({},c.state,{idx:m}),""));function g(){return(c.state||{idx:null}).idx}function v(){d=Action$1.Pop;let b=g(),k=b==null?null:b-m;m=b,f&&f({action:d,location:E.location,delta:k})}function y(b,k){d=Action$1.Push;let C=createLocation(E.location,b,k);m=g()+1;let I=getHistoryState(C,m),T=E.createHref(C);try{c.pushState(I,"",T)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;o.location.assign(T)}u&&f&&f({action:d,location:E.location,delta:1})}function x(b,k){d=Action$1.Replace;let C=createLocation(E.location,b,k);m=g();let I=getHistoryState(C,m),T=E.createHref(C);c.replaceState(I,"",T),u&&f&&f({action:d,location:E.location,delta:0})}function S(b){let k=o.location.origin!=="null"?o.location.origin:o.location.href,C=typeof b=="string"?b:createPath(b);return C=C.replace(/ $/,"%20"),invariant(k,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,k)}let E={get action(){return d},get location(){return t(o,c)},listen(b){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(PopStateEventType,v),f=b,()=>{o.removeEventListener(PopStateEventType,v),f=null}},createHref(b){return n(o,b)},createURL:S,encodeLocation(b){let k=S(b);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:y,replace:x,go(b){return c.go(b)}};return E}var ResultType;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(ResultType||(ResultType={}));function stripBasename(t,n){if(n==="/")return t;if(!t.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,i=t.charAt(r);return i&&i!=="/"?null:t.slice(r)||"/"}function resolvePath(t,n){n===void 0&&(n="/");let{pathname:r,search:i="",hash:o=""}=typeof t=="string"?parsePath(t):t;return{pathname:r?r.startsWith("/")?r:resolvePathname(r,n):n,search:normalizeSearch(i),hash:normalizeHash(o)}}function resolvePathname(t,n){let r=n.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function getInvalidPathError(t,n,r,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function getPathContributingMatches(t){return t.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function getResolveToMatches(t,n){let r=getPathContributingMatches(t);return n?r.map((i,o)=>o===r.length-1?i.pathname:i.pathnameBase):r.map(i=>i.pathnameBase)}function resolveTo(t,n,r,i){i===void 0&&(i=!1);let o;typeof t=="string"?o=parsePath(t):(o=_extends$1({},t),invariant(!o.pathname||!o.pathname.includes("?"),getInvalidPathError("?","pathname","search",o)),invariant(!o.pathname||!o.pathname.includes("#"),getInvalidPathError("#","pathname","hash",o)),invariant(!o.search||!o.search.includes("#"),getInvalidPathError("#","search","hash",o)));let u=t===""||o.pathname==="",c=u?"/":o.pathname,d;if(c==null)d=r;else{let v=n.length-1;if(!i&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),v-=1;o.pathname=y.join("/")}d=v>=0?n[v]:"/"}let f=resolvePath(o,d),m=c&&c!=="/"&&c.endsWith("/"),g=(u||c===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(m||g)&&(f.pathname+="/"),f}const joinPaths=t=>t.join("/").replace(/\/\/+/g,"/"),normalizeSearch=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,normalizeHash=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,validMutationMethodsArr=["post","put","patch","delete"];new Set(validMutationMethodsArr);const validRequestMethodsArr=["get",...validMutationMethodsArr];new Set(validRequestMethodsArr);function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var n=1;n{d.current=!0}),reactExports.useCallback(function(m,g){if(g===void 0&&(g={}),!d.current)return;if(typeof m=="number"){i.go(m);return}let v=resolveTo(m,JSON.parse(c),u,g.relative==="path");t==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:joinPaths([n,v.pathname])),(g.replace?i.replace:i.push)(v,g.state,g)},[n,i,c,u,t])}var DataRouterHook$1=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(DataRouterHook$1||{}),DataRouterStateHook$1=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(DataRouterStateHook$1||{});function useDataRouterContext(t){let n=reactExports.useContext(DataRouterContext);return n||invariant(!1),n}function useRouteContext(t){let n=reactExports.useContext(RouteContext);return n||invariant(!1),n}function useCurrentRouteId(t){let n=useRouteContext(),r=n.matches[n.matches.length-1];return r.route.id||invariant(!1),r.route.id}function useNavigateStable(){let{router:t}=useDataRouterContext(DataRouterHook$1.UseNavigateStable),n=useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable),r=reactExports.useRef(!1);return useIsomorphicLayoutEffect$1(()=>{r.current=!0}),reactExports.useCallback(function(o,u){u===void 0&&(u={}),r.current&&(typeof o=="number"?t.navigate(o):t.navigate(o,_extends({fromRouteId:n},u)))},[t,n])}function logV6DeprecationWarnings(t,n){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Router(t){let{basename:n="/",children:r=null,location:i,navigationType:o=Action$1.Pop,navigator:u,static:c=!1,future:d}=t;useInRouterContext()&&invariant(!1);let f=n.replace(/^\/*/,"/"),m=reactExports.useMemo(()=>({basename:f,navigator:u,static:c,future:_extends({v7_relativeSplatPath:!1},d)}),[f,d,u,c]);typeof i=="string"&&(i=parsePath(i));let{pathname:g="/",search:v="",hash:y="",state:x=null,key:S="default"}=i,E=reactExports.useMemo(()=>{let b=stripBasename(g,f);return b==null?null:{location:{pathname:b,search:v,hash:y,state:x,key:S},navigationType:o}},[f,g,v,y,x,S,o]);return E==null?null:reactExports.createElement(NavigationContext.Provider,{value:m},reactExports.createElement(LocationContext.Provider,{children:r,value:E}))}new Promise(()=>{});function createSearchParams(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((n,r)=>{let i=t[r];return n.concat(Array.isArray(i)?i.map(o=>[r,o]):[[r,i]])},[]))}function getSearchParamsForLocation(t,n){let r=createSearchParams(t);return n&&n.forEach((i,o)=>{r.has(o)||n.getAll(o).forEach(u=>{r.append(o,u)})}),r}const REACT_ROUTER_VERSION="6";try{window.__reactRouterVersion=REACT_ROUTER_VERSION}catch{}const START_TRANSITION="startTransition",startTransitionImpl=React$1[START_TRANSITION];function BrowserRouter(t){let{basename:n,children:r,future:i,window:o}=t,u=reactExports.useRef();u.current==null&&(u.current=createBrowserHistory({window:o,v5Compat:!0}));let c=u.current,[d,f]=reactExports.useState({action:c.action,location:c.location}),{v7_startTransition:m}=i||{},g=reactExports.useCallback(v=>{m&&startTransitionImpl?startTransitionImpl(()=>f(v)):f(v)},[f,m]);return reactExports.useLayoutEffect(()=>c.listen(g),[c,g]),reactExports.useEffect(()=>logV6DeprecationWarnings(i),[i]),reactExports.createElement(Router,{basename:n,children:r,location:d.location,navigationType:d.action,navigator:c,future:i})}var DataRouterHook;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(DataRouterHook||(DataRouterHook={}));var DataRouterStateHook;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(DataRouterStateHook||(DataRouterStateHook={}));function useSearchParams(t){let n=reactExports.useRef(createSearchParams(t)),r=reactExports.useRef(!1),i=useLocation(),o=reactExports.useMemo(()=>getSearchParamsForLocation(i.search,r.current?null:n.current),[i.search]),u=useNavigate(),c=reactExports.useCallback((d,f)=>{const m=createSearchParams(typeof d=="function"?d(o):d);r.current=!0,u("?"+m,f)},[u,o]);return[o,c]}var updateQueue=makeQueue(),raf=t=>schedule(t,updateQueue),writeQueue=makeQueue();raf.write=t=>schedule(t,writeQueue);var onStartQueue=makeQueue();raf.onStart=t=>schedule(t,onStartQueue);var onFrameQueue=makeQueue();raf.onFrame=t=>schedule(t,onFrameQueue);var onFinishQueue=makeQueue();raf.onFinish=t=>schedule(t,onFinishQueue);var timeouts=[];raf.setTimeout=(t,n)=>{const r=raf.now()+n,i=()=>{const u=timeouts.findIndex(c=>c.cancel==i);~u&&timeouts.splice(u,1),pendingCount-=~u?1:0},o={time:r,handler:t,cancel:i};return timeouts.splice(findTimeout(r),0,o),pendingCount+=1,start(),o};var findTimeout=t=>~(~timeouts.findIndex(n=>n.time>t)||~timeouts.length);raf.cancel=t=>{onStartQueue.delete(t),onFrameQueue.delete(t),onFinishQueue.delete(t),updateQueue.delete(t),writeQueue.delete(t)};raf.sync=t=>{sync=!0,raf.batchedUpdates(t),sync=!1};raf.throttle=t=>{let n;function r(){try{t(...n)}finally{n=null}}function i(...o){n=o,raf.onStart(r)}return i.handler=t,i.cancel=()=>{onStartQueue.delete(r),n=null},i};var nativeRaf=typeof window<"u"?window.requestAnimationFrame:()=>{};raf.use=t=>nativeRaf=t;raf.now=typeof performance<"u"?()=>performance.now():Date.now;raf.batchedUpdates=t=>t();raf.catch=console.error;raf.frameLoop="always";raf.advance=()=>{raf.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):update()};var ts=-1,pendingCount=0,sync=!1;function schedule(t,n){sync?(n.delete(t),t(0)):(n.add(t),start())}function start(){ts<0&&(ts=0,raf.frameLoop!=="demand"&&nativeRaf(loop))}function stop(){ts=-1}function loop(){~ts&&(nativeRaf(loop),raf.batchedUpdates(update))}function update(){const t=ts;ts=raf.now();const n=findTimeout(ts);if(n&&(eachSafely(timeouts.splice(0,n),r=>r.handler()),pendingCount-=n),!pendingCount){stop();return}onStartQueue.flush(),updateQueue.flush(t?Math.min(64,ts-t):16.667),onFrameQueue.flush(),writeQueue.flush(),onFinishQueue.flush()}function makeQueue(){let t=new Set,n=t;return{add(r){pendingCount+=n==t&&!t.has(r)?1:0,t.add(r)},delete(r){return pendingCount-=n==t&&t.has(r)?1:0,t.delete(r)},flush(r){n.size&&(t=new Set,pendingCount-=n.size,eachSafely(n,i=>i(r)&&t.add(i)),pendingCount+=t.size,n=t)}}}function eachSafely(t,n){t.forEach(r=>{try{n(r)}catch(i){raf.catch(i)}})}var __defProp=Object.defineProperty,__export=(t,n)=>{for(var r in n)__defProp(t,r,{get:n[r],enumerable:!0})},globals_exports={};__export(globals_exports,{assign:()=>assign,colors:()=>colors,createStringInterpolator:()=>createStringInterpolator,skipAnimation:()=>skipAnimation,to:()=>to,willAdvance:()=>willAdvance});function noop$1(){}var defineHidden=(t,n,r)=>Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0}),is={arr:Array.isArray,obj:t=>!!t&&t.constructor.name==="Object",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0};function isEqual(t,n){if(is.arr(t)){if(!is.arr(n)||t.length!==n.length)return!1;for(let r=0;rt.forEach(n);function eachProp(t,n,r){if(is.arr(t)){for(let i=0;iis.und(t)?[]:is.arr(t)?t:[t];function flush(t,n){if(t.size){const r=Array.from(t);t.clear(),each(r,n)}}var flushCalls=(t,...n)=>flush(t,r=>r(...n)),isSSR=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),createStringInterpolator,to,colors=null,skipAnimation=!1,willAdvance=noop$1,assign=t=>{t.to&&(to=t.to),t.now&&(raf.now=t.now),t.colors!==void 0&&(colors=t.colors),t.skipAnimation!=null&&(skipAnimation=t.skipAnimation),t.createStringInterpolator&&(createStringInterpolator=t.createStringInterpolator),t.requestAnimationFrame&&raf.use(t.requestAnimationFrame),t.batchedUpdates&&(raf.batchedUpdates=t.batchedUpdates),t.willAdvance&&(willAdvance=t.willAdvance),t.frameLoop&&(raf.frameLoop=t.frameLoop)},startQueue=new Set,currentFrame=[],prevFrame=[],priority=0,frameLoop={get idle(){return!startQueue.size&&!currentFrame.length},start(t){priority>t.priority?(startQueue.add(t),raf.onStart(flushStartQueue)):(startSafely(t),raf(advance))},advance,sort(t){if(priority)raf.onFrame(()=>frameLoop.sort(t));else{const n=currentFrame.indexOf(t);~n&&(currentFrame.splice(n,1),startUnsafely(t))}},clear(){currentFrame=[],startQueue.clear()}};function flushStartQueue(){startQueue.forEach(startSafely),startQueue.clear(),raf(advance)}function startSafely(t){currentFrame.includes(t)||startUnsafely(t)}function startUnsafely(t){currentFrame.splice(findIndex(currentFrame,n=>n.priority>t.priority),0,t)}function advance(t){const n=prevFrame;for(let r=0;r0}function findIndex(t,n){const r=t.findIndex(n);return r<0?t.length:r}var colors2={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function call$1(...t){return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var rgb=new RegExp("rgb"+call$1(NUMBER,NUMBER,NUMBER)),rgba=new RegExp("rgba"+call$1(NUMBER,NUMBER,NUMBER,NUMBER)),hsl=new RegExp("hsl"+call$1(NUMBER,PERCENTAGE,PERCENTAGE)),hsla=new RegExp("hsla"+call$1(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6=/^#([0-9a-fA-F]{6})$/,hex8=/^#([0-9a-fA-F]{8})$/;function normalizeColor(t){let n;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=hex6.exec(t))?parseInt(n[1]+"ff",16)>>>0:colors&&colors[t]!==void 0?colors[t]:(n=rgb.exec(t))?(parse255(n[1])<<24|parse255(n[2])<<16|parse255(n[3])<<8|255)>>>0:(n=rgba.exec(t))?(parse255(n[1])<<24|parse255(n[2])<<16|parse255(n[3])<<8|parse1(n[4]))>>>0:(n=hex3.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=hex8.exec(t))?parseInt(n[1],16)>>>0:(n=hex4.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=hsl.exec(t))?(hslToRgb(parse360(n[1]),parsePercentage(n[2]),parsePercentage(n[3]))|255)>>>0:(n=hsla.exec(t))?(hslToRgb(parse360(n[1]),parsePercentage(n[2]),parsePercentage(n[3]))|parse1(n[4]))>>>0:null}function hue2rgb(t,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}function hslToRgb(t,n,r){const i=r<.5?r*(1+n):r+n-r*n,o=2*r-i,u=hue2rgb(o,i,t+1/3),c=hue2rgb(o,i,t),d=hue2rgb(o,i,t-1/3);return Math.round(u*255)<<24|Math.round(c*255)<<16|Math.round(d*255)<<8}function parse255(t){const n=parseInt(t,10);return n<0?0:n>255?255:n}function parse360(t){return(parseFloat(t)%360+360)%360/360}function parse1(t){const n=parseFloat(t);return n<0?0:n>1?255:Math.round(n*255)}function parsePercentage(t){const n=parseFloat(t);return n<0?0:n>100?1:n/100}function colorToRgba(t){let n=normalizeColor(t);if(n===null)return t;n=n||0;const r=(n&4278190080)>>>24,i=(n&16711680)>>>16,o=(n&65280)>>>8,u=(n&255)/255;return`rgba(${r}, ${i}, ${o}, ${u})`}var createInterpolator=(t,n,r)=>{if(is.fun(t))return t;if(is.arr(t))return createInterpolator({range:t,output:n,extrapolate:r});if(is.str(t.output[0]))return createStringInterpolator(t);const i=t,o=i.output,u=i.range||[0,1],c=i.extrapolateLeft||i.extrapolate||"extend",d=i.extrapolateRight||i.extrapolate||"extend",f=i.easing||(m=>m);return m=>{const g=findRange(m,u);return interpolate(m,u[g],u[g+1],o[g],o[g+1],f,c,d,i.map)}};function interpolate(t,n,r,i,o,u,c,d,f){let m=f?f(t):t;if(mr){if(d==="identity")return m;d==="clamp"&&(m=r)}return i===o?i:n===r?t<=n?i:o:(n===-1/0?m=-m:r===1/0?m=m-n:m=(m-n)/(r-n),m=u(m),i===-1/0?m=-m:o===1/0?m=m+i:m=m*(o-i)+i,m)}function findRange(t,n){for(var r=1;r=t);++r);return r-1}var easings={linear:t=>t},$get=Symbol.for("FluidValue.get"),$observers=Symbol.for("FluidValue.observers"),hasFluidValue=t=>!!(t&&t[$get]),getFluidValue=t=>t&&t[$get]?t[$get]():t,getFluidObservers=t=>t[$observers]||null;function callFluidObserver(t,n){t.eventObserved?t.eventObserved(n):t(n)}function callFluidObservers(t,n){const r=t[$observers];r&&r.forEach(i=>{callFluidObserver(i,n)})}var FluidValue=class{constructor(t){if(!t&&!(t=this.get))throw Error("Unknown getter");setFluidGetter(this,t)}},setFluidGetter=(t,n)=>setHidden(t,$get,n);function addFluidObserver(t,n){if(t[$get]){let r=t[$observers];r||setHidden(t,$observers,r=new Set),r.has(n)||(r.add(n),t.observerAdded&&t.observerAdded(r.size,n))}return n}function removeFluidObserver(t,n){const r=t[$observers];if(r&&r.has(n)){const i=r.size-1;i?r.delete(n):t[$observers]=null,t.observerRemoved&&t.observerRemoved(i,n)}}var setHidden=(t,n,r)=>Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0}),numberRegex=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,colorRegex=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,unitRegex=new RegExp(`(${numberRegex.source})(%|[a-z]+)`,"i"),rgbaRegex=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cssVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,variableToRgba=t=>{const[n,r]=parseCSSVariable(t);if(!n||isSSR())return t;const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);if(i)return i.trim();if(r&&r.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(r);return o||t}else{if(r&&cssVariableRegex.test(r))return variableToRgba(r);if(r)return r}return t},parseCSSVariable=t=>{const n=cssVariableRegex.exec(t);if(!n)return[,];const[,r,i]=n;return[r,i]},namedColorRegex,rgbaRound=(t,n,r,i,o)=>`rgba(${Math.round(n)}, ${Math.round(r)}, ${Math.round(i)}, ${o})`,createStringInterpolator2=t=>{namedColorRegex||(namedColorRegex=colors?new RegExp(`(${Object.keys(colors).join("|")})(?!\\w)`,"g"):/^\b$/);const n=t.output.map(u=>getFluidValue(u).replace(cssVariableRegex,variableToRgba).replace(colorRegex,colorToRgba).replace(namedColorRegex,colorToRgba)),r=n.map(u=>u.match(numberRegex).map(Number)),o=r[0].map((u,c)=>r.map(d=>{if(!(c in d))throw Error('The arity of each "output" value must be equal');return d[c]})).map(u=>createInterpolator({...t,output:u}));return u=>{var f;const c=!unitRegex.test(n[0])&&((f=n.find(m=>unitRegex.test(m)))==null?void 0:f.replace(numberRegex,""));let d=0;return n[0].replace(numberRegex,()=>`${o[d++](u)}${c||""}`).replace(rgbaRegex,rgbaRound)}},prefix="react-spring: ",once=t=>{const n=t;let r=!1;if(typeof n!="function")throw new TypeError(`${prefix}once requires a function parameter`);return(...i)=>{r||(n(...i),r=!0)}},warnInterpolate=once(console.warn);function deprecateInterpolate(){warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var warnDirectCall=once(console.warn);function deprecateDirectCall(){warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function isAnimatedString(t){return is.str(t)&&(t[0]=="#"||/\d/.test(t)||!isSSR()&&cssVariableRegex.test(t)||t in(colors||{}))}var useIsomorphicLayoutEffect=isSSR()?reactExports.useEffect:reactExports.useLayoutEffect,useIsMounted=()=>{const t=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t};function useForceUpdate(){const t=reactExports.useState()[1],n=useIsMounted();return()=>{n.current&&t(Math.random())}}function useMemoOne(t,n){const[r]=reactExports.useState(()=>({inputs:n,result:t()})),i=reactExports.useRef(),o=i.current;let u=o;return u?n&&u.inputs&&areInputsEqual(n,u.inputs)||(u={inputs:n,result:t()}):u=r,reactExports.useEffect(()=>{i.current=u,o==r&&(r.inputs=r.result=void 0)},[u]),u.result}function areInputsEqual(t,n){if(t.length!==n.length)return!1;for(let r=0;rreactExports.useEffect(t,emptyDeps),emptyDeps=[];function usePrev(t){const n=reactExports.useRef();return reactExports.useEffect(()=>{n.current=t}),n.current}var $node=Symbol.for("Animated:node"),isAnimated=t=>!!t&&t[$node]===t,getAnimated=t=>t&&t[$node],setAnimated=(t,n)=>defineHidden(t,$node,n),getPayload=t=>t&&t[$node]&&t[$node].getPayload(),Animated=class{constructor(){setAnimated(this,this)}getPayload(){return this.payload||[]}},AnimatedValue=class extends Animated{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,is.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new AnimatedValue(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,n){return is.num(t)&&(this.lastPosition=t,n&&(t=Math.round(t/n)*n,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,is.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},AnimatedString=class extends AnimatedValue{constructor(t){super(0),this._string=null,this._toString=createInterpolator({output:[t,t]})}static create(t){return new AnimatedString(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(is.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=createInterpolator({output:[this.getValue(),t]})),this._value=0,super.reset()}},TreeContext={dependencies:null},AnimatedObject=class extends Animated{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){const n={};return eachProp(this.source,(r,i)=>{isAnimated(r)?n[i]=r.getValue(t):hasFluidValue(r)?n[i]=getFluidValue(r):t||(n[i]=r)}),n}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&each(this.payload,t=>t.reset())}_makePayload(t){if(t){const n=new Set;return eachProp(t,this._addToPayload,n),Array.from(n)}}_addToPayload(t){TreeContext.dependencies&&hasFluidValue(t)&&TreeContext.dependencies.add(t);const n=getPayload(t);n&&each(n,r=>this.add(r))}},AnimatedArray=class extends AnimatedObject{constructor(t){super(t)}static create(t){return new AnimatedArray(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const n=this.getPayload();return t.length==n.length?n.map((r,i)=>r.setValue(t[i])).some(Boolean):(super.setValue(t.map(makeAnimated)),!0)}};function makeAnimated(t){return(isAnimatedString(t)?AnimatedString:AnimatedValue).create(t)}function getAnimatedType(t){const n=getAnimated(t);return n?n.constructor:is.arr(t)?AnimatedArray:isAnimatedString(t)?AnimatedString:AnimatedValue}var withAnimated=(t,n)=>{const r=!is.fun(t)||t.prototype&&t.prototype.isReactComponent;return reactExports.forwardRef((i,o)=>{const u=reactExports.useRef(null),c=r&&reactExports.useCallback(S=>{u.current=updateRef(o,S)},[o]),[d,f]=getAnimatedState(i,n),m=useForceUpdate(),g=()=>{const S=u.current;if(r&&!S)return;(S?n.applyAnimatedValues(S,d.getValue(!0)):!1)===!1&&m()},v=new PropsObserver(g,f),y=reactExports.useRef();useIsomorphicLayoutEffect(()=>(y.current=v,each(f,S=>addFluidObserver(S,v)),()=>{y.current&&(each(y.current.deps,S=>removeFluidObserver(S,y.current)),raf.cancel(y.current.update))})),reactExports.useEffect(g,[]),useOnce(()=>()=>{const S=y.current;each(S.deps,E=>removeFluidObserver(E,S))});const x=n.getComponentProps(d.getValue());return reactExports.createElement(t,{...x,ref:c})})},PropsObserver=class{constructor(t,n){this.update=t,this.deps=n}eventObserved(t){t.type=="change"&&raf.write(this.update)}};function getAnimatedState(t,n){const r=new Set;return TreeContext.dependencies=r,t.style&&(t={...t,style:n.createAnimatedStyle(t.style)}),t=new AnimatedObject(t),TreeContext.dependencies=null,[t,r]}function updateRef(t,n){return t&&(is.fun(t)?t(n):t.current=n),n}var cacheKey=Symbol.for("AnimatedComponent"),createHost=(t,{applyAnimatedValues:n=()=>!1,createAnimatedStyle:r=o=>new AnimatedObject(o),getComponentProps:i=o=>o}={})=>{const o={applyAnimatedValues:n,createAnimatedStyle:r,getComponentProps:i},u=c=>{const d=getDisplayName(c)||"Anonymous";return is.str(c)?c=u[c]||(u[c]=withAnimated(c,o)):c=c[cacheKey]||(c[cacheKey]=withAnimated(c,o)),c.displayName=`Animated(${d})`,c};return eachProp(t,(c,d)=>{is.arr(t)&&(d=getDisplayName(c)),u[d]=u(c)}),{animated:u}},getDisplayName=t=>is.str(t)?t:t&&is.str(t.displayName)?t.displayName:is.fun(t)&&t.name||null;function callProp(t,...n){return is.fun(t)?t(...n):t}var matchProp=(t,n)=>t===!0||!!(n&&t&&(is.fun(t)?t(n):toArray(t).includes(n))),resolveProp=(t,n)=>is.obj(t)?n&&t[n]:t,getDefaultProp=(t,n)=>t.default===!0?t[n]:t.default?t.default[n]:void 0,noopTransform=t=>t,getDefaultProps=(t,n=noopTransform)=>{let r=DEFAULT_PROPS;t.default&&t.default!==!0&&(t=t.default,r=Object.keys(t));const i={};for(const o of r){const u=n(t[o],o);is.und(u)||(i[o]=u)}return i},DEFAULT_PROPS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],RESERVED_PROPS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function getForwardProps(t){const n={};let r=0;if(eachProp(t,(i,o)=>{RESERVED_PROPS[o]||(n[o]=i,r++)}),r)return n}function inferTo(t){const n=getForwardProps(t);if(n){const r={to:n};return eachProp(t,(i,o)=>o in n||(r[o]=i)),r}return{...t}}function computeGoal(t){return t=getFluidValue(t),is.arr(t)?t.map(computeGoal):isAnimatedString(t)?globals_exports.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function hasProps(t){for(const n in t)return!0;return!1}function isAsyncTo(t){return is.fun(t)||is.arr(t)&&is.obj(t[0])}function detachRefs(t,n){var r;(r=t.ref)==null||r.delete(t),n==null||n.delete(t)}function replaceRef(t,n){var r;n&&t.ref!==n&&((r=t.ref)==null||r.delete(t),n.add(t),t.ref=n)}var config={default:{tension:170,friction:26},stiff:{tension:210,friction:20}},defaults={...config.default,mass:1,damping:1,easing:easings.linear,clamp:!1},AnimationConfig=class{constructor(){this.velocity=0,Object.assign(this,defaults)}};function mergeConfig(t,n,r){r&&(r={...r},sanitizeConfig(r,n),n={...r,...n}),sanitizeConfig(t,n),Object.assign(t,n);for(const c in defaults)t[c]==null&&(t[c]=defaults[c]);let{frequency:i,damping:o}=t;const{mass:u}=t;return is.und(i)||(i<.01&&(i=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/i,2)*u,t.friction=4*Math.PI*o*u/i),t}function sanitizeConfig(t,n){if(!is.und(n.decay))t.duration=void 0;else{const r=!is.und(n.tension)||!is.und(n.friction);(r||!is.und(n.frequency)||!is.und(n.damping)||!is.und(n.mass))&&(t.duration=void 0,t.decay=void 0),r&&(t.frequency=void 0)}}var emptyArray=[],Animation=class{constructor(){this.changed=!1,this.values=emptyArray,this.toValues=null,this.fromValues=emptyArray,this.config=new AnimationConfig,this.immediate=!1}};function scheduleProps(t,{key:n,props:r,defaultProps:i,state:o,actions:u}){return new Promise((c,d)=>{let f,m,g=matchProp(r.cancel??(i==null?void 0:i.cancel),n);if(g)x();else{is.und(r.pause)||(o.paused=matchProp(r.pause,n));let S=i==null?void 0:i.pause;S!==!0&&(S=o.paused||matchProp(S,n)),f=callProp(r.delay||0,n),S?(o.resumeQueue.add(y),u.pause()):(u.resume(),y())}function v(){o.resumeQueue.add(y),o.timeouts.delete(m),m.cancel(),f=m.time-raf.now()}function y(){f>0&&!globals_exports.skipAnimation?(o.delayed=!0,m=raf.setTimeout(x,f),o.pauseQueue.add(v),o.timeouts.add(m)):x()}function x(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(v),o.timeouts.delete(m),t<=(o.cancelId||0)&&(g=!0);try{u.start({...r,callId:t,cancel:g},c)}catch(S){d(S)}}})}var getCombinedResult=(t,n)=>n.length==1?n[0]:n.some(r=>r.cancelled)?getCancelledResult(t.get()):n.every(r=>r.noop)?getNoopResult(t.get()):getFinishedResult(t.get(),n.every(r=>r.finished)),getNoopResult=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),getFinishedResult=(t,n,r=!1)=>({value:t,finished:n,cancelled:r}),getCancelledResult=t=>({value:t,cancelled:!0,finished:!1});function runAsync(t,n,r,i){const{callId:o,parentId:u,onRest:c}=n,{asyncTo:d,promise:f}=r;return!u&&t===d&&!n.reset?f:r.promise=(async()=>{r.asyncId=o,r.asyncTo=t;const m=getDefaultProps(n,(b,k)=>k==="onRest"?void 0:b);let g,v;const y=new Promise((b,k)=>(g=b,v=k)),x=b=>{const k=o<=(r.cancelId||0)&&getCancelledResult(i)||o!==r.asyncId&&getFinishedResult(i,!1);if(k)throw b.result=k,v(b),b},S=(b,k)=>{const C=new BailSignal,I=new SkipAnimationSignal;return(async()=>{if(globals_exports.skipAnimation)throw stopAsync(r),I.result=getFinishedResult(i,!1),v(I),I;x(C);const T=is.obj(b)?{...b}:{...k,to:b};T.parentId=o,eachProp(m,(N,P)=>{is.und(T[P])&&(T[P]=N)});const w=await i.start(T);return x(C),r.paused&&await new Promise(N=>{r.resumeQueue.add(N)}),w})()};let E;if(globals_exports.skipAnimation)return stopAsync(r),getFinishedResult(i,!1);try{let b;is.arr(t)?b=(async k=>{for(const C of k)await S(C)})(t):b=Promise.resolve(t(S,i.stop.bind(i))),await Promise.all([b.then(g),y]),E=getFinishedResult(i.get(),!0,!1)}catch(b){if(b instanceof BailSignal)E=b.result;else if(b instanceof SkipAnimationSignal)E=b.result;else throw b}finally{o==r.asyncId&&(r.asyncId=u,r.asyncTo=u?d:void 0,r.promise=u?f:void 0)}return is.fun(c)&&raf.batchedUpdates(()=>{c(E,i,i.item)}),E})()}function stopAsync(t,n){flush(t.timeouts,r=>r.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,n&&(t.cancelId=n)}var BailSignal=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},SkipAnimationSignal=class extends Error{constructor(){super("SkipAnimationSignal")}},isFrameValue=t=>t instanceof FrameValue,nextId=1,FrameValue=class extends FluidValue{constructor(){super(...arguments),this.id=nextId++,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=getAnimated(this);return t&&t.getValue()}to(...t){return globals_exports.to(this,t)}interpolate(...t){return deprecateInterpolate(),globals_exports.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,n=!1){callFluidObservers(this,{type:"change",parent:this,value:t,idle:n})}_onPriorityChange(t){this.idle||frameLoop.sort(this),callFluidObservers(this,{type:"priority",parent:this,priority:t})}},$P=Symbol.for("SpringPhase"),HAS_ANIMATED=1,IS_ANIMATING=2,IS_PAUSED=4,hasAnimated=t=>(t[$P]&HAS_ANIMATED)>0,isAnimating=t=>(t[$P]&IS_ANIMATING)>0,isPaused=t=>(t[$P]&IS_PAUSED)>0,setActiveBit=(t,n)=>n?t[$P]|=IS_ANIMATING|HAS_ANIMATED:t[$P]&=~IS_ANIMATING,setPausedBit=(t,n)=>n?t[$P]|=IS_PAUSED:t[$P]&=~IS_PAUSED,SpringValue=class extends FrameValue{constructor(t,n){if(super(),this.animation=new Animation,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!is.und(t)||!is.und(n)){const r=is.obj(t)?{...t}:{...n,from:t};is.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(isAnimating(this)||this._state.asyncTo)||isPaused(this)}get goal(){return getFluidValue(this.animation.to)}get velocity(){const t=getAnimated(this);return t instanceof AnimatedValue?t.lastVelocity||0:t.getPayload().map(n=>n.lastVelocity||0)}get hasAnimated(){return hasAnimated(this)}get isAnimating(){return isAnimating(this)}get isPaused(){return isPaused(this)}get isDelayed(){return this._state.delayed}advance(t){let n=!0,r=!1;const i=this.animation;let{toValues:o}=i;const{config:u}=i,c=getPayload(i.to);!c&&hasFluidValue(i.to)&&(o=toArray(getFluidValue(i.to))),i.values.forEach((m,g)=>{if(m.done)return;const v=m.constructor==AnimatedString?1:c?c[g].lastPosition:o[g];let y=i.immediate,x=v;if(!y){if(x=m.lastPosition,u.tension<=0){m.done=!0;return}let S=m.elapsedTime+=t;const E=i.fromValues[g],b=m.v0!=null?m.v0:m.v0=is.arr(u.velocity)?u.velocity[g]:u.velocity;let k;const C=u.precision||(E==v?.005:Math.min(1,Math.abs(v-E)*.001));if(is.und(u.duration))if(u.decay){const I=u.decay===!0?.998:u.decay,T=Math.exp(-(1-I)*S);x=E+b/(1-I)*(1-T),y=Math.abs(m.lastPosition-x)<=C,k=b*T}else{k=m.lastVelocity==null?b:m.lastVelocity;const I=u.restVelocity||C/10,T=u.clamp?0:u.bounce,w=!is.und(T),N=E==v?m.v0>0:EI,!(!P&&(y=Math.abs(v-x)<=C,y)));++Q){w&&(A=x==v||x>v==N,A&&(k=-k*T,x=v));const Z=-u.tension*1e-6*(x-v),q=-u.friction*.001*k,de=(Z+q)/u.mass;k=k+de*B,x=x+k*B}}else{let I=1;u.duration>0&&(this._memoizedDuration!==u.duration&&(this._memoizedDuration=u.duration,m.durationProgress>0&&(m.elapsedTime=u.duration*m.durationProgress,S=m.elapsedTime+=t)),I=(u.progress||0)+S/this._memoizedDuration,I=I>1?1:I<0?0:I,m.durationProgress=I),x=E+u.easing(I)*(v-E),k=(x-m.lastPosition)/t,y=I==1}m.lastVelocity=k,Number.isNaN(x)&&(console.warn("Got NaN while animating:",this),y=!0)}c&&!c[g].done&&(y=!1),y?m.done=!0:n=!1,m.setValue(x,u.round)&&(r=!0)});const d=getAnimated(this),f=d.getValue();if(n){const m=getFluidValue(i.to);(f!==m||r)&&!u.decay?(d.setValue(m),this._onChange(m)):r&&u.decay&&this._onChange(f),this._stop()}else r&&this._onChange(f)}set(t){return raf.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(isAnimating(this)){const{to:t,config:n}=this.animation;raf.batchedUpdates(()=>{this._onStart(),n.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,n){let r;return is.und(t)?(r=this.queue||[],this.queue=[]):r=[is.obj(t)?t:{...n,to:t}],Promise.all(r.map(i=>this._update(i))).then(i=>getCombinedResult(this,i))}stop(t){const{to:n}=this.animation;return this._focus(this.get()),stopAsync(this._state,t&&this._lastCallId),raf.batchedUpdates(()=>this._stop(n,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){const n=this.key||"";let{to:r,from:i}=t;r=is.obj(r)?r[n]:r,(r==null||isAsyncTo(r))&&(r=void 0),i=is.obj(i)?i[n]:i,i==null&&(i=void 0);const o={to:r,from:i};return hasAnimated(this)||(t.reverse&&([r,i]=[i,r]),i=getFluidValue(i),is.und(i)?getAnimated(this)||this._set(r):this._set(i)),o}_update({...t},n){const{key:r,defaultProps:i}=this;t.default&&Object.assign(i,getDefaultProps(t,(c,d)=>/^on/.test(d)?resolveProp(c,r):c)),mergeActiveFn(this,t,"onProps"),sendEvent(this,"onProps",t,this);const o=this._prepareNode(t);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const u=this._state;return scheduleProps(++this._lastCallId,{key:r,props:t,defaultProps:i,state:u,actions:{pause:()=>{isPaused(this)||(setPausedBit(this,!0),flushCalls(u.pauseQueue),sendEvent(this,"onPause",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},resume:()=>{isPaused(this)&&(setPausedBit(this,!1),isAnimating(this)&&this._resume(),flushCalls(u.resumeQueue),sendEvent(this,"onResume",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(c=>{if(t.loop&&c.finished&&!(n&&c.noop)){const d=createLoopUpdate(t);if(d)return this._update(d,!0)}return c})}_merge(t,n,r){if(n.cancel)return this.stop(!0),r(getCancelledResult(this));const i=!is.und(t.to),o=!is.und(t.from);if(i||o)if(n.callId>this._lastToId)this._lastToId=n.callId;else return r(getCancelledResult(this));const{key:u,defaultProps:c,animation:d}=this,{to:f,from:m}=d;let{to:g=f,from:v=m}=t;o&&!i&&(!n.default||is.und(g))&&(g=v),n.reverse&&([g,v]=[v,g]);const y=!isEqual(v,m);y&&(d.from=v),v=getFluidValue(v);const x=!isEqual(g,f);x&&this._focus(g);const S=isAsyncTo(n.to),{config:E}=d,{decay:b,velocity:k}=E;(i||o)&&(E.velocity=0),n.config&&!S&&mergeConfig(E,callProp(n.config,u),n.config!==c.config?callProp(c.config,u):void 0);let C=getAnimated(this);if(!C||is.und(g))return r(getFinishedResult(this,!0));const I=is.und(n.reset)?o&&!n.default:!is.und(v)&&matchProp(n.reset,u),T=I?v:this.get(),w=computeGoal(g),N=is.num(w)||is.arr(w)||isAnimatedString(w),P=!S&&(!N||matchProp(c.immediate||n.immediate,u));if(x){const Q=getAnimatedType(g);if(Q!==C.constructor)if(P)C=this._set(w);else throw Error(`Cannot animate between ${C.constructor.name} and ${Q.name}, as the "to" prop suggests`)}const A=C.constructor;let B=hasFluidValue(g),X=!1;if(!B){const Q=I||!hasAnimated(this)&&y;(x||Q)&&(X=isEqual(computeGoal(T),w),B=!X),(!isEqual(d.immediate,P)&&!P||!isEqual(E.decay,b)||!isEqual(E.velocity,k))&&(B=!0)}if(X&&isAnimating(this)&&(d.changed&&!I?B=!0:B||this._stop(f)),!S&&((B||hasFluidValue(f))&&(d.values=C.getPayload(),d.toValues=hasFluidValue(g)?null:A==AnimatedString?[1]:toArray(w)),d.immediate!=P&&(d.immediate=P,!P&&!I&&this._set(f)),B)){const{onRest:Q}=d;each(ACTIVE_EVENTS,q=>mergeActiveFn(this,n,q));const Z=getFinishedResult(this,checkFinished(this,f));flushCalls(this._pendingCalls,Z),this._pendingCalls.add(r),d.changed&&raf.batchedUpdates(()=>{var q;d.changed=!I,Q==null||Q(Z,this),I?callProp(c.onRest,Z):(q=d.onStart)==null||q.call(d,Z,this)})}I&&this._set(T),S?r(runAsync(n.to,n,this._state,this)):B?this._start():isAnimating(this)&&!x?this._pendingCalls.add(r):r(getNoopResult(T))}_focus(t){const n=this.animation;t!==n.to&&(getFluidObservers(this)&&this._detach(),n.to=t,getFluidObservers(this)&&this._attach())}_attach(){let t=0;const{to:n}=this.animation;hasFluidValue(n)&&(addFluidObserver(n,this),isFrameValue(n)&&(t=n.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;hasFluidValue(t)&&removeFluidObserver(t,this)}_set(t,n=!0){const r=getFluidValue(t);if(!is.und(r)){const i=getAnimated(this);if(!i||!isEqual(r,i.getValue())){const o=getAnimatedType(r);!i||i.constructor!=o?setAnimated(this,o.create(r)):i.setValue(r),i&&raf.batchedUpdates(()=>{this._onChange(r,n)})}}return getAnimated(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,sendEvent(this,"onStart",getFinishedResult(this,checkFinished(this,t.to)),this))}_onChange(t,n){n||(this._onStart(),callProp(this.animation.onChange,t,this)),callProp(this.defaultProps.onChange,t,this),super._onChange(t,n)}_start(){const t=this.animation;getAnimated(this).reset(getFluidValue(t.to)),t.immediate||(t.fromValues=t.values.map(n=>n.lastPosition)),isAnimating(this)||(setActiveBit(this,!0),isPaused(this)||this._resume())}_resume(){globals_exports.skipAnimation?this.finish():frameLoop.start(this)}_stop(t,n){if(isAnimating(this)){setActiveBit(this,!1);const r=this.animation;each(r.values,o=>{o.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),callFluidObservers(this,{type:"idle",parent:this});const i=n?getCancelledResult(this.get()):getFinishedResult(this.get(),checkFinished(this,t??r.to));flushCalls(this._pendingCalls,i),r.changed&&(r.changed=!1,sendEvent(this,"onRest",i,this))}}};function checkFinished(t,n){const r=computeGoal(n),i=computeGoal(t.get());return isEqual(i,r)}function createLoopUpdate(t,n=t.loop,r=t.to){const i=callProp(n);if(i){const o=i!==!0&&inferTo(i),u=(o||t).reverse,c=!o||o.reset;return createUpdate({...t,loop:n,default:!1,pause:void 0,to:!u||isAsyncTo(r)?r:void 0,from:c?t.from:void 0,reset:c,...o})}}function createUpdate(t){const{to:n,from:r}=t=inferTo(t),i=new Set;return is.obj(n)&&findDefined(n,i),is.obj(r)&&findDefined(r,i),t.keys=i.size?Array.from(i):null,t}function declareUpdate(t){const n=createUpdate(t);return is.und(n.default)&&(n.default=getDefaultProps(n)),n}function findDefined(t,n){eachProp(t,(r,i)=>r!=null&&n.add(i))}var ACTIVE_EVENTS=["onStart","onRest","onChange","onPause","onResume"];function mergeActiveFn(t,n,r){t.animation[r]=n[r]!==getDefaultProp(n,r)?resolveProp(n[r],t.key):void 0}function sendEvent(t,n,...r){var i,o,u,c;(o=(i=t.animation)[n])==null||o.call(i,...r),(c=(u=t.defaultProps)[n])==null||c.call(u,...r)}var BATCHED_EVENTS=["onStart","onChange","onRest"],nextId2=1,Controller$1=class{constructor(n,r){this.id=nextId2++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),r&&(this._flush=r),n&&this.start({default:!0,...n})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(n=>n.idle&&!n.isDelayed&&!n.isPaused)}get item(){return this._item}set item(n){this._item=n}get(){const n={};return this.each((r,i)=>n[i]=r.get()),n}set(n){for(const r in n){const i=n[r];is.und(i)||this.springs[r].set(i)}}update(n){return n&&this.queue.push(createUpdate(n)),this}start(n){let{queue:r}=this;return n?r=toArray(n).map(createUpdate):this.queue=[],this._flush?this._flush(this,r):(prepareKeys(this,r),flushUpdateQueue(this,r))}stop(n,r){if(n!==!!n&&(r=n),r){const i=this.springs;each(toArray(r),o=>i[o].stop(!!n))}else stopAsync(this._state,this._lastAsyncId),this.each(i=>i.stop(!!n));return this}pause(n){if(is.und(n))this.start({pause:!0});else{const r=this.springs;each(toArray(n),i=>r[i].pause())}return this}resume(n){if(is.und(n))this.start({pause:!1});else{const r=this.springs;each(toArray(n),i=>r[i].resume())}return this}each(n){eachProp(this.springs,n)}_onFrame(){const{onStart:n,onChange:r,onRest:i}=this._events,o=this._active.size>0,u=this._changed.size>0;(o&&!this._started||u&&!this._started)&&(this._started=!0,flush(n,([f,m])=>{m.value=this.get(),f(m,this,this._item)}));const c=!o&&this._started,d=u||c&&i.size?this.get():null;u&&r.size&&flush(r,([f,m])=>{m.value=d,f(m,this,this._item)}),c&&(this._started=!1,flush(i,([f,m])=>{m.value=d,f(m,this,this._item)}))}eventObserved(n){if(n.type=="change")this._changed.add(n.parent),n.idle||this._active.add(n.parent);else if(n.type=="idle")this._active.delete(n.parent);else return;raf.onFrame(this._onFrame)}};function flushUpdateQueue(t,n){return Promise.all(n.map(r=>flushUpdate(t,r))).then(r=>getCombinedResult(t,r))}async function flushUpdate(t,n,r){const{keys:i,to:o,from:u,loop:c,onRest:d,onResolve:f}=n,m=is.obj(n.default)&&n.default;c&&(n.loop=!1),o===!1&&(n.to=null),u===!1&&(n.from=null);const g=is.arr(o)||is.fun(o)?o:void 0;g?(n.to=void 0,n.onRest=void 0,m&&(m.onRest=void 0)):each(BATCHED_EVENTS,E=>{const b=n[E];if(is.fun(b)){const k=t._events[E];n[E]=({finished:C,cancelled:I})=>{const T=k.get(b);T?(C||(T.finished=!1),I&&(T.cancelled=!0)):k.set(b,{value:null,finished:C||!1,cancelled:I||!1})},m&&(m[E]=n[E])}});const v=t._state;n.pause===!v.paused?(v.paused=n.pause,flushCalls(n.pause?v.pauseQueue:v.resumeQueue)):v.paused&&(n.pause=!0);const y=(i||Object.keys(t.springs)).map(E=>t.springs[E].start(n)),x=n.cancel===!0||getDefaultProp(n,"cancel")===!0;(g||x&&v.asyncId)&&y.push(scheduleProps(++t._lastAsyncId,{props:n,state:v,actions:{pause:noop$1,resume:noop$1,start(E,b){x?(stopAsync(v,t._lastAsyncId),b(getCancelledResult(t))):(E.onRest=d,b(runAsync(g,E,v,t)))}}})),v.paused&&await new Promise(E=>{v.resumeQueue.add(E)});const S=getCombinedResult(t,await Promise.all(y));if(c&&S.finished&&!(r&&S.noop)){const E=createLoopUpdate(n,c,o);if(E)return prepareKeys(t,[E]),flushUpdate(t,E,!0)}return f&&raf.batchedUpdates(()=>f(S,t,t.item)),S}function getSprings(t,n){const r={...t.springs};return n&&each(toArray(n),i=>{is.und(i.keys)&&(i=createUpdate(i)),is.obj(i.to)||(i={...i,to:void 0}),prepareSprings(r,i,o=>createSpring(o))}),setSprings(t,r),r}function setSprings(t,n){eachProp(n,(r,i)=>{t.springs[i]||(t.springs[i]=r,addFluidObserver(r,t))})}function createSpring(t,n){const r=new SpringValue;return r.key=t,n&&addFluidObserver(r,n),r}function prepareSprings(t,n,r){n.keys&&each(n.keys,i=>{(t[i]||(t[i]=r(i)))._prepareNode(n)})}function prepareKeys(t,n){each(n,r=>{prepareSprings(t.springs,r,i=>createSpring(i,t))})}var SpringContext=({children:t,...n})=>{const r=reactExports.useContext(ctx),i=n.pause||!!r.pause,o=n.immediate||!!r.immediate;n=useMemoOne(()=>({pause:i,immediate:o}),[i,o]);const{Provider:u}=ctx;return reactExports.createElement(u,{value:n},t)},ctx=makeContext(SpringContext,{});SpringContext.Provider=ctx.Provider;SpringContext.Consumer=ctx.Consumer;function makeContext(t,n){return Object.assign(t,reactExports.createContext(n)),t.Provider._context=t,t.Consumer._context=t,t}var SpringRef=()=>{const t=[],n=function(i){deprecateDirectCall();const o=[];return each(t,(u,c)=>{if(is.und(i))o.push(u.start());else{const d=r(i,u,c);d&&o.push(u.start(d))}}),o};n.current=t,n.add=function(i){t.includes(i)||t.push(i)},n.delete=function(i){const o=t.indexOf(i);~o&&t.splice(o,1)},n.pause=function(){return each(t,i=>i.pause(...arguments)),this},n.resume=function(){return each(t,i=>i.resume(...arguments)),this},n.set=function(i){each(t,(o,u)=>{const c=is.fun(i)?i(u,o):i;c&&o.set(c)})},n.start=function(i){const o=[];return each(t,(u,c)=>{if(is.und(i))o.push(u.start());else{const d=this._getProps(i,u,c);d&&o.push(u.start(d))}}),o},n.stop=function(){return each(t,i=>i.stop(...arguments)),this},n.update=function(i){return each(t,(o,u)=>o.update(this._getProps(i,o,u))),this};const r=function(i,o,u){return is.fun(i)?i(u,o):i};return n._getProps=r,n};function useSprings(t,n,r){const i=is.fun(n)&&n;i&&!r&&(r=[]);const o=reactExports.useMemo(()=>i||arguments.length==3?SpringRef():void 0,[]),u=reactExports.useRef(0),c=useForceUpdate(),d=reactExports.useMemo(()=>({ctrls:[],queue:[],flush(k,C){const I=getSprings(k,C);return u.current>0&&!d.queue.length&&!Object.keys(I).some(w=>!k.springs[w])?flushUpdateQueue(k,C):new Promise(w=>{setSprings(k,I),d.queue.push(()=>{w(flushUpdateQueue(k,C))}),c()})}}),[]),f=reactExports.useRef([...d.ctrls]),m=[],g=usePrev(t)||0;reactExports.useMemo(()=>{each(f.current.slice(t,g),k=>{detachRefs(k,o),k.stop(!0)}),f.current.length=t,v(g,t)},[t]),reactExports.useMemo(()=>{v(0,Math.min(g,t))},r);function v(k,C){for(let I=k;IgetSprings(k,m[C])),x=reactExports.useContext(SpringContext),S=usePrev(x),E=x!==S&&hasProps(x);useIsomorphicLayoutEffect(()=>{u.current++,d.ctrls=f.current;const{queue:k}=d;k.length&&(d.queue=[],each(k,C=>C())),each(f.current,(C,I)=>{o==null||o.add(C),E&&C.start({default:x});const T=m[I];T&&(replaceRef(C,T.ref),C.ref?C.queue.push(T):C.start(T))})}),useOnce(()=>()=>{each(d.ctrls,k=>k.stop(!0))});const b=y.map(k=>({...k}));return o?[b,o]:b}function useSpring(t,n){const r=is.fun(t),[[i],o]=useSprings(1,r?t:[t],r?[]:n);return r||arguments.length==2?[i,o]:i}function useTrail(t,n,r){const i=is.fun(n)&&n;i&&!r&&(r=[]);let o=!0,u;const c=useSprings(t,(d,f)=>{const m=i?i(d,f):n;return u=m.ref,o=o&&m.reverse,m},r||[{}]);if(useIsomorphicLayoutEffect(()=>{each(c[1].current,(d,f)=>{const m=c[1].current[f+(o?1:-1)];if(replaceRef(d,u),d.ref){m&&d.update({to:m.springs});return}m?d.start({to:m.springs}):d.start()})},r),i||arguments.length==3){const d=u??c[1];return d._getProps=(f,m,g)=>{const v=is.fun(f)?f(g,m):f;if(v){const y=d.current[g+(v.reverse?1:-1)];return y&&(v.to=y.springs),v}},c}return c[0]}var Interpolation=class extends FrameValue{constructor(t,n){super(),this.source=t,this.idle=!0,this._active=new Set,this.calc=createInterpolator(...n);const r=this._get(),i=getAnimatedType(r);setAnimated(this,i.create(r))}advance(t){const n=this._get(),r=this.get();isEqual(n,r)||(getAnimated(this).setValue(n),this._onChange(n,this.idle)),!this.idle&&checkIdle(this._active)&&becomeIdle(this)}_get(){const t=is.arr(this.source)?this.source.map(getFluidValue):toArray(getFluidValue(this.source));return this.calc(...t)}_start(){this.idle&&!checkIdle(this._active)&&(this.idle=!1,each(getPayload(this),t=>{t.done=!1}),globals_exports.skipAnimation?(raf.batchedUpdates(()=>this.advance()),becomeIdle(this)):frameLoop.start(this))}_attach(){let t=1;each(toArray(this.source),n=>{hasFluidValue(n)&&addFluidObserver(n,this),isFrameValue(n)&&(n.idle||this._active.add(n),t=Math.max(t,n.priority+1))}),this.priority=t,this._start()}_detach(){each(toArray(this.source),t=>{hasFluidValue(t)&&removeFluidObserver(t,this)}),this._active.clear(),becomeIdle(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=toArray(this.source).reduce((n,r)=>Math.max(n,(isFrameValue(r)?r.priority:0)+1),0))}};function isIdle(t){return t.idle!==!1}function checkIdle(t){return!t.size||Array.from(t).every(isIdle)}function becomeIdle(t){t.idle||(t.idle=!0,each(getPayload(t),n=>{n.done=!0}),callFluidObservers(t,{type:"idle",parent:t}))}globals_exports.assign({createStringInterpolator:createStringInterpolator2,to:(t,n)=>new Interpolation(t,n)});var isCustomPropRE=/^--/;function dangerousStyleValue(t,n){return n==null||typeof n=="boolean"||n===""?"":typeof n=="number"&&n!==0&&!isCustomPropRE.test(t)&&!(isUnitlessNumber.hasOwnProperty(t)&&isUnitlessNumber[t])?n+"px":(""+n).trim()}var attributeCache={};function applyAnimatedValues(t,n){if(!t.nodeType||!t.setAttribute)return!1;const r=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter",{className:i,style:o,children:u,scrollTop:c,scrollLeft:d,viewBox:f,...m}=n,g=Object.values(m),v=Object.keys(m).map(y=>r||t.hasAttribute(y)?y:attributeCache[y]||(attributeCache[y]=y.replace(/([A-Z])/g,x=>"-"+x.toLowerCase())));u!==void 0&&(t.textContent=u);for(const y in o)if(o.hasOwnProperty(y)){const x=dangerousStyleValue(y,o[y]);isCustomPropRE.test(y)?t.style.setProperty(y,x):t.style[y]=x}v.forEach((y,x)=>{t.setAttribute(y,g[x])}),i!==void 0&&(t.className=i),c!==void 0&&(t.scrollTop=c),d!==void 0&&(t.scrollLeft=d),f!==void 0&&t.setAttribute("viewBox",f)}var isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},prefixKey=(t,n)=>t+n.charAt(0).toUpperCase()+n.substring(1),prefixes=["Webkit","Ms","Moz","O"];isUnitlessNumber=Object.keys(isUnitlessNumber).reduce((t,n)=>(prefixes.forEach(r=>t[prefixKey(r,n)]=t[n]),t),isUnitlessNumber);var domTransforms=/^(matrix|translate|scale|rotate|skew)/,pxTransforms=/^(translate)/,degTransforms=/^(rotate|skew)/,addUnit=(t,n)=>is.num(t)&&t!==0?t+n:t,isValueIdentity=(t,n)=>is.arr(t)?t.every(r=>isValueIdentity(r,n)):is.num(t)?t===n:parseFloat(t)===n,AnimatedStyle=class extends AnimatedObject{constructor({x:t,y:n,z:r,...i}){const o=[],u=[];(t||n||r)&&(o.push([t||0,n||0,r||0]),u.push(c=>[`translate3d(${c.map(d=>addUnit(d,"px")).join(",")})`,isValueIdentity(c,0)])),eachProp(i,(c,d)=>{if(d==="transform")o.push([c||""]),u.push(f=>[f,f===""]);else if(domTransforms.test(d)){if(delete i[d],is.und(c))return;const f=pxTransforms.test(d)?"px":degTransforms.test(d)?"deg":"";o.push(toArray(c)),u.push(d==="rotate3d"?([m,g,v,y])=>[`rotate3d(${m},${g},${v},${addUnit(y,f)})`,isValueIdentity(y,0)]:m=>[`${d}(${m.map(g=>addUnit(g,f)).join(",")})`,isValueIdentity(m,d.startsWith("scale")?1:0)])}}),o.length&&(i.transform=new FluidTransform(o,u)),super(i)}},FluidTransform=class extends FluidValue{constructor(t,n){super(),this.inputs=t,this.transforms=n,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let t="",n=!0;return each(this.inputs,(r,i)=>{const o=getFluidValue(r[0]),[u,c]=this.transforms[i](is.arr(o)?o:r.map(getFluidValue));t+=" "+u,n=n&&c}),n?"none":t}observerAdded(t){t==1&&each(this.inputs,n=>each(n,r=>hasFluidValue(r)&&addFluidObserver(r,this)))}observerRemoved(t){t==0&&each(this.inputs,n=>each(n,r=>hasFluidValue(r)&&removeFluidObserver(r,this)))}eventObserved(t){t.type=="change"&&(this._value=null),callFluidObservers(this,t)}},primitives=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];globals_exports.assign({batchedUpdates:reactDomExports.unstable_batchedUpdates,createStringInterpolator:createStringInterpolator2,colors:colors2});var host=createHost(primitives,{applyAnimatedValues,createAnimatedStyle:t=>new AnimatedStyle(t),getComponentProps:({scrollTop:t,scrollLeft:n,...r})=>r}),animated=host.animated;function clamp(t,n,r){return Math.max(n,Math.min(t,r))}const V={toVector(t,n){return t===void 0&&(t=n),Array.isArray(t)?t:[t,t]},add(t,n){return[t[0]+n[0],t[1]+n[1]]},sub(t,n){return[t[0]-n[0],t[1]-n[1]]},addTo(t,n){t[0]+=n[0],t[1]+=n[1]},subTo(t,n){t[0]-=n[0],t[1]-=n[1]}};function rubberband(t,n,r){return n===0||Math.abs(n)===1/0?Math.pow(t,r*5):t*n*r/(n+r*t)}function rubberbandIfOutOfBounds(t,n,r,i=.15){return i===0?clamp(t,n,r):tr?+rubberband(t-r,r-n,i)+r:t}function computeRubberband(t,[n,r],[i,o]){const[[u,c],[d,f]]=t;return[rubberbandIfOutOfBounds(n,u,c,i),rubberbandIfOutOfBounds(r,d,f,o)]}function _defineProperty(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function ownKeys(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,i)}return r}function _objectSpread2(t){for(var n=1;n{var r,i;return n.target===t.currentTarget||((r=t.currentTarget)===null||r===void 0||(i=r.contains)===null||i===void 0?void 0:i.call(r,n.target))})}function getTouchList(t){return t.type==="touchend"?t.changedTouches:t.targetTouches}function getValueEvent(t){return isTouch(t)?getTouchList(t)[0]:t}function touchIds(t){return getCurrentTargetTouchList(t).map(n=>n.identifier)}function pointerId(t){const n=getValueEvent(t);return isTouch(t)?n.identifier:n.pointerId}function pointerValues(t){const n=getValueEvent(t);return[n.clientX,n.clientY]}function scrollValues(t){var n,r;const{scrollX:i,scrollY:o,scrollLeft:u,scrollTop:c}=t.currentTarget;return[(n=i??u)!==null&&n!==void 0?n:0,(r=o??c)!==null&&r!==void 0?r:0]}function getEventDetails(t){const n={};if("buttons"in t&&(n.buttons=t.buttons),"shiftKey"in t){const{shiftKey:r,altKey:i,metaKey:o,ctrlKey:u}=t;Object.assign(n,{shiftKey:r,altKey:i,metaKey:o,ctrlKey:u})}return n}function call(t,...n){return typeof t=="function"?t(...n):t}function noop(){}function chain(...t){return t.length===0?noop:t.length===1?t[0]:function(){let n;for(const r of t)n=r.apply(this,arguments)||n;return n}}function assignDefault(t,n){return Object.assign({},n,t||{})}const BEFORE_LAST_KINEMATICS_DELAY=32;class Engine{constructor(n,r,i){this.ctrl=n,this.args=r,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(n){this.ctrl.state[this.key]=n}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:n,shared:r,ingKey:i,args:o}=this;r[i]=n._active=n.active=n._blocked=n._force=!1,n._step=[!1,!1],n.intentional=!1,n._movement=[0,0],n._distance=[0,0],n._delta=[0,0],n._bounds=[[-1/0,1/0],[-1/0,1/0]],n.args=o,n.axis=void 0,n.memo=void 0,n.elapsedTime=0,n.direction=[0,0],n.distance=[0,0],n.velocity=[0,0],n.movement=[0,0],n.delta=[0,0],n.timeStamp=0}start(n){const r=this.state,i=this.config;r._active||(this.reset(),this.computeInitial(),r._active=!0,r.target=n.target,r.currentTarget=n.currentTarget,r.lastOffset=i.from?call(i.from,r):r.offset,r.offset=r.lastOffset),r.startTime=r.timeStamp=n.timeStamp}computeValues(n){const r=this.state;r._values=n,r.values=this.config.transform(n)}computeInitial(){const n=this.state;n._initial=n._values,n.initial=n.values}compute(n){const{state:r,config:i,shared:o}=this;r.args=this.args;let u=0;if(n&&(r.event=n,i.preventDefault&&n.cancelable&&r.event.preventDefault(),r.type=n.type,o.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,o.locked=!!document.pointerLockElement,Object.assign(o,getEventDetails(n)),o.down=o.pressed=o.buttons%2===1||o.touches>0,u=n.timeStamp-r.timeStamp,r.timeStamp=n.timeStamp,r.elapsedTime=r.timeStamp-r.startTime),r._active){const S=r._delta.map(Math.abs);V.addTo(r._distance,S)}const[c,d]=r._movement,[f,m]=i.threshold,{_step:g,values:v}=r;if(i.hasCustomTransform?(g[0]===!1&&(g[0]=Math.abs(c)>=f&&v[0]),g[1]===!1&&(g[1]=Math.abs(d)>=m&&v[1])):(g[0]===!1&&(g[0]=Math.abs(c)>=f&&Math.sign(c)*f),g[1]===!1&&(g[1]=Math.abs(d)>=m&&Math.sign(d)*m)),r.intentional=g[0]!==!1||g[1]!==!1,!r.intentional)return;const y=[0,0];if(i.hasCustomTransform){const[S,E]=v;y[0]=g[0]!==!1?S-g[0]:0,y[1]=g[1]!==!1?E-g[1]:0}else y[0]=g[0]!==!1?c-g[0]:0,y[1]=g[1]!==!1?d-g[1]:0;if(this.intent&&this.intent(y),(r._active&&!r._blocked||r.active)&&(r.first=r._active&&!r.active,r.last=!r._active&&r.active,r.active=o[this.ingKey]=r._active,n)){r.first&&("bounds"in i&&(r._bounds=call(i.bounds,r)),this.setup&&this.setup()),r.movement=y;const S=r.offset;if(this.computeOffset(),!r.last||u>BEFORE_LAST_KINEMATICS_DELAY){r.delta=V.sub(r.offset,S);const E=r.delta.map(Math.abs);V.addTo(r.distance,E),r.direction=r.delta.map(Math.sign),!r.first&&u>0&&(r.velocity=[E[0]/u,E[1]/u])}}const x=r._active?i.rubberband||[0,0]:[0,0];r.offset=computeRubberband(r._bounds,r.offset,x),this.computeMovement()}emit(){const n=this.state,r=this.shared,i=this.config;if(n._active||this.clean(),(n._blocked||!n.intentional)&&!n._force&&!i.triggerAllEvents)return;const o=this.handler(_objectSpread2(_objectSpread2(_objectSpread2({},r),n),{},{[this.aliasKey]:n.values}));o!==void 0&&(n.memo=o)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function selectAxis([t,n]){const r=Math.abs(t)-Math.abs(n);if(r>0)return"x";if(r<0)return"y"}function restrictVectorToAxis(t,n){switch(n){case"x":t[1]=0;break;case"y":t[0]=0;break}}class CoordinatesEngine extends Engine{constructor(...n){super(...n),_defineProperty(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=V.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=V.sub(this.state.offset,this.state.lastOffset)}intent(n){this.state.axis=this.state.axis||selectAxis(n),this.state._blocked=(this.config.lockDirection||!!this.config.axis)&&!this.state.axis||!!this.config.axis&&this.config.axis!==this.state.axis,!this.state._blocked&&(this.config.axis||this.config.lockDirection)&&restrictVectorToAxis(n,this.state.axis)}}const identity=t=>t,DEFAULT_RUBBERBAND=.15,commonConfigResolver={enabled(t=!0){return t},preventDefault(t=!1){return t},triggerAllEvents(t=!1){return t},rubberband(t=0){switch(t){case!0:return[DEFAULT_RUBBERBAND,DEFAULT_RUBBERBAND];case!1:return[0,0];default:return V.toVector(t)}},from(t){if(typeof t=="function")return t;if(t!=null)return V.toVector(t)},transform(t,n,r){const i=t||r.shared.transform;return this.hasCustomTransform=!!i,i||identity},threshold(t){return V.toVector(t,0)}},coordinatesConfigResolver=_objectSpread2(_objectSpread2({},commonConfigResolver),{},{axis(t,n,{axis:r}){if(this.lockDirection=r==="lock",!this.lockDirection)return r},bounds(t={}){if(typeof t=="function")return u=>coordinatesConfigResolver.bounds(t(u));if("current"in t)return()=>t.current;if(typeof HTMLElement=="function"&&t instanceof HTMLElement)return t;const{left:n=-1/0,right:r=1/0,top:i=-1/0,bottom:o=1/0}=t;return[[n,r],[i,o]]}}),DISPLACEMENT=10,KEYS_DELTA_MAP={ArrowRight:(t=1)=>[DISPLACEMENT*t,0],ArrowLeft:(t=1)=>[-DISPLACEMENT*t,0],ArrowUp:(t=1)=>[0,-DISPLACEMENT*t],ArrowDown:(t=1)=>[0,DISPLACEMENT*t]};class DragEngine extends CoordinatesEngine{constructor(...n){super(...n),_defineProperty(this,"ingKey","dragging")}reset(){super.reset();const n=this.state;n._pointerId=void 0,n._pointerActive=!1,n._keyboardActive=!1,n._preventScroll=!1,n._delayed=!1,n.swipe=[0,0],n.tap=!1,n.canceled=!1,n.cancel=this.cancel.bind(this)}setup(){const n=this.state;if(n._bounds instanceof HTMLElement){const r=n._bounds.getBoundingClientRect(),i=n.currentTarget.getBoundingClientRect(),o={left:r.left-i.left+n.offset[0],right:r.right-i.right+n.offset[0],top:r.top-i.top+n.offset[1],bottom:r.bottom-i.bottom+n.offset[1]};n._bounds=coordinatesConfigResolver.bounds(o)}}cancel(){const n=this.state;n.canceled||(n.canceled=!0,n._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(n){const r=this.config,i=this.state;n.buttons!=null&&(Array.isArray(r.pointerButtons)?!r.pointerButtons.includes(n.buttons):r.pointerButtons!==-1&&r.pointerButtons!==n.buttons)||(this.ctrl.setEventIds(n),r.pointerCapture&&n.target.setPointerCapture(n.pointerId),!i._pointerActive&&(this.start(n),this.setupPointer(n),i._pointerId=pointerId(n),i._pointerActive=!0,this.computeValues(pointerValues(n)),this.computeInitial(),r.preventScroll?this.setupScrollPrevention(n):r.delay>0?this.setupDelayTrigger(n):this.startPointerDrag(n)))}startPointerDrag(n){const r=this.state;r._active=!0,r._preventScroll=!0,r._delayed=!1,this.compute(n),this.emit()}pointerMove(n){const r=this.state,i=this.config;if(!r._pointerActive||r.type===n.type&&n.timeStamp===r.timeStamp)return;const o=pointerId(n);if(r._pointerId&&o!==r._pointerId)return;const u=pointerValues(n);if(document.pointerLockElement===n.target?r._delta=[n.movementX,n.movementY]:(r._delta=V.sub(u,r._values),this.computeValues(u)),V.addTo(r._movement,r._delta),this.compute(n),r._delayed){this.timeoutStore.remove("dragDelay"),r.active=!1,this.startPointerDrag(n);return}if(i.preventScroll&&!r._preventScroll)if(r.axis)if(r.axis===i.preventScrollAxis||i.preventScrollAxis==="xy"){r._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(n);return}else return;this.emit()}pointerUp(n){this.ctrl.setEventIds(n);try{this.config.pointerCapture&&n.target.hasPointerCapture(n.pointerId)&&n.target.releasePointerCapture(n.pointerId)}catch{}const r=this.state,i=this.config;if(!r._pointerActive)return;const o=pointerId(n);if(r._pointerId&&o!==r._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(n);const[u,c]=r._distance;if(r.tap=u<=3&&c<=3,r.tap&&i.filterTaps)r._force=!0;else{const[d,f]=r.direction,[m,g]=r.velocity,[v,y]=r.movement,[x,S]=i.swipe.velocity,[E,b]=i.swipe.distance,k=i.swipe.duration;r.elapsedTimex&&Math.abs(v)>E&&(r.swipe[0]=d),Math.abs(g)>S&&Math.abs(y)>b&&(r.swipe[1]=f))}this.emit()}pointerClick(n){this.state.tap||(n.preventDefault(),n.stopPropagation())}setupPointer(n){const r=this.config;let i=r.device;r.pointerLock&&n.currentTarget.requestPointerLock(),r.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(n){this.state._preventScroll&&n.cancelable&&n.preventDefault()}setupScrollPrevention(n){persistEvent(n),this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1}),this.eventStore.add(this.sharedConfig.window,"touch","end",this.clean.bind(this),{passive:!1}),this.eventStore.add(this.sharedConfig.window,"touch","cancel",this.clean.bind(this),{passive:!1}),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScroll,n)}setupDelayTrigger(n){this.state._delayed=!0,this.timeoutStore.add("dragDelay",this.startPointerDrag.bind(this),this.config.delay,n)}keyDown(n){const r=KEYS_DELTA_MAP[n.key];if(r){const i=this.state,o=n.shiftKey?10:n.altKey?.1:1;i._delta=r(o),this.start(n),i._keyboardActive=!0,V.addTo(i._movement,i._delta),this.compute(n),this.emit()}}keyUp(n){n.key in KEYS_DELTA_MAP&&(this.state._keyboardActive=!1,this.setActive(),this.compute(n),this.emit())}bind(n){const r=this.config.device;n(r,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(n(r,"change",this.pointerMove.bind(this)),n(r,"end",this.pointerUp.bind(this)),n(r,"cancel",this.pointerUp.bind(this))),n("key","down",this.keyDown.bind(this)),n("key","up",this.keyUp.bind(this)),this.config.filterTaps&&n("click","",this.pointerClick.bind(this),{capture:!0})}}function persistEvent(t){"persist"in t&&typeof t.persist=="function"&&t.persist()}const isBrowser=typeof window<"u"&&window.document&&window.document.createElement;function supportsTouchEvents(){return isBrowser&&"ontouchstart"in window}function isTouchScreen(){return supportsTouchEvents()||isBrowser&&window.navigator.maxTouchPoints>1}function supportsPointerEvents(){return isBrowser&&"onpointerdown"in window}function supportsPointerLock(){return isBrowser&&"exitPointerLock"in window.document}function supportsGestureEvents(){try{return"constructor"in GestureEvent}catch{return!1}}const SUPPORT={isBrowser,gesture:supportsGestureEvents(),touch:supportsTouchEvents(),touchscreen:isTouchScreen(),pointer:supportsPointerEvents(),pointerLock:supportsPointerLock()},DEFAULT_PREVENT_SCROLL_DELAY=250,DEFAULT_DRAG_DELAY=180,DEFAULT_SWIPE_VELOCITY=.5,DEFAULT_SWIPE_DISTANCE=50,DEFAULT_SWIPE_DURATION=250,dragConfigResolver=_objectSpread2(_objectSpread2({},coordinatesConfigResolver),{},{pointerLock(t,n,{pointer:{lock:r=!1,touch:i=!1}={}}){return this.useTouch=SUPPORT.touch&&i,SUPPORT.pointerLock&&r},device(t,n){return this.useTouch?"touch":this.pointerLock?"mouse":SUPPORT.pointer?"pointer":SUPPORT.touch?"touch":"mouse"},preventScroll(t=!1,n,{preventScrollAxis:r="y"}){return r&&(this.preventScrollAxis=r),SUPPORT.touchscreen?typeof t=="number"?t:t?DEFAULT_PREVENT_SCROLL_DELAY:!1:!1},pointerCapture(t,n,{pointer:{capture:r=!0,buttons:i=1}={}}){return this.pointerButtons=i,!this.pointerLock&&this.device==="pointer"&&r},threshold(t,n,{filterTaps:r=!1,axis:i=void 0}){const o=V.toVector(t,r?3:i?1:0);return this.filterTaps=r,o},swipe({velocity:t=DEFAULT_SWIPE_VELOCITY,distance:n=DEFAULT_SWIPE_DISTANCE,duration:r=DEFAULT_SWIPE_DURATION}={}){return{velocity:this.transform(V.toVector(t)),distance:this.transform(V.toVector(n)),duration:r}},delay(t=0){switch(t){case!0:return DEFAULT_DRAG_DELAY;case!1:return 0;default:return t}}});_objectSpread2(_objectSpread2({},commonConfigResolver),{},{useTouch(t,n,{pointer:{touch:r=!1}={}}){return SUPPORT.touch&&r},device(t,n,r){if(r.shared.target&&!SUPPORT.touch&&SUPPORT.gesture)return"gesture";if(this.useTouch)return"touch";if(SUPPORT.touchscreen){if(SUPPORT.pointer)return"pointer";if(SUPPORT.touch)return"touch"}},bounds(t,n,{scaleBounds:r={},angleBounds:i={}}){const o=c=>{const d=assignDefault(call(r,c),{min:-1/0,max:1/0});return[d.min,d.max]},u=c=>{const d=assignDefault(call(i,c),{min:-1/0,max:1/0});return[d.min,d.max]};return typeof r!="function"&&typeof i!="function"?[o(),u()]:c=>[o(c),u(c)]},threshold(t,n,r){return this.lockDirection=r.axis==="lock",V.toVector(t,this.lockDirection?[.1,3]:0)}});_objectSpread2(_objectSpread2({},coordinatesConfigResolver),{},{mouseOnly:(t=!0)=>t});class ScrollEngine extends CoordinatesEngine{constructor(...n){super(...n),_defineProperty(this,"ingKey","scrolling")}scroll(n){this.state._active||this.start(n),this.scrollChange(n),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(n){n.cancelable&&n.preventDefault();const r=this.state,i=scrollValues(n);r._delta=V.sub(i,r._values),V.addTo(r._movement,r._delta),this.computeValues(i),this.compute(n),this.emit()}scrollEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(n){n("scroll","",this.scroll.bind(this))}}const scrollConfigResolver=coordinatesConfigResolver;_objectSpread2(_objectSpread2({},coordinatesConfigResolver),{},{mouseOnly:(t=!0)=>t});const EngineMap=new Map,ConfigResolverMap=new Map;function registerAction(t){EngineMap.set(t.key,t.engine),ConfigResolverMap.set(t.key,t.resolver)}const dragAction={key:"drag",engine:DragEngine,resolver:dragConfigResolver},scrollAction={key:"scroll",engine:ScrollEngine,resolver:scrollConfigResolver};function _objectWithoutPropertiesLoose(t,n){if(t==null)return{};var r={},i=Object.keys(t),o,u;for(u=0;u=0)&&(r[o]=t[o]);return r}function _objectWithoutProperties(t,n){if(t==null)return{};var r=_objectWithoutPropertiesLoose(t,n),i,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}const sharedConfigResolver={target(t){if(t)return()=>"current"in t?t.current:t},enabled(t=!0){return t},window(t=SUPPORT.isBrowser?window:void 0){return t},eventOptions({passive:t=!0,capture:n=!1}={}){return{passive:t,capture:n}},transform(t){return t}},_excluded=["target","eventOptions","window","enabled","transform"];function resolveWith(t={},n){const r={};for(const[i,o]of Object.entries(n))switch(typeof o){case"function":r[i]=o.call(r,t[i],i,t);break;case"object":r[i]=resolveWith(t[i],o);break;case"boolean":o&&(r[i]=t[i]);break}return r}function parse(t,n){const r=t,{target:i,eventOptions:o,window:u,enabled:c,transform:d}=r,f=_objectWithoutProperties(r,_excluded),m={shared:resolveWith({target:i,eventOptions:o,window:u,enabled:c,transform:d},sharedConfigResolver)};if(n){const g=ConfigResolverMap.get(n);m[n]=resolveWith(_objectSpread2({shared:m.shared},f),g)}else for(const g in f){const v=ConfigResolverMap.get(g);v&&(m[g]=resolveWith(_objectSpread2({shared:m.shared},f[g]),v))}return m}class EventStore{constructor(n){_defineProperty(this,"_listeners",[]),this._ctrl=n}add(n,r,i,o,u){const c=toDomEventType(r,i),d=_objectSpread2(_objectSpread2({},this._ctrl.config.shared.eventOptions),u);n.addEventListener(c,o,d),this._listeners.push(()=>n.removeEventListener(c,o,d))}clean(){this._listeners.forEach(n=>n()),this._listeners=[]}}class TimeoutStore{constructor(){_defineProperty(this,"_timeouts",new Map)}add(n,r,i=140,...o){this.remove(n),this._timeouts.set(n,window.setTimeout(r,i,...o))}remove(n){const r=this._timeouts.get(n);r&&window.clearTimeout(r)}clean(){this._timeouts.forEach(n=>void window.clearTimeout(n)),this._timeouts.clear()}}class Controller{constructor(n){_defineProperty(this,"gestures",new Set),_defineProperty(this,"_targetEventStore",new EventStore(this)),_defineProperty(this,"gestureEventStores",{}),_defineProperty(this,"gestureTimeoutStores",{}),_defineProperty(this,"handlers",{}),_defineProperty(this,"config",{}),_defineProperty(this,"pointerIds",new Set),_defineProperty(this,"touchIds",new Set),_defineProperty(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),resolveGestures(this,n)}setEventIds(n){isTouch(n)?this.touchIds=new Set(touchIds(n)):"pointerId"in n&&(n.type==="pointerup"||n.type==="pointercancel"?this.pointerIds.delete(n.pointerId):n.type==="pointerdown"&&this.pointerIds.add(n.pointerId))}applyHandlers(n,r){this.handlers=n,this.nativeHandlers=r}applyConfig(n,r){this.config=parse(n,r)}clean(){this._targetEventStore.clean();for(const n of this.gestures)this.gestureEventStores[n].clean(),this.gestureTimeoutStores[n].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...n){const r=this.config.shared,i=r.eventOptions,o={};let u;if(r.target&&(u=r.target(),!u))return;const c=bindToProps(o,i,!!u);if(r.enabled){for(const d of this.gestures)if(this.config[d].enabled){const f=EngineMap.get(d);new f(this,n,d).bind(c)}for(const d in this.nativeHandlers)c(d,"",f=>this.nativeHandlers[d](_objectSpread2(_objectSpread2({},this.state.shared),{},{event:f,args:n})),void 0,!0)}for(const d in o)o[d]=chain(...o[d]);if(!u)return o;for(const d in o){let f=d.substr(2).toLowerCase();const m=!!~f.indexOf("capture"),g=!!~f.indexOf("passive");(m||g)&&(f=f.replace(/capture|passive/g,"")),this._targetEventStore.add(u,f,"",o[d],{capture:m,passive:g})}}}function setupGesture(t,n){t.gestures.add(n),t.gestureEventStores[n]=new EventStore(t),t.gestureTimeoutStores[n]=new TimeoutStore}function resolveGestures(t,n){n.drag&&setupGesture(t,"drag"),n.wheel&&setupGesture(t,"wheel"),n.scroll&&setupGesture(t,"scroll"),n.move&&setupGesture(t,"move"),n.pinch&&setupGesture(t,"pinch"),n.hover&&setupGesture(t,"hover")}const bindToProps=(t,n,r)=>(i,o,u,c={},d=!1)=>{var f,m;const g=(f=c.capture)!==null&&f!==void 0?f:n.capture,v=(m=c.passive)!==null&&m!==void 0?m:n.passive;let y=d?i:toHandlerProp(i,o,g);r&&v&&(y+="Passive"),t[y]=t[y]||[],t[y].push(u)};function useRecognizers(t,n={},r,i){const o=React.useMemo(()=>new Controller(t),[]);if(o.applyHandlers(t,i),o.applyConfig(n,r),React.useEffect(o.effect.bind(o)),React.useEffect(()=>o.clean.bind(o),[]),n.target===void 0)return o.bind.bind(o)}function useDrag(t,n={}){return registerAction(dragAction),useRecognizers({drag:t},n,"drag")}function useScroll(t,n={}){return registerAction(scrollAction),useRecognizers({scroll:t},n,"scroll")}const ChangeSlide=({color:t,className:n,...r})=>jsxRuntimeExports.jsx(Button,{transparent:!0,className:cn("absolute top-0 h-full w-20 rounded-none text-5xl hover:opacity-70",t,n),...r}),Slideshow=({images:t,index:n=0,className:r,onUpdate:i,onClick:o,onDoubleClick:u,onTripleClick:c,onKeyDown:d,children:f,showControls:m=!0,controlsColor:g="text-gray-800",background:v="contain",...y})=>{var N;const x=reactExports.useRef(null),[S,E]=reactExports.useState(!1),b=useWindowSize().width,k=((N=x.current)==null?void 0:N.clientWidth)||b;reactExports.useEffect(()=>{i(clamp$1(n,0,t.length-1))},[n,i,t]);const[C,I]=useSprings(t.length,P=>({x:(P-n)*k,scale:1}),[k,b,n]),T=useDrag(({active:P,movement:[A],direction:[B],cancel:X})=>{P&&Math.abs(A)>k/4&&(E(!1),i(n+(B>0?-1:1)),X()),I.start(Q=>{E(!0);const Z=(Q-n)*k+(P?A:0),q=P?1-Math.abs(A)/k:1;return{x:Z,scale:q}})},{threshold:5}),w=P=>{P.key=="ArrowLeft"?i(n-1):P.key=="ArrowRight"&&i(n+1),d&&d(P)};return jsxRuntimeExports.jsxs("div",{ref:x,className:cn("relative h-full w-full cursor-move",r),onKeyDown:w,onClick:P=>P.detail===3&&c&&c(P),tabIndex:0,...y,children:[!isTouchDevice()&&jsxRuntimeExports.jsx("input",{onKeyDown:w,className:"m-0 block h-0 cursor-default border-none p-0 opacity-0"}),v==="backdrop"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[C.map(({x:P},A)=>{var B;return jsxRuntimeExports.jsx(animated.div,{className:"no-supports-backdrop:hidden absolute inset-0 bg-cover bg-center",style:{x:P.to(Math.round),backgroundImage:`url(${imageUrl(t[A])})`},role:"img","aria-label":((B=t[A])==null?void 0:B.altText)??void 0},getKey(t,A))}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 backdrop-blur-lg backdrop-brightness-90"})]}),C.map(({x:P,scale:A},B)=>{var X;return reactExports.createElement(animated.div,{className:"absolute h-full w-full touch-none",...T(),key:getKey(t,B),style:{x:P}},jsxRuntimeExports.jsx(animated.div,{onClick:Q=>!S&&o&&o(Q),onMouseUp:Q=>{setTimeout(()=>E(!1),0)},onDoubleClick:u,className:cn("absolute inset-0 touch-none bg-center bg-no-repeat",v==="cover"?"bg-cover":"bg-contain"),style:{scale:A,backgroundImage:`url(${imageUrl(t[B])})`},role:"img","aria-label":((X=t[B])==null?void 0:X.altText)??void 0}))}),jsxRuntimeExports.jsx("div",{className:"contents",onClick:P=>{P.stopPropagation(),P.preventDefault(),P.nativeEvent.stopImmediatePropagation()},children:m&&t.length>1&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ChangeSlide,{className:"left-0",onClick:P=>i(n-1),color:g,children:jsxRuntimeExports.jsx(Caret,{className:"rotate-90"})}),jsxRuntimeExports.jsx("div",{className:`absolute bottom-4 z-10 w-full space-x-2 text-center ${g}`,children:t.map((P,A)=>jsxRuntimeExports.jsx(Button,{secondary:!0,className:cn("rounded-full border border-current p-1.5 text-inherit","hover:border-current hover:bg-current hover:drop-shadow",A==n?"bg-current":"bg-transparent"),onClick:()=>i(A)},getKey(t,A)))}),jsxRuntimeExports.jsx(ChangeSlide,{className:"right-0",onClick:P=>i(n+1),color:g,children:jsxRuntimeExports.jsx(Caret,{className:"-rotate-90"})})]})}),f]})};function getKey(t,n){var r;return((r=t[n])==null?void 0:r.id)??n}const Gallery=({className:t,mode:n="dialog",thumbnails:r=!0,images:i,cover:o=i[0],preloadedImages:u=[],...c})=>{const d=o.id!==i[0].id?[o,...i]:i,[f,m]=reactExports.useState(null),[g,v]=reactExports.useState(0),y=E=>v(E>=d.length?0:E<0?d.length-1:E);reactExports.useEffect(()=>v(0),[o.url]);const x=useDominantColor(d[g].url,{height:400,width:100,crop:"bottom"}),S="cursor-pointer overflow-hidden";return o===void 0?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[n=="inline"||n=="both"?jsxRuntimeExports.jsx(Slideshow,{...c,className:cn(S,t),onClick:E=>y(g+1),onUpdate:y,index:g,background:"cover",images:d,controlsColor:x??void 0,children:n=="both"&&jsxRuntimeExports.jsx(Expand,{className:cn("absolute bottom-0 right-0 z-20 box-content p-6 text-3xl",d.length>1?"opacity-70 hover:opacity-100":"opacity-20 hover:opacity-40",x),onClick:E=>{E.stopPropagation(),m(g)}})}):jsxRuntimeExports.jsxs("div",{...c,className:cn(S,"relative mb-4 rounded-3xl",t),children:[jsxRuntimeExports.jsx("div",{role:"img",style:{backgroundImage:`url(${o.url})`},"aria-label":(o==null?void 0:o.altText)||void 0,className:"absolute h-full w-full bg-cover bg-center scale-100 transition-transform duration-300 ease-out hover:scale-105",onClick:E=>m(0)}),jsxRuntimeExports.jsx(Expand,{className:"pointer-events-none absolute bottom-4 right-4 h-6",fill:"white"})]}),r&&d.length>1&&jsxRuntimeExports.jsx("div",{className:"mt-2 grid grid-cols-[repeat(auto-fit,5rem)] gap-2",children:d.map((E,b)=>n=="dialog"&&b===0?null:jsxRuntimeExports.jsx("button",{className:"button h-[5rem] rounded bg-cover bg-center",style:{backgroundImage:`url(${imageUrl(E,100)})`},title:E.altText||void 0,onClick:k=>n=="dialog"?m(b):y(b)},b))}),jsxRuntimeExports.jsx(Portal,{open:f!==null&&n!=="inline",children:jsxRuntimeExports.jsx("div",{className:"fixed inset-0 z-50 bg-white",children:jsxRuntimeExports.jsx("dialog",{open:!0,className:"relative h-full w-full overflow-hidden border-none bg-white p-0",children:jsxRuntimeExports.jsx(Slideshow,{index:f,images:d,onKeyDown:E=>E.key=="Escape"&&m(null),onUpdate:E=>{y(E),m(E)},onTripleClick:E=>m(null),children:jsxRuntimeExports.jsx(Button,{className:"absolute right-8 top-8 z-10 h-16 w-16 leading-none",onClick:E=>m(null),children:jsxRuntimeExports.jsx(Close,{})})})})})}),u.map((E,b)=>jsxRuntimeExports.jsx("img",{className:"absolute hidden",src:imageUrl(E)},b))]})},Image=({src:t,loading:n="lazy",dimensions:r="responsive",...i})=>{const o=reactExports.useRef(null),[u,c]=reactExports.useState();return reactExports.useLayoutEffect(()=>{if(o.current===null)return;const d=1.2*window.devicePixelRatio,f=o.current;switch(r){case"responsive":f.clientWidth>30&&f.clientHeight>30?c({height:f.clientHeight*d,width:f.clientWidth*d,crop:"center"}):c(f.clientHeight>30?{height:f.clientHeight*d}:{width:f.clientWidth*d});break;case"full":c({width:window.innerWidth*d});break;default:c(r);break}},[r]),jsxRuntimeExports.jsx("img",{src:imageUrl(t,u),ref:o,loading:n,...i})},Title$1=t=>jsxRuntimeExports.jsx("h2",{className:"mx-auto px-2 text-5xl leading-tight text-inherit md:w-7/12",...t}),Section$1=({full:t,className:n,containerCns:r,...i})=>(i.tag||(i.tag="section"),t?jsxRuntimeExports.jsx(i.tag,{className:n,...i,children:i.children}):jsxRuntimeExports.jsx(i.tag,{className:r,...i,children:jsxRuntimeExports.jsx("div",{className:cn("page-width",n),children:i.children})}));function attributesToProps(t){if(!t)return{};const n=t.trim().split(" ").map(r=>r.split("=").map(i=>i.replaceAll('"',"").replaceAll(""",'"')));return Object.fromEntries(n)}const Articles=({section:t})=>{var r,i,o;const n=useTranslations("react.blogs");return jsxRuntimeExports.jsxs(Section$1,{tag:t.tag,className:"space-y-12 py-24 lg:space-y-16 lg:py-28",children:[jsxRuntimeExports.jsx("div",{className:"text-center",children:jsxRuntimeExports.jsx("h2",{className:"font-bold",children:t.title})}),jsxRuntimeExports.jsxs(ArticleGrid,{children:[(r=t.blogs)==null?void 0:r.map((u,c)=>jsxRuntimeExports.jsx(ArticleCard,{article:{title:u.title,handle:u.url.split("/").pop()??"",publishedAt:u.published_at,content:u.content??"",excerpt:u.excerpt??"",image:u.image?{id:"",url:u.image,altText:u.title}:void 0},showDate:t.settings.blog_show_date},c)),((i=t.blogs)==null?void 0:i.length)===1&&jsxRuntimeExports.jsx("div",{})]}),((o=t.blogs)==null?void 0:o.length)===0&&jsxRuntimeExports.jsx("p",{className:"text-center",children:n==null?void 0:n.no_articles})]})},ArticleGrid=({children:t})=>jsxRuntimeExports.jsx("div",{className:"grid grid-cols-[repeat(auto-fit,minmax(20rem,1fr))] justify-start gap-16 lg:grid-cols-[repeat(auto-fit,minmax(25rem,1fr))]",children:t}),ArticleCard=({article:t,blog:n,showDate:r})=>{const i=useTranslations("react.blogs");return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("a",{href:`${window.Shopify.routes.root}blogs/${n==null?void 0:n.handle}/${t.handle}`,className:"space-y-4 text-inherit no-underline transition-opacity hover:opacity-80",children:[t.image&&jsxRuntimeExports.jsx("div",{className:"aspect-14/9 overflow-hidden rounded-lg",children:jsxRuntimeExports.jsx(Image,{src:t.image,alt:t.title,className:"h-full w-full object-cover"})}),r&&t.publishedAt&&jsxRuntimeExports.jsx("span",{className:"absolute -top-10 right-2 text-xl font-semibold text-white",children:new Date(t.publishedAt).toLocaleDateString()}),(n==null?void 0:n.title)&&jsxRuntimeExports.jsx("span",{className:"text-base font-medium uppercase leading-none",children:n.title}),jsxRuntimeExports.jsx("h3",{className:"text-4xl",children:t.title}),jsxRuntimeExports.jsx("p",{className:"leading-snug",children:t.excerpt&&t.excerpt.trim().length>0?jsxRuntimeExports.jsx("span",{dangerouslySetInnerHTML:{__html:t.excerpt}}):t.content.split(" ").length>40?jsxRuntimeExports.jsxs("span",{children:[t.content.split(" ").slice(0,40).join(" "),"..."]}):jsxRuntimeExports.jsx("span",{children:t.content})}),jsxRuntimeExports.jsx("span",{className:"btn rounded-2xl px-4 py-0 text-white",children:i==null?void 0:i.read_more})]})})},Batch=({className:t,...n})=>jsxRuntimeExports.jsx("div",{className:cn("text-18 flex h-full flex-col justify-center",t),...n}),Label=({className:t,...n})=>jsxRuntimeExports.jsx("strong",{className:cn("absolute right-10 top-[-4px] rounded-b-lg bg-white px-[.8em] py-[.3em] text-base",t),...n}),Tier=({className:t,...n})=>jsxRuntimeExports.jsx("li",{className:cn("bg-gray-150 relative h-36 rounded-3xl border-4 border-solid border-transparent",t),...n}),BatchSection=({section:t})=>jsxRuntimeExports.jsxs(Section$1,{tag:t.tag,className:"space-y-12 lg:space-y-16",style:{backgroundColor:t.settings.background_color,paddingTop:`${t.settings.size_top}rem`,paddingBottom:`${t.settings.size_bottom}rem`,color:t.settings.text_color,textAlign:t.settings.text_align},children:[jsxRuntimeExports.jsx(Title$1,{children:t.settings.title}),jsxRuntimeExports.jsx("div",{className:"max-md:text-18",dangerouslySetInnerHTML:{__html:t.settings.text}}),jsxRuntimeExports.jsx("ul",{className:"list grid auto-cols-fr grid-flow-row grid-cols-1 gap-5 text-center lg:grid-flow-col",children:t.blocks.map(({id:n,settings:r})=>jsxRuntimeExports.jsxs(Tier,{className:cn({"border-green bg-white":r.primary}),style:{opacity:r.opacity},children:[jsxRuntimeExports.jsx(Label,{className:cn({"bg-green text-white":r.primary}),children:r.badge}),jsxRuntimeExports.jsx(Batch,{dangerouslySetInnerHTML:{__html:r.text}})]},n))})]}),SearchInput=({value:t,onChange:n,placeholder:r,className:i,containerClassName:o,...u})=>jsxRuntimeExports.jsxs("div",{className:cn("relative",o),children:[jsxRuntimeExports.jsx("input",{type:"text",name:"search",placeholder:r,value:t,onChange:c=>n(c.target.value),className:cn("!mb-0",i),...u}),t&&jsxRuntimeExports.jsx("button",{type:"button",className:"button absolute inset-y-0 right-0 flex items-center px-3",onClick:()=>n(""),children:jsxRuntimeExports.jsx(Close,{className:"h-5 w-5 text-gray-400"})})]}),Blogs=()=>{const{data:t}=useShopifyQuery(BlogsDocument,{}),n=useTranslations("react.blogs"),[r,i]=reactExports.useState(""),[o,u]=reactExports.useState(""),c=reactExports.useMemo(()=>t?t==null?void 0:t.flatMap(d=>d.articles.map(f=>({...f,blog:d}))).filter(d=>{var m;const f=r.toLowerCase();return d.title.toLowerCase().includes(f)||d.blog.title.toLowerCase().includes(f)||((m=d.content)==null?void 0:m.toLowerCase().includes(f))}).sort((d,f)=>o==="oldest"?new Date(d.publishedAt).getTime()-new Date(f.publishedAt).getTime():new Date(f.publishedAt).getTime()-new Date(d.publishedAt).getTime()):[],[t,r,o]);return t?jsxRuntimeExports.jsxs("div",{className:"page-width mt-20 space-y-12",children:[jsxRuntimeExports.jsx("h1",{className:"text-center text-6xl",children:n==null?void 0:n.blogs}),jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center gap-4 sm:gap-8",children:t.map(d=>jsxRuntimeExports.jsx(Button,{href:`${window.Shopify.routes.root}blogs/${d.handle}`,className:"px-4 py-2 text-2xl sm:px-10 sm:py-4 sm:text-3xl",children:d.title},d.handle))}),jsxRuntimeExports.jsxs("div",{className:"mt-4 flex items-center gap-4",children:[jsxRuntimeExports.jsx(SearchInput,{placeholder:n==null?void 0:n.search,value:r,onChange:i,className:"!rounded-md !border !border-gray-300 !py-2 px-4",containerClassName:"w-full"}),jsxRuntimeExports.jsxs("select",{name:"sort",value:o,onChange:d=>u(d.target.value),className:"!mb-0 rounded-md border border-gray-300 px-4 py-2",children:[jsxRuntimeExports.jsx("option",{value:"",disabled:!0,children:n==null?void 0:n.sort_by}),jsxRuntimeExports.jsx("option",{value:"newest",children:n==null?void 0:n.newest}),jsxRuntimeExports.jsx("option",{value:"oldest",children:n==null?void 0:n.oldest})]})]}),c.length===0?jsxRuntimeExports.jsx("p",{className:"text-center",children:n==null?void 0:n.no_articles}):jsxRuntimeExports.jsx(ArticleGrid,{children:c.map(d=>jsxRuntimeExports.jsx(ArticleCard,{article:d,blog:d.blog},d.id))})]}):null},Checkbox=t=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20Z"}),jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M8.7 14.3c-.3.2-.6.2-.9 0L4 10.4a.6.6 0 0 1 0-.8l.4-.4c.2-.2.6-.2.8 0l2.6 2.6c.3.3.6.3.9 0l6-6c.3-.3.7-.3 1 0l.3.3c.3.2.3.6 0 .8l-7.3 7.4Z"})]}),Badge$1=({className:t,children:n,...r})=>jsxRuntimeExports.jsx("span",{className:cn("rounded-xl bg-[#B2E2C8] px-4 py-1.5 text-sm font-semibold text-green-700",t),...r,children:n}),ComparisonSection=({section:{tag:t,settings:{product_a:n,product_b:r,...i},blocks:o}})=>{const u=useSelector(f=>f.products.products),c=useDispatch();reactExports.useEffect(()=>{u||c(Actions$1.loadProducts())},[u,c]);const d=useTranslations("react");return jsxRuntimeExports.jsxs(Section$1,{className:"space-y-20",tag:t,style:{paddingTop:`${i.size_top}rem`,paddingBottom:`${i.size_bottom}rem`,backgroundColor:i.background_color,color:i.text_color},children:[jsxRuntimeExports.jsx(Title$1,{className:"max-sm:text-center",children:i.title}),jsxRuntimeExports.jsx("div",{className:"text-16 self-start sm:row-start-2",dangerouslySetInnerHTML:{__html:i.text}}),jsxRuntimeExports.jsxs("div",{className:"grid grid-flow-col grid-cols-3 items-center justify-center gap-y-5 text-center sm:gap-x-20",children:[objectEntries({product_a:n,product_b:r}).map(([f,m],g)=>{const v=u==null?void 0:u.find(x=>x.handle===m);if(!v)return null;const y={title:i[`${f}_title`]||v.title,subtitle:i[`${f}_subtitle`],label:i[`${f}_label`],image:i[`${f}_image`]||v.featuredImage,titleLabel:i[`${f}_title_label`]};return jsxRuntimeExports.jsxs("div",{className:cn("relative row-start-1 mb-4 space-y-2",{"col-start-1 col-end-3 max-sm:mr-[30%] sm:col-start-2":g===0,"col-start-2 col-end-4 max-sm:ml-[30%] sm:col-start-3":g===1}),role:"columnheader","aria-rowindex":g+2,children:[y.label&&jsxRuntimeExports.jsx("div",{className:"absolute -top-2 flex w-full items-center justify-center",children:jsxRuntimeExports.jsx(Badge$1,{children:y.label})}),y.image&&jsxRuntimeExports.jsx(Image,{className:"aspect-[11/9] w-full rounded-3xl object-cover",src:y.image}),jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center space-x-3",children:[jsxRuntimeExports.jsx("div",{className:"sm:text-24 text-2xl font-bold",children:y.title}),y.titleLabel&&jsxRuntimeExports.jsx(Badge$1,{children:y.titleLabel})]}),jsxRuntimeExports.jsx("h4",{className:"sm:text-18 text-lg font-bold",children:y.subtitle}),jsxRuntimeExports.jsxs("p",{className:"sm:text-16 text-base italic",children:[d==null?void 0:d.checkout.from," ",jsxRuntimeExports.jsx(Price,{price:v.priceRange.minVariantPrice,asText:!0})]})]},g)}),o.map((f,m)=>jsxRuntimeExports.jsxs(reactExports.Fragment,{children:["title"in f.settings&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[m>0&&jsxRuntimeExports.jsx("hr",{className:"bg-gray-150 col-span-full my-0 h-px",style:{gridRow:m*2+1}}),jsxRuntimeExports.jsx("h4",{className:"col-start-2 m-0 h-full text-xl italic sm:col-start-1 sm:text-left",style:{gridRow:m*2+2},"aria-colindex":1,"aria-rowindex":m+1,children:f.settings.title})]}),objectEntries({option_a:f.settings.option_a,option_b:f.settings.option_b}).map(([g,v],y)=>jsxRuntimeExports.jsx("div",{className:cn("flex flex-col items-center justify-center space-y-4",{"col-start-1 sm:col-start-2":y===0,"col-start-3 sm:col-start-3":y===1,"max-sm:col-start-1 max-sm:col-end-3 max-sm:mr-[30%]":y===0&&includes(f.type,"comparison_image","comparison_cta"),"max-sm:col-start-2 max-sm:col-end-4 max-sm:ml-[30%]":y===1&&includes(f.type,"comparison_image","comparison_cta"),"max-sm:mt-8":f.type==="comparison_image"}),style:{gridRow:m*2+(f.type==="comparison_cta"?1:2)},"aria-rowindex":m+1,"aria-colindex":y+2,role:"cell",children:typeof v=="boolean"?v?jsxRuntimeExports.jsx(Checkbox,{className:"h-7 text-green-700","aria-label":"Yes"}):jsxRuntimeExports.jsx("span",{children:"No"}):f.type==="comparison_image"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"w-44 text-base font-semibold text-green-700",children:v}),jsxRuntimeExports.jsx(Image,{className:"aspect-[11/9] w-full rounded-3xl object-cover",src:f.settings[`${g}_image`]})]}):f.type==="comparison_cta"?jsxRuntimeExports.jsx(Button,{className:"rounded-full bg-[#3FAF6D] text-base font-semibold",href:v||productUrl(g.endsWith("a")?n:r),size:"md",children:d==null?void 0:d.actions.buy_now}):jsxRuntimeExports.jsx("span",{className:"rounded-full bg-green-700 px-6 py-0.5 text-base font-semibold text-white",children:v})},g))]},f.id))]})]})},Collapsible=({title:t,className:n,summaryClassname:r,children:i,...o})=>{const[u,c]=reactExports.useState(!0),[d,f]=reactExports.useState(!1),[m,g]=reactExports.useState(0),v=reactExports.useRef(null),y=animated(Caret);reactExports.useLayoutEffect(()=>{c(!1);const k=range(0,20).map(C=>setTimeout(()=>{var I;g(((I=v.current)==null?void 0:I.scrollHeight)||1)},C*200));return()=>{k.map(clearTimeout)}},[]),reactExports.useLayoutEffect(()=>{c(!1)},[i]);const[{height:x,rotate:S},E]=useSpring(()=>({height:0,rotate:0,onRest:{height:k=>{f(!1),k.value===0&&c(!1)}}})),b=k=>{k.preventDefault(),u||c(!0),E.start(x.goal==0?{height:m,rotate:-180}:{height:0,rotate:0}),f(!0)};return jsxRuntimeExports.jsxs("div",{"aria-expanded":u,role:"dialog","aria-modal":!0,onClick:k=>k.preventDefault(),className:cn(n,"overflow-hidden"),"aria-busy":d,...o,children:[jsxRuntimeExports.jsxs("div",{role:"button",onClick:b,className:cn("hocus:opacity-60 cursor-pointer select-none leading-none focus-visible:opacity-60",r),children:[t,jsxRuntimeExports.jsx(y,{className:"ml-2 align-middle",style:{rotate:S}})]}),jsxRuntimeExports.jsx(animated.div,{style:{height:x},children:jsxRuntimeExports.jsx("div",{ref:v,className:"overflow-visible",children:i})})]})},BoxTitle=({title:t,quantity:n})=>jsxRuntimeExports.jsx("h3",{className:"my-0 inline-block text-2xl text-green-700",children:n?jsxRuntimeExports.jsxs("span",{children:[n," x ",jsxRuntimeExports.jsx("span",{dangerouslySetInnerHTML:{__html:t}})]}):jsxRuntimeExports.jsx("span",{dangerouslySetInnerHTML:{__html:t}})}),BoxItem=({item:t,product:n,inCart:r})=>{const i=t.name||(n==null?void 0:n.title)||"";return jsxRuntimeExports.jsxs("li",{className:cn("space-y-4",{"opacity-30":!r}),children:[jsxRuntimeExports.jsx("div",{className:"flex justify-center",children:t.description?jsxRuntimeExports.jsx(Collapsible,{title:jsxRuntimeExports.jsx(BoxTitle,{title:i,quantity:t.quantity}),children:jsxRuntimeExports.jsx("p",{className:"text-xl",dangerouslySetInnerHTML:{__html:t.description}})}):jsxRuntimeExports.jsx(BoxTitle,{title:i,quantity:t.quantity})}),jsxRuntimeExports.jsxs("div",{className:"relative overflow-hidden rounded-3xl bg-stone-100",children:[jsxRuntimeExports.jsx("img",{className:"xs:h-52 block h-44 w-full object-cover lg:h-64",src:imageUrl(t.image||(n==null?void 0:n.featuredImage),400),loading:"lazy"}),r&&jsxRuntimeExports.jsx("div",{className:"absolute left-4 top-4 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-green-700 text-sm",children:jsxRuntimeExports.jsx(Checkmark,{className:"mt-0.5"})})]})]})},InTheBoxSection=({section:t})=>{var c,d,f,m;const n=(c=useSelector(g=>g.cart.lines))==null?void 0:c.map(g=>{var v,y;return(y=(v=g==null?void 0:g.merchandise)==null?void 0:v.product)==null?void 0:y.handle}),r=(d=useSelector(g=>g.cart.stagedUpsells))==null?void 0:d.map(g=>{var v;return(v=g.product)==null?void 0:v.handle}),i=[n,r].flat().filter(isPresent),o=useSelector(g=>g.products.products),u=useDispatch();return reactExports.useEffect(()=>{o||u(Actions$1.loadProducts())},[o,u]),jsxRuntimeExports.jsxs(Section$1,{tag:t.tag,className:classnames("space-y-9 text-center md:space-y-16",{}),style:{backgroundColor:t.settings.background_color,color:t.settings.color,paddingTop:`${t.settings.size_top}rem`,paddingBottom:`${t.settings.size_bottom}rem`},children:[jsxRuntimeExports.jsx("h2",{className:"text-5xl",children:t.settings.title}),jsxRuntimeExports.jsx("ul",{className:classnames("list grid grid-cols-2 grid-rows-[auto,auto] gap-8 sm:grid-cols-3",{"lg:grid-cols-4":(((f=t.blocks)==null?void 0:f.length)??0)>6}),children:(m=t.blocks)==null?void 0:m.map(({id:g,settings:v,attributes:y})=>{const x=o==null?void 0:o.find(E=>E.handle===v.product),S=isInCart(i,v);return t.settings.only_added&&!S?null:jsxRuntimeExports.jsx(BoxItem,{item:v,product:x,inCart:S,...attributesToProps(y)},g)})}),t.settings.summary_image&&jsxRuntimeExports.jsx("img",{className:"block w-full rounded-3xl object-cover sm:hidden",src:imageUrl(t.settings.summary_image),loading:"lazy"})]})};function isInCart(t,n){var r;return((r=window.PRODUCT)==null?void 0:r.handle)===n.product||t.includes(n.product)}const Badge=({className:t,...n})=>jsxRuntimeExports.jsx("span",{className:cn("inline-block rounded-full bg-green-300 px-5 py-1 text-lg font-bold tracking-wide text-green-700",t),...n}),CarouselItem=({className:t,children:n,...r})=>jsxRuntimeExports.jsx("li",{className:cn("flex-none",t),...r,children:n}),Carousel=({className:t,children:n,snap:r,scrollMargin:i="scroll-m-2",scrollDistance:o="page",...u})=>{var I;const[c,d]=reactExports.useState(0),[f,m]=reactExports.useState(!0),g=useWindowSize(),[v,y]=reactExports.useState(1),x=reactExports.useRef(null),[S,E]=reactExports.useState(null),b=(((I=x.current)==null?void 0:I.offsetWidth)??1)/((S==null?void 0:S.scrollWidth)??1),k=reactExports.useCallback(T=>{if(T===null)return;E(T),m(T.scrollWidth>g.width);const w=Array.from(T.children).findIndex(N=>N.offsetLeft+.88*N.scrollWidth>=T.offsetWidth);y(w)},[g.width]);reactExports.useLayoutEffect(()=>{if(S===null)return;const T=throttle(async()=>{let w=0;switch(r){case"snap-end":case"snap-start":for(let N=0;N=B&&(w=N)}break;case"snap-center":case void 0:w=S.scrollLeft/(S.scrollWidth-S.offsetWidth)*(n.length-1),w=Math.round(w);break}d(clamp$1(w,0,n.length-1))},1e3/144);return S.addEventListener("scroll",T,{passive:!0}),()=>S.removeEventListener("scroll",T)},[S,g.width,r,n,b]);function C(T,w){var A;if(S===null)return T;const N=S.children.length-1;T=clamp$1(T,0,N);let P;switch(w){case"snap-start":P=(A=S.children[T])==null?void 0:A.offsetLeft;break;case"snap-end":P=T*(S.scrollWidth-S.offsetWidth)/N;break;case"snap-center":case void 0:P=T*(S.scrollWidth-S.offsetWidth)/N;break}return S.scrollTo({left:P,behavior:"smooth"}),T}return jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx("ul",{className:classnames("no-scrollbar list flex snap-mandatory flex-row items-stretch overflow-x-scroll scroll-smooth",{"snap-x":r,"justify-center":!f},t),ref:k,...u,children:n.map((T,w)=>jsxRuntimeExports.jsx(CarouselItem,{className:classnames(r,i,"select-none"),children:T},w))}),f&&jsxRuntimeExports.jsxs("div",{className:"absolute bottom-0 flex w-full items-center justify-between px-8 leading-[0]",children:[jsxRuntimeExports.jsx(ChangeSlide,{className:"flex-min static flex items-center rounded p-4",onClick:T=>C(c-(o==="single"?1:v),r),children:jsxRuntimeExports.jsx(Caret,{className:"rotate-90"})}),jsxRuntimeExports.jsx("div",{className:"inline-grid flex-grow grid-flow-row grid-cols-[repeat(auto-fit,1rem)] justify-center gap-1.5",children:range(n.length-1).map(T=>jsxRuntimeExports.jsx("button",{className:cn("button h-4 rounded-full border-current text-inherit","hover:bg-current hover:drop-shadow",T>=c&&TC(T,r)},T))}),jsxRuntimeExports.jsx(ChangeSlide,{className:"flex-min static flex items-center rounded p-4",onClick:T=>C(c+(o==="single"?1:v),r),children:jsxRuntimeExports.jsx(Caret,{className:"-rotate-90"})})]})]})},ReviewsSection=({section:t})=>{const n=useWindowSize();return jsxRuntimeExports.jsxs(Section$1,{tag:t.tag,full:!0,className:classnames("space-y-12 text-center",{"pt-24 lg:!pt-28":t.settings.top_padding,"pb-24 lg:!pb-28":t.settings.bottom_padding}),style:{backgroundColor:t.settings.background_color,color:t.settings.color},children:[jsxRuntimeExports.jsxs("header",{className:"space-y-6 px-6 text-center",children:[t.settings.badge&&jsxRuntimeExports.jsx(Badge,{children:t.settings.badge}),t.settings.title&&jsxRuntimeExports.jsx(Title$1,{children:t.settings.title}),t.settings.description&&jsxRuntimeExports.jsx("p",{dangerouslySetInnerHTML:{__html:t.settings.description}})]}),jsxRuntimeExports.jsx(Carousel,{className:"space-x-8 pb-20 pt-4",snap:n.width<=BREAKPOINTS.xs?"snap-center":"snap-start",scrollMargin:"scroll-m-4",children:t.blocks.map(({id:r,settings:i,attributes:o},u)=>reactExports.createElement("div",{...attributesToProps(o),id:r,key:u,className:classnames("h-full rounded-2xl bg-white p-10 drop-shadow-xl md:p-12","flex flex-col items-center justify-between space-y-3 md:space-y-4",{"ml-12":u===0,"mr-12":u===t.blocks.length-1},{"w-100 md:w-112":!t.settings.block_width}),style:{width:t.settings.block_width||void 0}},jsxRuntimeExports.jsx(Image,{className:"block aspect-square w-full rounded-3xl object-cover",src:i.image,dimensions:"responsive"}),t.settings.show_score&&jsxRuntimeExports.jsx(Stars,{rating:i.rating,className:"!mt-7"}),i.title&&jsxRuntimeExports.jsx("h3",{className:"text-3xl font-bold",children:i.title}),(i.body.toString().length>5||i.author)&&jsxRuntimeExports.jsx("p",{className:"flex-auto text-2xl",dangerouslySetInnerHTML:{__html:i.body}}),i.author&&jsxRuntimeExports.jsxs("p",{className:"text-14 space-x-2",children:[jsxRuntimeExports.jsx("span",{children:i.author}),jsxRuntimeExports.jsx("span",{className:"text-e4/8 inline-block rounded-full bg-cyan-500 px-1 py-1.5 align-text-bottom leading-none text-white",children:jsxRuntimeExports.jsx(Checkmark,{className:"inline align-middle"})})]})))})]})},Countdown=({to:t,rounding:n,className:r,separatorClassName:i,children:o,...u})=>{const c=reactExports.useRef(null),[{total:d,...f},m]=reactExports.useState(diffDates(new Date,t));reactExports.useEffect(()=>{const y=setInterval(()=>{m(diffDates(new Date,t))},999);return()=>clearInterval(y)},[t]);const g=useTranslations("react.units");reactExports.useLayoutEffect(()=>{var y,x;c.current&&(d<=0?(y=c.current.closest(".countdown-container"))==null||y.classList.add("hidden"):(x=c.current.closest(".countdown-container"))==null||x.classList.remove("hidden"))},[d]);const v=objectKeys(f).findIndex(y=>y===n);return jsxRuntimeExports.jsxs("span",{ref:c,className:cn("m-0 rounded-2xl text-[1.25em] font-semibold",r),...u,children:[o,objectEntries({...f}).filter((y,x)=>v>=0?x<=v:!0).map(([y,x])=>jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:x}),jsxRuntimeExports.jsx("span",{className:"text-e7/8",children:g==null?void 0:g[`${y}_short`]}),jsxRuntimeExports.jsx("span",{className:cn("mx-1 last:hidden",i),children:":"})]},y))]})},Action=({className:t,children:n,...r})=>jsxRuntimeExports.jsx(Button,{...r,className:cn("bg-green-600 font-bold sm:px-5 sm:py-3 sm:text-xl",{"px-5 py-3 text-xl":r.size!=="sm"},t),children:n}),Actions=({className:t,children:n,...r})=>jsxRuntimeExports.jsx("div",{...r,className:cn("flex space-x-2",t),children:n}),Container=({className:t,size:n="large",product:r,bg:i,children:o})=>{var m;const u=useTranslations("react"),[c,d]=reactExports.useState(!1),f=((m=r.opaque)==null?void 0:m.value)==="true";return jsxRuntimeExports.jsxs(animated.li,{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),className:cn("safari-overflow-fix relative h-96 overflow-hidden rounded-3xl bg-white text-3xl",{"h-52 sm:h-96":n=="small","h-72 sm:h-96":n=="medium","h-96":n=="large"},t),children:[jsxRuntimeExports.jsx("img",{className:cn("absolute z-0 h-full w-full transform-gpu transition-transform duration-300 ease-out",f?"object-cover":"object-contain",c?"scale-100":"scale-110"),src:imageUrl(r.featuredImage,700),loading:"lazy"}),jsxRuntimeExports.jsx("a",{className:cn("absolute z-[5] h-full w-full",{"bg-black opacity-30":f},i),href:productUrl(r)}),jsxRuntimeExports.jsxs("div",{className:cn("pointer-events-none absolute z-10 flex h-full w-full flex-col items-start justify-between",{"p-10":n=="large"||n=="medium","p-4 sm:p-10":n=="small"}),children:[jsxRuntimeExports.jsxs("div",{className:"pointer-events-auto",children:[jsxRuntimeExports.jsx("h4",{className:cn("mb-3 leading-none",{"xs:text-3xl text-2xl":n==="small","text-4xl":n==="medium"||n==="large"},f?"text-white":"text-gray-900"),children:jsxRuntimeExports.jsx("a",{href:productUrl(r),children:r.title})}),jsxRuntimeExports.jsx(Promo,{promo:r,className:"inline-block justify-self-start rounded-full px-4 py-2 text-green-550 bg-white text-xl font-bold"})]}),jsxRuntimeExports.jsx("div",{className:"pointer-events-auto",children:r.availableForSale?o:jsxRuntimeExports.jsx(Actions,{children:jsxRuntimeExports.jsx(Action,{href:productUrl(r),className:"bg-stone-300 px-12",children:u==null?void 0:u.auk_page.out_of_stock})})})]})]})},ProductCard={Actions,Action,Container},sortProducts=t=>(n,r)=>{switch(t){default:case"featured":return n.offer&&r.offer?0:n.offer?-1:r.offer?1:0;case"alphabetical":return n.title.localeCompare(r.title);case"alphabetical_reversed":return r.title.localeCompare(n.title);case"products_high":return getPrice(r.priceRange.minVariantPrice)-getPrice(n.priceRange.minVariantPrice);case"products_low":return getPrice(n.priceRange.minVariantPrice)-getPrice(r.priceRange.minVariantPrice);case"date":return new Date(n.publishedAt).getTime()-new Date(r.publishedAt).getTime();case"date_reversed":return new Date(r.publishedAt).getTime()-new Date(n.publishedAt).getTime()}},Title=({className:t,children:n,...r})=>jsxRuntimeExports.jsx("h2",{className:cn("mb-16 text-center",t),...r,children:n}),Section=({className:t,containerCns:n,title:r,children:i,section:o,backgroundColor:u,...c})=>jsxRuntimeExports.jsx("div",{className:cn(n),"data-section-id":o==null?void 0:o.id,"data-section-type":o==null?void 0:o.name,style:{backgroundColor:u},children:jsxRuntimeExports.jsxs("section",{className:cn("max-w-pagewidth-xl mx-auto px-8 pb-40 pt-16",t),...c,children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:r&&jsxRuntimeExports.jsx(Title,{children:r})}),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:i})]})}),List=({className:t,children:n,...r})=>jsxRuntimeExports.jsx("ul",{className:cn("list grid grid-cols-1 gap-10 text-white sm:grid-cols-2 lg:grid-cols-3",t),...r,children:n}),AllProducts=({section:t})=>jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsx(ProductList,{section:t})}),ProductList=({section:t})=>{const n=useDispatch(),r=useTranslations("react"),{data:i,error:o}=useShopifyQuery(ProductsDocument,{}),u=useFreeShippingThreshold(),c=(i==null?void 0:i.filter(isGiftCard))??[],d=(i==null?void 0:i.filter(isAccessory).sort(sortProducts(t.settings.sort)))??[],f=(i==null?void 0:i.filter(isSeed))??[];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[o?jsxRuntimeExports.jsx("div",{className:"bg-red color-white p-4",children:jsxRuntimeExports.jsx("p",{children:o.message})}):null,d.length>0&&jsxRuntimeExports.jsxs(Section,{title:r==null?void 0:r.products.accessories,id:"accessories",children:[jsxRuntimeExports.jsxs("p",{className:"mb-20 text-center text-3xl font-semibold md:hidden",children:[r==null?void 0:r.products.free_shipping_over," ",getPrice(u,!0)]}),jsxRuntimeExports.jsx(List,{children:d.map(m=>jsxRuntimeExports.jsx(ProductCard.Container,{product:m,children:jsxRuntimeExports.jsx(ProductCard.Actions,{children:jsxRuntimeExports.jsx(ProductCard.Action,{href:productUrl(m),className:"px-12",children:r==null?void 0:r.actions.buy_now})})},m.id))})]}),f.length>0&&jsxRuntimeExports.jsx(Section,{title:r==null?void 0:r.products.seeds,id:"fro",containerCns:"bg-beige",children:jsxRuntimeExports.jsx(List,{className:"grid-cols-2 gap-4 sm:gap-10",children:i==null?void 0:i.filter(isSeed).map(m=>jsxRuntimeExports.jsx(ProductCard.Container,{product:m,size:"small",children:jsxRuntimeExports.jsxs(ProductCard.Actions,{children:[jsxRuntimeExports.jsx(ProductCard.Action,{size:"xs",href:productUrl(m),className:"sm:px-12",children:r==null?void 0:r.actions.buy_now}),jsxRuntimeExports.jsx(ProductCard.Action,{size:"xs",title:r==null?void 0:r.actions.add_to_cart,onClick:g=>{var v;return n(Actions$1.addToCart([{quantity:1,id:(v=m.variants[0])==null?void 0:v.id}]))},children:"+"})]})},m.id))})}),c.length>0&&jsxRuntimeExports.jsx(Section,{title:r==null?void 0:r.products.other,id:"other",children:jsxRuntimeExports.jsx(List,{children:c.map(m=>jsxRuntimeExports.jsx(ProductCard.Container,{product:m,children:jsxRuntimeExports.jsx(ProductCard.Actions,{children:jsxRuntimeExports.jsx(ProductCard.Action,{href:productUrl(m),className:"px-12",children:r==null?void 0:r.actions.buy_now})})},m.id))})})]})},CollectionSection=({section:t})=>{var d,f;const n=useDispatch(),r=useTranslations("react"),{data:i}=useShopifyQuery(ProductsDocument,{}),{data:o}=useShopifyQuery(CollectionDocument,{handle:t.settings.collection}),u=(f=(d=o==null?void 0:o.products)==null?void 0:d.map(m=>m.id))==null?void 0:f.filter(m=>gidToId(m)!==getCurrentPageProductId()),c=i==null?void 0:i.filter(m=>u==null?void 0:u.includes(m.id)).sort(sortProducts(t.settings.sort));return c&&c.length>0?jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsx(Section,{title:t.settings.title||(o==null?void 0:o.title),section:t,backgroundColor:t.settings.background_color,children:jsxRuntimeExports.jsx(List,{className:cn({"grid-cols-2":t.settings.size=="small"}),children:c==null?void 0:c.map(m=>jsxRuntimeExports.jsx(ProductCard.Container,{product:m,size:t.settings.size,children:jsxRuntimeExports.jsxs(ProductCard.Actions,{children:[jsxRuntimeExports.jsx(ProductCard.Action,{size:"xs",href:productUrl(m),className:"sm:px-12",children:r==null?void 0:r.actions.buy_now}),t.settings.show_quick_add&&jsxRuntimeExports.jsx(ProductCard.Action,{size:"xs",title:r==null?void 0:r.actions.add_to_cart,onClick:g=>{var v;return n(Actions$1.addToCart([{quantity:1,id:(v=m.variants[0])==null?void 0:v.id}]))},children:"+"})]})},m.id))})})}):null},Collection=({section:t})=>jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsx(CollectionSection,{section:t})}),RelatedProducts=()=>{var o,u,c;const{products:t,error:n}=useSelector(d=>{var f;return{...d.products,products:(f=d.products.products)==null?void 0:f.filter(m=>{var g;return gidToId((g=m.variants[0])==null?void 0:g.id)!=getCurrentPageProductId()}).filter(m=>m.availableForSale)}}),r=useTranslations("react"),i=useDispatch();return reactExports.useEffect(()=>{t||i(Actions$1.loadProducts())},[t,i]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"bg-red",children:n==null?void 0:n.split(` `).map((d,f)=>jsxRuntimeExports.jsx("p",{children:d},f))}),jsxRuntimeExports.jsx("div",{className:"bg-beige space-y-10 pb-40 pt-10",children:((o=window.PRODUCT)==null?void 0:o.type)=="Seeds"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SeedSection,{title:r==null?void 0:r.products.other_seeds,products:t}),jsxRuntimeExports.jsx(AccesoriesSection,{products:t})]}):((u=window.PRODUCT)==null?void 0:u.handle)=="auk"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(SeedSection,{products:t})}):((c=window.PRODUCT)==null?void 0:c.handle)=="auk-mini"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AccesoriesSection,{products:t==null?void 0:t.filter(isAukMiniAccessory)}),jsxRuntimeExports.jsx(SeedSection,{products:t})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AccesoriesSection,{products:t}),jsxRuntimeExports.jsx(SeedSection,{products:t})]})})]})};function AccesoriesSection({title:t,products:n}){const r=useTranslations("react");return jsxRuntimeExports.jsxs(Section,{id:"accessories",className:"pb-0",children:[jsxRuntimeExports.jsx(Title,{className:"text-5xl",children:t||(r==null?void 0:r.products.related_products)}),jsxRuntimeExports.jsx(List,{children:n==null?void 0:n.filter(isAccessory).reverse().map(i=>jsxRuntimeExports.jsx(ProductCard.Container,{product:i,bg:"bg-opacity-30 bg-black",children:jsxRuntimeExports.jsx(ProductCard.Actions,{children:jsxRuntimeExports.jsx(ProductCard.Action,{href:productUrl(i),className:"px-12",children:r==null?void 0:r.actions.buy_now})})},i.id))})]})}function SeedSection({title:t,products:n}){const r=useDispatch(),i=useTranslations("react");return jsxRuntimeExports.jsxs(Section,{id:"fro",className:"pb-0",children:[jsxRuntimeExports.jsx(Title,{className:"text-5xl",children:t||(i==null?void 0:i.products.popular_seeds)}),jsxRuntimeExports.jsx(List,{children:n==null?void 0:n.filter(isSeed).map(o=>jsxRuntimeExports.jsx(ProductCard.Container,{product:o,children:jsxRuntimeExports.jsxs(ProductCard.Actions,{children:[jsxRuntimeExports.jsx(ProductCard.Action,{href:productUrl(o),className:"px-12",children:i==null?void 0:i.actions.buy_now}),jsxRuntimeExports.jsx(ProductCard.Action,{title:i==null?void 0:i.actions.add_to_cart,onClick:u=>{var c;return r(Actions$1.addToCart([{quantity:1,id:(c=o.variants[0])==null?void 0:c.id}]))},children:"+"})]})},o.id))})]})}const Sections=()=>{const state=useReadyState(),[sections,setSections]=reactExports.useState(window.Sections),country=useCountry();return reactExports.useEffect(()=>{if(!window.Shopify.designMode)return;const events=["shopify:section:load","shopify:section:reorder"];function onChange(e){const elem=e.target,script=elem==null?void 0:elem.querySelector("script");script&&elem&&(window.Sections=window.Sections.filter(t=>t.id!==`#${elem.id}`),eval(script.innerText)),setSections([...window.Sections])}return events.forEach(t=>window.addEventListener(t,onChange)),()=>{events.forEach(t=>window.removeEventListener(t,onChange))}},[]),reactExports.useEffect(()=>{if(country.iso_code!==CountryCode.CA)return;function t(){document.querySelectorAll('a[href="/products/auk"], a[href*="/products/auk?"]').forEach(n=>{n.closest('[role="listbox"]')||(n.style.display="none")})}return t(),document.addEventListener("click",t),document.addEventListener("DOMContentLoaded",t),()=>{document.removeEventListener("click",t),document.removeEventListener("DOMContentLoaded",t)}}),state!=="complete"?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[sections==null?void 0:sections.map(t=>jsxRuntimeExports.jsx(ErrorBoundary,{onError:n=>console.warn(`${startCase(t.name)} Error`,n),children:jsxRuntimeExports.jsxs(DynamicPortal,{selector:t.id,children:[t.name==="Comparison"&&jsxRuntimeExports.jsx(ComparisonSection,{section:t}),t.name==="Reviews"&&jsxRuntimeExports.jsx(ReviewsSection,{section:t}),t.name==="Steps"&&jsxRuntimeExports.jsx(StepsSection,{section:t}),t.name==="Blogs"&&jsxRuntimeExports.jsx(Articles,{section:t}),t.name==="BlogList"&&jsxRuntimeExports.jsx(Blogs,{}),t.name==="Batches"&&jsxRuntimeExports.jsx(BatchSection,{section:t}),t.name==="InTheBox"&&jsxRuntimeExports.jsx(InTheBoxSection,{section:t}),t.name==="list-collections-template"&&jsxRuntimeExports.jsx(AllProducts,{section:t}),t.name==="collection-section"&&jsxRuntimeExports.jsx(Collection,{section:t})]})},t.id)),jsxRuntimeExports.jsx(DynamicPortal,{selector:".countdown[data-to]",multiple:!0,render:t=>{const n=t.getAttribute("data-to");return n?jsxRuntimeExports.jsx(Countdown,{to:new Date(n)}):null}})]})},StepsSection=({section:t})=>jsxRuntimeExports.jsxs(Section$1,{tag:t.tag,className:"my-20 space-y-12 py-24 text-center lg:space-y-16 lg:!py-28",style:{backgroundColor:t.settings.background_color,color:t.settings.text_color,textAlign:t.settings.text_align},children:[jsxRuntimeExports.jsx(Title$1,{children:t.settings.title}),jsxRuntimeExports.jsx("div",{className:"text-16 self-start md:row-start-2",dangerouslySetInnerHTML:{__html:t.settings.text}}),jsxRuntimeExports.jsx("div",{className:"list grid items-center gap-y-8 md:auto-cols-[5fr_1fr] md:grid-flow-col md:gap-y-4",children:t.blocks.map(({id:n,settings:r},i)=>jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("h3",{className:"text-24 m-0 leading-none md:row-start-1",children:r.title}),r.text&&jsxRuntimeExports.jsx("p",{className:"text-16 self-start md:row-start-2",dangerouslySetInnerHTML:{__html:r.text}}),jsxRuntimeExports.jsx(Image,{className:cn("h-100 justify-self-center rounded-full object-cover md:row-start-3 md:h-64 md:w-64",i