var gd=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports);var vd=gd((exports,module)=>{function _mergeNamespaces(t,n){for(var r=0;ra[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"),a=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"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.iterator;function _(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function k(I,L,te){this.props=I,this.context=L,this.refs=S,this.updater=te||x}k.prototype.isReactComponent={},k.prototype.setState=function(I,L){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,L,"setState")},k.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function b(){}b.prototype=k.prototype;function w(I,L,te){this.props=I,this.context=L,this.refs=S,this.updater=te||x}var j=w.prototype=new b;j.constructor=w,E(j,k.prototype),j.isPureReactComponent=!0;var C=Array.isArray,T=Object.prototype.hasOwnProperty,N={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function A(I,L,te){var K,ne={},se=null,de=null;if(L!=null)for(K in L.ref!==void 0&&(de=L.ref),L.key!==void 0&&(se=""+L.key),L)T.call(L,K)&&!O.hasOwnProperty(K)&&(ne[K]=L[K]);var le=arguments.length-2;if(le===1)ne.children=te;else if(1"u"||__SENTRY_DEBUG__,SDK_VERSION="9.15.0",GLOBAL_OBJ=globalThis;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 a=r.__SENTRY__=r.__SENTRY__||{},o=a[SDK_VERSION]=a[SDK_VERSION]||{};return o[t]||(o[t]=n())}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 a=5,o=[];let u=0,c=0;const d=" > ",p=d.length;let m;const v=Array.isArray(n)?n:n.keyAttrs,g=!Array.isArray(n)&&n.maxStringLength||DEFAULT_MAX_STRING_LENGTH;for(;r&&u++1&&c+o.length*p+m.length>=g));)o.push(m),c+=m.length,r=r.parentNode;return o.reverse().join(d)}catch{return""}}function _htmlElementAsString(t,n){const r=t,a=[];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}a.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=>{a.push(`[${c[0]}="${c[1]}"]`)});else{r.id&&a.push(`#${r.id}`);const c=r.className;if(c&&isString(c)){const d=c.split(/\s+/);for(const p of d)a.push(`.${p}`)}}const u=["aria-label","type","name","title","alt"];for(const c of u){const d=r.getAttribute(c);d&&a.push(`[${c}="${d}"]`)}return a.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 a=0;a"u"||__SENTRY_DEBUG__,PREFIX="Sentry Logger ",CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],originalConsoleMethods={};function consoleSandbox(t){if(!("console"in GLOBAL_OBJ))return t();const n=GLOBAL_OBJ.console,r={},a=Object.keys(originalConsoleMethods);a.forEach(o=>{const u=originalConsoleMethods[o];r[o]=n[o],n[o]=u});try{return t()}finally{a.forEach(o=>{n[o]=r[o]})}}function makeLogger(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return DEBUG_BUILD$3?CONSOLE_LEVELS.forEach(r=>{n[r]=(...a)=>{t&&consoleSandbox(()=>{GLOBAL_OBJ.console[r](`${PREFIX}[${r}]:`,...a)})}}):CONSOLE_LEVELS.forEach(r=>{n[r]=()=>{}}),n}const logger=getGlobalSingleton("logger",makeLogger);function truncate(t,n=0){return typeof t!="string"||n===0||t.length<=n?t:`${t.slice(0,n)}...`}function safeJoin(t,n){if(!Array.isArray(t))return"";const r=[];for(let a=0;aisMatchingPattern(t,a,r))}function fill(t,n,r){if(!(n in t))return;const a=t[n];if(typeof a!="function")return;const o=r(a);typeof o=="function"&&markFunctionWrapped(o,a);try{t[n]=o}catch{DEBUG_BUILD$3&&logger.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&&logger.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 a=r[0];if(!a)return"[object has no keys]";if(a.length>=n)return truncate(a,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 a=getFirstException(t);return a?a.type&&a.value?`${a.type}: ${a.value}`:a.type||a.value||r||"":r||""}function addExceptionTypeValue(t,n,r){const a=t.exception=t.exception||{},o=a.values=a.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 a={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...a,...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))return dateTimestampInSeconds;const n=Date.now()-t.now(),r=t.timeOrigin==null?n:t.timeOrigin;return()=>(r+t.now())/ONE_SECOND_IN_MS}const timestampInSeconds=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 a={...t};for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&(a[o]=merge(a[o],n[o],r-1));return a}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]}function generateTraceId(){return uuid4()}function generateSpanId(){return uuid4().substring(16)}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,a=r instanceof Scope?r.getScopeData():isPlainObject$2(r)?n:void 0,{tags:o,extra:u,user:c,contexts:d,level:p,fingerprint:m=[],propagationContext:v}=a||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...u},this._contexts={...this._contexts,...d},c&&Object.keys(c).length&&(this._user=c),p&&(this._level=p),m.length&&(this._fingerprint=m),v&&(this._propagationContext=v),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 a=typeof r=="number"?r:DEFAULT_MAX_BREADCRUMBS;if(a<=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>a&&(this._breadcrumbs=this._breadcrumbs.slice(-a),(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 a=(r==null?void 0:r.event_id)||uuid4();if(!this._client)return logger.warn("No client configured on scope - will not capture exception!"),a;const o=new Error("Sentry syntheticException");return this._client.captureException(n,{originalException:n,syntheticException:o,...r,event_id:a},this),a}captureMessage(n,r,a){const o=(a==null?void 0:a.event_id)||uuid4();if(!this._client)return logger.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,...a,event_id:o},this),o}captureEvent(n,r){const a=(r==null?void 0:r.event_id)||uuid4();return this._client?(this._client.captureEvent(n,{...r,event_id:a},this),a):(logger.warn("No client configured on scope - will not capture event!"),a)}_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 a;n?a=n:a=new Scope;let o;r?o=r:o=new Scope,this._stack=[{scope:a}],this._isolationScope=o}withScope(n){const r=this._pushScope();let a;try{a=n(r)}catch(o){throw this._popScope(),o}return isThenable(a)?a.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),a)}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[a,o]=t;return a?r.withSetScope(a,o):r.withScope(o)}return r.withScope(t[0])}function getClient(){return getCurrentScope().getClient()}function getTraceContextFromScope(t){const n=t.getPropagationContext(),{traceId:r,parentSpanId:a,propagationSpanId:o}=n,u={trace_id:r,span_id:o||generateSpanId()};return a&&(u.parent_span_id=a),u}const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE="sentry.source",SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE="sentry.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]}}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 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((a,[o,u])=>{if(o.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)){const c=o.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);a[c]=u}return a},{});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 a=baggageHeaderToObject(r);return Object.entries(a).forEach(([o,u])=>{n[o]=u}),n},{}):baggageHeaderToObject(t)}function baggageHeaderToObject(t){return t.split(",").map(n=>n.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((n,[r,a])=>(r&&a&&(n[r]=a),n),{})}const TRACE_FLAG_SAMPLED=1;let hasShownSpanDropWarning=!1;function spanToTraceContext(t){const{spanId:n,traceId:r,isRemote:a}=t.spanContext(),o=a?n:spanToJSON(t).parent_span_id,u=getCapturedScopesOnSpan(t).scope,c=a?(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:a,...o},attributes:u})=>({span_id:n,trace_id:r,sampled:a===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){if(spanIsSentrySpan(t))return t.getSpanJSON();const{spanId:n,traceId:r}=t.spanContext();if(spanIsOpenTelemetrySdkTraceBaseSpan(t)){const{attributes:a,startTime:o,name:u,endTime:c,parentSpanId:d,status:p,links:m}=t;return{span_id:n,trace_id:r,data:a,description:u,parent_span_id:d,start_timestamp:spanTimeInputToSeconds(o),timestamp:spanTimeInputToSeconds(c)||void 0,status:getStatusMessage(p),op:a[SEMANTIC_ATTRIBUTE_SENTRY_OP],origin:a[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)}const STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...t){const n=t.sort((r,a)=>r[0]-a[0]).map(r=>r[1]);return(r,a=0,o=0)=>{const u=[],c=r.split(` `);for(let d=a;d1024)continue;const m=WEBPACK_ERROR_REGEXP.test(p)?p.replace(WEBPACK_ERROR_REGEXP,"$1"):p;if(!m.match(/\S*Error: /)){for(const v of n){const g=v(m);if(g){u.push(g);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(a=>{a.stacktrace.frames&&r.push(...a.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&&logger.error(`Error while instrumenting ${t}`,r)}}}function triggerHandlers(t,n){const r=t&&handlers[t];if(r)for(const a of r)try{a(n)}catch(o){DEBUG_BUILD$3&&logger.error(`Error while triggering instrumentation handler. Type: ${t} Name: ${getFunctionName(a)} 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,a,o){return triggerHandlers("error",{column:a,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}function hasSpansEnabled(t){var r;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const n=t||((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:a}=n.getDsn()||{},o={environment:r.environment||DEFAULT_ENVIRONMENT,release:r.release,public_key:a,trace_id:t};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 E;const n=getClient();if(!n)return{};const r=getRootSpan(t),a=spanToJSON(r),o=a.data,u=r.spanContext().traceState,c=(u==null?void 0:u.get("sentry.sample_rate"))??o[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];function d(S){return(typeof c=="number"||typeof c=="string")&&(S.sample_rate=`${c}`),S}const p=r[FROZEN_DSC_FIELD];if(p)return d(p);const m=u==null?void 0:u.get("sentry.dsc"),v=m&&baggageHeaderToDynamicSamplingContext(m);if(v)return d(v);const g=getDynamicSamplingContextFromClient(t.spanContext().traceId,n),_=o[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE],x=a.description;return _!=="url"&&x&&(g.transaction=x),hasSpansEnabled()&&(g.sampled=String(spanIsSampled(r)),g.sample_rand=(u==null?void 0:u.get("sentry.sample_rand"))??((E=getCapturedScopesOnSpan(r).scope)==null?void 0:E.getPropagationContext().sampleRand.toString())),d(g),n.emit("createDsc",g,r),g}const DSN_REGEX=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function isValidProtocol(t){return t==="http"||t==="https"}function dsnToString(t,n=!1){const{host:r,path:a,pass:o,port:u,projectId:c,protocol:d,publicKey:p}=t;return`${d}://${p}${n&&o?`:${o}`:""}@${r}${u?`:${u}`:""}/${a&&`${a}/`}${c}`}function dsnFromString(t){const n=DSN_REGEX.exec(t);if(!n){consoleSandbox(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[r,a,o="",u="",c="",d=""]=n.slice(1);let p="",m=d;const v=m.split("/");if(v.length>1&&(p=v.slice(0,-1).join("/"),m=v.pop()),m){const g=m.match(/^\d+/);g&&(m=g[0])}return dsnFromComponents({host:u,pass:o,path:p,projectId:m,port:c,protocol:r,publicKey:a})}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:a}=t;return["protocol","publicKey","host","projectId"].find(c=>t[c]?!1:(logger.error(`Invalid Sentry Dsn: ${c} missing`),!0))?!1:r.match(/^\d+$/)?isValidProtocol(a)?n&&isNaN(parseInt(n,10))?(logger.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(logger.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),!1):(logger.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function makeDsn(t){const n=typeof t=="string"?dsnFromString(t):dsnFromComponents(t);if(!(!n||!validateDsn(n)))return n}function normalize(t,n=100,r=1/0){try{return visit$1("",t,n,r)}catch(a){return{ERROR:`**non-serializable** (${a})`}}}function normalizeToSize(t,n=3,r=100*1024){const a=normalize(t,n);return jsonSize(a)>r?normalizeToSize(t,n-1,r):a}function visit$1(t,n,r=1/0,a=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 p=typeof n.__sentry_override_normalization_depth__=="number"?n.__sentry_override_normalization_depth__:r;if(p===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,p-1,a,o)}catch{}const v=Array.isArray(n)?[]:{};let g=0;const _=convertToPlainObject(n);for(const x in _){if(!Object.prototype.hasOwnProperty.call(_,x))continue;if(g>=a){v[x]="[MaxProperties ~]";break}const E=_[x];v[x]=visit$1(x,E,p-1,a,o),g++}return c(n),v}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(a){return t.has(a)?!0:(t.add(a),!1)}function r(a){t.delete(a)}return[n,r]}function createEnvelope(t,n=[]){return[t,n]}function addItemToEnvelope(t,n){const[r,a]=t;return[r,[...a,n]]}function forEachEnvelopeItem(t,n){const r=t[1];for(const a of r){const o=a[0].type;if(n(a,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 a=JSON.stringify(n);function o(u){typeof a=="string"?a=typeof u=="string"?a+u:[encodeUTF8(a),u]:a.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 p;try{p=JSON.stringify(d)}catch{p=JSON.stringify(normalize(d))}o(p)}}return typeof a=="string"?a:concatBuffers(a)}function concatBuffers(t){const n=t.reduce((o,u)=>o+u.length,0),r=new Uint8Array(n);let a=0;for(const o of t)r.set(o,a),a+=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",otel_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,a){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&&a&&{dsn:dsnToString(a)},...o&&{trace:o}}}function enhanceEventWithSdkInfo(t,n){return n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]]),t}function createSessionEnvelope(t,n,r,a){const o=getSdkMetadataForEnvelopeHeader(r),u={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!a&&n&&{dsn:dsnToString(n)}},c="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return createEnvelope(u,[c])}function createEventEnvelope(t,n,r,a){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,a,n);return delete t.sdkProcessingMetadata,createEnvelope(c,[[{type:u},t]])}var States;(function(t){t[t.PENDING=0]="PENDING";const r=1;t[t.RESOLVED=r]="RESOLVED";const a=2;t[t.REJECTED=a]="REJECTED"})(States||(States={}));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=States.PENDING,this._handlers=[],this._runExecutor(n)}then(n,r){return new SyncPromise((a,o)=>{this._handlers.push([!1,u=>{if(!n)a(u);else try{a(n(u))}catch(c){o(c)}},u=>{if(!r)o(u);else try{a(r(u))}catch(c){o(c)}}]),this._executeHandlers()})}catch(n){return this.then(r=>r,n)}finally(n){return new SyncPromise((r,a)=>{let o,u;return this.then(c=>{u=!1,o=c,n&&n()},c=>{u=!0,o=c,n&&n()}).then(()=>{if(u){a(o);return}r(o)})})}_executeHandlers(){if(this._state===States.PENDING)return;const n=this._handlers.slice();this._handlers=[],n.forEach(r=>{r[0]||(this._state===States.RESOLVED&&r[1](this._value),this._state===States.REJECTED&&r[2](this._value),r[0]=!0)})}_runExecutor(n){const r=(u,c)=>{if(this._state===States.PENDING){if(isThenable(c)){c.then(a,o);return}this._state=u,this._value=c,this._executeHandlers()}},a=u=>{r(States.RESOLVED,u)},o=u=>{r(States.REJECTED,u)};try{n(a,o)}catch(u){o(u)}}}function notifyEventProcessors(t,n,r,a=0){return new SyncPromise((o,u)=>{const c=t[a];if(n===null||typeof c!="function")o(n);else{const d=c({...n},r);DEBUG_BUILD$4&&c.id&&d===null&&logger.log(`Event processor "${c.id}" dropped event`),isThenable(d)?d.then(p=>notifyEventProcessors(t,p,r,a+1).then(o)).then(null,u):notifyEventProcessors(t,d,r,a+1).then(o).then(null,u)}})}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((a,o)=>{parsedStackResults||(parsedStackResults={});const u=parsedStackResults[o];if(u)a[u[0]]=u[1];else{const c=t(o);for(let d=c.length-1;d>=0;d--){const p=c[d],m=p==null?void 0:p.filename,v=n[o];if(m&&v){a[m]=v,parsedStackResults[o]=[m,v];break}}}return a},{})),cachedFilenameDebugIds}function applyScopeDataToEvent(t,n){const{fingerprint:r,span:a,breadcrumbs:o,sdkProcessingMetadata:u}=n;applyDataToEvent(t,n),a&&applySpanToEvent(t,a),applyFingerprintToEvent(t,r),applyBreadcrumbsToEvent(t,o),applySdkMetadataToEvent(t,u)}function mergeScopeData(t,n){const{extra:r,tags:a,user:o,contexts:u,level:c,sdkProcessingMetadata:d,breadcrumbs:p,fingerprint:m,eventProcessors:v,attachments:g,propagationContext:_,transactionName:x,span:E}=n;mergeAndOverwriteScopeData(t,"extra",r),mergeAndOverwriteScopeData(t,"tags",a),mergeAndOverwriteScopeData(t,"user",o),mergeAndOverwriteScopeData(t,"contexts",u),t.sdkProcessingMetadata=merge(t.sdkProcessingMetadata,d,2),c&&(t.level=c),x&&(t.transactionName=x),E&&(t.span=E),p.length&&(t.breadcrumbs=[...t.breadcrumbs,...p]),m.length&&(t.fingerprint=[...t.fingerprint,...m]),v.length&&(t.eventProcessors=[...t.eventProcessors,...v]),g.length&&(t.attachments=[...t.attachments,...g]),t.propagationContext={...t.propagationContext,..._}}function mergeAndOverwriteScopeData(t,n,r){t[n]=merge(t[n],r,1)}function applyDataToEvent(t,n){const{extra:r,tags:a,user:o,contexts:u,level:c,transactionName:d}=n;Object.keys(r).length&&(t.extra={...r,...t.extra}),Object.keys(a).length&&(t.tags={...a,...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),a=spanToJSON(r).description;a&&!t.transaction&&t.type==="transaction"&&(t.transaction=a)}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}function prepareEvent(t,n,r,a,o,u){const{normalizeDepth:c=3,normalizeMaxBreadth:d=1e3}=t,p={...n,event_id:n.event_id||r.event_id||uuid4(),timestamp:n.timestamp||dateTimestampInSeconds()},m=r.integrations||t.integrations.map(k=>k.name);applyClientOptions(p,t),applyIntegrationsMetadata(p,m),o&&o.emit("applyFrameMetadata",n),n.type===void 0&&applyDebugIds(p,t.stackParser);const v=getFinalScope(a,r.captureContext);r.mechanism&&addExceptionMechanism(p,r.mechanism);const g=o?o.getEventProcessors():[],_=getGlobalScope().getScopeData();if(u){const k=u.getScopeData();mergeScopeData(_,k)}if(v){const k=v.getScopeData();mergeScopeData(_,k)}const x=[...r.attachments||[],..._.attachments];x.length&&(r.attachments=x),applyScopeDataToEvent(p,_);const E=[...g,..._.eventProcessors];return notifyEventProcessors(E,p,r).then(k=>(k&&applyDebugMeta(k),typeof c=="number"&&c>0?normalizeEvent(k,c,d):k))}function applyClientOptions(t,n){const{environment:r,release:a,dist:o,maxValueLength:u=250}=n;t.environment=t.environment||r||DEFAULT_ENVIRONMENT,!t.release&&a&&(t.release=a),!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 a,o;const r=getFilenameToDebugIdMap(n);(o=(a=t.exception)==null?void 0:a.values)==null||o.forEach(u=>{var c,d;(d=(c=u.stacktrace)==null?void 0:c.frames)==null||d.forEach(p=>{p.filename&&(p.debug_id=r[p.filename])})})}function applyDebugMeta(t){var a,o;const n={};if((o=(a=t.exception)==null?void 0:a.values)==null||o.forEach(u=>{var c,d;(d=(c=u.stacktrace)==null?void 0:c.frames)==null||d.forEach(p=>{p.debug_id&&(p.abs_path?n[p.abs_path]=p.debug_id:p.filename&&(n[p.filename]=p.debug_id),delete p.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 a={...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&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=normalize(t.contexts.trace.data,n,r))),t.spans&&(a.spans=t.spans.map(c=>({...c,...c.data&&{data:normalize(c.data,n,r)}}))),(u=t.contexts)!=null&&u.flags&&a.contexts&&(a.contexts.flags=normalize(t.contexts.flags,3,r)),a}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,a=typeof n!="string"?{captureContext:n}:void 0;return getCurrentScope().captureMessage(t,r,a)}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:a}=GLOBAL_OBJ.navigator||{},o=makeSession({user:r.getUser()||n.getUser(),...a&&{userAgent:a},...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 a=`${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`${a}?${o}`}const installedIntegrations=[];function filterDuplicates(t){const n={};return t.forEach(r=>{const{name:a}=r,o=n[a];o&&!o.isDefaultInstance&&r.isDefaultInstance||(n[a]=r)}),Object.values(n)}function getIntegrationsToSetup(t){const n=t.defaultIntegrations||[],r=t.integrations;n.forEach(o=>{o.isDefaultInstance=!0});let a;if(Array.isArray(r))a=[...n,...r];else if(typeof r=="function"){const o=r(n);a=Array.isArray(o)?o:[o]}else a=n;return filterDuplicates(a)}function setupIntegrations(t,n){const r={};return n.forEach(a=>{a&&setupIntegration(t,a,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$4&&logger.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 a=n.preprocessEvent.bind(n);t.on("preprocessEvent",(o,u)=>a(o,u,t))}if(typeof n.processEvent=="function"){const a=n.processEvent.bind(n),o=Object.assign((u,c)=>a(u,c,t),{id:n.name});t.addEventProcessor(o)}DEBUG_BUILD$4&&logger.log(`Integration installed: ${n.name}`)}function defineIntegration(t){return t}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 p;const{trace_id:n,parent_span_id:r,span_id:a,status:o,origin:u,data:c,op:d}=((p=t.contexts)==null?void 0:p.trace)??{};return{data:c??{},description:t.transaction,op:d,parent_span_id:r,span_id:a??"",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}}function createClientReportEnvelope(t,n,r){const a=[{type:"client_report"},{timestamp:dateTimestampInSeconds(),discarded_events:t}];return createEnvelope(n?{dsn:n}:{},[a])}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$4&&logger.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,a){const o=uuid4();if(checkOrSetAlreadyCaught(n))return DEBUG_BUILD$4&&logger.log(ALREADY_SEEN_ERROR),o;const u={event_id:o,...r};return this._process(this.eventFromException(n,u).then(c=>this._captureEvent(c,u,a))),u.event_id}captureMessage(n,r,a,o){const u={event_id:uuid4(),...a},c=isParameterizedString(n)?n:String(n),d=isPrimitive(n)?this.eventFromMessage(c,r,u):this.eventFromException(n,u);return this._process(d.then(p=>this._captureEvent(p,u,o))),u.event_id}captureEvent(n,r,a){const o=uuid4();if(r!=null&&r.originalException&&checkOrSetAlreadyCaught(r.originalException))return DEBUG_BUILD$4&&logger.log(ALREADY_SEEN_ERROR),o;const u={event_id:o,...r},c=n.sdkProcessingMetadata||{},d=c.capturedSpanScope,p=c.capturedSpanIsolationScope;return this._process(this._captureEvent(n,u,d||a,p)),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(a=>r.flush(n).then(o=>a&&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 a=createEventEnvelope(n,this._dsn,this._options._metadata,this._options.tunnel);for(const u of r.attachments||[])a=addItemToEnvelope(a,createAttachmentEnvelopeItem(u));const o=this.sendEnvelope(a);o&&o.then(u=>this.emit("afterSendEvent",n,u),null)}sendSession(n){const{release:r,environment:a=DEFAULT_ENVIRONMENT}=this._options;if("aggregates"in n){const u=n.attrs||{};if(!u.release&&!r){DEBUG_BUILD$4&&logger.warn(MISSING_RELEASE_FOR_SESSION_ERROR);return}u.release=u.release||r,u.environment=u.environment||a,n.attrs=u}else{if(!n.release&&!r){DEBUG_BUILD$4&&logger.warn(MISSING_RELEASE_FOR_SESSION_ERROR);return}n.release=n.release||r,n.environment=n.environment||a}this.emit("beforeSendSession",n);const o=createSessionEnvelope(n,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(n,r,a=1){if(this._options.sendClientReports){const o=`${n}:${r}`;DEBUG_BUILD$4&&logger.log(`Recording outcome: "${o}"${a>1?` (${a} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+a}}on(n,r){const a=this._hooks[n]=this._hooks[n]||[];return a.push(r),()=>{const o=a.indexOf(r);o>-1&&a.splice(o,1)}}emit(n,...r){const a=this._hooks[n];a&&a.forEach(o=>o(...r))}sendEnvelope(n){return this.emit("beforeEnvelope",n),this._isEnabled()&&this._transport?this._transport.send(n).then(null,r=>(DEBUG_BUILD$4&&logger.error("Error while sending envelope:",r),r)):(DEBUG_BUILD$4&&logger.error("Transport disabled"),resolvedSyncPromise({}))}_setupIntegrations(){const{integrations:n}=this._options;this._integrations=setupIntegrations(this,n),afterSetupIntegrations(this,n)}_updateSessionFromEvent(n,r){var p;let a=r.level==="fatal",o=!1;const u=(p=r.exception)==null?void 0:p.values;if(u){o=!0;for(const m of u){const v=m.mechanism;if((v==null?void 0:v.handled)===!1){a=!0;break}}}const c=n.status==="ok";(c&&n.errors===0||c&&a)&&(updateSession(n,{...a&&{status:"crashed"},errors:n.errors||Number(o||a)}),this.captureSession(n))}_isClientDoneProcessing(n){return new SyncPromise(r=>{let a=0;const o=1,u=setInterval(()=>{this._numProcessing==0?(clearInterval(u),r(!0)):(a+=o,n&&a>=n&&(clearInterval(u),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(n,r,a,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,a,this,o).then(d=>{if(d===null)return d;this.emit("postprocessEvent",d,r),d.contexts={trace:getTraceContextFromScope(a),...d.contexts};const p=getDynamicSamplingContextFromScope(this,a);return d.sdkProcessingMetadata={dynamicSamplingContext:p,...d.sdkProcessingMetadata},d})}_captureEvent(n,r={},a=getCurrentScope(),o=getIsolationScope()){return DEBUG_BUILD$4&&isErrorEvent(n)&&logger.log(`Captured error event \`${getPossibleEventMessages(n)[0]||""}\``),this._processEvent(n,r,a,o).then(u=>u.event_id,u=>{DEBUG_BUILD$4&&(_isDoNotSendEventError(u)?logger.log(u.message):_isInternalError(u)?logger.warn(u.message):logger.warn(u))})}_processEvent(n,r,a,o){const u=this.getOptions(),{sampleRate:c}=u,d=isTransactionEvent(n),p=isErrorEvent(n),m=n.type||"error",v=`before send for type \`${m}\``,g=typeof c>"u"?void 0:parseSampleRate(c);if(p&&typeof g=="number"&&Math.random()>g)return this.recordDroppedEvent("sample_rate","error"),rejectedSyncPromise(_makeDoNotSendEventError(`Discarding event because it's not included in the random sample (sampling rate = ${c})`));const _=m==="replay_event"?"replay":m;return this._prepareEvent(n,r,a,o).then(x=>{if(x===null)throw this.recordDroppedEvent("event_processor",_),_makeDoNotSendEventError("An event processor returned `null`, will not send event.");if(r.data&&r.data.__sentry__===!0)return x;const S=processBeforeSend(this,u,x,r);return _validateBeforeSendResult(S,v)}).then(x=>{var k;if(x===null){if(this.recordDroppedEvent("before_send",_),d){const w=1+(n.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw _makeDoNotSendEventError(`${v} returned \`null\`, will not send event.`)}const E=a.getSession()||o.getSession();if(p&&E&&this._updateSessionFromEvent(E,x),d){const b=((k=x.sdkProcessingMetadata)==null?void 0:k.spanCountBeforeProcessing)||0,w=x.spans?x.spans.length:0,j=b-w;j>0&&this.recordDroppedEvent("before_send","span",j)}const S=x.transaction_info;if(d&&S&&x.transaction!==n.transaction){const b="custom";x.transaction_info={...S,source:b}}return this.sendEvent(x,r),x}).then(null,x=>{throw _isDoNotSendEventError(x)||_isInternalError(x)?x:(this.captureException(x,{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,a])=>{const[o,u]=r.split(":");return{reason:o,category:u,quantity:a}})}_flushOutcomes(){DEBUG_BUILD$4&&logger.log("Flushing outcomes...");const n=this._clearOutcomes();if(n.length===0){DEBUG_BUILD$4&&logger.log("No outcomes to send");return}if(!this._dsn){DEBUG_BUILD$4&&logger.log("No dsn provided, will not send outcomes");return}DEBUG_BUILD$4&&logger.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(a=>{if(!isPlainObject$2(a)&&a!==null)throw _makeInternalError(r);return a},a=>{throw _makeInternalError(`${n} rejected with ${a}`)});if(!isPlainObject$2(t)&&t!==null)throw _makeInternalError(r);return t}function processBeforeSend(t,n,r,a){const{beforeSend:o,beforeSendTransaction:u,beforeSendSpan:c}=n;let d=r;if(isErrorEvent(d)&&o)return o(d,a);if(isTransactionEvent(d)){if(c){const p=c(convertTransactionEventToSpanJson(d));if(p?d=merge(r,convertSpanJsonToTransactionEvent(p)):showSpanDropWarning(),d.spans){const m=[];for(const v of d.spans){const g=c(v);g?m.push(g):(showSpanDropWarning(),m.push(v))}d.spans=m}}if(u){if(d.spans){const p=d.spans.length;d.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:p}}return u(d,a)}}return d}function isErrorEvent(t){return t.type===void 0}function isTransactionEvent(t){return t.type==="transaction"}function createOtelLogEnvelopeItem(t){return[{type:"otel_log"},t]}function createOtelLogEnvelope(t,n,r,a){const o={};return n!=null&&n.sdk&&(o.sdk={name:n.sdk.name,version:n.sdk.version}),r&&a&&(o.dsn=dsnToString(a)),createEnvelope(o,t.map(createOtelLogEnvelopeItem))}const CLIENT_TO_LOG_BUFFER_MAP=new WeakMap;function _INTERNAL_flushLogsBuffer(t,n){const r=CLIENT_TO_LOG_BUFFER_MAP.get(t)??[];if(r.length===0)return;const a=t.getOptions(),o=createOtelLogEnvelope(r,a._metadata,a.tunnel,t.getDsn());r.length=0,t.emit("flushLogs"),t.sendEnvelope(o)}function initAndBind(t,n){n.debug===!0&&(DEBUG_BUILD$4?logger.enable():consoleSandbox(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),getCurrentScope().update(n.initialScope);const a=new t(n);return setCurrentClient(a),a.init(),a}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.lengtha(d)).then(null,()=>a(d).then(null,()=>{})),d}function u(c){return new SyncPromise((d,p)=>{let m=n.length;if(!m)return d(!0);const v=setTimeout(()=>{c&&c>0&&d(!1)},c);n.forEach(g=>{resolvedSyncPromise(g).then(()=>{--m||(clearTimeout(v),d(!0))},p)})})}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 a=Date.parse(`${t}`);return isNaN(a)?DEFAULT_RETRY_AFTER:a-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},a=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[p,m,,,v]=d.split(":",5),g=parseInt(p,10),_=(isNaN(g)?60:g)*1e3;if(!m)o.all=a+_;else for(const x of m.split(";"))x==="metric_bucket"?(!v||v.split(";").includes("custom"))&&(o[x]=a+_):o[x]=a+_}else c?o.all=a+parseRetryAfterHeader(c,a):n===429&&(o.all=a+60*1e3);return o}const DEFAULT_TRANSPORT_BUFFER_SIZE=64;function createTransport(t,n,r=makePromiseBuffer(t.bufferSize||DEFAULT_TRANSPORT_BUFFER_SIZE)){let a={};const o=c=>r.drain(c);function u(c){const d=[];if(forEachEnvelopeItem(c,(g,_)=>{const x=envelopeItemTypeToDataCategory(_);isRateLimited(a,x)?t.recordDroppedEvent("ratelimit_backoff",x):d.push(g)}),d.length===0)return resolvedSyncPromise({});const p=createEnvelope(c[0],d),m=g=>{forEachEnvelopeItem(p,(_,x)=>{t.recordDroppedEvent(g,envelopeItemTypeToDataCategory(x))})},v=()=>n({body:serializeEnvelope(p)}).then(g=>(g.statusCode!==void 0&&(g.statusCode<200||g.statusCode>=300)&&DEBUG_BUILD$4&&logger.warn(`Sentry responded with status code ${g.statusCode} to sent event.`),a=updateRateLimits(a,g),g),g=>{throw m("network_error"),DEBUG_BUILD$4&&logger.error("Encountered error running transport request:",g),g});return r.add(v).then(g=>g,g=>{if(g===SENTRY_BUFFER_FULL_ERROR)return DEBUG_BUILD$4&&logger.error("Skipped sending event because buffer is full."),m("queue_overflow"),resolvedSyncPromise({});throw g})}return{send:u,flush:o}}function addAutoIpAddressToUser(t){var n;((n=t.user)==null?void 0:n.ip_address)===void 0&&(t.user={...t.user,ip_address:"{{auto}}"})}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],a="npm"){const o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${n}`,packages:r.map(u=>({name:`${a}:@sentry/${u}`,version:SDK_VERSION})),version:SDK_VERSION}),t._metadata=o}const DEFAULT_BREADCRUMBS=100;function addBreadcrumb(t,n){const r=getClient(),a=getIsolationScope();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:u=DEFAULT_BREADCRUMBS}=r.getOptions();if(u<=0)return;const d={timestamp:dateTimestampInSeconds(),...t},p=o?consoleSandbox(()=>o(d,n)):d;p!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",p,n),a.addBreadcrumb(p,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 a=r.getOptions();n=_mergeOptions(t,a)},processEvent(r,a,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$4&&logger.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${getEventDescription(t)}`),!0}else{if(_isIgnoredError(t,n.ignoreErrors))return DEBUG_BUILD$4&&logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${getEventDescription(t)}`),!0;if(_isUselessError(t))return DEBUG_BUILD$4&&logger.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$4&&logger.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$4&&logger.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 a=[...((n=t.exception)==null?void 0:n.values)??[]].reverse().find(u=>{var c,d,p;return((c=u.mechanism)==null?void 0:c.parent_id)===void 0&&((p=(d=u.stacktrace)==null?void 0:d.frames)==null?void 0:p.length)}),o=(r=a==null?void 0:a.stacktrace)==null?void 0:r.frames;return o?_getLastValidUrl(o):null}catch{return DEBUG_BUILD$4&&logger.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(a=>a.stacktrace||a.type&&a.type!=="Error"||a.value):!1}function applyAggregateErrorsToEvent(t,n,r,a,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,a,u.originalException,r,o.exception.values,c,0))}function aggregateExceptionsFromError(t,n,r,a,o,u,c,d){if(u.length>=r+1)return u;let p=[...u];if(isInstanceOf(a[o],Error)){applyExceptionGroupFieldsForParentException(c,d);const m=t(n,a[o]),v=p.length;applyExceptionGroupFieldsForChildException(m,o,v,d),p=aggregateExceptionsFromError(t,n,r,a[o],o,[m,...p],m,v)}return Array.isArray(a.errors)&&a.errors.forEach((m,v)=>{if(isInstanceOf(m,Error)){applyExceptionGroupFieldsForParentException(c,d);const g=t(n,m),_=p.length;applyExceptionGroupFieldsForChildException(g,`errors[${v}]`,_,d),p=aggregateExceptionsFromError(t,n,r,m,o,[g,...p],g,_)}}),p}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,a){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:n,exception_id:r,parent_id:a}}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$4&&logger.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,a=n.message;return!(!r&&!a||r&&!a||!r&&a||r!==a||!_isSameFingerprint(t,n)||!_isSameStacktrace(t,n))}function _isSameExceptionEvent(t,n){const r=_getExceptionFromEvent(n),a=_getExceptionFromEvent(t);return!(!r||!a||r.type!==a.type||r.value!==a.value||!_isSameFingerprint(t,n)||!_isSameStacktrace(t,n))}function _isSameStacktrace(t,n){let r=getFramesFromEvent(t),a=getFramesFromEvent(n);if(!r&&!a)return!0;if(r&&!a||!r&&a||(r=r,a=a,a.length!==r.length))return!1;for(let o=0;o=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 supportsFetch(){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(!supportsFetch())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 a=n.createElement("iframe");a.hidden=!0,n.head.appendChild(a),(r=a.contentWindow)!=null&&r.fetch&&(t=isNativeFunction(a.contentWindow.fetch)),n.head.removeChild(a)}catch(a){DEBUG_BUILD$3&&logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",a)}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(...a){const o=new Error,{method:u,url:c}=parseFetchArgs(a),d={args:a,fetchData:{method:u,url:c},startTimestamp:timestampInSeconds()*1e3,virtualError:o,headers:getHeadersFromFetchArgs(a)};return triggerHandlers("fetch",{...d}),r.apply(GLOBAL_OBJ,a).then(async p=>(triggerHandlers("fetch",{...d,endTimestamp:timestampInSeconds()*1e3,response:p}),p),p=>{if(triggerHandlers("fetch",{...d,endTimestamp:timestampInSeconds()*1e3,error:p}),isError$2(p)&&p.stack===void 0&&(p.stack=o.stack,addNonEnumerableProperty(p,"framesToPop",1)),p instanceof TypeError&&(p.message==="Failed to fetch"||p.message==="Load failed"||p.message==="NetworkError when attempting to fetch resource."))try{const m=new URL(d.fetchData.url);p.message=`${p.message} (${m.host})`}catch{}throw p})}})}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,a]=t;return{url:getUrlFromResource(r),method:hasProp(a,"method")?String(a.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 a=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)&&(a[o]=t[o])}catch{}markFunctionWrapped(a,t),addNonEnumerableProperty(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get(){return t.name}})}catch{}return a}function exceptionFromError(t,n){const r=parseStackFrames(t,n),a={type:extractType(n),value:extractMessage(n)};return r.length&&(a.stacktrace={frames:r}),a.type===void 0&&a.value===""&&(a.value="Unrecoverable error caught"),a}function eventFromPlainObject(t,n,r,a){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 p={exception:{values:[{type:isEvent(n)?n.constructor.name:a?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(n,{isUnhandledRejection:a})}]},extra:d};if(r){const m=parseStackFrames(t,r);m.length&&(p.exception.values[0].stacktrace={frames:m})}return p}function eventFromError(t,n){return{exception:{values:[exceptionFromError(t,n)]}}}function parseStackFrames(t,n){const r=n.stacktrace||n.stack||"",a=getSkipFirstStackStringLines(n),o=getPopFirstTopFrames(n);try{return t(r,a,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,a){const o=(r==null?void 0:r.syntheticException)||void 0,u=eventFromUnknownInput(t,n,o,a);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",a,o){const u=(a==null?void 0:a.syntheticException)||void 0,c=eventFromString(t,n,u,o);return c.level=r,a!=null&&a.event_id&&(c.event_id=a.event_id),resolvedSyncPromise(c)}function eventFromUnknownInput(t,n,r,a,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"),p=c.message?`${d}: ${c.message}`:d;u=eventFromString(t,p,r,a),addExceptionTypeValue(u,p)}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,a),addExceptionTypeValue(u,`${n}`),addExceptionMechanism(u,{synthetic:!0}),u)}function eventFromString(t,n,r,a){const o={};if(a&&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),a=n?"promise rejection":"exception";return isErrorEvent$1(t)?`Event \`ErrorEvent\` captured as ${a} with message \`${t.message}\``:isEvent(t)?`Event \`${getObjectClassName(t)}\` (type=${t.type}) captured as ${a}`:`Object captured as ${a} 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){const r={parentSpanIsAlwaysRootSpan:!0,...n},a=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(r,"browser",["browser"],a),super(r);const o=this,{sendDefaultPii:u,_experiments:c}=o._options,d=c==null?void 0:c.enableLogs;r.sendClientReports&&WINDOW$1.document&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&(this._flushOutcomes(),d&&_INTERNAL_flushLogsBuffer(o))}),d&&(o.on("flush",()=>{_INTERNAL_flushLogsBuffer(o)}),o.on("afterCaptureLog",()=>{o._logFlushIdleTimeout&&clearTimeout(o._logFlushIdleTimeout),o._logFlushIdleTimeout=setTimeout(()=>{_INTERNAL_flushLogsBuffer(o)},DEFAULT_FLUSH_INTERVAL)})),u&&(o.on("postprocessEvent",addAutoIpAddressToUser),o.on("beforeSendSession",addAutoIpAddressToSession))}eventFromException(n,r){return eventFromException(this._options.stackParser,n,r,this._options.attachStacktrace)}eventFromMessage(n,r="info",a){return eventFromMessage(this._options.stackParser,n,r,a,this._options.attachStacktrace)}_prepareEvent(n,r,a,o){return n.platform=n.platform||"javascript",super._prepareEvent(n,r,a,o)}}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(p,m,v){if(p==="click"||p=="keypress")try{const g=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},_=g[p]=g[p]||{refCount:0};if(!_.handler){const x=makeDOMEventHandler(t);_.handler=x,d.call(this,p,x,v)}_.refCount++}catch{}return d.call(this,p,m,v)}}),fill(o,"removeEventListener",function(d){return function(p,m,v){if(p==="click"||p=="keypress")try{const g=this.__sentry_instrumentation_handlers__||{},_=g[p];_&&(_.refCount--,_.refCount<=0&&(d.call(this,p,_.handler,v),_.handler=void 0,delete g[p]),Object.keys(g).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return d.call(this,p,m,v)}}))})}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 a=getEventTarget(r);if(shouldSkipDOMEvent(r.type,a))return;addNonEnumerableProperty(r,"_sentryCaptured",!0),a&&!a._sentryId&&addNonEnumerableProperty(a,"_sentryId",uuid4());const o=r.type==="keypress"?"input":r.type;isSimilarToLastCapturedEvent(r)||(t({event:r,name:o,global:n}),lastCapturedEventType=r.type,lastCapturedEventTargetId=a?a._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 a=r.length>2?r[2]:void 0;if(a){const o=lastHref,u=String(a);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)}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 a=WINDOW.document;if(a&&typeof a.createElement=="function")try{const o=a.createElement("iframe");o.hidden=!0,a.head.appendChild(o);const u=o.contentWindow;u!=null&&u[t]&&(r=u[t]),a.head.removeChild(o)}catch(o){DEBUG_BUILD$2&&logger.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,a){const o=new Error,u=timestampInSeconds()*1e3,c=isString(a[0])?a[0].toUpperCase():void 0,d=parseXhrUrlArg(a[1]);if(!c||!d)return n.apply(r,a);r[SENTRY_XHR_DATA_KEY]={method:c,url:d,request_headers:{}},c==="POST"&&d.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const p=()=>{const m=r[SENTRY_XHR_DATA_KEY];if(m&&r.readyState===4){try{m.status_code=r.status}catch{}const v={endTimestamp:timestampInSeconds()*1e3,startTimestamp:u,xhr:r,virtualError:o};triggerHandlers("xhr",v)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(m,v,g){return p(),m.apply(v,g)}}):r.addEventListener("readystatechange",p),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(m,v,g){const[_,x]=g,E=v[SENTRY_XHR_DATA_KEY];return E&&isString(_)&&isString(x)&&(E.request_headers[_.toLowerCase()]=x),m.apply(v,g)}}),n.apply(r,a)}}),t.send=new Proxy(t.send,{apply(n,r,a){const o=r[SENTRY_XHR_DATA_KEY];if(!o)return n.apply(r,a);a[0]!==void 0&&(o.body=a[0]);const u={startTimestamp:timestampInSeconds()*1e3,xhr:r};return triggerHandlers("xhr",u),n.apply(r,a)}})}function parseXhrUrlArg(t){if(isString(t))return t;try{return t.toString()}catch{}}function makeFetchTransport(t,n=getNativeImplementation("fetch")){let r=0,a=0;function o(u){const c=u.body.length;r+=c,a++;const d={body:u.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:r<=6e4&&a<15,...t.fetchOptions};if(!n)return clearCachedImplementation("fetch"),rejectedSyncPromise("No fetch implementation available");try{return n(t.url,d).then(p=>(r-=c,a--,{statusCode:p.status,headers:{"x-sentry-rate-limits":p.headers.get("X-Sentry-Rate-Limits"),"retry-after":p.headers.get("Retry-After")}}))}catch(p){return clearCachedImplementation("fetch"),r-=c,a--,rejectedSyncPromise(p)}}return createTransport(t,o)}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(t,n,r,a){const o={filename:t,function:n===""?UNKNOWN_FUNCTION:n,in_app:!0};return r!==void 0&&(o.lineno=r),a!==void 0&&(o.colno=a),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+))\)/,chromeStackParserFn=t=>{const n=chromeRegexNoFnName.exec(t);if(n){const[,a,o,u]=n;return createFrame(a,UNKNOWN_FUNCTION,+o,+u)}const r=chromeRegex.exec(t);if(r){if(r[2]&&r[2].indexOf("eval")===0){const c=chromeEvalRegex.exec(r[2]);c&&(r[2]=c[1],r[3]=c[2],r[4]=c[3])}const[o,u]=extractSafariExtensionDetails(r[1]||UNKNOWN_FUNCTION,r[2]);return createFrame(u,o,r[3]?+r[3]:void 0,r[4]?+r[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 a=n[3],o=n[1]||UNKNOWN_FUNCTION;return[o,a]=extractSafariExtensionDetails(o,a),createFrame(a,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,a=t.indexOf("safari-web-extension")!==-1;return r||a?[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(a){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&&logger.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=a.event,v=_isEvent(m)?m.target:m;o=htmlTreeAsString(v,{keyAttrs:c,maxStringLength:d}),u=getComponentName(v)}catch{o=""}if(o.length===0)return;const p={category:`ui.${a.name}`,message:o};u&&(p.data={"ui.component_name":u}),addBreadcrumb(p,{event:a.event,name:a.name,global:a.global})}}function _getConsoleBreadcrumbHandler(t){return function(r){if(getClient()!==t)return;const a={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)a.message=`Assertion failed: ${safeJoin(r.args.slice(1)," ")||"console.assert"}`,a.data.arguments=r.args.slice(1);else return;addBreadcrumb(a,{input:r.args,level:r.level})}}function _getXhrBreadcrumbHandler(t){return function(r){if(getClient()!==t)return;const{startTimestamp:a,endTimestamp:o}=r,u=r.xhr[SENTRY_XHR_DATA_KEY];if(!a||!o||!u)return;const{method:c,url:d,status_code:p,body:m}=u,v={method:c,url:d,status_code:p},g={xhr:r.xhr,input:m,startTimestamp:a,endTimestamp:o},_={category:"xhr",data:v,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(p)};t.emit("beforeOutgoingRequestBreadcrumb",_,g),addBreadcrumb(_,g)}}function _getFetchBreadcrumbHandler(t){return function(r){if(getClient()!==t)return;const{startTimestamp:a,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:a,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:a,endTimestamp:o},p={category:"fetch",data:c,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(c.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",p,d),addBreadcrumb(p,d)}}}function _getHistoryBreadcrumbHandler(t){return function(r){if(getClient()!==t)return;let a=r.from,o=r.to;const u=parseUrl(WINDOW$1.location.href);let c=a?parseUrl(a):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&&(a=c.relative),addBreadcrumb({category:"navigation",data:{from:a,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,...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(_wrapEventTarget)}}},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){var a,o;const r=(a=WINDOW$1[t])==null?void 0:a.prototype;(o=r==null?void 0:r.hasOwnProperty)!=null&&o.call(r,"addEventListener")&&(fill(r,"addEventListener",function(u){return function(c,d,p){try{isEventListenerObject(d)&&(d.handleEvent=wrap$1(d.handleEvent,{mechanism:{data:{function:"handleEvent",handler:getFunctionName(d),target:t},handled:!1,type:"instrument"}}))}catch{}return u.apply(this,[c,wrap$1(d,{mechanism:{data:{function:"addEventListener",handler:getFunctionName(d),target:t},handled:!1,type:"instrument"}}),p])}}),fill(r,"removeEventListener",function(u){return function(c,d,p){try{const m=d.__sentry_wrapped__;m&&u.call(this,c,m,p)}catch{}return u.call(this,c,d,p)}}))}function isEventListenerObject(t){return typeof t.handleEvent=="function"}const browserSessionIntegration=()=>({name:"BrowserSession",setupOnce(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD$1&&logger.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:a}=getOptions();if(getClient()!==t||shouldIgnoreOnError())return;const{msg:o,url:u,line:c,column:d,error:p}=n,m=_enhanceEventWithInitialFrame(eventFromUnknownInput(r,p||o,void 0,a,!1),u,c,d);m.level="error",captureEvent(m,{originalException:p,mechanism:{handled:!1,type:"onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(t){addGlobalUnhandledRejectionInstrumentationHandler(n=>{const{stackParser:r,attachStacktrace:a}=getOptions();if(getClient()!==t||shouldIgnoreOnError())return;const o=_getUnhandledRejectionError(n),u=isPrimitive(o)?_eventFromRejectionWithPrimitive(o):eventFromUnknownInput(r,o,void 0,a,!0);u.level="error",captureEvent(u,{originalException:o,mechanism:{handled:!1,type:"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,a){const o=t.exception=t.exception||{},u=o.values=o.values||[],c=u[0]=u[0]||{},d=c.stacktrace=c.stacktrace||{},p=d.frames=d.frames||[],m=a,v=r,g=isString(n)&&n.length>0?n:getLocationHref();return p.length===0&&p.push({colno:m,filename:g,function:UNKNOWN_FUNCTION,in_app:!0,lineno:v}),t}function globalHandlerLog(t){DEBUG_BUILD$1&&logger.log(`Global Handler attached: ${t}`)}function getOptions(){const t=getClient();return(t==null?void 0:t.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(t){var c,d;if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const n=((c=t.request)==null?void 0:c.url)||getLocationHref(),{referrer:r}=WINDOW$1.document||{},{userAgent:a}=WINDOW$1.navigator||{},o={...(d=t.request)==null?void 0:d.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},u={...t.request,...n&&{url:n},headers:o};t.request=u}}),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(a,o,u){const c=u.getOptions();applyAggregateErrorsToEvent(exceptionFromError,c.stackParser,r,n,a,o)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function getDefaultIntegrations(t){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),browserSessionIntegration()]}function applyDefaultOptions(t={}){var r;return{...{defaultIntegrations:getDefaultIntegrations(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(r=WINDOW$1.SENTRY_RELEASE)==null?void 0:r.id,sendClientReports:!0},...dropTopLevelUndefinedKeys(t)}}function dropTopLevelUndefinedKeys(t){const n={};for(const r of Object.getOwnPropertyNames(t)){const a=r;t[a]!==void 0&&(n[a]=t[a])}return n}function shouldShowBrowserExtensionError(){var p;const t=typeof WINDOW$1.window<"u"&&WINDOW$1;if(!t)return!1;const n=t.chrome?"chrome":"browser",r=t[n],a=(p=r==null?void 0:r.runtime)==null?void 0:p.id,o=getLocationHref()||"",u=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],c=!!a&&WINDOW$1===WINDOW$1.top&&u.some(m=>o.startsWith(`${m}//`)),d=typeof t.nw<"u";return!!a&&!c&&!d}function init$1(t={}){const n=applyDefaultOptions(t);if(!n.skipBrowserExtensionCheck&&shouldShowBrowserExtensionError()){DEBUG_BUILD$1&&consoleSandbox(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}DEBUG_BUILD$1&&!supportsFetch()&&logger.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.");const r={...n,stackParser:stackParserFromStackParserOptions(n.stackParser||defaultStackParser),integrations:getIntegrationsToSetup(n),transport:n.transport||makeFetchTransport};return initAndBind(BrowserClient,r)}function showReportDialog(t={}){if(!WINDOW$1.document){DEBUG_BUILD$1&&logger.error("Global document not defined in showReportDialog call");return}const n=getCurrentScope(),r=n.getClient(),a=r==null?void 0:r.getDsn();if(!a){DEBUG_BUILD$1&&logger.error("DSN not configured for showReportDialog call");return}if(n&&(t.user={...n.getUser(),...t.user}),!t.eventId){const d=lastEventId();d&&(t.eventId=d)}const o=WINDOW$1.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=getReportDialogEndpoint(a,t),t.onLoad&&(o.onload=t.onLoad);const{onClose:u}=t;if(u){const d=p=>{if(p.data==="__sentry_reportdialog_closed__")try{u()}finally{WINDOW$1.removeEventListener("message",d)}};WINDOW$1.addEventListener("message",d)}const c=WINDOW$1.document.head||WINDOW$1.document.body;c?c.appendChild(o):DEBUG_BUILD$1&&logger.error("Not injecting report dialog. No injection point found in HTML")}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 a(o,u){if(!r.has(o)){if(o.cause)return r.add(o),a(o.cause,u);o.cause=u}}a(t,n)}function captureReactException(t,{componentStack:n},r){if(isAtLeastReact17(reactExports.version)&&isError$2(t)&&n){const a=new Error(t.message);a.name=`React ErrorBoundary ${t.name}`,a.stack=n,setCause(t,a)}return withScope(a=>(a.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,a=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,p=t?Symbol.for("react.async_mode"):60111,m=t?Symbol.for("react.concurrent_mode"):60111,v=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,_=t?Symbol.for("react.suspense_list"):60120,x=t?Symbol.for("react.memo"):60115,E=t?Symbol.for("react.lazy"):60116,S=t?Symbol.for("react.block"):60121,k=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function j(T){if(typeof T=="object"&&T!==null){var N=T.$$typeof;switch(N){case n:switch(T=T.type,T){case p:case m:case a:case u:case o:case g:return T;default:switch(T=T&&T.$$typeof,T){case d:case v:case E:case x:case c:return T;default:return N}}case r:return N}}}function C(T){return j(T)===m}return reactIs_production_min$1.AsyncMode=p,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=v,reactIs_production_min$1.Fragment=a,reactIs_production_min$1.Lazy=E,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=g,reactIs_production_min$1.isAsyncMode=function(T){return C(T)||j(T)===p},reactIs_production_min$1.isConcurrentMode=C,reactIs_production_min$1.isContextConsumer=function(T){return j(T)===d},reactIs_production_min$1.isContextProvider=function(T){return j(T)===c},reactIs_production_min$1.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===n},reactIs_production_min$1.isForwardRef=function(T){return j(T)===v},reactIs_production_min$1.isFragment=function(T){return j(T)===a},reactIs_production_min$1.isLazy=function(T){return j(T)===E},reactIs_production_min$1.isMemo=function(T){return j(T)===x},reactIs_production_min$1.isPortal=function(T){return j(T)===r},reactIs_production_min$1.isProfiler=function(T){return j(T)===u},reactIs_production_min$1.isStrictMode=function(T){return j(T)===o},reactIs_production_min$1.isSuspense=function(T){return j(T)===g},reactIs_production_min$1.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===a||T===m||T===u||T===o||T===g||T===_||typeof T=="object"&&T!==null&&(T.$$typeof===E||T.$$typeof===x||T.$$typeof===c||T.$$typeof===d||T.$$typeof===v||T.$$typeof===k||T.$$typeof===b||T.$$typeof===w||T.$$typeof===S)},reactIs_production_min$1.typeOf=j,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},a={$$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]=a,u[t.Memo]=o;function c(E){return t.isMemo(E)?o:u[E.$$typeof]||n}var d=Object.defineProperty,p=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,v=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,_=Object.prototype;function x(E,S,k){if(typeof S!="string"){if(_){var b=g(S);b&&b!==_&&x(E,b,k)}var w=p(S);m&&(w=w.concat(m(S)));for(var j=c(E),C=c(S),T=0;T"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",a=>{!a.type&&this._lastEventId&&a.event_id===this._lastEventId&&showReportDialog({...n.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(n,r){const{componentStack:a}=r,{beforeCapture:o,onError:u,showDialog:c,dialogOptions:d}=this.props;withScope(p=>{o&&o(p,n,a);const m=this.props.handled!=null?this.props.handled:!!this.props.fallback,v=captureReactException(n,r,{mechanism:{handled:m}});u&&u(n,a,v),c&&(this._lastEventId=v,this._openFallbackReportDialog&&showReportDialog({...d,eventId:v})),this.setState({error:n,componentStack:a,eventId:v})})}componentDidMount(){const{onMount:n}=this.props;n&&n()}componentWillUnmount(){const{error:n,componentStack:r,eventId:a}=this.state,{onUnmount:o}=this.props;o&&(this.state===INITIAL_STATE?o(null,null,null):o(n,r,a)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:n}=this.props,{error:r,componentStack:a,eventId:o}=this.state;n&&n(r,a,o),this.setState(INITIAL_STATE)}render(){const{fallback:n,children:r}=this.props,a=this.state;if(a.componentStack===null)return typeof r=="function"?r():r;const o=typeof n=="function"?reactExports.createElement(n,{error:a.error,componentStack:a.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:a.eventId}):n;return reactExports.isValidElement(o)?o:(n&&DEBUG_BUILD&&logger.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,ee){var H=G.length;G.push(ee);e:for(;0>>1,L=G[I];if(0>>1;Io(ne,H))seo(de,ne)?(G[I]=de,G[se]=H,I=se):(G[I]=ne,G[K]=H,I=K);else if(seo(de,H))G[I]=de,G[se]=H,I=se;else break e}}return ee}function o(G,ee){var H=G.sortIndex-ee.sortIndex;return H!==0?H:G.id-ee.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 p=[],m=[],v=1,g=null,_=3,x=!1,E=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(G){for(var ee=r(m);ee!==null;){if(ee.callback===null)a(m);else if(ee.startTime<=G)a(m),ee.sortIndex=ee.expirationTime,n(p,ee);else break;ee=r(m)}}function C(G){if(S=!1,j(G),!E)if(r(p)!==null)E=!0,ve(T);else{var ee=r(m);ee!==null&&ge(C,ee.startTime-G)}}function T(G,ee){E=!1,S&&(S=!1,b(A),A=-1),x=!0;var H=_;try{for(j(ee),g=r(p);g!==null&&(!(g.expirationTime>ee)||G&&!Q());){var I=g.callback;if(typeof I=="function"){g.callback=null,_=g.priorityLevel;var L=I(g.expirationTime<=ee);ee=t.unstable_now(),typeof L=="function"?g.callback=L:g===r(p)&&a(p),j(ee)}else a(p);g=r(p)}if(g!==null)var te=!0;else{var K=r(m);K!==null&&ge(C,K.startTime-ee),te=!1}return te}finally{g=null,_=H,x=!1}}var N=!1,O=null,A=-1,B=5,Z=-1;function Q(){return!(t.unstable_now()-ZG||125I?(G.sortIndex=H,n(m,G),r(p)===null&&G===r(m)&&(S?(b(A),A=-1):S=!0,ge(C,H-I))):(G.sortIndex=L,n(p,G),E||x||(E=!0,ve(T))),G},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(G){var ee=_;return function(){var H=_;_=ee;try{return G.apply(this,arguments)}finally{_=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(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=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]*$/,v={},g={};function _(i){return p.call(g,i)?!0:p.call(v,i)?!1:m.test(i)?g[i]=!0:(v[i]=!0,!1)}function x(i,s,l,f){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function E(i,s,l,f){if(s===null||typeof s>"u"||x(i,s,l,f))return!0;if(f)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 S(i,s,l,f,h,y,R){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=h,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=R}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){k[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];k[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){k[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){k[i]=new S(i,2,!1,i,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(i){k[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){k[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){k[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){k[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){k[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function w(i){return i[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(i){var s=i.replace(b,w);k[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(b,w);k[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(b,w);k[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){k[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),k.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){k[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function j(i,s,l,f){var h=k.hasOwnProperty(s)?k[s]:null;(h!==null?h.type!==0:f||!(2P||h[R]!==y[P]){var F=` `+h[R].replace(" at new "," at ");return i.displayName&&F.includes("")&&(F=F.replace("",i.displayName)),F}while(1<=R&&0<=P);break}}}finally{te=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?L(i):""}function ne(i){switch(i.tag){case 5:return L(i.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return i=K(i.type,!1),i;case 11:return i=K(i.type.render,!1),i;case 1:return i=K(i.type,!0),i;default:return""}}function se(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case O:return"Fragment";case N:return"Portal";case B:return"Profiler";case A:return"StrictMode";case $:return"Suspense";case ce:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Q:return(i.displayName||"Context")+".Consumer";case Z:return(i._context.displayName||"Context")+".Provider";case X:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case me:return s=i.displayName||null,s!==null?s:se(i.type)||"Memo";case ve:s=i._payload,i=i._init;try{return se(i(s))}catch{}}return null}function de(i){var s=i.type;switch(i.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 i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"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 le(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function _e(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Se(i){var s=_e(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var h=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return h.call(this)},set:function(R){f=""+R,y.call(this,R)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(R){f=""+R},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ee(i){i._valueTracker||(i._valueTracker=Se(i))}function Ae(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=_e(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function Pe(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function ze(i,s){var l=s.checked;return H({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??i._wrapperState.initialChecked})}function ye(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=le(s.value!=null?s.value:l),i._wrapperState={initialChecked:f,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Ze(i,s){s=s.checked,s!=null&&j(i,"checked",s,!1)}function xe(i,s){Ze(i,s);var l=le(s.value),f=s.type;if(l!=null)f==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?ct(i,s.type,l):s.hasOwnProperty("defaultValue")&&ct(i,s.type,le(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function et(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function ct(i,s,l){(s!=="number"||Pe(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var ln=Array.isArray;function yt(i,s,l,f){if(i=i.options,s){s={};for(var h=0;h"+s.valueOf().toString()+"",s=_t.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Vt(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.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(i){Dr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),pn[s]=pn[i]})});function xt(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||pn.hasOwnProperty(i)&&pn[i]?(""+s).trim():s+"px"}function Tt(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,h=xt(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,h):i[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(i,s){if(s){if(Sl[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,i));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(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Wi=null,Tn=null,An=null;function Fs(i){if(i=xr(i)){if(typeof Wi!="function")throw Error(r(280));var s=i.stateNode;s&&(s=ai(s),Wi(i.stateNode,i.type,s))}}function Ds(i){Tn?An?An.push(i):An=[i]:Tn=i}function Ls(){if(Tn){var i=Tn,s=An;if(An=Tn=null,Fs(i),s)for(i=0;i>>=0,i===0?32:31-(jl(i)/Pl|0)|0}var Ur=64,Vr=4194304;function nr(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Br(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,h=i.suspendedLanes,y=i.pingedLanes,R=l&268435455;if(R!==0){var P=R&~h;P!==0?f=nr(P):(y&=R,y!==0&&(f=nr(y)))}else R=l&~h,R!==0?f=nr(R):y!==0&&(f=nr(y));if(f===0)return 0;if(s!==0&&s!==f&&(s&h)===0&&(h=f&-f,y=s&-s,h>=y||h===16&&(y&4194240)!==0))return s;if((f&4)!==0&&(f|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0l;l++)s.push(i);return s}function rr(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-St(s),i[s]=l}function Ll(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0=dr),po=" ",mo=!1;function ho(i,s){switch(i){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(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var jn=!1;function pc(i,s){switch(i){case"compositionend":return go(s);case"keypress":return s.which!==32?null:(mo=!0,po);case"textInput":return i=s.data,i===po&&mo?null:i;default:return null}}function mc(i,s){if(jn)return i==="compositionend"||!fa&&ho(i,s)?(i=so(),Wr=sa=Kt=null,jn=!1,i):null;switch(i){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-i};i=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ko(l)}}function Ro(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Ro(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function No(){for(var i=window,s=Pe();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)i=s.contentWindow;else break;s=Pe(i.document)}return s}function ha(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function kc(i){var s=No(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&Ro(l.ownerDocument.documentElement,l)){if(f!==null&&ha(l)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var h=l.textContent.length,y=Math.min(f.start,h);f=f.end===void 0?y:Math.min(f.end,h),!i.extend&&y>f&&(h=f,f=y,y=h),h=bo(l,y);var R=bo(l,f);h&&R&&(i.rangeCount!==1||i.anchorNode!==h.node||i.anchorOffset!==h.offset||i.focusNode!==R.node||i.focusOffset!==R.offset)&&(s=s.createRange(),s.setStart(h.node,h.offset),i.removeAllRanges(),y>f?(i.addRange(s),i.extend(R.node,R.offset)):(s.setEnd(R.node,R.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l=document.documentMode,Pn=null,ga=null,hr=null,va=!1;function wo(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;va||Pn==null||Pn!==Pe(f)||(f=Pn,"selectionStart"in f&&ha(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),hr&&mr(hr,f)||(hr=f,f=ni(ga,"onSelect"),0Mn||(i.current=Aa[Mn],Aa[Mn]=null,Mn--)}function Ne(i,s){Mn++,Aa[Mn]=i.current,i.current=s}var Zt={},Ke=Yt(Zt),tt=Yt(!1),gn=Zt;function qn(i,s){var l=i.type.contextTypes;if(!l)return Zt;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var h={},y;for(y in l)h[y]=s[y];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=h),h}function nt(i){return i=i.childContextTypes,i!=null}function si(){Te(tt),Te(Ke)}function Vo(i,s,l){if(Ke.current!==Zt)throw Error(r(168));Ne(Ke,s),Ne(tt,l)}function Bo(i,s,l){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return l;f=f.getChildContext();for(var h in f)if(!(h in s))throw Error(r(108,de(i)||"Unknown",h));return H({},l,f)}function oi(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Zt,gn=Ke.current,Ne(Ke,i),Ne(tt,tt.current),!0}function Ho(i,s,l){var f=i.stateNode;if(!f)throw Error(r(169));l?(i=Bo(i,s,gn),f.__reactInternalMemoizedMergedChildContext=i,Te(tt),Te(Ke),Ne(Ke,i)):Te(tt),Ne(tt,l)}var Ft=null,ui=!1,Ca=!1;function Go(i){Ft===null?Ft=[i]:Ft.push(i)}function Fc(i){ui=!0,Go(i)}function Xt(){if(!Ca&&Ft!==null){Ca=!0;var i=0,s=Re;try{var l=Ft;for(Re=1;i>=R,h-=R,Dt=1<<32-St(s)+h|l<he?(Ve=pe,pe=null):Ve=pe.sibling;var be=z(M,pe,q[he],J);if(be===null){pe===null&&(pe=Ve);break}i&&pe&&be.alternate===null&&s(M,pe),D=y(be,D,he),fe===null?ue=be:fe.sibling=be,fe=be,pe=Ve}if(he===q.length)return l(M,pe),Ce&&yn(M,he),ue;if(pe===null){for(;hehe?(Ve=pe,pe=null):Ve=pe.sibling;var un=z(M,pe,be.value,J);if(un===null){pe===null&&(pe=Ve);break}i&&pe&&un.alternate===null&&s(M,pe),D=y(un,D,he),fe===null?ue=un:fe.sibling=un,fe=un,pe=Ve}if(be.done)return l(M,pe),Ce&&yn(M,he),ue;if(pe===null){for(;!be.done;he++,be=q.next())be=Y(M,be.value,J),be!==null&&(D=y(be,D,he),fe===null?ue=be:fe.sibling=be,fe=be);return Ce&&yn(M,he),ue}for(pe=f(M,pe);!be.done;he++,be=q.next())be=re(pe,M,he,be.value,J),be!==null&&(i&&be.alternate!==null&&pe.delete(be.key===null?he:be.key),D=y(be,D,he),fe===null?ue=be:fe.sibling=be,fe=be);return i&&pe.forEach(function(hd){return s(M,hd)}),Ce&&yn(M,he),ue}function De(M,D,q,J){if(typeof q=="object"&&q!==null&&q.type===O&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case T:e:{for(var ue=q.key,fe=D;fe!==null;){if(fe.key===ue){if(ue=q.type,ue===O){if(fe.tag===7){l(M,fe.sibling),D=h(fe,q.props.children),D.return=M,M=D;break e}}else if(fe.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===ve&&Zo(ue)===fe.type){l(M,fe.sibling),D=h(fe,q.props),D.ref=Sr(M,fe,q),D.return=M,M=D;break e}l(M,fe);break}else s(M,fe);fe=fe.sibling}q.type===O?(D=Nn(q.props.children,M.mode,J,q.key),D.return=M,M=D):(J=Di(q.type,q.key,q.props,null,M.mode,J),J.ref=Sr(M,D,q),J.return=M,M=J)}return R(M);case N:e:{for(fe=q.key;D!==null;){if(D.key===fe)if(D.tag===4&&D.stateNode.containerInfo===q.containerInfo&&D.stateNode.implementation===q.implementation){l(M,D.sibling),D=h(D,q.children||[]),D.return=M,M=D;break e}else{l(M,D);break}else s(M,D);D=D.sibling}D=As(q,M.mode,J),D.return=M,M=D}return R(M);case ve:return fe=q._init,De(M,D,fe(q._payload),J)}if(ln(q))return ae(M,D,q,J);if(ee(q))return oe(M,D,q,J);fi(M,q)}return typeof q=="string"&&q!==""||typeof q=="number"?(q=""+q,D!==null&&D.tag===6?(l(M,D.sibling),D=h(D,q),D.return=M,M=D):(l(M,D),D=Ts(q,M.mode,J),D.return=M,M=D),R(M)):l(M,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(i){var s=pi.current;Te(pi),i._currentValue=s}function qa(i,s,l){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===l)break;i=i.return}}function Gn(i,s){mi=i,Da=Hn=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(rt=!0),i.firstContext=null)}function mt(i){var s=i._currentValue;if(Da!==i)if(i={context:i,memoizedValue:s,next:null},Hn===null){if(mi===null)throw Error(r(308));Hn=i,mi.dependencies={lanes:0,firstContext:i}}else Hn=Hn.next=i;return s}var _n=null;function $a(i){_n===null?_n=[i]:_n.push(i)}function eu(i,s,l,f){var h=s.interleaved;return h===null?(l.next=l,$a(s)):(l.next=h.next,h.next=l),s.interleaved=l,Mt(i,f)}function Mt(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Jt=!1;function Ua(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tu(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function qt(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function en(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(ke&2)!==0){var h=f.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),f.pending=s,Mt(i,l)}return h=f.interleaved,h===null?(s.next=s,$a(f)):(s.next=h.next,h.next=s),f.interleaved=s,Mt(i,l)}function hi(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,ta(i,l)}}function nu(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var h=null,y=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};y===null?h=y=R:y=y.next=R,l=l.next}while(l!==null);y===null?h=y=s:y=y.next=s}else h=y=s;l={baseState:f.baseState,firstBaseUpdate:h,lastBaseUpdate:y,shared:f.shared,effects:f.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function gi(i,s,l,f){var h=i.updateQueue;Jt=!1;var y=h.firstBaseUpdate,R=h.lastBaseUpdate,P=h.shared.pending;if(P!==null){h.shared.pending=null;var F=P,U=F.next;F.next=null,R===null?y=U:R.next=U,R=F;var W=i.alternate;W!==null&&(W=W.updateQueue,P=W.lastBaseUpdate,P!==R&&(P===null?W.firstBaseUpdate=U:P.next=U,W.lastBaseUpdate=F))}if(y!==null){var Y=h.baseState;R=0,W=U=F=null,P=y;do{var z=P.lane,re=P.eventTime;if((f&z)===z){W!==null&&(W=W.next={eventTime:re,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var ae=i,oe=P;switch(z=s,re=l,oe.tag){case 1:if(ae=oe.payload,typeof ae=="function"){Y=ae.call(re,Y,z);break e}Y=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=oe.payload,z=typeof ae=="function"?ae.call(re,Y,z):ae,z==null)break e;Y=H({},Y,z);break e;case 2:Jt=!0}}P.callback!==null&&P.lane!==0&&(i.flags|=64,z=h.effects,z===null?h.effects=[P]:z.push(P))}else re={eventTime:re,lane:z,tag:P.tag,payload:P.payload,callback:P.callback,next:null},W===null?(U=W=re,F=Y):W=W.next=re,R|=z;if(P=P.next,P===null){if(P=h.shared.pending,P===null)break;z=P,P=z.next,z.next=null,h.lastBaseUpdate=z,h.shared.pending=null}}while(!0);if(W===null&&(F=Y),h.baseState=F,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 y===null&&(h.shared.lanes=0);En|=R,i.lanes=R,i.memoizedState=Y}}function ru(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;sl?l:4,i(!0);var f=za.transition;za.transition={};try{i(!1),s()}finally{Re=l,za.transition=f}}function Eu(){return ht().memoizedState}function qc(i,s,l){var f=an(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},ku(i))bu(s,l);else if(l=eu(i,s,l,f),l!==null){var h=Je();wt(l,i,f,h),Ru(l,s,f)}}function $c(i,s,l){var f=an(i),h={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(ku(i))bu(s,h);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var R=s.lastRenderedState,P=y(R,l);if(h.hasEagerState=!0,h.eagerState=P,Et(P,R)){var F=s.interleaved;F===null?(h.next=h,$a(s)):(h.next=F.next,F.next=h),s.interleaved=h;return}}catch{}finally{}l=eu(i,s,h,f),l!==null&&(h=Je(),wt(l,i,f,h),Ru(l,s,f))}}function ku(i){var s=i.alternate;return i===je||s!==null&&s===je}function bu(i,s){Rr=_i=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function Ru(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,ta(i,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(i,s){return jt().memoizedState=[i,s===void 0?null:s],i},useContext:mt,useEffect:mu,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,xi(4194308,4,vu.bind(null,s,i),l)},useLayoutEffect:function(i,s){return xi(4194308,4,i,s)},useInsertionEffect:function(i,s){return xi(4,2,i,s)},useMemo:function(i,s){var l=jt();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=jt();return s=l!==void 0?l(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=qc.bind(null,je,i),[f.memoizedState,i]},useRef:function(i){var s=jt();return i={current:i},s.memoizedState=i},useState:fu,useDebugValue:Ja,useDeferredValue:function(i){return jt().memoizedState=i},useTransition:function(){var i=fu(!1),s=i[0];return i=Mc.bind(null,i[1]),jt().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=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(f,s,l)}h.memoizedState=l;var y={value:l,getSnapshot:s};return h.queue=y,mu(lu.bind(null,f,y,i),[i]),f.flags|=2048,Tr(9,uu.bind(null,f,y,l,s),void 0,null),l},useId:function(){var i=jt(),s=Ue.identifierPrefix;if(Ce){var l=Lt,f=Dt;l=(f&~(1<<32-St(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=Nr++,0<\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=R.createElement(l,{is:f.is}):(i=R.createElement(l),l==="select"&&(R=i,f.multiple?R.multiple=!0:f.size&&(R.size=f.size))):i=R.createElementNS(i,l),i[Ct]=s,i[_r]=f,Gu(i,s,!1,!1),s.stateNode=i;e:{switch(R=Gi(l,f),l){case"dialog":we("cancel",i),we("close",i),h=f;break;case"iframe":case"object":case"embed":we("load",i),h=f;break;case"video":case"audio":for(h=0;hYn&&(s.flags|=128,f=!0,Ar(y,!1),s.lanes=4194304)}else{if(!f)if(i=vi(R),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),Ar(y,!0),y.tail===null&&y.tailMode==="hidden"&&!R.alternate&&!Ce)return Qe(s),null}else 2*Fe()-y.renderingStartTime>Yn&&l!==1073741824&&(s.flags|=128,f=!0,Ar(y,!1),s.lanes=4194304);y.isBackwards?(R.sibling=s.child,s.child=R):(l=y.last,l!==null?l.sibling=R:s.child=R,y.last=R)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Fe(),s.sibling=null,l=Ie.current,Ne(Ie,f?l&1|2:l&1),s):(Qe(s),null);case 22:case 23:return Rs(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(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(i,s){switch(ja(s),s.tag){case 1:return nt(s.type)&&si(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return zn(),Te(tt),Te(Ke),Ga(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Ba(s),null;case 13:if(Te(Ie),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Vn()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Te(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,ie=null;function Wn(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){Oe(i,s,f)}else l.current=null}function ps(i,s,l){try{l()}catch(f){Oe(i,s,f)}}var Wu=!1;function Zc(i,s){if(ka=zr,i=No(),ha(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var h=f.anchorOffset,y=f.focusNode;f=f.focusOffset;try{l.nodeType,y.nodeType}catch{l=null;break e}var R=0,P=-1,F=-1,U=0,W=0,Y=i,z=null;t:for(;;){for(var re;Y!==l||h!==0&&Y.nodeType!==3||(P=R+h),Y!==y||f!==0&&Y.nodeType!==3||(F=R+f),Y.nodeType===3&&(R+=Y.nodeValue.length),(re=Y.firstChild)!==null;)z=Y,Y=re;for(;;){if(Y===i)break t;if(z===l&&++U===h&&(P=R),z===y&&++W===f&&(F=R),(re=Y.nextSibling)!==null)break;Y=z,z=Y.parentNode}Y=re}l=P===-1||F===-1?null:{start:P,end:F}}else l=null}l=l||{start:0,end:0}}else l=null;for(ba={focusedElem:i,selectionRange:l},zr=!1,ie=s;ie!==null;)if(s=ie,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ie=i;else for(;ie!==null;){s=ie;try{var ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ae!==null){var oe=ae.memoizedProps,De=ae.memoizedState,M=s.stateNode,D=M.getSnapshotBeforeUpdate(s.elementType===s.type?oe:bt(s.type,oe),De);M.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var q=s.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(J){Oe(s,s.return,J)}if(i=s.sibling,i!==null){i.return=s.return,ie=i;break}ie=s.return}return ae=Wu,Wu=!1,ae}function Cr(i,s,l){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var h=f=f.next;do{if((h.tag&i)===i){var y=h.destroy;h.destroy=void 0,y!==void 0&&ps(s,l,y)}h=h.next}while(h!==f)}}function wi(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var f=l.create;l.destroy=f()}l=l.next}while(l!==s)}}function ms(i){var s=i.ref;if(s!==null){var l=i.stateNode;switch(i.tag){case 5:i=l;break;default:i=l}typeof s=="function"?s(i):s.current=i}}function Qu(i){var s=i.alternate;s!==null&&(i.alternate=null,Qu(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Ct],delete s[_r],delete s[Ta],delete s[Pc],delete s[Oc])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Yu(i){return i.tag===5||i.tag===3||i.tag===4}function Zu(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Yu(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function hs(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=ii));else if(f!==4&&(i=i.child,i!==null))for(hs(i,s,l),i=i.sibling;i!==null;)hs(i,s,l),i=i.sibling}function gs(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(gs(i,s,l),i=i.sibling;i!==null;)gs(i,s,l),i=i.sibling}var He=null,Rt=!1;function tn(i,s,l){for(l=l.child;l!==null;)Xu(i,s,l),l=l.sibling}function Xu(i,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 f=He,h=Rt;He=null,tn(i,s,l),He=f,Rt=h,He!==null&&(Rt?(i=He,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):He.removeChild(l.stateNode));break;case 18:He!==null&&(Rt?(i=He,l=l.stateNode,i.nodeType===8?wa(i.parentNode,l):i.nodeType===1&&wa(i,l),ur(i)):wa(He,l.stateNode));break;case 4:f=He,h=Rt,He=l.stateNode.containerInfo,Rt=!0,tn(i,s,l),He=f,Rt=h;break;case 0:case 11:case 14:case 15:if(!Ye&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){h=f=f.next;do{var y=h,R=y.destroy;y=y.tag,R!==void 0&&((y&2)!==0||(y&4)!==0)&&ps(l,s,R),h=h.next}while(h!==f)}tn(i,s,l);break;case 1:if(!Ye&&(Wn(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(P){Oe(l,s,P)}tn(i,s,l);break;case 21:tn(i,s,l);break;case 22:l.mode&1?(Ye=(f=Ye)||l.memoizedState!==null,tn(i,s,l),Ye=f):tn(i,s,l);break;default:tn(i,s,l)}}function Ju(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new Yc),s.forEach(function(f){var h=sd.bind(null,i,f);l.has(f)||(l.add(f),f.then(h,h))})}}function Nt(i,s){var l=s.deletions;if(l!==null)for(var f=0;fh&&(h=R),f&=~y}if(f=h,f=Fe()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Jc(f/1960))-f,10i?16:i,rn===null)var f=!1;else{if(i=rn,rn=null,ji=0,(ke&6)!==0)throw Error(r(331));var h=ke;for(ke|=4,ie=i.current;ie!==null;){var y=ie,R=y.child;if((ie.flags&16)!==0){var P=y.deletions;if(P!==null){for(var F=0;FFe()-_s?bn(i,0):ys|=l),at(i,s)}function fl(i,s){s===0&&((i.mode&1)===0?s=1:(s=Vr,Vr<<=1,(Vr&130023424)===0&&(Vr=4194304)));var l=Je();i=Mt(i,s),i!==null&&(rr(i,s,l),at(i,l))}function ad(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),fl(i,l)}function sd(i,s){var l=0;switch(i.tag){case 13:var f=i.stateNode,h=i.memoizedState;h!==null&&(l=h.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(r(314))}f!==null&&f.delete(s),fl(i,l)}var pl;pl=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||tt.current)rt=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return rt=!1,Kc(i,s,l);rt=(i.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 f=s.type;Ri(i,s),i=s.pendingProps;var h=qn(s,Ke.current);Gn(s,l),h=Wa(null,s,f,i,h,l);var y=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(f)?(y=!0,oi(s)):y=!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,f,i,l),s=os(null,s,f,!0,y,l)):(s.tag=0,Ce&&y&&Ia(s),Xe(null,s,h,l),s=s.child),s;case 16:f=s.elementType;e:{switch(Ri(i,s),i=s.pendingProps,h=f._init,f=h(f._payload),s.type=f,h=s.tag=ud(f),i=bt(f,i),h){case 0:s=ss(null,s,f,i,l);break e;case 1:s=qu(null,s,f,i,l);break e;case 11:s=Ou(null,s,f,i,l);break e;case 14:s=Fu(null,s,f,bt(f.type,i),l);break e}throw Error(r(306,f,""))}return s;case 0:return f=s.type,h=s.pendingProps,h=s.elementType===f?h:bt(f,h),ss(i,s,f,h,l);case 1:return f=s.type,h=s.pendingProps,h=s.elementType===f?h:bt(f,h),qu(i,s,f,h,l);case 3:e:{if($u(s),i===null)throw Error(r(387));f=s.pendingProps,y=s.memoizedState,h=y.element,tu(i,s),gi(s,f,null,l);var R=s.memoizedState;if(f=R.element,y.isDehydrated)if(y={element:f,isDehydrated:!1,cache:R.cache,pendingSuspenseBoundaries:R.pendingSuspenseBoundaries,transitions:R.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){h=Kn(Error(r(423)),s),s=Uu(i,s,f,l,h);break e}else if(f!==h){h=Kn(Error(r(424)),s),s=Uu(i,s,f,l,h);break e}else for(ut=Qt(s.stateNode.containerInfo.firstChild),ot=s,Ce=!0,kt=null,l=Jo(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Vn(),f===h){s=$t(i,s,l);break e}Xe(i,s,f,l)}s=s.child}return s;case 5:return iu(s),i===null&&Oa(s),f=s.type,h=s.pendingProps,y=i!==null?i.memoizedProps:null,R=h.children,Ra(f,h)?R=null:y!==null&&Ra(f,y)&&(s.flags|=32),Mu(i,s),Xe(i,s,R,l),s.child;case 6:return i===null&&Oa(s),null;case 13:return Vu(i,s,l);case 4:return Va(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Bn(s,null,f,l):Xe(i,s,f,l),s.child;case 11:return f=s.type,h=s.pendingProps,h=s.elementType===f?h:bt(f,h),Ou(i,s,f,h,l);case 7:return Xe(i,s,s.pendingProps,l),s.child;case 8:return Xe(i,s,s.pendingProps.children,l),s.child;case 12:return Xe(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,h=s.pendingProps,y=s.memoizedProps,R=h.value,Ne(pi,f._currentValue),f._currentValue=R,y!==null)if(Et(y.value,R)){if(y.children===h.children&&!tt.current){s=$t(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var P=y.dependencies;if(P!==null){R=y.child;for(var F=P.firstContext;F!==null;){if(F.context===f){if(y.tag===1){F=qt(-1,l&-l),F.tag=2;var U=y.updateQueue;if(U!==null){U=U.shared;var W=U.pending;W===null?F.next=F:(F.next=W.next,W.next=F),U.pending=F}}y.lanes|=l,F=y.alternate,F!==null&&(F.lanes|=l),qa(y.return,l,s),P.lanes|=l;break}F=F.next}}else if(y.tag===10)R=y.type===s.type?null:y.child;else if(y.tag===18){if(R=y.return,R===null)throw Error(r(341));R.lanes|=l,P=R.alternate,P!==null&&(P.lanes|=l),qa(R,l,s),R=y.sibling}else R=y.child;if(R!==null)R.return=y;else for(R=y;R!==null;){if(R===s){R=null;break}if(y=R.sibling,y!==null){y.return=R.return,R=y;break}R=R.return}y=R}Xe(i,s,h.children,l),s=s.child}return s;case 9:return h=s.type,f=s.pendingProps.children,Gn(s,l),h=mt(h),f=f(h),s.flags|=1,Xe(i,s,f,l),s.child;case 14:return f=s.type,h=bt(f,s.pendingProps),h=bt(f.type,h),Fu(i,s,f,h,l);case 15:return Du(i,s,s.type,s.pendingProps,l);case 17:return f=s.type,h=s.pendingProps,h=s.elementType===f?h:bt(f,h),Ri(i,s),s.tag=1,nt(f)?(i=!0,oi(s)):i=!1,Gn(s,l),wu(s,f,h),ns(s,f,h,l),os(null,s,f,!0,i,l);case 19:return Hu(i,s,l);case 22:return Lu(i,s,l)}throw Error(r(156,s.tag))};function ml(i,s){return Gs(i,s)}function od(i,s,l,f){this.tag=i,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=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(i,s,l,f){return new od(i,s,l,f)}function ws(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ud(i){if(typeof i=="function")return ws(i)?1:0;if(i!=null){if(i=i.$$typeof,i===X)return 11;if(i===me)return 14}return 2}function on(i,s){var l=i.alternate;return l===null?(l=vt(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Di(i,s,l,f,h,y){var R=2;if(f=i,typeof i=="function")ws(i)&&(R=1);else if(typeof i=="string")R=5;else e:switch(i){case O:return Nn(l.children,h,y,s);case A:R=8,h|=8;break;case B:return i=vt(12,l,s,h|2),i.elementType=B,i.lanes=y,i;case $:return i=vt(13,l,s,h),i.elementType=$,i.lanes=y,i;case ce:return i=vt(19,l,s,h),i.elementType=ce,i.lanes=y,i;case ge:return Li(l,h,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case Z:R=10;break e;case Q:R=9;break e;case X:R=11;break e;case me:R=14;break e;case ve:R=16,f=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return s=vt(R,l,s,h),s.elementType=i,s.type=f,s.lanes=y,s}function Nn(i,s,l,f){return i=vt(7,i,f,s),i.lanes=l,i}function Li(i,s,l,f){return i=vt(22,i,f,s),i.elementType=ge,i.lanes=l,i.stateNode={isHidden:!1},i}function Ts(i,s,l){return i=vt(6,i,null,s),i.lanes=l,i}function As(i,s,l){return s=vt(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function ld(i,s,l,f,h){this.tag=s,this.containerInfo=i,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=f,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function Cs(i,s,l,f,h,y,R,P,F){return i=new ld(i,s,l,P,F),s===1?(s=1,y===!0&&(s|=8)):s=0,y=vt(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ua(y),i}function cd(i,s,l){var f=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:a,fetchStatus:o,predicate:u,queryKey:c,stale:d}=t;if(isQueryKey(c)){if(a){if(n.queryHash!==hashQueryKeyByOptions(c,n.options))return!1}else if(!partialMatchKey(n.queryKey,c))return!1}if(r!=="all"){const p=n.isActive();if(r==="active"&&!p||r==="inactive"&&p)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:a,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 a=="boolean"&&n.state.status==="loading"!==a||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((a,o)=>(a[o]=r[o],a),{}):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 a=r?t.length:Object.keys(t).length,o=r?n:Object.keys(n),u=o.length,c=r?[]:{};let d=0;for(let p=0;p"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(a=>{typeof a=="boolean"?this.setFocused(a):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(a=>{window.addEventListener(a,r,!1)}),()=>{onlineEvents.forEach(a=>{window.removeEventListener(a,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(a=>{typeof a=="boolean"?this.setOnline(a):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,a=!1,o,u,c;const d=new Promise((k,b)=>{u=k,c=b}),p=k=>{a||(x(new CancelledError(k)),t.abort==null||t.abort())},m=()=>{n=!0},v=()=>{n=!1},g=()=>!focusManager.isFocused()||t.networkMode!=="always"&&!onlineManager.isOnline(),_=k=>{a||(a=!0,t.onSuccess==null||t.onSuccess(k),o==null||o(),u(k))},x=k=>{a||(a=!0,t.onError==null||t.onError(k),o==null||o(),c(k))},E=()=>new Promise(k=>{o=b=>{const w=a||!g();return w&&k(b),w},t.onPause==null||t.onPause()}).then(()=>{o=void 0,a||t.onContinue==null||t.onContinue()}),S=()=>{if(a)return;let k;try{k=t.fn()}catch(b){k=Promise.reject(b)}Promise.resolve(k).then(_).catch(b=>{var w,j;if(a)return;const C=(w=t.retry)!=null?w:3,T=(j=t.retryDelay)!=null?j:defaultRetryDelay,N=typeof T=="function"?T(r,b):T,O=C===!0||typeof C=="number"&&r{if(g())return E()}).then(()=>{n?x(b):S()})})};return canFetch(t.networkMode)?S():E().then(S),{promise:d,cancel:p,continue:()=>(o==null?void 0:o())?d:Promise.resolve(),cancelRetry:m,continueRetry:v}}const defaultLogger=console;function createNotifyManager(){let t=[],n=0,r=v=>{v()},a=v=>{v()};const o=v=>{let g;n++;try{g=v()}finally{n--,n||d()}return g},u=v=>{n?t.push(v):scheduleMicrotask(()=>{r(v)})},c=v=>(...g)=>{u(()=>{v(...g)})},d=()=>{const v=t;t=[],v.length&&scheduleMicrotask(()=>{a(()=>{v.forEach(g=>{r(g)})})})};return{batch:o,batchCalls:c,schedule:u,setNotifyFunction:v=>{r=v},setBatchNotifyFunction:v=>{a=v}}}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 a=replaceData(this.state.data,n,this.options);return this.dispatch({data:a,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),a}setState(n,r){this.dispatch({type:"setState",state:n,setStateOptions:r})}cancel(n){var r;const a=this.promise;return(r=this.retryer)==null||r.cancel(n),a?a.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(a=>a.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(n=this.retryer)==null||n.continue()}onOnline(){var n;const r=this.observers.find(a=>a.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 a,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(E=>E.options.queryFn);x&&this.setOptions(x.options)}const c=getAbortController(),d={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},p=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>{if(c)return this.abortSignalConsumed=!0,c.signal}})};p(d);const m=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(d)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),v={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:m};if(p(v),(a=this.options.behavior)==null||a.onFetch(v),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=v.fetchOptions)==null?void 0:o.meta)){var g;this.dispatch({type:"fetch",meta:(g=v.fetchOptions)==null?void 0:g.meta})}const _=x=>{if(isCancelledError(x)&&x.silent||this.dispatch({type:"error",error:x}),!isCancelledError(x)){var E,S,k,b;(E=(S=this.cache.config).onError)==null||E.call(S,x,this),(k=(b=this.cache.config).onSettled)==null||k.call(b,this.state.data,x,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=createRetryer({fn:v.fetchFn,abort:c==null?void 0:c.abort.bind(c),onSuccess:x=>{var E,S,k,b;if(typeof x>"u"){_(new Error(this.queryHash+" data is undefined"));return}this.setData(x),(E=(S=this.cache.config).onSuccess)==null||E.call(S,x,this),(k=(b=this.cache.config).onSettled)==null||k.call(b,x,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:_,onFail:(x,E)=>{this.dispatch({type:"failed",failureCount:x,error:E})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay,networkMode:v.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(n){const r=a=>{var o,u;switch(n.type){case"failed":return{...a,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=n.meta)!=null?o:null,fetchStatus:canFetch(this.options.networkMode)?"fetching":"paused",...!a.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...a,data:n.data,dataUpdateCount:a.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"}:{...a,error:c,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error"};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...n.state}}};this.state=r(this.state),notifyManager.batch(()=>{this.observers.forEach(a=>{a.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",a=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?a??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,a){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:a,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(a=>a!==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[a]=parseFilterArgs(n,r);return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(o=>matchQuery(a,o))}findAll(n,r){const[a]=parseFilterArgs(n,r);return Object.keys(a).length>0?this.queries.filter(o=>matchQuery(a,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 O;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:(O=this.options.retry)!=null?O:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var a,o,u,c,d,p,m,v;if(!r){var g,_,x,E;this.dispatch({type:"loading",variables:this.options.variables}),await((g=(_=this.mutationCache.config).onMutate)==null?void 0:g.call(_,this.state.variables,this));const A=await((x=(E=this.options).onMutate)==null?void 0:x.call(E,this.state.variables));A!==this.state.context&&this.dispatch({type:"loading",context:A,variables:this.state.variables})}const O=await n();return await((a=(o=this.mutationCache.config).onSuccess)==null?void 0:a.call(o,O,this.state.variables,this.state.context,this)),await((u=(c=this.options).onSuccess)==null?void 0:u.call(c,O,this.state.variables,this.state.context)),await((d=(p=this.mutationCache.config).onSettled)==null?void 0:d.call(p,O,null,this.state.variables,this.state.context,this)),await((m=(v=this.options).onSettled)==null?void 0:m.call(v,O,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:O}),O}catch(O){try{var S,k,b,w,j,C,T,N;throw await((S=(k=this.mutationCache.config).onError)==null?void 0:S.call(k,O,this.state.variables,this.state.context,this)),await((b=(w=this.options).onError)==null?void 0:b.call(w,O,this.state.variables,this.state.context)),await((j=(C=this.mutationCache.config).onSettled)==null?void 0:j.call(C,void 0,O,this.state.variables,this.state.context,this)),await((T=(N=this.options).onSettled)==null?void 0:T.call(N,void 0,O,this.state.variables,this.state.context)),O}finally{this.dispatch({type:"error",error:O})}}}dispatch(n){const r=a=>{switch(n.type){case"failed":return{...a,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"loading":return{...a,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{...a,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:n.error,failureCount:a.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"};case"setState":return{...a,...n.state}}};this.state=r(this.state),notifyManager.batch(()=>{this.observers.forEach(a=>{a.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,a){const o=new Mutation({mutationCache:this,logger:n.getLogger(),mutationId:++this.mutationId,options:n.defaultMutationOptions(r),state:a,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(a=>a.state.isPaused);return notifyManager.batch(()=>r.reduce((a,o)=>a.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,a,o,u,c;const d=(n=t.fetchOptions)==null||(r=n.meta)==null?void 0:r.refetchPage,p=(a=t.fetchOptions)==null||(o=a.meta)==null?void 0:o.fetchMore,m=p==null?void 0:p.pageParam,v=(p==null?void 0:p.direction)==="forward",g=(p==null?void 0:p.direction)==="backward",_=((u=t.state.data)==null?void 0:u.pages)||[],x=((c=t.state.data)==null?void 0:c.pageParams)||[];let E=x,S=!1;const k=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>{var O;if((O=t.signal)!=null&&O.aborted)S=!0;else{var A;(A=t.signal)==null||A.addEventListener("abort",()=>{S=!0})}return t.signal}})},b=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),w=(N,O,A,B)=>(E=B?[O,...E]:[...E,O],B?[A,...N]:[...N,A]),j=(N,O,A,B)=>{if(S)return Promise.reject("Cancelled");if(typeof A>"u"&&!O&&N.length)return Promise.resolve(N);const Z={queryKey:t.queryKey,pageParam:A,meta:t.options.meta};k(Z);const Q=b(Z);return Promise.resolve(Q).then($=>w(N,A,$,B))};let C;if(!_.length)C=j([]);else if(v){const N=typeof m<"u",O=N?m:getNextPageParam(t.options,_);C=j(_,N,O)}else if(g){const N=typeof m<"u",O=N?m:getPreviousPageParam(t.options,_);C=j(_,N,O,!0)}else{E=[];const N=typeof t.options.getNextPageParam>"u";C=(d&&_[0]?d(_[0],0,_):!0)?j([],N,x[0]):Promise.resolve(w([],x[0],_[0]));for(let A=1;A<_.length;A++)C=C.then(B=>{if(d&&_[A]?d(_[A],A,_):!0){const Q=N?x[A]:getNextPageParam(t.options,B);return j(B,N,Q)}return Promise.resolve(w(B,x[A],_[A]))})}return C.then(N=>({pages:N,pageParams:E}))}}}}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[a]=parseFilterArgs(n,r);return a.fetchStatus="fetching",this.queryCache.findAll(a).length}isMutating(n){return this.mutationCache.findAll({...n,fetching:!0}).length}getQueryData(n,r){var a;return(a=this.queryCache.find(n,r))==null?void 0:a.state.data}ensureQueryData(n,r,a){const o=parseQueryArgs(n,r,a),u=this.getQueryData(o.queryKey);return u?Promise.resolve(u):this.fetchQuery(o)}getQueriesData(n){return this.getQueryCache().findAll(n).map(({queryKey:r,state:a})=>{const o=a.data;return[r,o]})}setQueryData(n,r,a){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),p=this.defaultQueryOptions(d);return this.queryCache.build(this,p).setData(c,{...a,manual:!0})}setQueriesData(n,r,a){return notifyManager.batch(()=>this.getQueryCache().findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,r,a)]))}getQueryState(n,r){var a;return(a=this.queryCache.find(n,r))==null?void 0:a.state}removeQueries(n,r){const[a]=parseFilterArgs(n,r),o=this.queryCache;notifyManager.batch(()=>{o.findAll(a).forEach(u=>{o.remove(u)})})}resetQueries(n,r,a){const[o,u]=parseFilterArgs(n,r,a),c=this.queryCache,d={type:"active",...o};return notifyManager.batch(()=>(c.findAll(o).forEach(p=>{p.reset()}),this.refetchQueries(d,u)))}cancelQueries(n,r,a){const[o,u={}]=parseFilterArgs(n,r,a);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,a){const[o,u]=parseFilterArgs(n,r,a);return notifyManager.batch(()=>{var c,d;if(this.queryCache.findAll(o).forEach(m=>{m.invalidate()}),o.refetchType==="none")return Promise.resolve();const p={...o,type:(c=(d=o.refetchType)!=null?d:o.type)!=null?c:"active"};return this.refetchQueries(p,u)})}refetchQueries(n,r,a){const[o,u]=parseFilterArgs(n,r,a),c=notifyManager.batch(()=>this.queryCache.findAll(o).filter(p=>!p.isDisabled()).map(p=>{var m;return p.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,a){const o=parseQueryArgs(n,r,a),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,a){return this.fetchQuery(n,r,a).then(noop$4).catch(noop$4)}fetchInfiniteQuery(n,r,a){const o=parseQueryArgs(n,r,a);return o.behavior=infiniteQueryBehavior(),this.fetchQuery(o)}prefetchInfiniteQuery(n,r,a){return this.fetchInfiniteQuery(n,r,a).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 a=this.queryDefaults.find(o=>hashQueryKey(n)===hashQueryKey(o.queryKey));a?a.defaultOptions=r:this.queryDefaults.push({queryKey:n,defaultOptions:r})}getQueryDefaults(n){if(!n)return;const r=this.queryDefaults.find(a=>partialMatchKey(n,a.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(n,r){const a=this.mutationDefaults.find(o=>hashQueryKey(n)===hashQueryKey(o.mutationKey));a?a.defaultOptions=r:this.mutationDefaults.push({mutationKey:n,defaultOptions:r})}getMutationDefaults(n){if(!n)return;const r=this.mutationDefaults.find(a=>partialMatchKey(n,a.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 a=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(n),shallowEqualObjects(a,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=a.queryKey),this.updateQuery();const u=this.hasListeners();u&&shouldFetchOptionally(this.currentQuery,o,this.options,a)&&this.executeFetch(),this.updateResult(r),u&&(this.currentQuery!==o||this.options.enabled!==a.enabled||this.options.staleTime!==a.staleTime)&&this.updateStaleTimeout();const c=this.computeRefetchInterval();u&&(this.currentQuery!==o||this.options.enabled!==a.enabled||c!==this.currentRefetchInterval)&&this.updateRefetchInterval(c)}getOptimisticResult(n){const r=this.client.getQueryCache().build(this.client,n),a=this.createResult(r,n);return shouldAssignObserverCurrentProperties(this,a,n)&&(this.currentResult=a,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),a}getCurrentResult(){return this.currentResult}trackResult(n){const r={};return Object.keys(n).forEach(a=>{Object.defineProperty(r,a,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(a),n[a])})}),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),a=this.client.getQueryCache().build(this.client,r);return a.isFetchingOptimistic=!0,a.fetch().then(()=>this.createResult(a,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 a=this.currentQuery,o=this.options,u=this.currentResult,c=this.currentResultState,d=this.currentResultOptions,p=n!==a,m=p?n.state:this.currentQueryInitialState,v=p?this.currentResult:this.previousQueryResult,{state:g}=n;let{dataUpdatedAt:_,error:x,errorUpdatedAt:E,fetchStatus:S,status:k}=g,b=!1,w=!1,j;if(r._optimisticResults){const A=this.hasListeners(),B=!A&&shouldFetchOnMount(n,r),Z=A&&shouldFetchOptionally(n,a,r,o);(B||Z)&&(S=canFetch(n.options.networkMode)?"fetching":"paused",_||(k="loading")),r._optimisticResults==="isRestoring"&&(S="idle")}if(r.keepPreviousData&&!g.dataUpdatedAt&&v!=null&&v.isSuccess&&k!=="error")j=v.data,_=v.dataUpdatedAt,k=v.status,b=!0;else if(r.select&&typeof g.data<"u")if(u&&g.data===(c==null?void 0:c.data)&&r.select===this.selectFn)j=this.selectResult;else try{this.selectFn=r.select,j=r.select(g.data),j=replaceData(u==null?void 0:u.data,j,r),this.selectResult=j,this.selectError=null}catch(A){this.selectError=A}else j=g.data;if(typeof r.placeholderData<"u"&&typeof j>"u"&&k==="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"&&(k="success",j=replaceData(u==null?void 0:u.data,A,r),w=!0)}this.selectError&&(x=this.selectError,j=this.selectResult,E=Date.now(),k="error");const C=S==="fetching",T=k==="loading",N=k==="error";return{status:k,fetchStatus:S,isLoading:T,isSuccess:k==="success",isError:N,isInitialLoading:T&&C,data:j,dataUpdatedAt:_,error:x,errorUpdatedAt:E,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>m.dataUpdateCount||g.errorUpdateCount>m.errorUpdateCount,isFetching:C,isRefetching:C&&!T,isLoadingError:N&&g.dataUpdatedAt===0,isPaused:S==="paused",isPlaceholderData:w,isPreviousData:b,isRefetchError:N&&g.dataUpdatedAt!==0,isStale:isStale(n,r),refetch:this.refetch,remove:this.remove}}updateResult(n){const r=this.currentResult,a=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,shallowEqualObjects(a,r))return;this.currentResult=a;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 p=new Set(d??this.trackedProps);return this.options.useErrorBoundary&&p.add("error"),Object.keys(this.currentResult).some(m=>{const v=m;return this.currentResult[v]!==r[v]&&p.has(v)})};(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,a,o,u;(r=(a=this.options).onSuccess)==null||r.call(a,this.currentResult.data),(o=(u=this.options).onSettled)==null||o.call(u,this.currentResult.data,null)}else if(n.onError){var c,d,p,m;(c=(d=this.options).onError)==null||c.call(d,this.currentResult.error),(p=(m=this.options).onSettled)==null||p.call(m,void 0,this.currentResult.error)}n.listeners&&this.listeners.forEach(({listener:v})=>{v(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 a=typeof r=="function"?r(t):r;return a==="always"||a!==!1&&isStale(t,n)}return!1}function shouldFetchOptionally(t,n,r,a){return r.enabled!==!1&&(t!==n||a.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(g,_){return g===_&&(g!==0||1/g===1/_)||g!==g&&_!==_}var r=typeof Object.is=="function"?Object.is:n,a=t.useState,o=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function d(g,_){var x=_(),E=a({inst:{value:x,getSnapshot:_}}),S=E[0].inst,k=E[1];return u(function(){S.value=x,S.getSnapshot=_,p(S)&&k({inst:S})},[g,x,_]),o(function(){return p(S)&&k({inst:S}),g(function(){p(S)&&k({inst:S})})},[g]),c(x),x}function p(g){var _=g.getSnapshot;g=g.value;try{var x=_();return!r(g,x)}catch{return!0}}function m(g,_){return _()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:d;return useSyncExternalStoreShim_production.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,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:a=!1})=>{reactExports.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const o=getQueryClientContext(r,a);return reactExports.createElement(QueryClientSharingContext.Provider,{value:!r&&a},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:a})=>t.isError&&!n.isReset()&&!t.isFetching&&shouldThrowError(r,[t.error,a]),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:a})=>{t.onSuccess==null||t.onSuccess(a),t.onSettled==null||t.onSettled(a,null)}).catch(a=>{r.clearReset(),t.onError==null||t.onError(a),t.onSettled==null||t.onSettled(void 0,a)});function useBaseQuery(t,n){const r=useQueryClient({context:t.context}),a=useIsRestoring(),o=useQueryErrorResetBoundary(),u=r.defaultQueryOptions(t);u._optimisticResults=a?"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(p=>{const m=a?()=>{}:c.subscribe(notifyManager.batchCalls(p));return c.updateResult(),m},[c,a]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),reactExports.useEffect(()=>{c.setOptions(u,{listeners:!1})},[u,c]),shouldSuspend(u,d,a))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 a=parseQueryArgs(t,n,r);return useBaseQuery(a,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,a=nullListeners;function o(g){return p(),a.subscribe(g)}function u(){a.notify()}function c(){v.onStateChange&&v.onStateChange()}function d(){return!!r}function p(){r||(r=n?n.addNestedSub(c):t.subscribe(c),a=createListenerCollection())}function m(){r&&(r(),r=void 0,a.clear(),a=nullListeners)}var v={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:c,isSubscribed:d,trySubscribe:p,tryUnsubscribe:m,getListeners:function(){return a}};return v}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,a=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},a)}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(t){for(var n=1;n(t,n)=>{const r=(a,o)=>({type:t,payload:a,meta:o,"@CONTEXT":n});return r.type=t,r},makeMetaActionCreator=()=>(t,n)=>{const r=a=>({type:t,meta:a,"@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 a=!0}catch{}var o=nativeObjectToString$1.call(t);return a&&(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,a=t==null?0:t.length,o=Array(a);++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,a=Array(t);++r-1}function listCacheSet(t,n){var r=this.__data__,a=assocIndexOf(r,t);return a<0?(++this.size,r.push([t,n])):r[a][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);++a=a?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,a=r?r[0]:n.charAt(0),o=r?castSlice(r,1).join(""):n.slice(1);return a[t]()+o}}var upperFirst=createCaseFirst("toUpperCase");function capitalize$1(t){return upperFirst(toString$1(t).toLowerCase())}function arrayReduce(t,n,r,a){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 a=r.__data__;if(!Map$1||a.lengthd))return!1;var m=u.get(t),v=u.get(n);if(m&&v)return m==n&&v==t;var g=-1,_=!0,x=r&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(u.set(t,n),u.set(n,t);++g=n||O<0||g&&A>=u}function b(){var N=now();if(k(N))return w(N);d=setTimeout(b,S(N))}function w(N){return d=void 0,_&&a?x(N):(a=o=void 0,c)}function j(){d!==void 0&&clearTimeout(d),m=0,a=p=o=d=void 0}function C(){return d===void 0?c:w(now())}function T(){var N=now(),O=k(N);if(a=arguments,o=this,p=N,O){if(d===void 0)return E(p);if(g)return clearTimeout(d),d=setTimeout(b,n),x(p)}return d===void 0&&(d=setTimeout(b,n)),c}return T.cancel=j,T.flush=C,T}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,a){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,p=new SetCache}else p=n?[]:d;e:for(;++a{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,a)=>r+a*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,[a,o])=>({...r,[a]:n(o,a)}),{})}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 a=60*60,o=a*24,u=Math.max(n.valueOf()-t.valueOf(),0)/1e3;return{total:u,day:r(u/o),hour:r(u%o/a),minute:r(u%a/60),second:r(u%60)}}const useSelector=useSelector$1,useDispatch=useDispatch$1;function useQuerySelector(t,n={}){const[r,a]=reactExports.useState(document.querySelectorAll(t)),[,o]=reactExports.useReducer(u=>u+1,0);return reactExports.useLayoutEffect(()=>{const u=async p=>{try{typeof(p==null?void 0:p.type.includes)=="function"&&(p!=null&&p.type.includes("shopify"))&&await sleep(100);const m=document.querySelectorAll(t);m&&typeof o=="function"&&o(),a(m)}catch(m){console.warn(m)}},c=new MutationObserver(p=>u());r.forEach(p=>{p.addEventListener("change",u),c.observe(p,{attributes:!0,childList:!1,characterData:!1,...n})});const d=["locationchange","DOMContentLoaded","shopify:section:load","shopify:section:reorder","shopify:section:unload"];return d.forEach(p=>window.addEventListener(p,u)),()=>{d.forEach(p=>window.removeEventListener(p,u)),c.disconnect(),r.forEach(p=>p.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 a=t.find(u=>u.countries.includes(r)),o=t.find(u=>n==="EU"?u.store==="EU":u.countries.includes(n));return!a||!o?{status:0,nextMarket:null}:o.id===a.id?{status:0,nextMarket:null}:a.store!==o.store?{status:"Store",nextMarket:a}:a.currency!==o.currency?{status:"Currency",nextMarket:a}:a.webPresences[0].domain!==o.webPresences[0].domain?{status:"Domain",nextMarket:a}:{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 a=null;return getStoreCountry()==="EU"?a=r??n:a=n??r,a??"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??window.localization.country}function getCurrentLanguage(){return window.localization.language.shop_locale}function useCurrentCountryCode(){const t=useSelector(r=>{var a;return(a=r.cart.buyerIdentity)==null?void 0:a.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 a=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}${a}`;try{const d=r||hasDecimals(a)?a.toFixed(r||2):a;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}${a}`}}else return a}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.discountAllocations.reduce((n,r)=>n+getDiscountValue(r),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 a=t.lines.some(v=>{var g;return(g=v.merchandise)==null?void 0:g.requiresShipping});if(!a)return{requiresShipping:a,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(v=>v.criteria.every(g=>{if(g.field!=="TOTAL_PRICE")return!1;const _=getPrice(g);switch(g.operator){case"LESS_THAN_OR_EQUAL_TO":return o<=_;case"GREATER_THAN_OR_EQUAL_TO":return o>=_}})).sort((v,g)=>getPrice(g.rate)-getPrice(v.rate)).pop(),c=n.conditions.map(v=>getPrice(v.rate)),d=Math.max(0,...c),p=Math.min(...c.filter(v=>v>0)),m=u?parseNumber(u.rate.amount):0;return{requiresShipping:a,cost:m,saved:p-m,threshold:r??0,minCost:p,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(a=>a.countries.includes(n||""))??t.find(a=>a.conditions.some(o=>o.rate.currencyCode===window.Shopify.currency.active))??t.find(a=>a.countries.includes("restOfWorld"))??t[0]??null}function isWhiteSpace(t){return t===9||t===32}function printBlockString(t,n){const r=t.replace(/"""/g,'\\"""'),a=r.split(/\r\n|[\n\r]/g),o=a.length===1,u=a.length>1&&a.slice(1).every(x=>x.length===0||isWhiteSpace(x.charCodeAt(0))),c=r.endsWith('\\"""'),d=t.endsWith('"')&&!c,p=t.endsWith("\\"),m=d||p,v=!o||t.length>70||m||u||c;let g="";const _=o&&isWhiteSpace(t.charCodeAt(0));return(v&&!_||u)&&(g+=` `),g+=r,(v||m)&&(g+=` `),'"""'+g+'"""'}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 a=t.toJSON();if(a!==t)return typeof a=="string"?a:formatValue(a,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),a=t.length-r,o=[];for(let u=0;u1&&o.push(`... ${a} 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 a=new Map;for(const b of Object.values(Kind))a.set(b,getEnterLeaveForKind(n,b));let o,u=Array.isArray(t),c=[t],d=-1,p=[],m=t,v,g;const _=[],x=[];do{d++;const b=d===c.length,w=b&&p.length!==0;if(b){if(v=x.length===0?void 0:_[_.length-1],m=g,g=x.pop(),w)if(u){m=m.slice();let C=0;for(const[T,N]of p){const O=T-C;N===null?(m.splice(O,1),C++):m[O]=N}}else{m=Object.defineProperties({},Object.getOwnPropertyDescriptors(m));for(const[C,T]of p)m[C]=T}d=o.index,c=o.keys,p=o.edits,u=o.inArray,o=o.prev}else if(g){if(v=u?d:c[d],m=g[v],m==null)continue;_.push(v)}let j;if(!Array.isArray(m)){var E,S;isNode(m)||devAssert(!1,`Invalid AST Node: ${inspect(m)}.`);const C=b?(E=a.get(m.kind))===null||E===void 0?void 0:E.leave:(S=a.get(m.kind))===null||S===void 0?void 0:S.enter;if(j=C==null?void 0:C.call(n,m,v,g,_,x),j===BREAK)break;if(j===!1){if(!b){_.pop();continue}}else if(j!==void 0&&(p.push([v,j]),!b))if(isNode(j))m=j;else{_.pop();continue}}if(j===void 0&&w&&p.push([v,m]),b)_.pop();else{var k;o={inArray:u,index:d,keys:c,edits:p,prev:o},u=Array.isArray(m),c=u?m:(k=r[m.kind])!==null&&k!==void 0?k:[],d=-1,p=[],g&&x.push(g),g=m}}while(o!==void 0);return p.length!==0?p[p.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:a})=>t+": "+n+wrap(" = ",r)+wrap(" ",join(a," "))},SelectionSet:{leave:({selections:t})=>block(t)},Field:{leave({alias:t,name:n,arguments:r,directives:a,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(a," "),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:a,selectionSet:o})=>`fragment ${t}${wrap("(",join(r,", "),")")} on ${n} ${wrap("",join(a," ")," ")}`+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:a,fields:o})=>wrap("",t,` `)+join(["type",n,wrap("implements ",join(r," & ")),join(a," "),block(o)]," ")},FieldDefinition:{leave:({description:t,name:n,arguments:r,type:a,directives:o})=>wrap("",t,` `)+n+(hasMultilineItems(r)?wrap(`( `,indent(join(r,` `)),` )`):wrap("(",join(r,", "),")"))+": "+a+wrap(" ",join(o," "))},InputValueDefinition:{leave:({description:t,name:n,type:r,defaultValue:a,directives:o})=>wrap("",t,` `)+join([n+": "+r,wrap("= ",a),join(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:n,interfaces:r,directives:a,fields:o})=>wrap("",t,` `)+join(["interface",n,wrap("implements ",join(r," & ")),join(a," "),block(o)]," ")},UnionTypeDefinition:{leave:({description:t,name:n,directives:r,types:a})=>wrap("",t,` `)+join(["union",n,join(r," "),wrap("= ",join(a," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:n,directives:r,values:a})=>wrap("",t,` `)+join(["enum",n,join(r," "),block(a)]," ")},EnumValueDefinition:{leave:({description:t,name:n,directives:r})=>wrap("",t,` `)+join([n,join(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:n,directives:r,fields:a})=>wrap("",t,` `)+join(["input",n,join(r," "),block(a)]," ")},DirectiveDefinition:{leave:({description:t,name:n,arguments:r,repeatable:a,locations:o})=>wrap("",t,` `)+"directive @"+n+(hasMultilineItems(r)?wrap(`( `,indent(join(r,` `)),` )`):wrap("(",join(r,", "),")"))+(a?" 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:a})=>join(["extend type",t,wrap("implements ",join(n," & ")),join(r," "),block(a)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:n,directives:r,fields:a})=>join(["extend interface",t,wrap("implements ",join(n," & ")),join(r," "),block(a)]," ")},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(a=>a).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}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=window.localization.country.iso_code==="US"?"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,a={}){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:{},...a}}}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}}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||{});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 a=r.split(".").pop();switch(typeof n){case"string":return r.replace(`.${a}`,`_${n}.${a}`);case"number":return r.replace(`.${a}`,`_x${n}.${a}`);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,p])=>o.searchParams.set(d,typeof p=="number"?p.toFixed(0):p)),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,a])=>[r,n(a)?extractNodes(a):isObject(a)&&!isArray(a)?extractConnections(a):a]).reduce((r,[a,o])=>({...r,[a]: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,p,m,v,g,_,x,E;const a=(d=t[`upsell${r}_offer`])==null?void 0:d.value,o=(_=(g=(v=(m=(p=t[`upsell${r}`])==null?void 0:p.reference)==null?void 0:m.variants)==null?void 0:v.nodes)==null?void 0:g[0])==null?void 0:_.id,u=(x=t==null?void 0:t[`upsell${r}_expiry`])==null?void 0:x.value;return{id:((E=n==null?void 0:n[`upsell${r}`])==null?void 0:E.value)||o,label:a,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 a=parseNumber(n);return isNaN(a)?t:a}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 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){const r={country:getCurrentCountry().iso_code,language:window.localization.language.shop_locale.locale.toUpperCase()};return getShopifyData(t,{...r,...n})}function getDocumentName(t){var r;const n=t.definitions.find(a=>a.kind==="OperationDefinition");return n?((r=n.name)==null?void 0:r.value)+capitalize$1(n.operation):null}async function getShopifyData(t,n){const r=typeof t=="string"?t:print(t);try{const a=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:r,variables:n})});if(a.ok){const o=await a.json();return extractData(o)}else{const o=`[${a.status}: ${a.statusText}] `,u=(await a.text()).replace(/\s+/g," ");return addBreadcrumb({type:"storefront-api",message:o+u,level:"warning",data:{"http.status":a.status}}),{data:null,errors:[new AukError(u)]}}}catch(a){const o=a;return addBreadcrumb({type:"storefront-api",level:"error",message:o.message,data:{operation:getDocumentName(t),...n,error:o.name,stack:o.stack}}),{data:null,errors:[new AukError(`${getDocumentName(t)??t.kind} operation failed`,a,{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}),a=omitBy(n,(u,c)=>c.toLowerCase().includes("errors")),o=Object.values(a);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=a=>Object.values(pickBy(a,(o,u)=>u.toLowerCase().includes("errors"))),r=[n(t),n(t.data)].flat(3).filter(isPresent).map(a=>new GQLError(a));return r.length>0?r:null}function toShopifyAnalyticsCartLine(t,n){var u;const r=typeof t=="string"?n==null?void 0:n.lines.find(c=>c.merchandise.id===t):t,a=n==null?void 0:n.lines.find(c=>c.merchandise.id===(r==null?void 0:r.id));if(!r)return null;const o=(a==null?void 0:a.merchandise.compareAtPrice)??(a==null?void 0:a.merchandise.price)??("price"in r?r.price:null);return o?{quantity:r.quantity,cost:{totalAmount:toMoneyV2Numeric(o)},merchandise:{...r,...a==null?void 0:a.merchandise,sku:null,untranslatedTitle:((u=a==null?void 0:a.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,a;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:((a=t.price)==null?void 0:a.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,a={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(t.classGroups),r).forEach(([u,c])=>{processClassesRecursively(c,a,u,n)}),a}function processClassesRecursively(t,n,r,a){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(a),n,r,a);return}n.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([u,c])=>{processClassesRecursively(c,getPart(n,u),r,a)})})}function getPart(t,n){let r=t;return n.split(CLASS_PART_SEPARATOR).forEach(a=>{r.nextPart.has(a)||r.nextPart.set(a,{nextPart:new Map,validators:[]}),r=r.nextPart.get(a)}),r}function isThemeGetter(t){return t.isThemeGetter}function getPrefixedClassGroupEntries(t,n){return n?t.map(([r,a])=>{const o=a.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,a=new Map;function o(u,c){r.set(u,c),n++,n>t&&(n=0,a=r,r=new Map)}return{get(u){let c=r.get(u);if(c!==void 0)return c;if((c=a.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,a=n[0],o=n.length;return function(c){const d=[];let p=0,m=0,v;for(let S=0;Sm?v-m:void 0;return{modifiers:d,hasImportantModifier:_,baseClassName:x,maybePostfixModifierPosition:E}}}function sortModifiers(t){if(t.length<=1)return t;const n=[];let r=[];return t.forEach(a=>{a[0]==="["?(n.push(...r.sort(),a),r=[]):r.push(a)}),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:a,getConflictingClassGroupIds:o}=n,u=new Set;return t.trim().split(SPLIT_CLASSES_REGEX).map(c=>{const{modifiers:d,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}=r(c);let g=a(v?m.substring(0,v):m),_=!!v;if(!g){if(!v)return{isTailwindClass:!1,originalClassName:c};if(g=a(m),!g)return{isTailwindClass:!1,originalClassName:c};_=!1}const x=sortModifiers(d).join(":");return{isTailwindClass:!0,modifierId:p?x+IMPORTANT_MODIFIER:x,classGroupId:g,originalClassName:c,hasPostfixModifier:_}}).reverse().filter(c=>{if(!c.isTailwindClass)return!0;const{modifierId:d,classGroupId:p,hasPostfixModifier:m}=c,v=d+p;return u.has(v)?!1:(u.add(v),o(p,m).forEach(g=>u.add(d+g)),!0)}).reverse().map(c=>c.originalClassName).join(" ")}function twJoin(){let t=0,n,r,a="";for(;tg(v),t());return r=createConfigUtils(m),a=r.cache.get,o=r.cache.set,u=d,d(p)}function d(p){const m=a(p);if(m)return m;const v=mergeClassList(p,r);return o(p,v),v}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 a=arbitraryValueRegex.exec(t);return a?a[1]?typeof n=="string"?a[1]===n:n.has(a[1]):r(a[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"),a=fromTheme("brightness"),o=fromTheme("borderColor"),u=fromTheme("borderRadius"),c=fromTheme("borderSpacing"),d=fromTheme("borderWidth"),p=fromTheme("contrast"),m=fromTheme("grayscale"),v=fromTheme("hueRotate"),g=fromTheme("invert"),_=fromTheme("gap"),x=fromTheme("gradientColorStops"),E=fromTheme("gradientColorStopPositions"),S=fromTheme("inset"),k=fromTheme("margin"),b=fromTheme("opacity"),w=fromTheme("padding"),j=fromTheme("saturate"),C=fromTheme("scale"),T=fromTheme("sepia"),N=fromTheme("skew"),O=fromTheme("space"),A=fromTheme("translate"),B=()=>["auto","contain","none"],Z=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto",isArbitraryValue,n],X=()=>[isArbitraryValue,n],$=()=>["",isLength,isArbitraryLength],ce=()=>["auto",isNumber,isArbitraryValue],me=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ve=()=>["solid","dashed","dotted","double","none"],ge=()=>["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"],ee=()=>["","0",isArbitraryValue],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[isNumber,isArbitraryNumber],L=()=>[isNumber,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:I(),borderColor:[t],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:X(),borderWidth:$(),contrast:I(),grayscale:ee(),hueRotate:L(),invert:ee(),gap:X(),gradientColorStops:[t],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:Q(),margin:Q(),opacity:I(),padding:X(),saturate:I(),scale:I(),sepia:ee(),skew:L(),space:X(),translate:X()},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:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],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:ee()}],shrink:[{shrink:ee()}],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":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"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:[_]}],"gap-x":[{"gap-x":[_]}],"gap-y":[{"gap-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:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"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":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[b]}],"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:X()}],"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":[b]}],"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:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"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":[b]}],"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":[b]}],"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:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[b]}],"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:[b]}],"mix-blend":[{"mix-blend":ge()}],"bg-blend":[{"bg-blend":ge()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[a]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[g]}],saturate:[{saturate:[j]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[a]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"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:L()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:L()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],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":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"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:"Sweden",iso_code:CountryCode.SE},{name:"Switzerland",iso_code:CountryCode.CH},{name:"United Kingdom",iso_code:CountryCode.GB},{name:"United States",iso_code:CountryCode.US},{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}],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:"on-de.ru"}],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:"us.auk.com"}],countries:["US"],primary:!0}];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 E,S,k=new Promise(function(b,w){E=b,S=w});return{resolve:E,reject:S,promise:k}}t.defer=n;function r(E){var S=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(E);return S===null?null:[S[1],S[2],S[3]].map(function(k){return parseInt(k,16)})}t.hexToRgb=r;function a(E,S,k){return"#"+((1<<24)+(E<<16)+(S<<8)+k).toString(16).slice(1,7)}t.rgbToHex=a;function o(E,S,k){E/=255,S/=255,k/=255;var b=Math.max(E,S,k),w=Math.min(E,S,k),j,C,T=(b+w)/2;if(b===w)j=C=0;else{var N=b-w;switch(C=T>.5?N/(2-b-w):N/(b+w),b){case E:j=(S-k)/N+(S1&&(B-=1),B<1/6?O+(A-O)*6*B:B<1/2?A:B<2/3?O+(A-O)*(2/3-B)*6:O}if(S===0)b=w=j=k;else{var T=k<.5?k*(1+S):k+S-k*S,N=2*k-T;b=C(N,T,E+1/3),w=C(N,T,E),j=C(N,T,E-1/3)}return[b*255,w*255,j*255]}t.hslToRgb=u;function c(E,S,k){E/=255,S/=255,k/=255,E=E>.04045?Math.pow((E+.005)/1.055,2.4):E/12.92,S=S>.04045?Math.pow((S+.005)/1.055,2.4):S/12.92,k=k>.04045?Math.pow((k+.005)/1.055,2.4):k/12.92,E*=100,S*=100,k*=100;var b=E*.4124+S*.3576+k*.1805,w=E*.2126+S*.7152+k*.0722,j=E*.0193+S*.1192+k*.9505;return[b,w,j]}t.rgbToXyz=c;function d(E,S,k){var b=95.047,w=100,j=108.883;E/=b,S/=w,k/=j,E=E>.008856?Math.pow(E,1/3):7.787*E+16/116,S=S>.008856?Math.pow(S,1/3):7.787*S+16/116,k=k>.008856?Math.pow(k,1/3):7.787*k+16/116;var C=116*S-16,T=500*(E-S),N=200*(S-k);return[C,T,N]}t.xyzToCIELab=d;function p(E,S,k){var b=c(E,S,k),w=b[0],j=b[1],C=b[2];return d(w,j,C)}t.rgbToCIELab=p;function m(E,S){var k=1,b=1,w=1,j=E[0],C=E[1],T=E[2],N=S[0],O=S[1],A=S[2],B=j-N,Z=C-O,Q=T-A,X=Math.sqrt(C*C+T*T),$=Math.sqrt(O*O+A*A),ce=N-j,me=$-X,ve=Math.sqrt(B*B+Z*Z+Q*Q),ge=Math.sqrt(ve)>Math.sqrt(Math.abs(ce))+Math.sqrt(Math.abs(me))?Math.sqrt(ve*ve-ce*ce-me*me):0,G=1+.045*X,ee=1+.015*X;return ce/=k,me/=b*G,ge/=w*ee,Math.sqrt(ce*ce+me*me+ge*ge)}t.deltaE94=m;function v(E,S){var k=p.apply(void 0,E),b=p.apply(void 0,S);return m(k,b)}t.rgbDiff=v;function g(E,S){var k=r(E),b=r(S);return v(k,b)}t.hexDiff=g;function _(E){return E-1&&a%1==0&&a-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(),a="[object Arguments]",o="[object Array]",u="[object Boolean]",c="[object Date]",d="[object Error]",p="[object Function]",m="[object Map]",v="[object Number]",g="[object Object]",_="[object RegExp]",x="[object Set]",E="[object String]",S="[object WeakMap]",k="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",j="[object Float64Array]",C="[object Int8Array]",T="[object Int16Array]",N="[object Int32Array]",O="[object Uint8Array]",A="[object Uint8ClampedArray]",B="[object Uint16Array]",Z="[object Uint32Array]",Q={};Q[w]=Q[j]=Q[C]=Q[T]=Q[N]=Q[O]=Q[A]=Q[B]=Q[Z]=!0,Q[a]=Q[o]=Q[k]=Q[u]=Q[b]=Q[c]=Q[d]=Q[p]=Q[m]=Q[v]=Q[g]=Q[_]=Q[x]=Q[E]=Q[S]=!1;function X($){return r($)&&n($.length)&&!!Q[t($)]}return _baseIsTypedArray=X,_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(),a=n&&!n.nodeType&&n,o=a&&!0&&t&&!t.nodeType&&t,u=o&&o.exports===a,c=u&&r.process,d=function(){try{var p=o&&o.require&&o.require("util").types;return p||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(),a=r&&r.isTypedArray,o=a?n(a):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(),a=requireIsBuffer(),o=require_isIndex(),u=requireIsTypedArray(),c=Object.prototype,d=c.hasOwnProperty;function p(m,v){var g=r(m),_=!g&&n(m),x=!g&&!_&&a(m),E=!g&&!_&&!x&&u(m),S=g||_||x||E,k=S?t(m.length,String):[],b=k.length;for(var w in m)(v||d.call(m,w))&&!(S&&(w=="length"||x&&(w=="offset"||w=="parent")||E&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||o(w,b)))&&k.push(w);return k}return _arrayLikeKeys=p,_arrayLikeKeys}var _isPrototype,hasRequired_isPrototype;function require_isPrototype(){if(hasRequired_isPrototype)return _isPrototype;hasRequired_isPrototype=1;var t=Object.prototype;function n(r){var a=r&&r.constructor,o=typeof a=="function"&&a.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(a){return n(r(a))}}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,a=r.hasOwnProperty;function o(u){if(!t(u))return n(u);var c=[];for(var d in Object(u))a.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]",a="[object Function]",o="[object GeneratorFunction]",u="[object Proxy]";function c(d){if(!n(d))return!1;var p=t(d);return p==a||p==o||p==r||p==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(a){return a!=null&&n(a.length)&&!t(a)}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 a(o){return r(o)?t(o):n(o)}return keys_1=a,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(a,o){return a&&t(a,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,a){return function(o,u){if(o==null)return o;if(!t(o))return r(o,u);for(var c=o.length,d=a?c:-1,p=Object(o);(a?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,a){var o=this.__data__,u=t(o,r);return u<0?(++this.size,o.push([r,a])):o[u][1]=a,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(),a=require_listCacheHas(),o=require_listCacheSet();function u(c){var d=-1,p=c==null?0:c.length;for(this.clear();++dx))return!1;var S=g.get(c),k=g.get(d);if(S&&k)return S==d&&k==c;var b=-1,w=!0,j=p&o?new t:void 0;for(g.set(c,d),g.set(d,c);++b0&&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=a,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(a,o,u,c,d,p,m){this._volume=-1,this._count=-1,this.dimension={r1:a,r2:o,g1:u,g2:c,b1:d,b2:p},this.hist=m}return r.build=function(a,o){var u=1<<3*t.SIGBITS,c=new Uint32Array(u),d,p,m,v,g,_,x,E,S,k;d=m=g=0,p=v=_=Number.MAX_VALUE;for(var b=a.length/4,w=0;w>t.RSHIFT,E=E>>t.RSHIFT,S=S>>t.RSHIFT;var C=t.getColorIndex(x,E,S);c[C]+=1,x>d&&(d=x),xm&&(m=E),Eg&&(g=S),S<_&&(_=S)}}return new r(p,d,v,m,_,g,c)},r.prototype.invalidate=function(){this._volume=this._count=-1,this._avg=null},r.prototype.volume=function(){if(this._volume<0){var a=this.dimension,o=a.r1,u=a.r2,c=a.g1,d=a.g2,p=a.b1,m=a.b2;this._volume=(u-o+1)*(d-c+1)*(m-p+1)}return this._volume},r.prototype.count=function(){if(this._count<0){for(var a=this.hist,o=this.dimension,u=o.r1,c=o.r2,d=o.g1,p=o.g2,m=o.b1,v=o.b2,g=0,_=u;_<=c;_++)for(var x=d;x<=p;x++)for(var E=m;E<=v;E++){var S=t.getColorIndex(_,x,E);g+=a[S]}this._count=g}return this._count},r.prototype.clone=function(){var a=this.hist,o=this.dimension,u=o.r1,c=o.r2,d=o.g1,p=o.g2,m=o.b1,v=o.b2;return new r(u,c,d,p,m,v,a)},r.prototype.avg=function(){if(!this._avg){var a=this.hist,o=this.dimension,u=o.r1,c=o.r2,d=o.g1,p=o.g2,m=o.b1,v=o.b2,g=0,_=1<<8-t.SIGBITS,x=void 0,E=void 0,S=void 0;x=E=S=0;for(var k=u;k<=c;k++)for(var b=d;b<=p;b++)for(var w=m;w<=v;w++){var j=t.getColorIndex(k,b,w),C=a[j];g+=C,x+=C*(k+.5)*_,E+=C*(b+.5)*_,S+=C*(w+.5)*_}g?this._avg=[~~(x/g),~~(E/g),~~(S/g)]:this._avg=[~~(_*(u+c+1)/2),~~(_*(d+p+1)/2),~~(_*(m+v+1)/2)]}return this._avg},r.prototype.contains=function(a){var o=a[0],u=a[1],c=a[2],d=this.dimension,p=d.r1,m=d.r2,v=d.g1,g=d.g2,_=d.b1,x=d.b2;return o>>=t.RSHIFT,u>>=t.RSHIFT,c>>=t.RSHIFT,o>=p&&o<=m&&u>=v&&u<=g&&c>=_&&c<=x},r.prototype.split=function(){var a=this.hist,o=this.dimension,u=o.r1,c=o.r2,d=o.g1,p=o.g2,m=o.b1,v=o.b2,g=this.count();if(!g)return[];if(g===1)return[this.clone()];var _=c-u+1,x=p-d+1,E=v-m+1,S=Math.max(_,x,E),k=null,b,w;b=w=0;var j=null;if(S===_){j="r",k=new Uint32Array(c+1);for(var C=u;C<=c;C++){b=0;for(var T=d;T<=p;T++)for(var N=m;N<=v;N++){var O=t.getColorIndex(C,T,N);b+=a[O]}w+=b,k[C]=w}}else if(S===x){j="g",k=new Uint32Array(p+1);for(var T=d;T<=p;T++){b=0;for(var C=u;C<=c;C++)for(var N=m;N<=v;N++){var O=t.getColorIndex(C,T,N);b+=a[O]}w+=b,k[T]=w}}else{j="b",k=new Uint32Array(v+1);for(var N=m;N<=v;N++){b=0;for(var C=u;C<=c;C++)for(var T=d;T<=p;T++){var O=t.getColorIndex(C,T,N);b+=a[O]}w+=b,k[N]=w}}for(var A=-1,B=new Uint32Array(k.length),Z=0;Zw/2&&(A=Z),B[Z]=w-Q}var X=this;function $(ce){var me=ce+"1",ve=ce+"2",ge=X.dimension[me],G=X.dimension[ve],ee=X.clone(),H=X.clone(),I=A-ge,L=G-A;for(I<=L?(G=Math.min(G-1,~~(A+L/2)),G=Math.max(0,G)):(G=Math.max(ge,~~(A-1-I/2)),G=Math.min(X.dimension[ve],G));!k[G];)G++;for(var te=B[G];!te&&k[G-1];)te=B[--G];return ee.dimension[ve]=G,H.dimension[me]=G+1,[ee,H]}return $(j)},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(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(mmcq,"__esModule",{value:!0});var n=requireColor(),r=t(requireVbox()),a=t(requirePqueue()),o=.75;function u(p,m){for(var v=p.size();p.size()0){var _=g.split(),x=_[0],E=_[1];if(p.push(x),E&&E.count()>0&&p.push(E),p.size()===v)break;v=p.size()}else break}}var c=function(p,m){if(p.length===0||m.colorCount<2||m.colorCount>256)throw new Error("Wrong MMCQ parameters");var v=r.default.build(p),g=v.hist;Object.keys(g).length;var _=new a.default(function(E,S){return E.count()-S.count()});_.push(v),u(_,o*m.colorCount);var x=new a.default(function(E,S){return E.count()*E.volume()-S.count()*S.volume()});return x.contents=_.contents,u(x,m.colorCount-x.size()),d(x)};function d(p){for(var m=[];p.size();){var v=p.pop(),g=v.avg();g[0],g[1],g[2],m.push(new n.Swatch(g,v.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,a){switch(a.length){case 0:return n.call(r);case 1:return n.call(r,a[0]);case 2:return n.call(r,a[0],a[1]);case 3:return n.call(r,a[0],a[1],a[2])}return n.apply(r,a)}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(a,o,u){return o=n(o===void 0?a.length-1:o,0),function(){for(var c=arguments,d=-1,p=n(c.length-o,0),m=Array(p);++d0){if(++u>=t)return arguments[0]}else u=0;return o.apply(void 0,arguments)}}return _shortOut=a,_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 a(o,u){return r(n(o,u,t),o+"")}return _baseRest=a,_baseRest}var _isIterateeCall,hasRequired_isIterateeCall;function require_isIterateeCall(){if(hasRequired_isIterateeCall)return _isIterateeCall;hasRequired_isIterateeCall=1;var t=requireEq(),n=requireIsArrayLike(),r=require_isIndex(),a=requireIsObject();function o(u,c,d){if(!a(d))return!1;var p=typeof c;return(p=="number"?n(d)&&r(c,d.length):p=="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(),a=requireKeysIn(),o=Object.prototype,u=o.hasOwnProperty,c=t(function(d,p){d=Object(d);var m=-1,v=p.length,g=v>2?p[2]:void 0;for(g&&r(p[0],p[1],g)&&(v=1);++m=w&&B<=j&&Z>=S&&Z<=k&&!u(g,O)){var Q=c(B,b,Z,E,O.getPopulation(),x,C);(T===null||Q>N)&&(T=O,N=Q)}}),T}function p(g,_,x){var E={};return E.Vibrant=d(E,g,_,x.targetNormalLuma,x.minNormalLuma,x.maxNormalLuma,x.targetVibrantSaturation,x.minVibrantSaturation,1,x),E.LightVibrant=d(E,g,_,x.targetLightLuma,x.minLightLuma,1,x.targetVibrantSaturation,x.minVibrantSaturation,1,x),E.DarkVibrant=d(E,g,_,x.targetDarkLuma,0,x.maxDarkLuma,x.targetVibrantSaturation,x.minVibrantSaturation,1,x),E.Muted=d(E,g,_,x.targetNormalLuma,x.minNormalLuma,x.maxNormalLuma,x.targetMutesSaturation,0,x.maxMutesSaturation,x),E.LightMuted=d(E,g,_,x.targetLightLuma,x.minLightLuma,1,x.targetMutesSaturation,0,x.maxMutesSaturation,x),E.DarkMuted=d(E,g,_,x.targetDarkLuma,0,x.maxDarkLuma,x.targetMutesSaturation,0,x.maxMutesSaturation,x),E}function m(g,_,x){if(g.Vibrant===null&&g.DarkVibrant===null&&g.LightVibrant===null){if(g.DarkVibrant===null&&g.DarkMuted!==null){var E=g.DarkMuted.getHsl(),S=E[0],k=E[1],b=E[2];b=x.targetDarkLuma,g.DarkVibrant=new t.Swatch(n.hslToRgb(S,k,b),0)}if(g.LightVibrant===null&&g.LightMuted!==null){var w=g.LightMuted.getHsl(),S=w[0],k=w[1],b=w[2];b=x.targetDarkLuma,g.DarkVibrant=new t.Swatch(n.hslToRgb(S,k,b),0)}}if(g.Vibrant===null&&g.DarkVibrant!==null){var j=g.DarkVibrant.getHsl(),S=j[0],k=j[1],b=j[2];b=x.targetNormalLuma,g.Vibrant=new t.Swatch(n.hslToRgb(S,k,b),0)}else if(g.Vibrant===null&&g.LightVibrant!==null){var C=g.LightVibrant.getHsl(),S=C[0],k=C[1],b=C[2];b=x.targetNormalLuma,g.Vibrant=new t.Swatch(n.hslToRgb(S,k,b),0)}if(g.DarkVibrant===null&&g.Vibrant!==null){var T=g.Vibrant.getHsl(),S=T[0],k=T[1],b=T[2];b=x.targetDarkLuma,g.DarkVibrant=new t.Swatch(n.hslToRgb(S,k,b),0)}if(g.LightVibrant===null&&g.Vibrant!==null){var N=g.Vibrant.getHsl(),S=N[0],k=N[1],b=N[2];b=x.targetLightLuma,g.LightVibrant=new t.Swatch(n.hslToRgb(S,k,b),0)}if(g.Muted===null&&g.Vibrant!==null){var O=g.Vibrant.getHsl(),S=O[0],k=O[1],b=O[2];b=x.targetMutesSaturation,g.Muted=new t.Swatch(n.hslToRgb(S,k,b),0)}if(g.DarkMuted===null&&g.DarkVibrant!==null){var A=g.DarkVibrant.getHsl(),S=A[0],k=A[1],b=A[2];b=x.targetMutesSaturation,g.DarkMuted=new t.Swatch(n.hslToRgb(S,k,b),0)}if(g.LightMuted===null&&g.LightVibrant!==null){var B=g.LightVibrant.getHsl(),S=B[0],k=B[1],b=B[2];b=x.targetMutesSaturation,g.LightMuted=new t.Swatch(n.hslToRgb(S,k,b),0)}}var v=function(g,_){_=r({},_,a);var x=o(g),E=p(g,x,_);return m(E,x,_),E};return _default$1.default=v,_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,a,o){return o>=125&&!(n>250&&r>250&&a>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(a){return!Array.isArray(a)||a.length===0?null:function(o,u,c,d){if(d===0)return!1;for(var p=0;p0){var c=Math.max(a,o);c>r.maxDimension&&(u=r.maxDimension/c)}else u=1/r.quality;u<1&&this.resize(a*u,o*u,u)},n.prototype.applyFilter=function(r){var a=this.getImageData();if(typeof r=="function")for(var o=a.data,u=o.length/4,c=void 0,d=void 0,p=void 0,m=void 0,v=void 0,g=0;g= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=p-m,T=Math.floor,N=String.fromCharCode,O;function A(H){throw RangeError(j[H])}function B(H,I){for(var L=H.length,te=[];L--;)te[L]=I(H[L]);return te}function Z(H,I){var L=H.split("@"),te="";L.length>1&&(te=L[0]+"@",H=L[1]),H=H.replace(w,".");var K=H.split("."),ne=B(K,I).join(".");return te+ne}function Q(H){for(var I=[],L=0,te=H.length,K,ne;L=55296&&K<=56319&&L65535&&(I-=65536,L+=N(I>>>10&1023|55296),I=56320|I&1023),L+=N(I),L}).join("")}function $(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:p}function ce(H,I){return H+22+75*(H<26)-((I!=0)<<5)}function me(H,I,L){var te=0;for(H=L?T(H/_):H>>1,H+=T(H/I);H>C*v>>1;te+=p)H=T(H/C);return T(te+(C+1)*H/(H+g))}function ve(H){var I=[],L=H.length,te,K=0,ne=E,se=x,de,le,_e,Se,Ee,Ae,Pe,ze,ye;for(de=H.lastIndexOf(S),de<0&&(de=0),le=0;le=128&&A("not-basic"),I.push(H.charCodeAt(le));for(_e=de>0?de+1:0;_e=L&&A("invalid-input"),Pe=$(H.charCodeAt(_e++)),(Pe>=p||Pe>T((d-K)/Ee))&&A("overflow"),K+=Pe*Ee,ze=Ae<=se?m:Ae>=se+v?v:Ae-se,!(PeT(d/ye)&&A("overflow"),Ee*=ye;te=I.length+1,se=me(K-Se,te,Se==0),T(K/te)>d-ne&&A("overflow"),ne+=T(K/te),K%=te,I.splice(K++,0,ne)}return X(I)}function ge(H){var I,L,te,K,ne,se,de,le,_e,Se,Ee,Ae=[],Pe,ze,ye,Ze;for(H=Q(H),Pe=H.length,I=E,L=0,ne=x,se=0;se=I&&EeT((d-L)/ze)&&A("overflow"),L+=(de-I)*ze,I=de,se=0;sed&&A("overflow"),Ee==I){for(le=L,_e=p;Se=_e<=ne?m:_e>=ne+v?v:_e-ne,!(le0&&p>d&&(p=d);for(var m=0;m=0?(_=v.substr(0,g),x=v.substr(g+1)):(_=v,x=""),E=decodeURIComponent(_),S=decodeURIComponent(x),t(u,E)?Array.isArray(u[E])?u[E].push(S):u[E]=[u[E],S]:u[E]=S}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,a,o){return r=r||"&",a=a||"=",n===null&&(n=void 0),typeof n=="object"?Object.keys(n).map(function(u){var c=encodeURIComponent(t(u))+a;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))+a+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=w,url.resolve=C,url.resolveObject=T,url.format=j,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 a=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r",` `," "],d=["{","}","|","\\","^","`"].concat(c),p=["'"].concat(d),m=["%","/","?",";","#"].concat(p),v=["/","?","#"],g=255,_=/^[+a-z0-9A-Z_-]{0,63}$/,x=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=requireQuerystring();function w(N,O,A){if(N&&n.isObject(N)&&N instanceof r)return N;var B=new r;return B.parse(N,O,A),B}r.prototype.parse=function(N,O,A){if(!n.isString(N))throw new TypeError("Parameter 'url' must be a string, not "+typeof N);var B=N.indexOf("?"),Z=B!==-1&&B127?de+="x":de+=se[le];if(!de.match(_)){var Se=K.slice(0,ee),Ee=K.slice(ee+1),Ae=se.match(x);Ae&&(Se.push(Ae[1]),Ee.unshift(Ae[2])),Ee.length&&($="/"+Ee.join(".")+$),this.hostname=Se.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),te||(this.hostname=t.toASCII(this.hostname));var Pe=this.port?":"+this.port:"",ze=this.hostname||"";this.host=ze+Pe,this.href+=this.host,te&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),$[0]!=="/"&&($="/"+$))}if(!E[ve])for(var ee=0,ne=p.length;ee0?A.host.split("@"):!1;de&&(A.auth=de.shift(),A.host=A.hostname=de.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(!K.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var le=K.slice(-1)[0],_e=(A.host||N.host||K.length>1)&&(le==="."||le==="..")||le==="",Se=0,Ee=K.length;Ee>=0;Ee--)le=K[Ee],le==="."?K.splice(Ee,1):le===".."?(K.splice(Ee,1),Se++):Se&&(K.splice(Ee,1),Se--);if(!L&&!te)for(;Se--;Se)K.unshift("..");L&&K[0]!==""&&(!K[0]||K[0].charAt(0)!=="/")&&K.unshift(""),_e&&K.join("/").substr(-1)!=="/"&&K.push("");var Ae=K[0]===""||K[0]&&K[0].charAt(0)==="/";if(se){A.hostname=A.host=Ae?"":K.length?K.shift():"";var de=A.host&&A.host.indexOf("@")>0?A.host.split("@"):!1;de&&(A.auth=de.shift(),A.host=A.hostname=de.shift())}return L=L||A.host&&K.length,L&&!Ae&&K.unshift(""),K.length?A.pathname=K.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,O=o.exec(N);O&&(O=O[0],O!==":"&&(this.port=O.substr(1)),N=N.substr(0,N.length-O.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(v,g){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,x){_.__proto__=x}||function(_,x){for(var E in x)x.hasOwnProperty(E)&&(_[E]=x[E])},m(v,g)};return function(v,g){m(v,g);function _(){this.constructor=v}v.prototype=g===null?Object.create(g):(_.prototype=g.prototype,new _)}}(),n=browser$1&&browser$1.__createBinding||(Object.create?function(m,v,g,_){_===void 0&&(_=g),Object.defineProperty(m,_,{enumerable:!0,get:function(){return v[g]}})}:function(m,v,g,_){_===void 0&&(_=g),m[_]=v[g]}),r=browser$1&&browser$1.__setModuleDefault||(Object.create?function(m,v){Object.defineProperty(m,"default",{enumerable:!0,value:v})}:function(m,v){m.default=v}),a=browser$1&&browser$1.__importStar||function(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var g in m)g!=="default"&&Object.hasOwnProperty.call(m,g)&&n(v,m,g);return r(v,m),v};Object.defineProperty(browser$1,"__esModule",{value:!0});var o=requireBase(),u=a(requireUrl());function c(m){var v=u.parse(m);return v.protocol===null&&v.host===null&&v.port===null}function d(m,v){var g=u.parse(m),_=u.parse(v);return g.protocol===_.protocol&&g.hostname===_.hostname&&g.port===_.port}var p=function(m){t(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype._initCanvas=function(){var g=this.image,_=this._canvas=document.createElement("canvas"),x=this._context=_.getContext("2d");_.className="vibrant-canvas",_.style.display="none",this._width=_.width=g.width,this._height=_.height=g.height,x.drawImage(g,0,0),document.body.appendChild(_)},v.prototype.load=function(g){var _=this,x=null,E=null;if(typeof g=="string")x=document.createElement("img"),!c(g)&&!d(window.location.href,g)&&(x.crossOrigin="anonymous"),E=x.src=g;else if(g instanceof HTMLImageElement)x=g,E=g.src;else return Promise.reject(new Error("Cannot load buffer as an image in browser"));return this.image=x,new Promise(function(S,k){var b=function(){_._initCanvas(),S(_)};x.complete?b():(x.onload=b,x.onerror=function(w){return k(new Error("Fail to load image: "+E))})})},v.prototype.clear=function(){this._context.clearRect(0,0,this._width,this._height)},v.prototype.update=function(g){this._context.putImageData(g,0,0)},v.prototype.getWidth=function(){return this._width},v.prototype.getHeight=function(){return this._height},v.prototype.resize=function(g,_,x){var E=this,S=E._canvas,k=E._context,b=E.image;this._width=S.width=g,this._height=S.height=_,k.scale(x,x),k.drawImage(b,0,0)},v.prototype.getPixelCount=function(){return this._width*this._height},v.prototype.getImageData=function(){return this._context.getImageData(0,0,this._width,this._height)},v.prototype.remove=function(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)},v}(o.ImageBase);return browser$1.default=p,browser$1}var browser,hasRequiredBrowser;function requireBrowser(){if(hasRequiredBrowser)return browser;hasRequiredBrowser=1;var t=browser&&browser.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},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((a,o)=>o.population-a.population)[0]}catch(n){return console.warn(`${getDominantColor.name}Error`,n),null}}function useDominantColor(t,n={height:100}){const[r,a]=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);a((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,a,o;return[t,(n=t.image_2)==null?void 0:n.reference,(r=t.image_3)==null?void 0:r.reference,(a=t.image_4)==null?void 0:a.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,a,o]=n,u=Math.floor((r+a+o)/3);return u>200?"shadow-4-25":u>60?"shadow-4-70":"shadow-4-100"}function getGalleryOverrides(t,n){var a;const r=(a=t.gallery_overrides)==null?void 0:a.reference;return r?n.map((o,u)=>{var d,p;const c=(d=r[`image_${u+1}`])==null?void 0:d.reference;return!c||!("image"in c)||(p=c.image)!=null&&p.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"),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=()=>_==null?void 0:_.match(/[a-z]/i),a=T=>k(/<[a-z]/,2),o=T=>typeof T=="string"?k(``):k(/<\/[a-z]/,3),u=()=>_!==void 0,c=()=>k(/({{)|(}})/,2),d=()=>!a()&&!o()&&_!==void 0,p=()=>_?['"',"'"].includes(_):!1,m=()=>_==" ",v=t;let g=0,_=v[g++];try{const T=C();return S(!_,`unexpected input: ${_}`),typeof T=="string"?T:reactExports.createElement(reactExports.Fragment,null,T)}catch(T){return console.warn("ParserError",T),t}function x(){const T=_;if(g>v.length)throw new Error("Parser out of bounds");return _=v[g++],T}function E(T,N){for(;N(),_==T;)x()}function S(T,N){T||console.warn("Parser:",N,"while parsing",t)}function k(T,N=0){const O=g-1;if(typeof T=="string"){N=T.length;for(let A=0;A{for(;r();)T+=x();if(T.length!=0){for(E(" ",()=>{if(!r())return;let A="",B="";for(;r();)A+=x();_=="="?(x(),c()?B=b():B=w(()=>p()||m()||_==">")):B=!0,N[toReactProp(A)]=B}),S(_==">",`Expected >, not ${_}`),x(),O=C(),S(o(T),`Expected , not ${_}`);_!==">";)x();x()}}),T.length==0?null:reactExports.createElement(T,N,O)}function C(){const T=[];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,a]=reactExports.useState(null),o=useLocale().locale;return reactExports.useEffect(()=>{async function u(){const c=await loadTranslations(o,t,n);a(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 a=await loadLanguage(t);return parseTranslations(a,n,r)}function parseTranslations(t,n,r){const a=(n==null?void 0:n.split(".").length)??0,o=n?get(t,n):t;switch(a){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{react:window.TRANSLATIONS}}const Button=t=>{const{active:n,secondary:r,transparent:a,size:o,className:u,children:c,disabled:d,onDisabledClick:p,onClick:m,...v}=t,g=v.href?"a":"button";return jsxRuntimeExports.jsx(g,{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",a&&"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:_=>d?p&&p(_):m&&m(_),...v,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:a,...o})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:"none",className:cn("align-middle",a),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,...a})=>{const o=useMarket();return jsxRuntimeExports.jsxs("div",{className:cn("list flex h-12 items-center gap-2",t),...a,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:a="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:a}),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 a=parseNumber(r.rating),o=Math.floor(a),u=a-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:a})=>{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):a,u))}):o?reactDomExports.createPortal(r?r(o):a,o):null},Modal=({className:t,onClick:n,onClose:r,children:a,...o})=>{const u=reactExports.useRef(null);return reactExports.useEffect(()=>{const c=u.current;function d(p){if(p.key==="Escape"&&r&&r(),!c)return;const m=c.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),v=m[0],g=m[m.length-1];p.key==="Tab"&&(p.shiftKey?document.activeElement===v&&(g.focus(),p.preventDefault()):document.activeElement===g&&(v.focus(),p.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:a})}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 z-10 bg-gray-200 opacity-70",onClick:n})]})},Portal=({open:t,alwaysRender:n,modal:r,...a})=>(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,{...a}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:a.children}),document.body));function isNum(t){return!isNaN(t)}const Price=({price:t,original:n,decimals:r,asText:a=!1,currencyCode:o,...u})=>{const c=useTranslations("react.checkout.free"),d=m=>isMoneyV2(m)?getPrice(m,a,r):a?getPrice(o&&isPresent(m)?{amount:m.toString(),currencyCode:o}:m,!0,r):isNum(m)?numberFormatter().format(m):m,p=n!==t&&(typeof n=="number"?n>0:!!n);return jsxRuntimeExports.jsxs("span",{...u,children:[p&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("s",{className:"whitespace-nowrap text-gray-400",children:d(n)}),jsxRuntimeExports.jsx("span",{children:" "})]}),jsxRuntimeExports.jsx("span",{className:cn("whitespace-nowrap",{green:p}),children:t===0&&a&&c?c:d(t)})]})};function getPromoText(t){var a;const n=((a=t.offer)==null?void 0:a.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 a=typeof t=="string"?t:getPromoText(t);return a?jsxRuntimeExports.jsx("aside",{className:cn("z-10 font-semibold leading-none",n),...r,children:a}):null},CountrySelector=()=>{const t=useQuerySelector("#lform-wrapper > #localization_form",{attributeFilter:["class"]}),[{attributes:n,inputs:r},a]=reactExports.useState({attributes:{},inputs:[]}),o=useDispatch(),u=useTranslations("react.actions"),c=useSelector(b=>b.markets),d=useSelector(b=>{var w,j;return(j=(w=b.cart)==null?void 0:w.buyerIdentity)==null?void 0:j.countryCode}),{country:p,setCountry:m}=reactExports.useContext(CountryContext),[v,g]=reactExports.useState(!1),[_,x]=reactExports.useState(!1),E=reactExports.useRef(null),S=reactExports.useRef(null);reactExports.useEffect(()=>{const b=setInterval(()=>{if(!window.localization.ready)return;const w=getPrefferedCountryCode(),j=countryList.find(C=>C.iso_code===w);j&&getStoreCountry()==="EU"&&m(j),setTimeout(()=>x(!0),200),clearInterval(b)},50);return()=>clearInterval(b)},[m]);const k=reactExports.useMemo(()=>{if(!c)return{};const b=uniq(c==null?void 0:c.flatMap(w=>w.webPresences.map(j=>j.domain)).filter(isPresent));return Object.fromEntries(b.map(w=>[w,c.filter(j=>j.webPresences.some(C=>C.domain===w)).flatMap(j=>j.countries)]))},[c]);return reactExports.useLayoutEffect(()=>{var w;if(c===null)return;console.debug({current:p.iso_code,locale:window.localization.country.iso_code,cookie:getPrefferedCountryCode(),store:getStoreCountry(),ready:_});const b=p.iso_code;if(S.current&&(S.current.value=b),b!==void 0)if(window.Shopify.theme.role!=="main"||window.Shopify.designMode)"unit_system"in p&&E.current&&o(Actions$1.updateCartCountry(p,E.current));else if(b=="EU")getStoreCountry()==="EU"&&_&&g(!0);else if(b!==window.localization.country.iso_code)if(!E.current)captureMessage("#localization_form missing","error");else{const j=getMarketSwitchConfig(c,window.localization.country.iso_code,b);switch(console.debug(j),j.status){case MarketSwitchStatus.Store:case MarketSwitchStatus.Domain:case MarketSwitchStatus.Currency:{const C=(w=j.nextMarket.webPresences[0])==null?void 0:w.domain;if(C){const T=new URL(`https://${C}${location.pathname}`);T.searchParams.set("country",b),console.info("Redirecting to",T.toString()),location.replace(T.toString())}else console.error("No domain found for market",j.nextMarket);break}case MarketSwitchStatus.None:E.current&&o(Actions$1.updateCartCountry(p,E.current)),g(!1);break}}else b!==d&&o(Actions$1.updateCartBuyerIdentity(p))},[c,p,_,o]),reactExports.useEffect(()=>{var b;t&&(a({attributes:extractAttributes(t),inputs:Array.from(t.children).filter(w=>{var j;return!includes((j=w.attributes.getNamedItem("name"))==null?void 0:j.value,"return_to","country_code")}).map(extractAttributes)}),(b=t.parentElement)==null||b.remove())},[t]),!n||!_?null:jsxRuntimeExports.jsxs(ErrorBoundary,{children:[(p.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:b=>g(!0),"aria-label":p.name,children:[jsxRuntimeExports.jsx(CountryIcon,{isoCode:p.iso_code}),jsxRuntimeExports.jsx(Caret,{height:"6px"})]}),jsxRuntimeExports.jsxs(Portal,{open:v,modal:!0,onClick:b=>g(!1),onClose:()=>g(!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((b,w)=>{var O,A;const{status:j,nextMarket:C}=getMarketSwitchConfig(c??[],p.iso_code,b.iso_code),T=(O=C==null?void 0:C.webPresences[0])==null?void 0:O.domain;let N;return j!==MarketSwitchStatus.None&&(N=new URL(`https://${T}${location.pathname}`),T&&((A=k[T])==null?void 0:A.length)>1&&N.searchParams.set("country",b.iso_code)),jsxRuntimeExports.jsx("li",{role:"option","data-country":b.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(Z=>Z.iso_code===b.iso_code)??b;if(m(B),S.current&&(S.current.value=B.iso_code),j===MarketSwitchStatus.None){const Z=new URL(window.location.href);Z.searchParams.delete("country"),window.history.replaceState({},"",Z.toString()),g(!1)}},autoFocus:w==0,children:[jsxRuntimeExports.jsx(CountryIcon,{isoCode:b.iso_code}),jsxRuntimeExports.jsx("span",{className:"text-xl",role:"presentation",children:b.name})]})},w)})}),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:b=>g(!1),children:jsxRuntimeExports.jsx(Close,{className:"block"})})]}),jsxRuntimeExports.jsxs("form",{...n,ref:E,children:[r.map(b=>jsxRuntimeExports.jsx("input",{...b,style:{display:"none"}},b.name)),jsxRuntimeExports.jsx("input",{type:"hidden",name:"country_code",value:p.iso_code,ref:S}),jsxRuntimeExports.jsx("input",{type:"hidden",name:"return_to",value:`${location.pathname}?country=${p.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 a=r.call(t,n);if(_typeof(a)!="object")return a;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 a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,a)}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,p=!1;function m(){d===c&&(d=c.slice())}function v(){if(p)throw new Error(formatProdErrorMessage(3));return u}function g(S){if(typeof S!="function")throw new Error(formatProdErrorMessage(4));if(p)throw new Error(formatProdErrorMessage(5));var k=!0;return m(),d.push(S),function(){if(k){if(p)throw new Error(formatProdErrorMessage(6));k=!1,m();var w=d.indexOf(S);d.splice(w,1),c=null}}}function _(S){if(!isPlainObject(S))throw new Error(formatProdErrorMessage(7));if(typeof S.type>"u")throw new Error(formatProdErrorMessage(8));if(p)throw new Error(formatProdErrorMessage(9));try{p=!0,u=o(u,S)}finally{p=!1}for(var k=c=d,b=0;b"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={},a=0;a"u")throw m&&m.type,new Error(formatProdErrorMessage(14));g[x]=k,v=v||k!==S}return v=v||u.length!==Object.keys(p).length,v?g:p}}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 a={meta:{name:r},next:t,throw:n,return:kReturn,isSagaIterator:!0};return typeof Symbol<"u"&&(a[Symbol.iterator]=function(){return a}),a}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),a=r.length,o=0,u,c=array$1(t)?createEmptyArray(a):{},d={};function p(){o===a&&(u=!0,n(c))}return r.forEach(function(m){var v=function(_,x){u||(x||shouldComplete(_)?(n.cancel(),n(_,x)):(c[m]=_,o++,p()))};v.cancel=noop$2,d[m]=v}),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),a=0,o=0,u=0,c=function(v){r[o]=v,o=(o+1)%t,a++},d=function(){if(a!=0){var v=r[u];return r[u]=null,a--,u=(u+1)%t,v}},p=function(){for(var v=[];a;)v.push(d());return v};return{isEmpty:function(){return a==0},put:function(v){if(a1?n-1:0),a=1;a1?n-1:0),a=1;a1?n-1:0),a=1;a2?_-2:0),E=2;E<_;E++)x[E-2]=arguments[E];var S=n.apply(void 0,x),k=nextSagaId();p&&(p.rootSagaStarted=p.rootSagaStarted||noop$2,p.effectTriggered=p.effectTriggered||noop$2,p.effectResolved=p.effectResolved||noop$2,p.effectRejected=p.effectRejected||noop$2,p.effectCancelled=p.effectCancelled||noop$2,p.actionDispatched=p.actionDispatched||noop$2,p.rootSagaStarted({effectId:k,saga:n,args:x}));var b;if(m){var w=compose.apply(void 0,m);b=function(T){return function(N,O,A){var B=function(Q){return T(Q,O,A)};return w(B)(N)}}}else b=identity$1;var j={channel:a,dispatch:wrapSagaDispatch(o),getState:u,sagaMonitor:p,onError:g,finalizeRunEffect:b};return immediately(function(){var C=proc(j,S,d,k,getMetaInfo(n),!0,void 0);return p&&p.effectResolved(k,C),C})}function sagaMiddlewareFactory(t){var n=t===void 0?{}:t,r=n.context,a=r===void 0?{}:r,o=n.channel,u=o===void 0?stdChannel():o,c=n.sagaMonitor,d=_objectWithoutPropertiesLoose$1(n,["context","channel","sagaMonitor"]),p;function m(v){var g=v.getState,_=v.dispatch;return p=runSaga.bind(null,_extends$2({},d,{context:a,channel:u,dispatch:_,getState:g,sagaMonitor:c})),function(x){return function(E){c&&c.actionDispatched&&c.actionDispatched(E);var S=x(E);return u.put(E),S}}}return m.run=function(){return p.apply(void 0,arguments)},m.setContext=function(v){assignWithSymbols(a,v)},m}const initialState$1={open:!1,loaded:!1,errors:null,pendingOperation:null,stagedUpsells:[],upsells:[]};function item(t,n){if(n.meta!=t.id)return t;switch(n.type){case"CART_QUANTITY_UPDATE":return{...t,quantity:n.payload};default:return t}}function cart(t=initialState$1,n){if(n.type=="CART_LOAD_SUCCESS")return{...t,...n.payload,loaded:!0,errors:null,open:!1,pendingOperation:n.payload.pendingOperation!==void 0?null:t.pendingOperation};if(!t.loaded)return t;switch(n.type){case"CART_OPEN":return{...t,open:n.payload};case"CART_ADD":return{...t,errors:null,pendingOperation:n.payload[0].id};case"CART_QUANTITY_UPDATE":return{...t,errors:null,pendingOperation:n.meta,lines:t.lines.map(r=>item(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_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 a,o,u,c=n;function d(p,m){if(c===qEnd)return done(p);if(m&&!o)throw c=qEnd,m;a&&a(p);var v=m?t[o](m):t[c]();return c=v.nextState,u=v.effect,a=v.stateUpdater,o=v.errorState,c===qEnd?done(p):u}return makeIterator(d,function(p){return d(null,p)},r)}function takeEvery$1(t,n){for(var r=arguments.length,a=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(a=>a.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,a;const n=yield*call$2(()=>shopifyFetch(CartLoadUpsellsDocument,{}));if(!n.errors&&((r=n.data)!=null&&r.items)){const o=(a=n.data.items.references)==null?void 0:a.map(extractConnections).map(u=>{var c,d,p,m,v;return(c=u.item)!=null&&c.reference?{item:(d=u.item)==null?void 0:d.reference,expiry:(p=u.expiry)!=null&&p.value?new Date(u.expiry.value):null,expiryText:((m=u.expiry_text)==null?void 0:m.value)??null,offer:((v=u.offer)==null?void 0:v.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 a=JSON.parse(localStorage.getItem("cart"));if(a!=null&&a.id){"lines"in a&&(yield*put(Actions$1.cartFetched(a)));const o=yield*call$2(()=>shopifyFetch(CartLoadDocument,{id:a.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),a.id.includes(u.id)&&(u.id=a.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(a){r=a}yield*call$2(sleep,Math.pow(n,2)*500)}if(r){const a=localStorage.getItem("cart");console.warn("Failed to create checkout",r),r.name&&(r.name="CartCreateError"),captureException(r,{extra:{cart:a?JSON.parse(a):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 a;switch(t.type){case"CART_ADD":{if(a=yield*call$2(addToCart,t,n),yield*put(Actions$1.openCart(!0)),!isOk(a.res))break;for(const c of t.payload){window.Shopify.analytics.publish("product_added_to_cart",{cartLine:toShopifyAnalyticsCartLine(c,a.res.data)});const d=(u=a.res.data)==null?void 0:u.lines.find(p=>p.merchandise.id===c.id);if(!d)break;window.cvg({method:"track",eventName:"Added To Cart",properties:toConvergeCartLine(d)})}break}case"CART_REMOVE":if(a=yield*call$2(removeFromCart,t,n),isOk(a.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(a=yield*call$2(updateQuantity,t,n),isOk(a.res)){const c=r==null?void 0:r.lines.find(p=>p.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(a.res)?yield*put(Actions$1.updateCartSucess(a.res.data)):a.message&&(yield*put(Actions$1.updateCartError(a.res.data??r,[new CartError(a.message,a.res)])))}async function removeFromCart(t,n){const r=[toGraphId(t.meta,"variant")],a=await shopifyFetch(CartRemoveDocument,{id:n,lines:r});return cartResponse(a,"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})),a=await shopifyFetch(CartAddDocument,{id:n,lines:r});return cartResponse(a,"Error adding to cart")}async function updateQuantity(t,n){const r=[{id:toGraphId(t.meta,"variant"),quantity:t.payload}],a=await shopifyFetch(CartUpdateDocument,{id:n,lines:r});return cartResponse(a,"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,a=yield*select(o=>o.cart.id);if(a&&r!=="EU"){const o=yield*call$2(()=>shopifyFetch(CartLoadDocument,{id:a,country:r})),u={id:a,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,a=document.cookie.split("; ").map(o=>o.includes("localization")?`localization=${n.iso_code}`:o);document.cookie=a.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 a=yield*call$2(()=>fetch(`${AUK_API_URL}/s?country=${n}&store=${getStoreCountry()}`));if(!a.ok)throw new Error(`Failed to load delivery profiles: ${a.statusText}`);const o=yield*call$2(()=>a.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)}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 a=getCurrentLanguage().locale,o=yield*call$2(loadTranslations,a,"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),a=[n.variants[0].id,...r].map(o=>({merchandiseId:o,quantity:1}));try{const[o,u]=yield*all([call$2(()=>shopifyFetch(UpsellCheckoutCreateDocument,{lines:a})),call$2(()=>shopifyFetch(UpsellDocument,{variantIds:r}))]),c=o,d=u;isOk(d)?yield*put(Actions$1.upsellsLoaded(d.data,n.id)):yield*put(Actions$1.upsellsLoaded([],n.id)),isOk(c)&&(yield*put(Actions$1.upsellsCartLoaded(c.data,n.id)))}catch{yield*put(Actions$1.upsellsLoaded([],n.id))}}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 a of r)console.warn(a.message,a),yield captureError(a)}function*logAction(t){var r;!(yield*select(a=>a.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 a;return(a=r["@CONTEXT"])!=null&&a.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,a){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||a||createKey()})}function createPath(t){let{pathname:n="/",search:r="",hash:a=""}=t;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(n+=a.charAt(0)==="#"?a:"#"+a),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 a=t.indexOf("?");a>=0&&(n.search=t.substr(a),t=t.substr(0,a)),t&&(n.pathname=t)}return n}function getUrlBasedHistory(t,n,r,a){a===void 0&&(a={});let{window:o=document.defaultView,v5Compat:u=!1}=a,c=o.history,d=Action$1.Pop,p=null,m=v();m==null&&(m=0,c.replaceState(_extends$1({},c.state,{idx:m}),""));function v(){return(c.state||{idx:null}).idx}function g(){d=Action$1.Pop;let k=v(),b=k==null?null:k-m;m=k,p&&p({action:d,location:S.location,delta:b})}function _(k,b){d=Action$1.Push;let w=createLocation(S.location,k,b);m=v()+1;let j=getHistoryState(w,m),C=S.createHref(w);try{c.pushState(j,"",C)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;o.location.assign(C)}u&&p&&p({action:d,location:S.location,delta:1})}function x(k,b){d=Action$1.Replace;let w=createLocation(S.location,k,b);m=v();let j=getHistoryState(w,m),C=S.createHref(w);c.replaceState(j,"",C),u&&p&&p({action:d,location:S.location,delta:0})}function E(k){let b=o.location.origin!=="null"?o.location.origin:o.location.href,w=typeof k=="string"?k:createPath(k);return w=w.replace(/ $/,"%20"),invariant(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let S={get action(){return d},get location(){return t(o,c)},listen(k){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(PopStateEventType,g),p=k,()=>{o.removeEventListener(PopStateEventType,g),p=null}},createHref(k){return n(o,k)},createURL:E,encodeLocation(k){let b=E(k);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:_,replace:x,go(k){return c.go(k)}};return S}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,a=t.charAt(r);return a&&a!=="/"?null:t.slice(r)||"/"}function resolvePath(t,n){n===void 0&&(n="/");let{pathname:r,search:a="",hash:o=""}=typeof t=="string"?parsePath(t):t;return{pathname:r?r.startsWith("/")?r:resolvePathname(r,n):n,search:normalizeSearch(a),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,a){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(a)+"]. 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((a,o)=>o===r.length-1?a.pathname:a.pathnameBase):r.map(a=>a.pathnameBase)}function resolveTo(t,n,r,a){a===void 0&&(a=!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 g=n.length-1;if(!a&&c.startsWith("..")){let _=c.split("/");for(;_[0]==="..";)_.shift(),g-=1;o.pathname=_.join("/")}d=g>=0?n[g]:"/"}let p=resolvePath(o,d),m=c&&c!=="/"&&c.endsWith("/"),v=(u||c===".")&&r.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}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,v){if(v===void 0&&(v={}),!d.current)return;if(typeof m=="number"){a.go(m);return}let g=resolveTo(m,JSON.parse(c),u,v.relative==="path");t==null&&n!=="/"&&(g.pathname=g.pathname==="/"?n:joinPaths([n,g.pathname])),(v.replace?a.replace:a.push)(g,v.state,v)},[n,a,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:a,navigationType:o=Action$1.Pop,navigator:u,static:c=!1,future:d}=t;useInRouterContext()&&invariant(!1);let p=n.replace(/^\/*/,"/"),m=reactExports.useMemo(()=>({basename:p,navigator:u,static:c,future:_extends({v7_relativeSplatPath:!1},d)}),[p,d,u,c]);typeof a=="string"&&(a=parsePath(a));let{pathname:v="/",search:g="",hash:_="",state:x=null,key:E="default"}=a,S=reactExports.useMemo(()=>{let k=stripBasename(v,p);return k==null?null:{location:{pathname:k,search:g,hash:_,state:x,key:E},navigationType:o}},[p,v,g,_,x,E,o]);return S==null?null:reactExports.createElement(NavigationContext.Provider,{value:m},reactExports.createElement(LocationContext.Provider,{children:r,value:S}))}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 a=t[r];return n.concat(Array.isArray(a)?a.map(o=>[r,o]):[[r,a]])},[]))}function getSearchParamsForLocation(t,n){let r=createSearchParams(t);return n&&n.forEach((a,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:a,window:o}=t,u=reactExports.useRef();u.current==null&&(u.current=createBrowserHistory({window:o,v5Compat:!0}));let c=u.current,[d,p]=reactExports.useState({action:c.action,location:c.location}),{v7_startTransition:m}=a||{},v=reactExports.useCallback(g=>{m&&startTransitionImpl?startTransitionImpl(()=>p(g)):p(g)},[p,m]);return reactExports.useLayoutEffect(()=>c.listen(v),[c,v]),reactExports.useEffect(()=>logV6DeprecationWarnings(a),[a]),reactExports.createElement(Router,{basename:n,children:r,location:d.location,navigationType:d.action,navigator:c,future:a})}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),a=useLocation(),o=reactExports.useMemo(()=>getSearchParamsForLocation(a.search,r.current?null:n.current),[a.search]),u=useNavigate(),c=reactExports.useCallback((d,p)=>{const m=createSearchParams(typeof d=="function"?d(o):d);r.current=!0,u("?"+m,p)},[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,a=()=>{const u=timeouts.findIndex(c=>c.cancel==a);~u&&timeouts.splice(u,1),pendingCount-=~u?1:0},o={time:r,handler:t,cancel:a};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 a(...o){n=o,raf.onStart(r)}return a.handler=t,a.cancel=()=>{onStartQueue.delete(r),n=null},a};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,a=>a(r)&&t.add(a)),pendingCount+=t.size,n=t)}}}function eachSafely(t,n){t.forEach(r=>{try{n(r)}catch(a){raf.catch(a)}})}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 a=0;ais.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 a=r<.5?r*(1+n):r+n-r*n,o=2*r-a,u=hue2rgb(o,a,t+1/3),c=hue2rgb(o,a,t),d=hue2rgb(o,a,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,a=(n&16711680)>>>16,o=(n&65280)>>>8,u=(n&255)/255;return`rgba(${r}, ${a}, ${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 a=t,o=a.output,u=a.range||[0,1],c=a.extrapolateLeft||a.extrapolate||"extend",d=a.extrapolateRight||a.extrapolate||"extend",p=a.easing||(m=>m);return m=>{const v=findRange(m,u);return interpolate(m,u[v],u[v+1],o[v],o[v+1],p,c,d,a.map)}};function interpolate(t,n,r,a,o,u,c,d,p){let m=p?p(t):t;if(mr){if(d==="identity")return m;d==="clamp"&&(m=r)}return a===o?a:n===r?t<=n?a:o:(n===-1/0?m=-m:r===1/0?m=m-n:m=(m-n)/(r-n),m=u(m),a===-1/0?m=-m:o===1/0?m=m+a:m=m*(o-a)+a,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(a=>{callFluidObserver(a,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 a=r.size-1;a?r.delete(n):t[$observers]=null,t.observerRemoved&&t.observerRemoved(a,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 a=window.getComputedStyle(document.documentElement).getPropertyValue(n);if(a)return a.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,a]=n;return[r,a]},namedColorRegex,rgbaRound=(t,n,r,a,o)=>`rgba(${Math.round(n)}, ${Math.round(r)}, ${Math.round(a)}, ${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 p;const c=!unitRegex.test(n[0])&&((p=n.find(m=>unitRegex.test(m)))==null?void 0:p.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(...a)=>{r||(n(...a),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()})),a=reactExports.useRef(),o=a.current;let u=o;return u?n&&u.inputs&&areInputsEqual(n,u.inputs)||(u={inputs:n,result:t()}):u=r,reactExports.useEffect(()=>{a.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,a)=>{isAnimated(r)?n[a]=r.getValue(t):hasFluidValue(r)?n[a]=getFluidValue(r):t||(n[a]=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,a)=>r.setValue(t[a])).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((a,o)=>{const u=reactExports.useRef(null),c=r&&reactExports.useCallback(E=>{u.current=updateRef(o,E)},[o]),[d,p]=getAnimatedState(a,n),m=useForceUpdate(),v=()=>{const E=u.current;if(r&&!E)return;(E?n.applyAnimatedValues(E,d.getValue(!0)):!1)===!1&&m()},g=new PropsObserver(v,p),_=reactExports.useRef();useIsomorphicLayoutEffect(()=>(_.current=g,each(p,E=>addFluidObserver(E,g)),()=>{_.current&&(each(_.current.deps,E=>removeFluidObserver(E,_.current)),raf.cancel(_.current.update))})),reactExports.useEffect(v,[]),useOnce(()=>()=>{const E=_.current;each(E.deps,S=>removeFluidObserver(S,E))});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:a=o=>o}={})=>{const o={applyAnimatedValues:n,createAnimatedStyle:r,getComponentProps:a},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 a={};for(const o of r){const u=n(t[o],o);is.und(u)||(a[o]=u)}return a},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,(a,o)=>{RESERVED_PROPS[o]||(n[o]=a,r++)}),r)return n}function inferTo(t){const n=getForwardProps(t);if(n){const r={to:n};return eachProp(t,(a,o)=>o in n||(r[o]=a)),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:a,damping:o}=t;const{mass:u}=t;return is.und(a)||(a<.01&&(a=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/a,2)*u,t.friction=4*Math.PI*o*u/a),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:a,state:o,actions:u}){return new Promise((c,d)=>{let p,m,v=matchProp(r.cancel??(a==null?void 0:a.cancel),n);if(v)x();else{is.und(r.pause)||(o.paused=matchProp(r.pause,n));let E=a==null?void 0:a.pause;E!==!0&&(E=o.paused||matchProp(E,n)),p=callProp(r.delay||0,n),E?(o.resumeQueue.add(_),u.pause()):(u.resume(),_())}function g(){o.resumeQueue.add(_),o.timeouts.delete(m),m.cancel(),p=m.time-raf.now()}function _(){p>0&&!globals_exports.skipAnimation?(o.delayed=!0,m=raf.setTimeout(x,p),o.pauseQueue.add(g),o.timeouts.add(m)):x()}function x(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(g),o.timeouts.delete(m),t<=(o.cancelId||0)&&(v=!0);try{u.start({...r,callId:t,cancel:v},c)}catch(E){d(E)}}})}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,a){const{callId:o,parentId:u,onRest:c}=n,{asyncTo:d,promise:p}=r;return!u&&t===d&&!n.reset?p:r.promise=(async()=>{r.asyncId=o,r.asyncTo=t;const m=getDefaultProps(n,(k,b)=>b==="onRest"?void 0:k);let v,g;const _=new Promise((k,b)=>(v=k,g=b)),x=k=>{const b=o<=(r.cancelId||0)&&getCancelledResult(a)||o!==r.asyncId&&getFinishedResult(a,!1);if(b)throw k.result=b,g(k),k},E=(k,b)=>{const w=new BailSignal,j=new SkipAnimationSignal;return(async()=>{if(globals_exports.skipAnimation)throw stopAsync(r),j.result=getFinishedResult(a,!1),g(j),j;x(w);const C=is.obj(k)?{...k}:{...b,to:k};C.parentId=o,eachProp(m,(N,O)=>{is.und(C[O])&&(C[O]=N)});const T=await a.start(C);return x(w),r.paused&&await new Promise(N=>{r.resumeQueue.add(N)}),T})()};let S;if(globals_exports.skipAnimation)return stopAsync(r),getFinishedResult(a,!1);try{let k;is.arr(t)?k=(async b=>{for(const w of b)await E(w)})(t):k=Promise.resolve(t(E,a.stop.bind(a))),await Promise.all([k.then(v),_]),S=getFinishedResult(a.get(),!0,!1)}catch(k){if(k instanceof BailSignal)S=k.result;else if(k instanceof SkipAnimationSignal)S=k.result;else throw k}finally{o==r.asyncId&&(r.asyncId=u,r.asyncTo=u?d:void 0,r.promise=u?p:void 0)}return is.fun(c)&&raf.batchedUpdates(()=>{c(S,a,a.item)}),S})()}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 a=this.animation;let{toValues:o}=a;const{config:u}=a,c=getPayload(a.to);!c&&hasFluidValue(a.to)&&(o=toArray(getFluidValue(a.to))),a.values.forEach((m,v)=>{if(m.done)return;const g=m.constructor==AnimatedString?1:c?c[v].lastPosition:o[v];let _=a.immediate,x=g;if(!_){if(x=m.lastPosition,u.tension<=0){m.done=!0;return}let E=m.elapsedTime+=t;const S=a.fromValues[v],k=m.v0!=null?m.v0:m.v0=is.arr(u.velocity)?u.velocity[v]:u.velocity;let b;const w=u.precision||(S==g?.005:Math.min(1,Math.abs(g-S)*.001));if(is.und(u.duration))if(u.decay){const j=u.decay===!0?.998:u.decay,C=Math.exp(-(1-j)*E);x=S+k/(1-j)*(1-C),_=Math.abs(m.lastPosition-x)<=w,b=k*C}else{b=m.lastVelocity==null?k:m.lastVelocity;const j=u.restVelocity||w/10,C=u.clamp?0:u.bounce,T=!is.und(C),N=S==g?m.v0>0:Sj,!(!O&&(_=Math.abs(g-x)<=w,_)));++Q){T&&(A=x==g||x>g==N,A&&(b=-b*C,x=g));const X=-u.tension*1e-6*(x-g),$=-u.friction*.001*b,ce=(X+$)/u.mass;b=b+ce*B,x=x+b*B}}else{let j=1;u.duration>0&&(this._memoizedDuration!==u.duration&&(this._memoizedDuration=u.duration,m.durationProgress>0&&(m.elapsedTime=u.duration*m.durationProgress,E=m.elapsedTime+=t)),j=(u.progress||0)+E/this._memoizedDuration,j=j>1?1:j<0?0:j,m.durationProgress=j),x=S+u.easing(j)*(g-S),b=(x-m.lastPosition)/t,_=j==1}m.lastVelocity=b,Number.isNaN(x)&&(console.warn("Got NaN while animating:",this),_=!0)}c&&!c[v].done&&(_=!1),_?m.done=!0:n=!1,m.setValue(x,u.round)&&(r=!0)});const d=getAnimated(this),p=d.getValue();if(n){const m=getFluidValue(a.to);(p!==m||r)&&!u.decay?(d.setValue(m),this._onChange(m)):r&&u.decay&&this._onChange(p),this._stop()}else r&&this._onChange(p)}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(a=>this._update(a))).then(a=>getCombinedResult(this,a))}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:a}=t;r=is.obj(r)?r[n]:r,(r==null||isAsyncTo(r))&&(r=void 0),a=is.obj(a)?a[n]:a,a==null&&(a=void 0);const o={to:r,from:a};return hasAnimated(this)||(t.reverse&&([r,a]=[a,r]),a=getFluidValue(a),is.und(a)?getAnimated(this)||this._set(r):this._set(a)),o}_update({...t},n){const{key:r,defaultProps:a}=this;t.default&&Object.assign(a,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:a,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 a=!is.und(t.to),o=!is.und(t.from);if(a||o)if(n.callId>this._lastToId)this._lastToId=n.callId;else return r(getCancelledResult(this));const{key:u,defaultProps:c,animation:d}=this,{to:p,from:m}=d;let{to:v=p,from:g=m}=t;o&&!a&&(!n.default||is.und(v))&&(v=g),n.reverse&&([v,g]=[g,v]);const _=!isEqual(g,m);_&&(d.from=g),g=getFluidValue(g);const x=!isEqual(v,p);x&&this._focus(v);const E=isAsyncTo(n.to),{config:S}=d,{decay:k,velocity:b}=S;(a||o)&&(S.velocity=0),n.config&&!E&&mergeConfig(S,callProp(n.config,u),n.config!==c.config?callProp(c.config,u):void 0);let w=getAnimated(this);if(!w||is.und(v))return r(getFinishedResult(this,!0));const j=is.und(n.reset)?o&&!n.default:!is.und(g)&&matchProp(n.reset,u),C=j?g:this.get(),T=computeGoal(v),N=is.num(T)||is.arr(T)||isAnimatedString(T),O=!E&&(!N||matchProp(c.immediate||n.immediate,u));if(x){const Q=getAnimatedType(v);if(Q!==w.constructor)if(O)w=this._set(T);else throw Error(`Cannot animate between ${w.constructor.name} and ${Q.name}, as the "to" prop suggests`)}const A=w.constructor;let B=hasFluidValue(v),Z=!1;if(!B){const Q=j||!hasAnimated(this)&&_;(x||Q)&&(Z=isEqual(computeGoal(C),T),B=!Z),(!isEqual(d.immediate,O)&&!O||!isEqual(S.decay,k)||!isEqual(S.velocity,b))&&(B=!0)}if(Z&&isAnimating(this)&&(d.changed&&!j?B=!0:B||this._stop(p)),!E&&((B||hasFluidValue(p))&&(d.values=w.getPayload(),d.toValues=hasFluidValue(v)?null:A==AnimatedString?[1]:toArray(T)),d.immediate!=O&&(d.immediate=O,!O&&!j&&this._set(p)),B)){const{onRest:Q}=d;each(ACTIVE_EVENTS,$=>mergeActiveFn(this,n,$));const X=getFinishedResult(this,checkFinished(this,p));flushCalls(this._pendingCalls,X),this._pendingCalls.add(r),d.changed&&raf.batchedUpdates(()=>{var $;d.changed=!j,Q==null||Q(X,this),j?callProp(c.onRest,X):($=d.onStart)==null||$.call(d,X,this)})}j&&this._set(C),E?r(runAsync(n.to,n,this._state,this)):B?this._start():isAnimating(this)&&!x?this._pendingCalls.add(r):r(getNoopResult(C))}_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 a=getAnimated(this);if(!a||!isEqual(r,a.getValue())){const o=getAnimatedType(r);!a||a.constructor!=o?setAnimated(this,o.create(r)):a.setValue(r),a&&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 a=n?getCancelledResult(this.get()):getFinishedResult(this.get(),checkFinished(this,t??r.to));flushCalls(this._pendingCalls,a),r.changed&&(r.changed=!1,sendEvent(this,"onRest",a,this))}}};function checkFinished(t,n){const r=computeGoal(n),a=computeGoal(t.get());return isEqual(a,r)}function createLoopUpdate(t,n=t.loop,r=t.to){const a=callProp(n);if(a){const o=a!==!0&&inferTo(a),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),a=new Set;return is.obj(n)&&findDefined(n,a),is.obj(r)&&findDefined(r,a),t.keys=a.size?Array.from(a):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,a)=>r!=null&&n.add(a))}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 a,o,u,c;(o=(a=t.animation)[n])==null||o.call(a,...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,a)=>n[a]=r.get()),n}set(n){for(const r in n){const a=n[r];is.und(a)||this.springs[r].set(a)}}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 a=this.springs;each(toArray(r),o=>a[o].stop(!!n))}else stopAsync(this._state,this._lastAsyncId),this.each(a=>a.stop(!!n));return this}pause(n){if(is.und(n))this.start({pause:!0});else{const r=this.springs;each(toArray(n),a=>r[a].pause())}return this}resume(n){if(is.und(n))this.start({pause:!1});else{const r=this.springs;each(toArray(n),a=>r[a].resume())}return this}each(n){eachProp(this.springs,n)}_onFrame(){const{onStart:n,onChange:r,onRest:a}=this._events,o=this._active.size>0,u=this._changed.size>0;(o&&!this._started||u&&!this._started)&&(this._started=!0,flush(n,([p,m])=>{m.value=this.get(),p(m,this,this._item)}));const c=!o&&this._started,d=u||c&&a.size?this.get():null;u&&r.size&&flush(r,([p,m])=>{m.value=d,p(m,this,this._item)}),c&&(this._started=!1,flush(a,([p,m])=>{m.value=d,p(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:a,to:o,from:u,loop:c,onRest:d,onResolve:p}=n,m=is.obj(n.default)&&n.default;c&&(n.loop=!1),o===!1&&(n.to=null),u===!1&&(n.from=null);const v=is.arr(o)||is.fun(o)?o:void 0;v?(n.to=void 0,n.onRest=void 0,m&&(m.onRest=void 0)):each(BATCHED_EVENTS,S=>{const k=n[S];if(is.fun(k)){const b=t._events[S];n[S]=({finished:w,cancelled:j})=>{const C=b.get(k);C?(w||(C.finished=!1),j&&(C.cancelled=!0)):b.set(k,{value:null,finished:w||!1,cancelled:j||!1})},m&&(m[S]=n[S])}});const g=t._state;n.pause===!g.paused?(g.paused=n.pause,flushCalls(n.pause?g.pauseQueue:g.resumeQueue)):g.paused&&(n.pause=!0);const _=(a||Object.keys(t.springs)).map(S=>t.springs[S].start(n)),x=n.cancel===!0||getDefaultProp(n,"cancel")===!0;(v||x&&g.asyncId)&&_.push(scheduleProps(++t._lastAsyncId,{props:n,state:g,actions:{pause:noop$1,resume:noop$1,start(S,k){x?(stopAsync(g,t._lastAsyncId),k(getCancelledResult(t))):(S.onRest=d,k(runAsync(v,S,g,t)))}}})),g.paused&&await new Promise(S=>{g.resumeQueue.add(S)});const E=getCombinedResult(t,await Promise.all(_));if(c&&E.finished&&!(r&&E.noop)){const S=createLoopUpdate(n,c,o);if(S)return prepareKeys(t,[S]),flushUpdate(t,S,!0)}return p&&raf.batchedUpdates(()=>p(E,t,t.item)),E}function getSprings(t,n){const r={...t.springs};return n&&each(toArray(n),a=>{is.und(a.keys)&&(a=createUpdate(a)),is.obj(a.to)||(a={...a,to:void 0}),prepareSprings(r,a,o=>createSpring(o))}),setSprings(t,r),r}function setSprings(t,n){eachProp(n,(r,a)=>{t.springs[a]||(t.springs[a]=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,a=>{(t[a]||(t[a]=r(a)))._prepareNode(n)})}function prepareKeys(t,n){each(n,r=>{prepareSprings(t.springs,r,a=>createSpring(a,t))})}var SpringContext=({children:t,...n})=>{const r=reactExports.useContext(ctx),a=n.pause||!!r.pause,o=n.immediate||!!r.immediate;n=useMemoOne(()=>({pause:a,immediate:o}),[a,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(a){deprecateDirectCall();const o=[];return each(t,(u,c)=>{if(is.und(a))o.push(u.start());else{const d=r(a,u,c);d&&o.push(u.start(d))}}),o};n.current=t,n.add=function(a){t.includes(a)||t.push(a)},n.delete=function(a){const o=t.indexOf(a);~o&&t.splice(o,1)},n.pause=function(){return each(t,a=>a.pause(...arguments)),this},n.resume=function(){return each(t,a=>a.resume(...arguments)),this},n.set=function(a){each(t,(o,u)=>{const c=is.fun(a)?a(u,o):a;c&&o.set(c)})},n.start=function(a){const o=[];return each(t,(u,c)=>{if(is.und(a))o.push(u.start());else{const d=this._getProps(a,u,c);d&&o.push(u.start(d))}}),o},n.stop=function(){return each(t,a=>a.stop(...arguments)),this},n.update=function(a){return each(t,(o,u)=>o.update(this._getProps(a,o,u))),this};const r=function(a,o,u){return is.fun(a)?a(u,o):a};return n._getProps=r,n};function useSprings(t,n,r){const a=is.fun(n)&&n;a&&!r&&(r=[]);const o=reactExports.useMemo(()=>a||arguments.length==3?SpringRef():void 0,[]),u=reactExports.useRef(0),c=useForceUpdate(),d=reactExports.useMemo(()=>({ctrls:[],queue:[],flush(b,w){const j=getSprings(b,w);return u.current>0&&!d.queue.length&&!Object.keys(j).some(T=>!b.springs[T])?flushUpdateQueue(b,w):new Promise(T=>{setSprings(b,j),d.queue.push(()=>{T(flushUpdateQueue(b,w))}),c()})}}),[]),p=reactExports.useRef([...d.ctrls]),m=[],v=usePrev(t)||0;reactExports.useMemo(()=>{each(p.current.slice(t,v),b=>{detachRefs(b,o),b.stop(!0)}),p.current.length=t,g(v,t)},[t]),reactExports.useMemo(()=>{g(0,Math.min(v,t))},r);function g(b,w){for(let j=b;jgetSprings(b,m[w])),x=reactExports.useContext(SpringContext),E=usePrev(x),S=x!==E&&hasProps(x);useIsomorphicLayoutEffect(()=>{u.current++,d.ctrls=p.current;const{queue:b}=d;b.length&&(d.queue=[],each(b,w=>w())),each(p.current,(w,j)=>{o==null||o.add(w),S&&w.start({default:x});const C=m[j];C&&(replaceRef(w,C.ref),w.ref?w.queue.push(C):w.start(C))})}),useOnce(()=>()=>{each(d.ctrls,b=>b.stop(!0))});const k=_.map(b=>({...b}));return o?[k,o]:k}function useSpring(t,n){const r=is.fun(t),[[a],o]=useSprings(1,r?t:[t],r?[]:n);return r||arguments.length==2?[a,o]:a}function useTrail(t,n,r){const a=is.fun(n)&&n;a&&!r&&(r=[]);let o=!0,u;const c=useSprings(t,(d,p)=>{const m=a?a(d,p):n;return u=m.ref,o=o&&m.reverse,m},r||[{}]);if(useIsomorphicLayoutEffect(()=>{each(c[1].current,(d,p)=>{const m=c[1].current[p+(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),a||arguments.length==3){const d=u??c[1];return d._getProps=(p,m,v)=>{const g=is.fun(p)?p(v,m):p;if(g){const _=d.current[v+(g.reverse?1:-1)];return _&&(g.to=_.springs),g}},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(),a=getAnimatedType(r);setAnimated(this,a.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:a,style:o,children:u,scrollTop:c,scrollLeft:d,viewBox:p,...m}=n,v=Object.values(m),g=Object.keys(m).map(_=>r||t.hasAttribute(_)?_:attributeCache[_]||(attributeCache[_]=_.replace(/([A-Z])/g,x=>"-"+x.toLowerCase())));u!==void 0&&(t.textContent=u);for(const _ in o)if(o.hasOwnProperty(_)){const x=dangerousStyleValue(_,o[_]);isCustomPropRE.test(_)?t.style.setProperty(_,x):t.style[_]=x}g.forEach((_,x)=>{t.setAttribute(_,v[x])}),a!==void 0&&(t.className=a),c!==void 0&&(t.scrollTop=c),d!==void 0&&(t.scrollLeft=d),p!==void 0&&t.setAttribute("viewBox",p)}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,...a}){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(a,(c,d)=>{if(d==="transform")o.push([c||""]),u.push(p=>[p,p===""]);else if(domTransforms.test(d)){if(delete a[d],is.und(c))return;const p=pxTransforms.test(d)?"px":degTransforms.test(d)?"deg":"";o.push(toArray(c)),u.push(d==="rotate3d"?([m,v,g,_])=>[`rotate3d(${m},${v},${g},${addUnit(_,p)})`,isValueIdentity(_,0)]:m=>[`${d}(${m.map(v=>addUnit(v,p)).join(",")})`,isValueIdentity(m,d.startsWith("scale")?1:0)])}}),o.length&&(a.transform=new FluidTransform(o,u)),super(a)}},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,a)=>{const o=getFluidValue(r[0]),[u,c]=this.transforms[a](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,a=.15){return a===0?clamp(t,n,r):tr?+rubberband(t-r,r-n,a)+r:t}function computeRubberband(t,[n,r],[a,o]){const[[u,c],[d,p]]=t;return[rubberbandIfOutOfBounds(n,u,c,a),rubberbandIfOutOfBounds(r,d,p,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 a=Object.getOwnPropertySymbols(t);n&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,a)}return r}function _objectSpread2(t){for(var n=1;n{var r,a;return n.target===t.currentTarget||((r=t.currentTarget)===null||r===void 0||(a=r.contains)===null||a===void 0?void 0:a.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:a,scrollY:o,scrollLeft:u,scrollTop:c}=t.currentTarget;return[(n=a??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:a,metaKey:o,ctrlKey:u}=t;Object.assign(n,{shiftKey:r,altKey:a,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,a){this.ctrl=n,this.args=r,this.key=a,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:a,args:o}=this;r[a]=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,a=this.config;r._active||(this.reset(),this.computeInitial(),r._active=!0,r.target=n.target,r.currentTarget=n.currentTarget,r.lastOffset=a.from?call(a.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:a,shared:o}=this;r.args=this.args;let u=0;if(n&&(r.event=n,a.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 E=r._delta.map(Math.abs);V.addTo(r._distance,E)}const[c,d]=r._movement,[p,m]=a.threshold,{_step:v,values:g}=r;if(a.hasCustomTransform?(v[0]===!1&&(v[0]=Math.abs(c)>=p&&g[0]),v[1]===!1&&(v[1]=Math.abs(d)>=m&&g[1])):(v[0]===!1&&(v[0]=Math.abs(c)>=p&&Math.sign(c)*p),v[1]===!1&&(v[1]=Math.abs(d)>=m&&Math.sign(d)*m)),r.intentional=v[0]!==!1||v[1]!==!1,!r.intentional)return;const _=[0,0];if(a.hasCustomTransform){const[E,S]=g;_[0]=v[0]!==!1?E-v[0]:0,_[1]=v[1]!==!1?S-v[1]:0}else _[0]=v[0]!==!1?c-v[0]:0,_[1]=v[1]!==!1?d-v[1]:0;if(this.intent&&this.intent(_),(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 a&&(r._bounds=call(a.bounds,r)),this.setup&&this.setup()),r.movement=_;const E=r.offset;if(this.computeOffset(),!r.last||u>BEFORE_LAST_KINEMATICS_DELAY){r.delta=V.sub(r.offset,E);const S=r.delta.map(Math.abs);V.addTo(r.distance,S),r.direction=r.delta.map(Math.sign),!r.first&&u>0&&(r.velocity=[S[0]/u,S[1]/u])}}const x=r._active?a.rubberband||[0,0]:[0,0];r.offset=computeRubberband(r._bounds,r.offset,x),this.computeMovement()}emit(){const n=this.state,r=this.shared,a=this.config;if(n._active||this.clean(),(n._blocked||!n.intentional)&&!n._force&&!a.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 a=t||r.shared.transform;return this.hasCustomTransform=!!a,a||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:a=-1/0,bottom:o=1/0}=t;return[[n,r],[a,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(),a=n.currentTarget.getBoundingClientRect(),o={left:r.left-a.left+n.offset[0],right:r.right-a.right+n.offset[0],top:r.top-a.top+n.offset[1],bottom:r.bottom-a.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,a=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),!a._pointerActive&&(this.start(n),this.setupPointer(n),a._pointerId=pointerId(n),a._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,a=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(a.preventScroll&&!r._preventScroll)if(r.axis)if(r.axis===a.preventScrollAxis||a.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,a=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&&a.filterTaps)r._force=!0;else{const[d,p]=r.direction,[m,v]=r.velocity,[g,_]=r.movement,[x,E]=a.swipe.velocity,[S,k]=a.swipe.distance,b=a.swipe.duration;r.elapsedTimex&&Math.abs(g)>S&&(r.swipe[0]=d),Math.abs(v)>E&&Math.abs(_)>k&&(r.swipe[1]=p))}this.emit()}pointerClick(n){this.state.tap||(n.preventDefault(),n.stopPropagation())}setupPointer(n){const r=this.config;let a=r.device;r.pointerLock&&n.currentTarget.requestPointerLock(),r.pointerCapture||(this.eventStore.add(this.sharedConfig.window,a,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,a,"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 a=this.state,o=n.shiftKey?10:n.altKey?.1:1;a._delta=r(o),this.start(n),a._keyboardActive=!0,V.addTo(a._movement,a._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:a=!1}={}}){return this.useTouch=SUPPORT.touch&&a,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:a=1}={}}){return this.pointerButtons=a,!this.pointerLock&&this.device==="pointer"&&r},threshold(t,n,{filterTaps:r=!1,axis:a=void 0}){const o=V.toVector(t,r?3:a?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:a={}}){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(a,c),{min:-1/0,max:1/0});return[d.min,d.max]};return typeof r!="function"&&typeof a!="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,a=scrollValues(n);r._delta=V.sub(a,r._values),V.addTo(r._movement,r._delta),this.computeValues(a),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={},a=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),a,o;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(r[a]=t[a])}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[a,o]of Object.entries(n))switch(typeof o){case"function":r[a]=o.call(r,t[a],a,t);break;case"object":r[a]=resolveWith(t[a],o);break;case"boolean":o&&(r[a]=t[a]);break}return r}function parse(t,n){const r=t,{target:a,eventOptions:o,window:u,enabled:c,transform:d}=r,p=_objectWithoutProperties(r,_excluded),m={shared:resolveWith({target:a,eventOptions:o,window:u,enabled:c,transform:d},sharedConfigResolver)};if(n){const v=ConfigResolverMap.get(n);m[n]=resolveWith(_objectSpread2({shared:m.shared},p),v)}else for(const v in p){const g=ConfigResolverMap.get(v);g&&(m[v]=resolveWith(_objectSpread2({shared:m.shared},p[v]),g))}return m}class EventStore{constructor(n){_defineProperty(this,"_listeners",[]),this._ctrl=n}add(n,r,a,o,u){const c=toDomEventType(r,a),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,a=140,...o){this.remove(n),this._timeouts.set(n,window.setTimeout(r,a,...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,a=r.eventOptions,o={};let u;if(r.target&&(u=r.target(),!u))return;const c=bindToProps(o,a,!!u);if(r.enabled){for(const d of this.gestures)if(this.config[d].enabled){const p=EngineMap.get(d);new p(this,n,d).bind(c)}for(const d in this.nativeHandlers)c(d,"",p=>this.nativeHandlers[d](_objectSpread2(_objectSpread2({},this.state.shared),{},{event:p,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 p=d.substr(2).toLowerCase();const m=!!~p.indexOf("capture"),v=!!~p.indexOf("passive");(m||v)&&(p=p.replace(/capture|passive/g,"")),this._targetEventStore.add(u,p,"",o[d],{capture:m,passive:v})}}}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)=>(a,o,u,c={},d=!1)=>{var p,m;const v=(p=c.capture)!==null&&p!==void 0?p:n.capture,g=(m=c.passive)!==null&&m!==void 0?m:n.passive;let _=d?a:toHandlerProp(a,o,v);r&&g&&(_+="Passive"),t[_]=t[_]||[],t[_].push(u)};function useRecognizers(t,n={},r,a){const o=React.useMemo(()=>new Controller(t),[]);if(o.applyHandlers(t,a),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:a,onClick:o,onDoubleClick:u,onTripleClick:c,onKeyDown:d,children:p,showControls:m=!0,controlsColor:v="text-gray-800",background:g="contain",..._})=>{var N;const x=reactExports.useRef(null),[E,S]=reactExports.useState(!1),k=useWindowSize().width,b=((N=x.current)==null?void 0:N.clientWidth)||k;reactExports.useEffect(()=>{a(clamp$1(n,0,t.length-1))},[n,a,t]);const[w,j]=useSprings(t.length,O=>({x:(O-n)*b,scale:1}),[b,k,n]),C=useDrag(({active:O,movement:[A],direction:[B],cancel:Z})=>{O&&Math.abs(A)>b/4&&(S(!1),a(n+(B>0?-1:1)),Z()),j.start(Q=>{S(!0);const X=(Q-n)*b+(O?A:0),$=O?1-Math.abs(A)/b:1;return{x:X,scale:$}})},{threshold:5}),T=O=>{O.key=="ArrowLeft"?a(n-1):O.key=="ArrowRight"&&a(n+1),d&&d(O)};return jsxRuntimeExports.jsxs("div",{ref:x,className:cn("relative h-full w-full cursor-move",r),onKeyDown:T,onClick:O=>O.detail===3&&c&&c(O),tabIndex:0,..._,children:[!isTouchDevice()&&jsxRuntimeExports.jsx("input",{onKeyDown:T,className:"m-0 block h-0 cursor-default border-none p-0 opacity-0"}),g==="backdrop"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w.map(({x:O},A)=>{var B;return jsxRuntimeExports.jsx(animated.div,{className:"no-supports-backdrop:hidden absolute inset-0 bg-cover bg-center",style:{x:O.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"})]}),w.map(({x:O,scale:A},B)=>{var Z;return reactExports.createElement(animated.div,{className:"absolute h-full w-full touch-none",...C(),key:getKey(t,B),style:{x:O}},jsxRuntimeExports.jsx(animated.div,{onClick:Q=>!E&&o&&o(Q),onMouseUp:Q=>{setTimeout(()=>S(!1),0)},onDoubleClick:u,className:cn("absolute inset-0 touch-none bg-center bg-no-repeat",g==="cover"?"bg-cover":"bg-contain"),style:{scale:A,backgroundImage:`url(${imageUrl(t[B])})`},role:"img","aria-label":((Z=t[B])==null?void 0:Z.altText)??void 0}))}),jsxRuntimeExports.jsx("div",{className:"contents",onClick:O=>{O.stopPropagation(),O.preventDefault(),O.nativeEvent.stopImmediatePropagation()},children:m&&t.length>1&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ChangeSlide,{className:"left-0",onClick:O=>a(n-1),color:v,children:jsxRuntimeExports.jsx(Caret,{className:"rotate-90"})}),jsxRuntimeExports.jsx("div",{className:`absolute bottom-4 z-10 w-full space-x-2 text-center ${v}`,children:t.map((O,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:()=>a(A)},getKey(t,A)))}),jsxRuntimeExports.jsx(ChangeSlide,{className:"right-0",onClick:O=>a(n+1),color:v,children:jsxRuntimeExports.jsx(Caret,{className:"-rotate-90"})})]})}),p]})};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:a,cover:o=a[0],preloadedImages:u=[],...c})=>{const d=o.id!==a[0].id?[o,...a]:a,[p,m]=reactExports.useState(null),[v,g]=reactExports.useState(0),_=S=>g(S>=d.length?0:S<0?d.length-1:S);reactExports.useEffect(()=>g(0),[o.url]);const x=useDominantColor(d[v].url,{height:400,width:100,crop:"bottom"}),E="cursor-pointer overflow-hidden";return o===void 0?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[n=="inline"||n=="both"?jsxRuntimeExports.jsx(Slideshow,{...c,className:cn(E,t),onClick:S=>_(v+1),onUpdate:_,index:v,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:S=>{S.stopPropagation(),m(v)}})}):jsxRuntimeExports.jsxs("div",{...c,className:cn(E,"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:S=>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((S,k)=>n=="dialog"&&k===0?null:jsxRuntimeExports.jsx("button",{className:"button h-[5rem] rounded bg-cover bg-center",style:{backgroundImage:`url(${imageUrl(S,100)})`},title:S.altText||void 0,onClick:b=>n=="dialog"?m(k):_(k)},k))}),jsxRuntimeExports.jsx(Portal,{open:p!==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:p,images:d,onKeyDown:S=>S.key=="Escape"&&m(null),onUpdate:S=>{_(S),m(S)},onTripleClick:S=>m(null),children:jsxRuntimeExports.jsx(Button,{className:"absolute right-8 top-8 z-10 h-16 w-16 leading-none",onClick:S=>m(null),children:jsxRuntimeExports.jsx(Close,{})})})})})}),u.map((S,k)=>jsxRuntimeExports.jsx("img",{className:"absolute hidden",src:imageUrl(S)},k))]})},Image=({src:t,loading:n="lazy",dimensions:r="responsive",...a})=>{const o=reactExports.useRef(null),[u,c]=reactExports.useState();return reactExports.useLayoutEffect(()=>{if(o.current===null)return;const d=1.2*window.devicePixelRatio,p=o.current;switch(r){case"responsive":p.clientWidth>30&&p.clientHeight>30?c({height:p.clientHeight*d,width:p.clientWidth*d,crop:"center"}):c(p.clientHeight>30?{height:p.clientHeight*d}:{width:p.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,...a})},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,...a})=>(a.tag||(a.tag="section"),t?jsxRuntimeExports.jsx(a.tag,{className:n,...a,children:a.children}):jsxRuntimeExports.jsx(a.tag,{className:r,...a,children:jsxRuntimeExports.jsx("div",{className:cn("page-width",n),children:a.children})}));function attributesToProps(t){if(!t)return{};const n=t.trim().split(" ").map(r=>r.split("=").map(a=>a.replaceAll('"',"").replaceAll(""",'"')));return Object.fromEntries(n)}const Articles=({section:t})=>{var r,a,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)),((a=t.blogs)==null?void 0:a.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 a=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:a==null?void 0:a.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:a,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",a),...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 t=useQuery(["blogs"],()=>shopifyFetch(BlogsDocument,{})),n=useTranslations("react.blogs"),[r,a]=reactExports.useState(""),[o,u]=reactExports.useState(""),c=reactExports.useMemo(()=>{var p,m;return(p=t.data)!=null&&p.errors?[]:((m=t.data)==null?void 0:m.data)??[]},[t]),d=reactExports.useMemo(()=>c==null?void 0:c.flatMap(p=>p.articles.map(m=>({...m,blog:p}))).filter(p=>{var v;const m=r.toLowerCase();return p.title.toLowerCase().includes(m)||p.blog.title.toLowerCase().includes(m)||((v=p.content)==null?void 0:v.toLowerCase().includes(m))}).sort((p,m)=>o==="oldest"?new Date(p.publishedAt).getTime()-new Date(m.publishedAt).getTime():new Date(m.publishedAt).getTime()-new Date(p.publishedAt).getTime()),[c,r,o]);return c?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:c.map(p=>jsxRuntimeExports.jsx(Button,{href:`${window.Shopify.routes.root}blogs/${p.handle}`,className:"px-4 py-2 text-2xl sm:px-10 sm:py-4 sm:text-3xl",children:p.title},p.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:a,className:"!rounded-md !border !border-gray-300 !py-2 px-4",containerClassName:"w-full"}),jsxRuntimeExports.jsxs("select",{name:"sort",value:o,onChange:p=>u(p.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})]})]}),d.length===0?jsxRuntimeExports.jsx("p",{className:"text-center",children:n==null?void 0:n.no_articles}):jsxRuntimeExports.jsx(ArticleGrid,{children:d.map(p=>jsxRuntimeExports.jsx(ArticleCard,{article:p,blog:p.blog},p.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,...a},blocks:o}})=>{const u=useSelector(p=>p.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:`${a.size_top}rem`,paddingBottom:`${a.size_bottom}rem`,backgroundColor:a.background_color,color:a.text_color},children:[jsxRuntimeExports.jsx(Title$1,{className:"max-sm:text-center",children:a.title}),jsxRuntimeExports.jsx("div",{className:"text-16 self-start sm:row-start-2",dangerouslySetInnerHTML:{__html:a.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(([p,m],v)=>{const g=u==null?void 0:u.find(x=>x.handle===m);if(!g)return null;const _={title:a[`${p}_title`]||g.title,subtitle:a[`${p}_subtitle`],label:a[`${p}_label`],image:a[`${p}_image`]||g.featuredImage,titleLabel:a[`${p}_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":v===0,"col-start-2 col-end-4 max-sm:ml-[30%] sm:col-start-3":v===1}),role:"columnheader","aria-rowindex":v+2,children:[_.label&&jsxRuntimeExports.jsx("div",{className:"absolute -top-2 flex w-full items-center justify-center",children:jsxRuntimeExports.jsx(Badge$1,{children:_.label})}),_.image&&jsxRuntimeExports.jsx(Image,{className:"aspect-[11/9] w-full rounded-3xl object-cover",src:_.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:_.title}),_.titleLabel&&jsxRuntimeExports.jsx(Badge$1,{children:_.titleLabel})]}),jsxRuntimeExports.jsx("h4",{className:"sm:text-18 text-lg font-bold",children:_.subtitle}),jsxRuntimeExports.jsxs("p",{className:"sm:text-16 text-base italic",children:[d==null?void 0:d.checkout.from," ",jsxRuntimeExports.jsx(Price,{price:g.priceRange.minVariantPrice,asText:!0})]})]},v)}),o.map((p,m)=>jsxRuntimeExports.jsxs(reactExports.Fragment,{children:["title"in p.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:p.settings.title})]}),objectEntries({option_a:p.settings.option_a,option_b:p.settings.option_b}).map(([v,g],_)=>jsxRuntimeExports.jsx("div",{className:cn("flex flex-col items-center justify-center space-y-4",{"col-start-1 sm:col-start-2":_===0,"col-start-3 sm:col-start-3":_===1,"max-sm:col-start-1 max-sm:col-end-3 max-sm:mr-[30%]":_===0&&includes(p.type,"comparison_image","comparison_cta"),"max-sm:col-start-2 max-sm:col-end-4 max-sm:ml-[30%]":_===1&&includes(p.type,"comparison_image","comparison_cta"),"max-sm:mt-8":p.type==="comparison_image"}),style:{gridRow:m*2+(p.type==="comparison_cta"?1:2)},"aria-rowindex":m+1,"aria-colindex":_+2,role:"cell",children:typeof g=="boolean"?g?jsxRuntimeExports.jsx(Checkbox,{className:"h-7 text-green-700","aria-label":"Yes"}):jsxRuntimeExports.jsx("span",{children:"No"}):p.type==="comparison_image"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"w-44 text-base font-semibold text-green-700",children:g}),jsxRuntimeExports.jsx(Image,{className:"aspect-[11/9] w-full rounded-3xl object-cover",src:p.settings[`${v}_image`]})]}):p.type==="comparison_cta"?jsxRuntimeExports.jsx(Button,{className:"rounded-full bg-[#3FAF6D] text-base font-semibold",href:g||productUrl(v.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:g})},v))]},p.id))]})]})},Collapsible=({title:t,className:n,summaryClassname:r,children:a,...o})=>{const[u,c]=reactExports.useState(!0),[d,p]=reactExports.useState(!1),[m,v]=reactExports.useState(0),g=reactExports.useRef(null),_=animated(Caret);reactExports.useLayoutEffect(()=>{c(!1);const b=range(0,20).map(w=>setTimeout(()=>{var j;v(((j=g.current)==null?void 0:j.scrollHeight)||1)},w*200));return()=>{b.map(clearTimeout)}},[]),reactExports.useLayoutEffect(()=>{c(!1)},[a]);const[{height:x,rotate:E},S]=useSpring(()=>({height:0,rotate:0,onRest:{height:b=>{p(!1),b.value===0&&c(!1)}}})),k=b=>{b.preventDefault(),u||c(!0),S.start(x.goal==0?{height:m,rotate:-180}:{height:0,rotate:0}),p(!0)};return jsxRuntimeExports.jsxs("div",{"aria-expanded":u,role:"dialog","aria-modal":!0,onClick:b=>b.preventDefault(),className:cn(n,"overflow-hidden"),"aria-busy":d,...o,children:[jsxRuntimeExports.jsxs("div",{role:"button",onClick:k,className:cn("hocus:opacity-60 cursor-pointer select-none leading-none focus-visible:opacity-60",r),children:[t,jsxRuntimeExports.jsx(_,{className:"ml-2 align-middle",style:{rotate:E}})]}),jsxRuntimeExports.jsx(animated.div,{style:{height:x},children:jsxRuntimeExports.jsx("div",{ref:g,className:"overflow-visible",children:a})})]})},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 a=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:a,quantity:t.quantity}),children:jsxRuntimeExports.jsx("p",{className:"text-xl",dangerouslySetInnerHTML:{__html:t.description}})}):jsxRuntimeExports.jsx(BoxTitle,{title:a,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,p,m;const n=(c=useSelector(v=>v.cart.lines))==null?void 0:c.map(v=>{var g,_;return(_=(g=v==null?void 0:v.merchandise)==null?void 0:g.product)==null?void 0:_.handle}),r=(d=useSelector(v=>v.cart.stagedUpsells))==null?void 0:d.map(v=>{var g;return(g=v.product)==null?void 0:g.handle}),a=[n,r].flat().filter(isPresent),o=useSelector(v=>v.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":(((p=t.blocks)==null?void 0:p.length)??0)>6}),children:(m=t.blocks)==null?void 0:m.map(({id:v,settings:g,attributes:_})=>{const x=o==null?void 0:o.find(S=>S.handle===g.product),E=isInCart(a,g);return t.settings.only_added&&!E?null:jsxRuntimeExports.jsx(BoxItem,{item:g,product:x,inCart:E,...attributesToProps(_)},v)})}),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:a="scroll-m-2",scrollDistance:o="page",...u})=>{var j;const[c,d]=reactExports.useState(0),[p,m]=reactExports.useState(!0),v=useWindowSize(),[g,_]=reactExports.useState(1),x=reactExports.useRef(null),[E,S]=reactExports.useState(null),k=(((j=x.current)==null?void 0:j.offsetWidth)??1)/((E==null?void 0:E.scrollWidth)??1),b=reactExports.useCallback(C=>{if(C===null)return;S(C),m(C.scrollWidth>v.width);const T=Array.from(C.children).findIndex(N=>N.offsetLeft+.88*N.scrollWidth>=C.offsetWidth);_(T)},[v.width]);reactExports.useLayoutEffect(()=>{if(E===null)return;const C=throttle(async()=>{let T=0;switch(r){case"snap-end":case"snap-start":for(let N=0;N=B&&(T=N)}break;case"snap-center":case void 0:T=E.scrollLeft/(E.scrollWidth-E.offsetWidth)*(n.length-1),T=Math.round(T);break}d(clamp$1(T,0,n.length-1))},1e3/144);return E.addEventListener("scroll",C,{passive:!0}),()=>E.removeEventListener("scroll",C)},[E,v.width,r,n,k]);function w(C,T){var A;if(E===null)return C;const N=E.children.length-1;C=clamp$1(C,0,N);let O;switch(T){case"snap-start":O=(A=E.children[C])==null?void 0:A.offsetLeft;break;case"snap-end":O=C*(E.scrollWidth-E.offsetWidth)/N;break;case"snap-center":case void 0:O=C*(E.scrollWidth-E.offsetWidth)/N;break}return E.scrollTo({left:O,behavior:"smooth"}),C}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":!p},t),ref:b,...u,children:n.map((C,T)=>jsxRuntimeExports.jsx(CarouselItem,{className:classnames(r,a,"select-none"),children:C},T))}),p&&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:C=>w(c-(o==="single"?1:g),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(C=>jsxRuntimeExports.jsx("button",{className:cn("button h-4 rounded-full border-current text-inherit","hover:bg-current hover:drop-shadow",C>=c&&Cw(C,r)},C))}),jsxRuntimeExports.jsx(ChangeSlide,{className:"flex-min static flex items-center rounded p-4",onClick:C=>w(c+(o==="single"?1:g),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:a,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:a.image,dimensions:"responsive"}),t.settings.show_score&&jsxRuntimeExports.jsx(Stars,{rating:a.rating,className:"!mt-7"}),a.title&&jsxRuntimeExports.jsx("h3",{className:"text-3xl font-bold",children:a.title}),(a.body.toString().length>5||a.author)&&jsxRuntimeExports.jsx("p",{className:"flex-auto text-2xl",dangerouslySetInnerHTML:{__html:a.body}}),a.author&&jsxRuntimeExports.jsxs("p",{className:"text-14 space-x-2",children:[jsxRuntimeExports.jsx("span",{children:a.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:a,children:o,...u})=>{const[{total:c,...d},p]=reactExports.useState(diffDates(new Date,t));reactExports.useEffect(()=>{const g=setInterval(()=>{p(diffDates(new Date,t))},999);return()=>clearInterval(g)},[t]);const m=useTranslations("react.units"),v=objectKeys(d).findIndex(g=>g===n);return c<=0?null:jsxRuntimeExports.jsxs("span",{className:cn("m-0 rounded-2xl text-[1.25em] font-semibold",r),...u,children:[o,objectEntries({...d}).filter((g,_)=>v>=0?_<=v:!0).map(([g,_])=>jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:_}),jsxRuntimeExports.jsx("span",{className:"text-e7/8",children:m==null?void 0:m[`${g}_short`]}),jsxRuntimeExports.jsx("span",{className:cn("mx-1 last:hidden",a),children:":"})]},g))]})},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:a,children:o})=>{var m;const u=useTranslations("react"),[c,d]=reactExports.useState(!1),p=((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",p?"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":p},a),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"},p?"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:a,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:a})]})}),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})=>{var d,p;const n=useDispatch(),r=useTranslations("react"),a=useQuery(["products"],async()=>shopifyFetch(ProductsDocument,{})).data,o=useFreeShippingThreshold(),u=a==null?void 0:a.data,c=(u==null?void 0:u.filter(isGiftCard))??[];return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[(d=a==null?void 0:a.errors)!=null&&d.length?jsxRuntimeExports.jsx("div",{className:"bg-red color-white p-4",children:(p=a.errors)==null?void 0:p.map((m,v)=>jsxRuntimeExports.jsx("p",{children:m.message},v))}):null,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(o,!0)]}),jsxRuntimeExports.jsx(List,{children:u==null?void 0:u.filter(isAccessory).sort(sortProducts(t.settings.sort)).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))})]}),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:u==null?void 0:u.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:v=>{var g;return n(Actions$1.addToCart([{quantity:1,id:(g=m.variants[0])==null?void 0:g.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,p,m,v;const n=useDispatch(),r=useTranslations("react"),a=useQuery(["products"],async()=>shopifyFetch(ProductsDocument,{})).data,o=(d=useQuery(["collection",t.settings.collection],async()=>shopifyFetch(CollectionDocument,{handle:t.settings.collection})).data)==null?void 0:d.data,u=(m=(p=o==null?void 0:o.products)==null?void 0:p.map(g=>g.id))==null?void 0:m.filter(g=>gidToId(g)!==getCurrentPageProductId()),c=(v=a==null?void 0:a.data)==null?void 0:v.filter(g=>u==null?void 0:u.includes(g.id)).sort(sortProducts(t.settings.sort));return 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(g=>jsxRuntimeExports.jsx(ProductCard.Container,{product:g,size:t.settings.size,children:jsxRuntimeExports.jsxs(ProductCard.Actions,{children:[jsxRuntimeExports.jsx(ProductCard.Action,{size:"xs",href:productUrl(g),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:_=>{var x;return n(Actions$1.addToCart([{quantity:1,id:(x=g.variants[0])==null?void 0:x.id}]))},children:"+"})]})},g.id))})})})},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 p;return{...d.products,products:(p=d.products.products)==null?void 0:p.filter(m=>{var v;return gidToId((v=m.variants[0])==null?void 0:v.id)!=getCurrentPageProductId()}).filter(m=>m.availableForSale)}}),r=useTranslations("react"),a=useDispatch();return reactExports.useEffect(()=>{t||a(Actions$1.loadProducts())},[t,a]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"bg-red",children:n==null?void 0:n.split(` `).map((d,p)=>jsxRuntimeExports.jsx("p",{children:d},p))}),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(a=>jsxRuntimeExports.jsx(ProductCard.Container,{product:a,bg:"bg-opacity-30 bg-black",children:jsxRuntimeExports.jsx(ProductCard.Actions,{children:jsxRuntimeExports.jsx(ProductCard.Action,{href:productUrl(a),className:"px-12",children:r==null?void 0:r.actions.buy_now})})},a.id))})]})}function SeedSection({title:t,products:n}){const r=useDispatch(),a=useTranslations("react");return jsxRuntimeExports.jsxs(Section,{id:"fro",className:"pb-0",children:[jsxRuntimeExports.jsx(Title,{className:"text-5xl",children:t||(a==null?void 0:a.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:a==null?void 0:a.actions.buy_now}),jsxRuntimeExports.jsx(ProductCard.Action,{title:a==null?void 0:a.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);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))}},[]),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},a)=>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",a