vendor: 5,042 bytes, lines 1-9
1var U0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nj=U0((Jj,_d)=>{function B0(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Sd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gm={exports:{}},nl={},Km={exports:{}},pe={};/** 2* @license React 3* react.production.min.js 4* 5* Copyright (c) Facebook, Inc. and its affiliates. 6* 7* This source code is licensed under the MIT license found in the 8* LICENSE file in the root directory of this source tree. 9*/var ua=Symbol.for("react.element"),q0=Symbol.for("react.portal"),V0=Symbol.for("react.fragment"),Q0=Symbol.for("react.strict_mode"),W0=Symbol.for("react.profiler"),H0=Symbol.for("react.provider"),G0=Symbol.for("react.context"),K0=Symbol.for("react.forward_ref"),J0=Symbol.for("react.suspense"),Y0=Symbol.for("react.memo"),X0=Symbol.for("react.lazy"),ph=Symbol.iterator;function Z0(e){return e===null||typeof e!="object"?null:(e=ph&&e[ph]||e["@@iterator"],typeof e=="function"?e:null)}var Jm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ym=Object.assign,Xm={};function Ri(e,t,r){this.props=e,this.context=t,this.refs=Xm,this.updater=r||Jm}Ri.prototype.isReactComponent={},Ri.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")},Ri.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zm(){}Zm.prototype=Ri.prototype;function Ed(e,t,r){this.props=e,this.context=t,this.refs=Xm,this.updater=r||Jm}var kd=Ed.prototype=new Zm;kd.constructor=Ed,Ym(kd,Ri.prototype),kd.isPureReactComponent=!0;var mh=Array.isArray,eg=Object.prototype.hasOwnProperty,Cd={current:null},tg={key:!0,ref:!0,__self:!0,__source:!0};function rg(e,t,r){var n,i={},s=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)eg.call(t,n)&&!tg.hasOwnProperty(n)&&(i[n]=t[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var l=Array(o),c=0;c<o;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:ua,type:e,key:s,ref:a,props:i,_owner:Cd.current}}function eb(e,t){return{$$typeof:ua,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Nd(e){return typeof e=="object"&&e!==null&&e.$$typeof===ua}function tb(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var gh=/\/+/g;function Xl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tb(""+e.key):t.toString(36)}function Xa(e,t,r,n,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ua:case q0:a=!0}}if(a)return a=e,i=i(a),e=n===""?"."+Xl(a,0):n,mh(i)?(r="",e!=null&&(r=e.replace(gh,"$&/")+"/"),Xa(i,t,r,"",function(c){return c})):i!=null&&(Nd(i)&&(i=eb(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(gh,"$&/")+"/")+e)),t.push(i)),1;if(a=0,n=n===""?".":n+":",mh(e))for(var o=0;o<e.length;o++){s=e[o];var l=n+Xl(s,o);a+=Xa(s,t,r,l,i)}else if(l=Z0(e),typeof l=="function")for(e=l.call(e),o=0;!(s=e.next()).done;)s=s.value,l=n+Xl(s,o++),a+=Xa(s,t,r,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Ta(e,t,r){if(e==null)return e;var n=[],i=0;return Xa(e,n,"","",function(s){return t.call(r,s,i++)}),n}function rb(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},Za={transition:null},nb={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:Za,ReactCurrentOwner:Cd};function ng(){throw Error("act(...) is not supported in production builds of React.")}pe.Children={map:Ta,forEach:function(e,t,r){Ta(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Ta(e,function(){t++}),t},toArray:function(e){return Ta(e,function(t){return t})||[]},only:function(e){if(!Nd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},pe.Component=Ri,pe.Fragment=V0,pe.Profiler=W0,pe.PureComponent=Ed,pe.StrictMode=Q0,pe.Suspense=J0,pe.__SECRET_INT
vendor: 8,924 bytes, lines 9-33
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nb,pe.act=ng,pe.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Ym({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=Cd.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)eg.call(t,l)&&!tg.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){o=Array(l);for(var c=0;c<l;c++)o[c]=arguments[c+2];n.children=o}return{$$typeof:ua,type:e.type,key:i,ref:s,props:n,_owner:a}},pe.createContext=function(e){return e={$$typeof:G0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:H0,_context:e},e.Consumer=e},pe.createElement=rg,pe.createFactory=function(e){var t=rg.bind(null,e);return t.type=e,t},pe.createRef=function(){return{current:null}},pe.forwardRef=function(e){return{$$typeof:K0,render:e}},pe.isValidElement=Nd,pe.lazy=function(e){return{$$typeof:X0,_payload:{_status:-1,_result:e},_init:rb}},pe.memo=function(e,t){return{$$typeof:Y0,type:e,compare:t===void 0?null:t}},pe.startTransition=function(e){var t=Za.transition;Za.transition={};try{e()}finally{Za.transition=t}},pe.unstable_act=ng,pe.useCallback=function(e,t){return dt.current.useCallback(e,t)},pe.useContext=function(e){return dt.current.useContext(e)},pe.useDebugValue=function(){},pe.useDeferredValue=function(e){return dt.current.useDeferredValue(e)},pe.useEffect=function(e,t){return dt.current.useEffect(e,t)},pe.useId=function(){return dt.current.useId()},pe.useImperativeHandle=function(e,t,r){return dt.current.useImperativeHandle(e,t,r)},pe.useInsertionEffect=function(e,t){return dt.current.useInsertionEffect(e,t)},pe.useLayoutEffect=function(e,t){return dt.current.useLayoutEffect(e,t)},pe.useMemo=function(e,t){return dt.current.useMemo(e,t)},pe.useReducer=function(e,t,r){return dt.current.useReducer(e,t,r)},pe.useRef=function(e){return dt.current.useRef(e)},pe.useState=function(e){return dt.current.useState(e)},pe.useSyncExternalStore=function(e,t,r){return dt.current.useSyncExternalStore(e,t,r)},pe.useTransition=function(){return dt.current.useTransition()},pe.version="18.3.1",Km.exports=pe;var E=Km.exports;const jd=Sd(E);/** 10* @license React 11* react-jsx-runtime.production.min.js 12* 13* Copyright (c) Facebook, Inc. and its affiliates. 14* 15* This source code is licensed under the MIT license found in the 16* LICENSE file in the root directory of this source tree. 17*/var ib=E,sb=Symbol.for("react.element"),ab=Symbol.for("react.fragment"),ob=Object.prototype.hasOwnProperty,lb=ib.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cb={key:!0,ref:!0,__self:!0,__source:!0};function ig(e,t,r){var n,i={},s=null,a=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)ob.call(t,n)&&!cb.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:sb,type:e,key:s,ref:a,props:i,_owner:lb.current}}nl.Fragment=ab,nl.jsx=ig,nl.jsxs=ig,Gm.exports=nl;var d=Gm.exports,sg={exports:{}},Ct={},ag={exports:{}},og={};/** 18* @license React 19* scheduler.production.min.js 20* 21* Copyright (c) Facebook, Inc. and its affiliates. 22* 23* This source code is licensed under the MIT license found in the 24* LICENSE file in the root directory of this source tree. 25*/(function(e){function t(C,T){var j=C.length;C.push(T);e:for(;0<j;){var L=j-1>>>1,M=C[L];if(0<i(M,T))C[L]=T,C[j]=M,j=L;else break e}}function r(C){return C.length===0?null:C[0]}function n(C){if(C.length===0)return null;var T=C[0],j=C.pop();if(j!==T){C[0]=j;e:for(var L=0,M=C.length,B=M>>>1;L<B;){var z=2*(L+1)-1,X=C[z],ce=z+1,Z=C[ce];if(0>i(X,j))ce<M&&0>i(Z,X)?(C[L]=Z,C[ce]=j,L=ce):(C[L]=X,C[z]=j,L=z);else if(ce<M&&0>i(Z,j))C[L]=Z,C[ce]=j,L=ce;else break e}}return T}function i(C,T){var j=C.sortIndex-T.sortIndex;return j!==0?j:C.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],c=[],u=1,f=null,h=3,v=!1,y=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(C){for(var T=r(c);T!==null;){if(T.callback===null)n(c);else if(T.startTime<=C)n(c),T.sortIndex=T.expirationTime,t(l,T);else break;T=r(c)}}function b(C){if(w=!1,m(C),!y)if(r(l)!==null)y=!0,A(_);else{var T=r(c);T!==null&&D(b,T.startTime-C)}}function _(C,T){y=!1,w&&(w=!1,p(N),N=-1),v=!0;var j=h;try{for(m(T),f=r(l);f!==null&&(!(f.expirationTime>T)||C&&!H());){var L=f.callback;if(typeof L=="function"){f.callback=null,h=f.priorityLevel;var M=L(f.expirationTime<=T);T=e.unstable_now(),typeof M=="function"?f.callback=M:f===r(l)&&n(l),m(T)}else n(l);f=r(l)}if(f!==null)var B=!0;else{var z=r(c);z!==null&&D(b,z.startTime-T),B=!1}return B}finally{f=null,h=j,v=!1}}var S=!1,k=null,N=-1,R=5,P=-1;function H(){return!(e.unstable_now()-P<R)}function G(){if(k!==null){var C=e.unstable_now();P=C;var T=!0;try{T=k(!0,C)}finally{T?Q():(S=!1,k=null)}}else S=!1}var Q;if(typeof g=="function")Q=function(){g(G)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,V=U.port2;U.port1.onmessage=G,Q=function(){V.postMessage(null)}}else Q=function(){x(G,0)};function A(C){k=C,S||(S=!0,Q())}function D(C,T){N=x(function(){C(e.unstable_now())},T)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){y||v||(y=!0,A(_))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(C){switch(h){case 1:case 2:case 3:var T=3;break;default:T=h}var j=h;h=T;try{return C()}finally{h=j}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,T){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var j=h;h=C;try{return T()}finally{h=j}},e.unstable_scheduleCallback=function(C,T,j){var L=e.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?L+j:L):j=L,C){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=j+M,C={id:u++,callback:T,priorityLevel:C,startTime:j,expirationTime:M,sortIndex:-1},j>L?(C.sortIndex=j,t(c,C),r(l)===null&&C===r(c)&&(w?(p(N),N=-1):w=!0,D(b,j-L))):(C.sortIndex=M,t(l,C),y||v||(y=!0,A(_))),C},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(C){var T=h;return function(){var j=h;h=T;try{return C.apply(this,arguments)}finally{h=j}}}})(og),ag.exports=og;var ub=ag.exports;/** 26* @license React 27* react-dom.production.min.js 28* 29* Copyright (c) Facebook, Inc. and its affiliates. 30* 31* This source code is licensed under the MIT license found in the 32* LICENSE file in the root directory of this source tree. 33*/var db=E,Et=ub;function Y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var lg=new Set,Ds={};function Rn(e,t){yi(e,t),yi(e+"Capture",t)}function yi(e,t){for(Ds[e]=t,e=0;e<t.length;e++)lg.add(t[e])}var mr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wc=Object.prototype.hasOwnProperty,fb=/^[: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]*$/,vh={},yh={};function hb(e){return Wc.call(yh,e)?!0:Wc.call(vh,e)?!1:fb.test(e)?yh[e]=!0:(vh[e]=!0,!1)}function pb(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mb(e,t,r,n){if(t===null||typeof t>"u"||pb(e,t,r,n))return!0;
vendor: 11,934 bytes, lines 33-37
33if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ft(e,t,r,n,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){et[e]=new ft(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];et[t]=new ft(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){et[e]=new ft(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){et[e]=new ft(e,2,!1,e,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(e){et[e]=new ft(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){et[e]=new ft(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){et[e]=new ft(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){et[e]=new ft(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){et[e]=new ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var Od=/[\-:]([a-z])/g;function Td(e){return e[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(e){var t=e.replace(Od,Td);et[t]=new ft(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Od,Td);et[t]=new ft(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Od,Td);et[t]=new ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){et[e]=new ft(e,1,!1,e.toLowerCase(),null,!1,!1)}),et.xlinkHref=new ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){et[e]=new ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pd(e,t,r,n){var i=et.hasOwnProperty(t)?et[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(mb(t,r,i,n)&&(r=null),n||i===null?hb(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var xr=db.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pa=Symbol.for("react.element"),Vn=Symbol.for("react.portal"),Qn=Symbol.for("react.fragment"),Id=Symbol.for("react.strict_mode"),Hc=Symbol.for("react.profiler"),cg=Symbol.for("react.provider"),ug=Symbol.for("react.context"),Rd=Symbol.for("react.forward_ref"),Gc=Symbol.for("react.suspense"),Kc=Symbol.for("react.suspense_list"),Fd=Symbol.for("react.memo"),Tr=Symbol.for("react.lazy"),dg=Symbol.for("react.offscreen"),wh=Symbol.iterator;function es(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}var Ae=Object.assign,Zl;function gs(e){if(Zl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Zl=t&&t[1]||""}return` 34`+Zl+e}var ec=!1;function tc(e,t){if(!e||ec)return"";ec=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var i=c.stack.split(` 35`),s=n.stack.split(` 36`),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=` 37`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=o);break}}}finally{ec=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?gs(e):""}function gb(e){switch(e.tag){case 5:return gs(e.type);case 16:return gs("Lazy");case 13:return gs("Suspense");case 19:return gs("SuspenseList");case 0:case 2:case 15:return e=tc(e.type,!1),e;case 11:return e=tc(e.type.render,!1),e;case 1:return e=tc(e.type,!0),e;default:return""}}function Jc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Qn:return"Fragment";case Vn:return"Portal";case Hc:return"Profiler";case Id:return"StrictMode";case Gc:return"Suspense";case Kc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ug:return(e.displayName||"Context")+".Consumer";case cg:return(e._context.displayName||"Context")+".Provider";case Rd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fd:return t=e.displayName||null,t!==null?t:Jc(e.type)||"Memo";case Tr:t=e._payload,e=e._init;try{return Jc(e(t))}catch{}}return null}function vb(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jc(t);case 8:return t===Id?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yb(e){var t=fg(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ia(e){e._valueTracker||(e._valueTracker=yb(e))}function hg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=fg(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function So(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Yc(e,t){var r=t.checked;return Ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function bh(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Jr(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function pg(e,t){t=t.checked,t!=null&&Pd(e,"checked",t,!1)}function Xc(e,t){pg(e,t);var r=Jr(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zc(e,t.type,r):t.hasOwnProperty("defaultValue")&&Zc(e,t.type,Jr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xh(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Zc(e,t,r){(t!=="number"||So(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var vs=Array.isArray;function oi(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Jr(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function eu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Y(91));return Ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _h(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Y(92));if(vs(r)){if(1<r.length)throw Error(Y(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Jr(r)}}function mg(e,t){var r=Jr(t.value),n=Jr(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Sh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function tu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ra,vg=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ra=Ra||document.createElement("div"),Ra.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ra.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zs(e,t){if(t){var r=e.firstChild;
vendor: 11,445 bytes, line 37
37if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Es={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},wb=["Webkit","ms","Moz","O"];Object.keys(Es).forEach(function(e){wb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Es[t]=Es[e]})});function yg(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Es.hasOwnProperty(e)&&Es[e]?(""+t).trim():t+"px"}function wg(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=yg(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var bb=Ae({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 ru(e,t){if(t){if(bb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Y(62))}}function nu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 iu=null;function Ad(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var su=null,li=null,ci=null;function Eh(e){if(e=ha(e)){if(typeof su!="function")throw Error(Y(280));var t=e.stateNode;t&&(t=ll(t),su(e.stateNode,e.type,t))}}function bg(e){li?ci?ci.push(e):ci=[e]:li=e}function xg(){if(li){var e=li,t=ci;if(ci=li=null,Eh(e),t)for(e=0;e<t.length;e++)Eh(t[e])}}function _g(e,t){return e(t)}function Sg(){}var rc=!1;function Eg(e,t,r){if(rc)return e(t,r);rc=!0;try{return _g(e,t,r)}finally{rc=!1,(li!==null||ci!==null)&&(Sg(),xg())}}function $s(e,t){var r=e.stateNode;if(r===null)return null;var n=ll(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Y(231,t,typeof r));return r}var au=!1;if(mr)try{var ts={};Object.defineProperty(ts,"passive",{get:function(){au=!0}}),window.addEventListener("test",ts,ts),window.removeEventListener("test",ts,ts)}catch{au=!1}function xb(e,t,r,n,i,s,a,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(u){this.onError(u)}}var ks=!1,Eo=null,ko=!1,ou=null,_b={onError:function(e){ks=!0,Eo=e}};function Sb(e,t,r,n,i,s,a,o,l){ks=!1,Eo=null,xb.apply(_b,arguments)}function Eb(e,t,r,n,i,s,a,o,l){if(Sb.apply(this,arguments),ks){if(ks){var c=Eo;ks=!1,Eo=null}else throw Error(Y(198));ko||(ko=!0,ou=c)}}function Fn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function kg(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function kh(e){if(Fn(e)!==e)throw Error(Y(188))}function kb(e){var t=e.alternate;if(!t){if(t=Fn(e),t===null)throw Error(Y(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return kh(i),e;if(s===n)return kh(i),t;s=s.sibling}throw Error(Y(188))}if(r.return!==n.return)r=i,n=s;else{for(var a=!1,o=i.child;o;){if(o===r){a=!0,r=i,n=s;break}if(o===n){a=!0,n=i,r=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===r){a=!0,r=s,n=i;break}if(o===n){a=!0,n=s,r=i;break}o=o.sibling}if(!a)throw Error(Y(189))}}if(r.alternate!==n)throw Error(Y(190))}if(r.tag!==3)throw Error(Y(188));return r.stateNode.current===r?e:t}function Cg(e){return e=kb(e),e!==null?Ng(e):null}function Ng(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ng(e);if(t!==null)return t;e=e.sibling}return null}var jg=Et.unstable_scheduleCallback,Ch=Et.unstable_cancelCallback,Cb=Et.unstable_shouldYield,Nb=Et.unstable_requestPaint,$e=Et.unstable_now,jb=Et.unstable_getCurrentPriorityLevel,Ld=Et.unstable_ImmediatePriority,Og=Et.unstable_UserBlockingPriority,Co=Et.unstable_NormalPriority,Ob=Et.unstable_LowPriority,Tg=Et.unstable_IdlePriority,il=null,rr=null;function Tb(e){if(rr&&typeof rr.onCommitFiberRoot=="function")try{rr.onCommitFiberRoot(il,e,void 0,(e.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:Rb,Pb=Math.log,Ib=Math.LN2;function Rb(e){return e>>>=0,e===0?32:31-(Pb(e)/Ib|0)|0}var Fa=64,Aa=4194304;function ys(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function No(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~i;o!==0?n=ys(o):(s&=a,s!==0&&(n=ys(s)))}else a=r&~i,a!==0?n=ys(a):s!==0&&(n=ys(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Qt(t),i=1<<r,n|=e[r],t&=~i;return n}function Fb(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ab(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Qt(s),o=1<<a,l=i[a];l===-1?(!(o&r)||o&n)&&(i[a]=Fb(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}}function lu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Pg(){var e=Fa;return Fa<<=1,!(Fa&4194240)&&(Fa=64),e}function nc(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function da(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=r}function Lb(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-Qt(r),s=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~s}}function Md(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Qt(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var ke=0;function Ig(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Rg,Dd,Fg,Ag,Lg,cu=!1,La=[],Ur=null,Br=null,qr=null,Us=new Map,Bs=new Map,Mr=[],Mb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Nh(e,t){switch(e){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":Br=null;break;case"mouseover":case"mouseout":qr=null;break;case"pointerover":case"pointerout":Us.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bs.delete(t.pointerId)}}function rs(e,t,r,n,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ha(t),t!==null&&Dd(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Db(e,t,r,n,i){switch(t){case"focusin":return Ur=rs(Ur,e,t,r,n,i),!0;case"dragenter":return Br=rs(Br,e,t,r,n,i),!0;case"mouseover":return qr=rs(qr,e,t,r,n,i),!0;case"pointerover":var s=i.pointerId;return Us.set(s,rs(Us.get(s)||null,e,t,r,n,i)),!0;case"gotpointercapture":return s=i.pointerId,Bs.set(s,rs(Bs.get(s)||null,e,t,r,n,i)),!0}return!1}function Mg(e){var t=pn(e.target);if(t!==null){var r=Fn(t);if(r!==null){if(t=r.tag,t===13){if(t=kg(r),t!==null){e.blockedOn=t,Lg(e.priority,function(){Fg(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function eo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=uu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);iu=n,r.target.dispatchEvent(n),iu=null}else return t=ha(r),t!==null&&Dd(t),e.blockedOn=r,!1;t.shift()}return!0}function jh(e,t,r){eo(e)&&r.delete(t)}function zb(){cu=!1,Ur!==null&&eo(Ur)&&(Ur=null),Br!==null&&eo(Br)&&(Br=null),qr!==null&&eo(qr)&&(qr=null),Us.forEach(jh),Bs.forEach(jh)}function ns(e,t){e.blockedOn===t&&(e.blockedOn=null,cu||(cu=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,zb)))}function qs(e){function t(i){return ns(i,e)}if(0<La.length){ns(La[0],e);for(var r=1;r<La.length;r++){var n=La[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ur!==null&&ns(Ur,e),Br!==null&&ns(Br,e),qr!==null&&ns(qr,e),Us.forEach(t),Bs.forEach(t),r=0;r<Mr.length;r++)n=Mr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Mr.length&&(r=Mr[0],r.blockedOn===null);)Mg(r),r.blockedOn===null&&Mr.shift()}var ui=xr.ReactCurrentBatchConfig,jo=!0;function $b(e,t,r,n){var i=ke,s=ui.transition;ui.transition=null;try{ke=1,zd(e,t,r,n)}finally{ke=i,ui.transition=s}}function Ub(e,t,r,n){var i=ke,s=ui.transition;ui.transition=null;try{ke=4,zd(e,t,r,n)}finally{ke=i,ui.transition=s}}function zd(e,t,r,n){if(jo){var i=uu(e,t,r,n);if(i===null)hc(e,t,n,Oo,r),Nh(e,n);else if(Db(i,e,t,r,n))n.stopPropagation();else if(Nh(e,n),t&4&&-1<Mb.indexOf(e)){for(;i!==null;){var s=ha(i);if(s!==null&&Rg(s),s=uu(e,t,r,n),s===null&&hc(e,t,n,Oo,r),s===i)break;i=s}i!==null&&n.stopPropagation()}else hc(e,t,n,null,r)}}var Oo=null;function uu(e,t,r,n){if(Oo=null,e=Ad(n),e=pn(e),e!==null)if(t=Fn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=kg(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Oo=e,null}
vendor: 14,784 bytes, line 37
37function Dg(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(jb()){case Ld:return 1;case Og:return 4;case Co:case Ob:return 16;case Tg:return 536870912;default:return 16}default:return 16}}var zr=null,$d=null,to=null;function zg(){if(to)return to;var e,t=$d,r=t.length,n,i="value"in zr?zr.value:zr.textContent,s=i.length;for(e=0;e<r&&t[e]===i[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===i[s-n];n++);return to=i.slice(e,1<n?1-n:void 0)}function ro(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ma(){return!0}function Oh(){return!1}function Nt(e){function t(r,n,i,s,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ma:Oh,this.isPropagationStopped=Oh,this}return Ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ma)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ma)},persist:function(){},isPersistent:Ma}),t}var Fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ud=Nt(Fi),fa=Ae({},Fi,{view:0,detail:0}),Bb=Nt(fa),ic,sc,is,sl=Ae({},fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==is&&(is&&e.type==="mousemove"?(ic=e.screenX-is.screenX,sc=e.screenY-is.screenY):sc=ic=0,is=e),ic)},movementY:function(e){return"movementY"in e?e.movementY:sc}}),Th=Nt(sl),qb=Ae({},sl,{dataTransfer:0}),Vb=Nt(qb),Qb=Ae({},fa,{relatedTarget:0}),ac=Nt(Qb),Wb=Ae({},Fi,{animationName:0,elapsedTime:0,pseudoElement:0}),Hb=Nt(Wb),Gb=Ae({},Fi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kb=Nt(Gb),Jb=Ae({},Fi,{data:0}),Ph=Nt(Jb),Yb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Zb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ex(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zb[e])?!!t[e]:!1}function Bd(){return ex}var tx=Ae({},fa,{key:function(e){if(e.key){var t=Yb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bd,charCode:function(e){return e.type==="keypress"?ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rx=Nt(tx),nx=Ae({},sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ih=Nt(nx),ix=Ae({},fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bd}),sx=Nt(ix),ax=Ae({},Fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),ox=Nt(ax),lx=Ae({},sl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),cx=Nt(lx),ux=[9,13,27,32],qd=mr&&"CompositionEvent"in window,Cs=null;mr&&"documentMode"in document&&(Cs=document.documentMode);var dx=mr&&"TextEvent"in window&&!Cs,$g=mr&&(!qd||Cs&&8<Cs&&11>=Cs),Rh=" ",Fh=!1;function Ug(e,t){switch(e){case"keyup":return ux.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wn=!1;function fx(e,t){switch(e){case"compositionend":return Bg(t);case"keypress":return t.which!==32?null:(Fh=!0,Rh);case"textInput":return e=t.data,e===Rh&&Fh?null:e;default:return null}}function hx(e,t){if(Wn)return e==="compositionend"||!qd&&Ug(e,t)?(e=zg(),to=$d=zr=null,Wn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $g&&t.locale!=="ko"?null:t.data;default:return null}}var px={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ah(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!px[e.type]:t==="textarea"}function qg(e,t,r,n){bg(n),t=To(t,"onChange"),0<t.length&&(r=new Ud("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ns=null,Vs=null;function mx(e){ev(e,0)}function al(e){var t=Kn(e);if(hg(t))return e}function gx(e,t){if(e==="change")return t}var Vg=!1;if(mr){var oc;if(mr){var lc="oninput"in document;if(!lc){var Lh=document.createElement("div");Lh.setAttribute("oninput","return;"),lc=typeof Lh.oninput=="function"}oc=lc}else oc=!1;Vg=oc&&(!document.documentMode||9<document.documentMode)}function Mh(){Ns&&(Ns.detachEvent("onpropertychange",Qg),Vs=Ns=null)}function Qg(e){if(e.propertyName==="value"&&al(Vs)){var t=[];qg(t,Vs,e,Ad(e)),Eg(mx,t)}}function vx(e,t,r){e==="focusin"?(Mh(),Ns=t,Vs=r,Ns.attachEvent("onpropertychange",Qg)):e==="focusout"&&Mh()}function yx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return al(Vs)}function wx(e,t){if(e==="click")return al(t)}function bx(e,t){if(e==="input"||e==="change")return al(t)}function xx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:xx;function Qs(e,t){if(Ht(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!Wc.call(t,i)||!Ht(e[i],t[i]))return!1}return!0}function Dh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zh(e,t){var r=Dh(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Dh(r)}}function Wg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hg(){for(var e=window,t=So();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=So(e.document)}return t}function Vd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _x(e){var t=Hg(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Wg(r.ownerDocument.documentElement,r)){if(n!==null&&Vd(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=zh(r,s);var a=zh(r,n);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sx=mr&&"documentMode"in document&&11>=document.documentMode,Hn=null,du=null,js=null,fu=!1;function $h(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;fu||Hn==null||Hn!==So(n)||(n=Hn,"selectionStart"in n&&Vd(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),js&&Qs(js,n)||(js=n,n=To(du,"onSelect"),0<n.length&&(t=new Ud("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Hn)))}function Da(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Gn={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionend:Da("Transition","TransitionEnd")},cc={},Gg={};mr&&(Gg=document.createElement("div").style,"AnimationEvent"in window||(delete Gn.animationend.animation,delete Gn.animationiteration.animation,delete Gn.animationstart.animation),"TransitionEvent"in window||delete Gn.transitionend.transition);function ol(e){if(cc[e])return cc[e];if(!Gn[e])return e;var t=Gn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Gg)return cc[e]=t[r];return e}var Kg=ol("animationend"),Jg=ol("animationiteration"),Yg=ol("animationstart"),Xg=ol("transitionend"),Zg=new Map,Uh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function rn(e,t){Zg.set(e,t),Rn(t,[e])}for(var uc=0;uc<Uh.length;uc++){var dc=Uh[uc],Ex=dc.toLowerCase(),kx=dc[0].toUpperCase()+dc.slice(1);rn(Ex,"on"+kx)}rn(Kg,"onAnimationEnd"),rn(Jg,"onAnimationIteration"),rn(Yg,"onAnimationStart"),rn("dblclick","onDoubleClick"),rn("focusin","onFocus"),rn("focusout","onBlur"),rn(Xg,"onTransitionEnd"),yi("onMouseEnter",["mouseout","mouseover"]),yi("onMouseLeave",["mouseout","mouseover"]),yi("onPointerEnter",["pointerout","pointerover"]),yi("onPointerLeave",["pointerout","pointerover"]),Rn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Rn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Rn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Rn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Rn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Rn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ws="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cx=new Set("cancel close invalid load scroll toggle".split(" ").concat(ws));function Bh(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Eb(n,t,void 0,e),e.currentTarget=null}function ev(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var a=n.length-1;0<=a;a--){var o=n[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;Bh(i,o,c),s=l}else for(a=0;a<n.length;a++){if(o=n[a],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;Bh(i,o,c),s=l}}}if(ko)throw e=ou,ko=!1,ou=null,e}function Te(e,t){var r=t[vu];r===void 0&&(r=t[vu]=new Set);var n=e+"__bubble";r.has(n)||(tv(t,e,2,!1),r.add(n))}function fc(e,t,r){var n=0;t&&(n|=4),tv(r,e,n,t)}var za="_reactListening"+Math.random().toString(36).slice(2);function Ws(e){if(!e[za]){e[za]=!0,lg.forEach(function(r){r!=="selectionchange"&&(Cx.has(r)||fc(r,!1,e),fc(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[za]||(t[za]=!0,fc("selectionchange",!1,t))}}function tv(e,t,r,n){switch(Dg(t)){case 1:var i=$b;break;case 4:i=Ub;break;default:i=zd}r=i.bind(null,t,r,e),i=void 0,!au||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function hc(e,t,r,n,i){var s=n;
vendor: 5,690 bytes, lines 37-38
37if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;o!==null;){if(a=pn(o),a===null)return;if(l=a.tag,l===5||l===6){n=s=a;continue e}o=o.parentNode}}n=n.return}Eg(function(){var c=s,u=Ad(r),f=[];e:{var h=Zg.get(e);if(h!==void 0){var v=Ud,y=e;switch(e){case"keypress":if(ro(r)===0)break e;case"keydown":case"keyup":v=rx;break;case"focusin":y="focus",v=ac;break;case"focusout":y="blur",v=ac;break;case"beforeblur":case"afterblur":v=ac;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=Th;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=Vb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=sx;break;case Kg:case Jg:case Yg:v=Hb;break;case Xg:v=ox;break;case"scroll":v=Bb;break;case"wheel":v=cx;break;case"copy":case"cut":case"paste":v=Kb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Ih}var w=(t&4)!==0,x=!w&&e==="scroll",p=w?h!==null?h+"Capture":null:h;w=[];for(var g=c,m;g!==null;){m=g;var b=m.stateNode;if(m.tag===5&&b!==null&&(m=b,p!==null&&(b=$s(g,p),b!=null&&w.push(Hs(g,b,m)))),x)break;g=g.return}0<w.length&&(h=new v(h,y,null,r,u),f.push({event:h,listeners:w}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",h&&r!==iu&&(y=r.relatedTarget||r.fromElement)&&(pn(y)||y[gr]))break e;if((v||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,v?(y=r.relatedTarget||r.toElement,v=c,y=y?pn(y):null,y!==null&&(x=Fn(y),y!==x||y.tag!==5&&y.tag!==6)&&(y=null)):(v=null,y=c),v!==y)){if(w=Th,b="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(w=Ih,b="onPointerLeave",p="onPointerEnter",g="pointer"),x=v==null?h:Kn(v),m=y==null?h:Kn(y),h=new w(b,g+"leave",v,r,u),h.target=x,h.relatedTarget=m,b=null,pn(u)===c&&(w=new w(p,g+"enter",y,r,u),w.target=m,w.relatedTarget=x,b=w),x=b,v&&y)t:{for(w=v,p=y,g=0,m=w;m;m=$n(m))g++;for(m=0,b=p;b;b=$n(b))m++;for(;0<g-m;)w=$n(w),g--;for(;0<m-g;)p=$n(p),m--;for(;g--;){if(w===p||p!==null&&w===p.alternate)break t;w=$n(w),p=$n(p)}w=null}else w=null;v!==null&&qh(f,h,v,w,!1),y!==null&&x!==null&&qh(f,x,y,w,!0)}}e:{if(h=c?Kn(c):window,v=h.nodeName&&h.nodeName.toLowerCase(),v==="select"||v==="input"&&h.type==="file")var _=gx;else if(Ah(h))if(Vg)_=bx;else{_=yx;var S=vx}else(v=h.nodeName)&&v.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(_=wx);if(_&&(_=_(e,c))){qg(f,_,r,u);break e}S&&S(e,h,c),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&Zc(h,"number",h.value)}switch(S=c?Kn(c):window,e){case"focusin":(Ah(S)||S.contentEditable==="true")&&(Hn=S,du=c,js=null);break;case"focusout":js=du=Hn=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,$h(f,r,u);break;case"selectionchange":if(Sx)break;case"keydown":case"keyup":$h(f,r,u)}var k;if(qd)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Wn?Ug(e,r)&&(N="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(N="onCompositionStart");N&&($g&&r.locale!=="ko"&&(Wn||N!=="onCompositionStart"?N==="onCompositionEnd"&&Wn&&(k=zg()):(zr=u,$d="value"in zr?zr.value:zr.textContent,Wn=!0)),S=To(c,N),0<S.length&&(N=new Ph(N,e,null,r,u),f.push({event:N,listeners:S}),k?N.data=k:(k=Bg(r),k!==null&&(N.data=k)))),(k=dx?fx(e,r):hx(e,r))&&(c=To(c,"onBeforeInput"),0<c.length&&(u=new Ph("onBeforeInput","beforeinput",null,r,u),f.push({event:u,listeners:c}),u.data=k))}ev(f,t)})}function Hs(e,t,r){return{instance:e,listener:t,currentTarget:r}}function To(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=$s(e,r),s!=null&&n.unshift(Hs(e,s,i)),s=$s(e,t),s!=null&&n.push(Hs(e,s,i))),e=e.return}return n}function $n(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function qh(e,t,r,n,i){for(var s=t._reactName,a=[];r!==null&&r!==n;){var o=r,l=o.alternate,c=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&c!==null&&(o=c,i?(l=$s(r,s),l!=null&&a.unshift(Hs(r,l,o))):i||(l=$s(r,s),l!=null&&a.push(Hs(r,l,o)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Nx=/\r\n?/g,jx=/\u0000|\uFFFD/g;function Vh(e){return(typeof e=="string"?e:""+e).replace(Nx,` 38`).replace(jx,"")}function $a(e,t,r){if(t=Vh(t),Vh(e)!==t&&r)throw Error(Y(425))}function Po(){}var hu=null,pu=null;function mu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gu=typeof setTimeout=="function"?setTimeout:void 0,Ox=typeof clearTimeout=="function"?clearTimeout:void 0,Qh=typeof Promise=="function"?Promise:void 0,Tx=typeof queueMicrotask=="function"?queueMicrotask:typeof Qh<"u"?function(e){return Qh.resolve(null).then(e).catch(Px)}:gu;function Px(e){setTimeout(function(){throw e})}function pc(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),qs(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}
vendor: 4,658 bytes, line 38
38while(r);qs(t)}function Vr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Wh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ai=Math.random().toString(36).slice(2),tr="__reactFiber$"+Ai,Gs="__reactProps$"+Ai,gr="__reactContainer$"+Ai,vu="__reactEvents$"+Ai,Ix="__reactListeners$"+Ai,Rx="__reactHandles$"+Ai;function pn(e){var t=e[tr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[gr]||r[tr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Wh(e);e!==null;){if(r=e[tr])return r;e=Wh(e)}return t}e=r,r=e.parentNode}return null}function ha(e){return e=e[tr]||e[gr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Kn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Y(33))}function ll(e){return e[Gs]||null}var yu=[],Jn=-1;function nn(e){return{current:e}}function Pe(e){0>Jn||(e.current=yu[Jn],yu[Jn]=null,Jn--)}function Oe(e,t){Jn++,yu[Jn]=e.current,e.current=t}var Yr={},at=nn(Yr),gt=nn(!1),Sn=Yr;function wi(e,t){var r=e.type.contextTypes;if(!r)return Yr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function vt(e){return e=e.childContextTypes,e!=null}function Io(){Pe(gt),Pe(at)}function Hh(e,t,r){if(at.current!==Yr)throw Error(Y(168));Oe(at,t),Oe(gt,r)}function rv(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Y(108,vb(e)||"Unknown",i));return Ae({},r,n)}function Ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yr,Sn=at.current,Oe(at,e),Oe(gt,gt.current),!0}function Gh(e,t,r){var n=e.stateNode;if(!n)throw Error(Y(169));r?(e=rv(e,t,Sn),n.__reactInternalMemoizedMergedChildContext=e,Pe(gt),Pe(at),Oe(at,e)):Pe(gt),Oe(gt,r)}var or=null,cl=!1,mc=!1;function nv(e){or===null?or=[e]:or.push(e)}function Fx(e){cl=!0,nv(e)}function sn(){if(!mc&&or!==null){mc=!0;var e=0,t=ke;try{var r=or;for(ke=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}or=null,cl=!1}catch(i){throw or!==null&&(or=or.slice(e+1)),jg(Ld,sn),i}finally{ke=t,mc=!1}}return null}var Yn=[],Xn=0,Fo=null,Ao=0,Tt=[],Pt=0,En=null,cr=1,ur="";function un(e,t){Yn[Xn++]=Ao,Yn[Xn++]=Fo,Fo=e,Ao=t}function iv(e,t,r){Tt[Pt++]=cr,Tt[Pt++]=ur,Tt[Pt++]=En,En=e;var n=cr;e=ur;var i=32-Qt(n)-1;n&=~(1<<i),r+=1;var s=32-Qt(t)+i;if(30<s){var a=i-i%5;s=(n&(1<<a)-1).toString(32),n>>=a,i-=a,cr=1<<32-Qt(t)+i|r<<i|n,ur=s+e}else cr=1<<s|r<<i|n,ur=e}function Qd(e){e.return!==null&&(un(e,1),iv(e,1,0))}function Wd(e){for(;e===Fo;)Fo=Yn[--Xn],Yn[Xn]=null,Ao=Yn[--Xn],Yn[Xn]=null;for(;e===En;)En=Tt[--Pt],Tt[Pt]=null,ur=Tt[--Pt],Tt[Pt]=null,cr=Tt[--Pt],Tt[Pt]=null}var St=null,_t=null,Ie=!1,qt=null;function sv(e,t){var r=Rt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Kh(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,St=e,_t=Vr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,St=e,_t=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=En!==null?{id:cr,overflow:ur}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Rt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,St=e,_t=null,!0):!1;default:return!1}}function wu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function bu(e){if(Ie){var t=_t;if(t){var r=t;if(!Kh(e,t)){if(wu(e))throw Error(Y(418));t=Vr(r.nextSibling);var n=St;t&&Kh(e,t)?sv(n,r):(e.flags=e.flags&-4097|2,Ie=!1,St=e)}}else{if(wu(e))throw Error(Y(418));e.flags=e.flags&-4097|2,Ie=!1,St=e}}}function Jh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;St=e}function Ua(e){if(e!==St)return!1;if(!Ie)return Jh(e),Ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!mu(e.type,e.memoizedProps)),t&&(t=_t)){if(wu(e))throw av(),Error(Y(418));for(;t;)sv(e,t),t=Vr(t.nextSibling)}if(Jh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Y(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){_t=Vr(e.nextSibling);break e}t--}
vendor: 25,497 bytes, lines 38-40
38else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}_t=null}}else _t=St?Vr(e.stateNode.nextSibling):null;return!0}function av(){for(var e=_t;e;)e=Vr(e.nextSibling)}function bi(){_t=St=null,Ie=!1}function Hd(e){qt===null?qt=[e]:qt.push(e)}var Ax=xr.ReactCurrentBatchConfig;function ss(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Y(309));var n=r.stateNode}if(!n)throw Error(Y(147,e));var i=n,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(Y(284));if(!r._owner)throw Error(Y(290,e))}return e}function Ba(e,t){throw e=Object.prototype.toString.call(t),Error(Y(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yh(e){var t=e._init;return t(e._payload)}function ov(e){function t(p,g){if(e){var m=p.deletions;m===null?(p.deletions=[g],p.flags|=16):m.push(g)}}function r(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function n(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=Gr(p,g),p.index=0,p.sibling=null,p}function s(p,g,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<g?(p.flags|=2,g):m):(p.flags|=2,g)):(p.flags|=1048576,g)}function a(p){return e&&p.alternate===null&&(p.flags|=2),p}function o(p,g,m,b){return g===null||g.tag!==6?(g=_c(m,p.mode,b),g.return=p,g):(g=i(g,m),g.return=p,g)}function l(p,g,m,b){var _=m.type;return _===Qn?u(p,g,m.props.children,b,m.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Tr&&Yh(_)===g.type)?(b=i(g,m.props),b.ref=ss(p,g,m),b.return=p,b):(b=co(m.type,m.key,m.props,null,p.mode,b),b.ref=ss(p,g,m),b.return=p,b)}function c(p,g,m,b){return g===null||g.tag!==4||g.stateNode.containerInfo!==m.containerInfo||g.stateNode.implementation!==m.implementation?(g=Sc(m,p.mode,b),g.return=p,g):(g=i(g,m.children||[]),g.return=p,g)}function u(p,g,m,b,_){return g===null||g.tag!==7?(g=xn(m,p.mode,b,_),g.return=p,g):(g=i(g,m),g.return=p,g)}function f(p,g,m){if(typeof g=="string"&&g!==""||typeof g=="number")return g=_c(""+g,p.mode,m),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Pa:return m=co(g.type,g.key,g.props,null,p.mode,m),m.ref=ss(p,null,g),m.return=p,m;case Vn:return g=Sc(g,p.mode,m),g.return=p,g;case Tr:var b=g._init;return f(p,b(g._payload),m)}if(vs(g)||es(g))return g=xn(g,p.mode,m,null),g.return=p,g;Ba(p,g)}return null}function h(p,g,m,b){var _=g!==null?g.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return _!==null?null:o(p,g,""+m,b);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Pa:return m.key===_?l(p,g,m,b):null;case Vn:return m.key===_?c(p,g,m,b):null;case Tr:return _=m._init,h(p,g,_(m._payload),b)}if(vs(m)||es(m))return _!==null?null:u(p,g,m,b,null);Ba(p,m)}return null}function v(p,g,m,b,_){if(typeof b=="string"&&b!==""||typeof b=="number")return p=p.get(m)||null,o(g,p,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Pa:return p=p.get(b.key===null?m:b.key)||null,l(g,p,b,_);case Vn:return p=p.get(b.key===null?m:b.key)||null,c(g,p,b,_);case Tr:var S=b._init;return v(p,g,m,S(b._payload),_)}if(vs(b)||es(b))return p=p.get(m)||null,u(g,p,b,_,null);Ba(g,b)}return null}function y(p,g,m,b){for(var _=null,S=null,k=g,N=g=0,R=null;k!==null&&N<m.length;N++){k.index>N?(R=k,k=null):R=k.sibling;var P=h(p,k,m[N],b);if(P===null){k===null&&(k=R);break}e&&k&&P.alternate===null&&t(p,k),g=s(P,g,N),S===null?_=P:S.sibling=P,S=P,k=R}if(N===m.length)return r(p,k),Ie&&un(p,N),_;if(k===null){for(;N<m.length;N++)k=f(p,m[N],b),k!==null&&(g=s(k,g,N),S===null?_=k:S.sibling=k,S=k);return Ie&&un(p,N),_}for(k=n(p,k);N<m.length;N++)R=v(k,p,N,m[N],b),R!==null&&(e&&R.alternate!==null&&k.delete(R.key===null?N:R.key),g=s(R,g,N),S===null?_=R:S.sibling=R,S=R);return e&&k.forEach(function(H){return t(p,H)}),Ie&&un(p,N),_}function w(p,g,m,b){var _=es(m);if(typeof _!="function")throw Error(Y(150));if(m=_.call(m),m==null)throw Error(Y(151));for(var S=_=null,k=g,N=g=0,R=null,P=m.next();k!==null&&!P.done;N++,P=m.next()){k.index>N?(R=k,k=null):R=k.sibling;var H=h(p,k,P.value,b);if(H===null){k===null&&(k=R);break}e&&k&&H.alternate===null&&t(p,k),g=s(H,g,N),S===null?_=H:S.sibling=H,S=H,k=R}if(P.done)return r(p,k),Ie&&un(p,N),_;if(k===null){for(;!P.done;N++,P=m.next())P=f(p,P.value,b),P!==null&&(g=s(P,g,N),S===null?_=P:S.sibling=P,S=P);return Ie&&un(p,N),_}for(k=n(p,k);!P.done;N++,P=m.next())P=v(k,p,N,P.value,b),P!==null&&(e&&P.alternate!==null&&k.delete(P.key===null?N:P.key),g=s(P,g,N),S===null?_=P:S.sibling=P,S=P);return e&&k.forEach(function(G){return t(p,G)}),Ie&&un(p,N),_}function x(p,g,m,b){if(typeof m=="object"&&m!==null&&m.type===Qn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Pa:e:{for(var _=m.key,S=g;S!==null;){if(S.key===_){if(_=m.type,_===Qn){if(S.tag===7){r(p,S.sibling),g=i(S,m.props.children),g.return=p,p=g;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Tr&&Yh(_)===S.type){r(p,S.sibling),g=i(S,m.props),g.ref=ss(p,S,m),g.return=p,p=g;break e}r(p,S);break}else t(p,S);S=S.sibling}m.type===Qn?(g=xn(m.props.children,p.mode,b,m.key),g.return=p,p=g):(b=co(m.type,m.key,m.props,null,p.mode,b),b.ref=ss(p,g,m),b.return=p,p=b)}return a(p);case Vn:e:{for(S=m.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===m.containerInfo&&g.stateNode.implementation===m.implementation){r(p,g.sibling),g=i(g,m.children||[]),g.return=p,p=g;break e}else{r(p,g);break}else t(p,g);g=g.sibling}g=Sc(m,p.mode,b),g.return=p,p=g}return a(p);case Tr:return S=m._init,x(p,g,S(m._payload),b)}if(vs(m))return y(p,g,m,b);if(es(m))return w(p,g,m,b);Ba(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,g!==null&&g.tag===6?(r(p,g.sibling),g=i(g,m),g.return=p,p=g):(r(p,g),g=_c(m,p.mode,b),g.return=p,p=g),a(p)):r(p,g)}return x}var xi=ov(!0),lv=ov(!1),Lo=nn(null),Mo=null,Zn=null,Gd=null;function Kd(){Gd=Zn=Mo=null}function Jd(e){var t=Lo.current;Pe(Lo),e._currentValue=t}function xu(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function di(e,t){Mo=e,Gd=Zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(mt=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(Gd!==e)if(e={context:e,memoizedValue:t,next:null},Zn===null){if(Mo===null)throw Error(Y(308));Zn=e,Mo.dependencies={lanes:0,firstContext:e}}else Zn=Zn.next=e;return t}var mn=null;function Yd(e){mn===null?mn=[e]:mn.push(e)}function cv(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,Yd(t)):(r.next=i.next,i.next=r),t.interleaved=r,vr(e,n)}function vr(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Pr=!1;function Xd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function uv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qr(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ve&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,vr(e,r)}return i=n.interleaved,i===null?(t.next=t,Yd(n)):(t.next=i.next,i.next=t),n.interleaved=t,vr(e,r)}function no(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Md(e,r)}}function Xh(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Do(e,t,r,n){var i=e.updateQueue;Pr=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,c=l.next;l.next=null,a===null?s=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==a&&(o===null?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;a=0,u=c=l=null,o=s;do{var h=o.lane,v=o.eventTime;if((n&h)===h){u!==null&&(u=u.next={eventTime:v,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=e,w=o;switch(h=t,v=r,w.tag){case 1:if(y=w.payload,typeof y=="function"){f=y.call(v,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,h=typeof y=="function"?y.call(v,f,h):y,h==null)break e;f=Ae({},f,h);break e;case 2:Pr=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[o]:h.push(o))}else v={eventTime:v,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},u===null?(c=u=v,l=f):u=u.next=v,a|=h;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;h=o,o=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Cn|=a,e.lanes=a,e.memoizedState=f}}function Zh(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(Y(191,i));i.call(n)}}}var pa={},nr=nn(pa),Ks=nn(pa),Js=nn(pa);function gn(e){if(e===pa)throw Error(Y(174));return e}function Zd(e,t){switch(Oe(Js,t),Oe(Ks,e),Oe(nr,pa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:tu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=tu(t,e)}Pe(nr),Oe(nr,t)}function _i(){Pe(nr),Pe(Ks),Pe(Js)}function dv(e){gn(Js.current);var t=gn(nr.current),r=tu(t,e.type);t!==r&&(Oe(Ks,e),Oe(nr,r))}function ef(e){Ks.current===e&&(Pe(nr),Pe(Ks))}var Re=nn(0);function zo(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gc=[];function tf(){for(var e=0;e<gc.length;e++)gc[e]._workInProgressVersionPrimary=null;gc.length=0}var io=xr.ReactCurrentDispatcher,vc=xr.ReactCurrentBatchConfig,kn=0,Fe=null,qe=null,He=null,$o=!1,Os=!1,Ys=0,Lx=0;function tt(){throw Error(Y(321))}function rf(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ht(e[r],t[r]))return!1;return!0}function nf(e,t,r,n,i,s){if(kn=s,Fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,io.current=e===null||e.memoizedState===null?$x:Ux,e=r(n,i),Os){s=0;do{if(Os=!1,Ys=0,25<=s)throw Error(Y(301));s+=1,He=qe=null,t.updateQueue=null,io.current=Bx,e=r(n,i)}while(Os)}if(io.current=Uo,t=qe!==null&&qe.next!==null,kn=0,He=qe=Fe=null,$o=!1,t)throw Error(Y(300));return e}function sf(){var e=Ys!==0;return Ys=0,e}function er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?Fe.memoizedState=He=e:He=He.next=e,He}function Mt(){if(qe===null){var e=Fe.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=He===null?Fe.memoizedState:He.next;if(t!==null)He=t,qe=e;else{if(e===null)throw Error(Y(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},He===null?Fe.memoizedState=He=e:He=He.next=e}return He}function Xs(e,t){return typeof t=="function"?t(e):t}function yc(e){var t=Mt(),r=t.queue;if(r===null)throw Error(Y(311));r.lastRenderedReducer=e;var n=qe,i=n.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}n.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,n=n.baseState;var o=a=null,l=null,c=s;do{var u=c.lane;if((kn&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(o=l=f,a=n):l=l.next=f,Fe.lanes|=u,Cn|=u}c=c.next}while(c!==null&&c!==s);l===null?a=n:l.next=o,Ht(n,t.memoizedState)||(mt=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do s=i.lane,Fe.lanes|=s,Cn|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function wc(e){var t=Mt(),r=t.queue;if(r===null)throw Error(Y(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,s=t.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);Ht(s,t.memoizedState)||(mt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,n]}function fv(){}function hv(e,t){var r=Fe,n=Mt(),i=t(),s=!Ht(n.memoizedState,i);if(s&&(n.memoizedState=i,mt=!0),n=n.queue,af(gv.bind(null,r,n,e),[e]),n.getSnapshot!==t||s||He!==null&&He.memoizedState.tag&1){if(r.flags|=2048,Zs(9,mv.bind(null,r,n,i,t),void 0,null),Ke===null)throw Error(Y(349));kn&30||pv(r,t,i)}return i}function pv(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Fe.updateQueue,t===null?(t={lastEffect:null,stores:null},Fe.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function mv(e,t,r,n){t.value=r,t.getSnapshot=n,vv(t)&&yv(e)}function gv(e,t,r){return r(function(){vv(t)&&yv(e)})}function vv(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ht(e,r)}catch{return!0}}function yv(e){var t=vr(e,1);t!==null&&Wt(t,e,1,-1)}function ep(e){var t=er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xs,lastRenderedState:e},t.queue=e,e=e.dispatch=zx.bind(null,Fe,e),[t.memoizedState,e]}function Zs(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Fe.updateQueue,t===null?(t={lastEffect:null,stores:null},Fe.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function wv(){return Mt().memoizedState}function so(e,t,r,n){var i=er();Fe.flags|=e,i.memoizedState=Zs(1|t,r,void 0,n===void 0?null:n)}function ul(e,t,r,n){var i=Mt();n=n===void 0?null:n;var s=void 0;if(qe!==null){var a=qe.memoizedState;if(s=a.destroy,n!==null&&rf(n,a.deps)){i.memoizedState=Zs(t,r,s,n);return}}Fe.flags|=e,i.memoizedState=Zs(1|t,r,s,n)}function tp(e,t){return so(8390656,8,e,t)}function af(e,t){return ul(2048,8,e,t)}function bv(e,t){return ul(4,2,e,t)}function xv(e,t){return ul(4,4,e,t)}function _v(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sv(e,t,r){return r=r!=null?r.concat([e]):null,ul(4,4,_v.bind(null,t,e),r)}function of(){}function Ev(e,t){var r=Mt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&rf(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function kv(e,t){var r=Mt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&rf(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Cv(e,t,r){return kn&21?(Ht(r,t)||(r=Pg(),Fe.lanes|=r,Cn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,mt=!0),e.memoizedState=r)}function Mx(e,t){var r=ke;ke=r!==0&&4>r?r:4,e(!0);var n=vc.transition;vc.transition={};try{e(!1),t()}finally{ke=r,vc.transition=n}}function Nv(){return Mt().memoizedState}function Dx(e,t,r){var n=Hr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},jv(e))Ov(t,r);else if(r=cv(e,t,r,n),r!==null){var i=ct();Wt(r,e,n,i),Tv(r,t,n)}}function zx(e,t,r){var n=Hr(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(jv(e))Ov(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,r);if(i.hasEagerState=!0,i.eagerState=o,Ht(o,a)){var l=t.interleaved;l===null?(i.next=i,Yd(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}r=cv(e,t,i,n),r!==null&&(i=ct(),Wt(r,e,n,i),Tv(r,t,n))}}function jv(e){var t=e.alternate;return e===Fe||t!==null&&t===Fe}function Ov(e,t){Os=$o=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Tv(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Md(e,r)}}var Uo={readContext:Lt,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useInsertionEffect:tt,useLayoutEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useMutableSource:tt,useSyncExternalStore:tt,useId:tt,unstable_isNewReconciler:!1},$x={readContext:Lt,useCallback:function(e,t){return er().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:tp,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,so(4194308,4,_v.bind(null,t,e),r)},useLayoutEffect:function(e,t){return so(4194308,4,e,t)},useInsertionEffect:function(e,t){return so(4,2,e,t)},useMemo:function(e,t){var r=er();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=er();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Dx.bind(null,Fe,e),[n.memoizedState,e]},useRef:function(e){var t=er();return e={current:e},t.memoizedState=e},useState:ep,useDebugValue:of,useDeferredValue:function(e){return er().memoizedState=e},useTransition:function(){var e=ep(!1),t=e[0];return e=Mx.bind(null,e[1]),er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Fe,i=er();if(Ie){if(r===void 0)throw Error(Y(407));r=r()}else{if(r=t(),Ke===null)throw Error(Y(349));kn&30||pv(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,tp(gv.bind(null,n,s,e),[e]),n.flags|=2048,Zs(9,mv.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=er(),t=Ke.identifierPrefix;if(Ie){var r=ur,n=cr;r=(n&~(1<<32-Qt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ys++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Lx++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ux={readContext:Lt,useCallback:Ev,useContext:Lt,useEffect:af,useImperativeHandle:Sv,useInsertionEffect:bv,useLayoutEffect:xv,useMemo:kv,useReducer:yc,useRef:wv,useState:function(){return yc(Xs)},useDebugValue:of,useDeferredValue:function(e){var t=Mt();return Cv(t,qe.memoizedState,e)},useTransition:function(){var e=yc(Xs)[0],t=Mt().memoizedState;return[e,t]},useMutableSource:fv,useSyncExternalStore:hv,useId:Nv,unstable_isNewReconciler:!1},Bx={readContext:Lt,useCallback:Ev,useContext:Lt,useEffect:af,useImperativeHandle:Sv,useInsertionEffect:bv,useLayoutEffect:xv,useMemo:kv,useReducer:wc,useRef:wv,useState:function(){return wc(Xs)},useDebugValue:of,useDeferredValue:function(e){var t=Mt();return qe===null?t.memoizedState=e:Cv(t,qe.memoizedState,e)},useTransition:function(){var e=wc(Xs)[0],t=Mt().memoizedState;return[e,t]},useMutableSource:fv,useSyncExternalStore:hv,useId:Nv,unstable_isNewReconciler:!1};function Ut(e,t){if(e&&e.defaultProps){t=Ae({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function _u(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Ae({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var dl={isMounted:function(e){return(e=e._reactInternals)?Fn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=ct(),i=Hr(e),s=fr(n,i);s.payload=t,r!=null&&(s.callback=r),t=Qr(e,s,i),t!==null&&(Wt(t,e,i,n),no(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=ct(),i=Hr(e),s=fr(n,i);s.tag=1,s.payload=t,r!=null&&(s.callback=r),t=Qr(e,s,i),t!==null&&(Wt(t,e,i,n),no(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ct(),n=Hr(e),i=fr(r,n);i.tag=2,t!=null&&(i.callback=t),t=Qr(e,i,n),t!==null&&(Wt(t,e,n,r),no(t,e,n))}};function rp(e,t,r,n,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,a):t.prototype&&t.prototype.isPureReactComponent?!Qs(r,n)||!Qs(i,s):!0}function Pv(e,t,r){var n=!1,i=Yr,s=t.contextType;return typeof s=="object"&&s!==null?s=Lt(s):(i=vt(t)?Sn:at.current,n=t.contextTypes,s=(n=n!=null)?wi(e,i):Yr),t=new t(r,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function np(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function Su(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},Xd(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Lt(s):(s=vt(t)?Sn:at.current,i.context=wi(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(_u(e,t,s,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&dl.enqueueReplaceState(i,i.state,null),Do(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Si(e,t){try{var r="",n=t;do r+=gb(n),n=n.return;while(n);var i=r}catch(s){i=` 39Error generating stack: `+s.message+` 40`+s.stack}return{value:e,source:t,stack:i,digest:null}}function bc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Eu(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var qx=typeof WeakMap=="function"?WeakMap:Map;function Iv(e,t,r){r=fr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){qo||(qo=!0,Fu=n),Eu(e,t)},r}function Rv(e,t,r){r=fr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Eu(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Eu(e,t),typeof n!="function"&&(Wr===null?Wr=new Set([this]):Wr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function ip(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new qx;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=n_.bind(null,e,t,r),t.then(e,e))}function sp(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ap(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=fr(-1,1),t.tag=2,Qr(r,t,1))),r.lanes|=1),e)}var Vx=xr.ReactCurrentOwner,mt=!1;function lt(e,t,r,n){t.child=e===null?lv(t,null,r,n):xi(t,e.child,r,n)}function op(e,t,r,n,i){r=r.render;var s=t.ref;return di(t,i),n=nf(e,t,r,n,s,i),r=sf(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,yr(e,t,i)):(Ie&&r&&Qd(t),t.flags|=1,lt(e,t,n,i),t.child)}function lp(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!mf(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,Fv(e,t,s,n,i)):(e=co(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:Qs,r(a,n)&&e.ref===t.ref)return yr(e,t,i)}return t.flags|=1,e=Gr(s,n),e.ref=t.ref,e.return=t,t.child=e}function Fv(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(Qs(s,n)&&e.ref===t.ref)if(mt=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(mt=!0);else return t.lanes=e.lanes,yr(e,t,i)}return ku(e,t,r,n,i)}function Av(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oe(ti,xt),xt|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oe(ti,xt),xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,Oe(ti,xt),xt|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,Oe(ti,xt),xt|=n;return lt(e,t,i,r),t.child}function Lv(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 2,988 bytes, line 40
40function ku(e,t,r,n,i){var s=vt(r)?Sn:at.current;return s=wi(t,s),di(t,i),r=nf(e,t,r,n,s,i),n=sf(),e!==null&&!mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,yr(e,t,i)):(Ie&&n&&Qd(t),t.flags|=1,lt(e,t,r,i),t.child)}function cp(e,t,r,n,i){if(vt(r)){var s=!0;Ro(t)}else s=!1;if(di(t,i),t.stateNode===null)ao(e,t),Pv(t,r,n),Su(t,r,n,i),n=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var l=a.context,c=r.contextType;typeof c=="object"&&c!==null?c=Lt(c):(c=vt(r)?Sn:at.current,c=wi(t,c));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||l!==c)&&np(t,a,n,c),Pr=!1;var h=t.memoizedState;a.state=h,Do(t,n,a,i),l=t.memoizedState,o!==n||h!==l||gt.current||Pr?(typeof u=="function"&&(_u(t,r,u,n),l=t.memoizedState),(o=Pr||rp(t,r,o,n,h,l,c))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,uv(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:Ut(t.type,o),a.props=c,f=t.pendingProps,h=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=Lt(l):(l=vt(r)?Sn:at.current,l=wi(t,l));var v=r.getDerivedStateFromProps;(u=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==f||h!==l)&&np(t,a,n,l),Pr=!1,h=t.memoizedState,a.state=h,Do(t,n,a,i);var y=t.memoizedState;o!==f||h!==y||gt.current||Pr?(typeof v=="function"&&(_u(t,r,v,n),y=t.memoizedState),(c=Pr||rp(t,r,c,n,h,y,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,y,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),a.props=n,a.state=y,a.context=l,n=c):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Cu(e,t,r,n,s,i)}function Cu(e,t,r,n,i,s){Lv(e,t);var a=(t.flags&128)!==0;
vendor: 5,190 bytes, line 40
40if(!n&&!a)return i&&Gh(t,r,!1),yr(e,t,s);n=t.stateNode,Vx.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=xi(t,e.child,null,s),t.child=xi(t,null,o,s)):lt(e,t,o,s),t.memoizedState=n.state,i&&Gh(t,r,!0),t.child}function Mv(e){var t=e.stateNode;t.pendingContext?Hh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Hh(e,t.context,!1),Zd(e,t.containerInfo)}function up(e,t,r,n,i){return bi(),Hd(i),t.flags|=256,lt(e,t,r,n),t.child}var Nu={dehydrated:null,treeContext:null,retryLane:0};function ju(e){return{baseLanes:e,cachePool:null,transitions:null}}function Dv(e,t,r){var n=t.pendingProps,i=Re.current,s=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Oe(Re,i&1),e===null)return bu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,s?(n=t.mode,s=t.child,a={mode:"hidden",children:a},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=pl(a,n,0,null),e=xn(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=ju(r),t.memoizedState=Nu,e):lf(t,a));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Qx(e,t,a,n,o,i,r);if(s){s=n.fallback,a=t.mode,i=e.child,o=i.sibling;var l={mode:"hidden",children:n.children};return!(a&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Gr(i,l),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=Gr(o,s):(s=xn(s,a,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,a=e.child.memoizedState,a=a===null?ju(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,t.memoizedState=Nu,n}return s=e.child,e=s.sibling,n=Gr(s,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function lf(e,t){return t=pl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function qa(e,t,r,n){return n!==null&&Hd(n),xi(t,e.child,null,r),e=lf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qx(e,t,r,n,i,s,a){if(r)return t.flags&256?(t.flags&=-257,n=bc(Error(Y(422))),qa(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=pl({mode:"visible",children:n.children},i,0,null),s=xn(s,i,a,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&xi(t,e.child,null,a),t.child.memoizedState=ju(a),t.memoizedState=Nu,s);if(!(t.mode&1))return qa(e,t,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,s=Error(Y(419)),n=bc(s,n,void 0),qa(e,t,a,n)}if(o=(a&e.childLanes)!==0,mt||o){if(n=Ke,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,vr(e,i),Wt(n,e,i,-1))}return pf(),n=bc(Error(Y(421))),qa(e,t,a,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=i_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,_t=Vr(i.nextSibling),St=t,Ie=!0,qt=null,e!==null&&(Tt[Pt++]=cr,Tt[Pt++]=ur,Tt[Pt++]=En,cr=e.id,ur=e.overflow,En=t),t=lf(t,n.children),t.flags|=4096,t)}function dp(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),xu(e.return,t,r)}function xc(e,t,r,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function zv(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(lt(e,t,n.children,r),n=Re.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dp(e,r,t);else if(e.tag===19)dp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Oe(Re,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&zo(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),xc(t,!1,i,r,s);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&zo(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}xc(t,!0,r,null,s);break;case"together":xc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ao(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function yr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Cn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Y(153));
vendor: 4,733 bytes, line 40
40if(t.child!==null){for(e=t.child,r=Gr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Gr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Wx(e,t,r){switch(t.tag){case 3:Mv(t),bi();break;case 5:dv(t);break;case 1:vt(t.type)&&Ro(t);break;case 4:Zd(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Oe(Lo,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Oe(Re,Re.current&1),t.flags|=128,null):r&t.child.childLanes?Dv(e,t,r):(Oe(Re,Re.current&1),e=yr(e,t,r),e!==null?e.sibling:null);Oe(Re,Re.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return zv(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Oe(Re,Re.current),n)break;return null;case 22:case 23:return t.lanes=0,Av(e,t,r)}return yr(e,t,r)}var $v,Ou,Uv,Bv;$v=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ou=function(){},Uv=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,gn(nr.current);var s=null;switch(r){case"input":i=Yc(e,i),n=Yc(e,n),s=[];break;case"select":i=Ae({},i,{value:void 0}),n=Ae({},n,{value:void 0}),s=[];break;case"textarea":i=eu(e,i),n=eu(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Po)}ru(r,n);var a;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ds.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(o=i?.[c],n.hasOwnProperty(c)&&l!==o&&(l!=null||o!=null))if(c==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(s||(s=[]),s.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ds.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Te("scroll",e),s||o===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Bv=function(e,t,r,n){r!==n&&(t.flags|=4)};function as(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Hx(e,t,r){var n=t.pendingProps;switch(Wd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return vt(t.type)&&Io(),rt(t),null;case 3:return n=t.stateNode,_i(),Pe(gt),Pe(at),tf(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ua(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qt!==null&&(Mu(qt),qt=null))),Ou(e,t),rt(t),null;case 5:ef(t);var i=gn(Js.current);if(r=t.type,e!==null&&t.stateNode!=null)Uv(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Y(166));return rt(t),null}if(e=gn(nr.current),Ua(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[tr]=t,n[Gs]=s,e=(t.mode&1)!==0,r){case"dialog":Te("cancel",n),Te("close",n);break;case"iframe":case"object":case"embed":Te("load",n);break;case"video":case"audio":for(i=0;i<ws.length;i++)Te(ws[i],n);break;case"source":Te("error",n);break;case"img":case"image":case"link":Te("error",n),Te("load",n);break;case"details":Te("toggle",n);break;case"input":bh(n,s),Te("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Te("invalid",n);break;case"textarea":_h(n,s),Te("invalid",n)}ru(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];
vendor: 31,729 bytes, line 40
40a==="children"?typeof o=="string"?n.textContent!==o&&(s.suppressHydrationWarning!==!0&&$a(n.textContent,o,e),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&$a(n.textContent,o,e),i=["children",""+o]):Ds.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&Te("scroll",n)}switch(r){case"input":Ia(n),xh(n,s,!0);break;case"textarea":Ia(n),Sh(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=Po)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=gg(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[tr]=t,e[Gs]=n,$v(e,t,!1,!1),t.stateNode=e;e:{switch(a=nu(r,n),r){case"dialog":Te("cancel",e),Te("close",e),i=n;break;case"iframe":case"object":case"embed":Te("load",e),i=n;break;case"video":case"audio":for(i=0;i<ws.length;i++)Te(ws[i],e);i=n;break;case"source":Te("error",e),i=n;break;case"img":case"image":case"link":Te("error",e),Te("load",e),i=n;break;case"details":Te("toggle",e),i=n;break;case"input":bh(e,n),i=Yc(e,n),Te("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=Ae({},n,{value:void 0}),Te("invalid",e);break;case"textarea":_h(e,n),i=eu(e,n),Te("invalid",e);break;default:i=n}ru(r,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?wg(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&vg(e,l)):s==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&zs(e,l):typeof l=="number"&&zs(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Ds.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Te("scroll",e):l!=null&&Pd(e,s,l,a))}switch(r){case"input":Ia(e),xh(e,n,!1);break;case"textarea":Ia(e),Sh(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Jr(n.value));break;case"select":e.multiple=!!n.multiple,s=n.value,s!=null?oi(e,!!n.multiple,s,!1):n.defaultValue!=null&&oi(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Po)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return rt(t),null;case 6:if(e&&t.stateNode!=null)Bv(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Y(166));if(r=gn(Js.current),gn(nr.current),Ua(t)){if(n=t.stateNode,r=t.memoizedProps,n[tr]=t,(s=n.nodeValue!==r)&&(e=St,e!==null))switch(e.tag){case 3:$a(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$a(n.nodeValue,r,(e.mode&1)!==0)}s&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[tr]=t,t.stateNode=n}return rt(t),null;case 13:if(Pe(Re),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ie&&_t!==null&&t.mode&1&&!(t.flags&128))av(),bi(),t.flags|=98560,s=!1;else if(s=Ua(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(Y(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Y(317));s[tr]=t}else bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;rt(t),s=!1}else qt!==null&&(Mu(qt),qt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Re.current&1?Qe===0&&(Qe=3):pf())),t.updateQueue!==null&&(t.flags|=4),rt(t),null);case 4:return _i(),Ou(e,t),e===null&&Ws(t.stateNode.containerInfo),rt(t),null;case 10:return Jd(t.type._context),rt(t),null;case 17:return vt(t.type)&&Io(),rt(t),null;case 19:if(Pe(Re),s=t.memoizedState,s===null)return rt(t),null;if(n=(t.flags&128)!==0,a=s.rendering,a===null)if(n)as(s,!1);else{if(Qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=zo(e),a!==null){for(t.flags|=128,as(s,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)s=r,e=n,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Oe(Re,Re.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>Ei&&(t.flags|=128,n=!0,as(s,!1),t.lanes=4194304)}else{if(!n)if(e=zo(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),as(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Ie)return rt(t),null}else 2*$e()-s.renderingStartTime>Ei&&r!==1073741824&&(t.flags|=128,n=!0,as(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(r=s.last,r!==null?r.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=$e(),t.sibling=null,r=Re.current,Oe(Re,n?r&1|2:r&1),t):(rt(t),null);case 22:case 23:return hf(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?xt&1073741824&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),null;case 24:return null;case 25:return null}throw Error(Y(156,t.tag))}function Gx(e,t){switch(Wd(t),t.tag){case 1:return vt(t.type)&&Io(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _i(),Pe(gt),Pe(at),tf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ef(t),null;case 13:if(Pe(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Y(340));bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Re),null;case 4:return _i(),null;case 10:return Jd(t.type._context),null;case 22:case 23:return hf(),null;case 24:return null;default:return null}}var Va=!1,nt=!1,Kx=typeof WeakSet=="function"?WeakSet:Set,ie=null;function ei(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Le(e,t,n)}else r.current=null}function Tu(e,t,r){try{r()}catch(n){Le(e,t,n)}}var fp=!1;function Jx(e,t){if(hu=jo,e=Hg(),Vd(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,o=-1,l=-1,c=0,u=0,f=e,h=null;t:for(;;){for(var v;f!==r||i!==0&&f.nodeType!==3||(o=a+i),f!==s||n!==0&&f.nodeType!==3||(l=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(v=f.firstChild)!==null;)h=f,f=v;for(;;){if(f===e)break t;if(h===r&&++c===i&&(o=a),h===s&&++u===n&&(l=a),(v=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=v}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(pu={focusedElem:e,selectionRange:r},jo=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,x=y.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:Ut(t.type,w),x);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Y(163))}}catch(b){Le(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return y=fp,fp=!1,y}function Ts(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Tu(t,r,s)}i=i.next}while(i!==n)}}function fl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Pu(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function qv(e){var t=e.alternate;t!==null&&(e.alternate=null,qv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tr],delete t[Gs],delete t[vu],delete t[Ix],delete t[Rx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Vv(e){return e.tag===5||e.tag===3||e.tag===4}function hp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Iu(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Po));else if(n!==4&&(e=e.child,e!==null))for(Iu(e,t,r),e=e.sibling;e!==null;)Iu(e,t,r),e=e.sibling}function Ru(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Ru(e,t,r),e=e.sibling;e!==null;)Ru(e,t,r),e=e.sibling}var Xe=null,Bt=!1;function jr(e,t,r){for(r=r.child;r!==null;)Qv(e,t,r),r=r.sibling}function Qv(e,t,r){if(rr&&typeof rr.onCommitFiberUnmount=="function")try{rr.onCommitFiberUnmount(il,r)}catch{}switch(r.tag){case 5:nt||ei(r,t);case 6:var n=Xe,i=Bt;Xe=null,jr(e,t,r),Xe=n,Bt=i,Xe!==null&&(Bt?(e=Xe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Xe.removeChild(r.stateNode));break;case 18:Xe!==null&&(Bt?(e=Xe,r=r.stateNode,e.nodeType===8?pc(e.parentNode,r):e.nodeType===1&&pc(e,r),qs(e)):pc(Xe,r.stateNode));break;case 4:n=Xe,i=Bt,Xe=r.stateNode.containerInfo,Bt=!0,jr(e,t,r),Xe=n,Bt=i;break;case 0:case 11:case 14:case 15:if(!nt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Tu(r,t,a),i=i.next}while(i!==n)}jr(e,t,r);break;case 1:if(!nt&&(ei(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){Le(r,t,o)}jr(e,t,r);break;case 21:jr(e,t,r);break;case 22:r.mode&1?(nt=(n=nt)||r.memoizedState!==null,jr(e,t,r),nt=n):jr(e,t,r);break;default:jr(e,t,r)}}function pp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Kx),t.forEach(function(n){var i=s_.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function zt(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var s=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:Xe=o.stateNode,Bt=!1;break e;case 3:Xe=o.stateNode.containerInfo,Bt=!0;break e;case 4:Xe=o.stateNode.containerInfo,Bt=!0;break e}o=o.return}if(Xe===null)throw Error(Y(160));Qv(s,a,i),Xe=null,Bt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Le(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wv(t,e),t=t.sibling}function Wv(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(zt(t,e),Xt(e),n&4){try{Ts(3,e,e.return),fl(3,e)}catch(w){Le(e,e.return,w)}try{Ts(5,e,e.return)}catch(w){Le(e,e.return,w)}}break;case 1:zt(t,e),Xt(e),n&512&&r!==null&&ei(r,r.return);break;case 5:if(zt(t,e),Xt(e),n&512&&r!==null&&ei(r,r.return),e.flags&32){var i=e.stateNode;try{zs(i,"")}catch(w){Le(e,e.return,w)}}if(n&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&pg(i,s),nu(o,a);var c=nu(o,s);for(a=0;a<l.length;a+=2){var u=l[a],f=l[a+1];u==="style"?wg(i,f):u==="dangerouslySetInnerHTML"?vg(i,f):u==="children"?zs(i,f):Pd(i,u,f,c)}switch(o){case"input":Xc(i,s);break;case"textarea":mg(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var v=s.value;v!=null?oi(i,!!s.multiple,v,!1):h!==!!s.multiple&&(s.defaultValue!=null?oi(i,!!s.multiple,s.defaultValue,!0):oi(i,!!s.multiple,s.multiple?[]:"",!1))}i[Gs]=s}catch(w){Le(e,e.return,w)}}break;case 6:if(zt(t,e),Xt(e),n&4){if(e.stateNode===null)throw Error(Y(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(w){Le(e,e.return,w)}}break;case 3:if(zt(t,e),Xt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{qs(t.containerInfo)}catch(w){Le(e,e.return,w)}break;case 4:zt(t,e),Xt(e);break;case 13:zt(t,e),Xt(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(df=$e())),n&4&&pp(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(nt=(c=nt)||u,zt(t,e),nt=c):zt(t,e),Xt(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(ie=e,u=e.child;u!==null;){for(f=ie=u;ie!==null;){switch(h=ie,v=h.child,h.tag){case 0:case 11:case 14:case 15:Ts(4,h,h.return);break;case 1:ei(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){Le(n,r,w)}}break;case 5:ei(h,h.return);break;case 22:if(h.memoizedState!==null){gp(f);continue}}v!==null?(v.return=h,ie=v):gp(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{i=f.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=f.stateNode,l=f.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=yg("display",a))}catch(w){Le(e,e.return,w)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(w){Le(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:zt(t,e),Xt(e),n&4&&pp(e);break;case 21:break;default:zt(t,e),Xt(e)}}function Xt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Vv(r)){var n=r;break e}r=r.return}throw Error(Y(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(zs(i,""),n.flags&=-33);var s=hp(e);Ru(e,s,i);break;case 3:case 4:var a=n.stateNode.containerInfo,o=hp(e);Iu(e,o,a);break;default:throw Error(Y(161))}}catch(l){Le(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Yx(e,t,r){ie=e,Hv(e)}function Hv(e,t,r){for(var n=(e.mode&1)!==0;ie!==null;){var i=ie,s=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||Va;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||nt;o=Va;var c=nt;if(Va=a,(nt=l)&&!c)for(ie=i;ie!==null;)a=ie,l=a.child,a.tag===22&&a.memoizedState!==null?vp(i):l!==null?(l.return=a,ie=l):vp(i);for(;s!==null;)ie=s,Hv(s),s=s.sibling;ie=i,Va=o,nt=c}mp(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ie=s):mp(e)}}function mp(e){for(;ie!==null;){var t=ie;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:nt||fl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!nt)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Ut(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Zh(t,s,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Zh(t,a,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&qs(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Y(163))}nt||t.flags&512&&Pu(t)}catch(h){Le(t,t.return,h)}}if(t===e){ie=null;break}if(r=t.sibling,r!==null){r.return=t.return,ie=r;break}ie=t.return}}function gp(e){for(;ie!==null;){var t=ie;if(t===e){ie=null;break}var r=t.sibling;if(r!==null){r.return=t.return,ie=r;break}ie=t.return}}function vp(e){for(;ie!==null;){var t=ie;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{fl(4,t)}catch(l){Le(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(l){Le(t,i,l)}}var s=t.return;try{Pu(t)}catch(l){Le(t,s,l)}break;case 5:var a=t.return;try{Pu(t)}catch(l){Le(t,a,l)}}}catch(l){Le(t,t.return,l)}if(t===e){ie=null;break}var o=t.sibling;if(o!==null){o.return=t.return,ie=o;break}ie=t.return}}var Xx=Math.ceil,Bo=xr.ReactCurrentDispatcher,cf=xr.ReactCurrentOwner,Ft=xr.ReactCurrentBatchConfig,ve=0,Ke=null,Be=null,Ze=0,xt=0,ti=nn(0),Qe=0,ea=null,Cn=0,hl=0,uf=0,Ps=null,pt=null,df=0,Ei=1/0,ar=null,qo=!1,Fu=null,Wr=null,Qa=!1,$r=null,Vo=0,Is=0,Au=null,oo=-1,lo=0;function ct(){return ve&6?$e():oo!==-1?oo:oo=$e()}function Hr(e){return e.mode&1?ve&2&&Ze!==0?Ze&-Ze:Ax.transition!==null?(lo===0&&(lo=Pg()),lo):(e=ke,e!==0||(e=window.event,e=e===void 0?16:Dg(e.type)),e):1}function Wt(e,t,r,n){if(50<Is)throw Is=0,Au=null,Error(Y(185));da(e,r,n),(!(ve&2)||e!==Ke)&&(e===Ke&&(!(ve&2)&&(hl|=r),Qe===4&&Dr(e,Ze)),yt(e,n),r===1&&ve===0&&!(t.mode&1)&&(Ei=$e()+500,cl&&sn()))}function yt(e,t){var r=e.callbackNode;Ab(e,t);var n=No(e,e===Ke?Ze:0);if(n===0)r!==null&&Ch(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Ch(r),t===1)e.tag===0?Fx(yp.bind(null,e)):nv(yp.bind(null,e)),Tx(function(){!(ve&6)&&sn()}),r=null;else{switch(Ig(n)){case 1:r=Ld;break;case 4:r=Og;break;case 16:r=Co;break;case 536870912:r=Tg;break;default:r=Co}r=ty(r,Gv.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Gv(e,t){if(oo=-1,lo=0,ve&6)throw Error(Y(327));var r=e.callbackNode;if(fi()&&e.callbackNode!==r)return null;var n=No(e,e===Ke?Ze:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Qo(e,n);else{t=n;var i=ve;ve|=2;var s=Jv();(Ke!==e||Ze!==t)&&(ar=null,Ei=$e()+500,bn(e,t));do try{t_();break}catch(o){Kv(e,o)}while(!0);Kd(),Bo.current=s,ve=i,Be!==null?t=0:(Ke=null,Ze=0,t=Qe)}if(t!==0){if(t===2&&(i=lu(e),i!==0&&(n=i,t=Lu(e,i))),t===1)throw r=ea,bn(e,0),Dr(e,n),yt(e,$e()),r;if(t===6)Dr(e,n);else{if(i=e.current.alternate,!(n&30)&&!Zx(i)&&(t=Qo(e,n),t===2&&(s=lu(e),s!==0&&(n=s,t=Lu(e,s))),t===1))throw r=ea,bn(e,0),Dr(e,n),yt(e,$e()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(Y(345));case 2:dn(e,pt,ar);break;case 3:if(Dr(e,n),(n&130023424)===n&&(t=df+500-$e(),10<t)){if(No(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){ct(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=gu(dn.bind(null,e,pt,ar),t);break}dn(e,pt,ar);break;case 4:if(Dr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var a=31-Qt(n);s=1<<a,a=t[a],a>i&&(i=a),n&=~s}if(n=i,n=$e()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Xx(n/1960))-n,10<n){e.timeoutHandle=gu(dn.bind(null,e,pt,ar),n);break}dn(e,pt,ar);break;case 5:dn(e,pt,ar);break;default:throw Error(Y(329))}}}return yt(e,$e()),e.callbackNode===r?Gv.bind(null,e):null}function Lu(e,t){var r=Ps;return e.current.memoizedState.isDehydrated&&(bn(e,t).flags|=256),e=Qo(e,t),e!==2&&(t=pt,pt=r,t!==null&&Mu(t)),e}function Mu(e){pt===null?pt=e:pt.push.apply(pt,e)}function Zx(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],s=i.getSnapshot;i=i.value;try{if(!Ht(s(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dr(e,t){for(t&=~uf,t&=~hl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Qt(t),n=1<<r;e[r]=-1,t&=~n}}function yp(e){if(ve&6)throw Error(Y(327));fi();var t=No(e,0);if(!(t&1))return yt(e,$e()),null;var r=Qo(e,t);if(e.tag!==0&&r===2){var n=lu(e);n!==0&&(t=n,r=Lu(e,n))}if(r===1)throw r=ea,bn(e,0),Dr(e,t),yt(e,$e()),r;if(r===6)throw Error(Y(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,dn(e,pt,ar),yt(e,$e()),null}function ff(e,t){var r=ve;ve|=1;try{return e(t)}finally{ve=r,ve===0&&(Ei=$e()+500,cl&&sn())}}function Nn(e){$r!==null&&$r.tag===0&&!(ve&6)&&fi();var t=ve;ve|=1;var r=Ft.transition,n=ke;try{if(Ft.transition=null,ke=1,e)return e()}finally{ke=n,Ft.transition=r,ve=t,!(ve&6)&&sn()}}function hf(){xt=ti.current,Pe(ti)}function bn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Ox(r)),Be!==null)for(r=Be.return;r!==null;){var n=r;switch(Wd(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Io();break;case 3:_i(),Pe(gt),Pe(at),tf();break;case 5:ef(n);break;case 4:_i();break;case 13:Pe(Re);break;case 19:Pe(Re);break;case 10:Jd(n.type._context);break;case 22:case 23:hf()}r=r.return}if(Ke=e,Be=e=Gr(e.current,null),Ze=xt=t,Qe=0,ea=null,uf=hl=Cn=0,pt=Ps=null,mn!==null){for(t=0;t<mn.length;t++)if(r=mn[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,n.next=a}r.pending=n}mn=null}return e}function Kv(e,t){do{var r=Be;try{if(Kd(),io.current=Uo,$o){for(var n=Fe.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}$o=!1}if(kn=0,He=qe=Fe=null,Os=!1,Ys=0,cf.current=null,r===null||r.return===null){Qe=1,ea=t,Be=null;break}e:{var s=e,a=r.return,o=r,l=t;if(t=Ze,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=o,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var v=sp(a);if(v!==null){v.flags&=-257,ap(v,a,o,s,t),v.mode&1&&ip(s,c,t),t=v,l=c;var y=t.updateQueue;if(y===null){var w=new Set;w.add(l),t.updateQueue=w}else y.add(l);break e}else{if(!(t&1)){ip(s,c,t),pf();break e}l=Error(Y(426))}}else if(Ie&&o.mode&1){var x=sp(a);if(x!==null){!(x.flags&65536)&&(x.flags|=256),ap(x,a,o,s,t),Hd(Si(l,o));break e}}s=l=Si(l,o),Qe!==4&&(Qe=2),Ps===null?Ps=[s]:Ps.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Iv(s,l,t);Xh(s,p);break e;case 1:o=l;var g=s.type,m=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Wr===null||!Wr.has(m)))){s.flags|=65536,t&=-t,s.lanes|=t;var b=Rv(s,o,t);Xh(s,b);break e}}s=s.return}while(s!==null)}Xv(r)}catch(_){t=_,Be===r&&r!==null&&(Be=r=r.return);continue}break}while(!0)}function Jv(){var e=Bo.current;return Bo.current=Uo,e===null?Uo:e}function pf(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Ke===null||!(Cn&268435455)&&!(hl&268435455)||Dr(Ke,Ze)}function Qo(e,t){var r=ve;ve|=2;var n=Jv();(Ke!==e||Ze!==t)&&(ar=null,bn(e,t));do try{e_();break}catch(i){Kv(e,i)}while(!0);if(Kd(),ve=r,Bo.current=n,Be!==null)throw Error(Y(261));return Ke=null,Ze=0,Qe}function e_(){for(;Be!==null;)Yv(Be)}function t_(){for(;Be!==null&&!Cb();)Yv(Be)}function Yv(e){var t=ey(e.alternate,e,xt);e.memoizedProps=e.pendingProps,t===null?Xv(e):Be=t,cf.current=null}function Xv(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Gx(r,t),r!==null){r.flags&=32767,Be=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,Be=null;return}}else if(r=Hx(r,t,xt),r!==null){Be=r;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);Qe===0&&(Qe=5)}function dn(e,t,r){var n=ke,i=Ft.transition;try{Ft.transition=null,ke=1,r_(e,t,r,n)}finally{Ft.transition=i,ke=n}return null}function r_(e,t,r,n){do fi();while($r!==null);if(ve&6)throw Error(Y(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Y(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(Lb(e,s),e===Ke&&(Be=Ke=null,Ze=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Qa||(Qa=!0,ty(Co,function(){return fi(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Ft.transition,Ft.transition=null;var a=ke;ke=1;var o=ve;ve|=4,cf.current=null,Jx(e,r),Wv(r,e),_x(pu),jo=!!hu,pu=hu=null,e.current=r,Yx(r),Nb(),ve=o,ke=a,Ft.transition=s}else e.current=r;if(Qa&&(Qa=!1,$r=e,Vo=i),s=e.pendingLanes,s===0&&(Wr=null),Tb(r.stateNode),yt(e,$e()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(qo)throw qo=!1,e=Fu,Fu=null,e;return Vo&1&&e.tag!==0&&fi(),s=e.pendingLanes,s&1?e===Au?Is++:(Is=0,Au=e):Is=0,sn(),null}function fi(){if($r!==null){var e=Ig(Vo),t=Ft.transition,r=ke;try{if(Ft.transition=null,ke=16>e?16:e,$r===null)var n=!1;else{if(e=$r,$r=null,Vo=0,ve&6)throw Error(Y(331));var i=ve;for(ve|=4,ie=e.current;ie!==null;){var s=ie,a=s.child;if(ie.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var c=o[l];for(ie=c;ie!==null;){var u=ie;switch(u.tag){case 0:case 11:case 15:Ts(8,u,s)}var f=u.child;if(f!==null)f.return=u,ie=f;else for(;ie!==null;){u=ie;var h=u.sibling,v=u.return;if(qv(u),u===c){ie=null;break}if(h!==null){h.return=v,ie=h;break}ie=v}}}var y=s.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}ie=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,ie=a;else e:for(;ie!==null;){if(s=ie,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ts(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,ie=p;break e}ie=s.return}}var g=e.current;for(ie=g;ie!==null;){a=ie;var m=a.child;if(a.subtreeFlags&2064&&m!==null)m.return=a,ie=m;else e:for(a=g;ie!==null;){if(o=ie,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:fl(9,o)}}catch(_){Le(o,o.return,_)}if(o===a){ie=null;break e}var b=o.sibling;if(b!==null){b.return=o.return,ie=b;break e}ie=o.return}}if(ve=i,sn(),rr&&typeof rr.onPostCommitFiberRoot=="function")try{rr.onPostCommitFiberRoot(il,e)}catch{}n=!0}return n}finally{ke=r,Ft.transition=t}}return!1}function wp(e,t,r){t=Si(r,t),t=Iv(e,t,1),e=Qr(e,t,1),t=ct(),e!==null&&(da(e,1,t),yt(e,t))}function Le(e,t,r){if(e.tag===3)wp(e,e,r);else for(;t!==null;){if(t.tag===3){wp(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Wr===null||!Wr.has(n))){e=Si(r,e),e=Rv(t,e,1),t=Qr(t,e,1),e=ct(),t!==null&&(da(t,1,e),yt(t,e));break}}t=t.return}}function n_(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=ct(),e.pingedLanes|=e.suspendedLanes&r,Ke===e&&(Ze&r)===r&&(Qe===4||Qe===3&&(Ze&130023424)===Ze&&500>$e()-df?bn(e,0):uf|=r),yt(e,t)}function Zv(e,t){t===0&&(e.mode&1?(t=Aa,Aa<<=1,!(Aa&130023424)&&(Aa=4194304)):t=1);var r=ct();e=vr(e,t),e!==null&&(da(e,t,r),yt(e,r))}function i_(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Zv(e,r)}function s_(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Y(314))}n!==null&&n.delete(t),Zv(e,r)}var ey;ey=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gt.current)mt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return mt=!1,Wx(e,t,r);mt=!!(e.flags&131072)}else mt=!1,Ie&&t.flags&1048576&&iv(t,Ao,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ao(e,t),e=t.pendingProps;var i=wi(t,at.current);di(t,r),i=nf(null,t,n,e,i,r);var s=sf();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vt(n)?(s=!0,Ro(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xd(t),i.updater=dl,t.stateNode=i,i._reactInternals=t,Su(t,n,e,r),t=Cu(null,t,n,!0,s,r)):(t.tag=0,Ie&&s&&Qd(t),lt(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ao(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=o_(n),e=Ut(n,e),i){case 0:t=ku(null,t,n,e,r);break e;case 1:t=cp(null,t,n,e,r);break e;case 11:t=op(null,t,n,e,r);break e;case 14:t=lp(null,t,n,Ut(n.type,e),r);break e}throw Error(Y(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ut(n,i),ku(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ut(n,i),cp(e,t,n,i,r);case 3:e:{if(Mv(t),e===null)throw Error(Y(387));n=t.pendingProps,s=t.memoizedState,i=s.element,uv(e,t),Do(t,n,null,r);var a=t.memoizedState;if(n=a.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Si(Error(Y(423)),t),t=up(e,t,n,r,i);break e}else if(n!==i){i=Si(Error(Y(424)),t),t=up(e,t,n,r,i);break e}else for(_t=Vr(t.stateNode.containerInfo.firstChild),St=t,Ie=!0,qt=null,r=lv(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(bi(),n===i){t=yr(e,t,r);break e}lt(e,t,n,r)}t=t.child}return t;case 5:return dv(t),e===null&&bu(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,mu(n,i)?a=null:s!==null&&mu(n,s)&&(t.flags|=32),Lv(e,t),lt(e,t,a,r),t.child;case 6:return e===null&&bu(t),null;case 13:return Dv(e,t,r);case 4:return Zd(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=xi(t,null,n,r):lt(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ut(n,i),op(e,t,n,i,r);case 7:return lt(e,t,t.pendingProps,r),t.child;case 8:return lt(e,t,t.pendingProps.children,r),t.child;case 12:return lt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Oe(Lo,n._currentValue),n._currentValue=a,s!==null)if(Ht(s.value,a)){if(s.children===i.children&&!gt.current){t=yr(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=fr(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),xu(s.return,r,t),o.lanes|=r;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(Y(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),xu(a,r,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}lt(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,di(t,r),i=Lt(i),n=n(i),t.flags|=1,lt(e,t,n,r),t.child;case 14:return n=t.type,i=Ut(n,t.pendingProps),i=Ut(n.type,i),lp(e,t,n,i,r);case 15:return Fv(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ut(n,i),ao(e,t),t.tag=1,vt(n)?(e=!0,Ro(t)):e=!1,di(t,r),Pv(t,n,i),Su(t,n,i,r),Cu(null,t,n,!0,e,r);case 19:return zv(e,t,r);case 22:return Av(e,t,r)}throw Error(Y(156,t.tag))};function ty(e,t){return jg(e,t)}function a_(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 4,091 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rt(e,t,r,n){return new a_(e,t,r,n)}function mf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function o_(e){if(typeof e=="function")return mf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Rd)return 11;if(e===Fd)return 14}return 2}function Gr(e,t){var r=e.alternate;return r===null?(r=Rt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function co(e,t,r,n,i,s){var a=2;if(n=e,typeof e=="function")mf(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Qn:return xn(r.children,i,s,t);case Id:a=8,i|=8;break;case Hc:return e=Rt(12,r,t,i|2),e.elementType=Hc,e.lanes=s,e;case Gc:return e=Rt(13,r,t,i),e.elementType=Gc,e.lanes=s,e;case Kc:return e=Rt(19,r,t,i),e.elementType=Kc,e.lanes=s,e;case dg:return pl(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cg:a=10;break e;case ug:a=9;break e;case Rd:a=11;break e;case Fd:a=14;break e;case Tr:a=16,n=null;break e}throw Error(Y(130,e==null?e:typeof e,""))}return t=Rt(a,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function xn(e,t,r,n){return e=Rt(7,e,n,t),e.lanes=r,e}function pl(e,t,r,n){return e=Rt(22,e,n,t),e.elementType=dg,e.lanes=r,e.stateNode={isHidden:!1},e}function _c(e,t,r){return e=Rt(6,e,null,t),e.lanes=r,e}function Sc(e,t,r){return t=Rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function l_(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nc(0),this.expirationTimes=nc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nc(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gf(e,t,r,n,i,s,a,o,l){return e=new l_(e,t,r,o,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Rt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xd(s),e}function c_(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Vn,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function ry(e){if(!e)return Yr;e=e._reactInternals;e:{if(Fn(e)!==e||e.tag!==1)throw Error(Y(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Y(171))}if(e.tag===1){var r=e.type;if(vt(r))return rv(e,r,t)}return t}function ny(e,t,r,n,i,s,a,o,l){return e=gf(r,n,!0,e,i,s,a,o,l),e.context=ry(null),r=e.current,n=ct(),i=Hr(r),s=fr(n,i),s.callback=t??null,Qr(r,s,i),e.current.lanes=i,da(e,i,n),yt(e,n),e}function ml(e,t,r,n){var i=t.current,s=ct(),a=Hr(i);return r=ry(r),t.context===null?t.context=r:t.pendingContext=r,t=fr(s,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Qr(i,t,a),e!==null&&(Wt(e,i,a,s),no(e,i,a)),a}function Wo(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function bp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function vf(e,t){bp(e,t),(e=e.alternate)&&bp(e,t)}
vendor: 6,379 bytes, line 40
40function u_(){return null}var iy=typeof reportError=="function"?reportError:function(e){console.error(e)};function yf(e){this._internalRoot=e}gl.prototype.render=yf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Y(409));ml(e,t,null,null)},gl.prototype.unmount=yf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nn(function(){ml(null,e,null,null)}),t[gr]=null}};function gl(e){this._internalRoot=e}gl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ag();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Mr.length&&t!==0&&t<Mr[r].priority;r++);Mr.splice(r,0,e),r===0&&Mg(e)}};function wf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xp(){}function d_(e,t,r,n,i){if(i){if(typeof n=="function"){var s=n;n=function(){var c=Wo(a);s.call(c)}}var a=ny(t,n,e,0,null,!1,!1,"",xp);return e._reactRootContainer=a,e[gr]=a.current,Ws(e.nodeType===8?e.parentNode:e),Nn(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var c=Wo(l);o.call(c)}}var l=gf(e,0,!1,null,null,!1,!1,"",xp);return e._reactRootContainer=l,e[gr]=l.current,Ws(e.nodeType===8?e.parentNode:e),Nn(function(){ml(t,l,r,n)}),l}function yl(e,t,r,n,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var l=Wo(a);o.call(l)}}ml(t,a,e,i)}else a=d_(r,t,e,i,n);return Wo(a)}Rg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ys(t.pendingLanes);r!==0&&(Md(t,r|1),yt(t,$e()),!(ve&6)&&(Ei=$e()+500,sn()))}break;case 13:Nn(function(){var n=vr(e,1);if(n!==null){var i=ct();Wt(n,e,1,i)}}),vf(e,1)}},Dd=function(e){if(e.tag===13){var t=vr(e,134217728);if(t!==null){var r=ct();Wt(t,e,134217728,r)}vf(e,134217728)}},Fg=function(e){if(e.tag===13){var t=Hr(e),r=vr(e,t);if(r!==null){var n=ct();Wt(r,e,t,n)}vf(e,t)}},Ag=function(){return ke},Lg=function(e,t){var r=ke;try{return ke=e,t()}finally{ke=r}},su=function(e,t,r){switch(t){case"input":if(Xc(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=ll(n);if(!i)throw Error(Y(90));hg(n),Xc(n,i)}}}break;case"textarea":mg(e,r);break;case"select":t=r.value,t!=null&&oi(e,!!r.multiple,t,!1)}},_g=ff,Sg=Nn;var f_={usingClientEntryPoint:!1,Events:[ha,Kn,ll,bg,xg,ff]},os={findFiberByHostInstance:pn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},h_={bundleType:os.bundleType,version:os.version,rendererPackageName:os.rendererPackageName,rendererConfig:os.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Cg(e),e===null?null:e.stateNode},findFiberByHostInstance:os.findFiberByHostInstance||u_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wa.isDisabled&&Wa.supportsFiber)try{il=Wa.inject(h_),rr=Wa}catch{}}Ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f_,Ct.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wf(t))throw Error(Y(200));return c_(e,t,null,r)},Ct.createRoot=function(e,t){if(!wf(e))throw Error(Y(299));var r=!1,n="",i=iy;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=gf(e,1,!1,null,null,r,!1,n,i),e[gr]=t.current,Ws(e.nodeType===8?e.parentNode:e),new yf(t)},Ct.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Y(188)):(e=Object.keys(e).join(","),Error(Y(268,e)));return e=Cg(t),e=e===null?null:e.stateNode,e},Ct.flushSync=function(e){return Nn(e)},Ct.hydrate=function(e,t,r){if(!vl(t))throw Error(Y(200));return yl(null,e,t,!0,r)},Ct.hydrateRoot=function(e,t,r){if(!wf(e))throw Error(Y(405));var n=r!=null&&r.hydratedSources||null,i=!1,s="",a=iy;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=ny(t,null,e,1,r??null,i,!1,s,a),e[gr]=t.current,Ws(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new gl(t)},Ct.render=function(e,t,r){if(!vl(t))throw Error(Y(200));return yl(null,e,t,!1,r)},Ct.unmountComponentAtNode=function(e){if(!vl(e))throw Error(Y(40));return e._reactRootContainer?(Nn(function(){yl(null,null,e,!1,function(){e._reactRootContainer=null,e[gr]=null})}),!0):!1},Ct.unstable_batchedUpdates=ff,Ct.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!vl(r))throw Error(Y(200));if(e==null||e._reactInternals===void 0)throw Error(Y(38));return yl(e,t,r,!1,n)},Ct.version="18.3.1-next-f1338f8080-20240426";function sy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sy)}catch(e){console.error(e)}}sy(),sg.exports=Ct;var p_=sg.exports,ay,_p=p_;ay=_p.createRoot,_p.hydrateRoot;var Du=function(e,t){return Du=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Du(e,t)};function sr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Du(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var O=function(){return O=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];
40for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},O.apply(this,arguments)};function At(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Ir(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(u){try{c(n.next(u))}catch(f){a(f)}}function l(u){try{c(n.throw(u))}catch(f){a(f)}}function c(u){u.done?s(u.value):i(u.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}function Rr(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(r=0)),r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function st(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}var Ec="Invariant Violation",Sp=Object.setPrototypeOf,m_=Sp===void 0?function(e,t){return e.__proto__=t,e}:Sp,oy=(function(e){sr(t,e);function t(r){r===void 0&&(r=Ec);var n=e.call(this,typeof r=="number"?Ec+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=Ec,m_(n,t.prototype),n}return t})(Error);function hn(e,t){if(!e)throw new oy(t)}var ly=["debug","log","warn","error","silent"],g_=ly.indexOf("log");function Ha(e){return function(){if(ly.indexOf(e)>=g_){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=Ha("debug"),e.log=Ha("log"),e.warn=Ha("warn"),e.error=Ha("error")})(hn||(hn={}));var bf="3.13.9";function Vt(e){try{return e()}catch{}}const zu=Vt(function(){return globalThis})||Vt(function(){return window})||Vt(function(){return self})||Vt(function(){return global})||Vt(function(){return Vt.constructor("return this")()});var Ep=new Map;function $u(e){var t=Ep.get(e)||1;return Ep.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function cy(e,t){t===void 0&&(t=0);var r=$u("stringifyForDisplay");return JSON.stringify(e,function(n,i){return i===void 0?r:i},t).split(JSON.stringify(r)).join("<undefined>")}function Ga(e){return function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(typeof t=="number"){var i=t;t=xf(i),t||(t=_f(i,r),r=[])}e.apply(void 0,[t].concat(r))}}var ne=Object.assign(function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];t||hn(t,xf(r,n)||_f(r,n))},{debug:Ga(hn.debug),log:Ga(hn.log),warn:Ga(hn.warn),error:Ga(hn.error)});function ut(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new oy(xf(e,t)||_f(e,t))}var kp=Symbol.for("ApolloErrorMessageHandler_"+bf);function uy(e){if(typeof e=="string")return e;try{return cy(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function xf(e,t){if(t===void 0&&(t=[]),!!e)return zu[kp]&&zu[kp](e,t.map(uy))}function _f(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:bf,message:e,args:t.map(uy)})))}function uo(e,t){if(!e)throw new Error(t)}function v_(e){return typeof e=="object"&&e!==null}function y_(e,t){if(!e)throw new Error("Unexpected invariant triggered.")}const w_=/\r\n|[\n\r]/g;function Uu(e,t){let r=0,n=1;for(const i of e.body.matchAll(w_)){if(typeof i.index=="number"||y_(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function b_(e){return dy(e.source,Uu(e.source,e.start))}function dy(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,o=t.line===1?r:0,l=t.column+o,c=`${e.name}:${a}:${l} 41`,u=n.split(/\r\n|[\n\r]/g),f=u[i];if(f.length>120){const h=Math.floor(l/80),v=l%80,y=[];for(let w=0;w<f.length;w+=80)y.push(f.slice(w,w+80));return c+Cp([[`${a} |`,y[0]],...y.slice(1,h+1).map(w=>["|",w]),["|","^".padStart(v)],["|",y[h+1]]])}return c+Cp([[`${a-1} |`,u[i-1]],[`${a} |`,f],["|","^".padStart(l)],[`${a+1} |`,u[i+1]]])}function Cp(e){const t=e.filter(([n,i])=>i!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,i])=>n.padStart(r)+(i?" "+i:"")).join(` 42`)}function x_(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}
vendor: 5,240 bytes, lines 42-46
42class Sf extends Error{constructor(t,...r){var n,i,s;const{nodes:a,source:o,positions:l,path:c,originalError:u,extensions:f}=x_(r);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=u??void 0,this.nodes=Np(Array.isArray(a)?a:a?[a]:void 0);const h=Np((n=this.nodes)===null||n===void 0?void 0:n.map(y=>y.loc).filter(y=>y!=null));this.source=o??(h==null||(i=h[0])===null||i===void 0?void 0:i.source),this.positions=l??h?.map(y=>y.start),this.locations=l&&o?l.map(y=>Uu(o,y)):h?.map(y=>Uu(y.source,y.start));const v=v_(u?.extensions)?u?.extensions:void 0;this.extensions=(s=f??v)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Sf):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=` 43 44`+b_(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=` 45 46`+dy(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function Np(e){return e===void 0||e.length===0?void 0:e}function Ge(e,t,r){return new Sf(`Syntax Error: ${r}`,{source:e,positions:[t]})}class __{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class fy{constructor(t,r,n,i,s,a){this.kind=t,this.start=r,this.end=n,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const hy={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"]},S_=new Set(Object.keys(hy));function jp(e){const t=e?.kind;return typeof t=="string"&&S_.has(t)}var ri;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ri||(ri={}));var Bu;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Bu||(Bu={}));var te;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="Str
vendor: 5,170 bytes, lines 46-48
46ingValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(te||(te={}));function qu(e){return e===9||e===32}function ta(e){return e>=48&&e<=57}function py(e){return e>=97&&e<=122||e>=65&&e<=90}function my(e){return py(e)||e===95}function E_(e){return py(e)||ta(e)||e===95}function k_(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let a=0;a<e.length;++a){var s;const o=e[a],l=C_(o);l!==o.length&&(n=(s=n)!==null&&s!==void 0?s:a,i=a,a!==0&&l<r&&(r=l))}return e.map((a,o)=>o===0?a:a.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,i+1)}function C_(e){let t=0;for(;t<e.length&&qu(e.charCodeAt(t));)++t;return t}function N_(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=n.length===1,s=n.length>1&&n.slice(1).every(v=>v.length===0||qu(v.charCodeAt(0))),a=r.endsWith('\\"""'),o=e.endsWith('"')&&!a,l=e.endsWith("\\"),c=o||l,u=!i||e.length>70||c||s||a;let f="";const h=i&&qu(e.charCodeAt(0));return(u&&!h||s)&&(f+=` 47`),f+=r,(u||c)&&(f+=` 48`),'"""'+f+'"""'}var W;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(W||(W={}));class j_{constructor(t){const r=new fy(W.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==W.EOF)do if(t.next)t=t.next;else{const r=T_(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===W.COMMENT);return t}}function O_(e){return e===W.BANG||e===W.DOLLAR||e===W.AMP||e===W.PAREN_L||e===W.PAREN_R||e===W.SPREAD||e===W.COLON||e===W.EQUALS||e===W.AT||e===W.BRACKET_L||e===W.BRACKET_R||e===W.BRACE_L||e===W.PIPE||e===W.BRACE_R}function Li(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function wl(e,t){return gy(e.charCodeAt(t))&&vy(e.charCodeAt(t+1))}function gy(e){return e>=55296&&e<=56319}function vy(e){return e>=56320&&e<=57343}function jn(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return W.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Ue(e,t,r,n,i){const s=e.line,a=1+r-e.lineStart;return new fy(t,r,n,s,a,i)}function T_(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const s=r.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:r.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return P_(e,i);case 33:return Ue(e,W.BANG,i,i+1);case 36:return Ue(e,W.DOLLAR,i,i+1);case 38:return Ue(e,W.AMP,i,i+1);case 40:return Ue(e,W.PAREN_L,i,i+1);case 41:return Ue(e,W.PAREN_R,i,i+1);case 46:if(r.charCodeAt(i+1)===46&&r.charCodeAt(i+2)===46)return Ue(e,W.SPREAD,i,i+3);break;case 58:return Ue(e,W.COLON,i,i+1);case 61:return Ue(e,W.EQUALS,i,i+1);case 64:return Ue(e,W.AT,i,i+1);case 91:return Ue(e,W.BRACKET_L,i,i+1);case 93:return Ue(e,W.BRACKET_R,i,i+1);case 123:return Ue(e,W.BRACE_L,i,i+1);case 124:return Ue(e,W.PIPE,i,i+1);case 125:return Ue(e,W.BRACE_R,i,i+1);case 34:return r.charCodeAt(i+1)===34&&r.charCodeAt(i+2)===34?M_(e,i):R_(e,i)}if(ta(s)||s===45)return I_(e,i,s);if(my(s))return D_(e,i);throw Ge(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Li(s)||wl(r,i)?`Unexpected character: ${jn(e,i)}.`:`Invalid character: ${jn(e,i)}.`)}return Ue(e,W.EOF,n,n)}function P_(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const s=r.charCodeAt(i);if(s===10||s===13)break;if(Li(s))++i;else if(wl(r,i))i+=2;else break}return Ue(e,W.COMMENT,t,i,r.slice(t+1,i))}function I_(e,t,r){const n=e.source.body;let i=t,s=r,a=!1;if(s===45&&(s=n.charCodeAt(++i)),s===48){if(s=n.charCodeAt(++i),ta(s))throw Ge(e.source,i,`Invalid number, unexpected digit after 0: ${jn(e,i)}.`)}else i=kc(e,i,s),s=n.charCodeAt(i);
vendor: 4,271 bytes, lines 48-50
48if(s===46&&(a=!0,s=n.charCodeAt(++i),i=kc(e,i,s),s=n.charCodeAt(i)),(s===69||s===101)&&(a=!0,s=n.charCodeAt(++i),(s===43||s===45)&&(s=n.charCodeAt(++i)),i=kc(e,i,s),s=n.charCodeAt(i)),s===46||my(s))throw Ge(e.source,i,`Invalid number, expected digit but got: ${jn(e,i)}.`);return Ue(e,a?W.FLOAT:W.INT,t,i,n.slice(t,i))}function kc(e,t,r){if(!ta(r))throw Ge(e.source,t,`Invalid number, expected digit but got: ${jn(e,t)}.`);const n=e.source.body;let i=t+1;for(;ta(n.charCodeAt(i));)++i;return i}function R_(e,t){const r=e.source.body,n=r.length;let i=t+1,s=i,a="";for(;i<n;){const o=r.charCodeAt(i);if(o===34)return a+=r.slice(s,i),Ue(e,W.STRING,t,i+1,a);if(o===92){a+=r.slice(s,i);const l=r.charCodeAt(i+1)===117?r.charCodeAt(i+2)===123?F_(e,i):A_(e,i):L_(e,i);a+=l.value,i+=l.size,s=i;continue}if(o===10||o===13)break;if(Li(o))++i;else if(wl(r,i))i+=2;else throw Ge(e.source,i,`Invalid character within String: ${jn(e,i)}.`)}throw Ge(e.source,i,"Unterminated string.")}function F_(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const s=r.charCodeAt(t+i++);if(s===125){if(i<5||!Li(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|bs(s),n<0)break}throw Ge(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function A_(e,t){const r=e.source.body,n=Op(r,t+2);if(Li(n))return{value:String.fromCodePoint(n),size:6};if(gy(n)&&r.charCodeAt(t+6)===92&&r.charCodeAt(t+7)===117){const i=Op(r,t+8);if(vy(i))return{value:String.fromCodePoint(n,i),size:12}}throw Ge(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function Op(e,t){return bs(e.charCodeAt(t))<<12|bs(e.charCodeAt(t+1))<<8|bs(e.charCodeAt(t+2))<<4|bs(e.charCodeAt(t+3))}function bs(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function L_(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` 49`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Ge(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function M_(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,s=t+3,a=s,o="";const l=[];for(;s<n;){const c=r.charCodeAt(s);if(c===34&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34){o+=r.slice(a,s),l.push(o);const u=Ue(e,W.BLOCK_STRING,t,s+3,k_(l).join(` 50`));return e.line+=l.length-1,e.lineStart=i,u}if(c===92&&r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34&&r.charCodeAt(s+3)===34){o+=r.slice(a,s),a=s+1,s+=4;continue}if(c===10||c===13){o+=r.slice(a,s),l.push(o),c===13&&r.charCodeAt(s+1)===10?s+=2:++s,o="",a=s,i=s;continue}if(Li(c))++s;else if(wl(r,s))s+=2;else throw Ge(e.source,s,`Invalid character within String: ${jn(e,s)}.`)}throw Ge(e.source,s,"Unterminated string.")}function D_(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const s=r.charCodeAt(i);if(E_(s))++i;else break}return Ue(e,W.NAME,t,i,r.slice(t,i))}const z_=10,yy=2;function Ef(e){return bl(e,[])}function bl(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return $_(e,t);default:return String(e)}}function $_(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(U_(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:bl(n,r)}else if(Array.isArray(e))return q_(e,r);return B_(e,r)}function U_(e){return typeof e.toJSON=="function"}function B_(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>yy?"["+V_(e)+"]":"{ "+r.map(([i,s])=>i+": "+bl(s,t)).join(", ")+" }"}function q_(e,t){if(e.length===0)return"[]";if(t.length>yy)return"[Array]";const r=Math.min(z_,e.length),n=e.length-r,i=[];for(let s=0;s<r;++s)i.push(bl(e[s],t));return n===1?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}function V_(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const Q_=globalThis.process&&!0,W_=Q_?function(t,r){return t instanceof r}:function(t,r){if(t instanceof r)return!0;
vendor: 16,384 bytes, lines 50-61
50if(typeof t=="object"&&t!==null){var n;const i=r.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(i===s){const a=Ef(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm. 51 52Ensure that there is only one instance of "graphql" in the node_modules 53directory. If different versions of "graphql" are the dependencies of other 54relied on modules, use "resolutions" to ensure only one version is installed. 55 56https://yarnpkg.com/en/docs/selective-version-resolutions 57 58Duplicate "graphql" modules cannot be used at the same time since different 59versions may have different capabilities and behavior. The data from one 60version used in the function from another could produce confusing and 61spurious results.`)}}return!1};class wy{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||uo(!1,`Body must be a string. Received: ${Ef(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||uo(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||uo(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function H_(e){return W_(e,wy)}function G_(e,t){const r=new K_(e,t),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}class K_{constructor(t,r={}){const n=H_(t)?t:new wy(t);this._lexer=new j_(n),this._options=r,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(W.NAME);return this.node(t,{kind:te.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:te.DOCUMENT,definitions:this.many(W.SOF,this.parseDefinition,W.EOF)})}parseDefinition(){if(this.peek(W.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===W.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw Ge(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(W.BRACE_L))return this.node(t,{kind:te.OPERATION_DEFINITION,operation:ri.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(W.NAME)&&(n=this.parseName()),this.node(t,{kind:te.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(W.NAME);switch(t.value){case"query":return ri.QUERY;case"mutation":return ri.MUTATION;case"subscription":return ri.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(W.PAREN_L,this.parseVariableDefinition,W.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:te.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(W.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(W.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(W.DOLLAR),this.node(t,{kind:te.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:te.SELECTION_SET,selections:this.many(W.BRACE_L,this.parseSelection,W.BRACE_R)})}parseSelection(){return this.peek(W.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,i;return this.expectOptionalToken(W.COLON)?(n=r,i=this.parseName()):i=r,this.node(t,{kind:te.FIELD,alias:n,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(W.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(W.PAREN_L,r,W.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(W.COLON),this.node(r,{kind:te.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(W.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(W.NAME)?this.node(t,{kind:te.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:te.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:te.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:te.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const r=this._lexer.token;switch(r.kind){case W.BRACKET_L:return this.parseList(t);case W.BRACE_L:return this.parseObject(t);case W.INT:return this.advanceLexer(),this.node(r,{kind:te.INT,value:r.value});case W.FLOAT:return this.advanceLexer(),this.node(r,{kind:te.FLOAT,value:r.value});case W.STRING:case W.BLOCK_STRING:return this.parseStringLiteral();case W.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:te.BOOLEAN,value:!0});case"false":return this.node(r,{kind:te.BOOLEAN,value:!1});case"null":return this.node(r,{kind:te.NULL});default:return this.node(r,{kind:te.ENUM,value:r.value})}case W.DOLLAR:if(t)if(this.expectToken(W.DOLLAR),this._lexer.token.kind===W.NAME){const n=this._lexer.token.value;throw Ge(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:te.STRING,value:t.value,block:t.kind===W.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:te.LIST,values:this.any(W.BRACKET_L,r,W.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:te.OBJECT,fields:this.any(W.BRACE_L,r,W.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(W.COLON),this.node(r,{kind:te.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(W.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(W.AT),this.node(r,{kind:te.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(W.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(W.BRACKET_R),r=this.node(t,{kind:te.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(W.BANG)?this.node(t,{kind:te.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:te.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(W.STRING)||this.peek(W.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.many(W.BRACE_L,this.parseOperationTypeDefinition,W.BRACE_R);return this.node(t,{kind:te.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(W.COLON);const n=this.parseNamedType();return this.node(t,{kind:te.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:te.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:te.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(W.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(W.BRACE_L,this.parseFieldDefinition,W.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),i=this.parseArgumentDefs();this.expectToken(W.COLON);const s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:te.FIELD_DEFINITION,description:r,name:n,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(W.PAREN_L,this.parseInputValueDef,W.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(W.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(W.EQUALS)&&(s=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:te.INPUT_VALUE_DEFINITION,description:r,name:n,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:te.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:te.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(W.EQUALS)?this.delimitedMany(W.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:te.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(W.BRACE_L,this.parseEnumValueDefinition,W.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:te.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Ge(this._lexer.source,this._lexer.token.start,`${Ka(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:te.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(W.BRACE_L,this.parseInputValueDef,W.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===W.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(W.BRACE_L,this.parseOperationTypeDefinition,W.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:te.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:te.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:te.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:te.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:te.UNION_TYPE_EXTENSION,name:r,directives:n,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:te.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:te.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(W.AT);const n=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:te.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(W.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(Bu,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new __(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===
vendor: 4,907 bytes, lines 61-66
61t)return this.advanceLexer(),r;throw Ge(this._lexer.source,r.start,`Expected ${by(t)}, found ${Ka(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===W.NAME&&r.value===t)this.advanceLexer();else throw Ge(this._lexer.source,r.start,`Expected "${t}", found ${Ka(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===W.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return Ge(this._lexer.source,r.start,`Unexpected ${Ka(r)}.`)}any(t,r,n){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(n);)i.push(r.call(this));return i}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}return[]}many(t,r,n){this.expectToken(t);const i=[];do i.push(r.call(this));while(!this.expectOptionalToken(n));return i}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(r.kind!==W.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw Ge(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function Ka(e){const t=e.value;return by(e.kind)+(t!=null?` "${t}"`:"")}function by(e){return O_(e)?`"${e}"`:e}function J_(e){return`"${e.replace(Y_,X_)}"`}const Y_=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function X_(e){return Z_[e.charCodeAt(0)]}const Z_=["\\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"],xl=Object.freeze({});function Gt(e,t,r=hy){const n=new Map;for(const p of Object.values(te))n.set(p,eS(t,p));let i,s=Array.isArray(e),a=[e],o=-1,l=[],c=e,u,f;const h=[],v=[];do{o++;const p=o===a.length,g=p&&l.length!==0;if(p){if(u=v.length===0?void 0:h[h.length-1],c=f,f=v.pop(),g)if(s){c=c.slice();let b=0;for(const[_,S]of l){const k=_-b;S===null?(c.splice(k,1),b++):c[k]=S}}else{c={...c};for(const[b,_]of l)c[b]=_}o=i.index,a=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(f){if(u=s?o:a[o],c=f[u],c==null)continue;h.push(u)}let m;if(!Array.isArray(c)){var y,w;jp(c)||uo(!1,`Invalid AST Node: ${Ef(c)}.`);const b=p?(y=n.get(c.kind))===null||y===void 0?void 0:y.leave:(w=n.get(c.kind))===null||w===void 0?void 0:w.enter;if(m=b?.call(t,c,u,f,h,v),m===xl)break;if(m===!1){if(!p){h.pop();continue}}else if(m!==void 0&&(l.push([u,m]),!p))if(jp(m))c=m;else{h.pop();continue}}if(m===void 0&&g&&l.push([u,c]),p)h.pop();else{var x;i={inArray:s,index:o,keys:a,edits:l,prev:i},s=Array.isArray(c),a=s?c:(x=r[c.kind])!==null&&x!==void 0?x:[],o=-1,l=[],f&&v.push(f),f=c}}while(i!==void 0);return l.length!==0?l[l.length-1][1]:e}function eS(e,t){const r=e[t];return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function tS(e){return Gt(e,nS)}const rS=80,nS={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>se(e.definitions,` 62 63`)},OperationDefinition:{leave(e){const t=me("(",se(e.variableDefinitions,", "),")"),r=se([e.operation,se([e.name,t]),se(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+me(" = ",r)+me(" ",se(n," "))},SelectionSet:{leave:({selections:e})=>$t(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const s=me("",e,": ")+t;let a=s+me("(",se(r,", "),")");return a.length>rS&&(a=s+me(`( 64`,fo(se(r,` 65`)),` 66)`)),se([a,se(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+me(" ",se(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>se(["...",me("on ",e),se(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${me("(",se(r,", "),")")} on ${t} ${me("",se(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e}
66,StringValue:{leave:({value:e,block:t})=>t?N_(e):J_(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+se(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+se(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+me("(",se(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>me("",e,` 67`)+se(["schema",se(t," "),$t(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>me("",e,` 68`)+se(["scalar",t,se(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>me("",e,` 69`)+se(["type",t,me("implements ",se(r," & ")),se(n," "),$t(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>me("",e,` 70`)+t+(Tp(r)?me(`( 71`,fo(se(r,` 72`)),` 73)`):me("(",se(r,", "),")"))+": "+n+me(" ",se(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>me("",e,` 74`)+se([t+": "+r,me("= ",n),se(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>me("",e,` 75`)+se(["interface",t,me("implements ",se(r," & ")),se(n," "),$t(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>me("",e,` 76`)+se(["union",t,se(r," "),me("= ",se(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>me("",e,` 77`)+se(["enum",t,se(r," "),$t(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>me("",e,` 78`)+se([t,se(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>me("",e,` 79`)+se(["input",t,se(r," "),$t(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>me("",e,` 80`)+"directive @"+t+(Tp(r)?me(`( 81`,fo(se(r,` 82`)),` 83)`):me("(",se(r,", "),")"))+(n?" repeatable":"")+" on "+se(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>se(["extend schema",se(e," "),$t(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>se(["extend scalar",e,se(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>se(["extend type",e,me("implements ",se(t," & ")),se(r," "),$t(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>se(["extend interface",e,me("implements ",se(t," & ")),se(r," "),$t(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>se(["extend union",e,se(t," "),me("= ",se(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>se(["extend enum",e,se(t," "),$t(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>se(["extend input",e,se(t," "),$t(r)]," ")}};function se(e,t=""){var r;return(r=e?.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function $t(e){return me(`{ 84`,fo(se(e,` 85`)),` 86}`)}function me(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function fo(e){return me(" ",e.replace(/\n/g,` 87 `))}function Tp(e){var t;return(t=e?.some(r=>r.includes(` 88`)))!==null&&t!==void 0?t:!1}function Pp(e){return e.kind===te.FIELD||e.kind===te.FRAGMENT_SPREAD||e.kind===te.INLINE_FRAGMENT}function ma(e,t){var r=e.directives;return!r||!r.length?!0:aS(r).every(function(n){var i=n.directive,s=n.ifArgument,a=!1;return s.value.kind==="Variable"?(a=t&&t[s.value.name.value],ne(a!==void 0,78,i.name.value)):a=s.value.value,i.name.value==="skip"?!a:a})}function ra(e,t,r){var n=new Set(e),i=n.size;return Gt(t,{Directive:function(s){if(n.delete(s.name.value)&&(!r||!n.size))return xl}}),r?!n.size:n.size<i}function iS(e){return e&&ra(["client","export"],e,!0)}function sS(e){var t=e.name.value;return t==="skip"||t==="include"}function aS(e){var t=[];return e&&e.length&&e.forEach(function(r){if(sS(r)){var n=r.arguments,i=r.name.value;ne(n&&n.length===1,79,i);var s=n[0];ne(s.name&&s.name.value==="if",80,i);var a=s.value;ne(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),81,i),t.push({directive:r,ifArgument:s})}}),t}function oS(e){var t,r,n=(t=e.directives)===null||t===void 0?void 0:t.find(function(s){var a=s.name;return a.value==="unmask"});if(!n)return"mask";var i=(r=n.arguments)===null||r===void 0?void 0:r.find(function(s){var a=s.name;return a.value==="mode"});return globalThis.__DEV__!==!1&&i&&(i.value.kind===te.VARIABLE?globalThis.__DEV__!==!1&&ne.warn(82):i.value.kind!==te.STRING?globalThis.__DEV__!==!1&&ne.warn(83):i.value.value!=="migrate"&&globalThis.__DEV__!==!1&&ne.warn(84,i.value.value)),i&&"value"in i.value&&i.value.value==="migrate"?"migrate":"unmask"}const lS=()=>Object.create(null),{forEach:cS,slice:Ip}=Array.prototype,{hasOwnProperty:uS}=Object.prototype;class _r{constructor(t=!0,r=lS){this.weakness=t,this.makeData=r}lookup(){return this.lookupArray(arguments)}lookupArray(t){let r=this;return cS.call(t,n=>r=r.getChildTrie(n)),uS.call(r,"data")?r.data:r.data=this.makeData(Ip.call(t))}peek(){return this.peekArray(arguments)}peekArray(t){let r=this;for(let n=0,i=t.length;r&&n<i;++n){const s=r.mapFor(t[n],!1);r=s&&s.get(t[n])}return r&&r.data}remove(){return this.removeArray(arguments)}removeArray(t){let r;if(t.length){const n=t[0],i=this.mapFor(n,!1),s=i&&i.get(n);s&&(r=s.removeArray(Ip.call(t,1)),!s.data&&!s.weak&&!(s.strong&&s.strong.size)&&i.delete(n))}else r=this.data,delete this.data;return r}getChildTrie(t){const r=this.mapFor(t,!0);let n=r.get(t);return n||r.set(t,n=new _r(this.weakness,this.makeData)),n}mapFor(t,r){return this.weakness&&dS(t)?this.weak||(r?this.weak=new WeakMap:void 0):this.strong||(r?this.strong=new Map:void 0)}}function dS(e){switch(typeof e){case"object":if(e===null)break;case"function":return!0}return!1}var xy=Vt(function(){return navigator.product})=="ReactNative",An=typeof WeakMap=="function"&&!(xy&&!global.HermesInternal),kf=typeof WeakSet=="function",Cf=typeof Symbol=="function"&&typeof Symbol.for=="function",_l=Cf&&Symbol.asyncIterator,_y=typeof Vt(function(){return window.document.createElement})=="function",fS=Vt(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,hS=(_y||xy)&&!fS;function Me(e){return e!==null&&typeof e=="object"}function pS(e,t){var r=t,n=[];e.definitions.forEach(function(s){if(s.kind==="OperationDefinition")throw ut(85,s.operation,s.name?" named '".concat(s.name.value,"'"):"");s.kind==="FragmentDefinition"&&n.push(s)}),typeof r>"u"&&(ne(n.length===1,86,n.length),r=n[0].name.value);var i=O(O({},e),{definitions:st([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)});return i}function Mi(e){e===void 0&&(e=[]);var t={};return e.forEach(function(r){t[r.name.value]=r}),t}function Sl(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var r=e.name.value;if(typeof t=="function")return t(r);var n=t&&t[r];return ne(n,87,r),n||null}default:return null}}function mS(e){var t=!0;return Gt(e,{FragmentSpread:function(r){if(t=!!r.directives&&r.directives.some(function(n){return n.name.value==="unmask"}),!t)return xl}}),t}function gS(){}class Vu{constructor(t=1/0,r=gS){this.max=t,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const r=this.getNode(t);return r&&r.value}get size(){return this.map.size}getNode(t){const r=this.map.get(t);if(r&&r!==this.newest){const{older:n,newer:i}=r;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r}set(t,r){let n=this.getNode(t);
88return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(t,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const r=this.map.get(t);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(t),this.dispose(r.value,t),!0):!1}}function Qu(){}const vS=Qu,yS=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},wS=typeof WeakMap<"u"?WeakMap:Map,bS=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:Qu,unregister:Qu}},xS=10024;class Ho{constructor(t=1/0,r=vS){this.max=t,this.dispose=r,this.map=new wS,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let i=0;i<xS;i++){const s=n.next().value;if(!s)break;this.unfinalizedNodes.delete(s);const a=s.key;delete s.key,s.keyRef=new yS(a),this.registry.register(a,s,s)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new bS(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const r=this.getNode(t);return r&&r.value}getNode(t){const r=this.map.get(t);if(r&&r!==this.newest){const{older:n,newer:i}=r;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r}set(t,r){let n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(t,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(t){t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.size--;const r=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,r),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),r&&this.map.delete(r)}delete(t){const r=this.map.get(t);return r?(this.deleteNode(r),!0):!1}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var Cc=new WeakSet;function Sy(e){e.size<=(e.max||-1)||Cc.has(e)||(Cc.add(e),setTimeout(function(){e.clean(),Cc.delete(e)},100))}var Nf=function(e,t){var r=new Ho(e,t);return r.set=function(n,i){var s=Ho.prototype.set.call(this,n,i);return Sy(this),s},r},_S=function(e,t){var r=new Vu(e,t);return r.set=function(n,i){var s=Vu.prototype.set.call(this,n,i);return Sy(this),s},r},SS=Symbol.for("apollo.cacheSize"),ir=O({},zu[SS]),fn={};function jf(e,t){fn[e]=t}var ES=globalThis.__DEV__!==!1?jS:void 0,kS=globalThis.__DEV__!==!1?OS:void 0,CS=globalThis.__DEV__!==!1?Ey:void 0;function NS(){var e={parser:1e3,canonicalStringify:1e3,print:2e3,"documentTransform.cache":2e3,"queryManager.getDocumentInfo":2e3,"PersistedQueryLink.persistedQueryHashes":2e3,"fragmentRegistry.transform":2e3,"fragmentRegistry.lookup":1e3,"fragmentRegistry.findFragmentSpreads":4e3,"cache.fragmentQueryDocuments":1e3,"removeTypenameFromVariables.getVariableDefinitions":2e3,"inMemoryCache.maybeBroadcastWatch":5e3,"inMemoryCache.executeSelectionSet":5e4,"inMemoryCache.executeSubSelectedArray":1e4};return Object.fromEntries(Object.entries(e).map(function(t){var r=t[0],n=t[1];return[r,ir[r]||n]}))}function jS(){var e,t,r,n,i;if(globalThis.__DEV__===!1)throw new Error("only supported in development mode");return{limits:NS(),sizes:O({print:(e=fn.print)===null||e===void 0?void 0:e.call(fn),parser:(t=fn.parser)===null||t===void 0?void 0:t.call(fn),canonicalStringify:(r=fn.canonicalStringify)===null||r===void 0?void 0:r.call(fn),links:Hu(this.link),queryManager:{getDocumentInfo:this.queryManager.transformCache.size,documentTransforms:Cy(this.queryManager.documentTransform)}},(i=(n=this.cache).getMemoryInternals)===null||i===void 0?void 0:i.call(n))}}function Ey(){return{cache:{fragmentQueryDocuments:Fr(this.getFragmentDoc)}}}function OS(){var e=this.config.fragments;return O(O({},Ey.apply(this)),{addTypenameDocumentTransform:Cy(this.addTypenameTransform),inMemoryCache:{executeSelectionSet:Fr(this.storeReader.executeSelectionSet),executeSubSelectedArray:Fr(this.storeReader.executeSubSelectedArray),maybeBroadcastWatch:Fr(this.maybeBroadcastWatch)},fragmentRegistry:{findFragmentSpreads:Fr(e?.findFragmentSpreads),lookup:Fr(e?.lookup),transform:Fr(e?.transform)}})}function TS(e){return!!e&&"dirtyKey"in e}function Fr(e){return TS(e)?e.size:void 0}function ky(e){return e!=null}function Cy(e){return Wu(e).map(function(t){return{cache:t}})}function Wu(e){return e?st(st([Fr(e?.performWork)],Wu(e?.left),!0),Wu(e?.right),!0).filter(ky):[]}function Hu(e){var t;return e?st(st([(t=e?.getMemoryInternals)===null||t===void 0?void 0:t.call(e)],Hu(e?.left),!0),Hu(e?.right),!0).filter(ky):[]}var Kr=Object.assign(function(t){return JSON.stringify(t,PS)},{reset:function(){ni=new _S(ir.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&jf("canonicalStringify",function(){return ni.size});var ni;Kr.reset();function PS(e,t){if(t&&typeof t=="object"){var r=Object.getPrototypeOf(t);if(r===Object.prototype||r===null){var n=Object.keys(t);if(n.every(IS))return t;var i=JSON.stringify(n),s=ni.get(i);if(!s){n.sort();var a=JSON.stringify(n);s=ni.get(a)||n,ni.set(i,s),ni.set(a,s)}var o=Object.create(r);
88return s.forEach(function(l){o[l]=t[l]}),o}}return t}function IS(e,t,r){return t===0||r[t-1]<=e}function hi(e){return{__ref:String(e)}}function Se(e){return!!(e&&typeof e=="object"&&typeof e.__ref=="string")}function RS(e){return Me(e)&&e.kind==="Document"&&Array.isArray(e.definitions)}function FS(e){return e.kind==="StringValue"}function AS(e){return e.kind==="BooleanValue"}function LS(e){return e.kind==="IntValue"}function MS(e){return e.kind==="FloatValue"}function DS(e){return e.kind==="Variable"}function zS(e){return e.kind==="ObjectValue"}function $S(e){return e.kind==="ListValue"}function US(e){return e.kind==="EnumValue"}function BS(e){return e.kind==="NullValue"}function ki(e,t,r,n){if(LS(r)||MS(r))e[t.value]=Number(r.value);else if(AS(r)||FS(r))e[t.value]=r.value;else if(zS(r)){var i={};r.fields.map(function(a){return ki(i,a.name,a.value,n)}),e[t.value]=i}else if(DS(r)){var s=(n||{})[r.name.value];e[t.value]=s}else if($S(r))e[t.value]=r.values.map(function(a){var o={};return ki(o,t,a,n),o[t.value]});else if(US(r))e[t.value]=r.value;else if(BS(r))e[t.value]=null;else throw ut(96,t.value,r.kind)}function qS(e,t){var r=null;e.directives&&(r={},e.directives.forEach(function(i){r[i.name.value]={},i.arguments&&i.arguments.forEach(function(s){var a=s.name,o=s.value;return ki(r[i.name.value],a,o,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(i){var s=i.name,a=i.value;return ki(n,s,a,t)})),Ny(e.name.value,n,r)}var VS=["connection","include","skip","client","rest","export","nonreactive"],ls=Kr,Ny=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key)if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(o){i[o]=t[o]}),"".concat(r.connection.key,"(").concat(ls(i),")")}else return r.connection.key;var s=e;if(t){var a=ls(t);s+="(".concat(a,")")}return r&&Object.keys(r).forEach(function(o){VS.indexOf(o)===-1&&(r[o]&&Object.keys(r[o]).length?s+="@".concat(o,"(").concat(ls(r[o]),")"):s+="@".concat(o))}),s},{setStringify:function(e){var t=ls;return ls=e,t}});function El(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(n){var i=n.name,s=n.value;return ki(r,i,s,t)}),r}return null}function wr(e){return e.alias?e.alias.value:e.name.value}function Gu(e,t,r){for(var n,i=0,s=t.selections;i<s.length;i++){var a=s[i];if(Xr(a)){if(a.name.value==="__typename")return e[wr(a)]}else n?n.push(a):n=[a]}if(typeof e.__typename=="string")return e.__typename;if(n)for(var o=0,l=n;o<l.length;o++){var a=l[o],c=Gu(e,Sl(a,r).selectionSet,r);if(typeof c=="string")return c}}function Xr(e){return e.kind==="Field"}function QS(e){return e.kind==="InlineFragment"}function Di(e){ne(e&&e.kind==="Document",88);var t=e.definitions.filter(function(r){return r.kind!=="FragmentDefinition"}).map(function(r){if(r.kind!=="OperationDefinition")throw ut(89,r.kind);return r});return ne(t.length<=1,90,t.length),e}function On(e){return Di(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function xs(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&!!t.name}).map(function(t){return t.name.value})[0]||null}function zi(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function jy(e){var t=On(e);return ne(t&&t.operation==="query",91),t}function Oy(e){ne(e.kind==="Document",92),ne(e.definitions.length<=1,93);var t=e.definitions[0];return ne(t.kind==="FragmentDefinition",94),t}function ga(e){Di(e);for(var t,r=0,n=e.definitions;r<n.length;r++){var i=n[r];if(i.kind==="OperationDefinition"){var s=i.operation;if(s==="query"||s==="mutation"||s==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw ut(95)}function Of(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(function(n){n.defaultValue&&ki(t,n.variable.name,n.defaultValue)}),t}let Ye=null;const Rp={};let WS=1;const HS=()=>class{constructor(){this.id=["slot",WS++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=Ye;t;t=t.parent)if(this.id in t.slots){const r=t.slots[this.id];if(r===Rp)break;return t!==Ye&&(Ye.slots[this.id]=r),!0}return Ye&&(Ye.slots[this.id]=Rp),!1}getValue(){if(this.hasValue())return Ye.slots[this.id]}withValue(t,r,n,i){const s={__proto__:null,[this.id]:t},a=Ye;Ye={parent:a,slots:s};try{return r.apply(i,n)}finally{Ye=a}}static bind(t){const r=Ye;return function(){const n=Ye;try{return Ye=r,t.apply(this,arguments)}finally{Ye=n}}}static noContext(t,r,n){if(Ye){const i=Ye;try{return Ye=null,t.apply(n,r)}finally{Ye=i}}else return t.apply(n,r)}};function Fp(e){try{return e()}catch{}}const Nc="@wry/context:Slot",GS=Fp(()=>globalThis)||Fp(()=>global)||Object.create(null),Ap=GS,va=Ap[Nc]||Array[Nc]||(function(e){try{Object.defineProperty(Ap,Nc,{value:e,enumerable:!1,writable:!1,
88configurable:!0})}finally{return e}})(HS()),{bind:Tj,noContext:Pj}=va,kl=new va,{hasOwnProperty:KS}=Object.prototype,Tf=Array.from||function(e){const t=[];return e.forEach(r=>t.push(r)),t};function Pf(e){const{unsubscribe:t}=e;typeof t=="function"&&(e.unsubscribe=void 0,t())}const na=[],JS=100;function Ci(e,t){if(!e)throw new Error(t||"assertion failure")}function Ty(e,t){const r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function Py(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function Iy(e){return e.slice(0)}class Cl{constructor(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Cl.count}peek(){if(this.value.length===1&&!Zr(this))return Lp(this),this.value[0]}recompute(t){return Ci(!this.recomputing,"already recomputing"),Lp(this),Zr(this)?YS(this,t):Py(this.value)}setDirty(){this.dirty||(this.dirty=!0,Ry(this),Pf(this))}dispose(){this.setDirty(),Dy(this),If(this,(t,r)=>{t.setDirty(),zy(t,this)})}forget(){this.dispose()}dependOn(t){t.add(this),this.deps||(this.deps=na.pop()||new Set),this.deps.add(t)}forgetDeps(){this.deps&&(Tf(this.deps).forEach(t=>t.delete(this)),this.deps.clear(),na.push(this.deps),this.deps=null)}}Cl.count=0;function Lp(e){const t=kl.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Zr(e)?Ay(t,e):Ly(t,e),t}function YS(e,t){return Dy(e),kl.withValue(e,XS,[e,t]),eE(e,t)&&ZS(e),Py(e.value)}function XS(e,t){e.recomputing=!0;const{normalizeResult:r}=e;let n;r&&e.value.length===1&&(n=Iy(e.value)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),r&&n&&!Ty(n,e.value))try{e.value[0]=r(e.value[0],n[0])}catch{}}catch(i){e.value[1]=i}e.recomputing=!1}function Zr(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function ZS(e){e.dirty=!1,!Zr(e)&&Fy(e)}function Ry(e){If(e,Ay)}function Fy(e){If(e,Ly)}function If(e,t){const r=e.parents.size;if(r){const n=Tf(e.parents);for(let i=0;i<r;++i)t(n[i],e)}}function Ay(e,t){Ci(e.childValues.has(t)),Ci(Zr(t));const r=!Zr(e);if(!e.dirtyChildren)e.dirtyChildren=na.pop()||new Set;else if(e.dirtyChildren.has(t))return;e.dirtyChildren.add(t),r&&Ry(e)}function Ly(e,t){Ci(e.childValues.has(t)),Ci(!Zr(t));const r=e.childValues.get(t);r.length===0?e.childValues.set(t,Iy(t.value)):Ty(r,t.value)||e.setDirty(),My(e,t),!Zr(e)&&Fy(e)}function My(e,t){const r=e.dirtyChildren;r&&(r.delete(t),r.size===0&&(na.length<JS&&na.push(r),e.dirtyChildren=null))}function Dy(e){e.childValues.size>0&&e.childValues.forEach((t,r)=>{zy(e,r)}),e.forgetDeps(),Ci(e.dirtyChildren===null)}function zy(e,t){t.parents.delete(e),e.childValues.delete(t),My(e,t)}function eE(e,t){if(typeof e.subscribe=="function")try{Pf(e),e.unsubscribe=e.subscribe.apply(null,t)}catch{return e.setDirty(),!1}return!0}const tE={setDirty:!0,dispose:!0,forget:!0};function $y(e){const t=new Map;function r(n){const i=kl.getValue();if(i){let s=t.get(n);s||t.set(n,s=new Set),i.dependOn(s)}}return r.dirty=function(i,s){const a=t.get(i);if(a){const o=s&&KS.call(tE,s)?s:"setDirty";Tf(a).forEach(l=>l[o]()),t.delete(i),Pf(a)}},r}let Mp;function rE(...e){return(Mp||(Mp=new _r(typeof WeakMap=="function"))).lookupArray(e)}const jc=new Set;function ia(e,{max:t=Math.pow(2,16),keyArgs:r,makeCacheKey:n=rE,normalizeResult:i,subscribe:s,cache:a=Vu}=Object.create(null)){const o=typeof a=="function"?new a(t,h=>h.dispose()):a,l=function(){const h=n.apply(null,r?r.apply(null,arguments):arguments);if(h===void 0)return e.apply(null,arguments);let v=o.get(h);v||(o.set(h,v=new Cl(e)),v.normalizeResult=i,v.subscribe=s,v.forget=()=>o.delete(h));const y=v.recompute(Array.prototype.slice.call(arguments));return o.set(h,v),jc.add(o),kl.hasValue()||(jc.forEach(w=>w.clean()),jc.clear()),y};Object.defineProperty(l,"size",{get:()=>o.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:r,makeCacheKey:n,normalizeResult:i,subscribe:s,cache:o});function c(h){const v=h&&o.get(h);v&&v.setDirty()}l.dirtyKey=c,l.dirty=function(){c(n.apply(null,arguments))};function u(h){const v=h&&o.get(h);if(v)return v.peek()}l.peekKey=u,l.peek=function(){return u(n.apply(null,arguments))};function f(h){return h?o.delete(h):!1}return l.forgetKey=f,l.forget=function(){return f(n.apply(null,arguments))},l.makeCacheKey=n,l.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(l)}function nE(e){return e}var Uy=(function(){function e(t,r){r===void 0&&(r=Object.create(null)),this.resultCache=kf?new WeakSet:new Set,this.transform=t,r.getCacheKey&&(this.getCacheKey=r.getCacheKey),this.cached=r.cache!==!1,this.resetCache()}return e.prototype.getCacheKey=function(t){return[t]},e.identity=function(){return new e(nE,{cache:!1})},e.split=function(t,r,n){return n===void 0&&(n=e.identity()),Object.assign(new e(function(i){var s=t(i)?r:n;return s.transformDocument(i)},{cache:!1}),{left:r,right:n})},e.prototype.resetCache=function(){var t=this;if(this.cached){var r=new _r(An);this.performWork=ia(e.prototype.performWork.bind(this),{makeCacheKey:function(n){var i=t.getCacheKey(n);if(i)return ne(Array.isArray(i),77),r.lookupArray(i)},max:ir["documentTransform.cache"],cache:Ho})}},e.prototype.performWork=function(t){return Di(t),this.transform(t)},e.prototype.transformDocument=function(t){if(this.resultCache.has(t))return t;var r=this.performWork(t);return this.resultCache.add(r),r},e.prototype.concat=function(t){var r=this;return Object.assign(new e(function(n){return t.transformDocument(r.transformDocument(n))},{cache:!1}),{left:this,right:t})},e})(),Rs,vn=Object.assign(function(e){var t=Rs.get(e);return t||(t=tS(e),Rs.set(e,t)),t},{reset:function(){Rs=new Nf(ir.print||2e3)}});vn.reset(),globalThis.__DEV__!==!1&&jf("print",function(){return Rs?Rs.size:0});var De=Array.isArray;function Dt(e){return Array.isArray(e)&&e.length>0}var Dp={kind:te.FIELD,name:{kind:te.NAME,value:"__typename"}};function By(e,t){return!e||e.selectionSet.selections.every(function(r){return r.kind===te.FRAGMENT_SPREAD&&By(t[r.name.value],t)})}function iE(e){return By(On(e)||Oy(e),Mi(zi(e)))?null:e}function sE(e){var t=new Map,r=new Map;return e.forEach(function(n){n&&(n.name?t.set(n.name,n):n.test&&r.set(n.test,n))}),function(n){var i=t.get(n.name.value);return!i&&r.size&&r.forEach(function(s,a){a(n)&&(i=s)}),i}}function zp(e){var t=new Map;return function(n){n===void 0&&(n=e);var i=t.get(n);return i||t.set(n,i={variables:new Set,fragmentSpreads:new Set}),i}}function qy(e,t){Di(t);for(var r=zp(""),n=zp(""),i=function(p){for(var g=0,m=void 0;g<p.length&&(m=p[g]);++g)if(!De(m)){if(m.kind===te.OPERATION_DEFINITION)return r(m.name&&m.name.value);if(m.kind===te.FRAGMENT_DEFINITION)return n(m.name.value)}return globalThis.__DEV__!==!1&&ne.error(97),null},s=0,a=t.definitions.length-1;a>=0;--a)t.definitions[a].kind===te.OPERATION_DEFINITION&&++s;var o=sE(e),l=function(p){return Dt(p)&&p.map(o).some(function(g){return g&&g.remove})},c=new Map,u=!1,f={enter:function(p){if(l(p.directives))return u=!0,null}},h=Gt(t,{Field:f,InlineFragment:f,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(p,g,m,b,_){var S=i(_);S&&S.variables.add(p.name.value)}},FragmentSpread:{enter:function(p,g,m,b,_){if(l(p.directives))return u=!0,null;var S=i(_);S&&S.fragmentSpreads.add(p.name.value)}},FragmentDefinition:{enter:function(p,g,m,b){c.set(JSON.stringify(b),p)},leave:function(p,g,m,b){var _=c.get(JSON.stringify(b));if(p===_)return p;if(s>0&&p.selectionSet.selections.every(function(S){return S.kind===te.FIELD&&S.name.value==="__typename"}))return n(p.name.value).removed=!0,u=!0,null}},Directive:{leave:function(p){if(o(p))return u=!0,null}}});if(!u)return t;var v=function(p){return p.transitiveVars||(p.transitiveVars=new Set(p.variables),p.removed||p.fragmentSpreads.forEach(function(g){v(n(g)).transitiveVars.forEac
88h(function(m){p.transitiveVars.add(m)})})),p},y=new Set;h.definitions.forEach(function(p){p.kind===te.OPERATION_DEFINITION?v(r(p.name&&p.name.value)).fragmentSpreads.forEach(function(g){y.add(g)}):p.kind===te.FRAGMENT_DEFINITION&&s===0&&!n(p.name.value).removed&&y.add(p.name.value)}),y.forEach(function(p){v(n(p)).fragmentSpreads.forEach(function(g){y.add(g)})});var w=function(p){return!!(!y.has(p)||n(p).removed)},x={enter:function(p){if(w(p.name.value))return null}};return iE(Gt(h,{FragmentSpread:x,FragmentDefinition:x,OperationDefinition:{leave:function(p){if(p.variableDefinitions){var g=v(r(p.name&&p.name.value)).transitiveVars;if(g.size<p.variableDefinitions.length)return O(O({},p),{variableDefinitions:p.variableDefinitions.filter(function(m){return g.has(m.variable.name.value)})})}}}}))}var Rf=Object.assign(function(e){return Gt(e,{SelectionSet:{enter:function(t,r,n){if(!(n&&n.kind===te.OPERATION_DEFINITION)){var i=t.selections;if(i){var s=i.some(function(o){return Xr(o)&&(o.name.value==="__typename"||o.name.value.lastIndexOf("__",0)===0)});if(!s){var a=n;if(!(Xr(a)&&a.directives&&a.directives.some(function(o){return o.name.value==="export"})))return O(O({},t),{selections:st(st([],i,!0),[Dp],!1)})}}}}}})},{added:function(e){return e===Dp}});function aE(e){var t=ga(e),r=t.operation;if(r==="query")return e;var n=Gt(e,{OperationDefinition:{enter:function(i){return O(O({},i),{operation:"query"})}}});return n}function Vy(e){Di(e);var t=qy([{test:function(r){return r.name.value==="client"},remove:!0}],e);return t}function oE(e){return Di(e),Gt(e,{FragmentSpread:function(t){var r;if(!(!((r=t.directives)===null||r===void 0)&&r.some(function(n){return n.name.value==="unmask"})))return O(O({},t),{directives:st(st([],t.directives||[],!0),[{kind:te.DIRECTIVE,name:{kind:te.NAME,value:"nonreactive"}}
vendor: 7,133 bytes, lines 88-89
88],!1)})}})}var lE=Object.prototype.hasOwnProperty;function $p(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nl(e)}function Nl(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new en,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var cE=function(e,t,r){return this.merge(e[r],t[r])},en=(function(){function e(t){t===void 0&&(t=cE),this.reconciler=t,this.isObject=Me,this.pastCopies=new Set}return e.prototype.merge=function(t,r){for(var n=this,i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];return Me(r)&&Me(t)?(Object.keys(r).forEach(function(a){if(lE.call(t,a)){var o=t[a];if(r[a]!==o){var l=n.reconciler.apply(n,st([t,r,a],i,!1));l!==o&&(t=n.shallowCopyForMerge(t),t[a]=l)}}else t=n.shallowCopyForMerge(t),t[a]=r[a]}),t):r},e.prototype.shallowCopyForMerge=function(t){return Me(t)&&(this.pastCopies.has(t)||(Array.isArray(t)?t=t.slice(0):t=O({__proto__:Object.getPrototypeOf(t)},t),this.pastCopies.add(t))),t},e})();function uE(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=dE(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 89In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dE(e,t){if(e){if(typeof e=="string")return Up(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Up(e,t)}}function Up(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ff(e,t,r){return t&&Bp(e.prototype,t),r&&Bp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var Af=function(){return typeof Symbol=="function"},Lf=function(e){return Af()&&!!Symbol[e]},Mf=function(e){return Lf(e)?Symbol[e]:"@@"+e};Af()&&!Lf("observable")&&(Symbol.observable=Symbol("observable"));var fE=Mf("iterator"),Ku=Mf("observable"),Qy=Mf("species");function Go(e,t){var r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function cs(e){var t=e.constructor;return t!==void 0&&(t=t[Qy],t===null&&(t=void 0)),t!==void 0?t:Ne}function hE(e){return e instanceof Ne}function Ni(e){Ni.log?Ni.log(e):setTimeout(function(){throw e})}function ho(e){Promise.resolve().then(function(){try{e()}catch(t){Ni(t)}})}function Wy(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var r=Go(t,"unsubscribe");r&&r.call(t)}}catch(n){Ni(n)}}function Ju(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function pE(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(Hy(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function Hy(e,t,r){e._state="running";var n=e._observer;try{var i=Go(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(Ju(e),i)i.call(n,r);else throw r;break;case"complete":Ju(e),i&&i.call(n);break}}catch(s){Ni(s)}e._state==="closed"?Wy(e):e._state==="running"&&(e._state="ready")}function Oc(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],ho(function(){return pE(e)});return}Hy(e,t,r)}}var mE=(function(){function e(r,n){this._cleanup=void 0,this._observer=r,this._queue=void 0,this._state="initializing";var i=new gE(this);try{this._cleanup=n.call(void 0,i)}catch(s){i.error(s)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(Ju(this),Wy(this))},Ff(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e})(),gE=(function(){function e(r){this._subscription=r}var t=e.prototype;return t.next=function(n){Oc(this._subscription,"next",n)},t.error=function(n){Oc(this._subscription,"error",n)},t.complete=function(){Oc(this._subscription,"complete")},Ff(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e})(),Ne=(function(){function e(r){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof r!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=r}var t=e.prototype;return t.subscribe=function(n){return(typeof n!="object"||n===null)&&(n={next:n,error:arguments[1],complete:arguments[2]}),new mE(n,this._subscriber)},t.forEach=function(n){var i=this;return new Promise(function(s,a){if(typeof n!="function"){a(new TypeError(n+" is not a function"));return}function o(){l.unsubscribe(),s()}var l=i.subscribe({next:function(c){try{n(c,o)}catch(u){a(u),l.unsubscribe()}},error:a,complete:s})})},t.map=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var s=cs(this);return new s(function(a){return i.subscribe({next:function(o){try{o=n(o)}catch(l){return a.error(l)}a.next(o)},error:function(o){a.error(o)},complete:function(){a.complete()}})})},t.filter=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var s=cs(this);return new s(function(a){return i.subscribe({next:function(o){try{if(!n(o))return}catch(l){return a.error(l)}a.next(o)},error:function(o){a.error(o)},complete:function(){a.complete()}})})},t.reduce=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var s=cs(this),a=arguments.length>1,o=!1,l=arguments[1],c=l;return new s(function(u){return i.subscribe({next:function(f){var h=!o;if(o=!0,!h||a)try{c=n(c,f)}catch(v){return u.error(v)}else c=f},error:function(f){u.error(f)},complete:function(){if(!o&&!a)return u.error(new TypeError("Cannot reduce an empty sequence"));u.next(c),u.complete()}})})},t.concat=function(){for(var n=this,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];var o=cs(this);return new o(function(l){var c,u=0;function f(h){c=h.subscribe({next:function(v){l.next(v)},error:function(v){l.error(v)},complete:function(){u===s.length?(c=void 0,l.complete()):f(o.from(s[u++]))}})}return f(n),function(){c&&(c.unsubscribe(),c=void 0)}})},t.flatMap=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var s=cs(this);return new s(function(a){var o=[],l=i.subscribe({next:function(u){if(n)try{u=n(u)}catch(h){return a.error(h)}var f=s.from(u).subscribe({next:function(h){a.next(h)},error:function(h){a.error(h)},complete:function(){var h=o.indexOf(f);h>=0&&o.splice(h,1),c()}});o.push(f)},error:function(u){a.error(u)},complete:function(){c()}});function c(){l.closed&&o.length===0&&a.complete()}return function(){o.forEach(function(u){return u.unsubscribe()}),l.unsubscribe()}})},t[Ku]=function(){return this},e.from=function(n){var i=typeof this=="function"?this:e;if(n==null)throw new TypeError(n+" is not an object");var s=Go(n,Ku);
89if(s){var a=s.call(n);if(Object(a)!==a)throw new TypeError(a+" is not an object");return hE(a)&&a.constructor===i?a:new i(function(o){return a.subscribe(o)})}if(Lf("iterator")&&(s=Go(n,fE),s))return new i(function(o){ho(function(){if(!o.closed){for(var l=uE(s.call(n)),c;!(c=l()).done;){var u=c.value;if(o.next(u),o.closed)return}o.complete()}})});if(Array.isArray(n))return new i(function(o){ho(function(){if(!o.closed){for(var l=0;l<n.length;++l)if(o.next(n[l]),o.closed)return;o.complete()}})});throw new TypeError(n+" is not observable")},e.of=function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var a=typeof this=="function"?this:e;return new a(function(o){ho(function(){if(!o.closed){for(var l=0;l<i.length;++l)if(o.next(i[l]),o.closed)return;o.complete()}})})},Ff(e,null,[{key:Qy,get:function(){return this}}]),e})();Af()&&Object.defineProperty(Ne,Symbol("extensions"),{value:{symbol:Ku,hostReportError:Ni},configurable:!0});function vE(e){var t,r=e.Symbol;if(typeof r=="function")if(r.observable)t=r.observable;else{typeof r.for=="function"?t=r.for("https://github.com/benlesh/symbol-observable"):t=r("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch{}}else t="@@observable";return t}var Bn;typeof self<"u"?Bn=self:typeof window<"u"?Bn=window:typeof global<"u"?Bn=global:typeof _d<"u"?Bn=_d:Bn=Function("return this")(),vE(Bn);var qp=Ne.prototype,Vp="@@observable";qp[Vp]||(qp[Vp]=function(){return this});function yE(e){return e.catch(function(){}),e}var wE=Object.prototype.toString;function Gy(e){return Yu(e)}function Yu(e,t){switch(wE.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(i,s){r[s]=Yu(i,t)}),r}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(i){n[i]=Yu(e[i],t)}),n}default:return e}}function bE(e){var t=new Set([e]);return t.forEach(function(r){Me(r)&&xE(r)===r&&Object.getOwnPropertyNames(r).forEach(function(n){Me(r[n])&&t.add(r[n])})}),e}function xE(e){if(globalThis.__DEV__!==!1&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function ji(e){return globalThis.__DEV__!==!1&&bE(e),e}function Fs(e,t,r){var n=[];e.forEach(function(i){return i[t]&&n.push(i)}),n.forEach(function(i){return i[t](r)})}function Tc(e,t,r){return new Ne(function(n){var i={then:function(l){return new Promise(function(c){return c(l())})}};function s(l,c){return function(u){if(l){var f=function(){return n.closed?0:l(u)};i=i.then(f,f).then(function(h){return n.next(h)},function(h){return n.error(h)})}else n[c](u)}}var a={next:s(t,"next"),error:s(r,"error"),complete:function(){i.then(function(){return n.complete()})}},o=e.subscribe(a);return function(){return o.unsubscribe()}})}function Ky(e){function t(r){Object.defineProperty(e,r,{value:Ne})}return Cf&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Qp(e){return e&&typeof e.then=="function"}var qn=(function(e){sr(t,e);function t(r){var n=e.call(this,function(i){return n.addObserver(i),function(){return n.removeObserver(i)}})||this;return n.observers=new Set,n.promise=new Promise(function(i,s){n.resolve=i,n.reject=s}),n.handlers={next:function(i){n.sub!==null&&(n.latest=["next",i],n.notify("next",i),Fs(n.observers,"next",i))},error:function(i){var s=n.sub;s!==null&&(s&&setTimeout(function(){return s.unsubscribe()}),n.sub=null,n.latest=["error",i],n.reject(i),n.notify("error",i),Fs(n.observers,"error",i))},complete:function(){var i=n,s=i.sub,a=i.sources,o=a===void 0?[]:a;if(s!==null){var l=o.shift();l?Qp(l)?l.then(function(c){return n.sub=c.subscribe(n.handlers)},n.handlers.error):n.sub=l.subscribe(n.handlers):(s&&setTimeout(function(){return s.unsubscribe()}),n.sub=null,n.latest&&n.latest[0]==="next"?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),Fs(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(i){n.reject(i),n.sources=[],n.handlers.error(i)},n.promise.catch(function(i){}
89),typeof r=="function"&&(r=[new Ne(r)]),Qp(r)?r.then(function(i){return n.start(i)},n.handlers.error):n.start(r),n}return t.prototype.start=function(r){this.sub===void 0&&(this.sources=Array.from(r),this.handlers.complete())},t.prototype.deliverLastMessage=function(r){if(this.latest){var n=this.latest[0],i=r[n];i&&i.call(r,this.latest[1]),this.sub===null&&n==="next"&&r.complete&&r.complete()}},t.prototype.addObserver=function(r){this.observers.has(r)||(this.deliverLastMessage(r),this.observers.add(r))},t.prototype.removeObserver=function(r){this.observers.delete(r)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(r,n){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(s){return s(r,n)}))},t.prototype.beforeNext=function(r){var n=!1;this.nextResultListeners.add(function(i,s){n||(n=!0,r(i,s))})},t})(Ne);Ky(qn);function pi(e){return"incremental"in e}function _E(e){return"hasNext"in e&&"data"in e}function SE(e){return pi(e)||_E(e)}function EE(e){return Me(e)&&"payload"in e}function Jy(e,t){var r=e,n=new en;return pi(t)&&Dt(t.incremental)&&t.incremental.forEach(function(i){for(var s=i.data,a=i.path,o=a.length-1;o>=0;--o){var l=a[o],c=!isNaN(+l),u=c?[]:{};u[l]=s,s=u}r=n.merge(r,s)}),r}function po(e){var t=Xu(e);return Dt(t)}function Xu(e){var t=Dt(e.errors)?e.errors.slice(0):[];return pi(e)&&Dt(e.incremental)&&e.incremental.forEach(function(r){r.errors&&t.push.apply(t,r.errors)}),t}function Tn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach(function(n){n&&Object.keys(n).forEach(function(i){var s=n[i];s!==void 0&&(r[i]=s)})}),r}function mi(e,t){return Tn(e,t,t.variables&&{variables:Tn(O(O({},e&&e.variables),t.variables))})}function Pc(e){return new Ne(function(t){t.error(e)})}var Yy=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n};function kE(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw ut(46,i)}return e}function CE(e,t){var r=O({},e),n=function(s){typeof s=="function"?r=O(O({},r),s(r)):r=O(O({},r),s)},i=function(){return O({},r)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:n}),Object.defineProperty(t,"getContext",{enumerable:!1,value:i}),t}function NE(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?xs(t.query)||void 0:""),t}function jE(e,t){var r=O({},e),n=new Set(Object.keys(e));return Gt(t,{Variable:function(i,s,a){a&&a.kind!=="VariableDefinition"&&n.delete(i.name.value)}}),n.forEach(function(i){delete r[i]}),r}function Wp(e,t){return t?t(e):Ne.of()}function us(e){return typeof e=="function"?new $i(e):e}function Ja(e){return e.request.length<=1}var $i=(function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return Ne.of()})},e.from=function(t){return t.length===0?e.empty():t.map(us).reduce(function(r,n){return r.concat(n)})},e.split=function(t,r,n){var i=us(r),s=us(n||new e(Wp)),a;return Ja(i)&&Ja(s)?a=new e(function(o){return t(o)?i.request(o)||Ne.of():s.request(o)||Ne.of()}):a=new e(function(o,l){return t(o)?i.request(o,l)||Ne.of():s.request(o,l)||Ne.of()}),Object.assign(a,{left:i,right:s})},e.execute=function(t,r){return t.request(CE(r.context,NE(kE(r))))||Ne.of()},e.concat=function(t,r){var n=us(t);if(Ja(n))return globalThis.__DEV__!==!1&&ne.warn(38,n),n;var i=us(r),s;return Ja(i)?s=new e(function(a){return n.request(a,function(o){return i.request(o)||Ne.of()})||Ne.of()}):s=new e(function(a,o){return n.request(a,function(l){return i.request(l,o)||Ne.of()})||Ne.of()}),Object.assign(s,{left:n,right:i})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(Wp)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,r){throw ut(39)},e.prototype.onError=function(t,r){if(r&&r.error)return r.error(t),!1;throw t},e.prototype.setOnError=function(t){return this.onError=t,this},e})(),Zu=$i.execute;function OE(e){var t,r=e[Symbol.asyncIterator]();return t={next:function(){return r.next()}},t[Symbol.asyncIterator]=function(){return this},t}function TE(e){var t=null,r=null,n=!1,i=[],s=[];function a(f){if(!r){if(s.length){var h=s.shift();if(Array.isArray(h)&&h[0])return h[0]({value:f,done:!1})}i.push(f)}}function o(f){r=f;var h=s.slice();h.forEach(function(v){v[1](f)}),!t||t()}function l(){n=!0;var f=s.slice();f.forEach(function(h){h[0]({value:void 0,done:!0})}),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",o),e.removeListener("end",l),e.removeListener("finish",l),e.removeListener("close",l)},e.on("data",a),e.on("error",o),e.on("end",l),e.on("finish",l),e.on("close",l);function c(){return new Promise(function(f,h){if(r)return h(r);if(i.length)return f({value:i.shift(),done:!1});if(n)return f({value:void 0,done:!0});s.push([f,h])})}var u={next:function(){return c()}};return _l&&(u[Symbol.asyncIterator]=function(){return this}),u}function PE(e){var t=!1,r={next:function(){return t?Promise.resolve({value:void 0,done:!0}):(t=!0,new Promise(function(n,i){e.then(function(s){n({value:s,done:!1})}).catch(i)}))}};return _l&&(r[Symbol.asyncIterator]=function(){return this}),r}function Hp(e){var t={next:function(){return e.read()}};return _l&&(t[Symbol.asyncIterator]=function(){return this}),t}function IE(e){return!!e.body}function RE(e){return!!e.getReader}function FE(e){return!!(_l&&e[Symbol.asyncIterator])}function AE(e){return!!e.stream}function LE(e){return!!e.arrayBuffer}function ME(e){return!!e.pipe}function DE(e){var t=e;if(IE(e)&&(t=e.body),FE(t))return OE(t);if(RE(t))return Hp(t.getReader());if(AE(t))return Hp(t.stream().getReader());if(LE(t))return PE(t.arrayBuffer());if(ME(t))return TE(t);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var Df=Symbol();function zE(e){return e.extensions?Array.isArray(e.extensions[Df]):!1}function Xy(e){return e.hasOwnProperty("graphQLErrors")}var $E=function(e){var t=st(st(st([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(r){return Me(r)&&r.message||"Error message not found."}).join(` 90`)},lr=(function(e){sr(t,e);function t(r){var n=r.graphQLErrors,i=r.protocolErrors,s=r.clientErrors,a=r.networkError,o=r.errorMessage,l=r.extraInfo,c=e.call(this,o)||this;return c.name="ApolloError",c.graphQLErrors=n||[],c.protocolErrors=i||[],c.clientErrors=s||[],c.networkError=a||null,c.message=o||$E(c),c.extraInfo=l,c.cause=st(st(st([a],n||[],!0),i||[],!0),s||[],!0).find(function(u){return!!u})||null,c.__proto__=t.prototype,c}return t})(Error),Gp=Object.prototype.hasOwnProperty;function UE(e,t){return Ir(this,void 0,void 0,function(){var r,n,i,s,a,o,l,c,u,f,h,v,y,w,x,p,g,m,b,_,S,k,N,R;return Rr(this,function(P){switch(P.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");r=new TextDecoder("utf-8"),n=(R=e.headers)===null||R===void 0?void 0:R.get("content-type"),i="boundary=",s=n!=null&&n.includes(i)?n?.substring(n?.indexOf(i)+i.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",a=`\r 91--`.concat(s),o="",l=DE(e),c=!0,P.label=1;case 1:return c?[4,l.next()]:[3,3];case 2:for(u=P.sent(),f=u.value,h=u.done,v=typeof f=="string"?f:r.decode(f),y=o.length-a.length+1,c=!h,o+=v,w=o.indexOf(a,y);w>-1;){if(x=void 0,k=[o.slice(0,w),o.slice(w+a.length)],x=k[0],o=k[1],p=x.indexOf(`\r 92\r 93`),g=BE(x.slice(0,p)),m=g["content-type"],m&&m.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");
93if(b=x.slice(p),b){if(_=Zy(e,b),Object.keys(_).length>1||"data"in _||"incremental"in _||"errors"in _||"payload"in _)if(EE(_)){if(S={},"payload"in _){if(Object.keys(_).length===1&&_.payload===null)return[2];S=O({},_.payload)}"errors"in _&&(S=O(O({},S),{extensions:O(O({},"extensions"in S?S.extensions:null),(N={},N[Df]=_.errors,N))})),t(S)}else t(_);else if(Object.keys(_).length===1&&"hasNext"in _&&!_.hasNext)return[2]}w=o.indexOf(a)}return[3,1];case 3:return[2]}})})}function BE(e){var t={};return e.split(` 94`).forEach(function(r){var n=r.indexOf(":");if(n>-1){var i=r.slice(0,n).trim().toLowerCase(),s=r.slice(n+1).trim();t[i]=s}}),t}function Zy(e,t){if(e.status>=300){var r=function(){try{return JSON.parse(t)}catch{return t}};Yy(e,r(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(i){var n=i;throw n.name="ServerParseError",n.response=e,n.statusCode=e.status,n.bodyText=t,n}}function qE(e,t){e.result&&e.result.errors&&e.result.data&&t.next(e.result),t.error(e)}function VE(e){return function(t){return t.text().then(function(r){return Zy(t,r)}).then(function(r){return!Array.isArray(r)&&!Gp.call(r,"data")&&!Gp.call(r,"errors")&&Yy(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(n){return n.operationName}):e.operationName,"'.")),r})}}var ed=function(e,t){var r;try{r=JSON.stringify(e)}catch(i){var n=ut(42,t,i.message);throw n.parseError=i,n}return r},QE={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},WE={accept:"*/*","content-type":"application/json"},HE={method:"POST"},GE={http:QE,headers:WE,options:HE},KE=function(e,t){return t(e)};function JE(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={},s={};r.forEach(function(f){i=O(O(O({},i),f.options),{headers:O(O({},i.headers),f.headers)}),f.credentials&&(i.credentials=f.credentials),s=O(O({},s),f.http)}),i.headers&&(i.headers=YE(i.headers,s.preserveHeaderCase));var a=e.operationName,o=e.extensions,l=e.variables,c=e.query,u={operationName:a,variables:l};return s.includeExtensions&&(u.extensions=o),s.includeQuery&&(u.query=t(c,vn)),{options:i,body:u}}function YE(e,t){if(!t){var r={};
94return Object.keys(Object(e)).forEach(function(s){r[s.toLowerCase()]=e[s]}),r}var n={};Object.keys(Object(e)).forEach(function(s){n[s.toLowerCase()]={originalName:s,value:e[s]}});var i={};return Object.keys(n).forEach(function(s){i[n[s].originalName]=n[s].value}),i}var XE=function(e){if(!e&&typeof fetch>"u")throw ut(40)},ZE=function(e,t){var r=e.getContext(),n=r.uri;return n||(typeof t=="function"?t(e):t||"/graphql")};function e1(e,t){var r=[],n=function(f,h){r.push("".concat(f,"=").concat(encodeURIComponent(h)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=ed(t.variables,"Variables map")}catch(f){return{parseError:f}}n("variables",i)}if(t.extensions){var s=void 0;try{s=ed(t.extensions,"Extensions map")}catch(f){return{parseError:f}}n("extensions",s)}var a="",o=e,l=e.indexOf("#");l!==-1&&(a=e.substr(l),o=e.substr(0,l));var c=o.indexOf("?")===-1?"?":"&",u=o+c+r.join("&")+a;return{newURI:u}}var Kp=Vt(function(){return fetch}),ew=function(e){e===void 0&&(e={});var t=e.uri,r=t===void 0?"/graphql":t,n=e.fetch,i=e.print,s=i===void 0?KE:i,a=e.includeExtensions,o=e.preserveHeaderCase,l=e.useGETForQueries,c=e.includeUnusedVariables,u=c===void 0?!1:c,f=At(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&XE(n||Kp);var h={http:{includeExtensions:a,preserveHeaderCase:o},options:f.fetchOptions,credentials:f.credentials,headers:f.headers};return new $i(function(v){var y=ZE(v,r),w=v.getContext(),x={};if(w.clientAwareness){var p=w.clientAwareness,g=p.name,m=p.version;g&&(x["apollographql-client-name"]=g),m&&(x["apollographql-client-version"]=m)}var b=O(O({},x),w.headers),_={http:w.http,options:w.fetchOptions,credentials:w.credentials,headers:b};if(ra(["client"],v.query)){var S=Vy(v.query);if(!S)return Pc(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));v.query=S}var k=JE(v,s,GE,h,_),N=k.options,R=k.body;R.variables&&!u&&(R.variables=jE(R.variables,v.query));var P;!N.signal&&typeof AbortController<"u"&&(P=new AbortController,N.signal=P.signal);var H=function(T){return T.kind==="OperationDefinition"&&T.operation==="mutation"},G=function(T){return T.kind==="OperationDefinition"&&T.operation==="subscription"},Q=G(ga(v.query)),U=ra(["defer"],v.query);if(l&&!v.query.definitions.some(H)&&(N.method="GET"),U||Q){N.headers=N.headers||{};var V="multipart/mixed;";Q&&U&&globalThis.__DEV__!==!1&&ne.warn(41),Q?V+="boundary=graphql;subscriptionSpec=1.0,application/json":U&&(V+="deferSpec=20220824,application/json"),N.headers.accept=V}if(N.method==="GET"){var A=e1(y,R),D=A.newURI,C=A.parseError;if(C)return Pc(C);y=D}else try{N.body=ed(R,"Payload")}catch(T){return Pc(T)}return new Ne(function(T){var j=n||Vt(function(){return fetch})||Kp,L=T.next.bind(T);return j(y,N).then(function(M){var B;v.setContext({response:M});var z=(B=M.headers)===null||B===void 0?void 0:B.get("content-type");return z!==null&&/^multipart\/mixed/i.test(z)?UE(M,L):VE(v)(M).then(L)}).then(function(){P=void 0,T.complete()}).catch(function(M){P=void 0,qE(M,T)}),function(){P&&P.abort()}})})},t1=(function(e){sr(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,ew(r).request)||this;return n.options=r,n}return t})($i);const{toString:Jp,hasOwnProperty:r1}=Object.prototype,Yp=Function.prototype.toString,td=new Map;function Ee(e,t){try{return rd(e,t)}finally{td.clear()}}function rd(e,t){if(e===t)return!0;const r=Jp.call(e),n=Jp.call(t);if(r!==n)return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Zp(e,t))return!0;const i=Xp(e),s=Xp(t),a=i.length;if(a!==s.length)return!1;for(let o=0;o<a;++o)if(!r1.call(t,i[o]))return!1;for(let o=0;o<a;++o){const l=i[o];if(!rd(e[l],t[l]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Zp(e,t))return!0;const i=e.entries(),s=r==="[object Map]";for(;;){const a=i.next();if(a.done)break;const[o,l]=a.value;if(!t.has(o)||s&&!rd(l,t.get(o)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let i=e.byteLength;if(i===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=Yp.call(e);return i!==Yp.call(t)?!1:!s1(i,i1)}}return!1}function Xp(e){return Object.keys(e).filter(n1,e)}function n1(e){return this[e]!==void 0}const i1="{ [native code] }";function s1(e,t){const r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function Zp(e,t){let r=td.get(e);if(r){if(r.has(t))return!0}else td.set(e,r=new Set);return r.add(t),!1}function tw(e,t,r,n){var i=t.data,s=At(t,["data"]),a=r.data,o=At(r,["data"]);return Ee(s,o)&&mo(ga(e).selectionSet,i,a,{fragmentMap:Mi(zi(e)),variables:n})}function mo(e,t,r,n){if(t===r)return!0;var i=new Set;return e.selections.every(function(s){if(i.has(s)||(i.add(s),!ma(s,n.variables))||em(s))return!0;
94if(Xr(s)){var a=wr(s),o=t&&t[a],l=r&&r[a],c=s.selectionSet;if(!c)return Ee(o,l);var u=Array.isArray(o),f=Array.isArray(l);if(u!==f)return!1;if(u&&f){var h=o.length;if(l.length!==h)return!1;for(var v=0;v<h;++v)if(!mo(c,o[v],l[v],n))return!1;return!0}return mo(c,o,l,n)}else{var y=Sl(s,n.fragmentMap);if(y)return em(y)?!0:mo(y.selectionSet,t,r,n)}})}function em(e){return!!e.directives&&e.directives.some(a1)}function a1(e){return e.name.value==="nonreactive"}var rw=An?WeakMap:Map,nw=kf?WeakSet:Set,zf=new va,tm=!1;function iw(){tm||(tm=!0,globalThis.__DEV__!==!1&&ne.warn(52))}function sw(e,t,r){return zf.withValue(!0,function(){var n=_s(e,t,r,!1);return Object.isFrozen(e)&&ji(n),n})}function o1(e,t){if(t.has(e))return t.get(e);var r=Array.isArray(e)?[]:Object.create(null);return t.set(e,r),r}function _s(e,t,r,n,i){var s,a=r.knownChanged,o=o1(e,r.mutableTargets);if(Array.isArray(e)){for(var l=0,c=Array.from(e.entries());l<c.length;l++){var u=c[l],f=u[0],h=u[1];if(h===null){o[f]=null;continue}var v=_s(h,t,r,n,globalThis.__DEV__!==!1?"".concat(i||"","[").concat(f,"]"):void 0);a.has(v)&&a.add(o),o[f]=v}return a.has(o)?o:e}for(var y=0,w=t.selections;y<w.length;y++){var x=w[y],p=void 0;if(n&&a.add(o),x.kind===te.FIELD){var g=wr(x),m=x.selectionSet;if(p=o[g]||e[g],p===void 0)continue;if(m&&p!==null){var v=_s(e[g],m,r,n,globalThis.__DEV__!==!1?"".concat(i||"",".").concat(g):void 0);a.has(v)&&(p=v)}globalThis.__DEV__===!1&&(o[g]=p),globalThis.__DEV__!==!1&&(n&&g!=="__typename"&&!(!((s=Object.getOwnPropertyDescriptor(o,g))===null||s===void 0)&&s.value)?Object.defineProperty(o,g,l1(g,p,i||"",r.operationName,r.operationType)):(delete o[g],o[g]=p))}if(x.kind===te.INLINE_FRAGMENT&&(!x.typeCondition||r.cache.fragmentMatches(x,e.__typename))&&(p=_s(e,x.selectionSet,r,n,i)),x.kind===te.FRAGMENT_SPREAD){var b=x.name.value,_=r.fragmentMap[b]||(r.fragmentMap[b]=r.cache.lookupFragment(b));ne(_,47,b);var S=oS(x);S!=="mask"&&(p=_s(e,_.selectionSet,r,S==="migrate",i))}a.has(p)&&a.add(o)}return"__typename"in e&&!("__typename"in o)&&(o.__typename=e.__typename),Object.keys(o).length!==Object.keys(e).length&&a.add(o),a.has(o)?o:e}function l1(e,t,r,n,i){var s=function(){return zf.getValue()||(globalThis.__DEV__!==!1&&ne.warn(48,n?"".concat(i," '").concat(n,"'"):"anonymous ".concat(i),"".concat(r,".").concat(e).replace(/^\./,"")),s=function(){return t}),t};return{get:function(){return s()},set:function(a){s=function(){return a}},enumerable:!0,configurable:!0}}function aw(e,t,r,n){if(!r.fragmentMatches)return globalThis.__DEV__!==!1&&iw(),e;var i=t.definitions.filter(function(a){return a.kind===te.FRAGMENT_DEFINITION});typeof n>"u"&&(ne(i.length===1,49,i.length),n=i[0].name.value);var s=i.find(function(a){return a.name.value===n});return ne(!!s,50,n),e==null||Ee(e,{})?e:sw(e,s.selectionSet,{operationType:"fragment",operationName:s.name.value,fragmentMap:Mi(zi(t)),cache:r,mutableTargets:new rw,knownChanged:new nw})}function c1(e,t,r){var n;if(!r.fragmentMatches)return globalThis.__DEV__!==!1&&iw(),e;var i=On(t);return ne(i,51),e==null?e:sw(e,i.selectionSet,{operationType:i.operation,operationName:(n=i.name)===null||n===void 0?void 0:n.value,fragmentMap:Mi(zi(t)),cache:r,mutableTargets:new rw,knownChanged:new nw})}var ow=(function(){function e(){this.assumeImmutableResults=!1,this.getFragmentDoc=ia(pS,{max:ir["cache.fragmentQueryDocuments"]||1e3,cache:Ho})}return e.prototype.lookupFragment=function(t){return null},e.prototype.batch=function(t){var r=this,n=typeof t.optimistic=="string"?t.optimistic:t.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=t.update(r)},n),i},e.prototype.recordOptimisticTransaction=function(t,r){this.performTransaction(t,r)},e.prototype.transformDocument=function(t){return t},e.prototype.transformForLink=function(t){return t},e.prototype.identify=function(t){},e.prototype.gc=function(){return[]},e.prototype.modify=function(t){return!1},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(O(O({},t),{rootId:t.id||"ROOT_QUERY",optimistic:r}))},e.prototype.watchFragment=function(t){var r=this,n=t.fragment,i=t.fragmentName,s=t.from,a=t.optimistic,o=a===void 0?!0:a,l=At(t,["fragment","fragmentName","from","optimistic"]),c=this.getFragmentDoc(n,i),u=typeof s>"u"||typeof s=="string"?s:this.identify(s),f=!!t[Symbol.for("apollo.dataMasking")];if(globalThis.__DEV__!==!1){var h=i||Oy(n).name.value;u||globalThis.__DEV__!==!1&&ne.warn(1,h)}var v=O(O({},l),{returnPartialData:!0,id:u,query:c,optimistic:o}),y;return new Ne(function(w){return r.watch(O(O({},v),{immediate:!0,callback:function(x){var p=f?aw(x.result,n,r,i):x.result;if(!(y&&tw(c,{data:y.result},{data:p},t.variables))){var g={data:p,complete:!!x.complete};x.missing&&(g.missing=Nl(x.missing.map(function(m){return m.missing}))),y=O(O({},x),{result:p}),w.next(g)}}}))})},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!!t.optimistic),this.read(O(O({},t),{query:this.getFragmentDoc(t.fragment,t.fragmentName),rootId:t.id,optimistic:r}))},e.prototype.writeQuery=function(t){var r=t.id,n=t.data,i=At(t,["id","data"]);return this.write(Object.assign(i,{dataId:r||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(t){var r=t.id,n=t.data,i=t.fragment,s=t.fragmentName,a=At(t,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,s),dataId:r,result:n}))},e.prototype.updateQuery=function(t,r){return this.batch({update:function(n){var i=n.readQuery(t),s=r(i);return s==null?i:(n.writeQuery(O(O({},t),{data:s})),s)}})},e.prototype.updateFragment=function(t,r){return this.batch({update:function(n){var i=n.readFragment(t),s=r(i);return s==null?i:(n.writeFragment(O(O({},t),{data:s})),s)}})},e})();globalThis.__DEV__!==!1&&(ow.prototype.getMemoryInternals=CS);var lw=(function(e){sr(t,e);function t(r,n,i,s){var a,o=e.call(this,r)||this;if(o.message=r,o.path=n,o.query=i,o.variables=s,Array.isArray(o.path)){o.missing=o.message;for(var l=o.path.length-1;l>=0;--l)o.missing=(a={},a[o.path[l]]=o.missing,a)}else o.missing=o.path;return o.__proto__=t.prototype,o}return t})(Error),We=Object.prototype.hasOwnProperty;function ds(e){return e==null}function cw(e,t){var r=e.__typename,n=e.id,i=e._id;if(typeof r=="string"&&(t&&(t.keyObject=ds(n)?ds(i)?void 0:{_id:i}:{id:n}),ds(n)&&!ds(i)&&(n=i),!ds(n)))return"".concat(r,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var uw={dataIdFromObject:cw,addTypename:!0,resultCaching:!0,canonizeResults:!1};function u1(e){return Tn(uw,e)}function dw(e){var t=e.canonizeResults;return t===void 0?uw.canonizeResults:t}function d1(e,t){return Se(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var fw=/^[_a-z][_0-9a-z]*/i;function tn(e){var t=e.match(fw);return t?t[0]:e}
94function nd(e,t,r){return Me(t)?De(t)?t.every(function(n){return nd(e,n,r)}):e.selections.every(function(n){if(Xr(n)&&ma(n,r)){var i=wr(n);return We.call(t,i)&&(!n.selectionSet||nd(n.selectionSet,t[i],r))}return!0}):!1}function ii(e){return Me(e)&&!Se(e)&&!De(e)}function f1(){return new en}function hw(e,t){var r=Mi(zi(e));return{fragmentMap:r,lookupFragment:function(n){var i=r[n];return!i&&t&&(i=t.lookup(n)),i||null}}}var go=Object.create(null),Ic=function(){return go},rm=Object.create(null),sa=(function(){function e(t,r){var n=this;this.policies=t,this.group=r,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,s){return ji(Se(i)?n.get(i.__ref,s):i&&i[s])},this.canRead=function(i){return Se(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,s){if(typeof i=="string")return hi(i);if(Se(i))return i;var a=n.policies.identify(i)[0];if(a){var o=hi(a);return s&&n.merge(a,i),o}}}return e.prototype.toObject=function(){return O({},this.data)},e.prototype.has=function(t){return this.lookup(t,!0)!==void 0},e.prototype.get=function(t,r){if(this.group.depend(t,r),We.call(this.data,t)){var n=this.data[t];if(n&&We.call(n,r))return n[r]}if(r==="__typename"&&We.call(this.policies.rootTypenamesById,t))return this.policies.rootTypenamesById[t];if(this instanceof Or)return this.parent.get(t,r)},e.prototype.lookup=function(t,r){if(r&&this.group.depend(t,"__exists"),We.call(this.data,t))return this.data[t];if(this instanceof Or)return this.parent.lookup(t,r);if(this.policies.rootTypenamesById[t])return Object.create(null)},e.prototype.merge=function(t,r){var n=this,i;Se(t)&&(t=t.__ref),Se(r)&&(r=r.__ref);var s=typeof t=="string"?this.lookup(i=t):t,a=typeof r=="string"?this.lookup(i=r):r;if(a){ne(typeof i=="string",2);var o=new en(p1).merge(s,a);if(this.data[i]=o,o!==s&&(delete this.refs[i],this.group.caching)){var l=Object.create(null);s||(l.__exists=1),Object.keys(a).forEach(function(c){if(!s||s[c]!==o[c]){l[c]=1;var u=tn(c);u!==c&&!n.policies.hasKeyArgs(o.__typename,u)&&(l[u]=1),o[c]===void 0&&!(n instanceof Or)&&delete o[c]}}),l.__typename&&!(s&&s.__typename)&&this.policies.rootTypenamesById[i]===o.__typename&&delete l.__typename,Object.keys(l).forEach(function(c){return n.group.dirty(i,c)})}}},e.prototype.modify=function(t,r){var n=this,i=this.lookup(t);if(i){var s=Object.create(null),a=!1,o=!0,l={DELETE:go,INVALIDATE:rm,isReference:Se,toReference:this.toReference,canRead:this.canRead,readField:function(c,u){return n.policies.readField(typeof c=="string"?{fieldName:c,from:u||hi(t)}:c,{store:n})}};
94if(Object.keys(i).forEach(function(c){var u=tn(c),f=i[c];if(f!==void 0){var h=typeof r=="function"?r:r[c]||r[u];if(h){var v=h===Ic?go:h(ji(f),O(O({},l),{fieldName:u,storeFieldName:c,storage:n.getStorage(t,c)}));if(v===rm)n.group.dirty(t,c);else if(v===go&&(v=void 0),v!==f&&(s[c]=v,a=!0,f=v,globalThis.__DEV__!==!1)){var y=function(_){if(n.lookup(_.__ref)===void 0)return globalThis.__DEV__!==!1&&ne.warn(3,_),!0};if(Se(v))y(v);else if(Array.isArray(v))for(var w=!1,x=void 0,p=0,g=v;p<g.length;p++){var m=g[p];if(Se(m)){if(w=!0,y(m))break}else if(typeof m=="object"&&m){var b=n.policies.identify(m)[0];b&&(x=m)}if(w&&x!==void 0){globalThis.__DEV__!==!1&&ne.warn(4,x);break}}}}f!==void 0&&(o=!1)}}),a)return this.merge(t,s),o&&(this instanceof Or?this.data[t]=void 0:delete this.data[t],this.group.dirty(t,"__exists")),!0}return!1},e.prototype.delete=function(t,r,n){var i,s=this.lookup(t);if(s){var a=this.getFieldValue(s,"__typename"),o=r&&n?this.policies.getStoreFieldName({typename:a,fieldName:r,args:n}):r;return this.modify(t,o?(i={},i[o]=Ic,i):Ic)}return!1},e.prototype.evict=function(t,r){var n=!1;return t.id&&(We.call(this.data,t.id)&&(n=this.delete(t.id,t.fieldName,t.args)),this instanceof Or&&this!==r&&(n=this.parent.evict(t,r)||n),(t.fieldName||n)&&this.group.dirty(t.id,t.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var t=this,r=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){We.call(t.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(r.__META={extraRootIds:n.sort()}),r},e.prototype.replace=function(t){var r=this;if(Object.keys(this.data).forEach(function(s){t&&We.call(t,s)||r.delete(s)}),t){var n=t.__META,i=At(t,["__META"]);
94Object.keys(i).forEach(function(s){r.merge(s,i[s])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(t){return this.rootIds[t]=(this.rootIds[t]||0)+1},e.prototype.release=function(t){if(this.rootIds[t]>0){var r=--this.rootIds[t];return r||delete this.rootIds[t],r}return 0},e.prototype.getRootIdSet=function(t){return t===void 0&&(t=new Set),Object.keys(this.rootIds).forEach(t.add,t),this instanceof Or?this.parent.getRootIdSet(t):Object.keys(this.policies.rootTypenamesById).forEach(t.add,t),t},e.prototype.gc=function(){var t=this,r=this.getRootIdSet(),n=this.toObject();r.forEach(function(a){We.call(n,a)&&(Object.keys(t.findChildRefIds(a)).forEach(r.add,r),delete n[a])});var i=Object.keys(n);if(i.length){for(var s=this;s instanceof Or;)s=s.parent;i.forEach(function(a){return s.delete(a)})}return i},e.prototype.findChildRefIds=function(t){if(!We.call(this.refs,t)){var r=this.refs[t]=Object.create(null),n=this.data[t];if(!n)return r;var i=new Set([n]);i.forEach(function(s){Se(s)&&(r[s.__ref]=!0),Me(s)&&Object.keys(s).forEach(function(a){var o=s[a];Me(o)&&i.add(o)})})}return this.refs[t]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e})(),pw=(function(){function e(t,r){r===void 0&&(r=null),this.caching=t,this.parent=r,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?$y():null,this.keyMaker=new _r(An)}
94,e.prototype.depend=function(t,r){if(this.d){this.d(Rc(t,r));var n=tn(r);n!==r&&this.d(Rc(t,n)),this.parent&&this.parent.depend(t,r)}},e.prototype.dirty=function(t,r){this.d&&this.d.dirty(Rc(t,r),r==="__exists"?"forget":"setDirty")},e})();function Rc(e,t){return t+"#"+e}function nm(e,t){As(e)&&e.group.depend(t,"__exists")}(function(e){var t=(function(r){sr(n,r);function n(i){var s=i.policies,a=i.resultCaching,o=a===void 0?!0:a,l=i.seed,c=r.call(this,s,new pw(o))||this;return c.stump=new h1(c),c.storageTrie=new _r(An),l&&c.replace(l),c}return n.prototype.addLayer=function(i,s){return this.stump.addLayer(i,s)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n})(e);e.Root=t})(sa||(sa={}));var Or=(function(e){sr(t,e);function t(r,n,i,s){var a=e.call(this,n.policies,s)||this;return a.id=r,a.parent=n,a.replay=i,a.group=s,i(a),a}return t.prototype.addLayer=function(r,n){return new t(r,this,n,this.group)},t.prototype.removeLayer=function(r){var n=this,i=this.parent.removeLayer(r);return r===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(s){var a=n.data[s],o=i.lookup(s);o?a?a!==o&&Object.keys(a).forEach(function(l){Ee(a[l],o[l])||n.group.dirty(s,l)}):(n.group.dirty(s,"__exists"),Object.keys(o).forEach(function(l){n.group.dirty(s,l)})):n.delete(s)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return O(O({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(r){var n=this.parent.findChildRefIds(r);return We.call(this.data,r)?O(O({},n),e.prototype.findChildRefIds.call(this,r)):n},t.prototype.getStorage=function(){for(var r=this.parent;r.parent;)r=r.parent;return r.getStorage.apply(r,arguments)},t})(sa),h1=(function(e){sr(t,e);function t(r){return e.call(this,"EntityStore.Stump",r,function(){},new pw(r.group.caching,r.group))||this}return t.prototype.removeLayer=function(){return this},t.prototype.merge=function(r,n){return this.parent.merge(r,n)},t})(Or);function p1(e,t,r){var n=e[r],i=t[r];return Ee(n,i)?n:i}function As(e){return!!(e instanceof sa&&e.group.caching)}function m1(e){return Me(e)?De(e)?e.slice(0):O({__proto__:Object.getPrototypeOf(e)},e):e}var im=(function(){function e(){this.known=new(kf?WeakSet:Set),this.pool=new _r(An),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(t){return Me(t)&&this.known.has(t)},e.prototype.pass=function(t){if(Me(t)){var r=m1(t);return this.passes.set(r,t),r}return t},e.prototype.admit=function(t){var r=this;if(Me(t)){var n=this.passes.get(t);if(n)return n;var i=Object.getPrototypeOf(t);switch(i){case Array.prototype:{if(this.known.has(t))return t;var s=t.map(this.admit,this),a=this.pool.lookupArray(s);return a.array||(this.known.add(a.array=s),globalThis.__DEV__!==!1&&Object.freeze(s)),a.array}case null:case Object.prototype:{if(this.known.has(t))return t;var o=Object.getPrototypeOf(t),l=[o],c=this.sortedKeys(t);l.push(c.json);var u=l.length;c.sorted.forEach(function(v){l.push(r.admit(t[v]))});var a=this.pool.lookupArray(l);if(!a.object){var f=a.object=Object.create(o);this.known.add(f),c.sorted.forEach(function(v,y){f[v]=l[u+y]}),globalThis.__DEV__!==!1&&Object.freeze(f)}return a.object}}}return t},e.prototype.sortedKeys=function(t){var r=Object.keys(t),n=this.pool.lookupArray(r);if(!n.keys){r.sort();var i=JSON.stringify(r);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:r,json:i})}return n.keys},e})();function sm(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var g1=(function(){function e(t){var r=this;this.knownResults=new(An?WeakMap:Map),this.config=Tn(t,{addTypename:t.addTypename!==!1,canonizeResults:dw(t)}),this.canon=t.canon||new im,this.executeSelectionSet=ia(function(n){var i,s=n.context.canonizeResults,a=sm(n);a[3]=!s;var o=(i=r.executeSelectionSet).peek.apply(i,a);return o?s?O(O({},o),{result:r.canon.admit(o.result)}):o:(nm(n.context.store,n.enclosingRef.__ref),r.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize||ir["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:sm,makeCacheKey:function(n,i,s,a){if(As(s.store))return s.store.makeCacheKey(n,Se(i)?i.__ref:i,s.varString,a)}}),this.executeSubSelectedArray=ia(function(n){return nm(n.context.store,n.enclosingRef.__ref),r.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize||ir["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(n){var i=n.field,s=n.array,a=n.context;if(As(a.store))return a.store.makeCacheKey(i,s,a.varString)}})}return e.prototype.resetCanon=function(){this.canon=new im},e.prototype.diffQueryAgainstStore=function(t){var r=t.store,n=t.query,i=t.rootId,s=i===void 0?"ROOT_QUERY":i,a=t.variables,o=t.returnPartialData,l=o===void 0?!0:o,c=t.canonizeResults,u=c===void 0?this.config.canonizeResults:c,f=this.config.cache.policies;a=O(O({},Of(jy(n))),a);var h=hi(s),v=this.executeSelectionSet({selectionSet:ga(n).selectionSet,objectOrReference:h,enclosingRef:h,context:O({store:r,query:n,policies:f,variables:a,varString:Kr(a),canonizeResults:u},hw(n,this.config.fragments))}),y;if(v.missing&&(y=[new lw(v1(v.missing),v.missing,n,a)],!l))throw y[0];return{result:v.result,complete:!y,missing:y}},e.prototype.isFresh=function(t,r,n,i){if(As(i.store)&&this.knownResults.get(t)===n){var s=this.executeSelectionSet.peek(n,r,i,this.canon.isKnown(t));if(s&&t===s.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(t){var r=this,n=t.selectionSet,i=t.objectOrReference,s=t.enclosingRef,a=t.context;if(Se(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var o=a.variables,l=a.policies,c=a.store,u=c.getFieldValue(i,"__typename"),f=[],h,v=new en;this.config.addTypename&&typeof u=="string"&&!l.rootIdsByTypename[u]&&f.push({__typename:u});function y(m,b){var _;return m.missing&&(h=v.merge(h,(_={},_[b]=m.missing,_))),m.result}var w=new Set(n.selections);
94w.forEach(function(m){var b,_;if(ma(m,o))if(Xr(m)){var S=l.readField({fieldName:m.name.value,field:m,variables:a.variables,from:i},a),k=wr(m);S===void 0?Rf.added(m)||(h=v.merge(h,(b={},b[k]="Can't find field '".concat(m.name.value,"' on ").concat(Se(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),b))):De(S)?S.length>0&&(S=y(r.executeSubSelectedArray({field:m,array:S,enclosingRef:s,context:a}),k)):m.selectionSet?S!=null&&(S=y(r.executeSelectionSet({selectionSet:m.selectionSet,objectOrReference:S,enclosingRef:Se(S)?S:s,context:a}),k)):a.canonizeResults&&(S=r.canon.pass(S)),S!==void 0&&f.push((_={},_[k]=S,_))}else{var N=Sl(m,a.lookupFragment);if(!N&&m.kind===te.FRAGMENT_SPREAD)throw ut(10,m.name.value);N&&l.fragmentMatches(N,u)&&N.selectionSet.selections.forEach(w.add,w)}});var x=Nl(f),p={result:x,missing:h},g=a.canonizeResults?this.canon.admit(p):ji(p);return g.result&&this.knownResults.set(g.result,n),g},e.prototype.execSubSelectedArrayImpl=function(t){var r=this,n=t.field,i=t.array,s=t.enclosingRef,a=t.context,o,l=new en;function c(u,f){var h;return u.missing&&(o=l.merge(o,(h={},h[f]=u.missing,h))),u.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(u,f){return u===null?null:De(u)?c(r.executeSubSelectedArray({field:n,array:u,enclosingRef:s,context:a}),f):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:u,enclosingRef:Se(u)?u:s,context:a}),f):(globalThis.__DEV__!==!1&&y1(a.store,n,u),u)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:o}},e})();function v1(e){try{JSON.stringify(e,function(t,r){if(typeof r=="string")throw r;return r})}catch(t){return t}}function y1(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach(function(i){Me(i)&&(ne(!Se(i),11,d1(e,i),t.name.value),Object.values(i).forEach(n.add,n))})}}var $f=new va,am=new WeakMap;function Ls(e){var t=am.get(e);return t||am.set(e,t={vars:new Set,dep:$y()}),t}function om(e){Ls(e).vars.forEach(function(t){return t.forgetCache(e)})}function w1(e){Ls(e).vars.forEach(function(t){return t.attachCache(e)})}function b1(e){var t=new Set,r=new Set,n=function(s){if(arguments.length>0){if(e!==s){e=s,t.forEach(function(l){Ls(l).dep.dirty(n),x1(l)});var a=Array.from(r);r.clear(),a.forEach(function(l){return l(e)})}}else{var o=$f.getValue();o&&(i(o),Ls(o).dep(n))}return e};n.onNextChange=function(s){return r.add(s),function(){r.delete(s)}};var i=n.attachCache=function(s){return t.add(s),Ls(s).vars.add(n),n};return n.forgetCache=function(s){return t.delete(s)},n}function x1(e){e.broadcastWatches&&e.broadcastWatches()}var lm=Object.create(null);function Uf(e){var t=JSON.stringify(e);return lm[t]||(lm[t]=Object.create(null))}function cm(e){var t=Uf(e);return t.keyFieldsFn||(t.keyFieldsFn=function(r,n){var i=function(a,o){return n.readField(o,a)},s=n.keyObject=Bf(e,function(a){var o=gi(n.storeObject,a,i);return o===void 0&&r!==n.storeObject&&We.call(r,a[0])&&(o=gi(r,a,gw)),ne(o!==void 0,5,a.join("."),r),o});return"".concat(n.typename,":").concat(JSON.stringify(s))})}function um(e){var t=Uf(e);return t.keyArgsFn||(t.keyArgsFn=function(r,n){var i=n.field,s=n.variables,a=n.fieldName,o=Bf(e,function(c){var u=c[0],f=u.charAt(0);if(f==="@"){if(i&&Dt(i.directives)){var h=u.slice(1),v=i.directives.find(function(p){return p.name.value===h}),y=v&&El(v,s);return y&&gi(y,c.slice(1))}return}if(f==="$"){var w=u.slice(1);if(s&&We.call(s,w)){var x=c.slice(0);return x[0]=w,gi(s,x)}return}if(r)return gi(r,c)}),l=JSON.stringify(o);return(r||l!=="{}")&&(a+=":"+l),a})}function Bf(e,t){var r=new en;return mw(e).reduce(function(n,i){var s,a=t(i);if(a!==void 0){for(var o=i.length-1;o>=0;--o)a=(s={},s[i[o]]=a,s);n=r.merge(n,a)}return n},Object.create(null))}function mw(e){var t=Uf(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach(function(i,s){De(i)?(mw(i).forEach(function(a){return r.push(n.concat(a))}),n.length=0):(n.push(i),De(e[s+1])||(r.push(n.slice(0)),n.length=0))})}return t.paths}function gw(e,t){return e[t]}function gi(e,t,r){return r=r||gw,vw(t.reduce(function n(i,s){return De(i)?i.map(function(a){return n(a,s)}):i&&r(i,s)},e))}function vw(e){return Me(e)?De(e)?e.map(vw):Bf(Object.keys(e).sort(),function(t){return gi(e,t)}):e}
vendor: 4,308 bytes, line 94
94function id(e){return e.args!==void 0?e.args:e.field?El(e.field,e.variables):null}var _1=function(){},dm=function(e,t){return t.fieldName},fm=function(e,t,r){var n=r.mergeObjects;return n(e,t)},hm=function(e,t){return t},S1=(function(){function e(t){this.config=t,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=O({dataIdFromObject:cw},t),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),t.possibleTypes&&this.addPossibleTypes(t.possibleTypes),t.typePolicies&&this.addTypePolicies(t.typePolicies)}return e.prototype.identify=function(t,r){var n,i=this,s=r&&(r.typename||((n=r.storeObject)===null||n===void 0?void 0:n.__typename))||t.__typename;if(s===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];var a=r&&r.storeObject||t,o=O(O({},r),{typename:s,storeObject:a,readField:r&&r.readField||function(){var f=qf(arguments,a);return i.readField(f,{store:i.cache.data,variables:f.variables})}}),l,c=s&&this.getTypePolicy(s),u=c&&c.keyFn||this.config.dataIdFromObject;return zf.withValue(!0,function(){for(;u;){var f=u(O(O({},t),a),o);if(De(f))u=cm(f);else{l=f;break}}}),l=l?String(l):void 0,o.keyObject?[l,o.keyObject]:[l]},e.prototype.addTypePolicies=function(t){var r=this;Object.keys(t).forEach(function(n){var i=t[n],s=i.queryType,a=i.mutationType,o=i.subscriptionType,l=At(i,["queryType","mutationType","subscriptionType"]);s&&r.setRootTypename("Query",n),a&&r.setRootTypename("Mutation",n),o&&r.setRootTypename("Subscription",n),We.call(r.toBeAdded,n)?r.toBeAdded[n].push(l):r.toBeAdded[n]=[l]})},e.prototype.updateTypePolicy=function(t,r){var n=this,i=this.getTypePolicy(t),s=r.keyFields,a=r.fields;function o(l,c){l.merge=typeof c=="function"?c:c===!0?fm:c===!1?hm:l.merge}o(i,r.merge),i.keyFn=s===!1?_1:De(s)?cm(s):typeof s=="function"?s:i.keyFn,a&&Object.keys(a).forEach(function(l){var c=n.getFieldPolicy(t,l,!0),u=a[l];if(typeof u=="function")c.read=u;else{var f=u.keyArgs,h=u.read,v=u.merge;c.keyFn=f===!1?dm:De(f)?um(f):typeof f=="function"?f:c.keyFn,typeof h=="function"&&(c.read=h),o(c,v)}c.read&&c.merge&&(c.keyFn=c.keyFn||dm)})},e.prototype.setRootTypename=function(t,r){r===void 0&&(r=t);var n="ROOT_"+t.toUpperCase(),i=this.rootTypenamesById[n];r!==i&&(ne(!i||i===t,6,t),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)},e.prototype.addPossibleTypes=function(t){var r=this;this.usingPossibleTypes=!0,Object.keys(t).forEach(function(n){r.getSupertypeSet(n,!0),t[n].forEach(function(i){r.getSupertypeSet(i,!0).add(n);var s=i.match(fw);(!s||s[0]!==i)&&r.fuzzySubtypes.set(i,new RegExp(i))})})},e.prototype.getTypePolicy=function(t){var r=this;if(!We.call(this.typePolicies,t)){var n=this.typePolicies[t]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(t);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(t,!0),this.fuzzySubtypes.forEach(function(a,o){if(a.test(t)){var l=r.supertypeMap.get(o);l&&l.forEach(function(c){return i.add(c)})}})),i&&i.size&&i.forEach(function(a){var o=r.getTypePolicy(a),l=o.fields,c=At(o,["fields"]);Object.assign(n,c),Object.assign(n.fields,l)})}var s=this.toBeAdded[t];return s&&s.length&&s.splice(0).forEach(function(a){r.updateTypePolicy(t,a)}),this.typePolicies[t]},e.prototype.getFieldPolicy=function(t,r,n){if(t){var i=this.getTypePolicy(t).fields;return i[r]||n&&(i[r]=Object.create(null))}},e.prototype.getSupertypeSet=function(t,r){var n=this.supertypeMap.get(t);return!n&&r&&this.supertypeMap.set(t,n=new Set),n},e.prototype.fragmentMatches=function(t,r,n,i){var s=this;if(!t.typeCondition)return!0;if(!r)return!1;var a=t.typeCondition.name.value;if(r===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(r,!0),l=[o],c=function(y){var w=s.getSupertypeSet(y,!1);w&&w.size&&l.indexOf(w)<0&&l.push(w)},u=!!(n&&this.fuzzySubtypes.size),f=!1,h=0;h<l.length;++h){var v=l[h];if(v.has(a))return o.has(a)||(f&&globalThis.__DEV__!==!1&&ne.warn(7,r,a),o.add(a)),!0;v.forEach(c),u&&h===l.length-1&&nd(t.selectionSet,n,i)&&(u=!1,f=!0,this.fuzzySubtypes.forEac
94h(function(y,w){var x=r.match(y);x&&x[0]===r&&c(w)}))}return!1},e.prototype.hasKeyArgs=function(t,r){var n=this.getFieldPolicy(t,r,!1);return!!(n&&n.keyFn)},e.prototype.getStoreFieldName=function(t){var r=t.typename,n=t.fieldName,i=this.getFieldPolicy(r,n,!1),s,a=i&&i.keyFn;if(a&&r)for(var o={typename:r,fieldName:n,field:t.field||null,variables:t.variables},l=id(t);a;){var c=a(l,o);if(De(c))a=um(c);else{s=c||n;break}}return s===void 0&&(s=t.field?qS(t.field,t.variables):Ny(n,id(t))),s===!1?n:n===tn(s)?s:n+":"+s},e.prototype.readField=function(t,r){var n=t.from;if(n){var i=t.field||t.fieldName;if(i){if(t.typename===void 0){var s=r.store.getFieldValue(n,"__typename");s&&(t.typename=s)}var a=this.getStoreFieldName(t),o=tn(a),l=r.store.getFieldValue(n,a),c=this.getFieldPolicy(t.typename,o,!1),u=c&&c.read;if(u){var f=pm(this,n,t,r,r.store.getStorage(Se(n)?n.__ref:n,a));return $f.withValue(this.cache,u,[l,f])}return l}}},e.prototype.getReadFunction=function(t,r){var n=this.getFieldPolicy(t,r,!1);return n&&n.read},e.prototype.getMergeFunction=function(t,r,n){var i=this.getFieldPolicy(t,r,!1),s=i&&i.merge;return!s&&n&&(i=this.getTypePolicy(n),s=i&&i.merge),s},e.prototype.runMergeFunction=function(t,r,n,i,s){var a=n.field,o=n.typename,l=n.merge;return l===fm?yw(i.store)(t,r):l===hm?r:(i.overwrite&&(t=void 0),l(t,r,pm(this,void 0,{typename:o,fieldName:a.name.value,field:a,variables:i.variables},i,s||Object.create(null))))},e})();function pm(e,t,r,n,i){var s=e.getStoreFieldName(r),a=tn(s),o=r.variables||n.variables,l=n.store,c=l.toReference,u=l.canRead;return{args:id(r),field:r.field||null,fieldName:a,storeFieldName:s,variables:o,isReference:Se,toReference:c,storage:i,cache:e.cache,canRead:u,readField:function(){return e.readField(qf(arguments,t,o),n)},mergeObjects:yw(n.store)}}function qf(e,t,r){var n=e[0],i=e[1],s=e.length,a;return typeof n=="string"?a={fieldName:n,from:s>1?i:t}:(a=O({},n),We.call(a,"from")||(a.from=t)),globalThis.__DEV__!==!1&&a.from===void 0&&globalThis.__DEV__!==!1&&ne.warn(8,cy(Array.from(e))),a.variables===void 0&&(a.variables=r),a}function yw(e){return function(r,n){if(De(r)||De(n))throw ut(9);if(Me(r)&&Me(n)){var i=e.getFieldValue(r,"__typename"),s=e.getFieldValue(n,"__typename"),a=i&&s&&i!==s;if(a)return n;if(Se(r)&&ii(n))return e.merge(r.__ref,n),r;if(ii(r)&&Se(n))return e.merge(r,n.__ref),n;if(ii(r)&&ii(n))return O(O({},r),n)}return n}}function Fc(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:O(O({},e),{clientOnly:t,deferred:r})),i}var E1=(function(){function e(t,r,n){this.cache=t,this.reader=r,this.fragments=n}return e.prototype.writeToStore=function(t,r){var n=this,i=r.query,s=r.result,a=r.dataId,o=r.variables,l=r.overwrite,c=On(i),u=f1();o=O(O({},Of(c)),o);var f=O(O({store:t,written:Object.create(null),merge:function(v,y){return u.merge(v,y)},variables:o,varString:Kr(o)},hw(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:s||Object.create(null),dataId:a,selectionSet:c.selectionSet,mergeTree:{map:new Map},context:f});if(!Se(h))throw ut(12,s);return f.incomingById.forEach(function(v,y){var w=v.storeObject,x=v.mergeTree,p=v.fieldNodeSet,g=hi(y);if(x&&x.map.size){var m=n.applyMerges(x,g,w,f);if(Se(m))return;w=m}if(globalThis.__DEV__!==!1&&!f.overwrite){var b=Object.create(null);p.forEach(function(k){k.selectionSet&&(b[k.name.value]=!0)});var _=function(k){return b[tn(k)]===!0},S=function(k){var N=x&&x.map.get(k);return!!(N&&N.info&&N.info.merge)};
94Object.keys(w).forEach(function(k){_(k)&&!S(k)&&k1(g,w,k,f.store)})}t.merge(y,w)}),t.retain(h.__ref),h},e.prototype.processSelectionSet=function(t){var r=this,n=t.dataId,i=t.result,s=t.selectionSet,a=t.context,o=t.mergeTree,l=this.cache.policies,c=Object.create(null),u=n&&l.rootTypenamesById[n]||Gu(i,s,a.fragmentMap)||n&&a.store.get(n,"__typename");typeof u=="string"&&(c.__typename=u);var f=function(){var m=qf(arguments,c,a.variables);if(Se(m.from)){var b=a.incomingById.get(m.from.__ref);if(b){var _=l.readField(O(O({},m),{from:b.storeObject}),a);if(_!==void 0)return _}}return l.readField(m,a)},h=new Set;this.flattenFields(s,i,a,u).forEach(function(m,b){var _,S=wr(b),k=i[S];if(h.add(b),k!==void 0){var N=l.getStoreFieldName({typename:u,fieldName:b.name.value,field:b,variables:m.variables}),R=mm(o,N),P=r.processFieldValue(k,b,b.selectionSet?Fc(m,!1,!1):m,R),H=void 0;b.selectionSet&&(Se(P)||ii(P))&&(H=f("__typename",P));var G=l.getMergeFunction(u,b.name.value,H);G?R.info={field:b,typename:u,merge:G}:gm(o,N),c=m.merge(c,(_={},_[N]=P,_))}else globalThis.__DEV__!==!1&&!m.clientOnly&&!m.deferred&&!Rf.added(b)&&!l.getReadFunction(u,b.name.value)&&globalThis.__DEV__!==!1&&ne.error(13,wr(b),i)});try{var v=l.identify(i,{typename:u,selectionSet:s,fragmentMap:a.fragmentMap,storeObject:c,readField:f}),y=v[0],w=v[1];n=n||y,w&&(c=a.merge(c,w))}catch(m){if(!n)throw m}if(typeof n=="string"){var x=hi(n),p=a.written[n]||(a.written[n]=[]);if(p.indexOf(s)>=0||(p.push(s),this.reader&&this.reader.isFresh(i,x,s,a)))return x;var g=a.incomingById.get(n);return g?(g.storeObject=a.merge(g.storeObject,c),g.mergeTree=sd(g.mergeTree,o),h.forEach(function(m){return g.fieldNodeSet.add(m)})):a.incomingById.set(n,{storeObject:c,mergeTree:Ko(o)?void 0:o,fieldNodeSet:h}),x}return c},e.prototype.processFieldValue=function(t,r,n,i){var s=this;return!r.selectionSet||t===null?globalThis.__DEV__!==!1?Gy(t):t:De(t)?t.map(function(a,o){var l=s.processFieldValue(a,r,n,mm(i,o));return gm(i,o),l}):this.processSelectionSet({result:t,selectionSet:r.selectionSet,context:n,mergeTree:i})},e.prototype.flattenFields=function(t,r,n,i){i===void 0&&(i=Gu(r,t,n.fragmentMap));var s=new Map,a=this.cache.policies,o=new _r(!1);return(function l(c,u){var f=o.lookup(c,u.clientOnly,u.deferred);f.visited||(f.visited=!0,c.selections.forEach(function(h){if(ma(h,n.variables)){var v=u.clientOnly,y=u.deferred;if(!(v&&y)&&Dt(h.directives)&&h.directives.forEach(function(p){var g=p.name.value;if(g==="client"&&(v=!0),g==="defer"){var m=El(p,n.variables);(!m||m.if!==!1)&&(y=!0)}}),Xr(h)){var w=s.get(h);w&&(v=v&&w.clientOnly,y=y&&w.deferred),s.set(h,Fc(n,v,y))}else{var x=Sl(h,n.lookupFragment);if(!x&&h.kind===te.FRAGMENT_SPREAD)throw ut(14,h.name.value);x&&a.fragmentMatches(x,i,r,n.variables)&&l(x.selectionSet,Fc(n,v,y))}}}))})(t,n),s},e.prototype.applyMerges=function(t,r,n,i,s){var a,o=this;if(t.map.size&&!Se(n)){var l=!De(n)&&(Se(r)||ii(r))?r:void 0,c=n;l&&!s&&(s=[Se(l)?l.__ref:l]);var u,f=function(h,v){return De(h)?typeof v=="number"?h[v]:void 0:i.store.getFieldValue(h,String(v))};t.map.forEach(function(h,v){var y=f(l,v),w=f(c,v);if(w!==void 0){s&&s.push(v);var x=o.applyMerges(h,y,w,i,s);x!==w&&(u=u||new Map,u.set(v,x)),s&&ne(s.pop()===v)}}),u&&(n=De(c)?c.slice(0):O({},c),u.forEach(function(h,v){n[v]=h}))}return t.info?this.cache.policies.runMergeFunction(r,n,t.info,i,s&&(a=i.store).getStorage.apply(a,s)):n},e})(),ww=[];function mm(e,t){var r=e.map;return r.has(t)||r.set(t,ww.pop()||{map:new Map}),r.get(t)}function sd(e,t){if(e===t||!t||Ko(t))return e;if(!e||Ko(e))return t;var r=e.info&&t.info?O(O({},e.info),t.info):e.info||t.info,n=e.map.size&&t.map.size,i=n?new Map:e.map.size?e.map:t.map,s={info:r,map:i};if(n){var a=new Set(t.map.keys());e.map.forEach(function(o,l){s.map.set(l,sd(o,t.map.get(l))),a.delete(l)}),a.forEach(function(o){s.map.set(o,sd(t.map.get(o),e.map.get(o)))})}return s}function Ko(e){return!e||!(e.info||e.map.size)}function gm(e,t){var r=e.map,n=r.get(t);n&&Ko(n)&&(ww.push(n),r.delete(t))}var vm=new Set;function k1(e,t,r,n){var i=function(f){var h=n.getFieldValue(f,r);return typeof h=="object"&&h},s=i(e);if(s){var a=i(t);if(a&&!Se(s)&&!Ee(s,a)&&!Object.keys(s).every(function(f){return n.getFieldValue(a,f)!==void 0})){var o=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),l=tn(r),c="".concat(o,".").concat(l);
94if(!vm.has(c)){vm.add(c);var u=[];!De(s)&&!De(a)&&[s,a].forEach(function(f){var h=n.getFieldValue(f,"__typename");typeof h=="string"&&!u.includes(h)&&u.push(h)}),globalThis.__DEV__!==!1&&ne.warn(15,l,o,u.length?"either ensure all objects of type "+u.join(" and ")+" have an ID or a custom merge function, or ":"",c,O({},s),O({},a))}}}}var bw=(function(e){sr(t,e);function t(r){r===void 0&&(r={});var n=e.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new Uy(Rf),n.assumeImmutableResults=!0,n.makeVar=b1,n.txCount=0,n.config=u1(r),n.addTypename=!!n.config.addTypename,n.policies=new S1({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return t.prototype.init=function(){var r=this.data=new sa.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=r.stump,this.resetResultCache()},t.prototype.resetResultCache=function(r){var n=this,i=this.storeReader,s=this.config.fragments;this.storeWriter=new E1(this,this.storeReader=new g1({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:dw(this.config),canon:r?void 0:i&&i.canon,fragments:s}),s),this.maybeBroadcastWatch=ia(function(a,o){return n.broadcastWatch(a,o)},{max:this.config.resultCacheMaxSize||ir["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(a){var o=a.optimistic?n.optimisticData:n.data;if(As(o)){var l=a.optimistic,c=a.id,u=a.variables;return o.makeCacheKey(a.query,a.callback,Kr({optimistic:l,id:c,variables:u}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(a){return a.resetCaching()})},t.prototype.restore=function(r){return this.init(),r&&this.data.replace(r),this},t.prototype.extract=function(r){return r===void 0&&(r=!1),(r?this.optimisticData:this.data).extract()},t.prototype.read=function(r){var n=r.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(O(O({},r),{store:r.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(s){if(s instanceof lw)return null;throw s}},t.prototype.write=function(r){try{return++this.txCount,this.storeWriter.writeToStore(this.data,r)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.modify=function(r){if(We.call(r,"id")&&!r.id)return!1;var n=r.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(r.id||"ROOT_QUERY",r.fields)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.diff=function(r){return this.storeReader.diffQueryAgainstStore(O(O({},r),{store:r.optimistic?this.optimisticData:this.data,rootId:r.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(r){var n=this;return this.watches.size||w1(this),this.watches.add(r),r.immediate&&this.maybeBroadcastWatch(r),function(){n.watches.delete(r)&&!n.watches.size&&om(n),n.maybeBroadcastWatch.forget(r)}},t.prototype.gc=function(r){var n;Kr.reset(),vn.reset(),this.addTypenameTransform.resetCache(),(n=this.config.fragments)===null||n===void 0||n.resetCaches();var i=this.optimisticData.gc();return r&&!this.txCount&&(r.resetResultCache?this.resetResultCache(r.resetResultIdentities):r.resetResultIdentities&&this.storeReader.resetCanon()),i},t.prototype.retain=function(r,n){return(n?this.optimisticData:this.data).retain(r)},t.prototype.release=function(r,n){return(n?this.optimisticData:this.data).release(r)},t.prototype.identify=function(r){if(Se(r))return r.__ref;try{return this.policies.identify(r)[0]}catch(n){globalThis.__DEV__!==!1&&ne.warn(n)}},t.prototype.evict=function(r){if(!r.id){if(We.call(r,"id"))return!1;r=O(O({},r),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(r,this.data)}finally{!--this.txCount&&r.broadcast!==!1&&this.broadcastWatches()}},t.prototype.reset=function(r){var n=this;return this.init(),Kr.reset(),r&&r.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),om(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(r){var n=this.optimisticData.removeLayer(r);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},t.prototype.batch=function(r){var n=this,i=r.update,s=r.optimistic,a=s===void 0?!0:s,o=r.removeOptimistic,l=r.onWatchUpdated,c,u=function(h){var v=n,y=v.data,w=v.optimisticData;++n.txCount,h&&(n.data=n.optimisticData=h);try{return c=i(n)}finally{--n.txCount,n.data=y,n.optimisticData=w}},f=new Set;return l&&!this.txCount&&this.broadcastWatches(O(O({},r),{onWatchUpdated:function(h){return f.add(h),!1}}
94)),typeof a=="string"?this.optimisticData=this.optimisticData.addLayer(a,u):a===!1?u(this.data):u(),typeof o=="string"&&(this.optimisticData=this.optimisticData.removeLayer(o)),l&&f.size?(this.broadcastWatches(O(O({},r),{onWatchUpdated:function(h,v){var y=l.call(this,h,v);return y!==!1&&f.delete(h),y}})),f.size&&f.forEach(function(h){return n.maybeBroadcastWatch.dirty(h)})):this.broadcastWatches(r),c},t.prototype.performTransaction=function(r,n){return this.batch({update:r,optimistic:n||n!==null})},t.prototype.transformDocument=function(r){return this.addTypenameToDocument(this.addFragmentsToDocument(r))},t.prototype.fragmentMatches=function(r,n){return this.policies.fragmentMatches(r,n)},t.prototype.lookupFragment=function(r){var n;return((n=this.config.fragments)===null||n===void 0?void 0:n.lookup(r))||null},t.prototype.broadcastWatches=function(r){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,r)})},t.prototype.addFragmentsToDocument=function(r){var n=this.config.fragments;return n?n.transform(r):r},t.prototype.addTypenameToDocument=function(r){return this.addTypename?this.addTypenameTransform.transformDocument(r):r},t.prototype.broadcastWatch=function(r,n){var i=r.lastDiff,s=this.diff(r);n&&(r.optimistic&&typeof n.optimistic=="string"&&(s.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,r,s,i)===!1)||(!i||!Ee(i.result,s.result))&&r.callback(r.lastDiff=s,i)},t})(ow);globalThis.__DEV__!==!1&&(bw.prototype.getMemoryInternals=kS);var ge;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(ge||(ge={}));function si(e){return e?e<7:!1}var ym=Object.assign,C1=Object.hasOwnProperty,Ms=(function(e){sr(t,e);function t(r){var n=r.queryManager,i=r.queryInfo,s=r.options,a=this,o=t.inactiveOnCreation.getValue();a=e.call(this,function(p){a._getOrCreateQuery();try{var g=p._subscription._observer;g&&!g.error&&(g.error=N1)}catch{}var m=!a.observers.size;a.observers.add(p);var b=a.last;return b&&b.error?p.error&&p.error(b.error):b&&b.result&&p.next&&p.next(a.maskResult(b.result)),m&&a.reobserve().catch(function(){}),function(){a.observers.delete(p)&&!a.observers.size&&a.tearDownQuery()}})||this,a.observers=new Set,a.subscriptions=new Set,a.dirty=!1,a._getOrCreateQuery=function(){return o&&(n.queries.set(a.queryId,i),o=!1),a.queryManager.getOrCreateQuery(a.queryId)},a.queryInfo=i,a.queryManager=n,a.waitForOwnResult=Ac(s.fetchPolicy),a.isTornDown=!1,a.subscribeToMore=a.subscribeToMore.bind(a),a.maskResult=a.maskResult.bind(a);var l=n.defaultOptions.watchQuery,c=l===void 0?{}:l,u=c.fetchPolicy,f=u===void 0?"cache-first":u,h=s.fetchPolicy,v=h===void 0?f:h,y=s.initialFetchPolicy,w=y===void 0?v==="standby"?f:v:y;a.options=O(O({},s),{initialFetchPolicy:w,fetchPolicy:v}),a.queryId=i.queryId||n.generateQueryId();var x=On(a.query);return a.queryName=x&&x.name&&x.name.value,a}return Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var r=this;return new Promise(function(n,i){var s={next:function(o){n(o),r.observers.delete(s),r.observers.size||r.queryManager.removeQuery(r.queryId),setTimeout(function(){a.unsubscribe()},0)},error:i},a=r.subscribe(s)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentFullResult=function(r){r===void 0&&(r=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||ge.ready,s=O(O({},n),{loading:si(i),networkStatus:i}),a=this.options.fetchPolicy,o=a===void 0?"cache-first":a;if(!(Ac(o)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var l=this.queryInfo.getDiff();(l.complete||this.options.returnPartialData)&&(s.data=l.result),Ee(s.data,{})&&(s.data=void 0),l.complete?(delete s.partial,l.complete&&s.networkStatus===ge.loading&&(o==="cache-first"||o==="c
94ache-only")&&(s.networkStatus=ge.ready,s.loading=!1)):s.partial=!0,s.networkStatus===ge.ready&&(s.error||s.errors)&&(s.networkStatus=ge.error),globalThis.__DEV__!==!1&&!l.complete&&!this.options.partialRefetch&&!s.loading&&!s.data&&!s.error&&xw(l.missing)}return r&&this.updateLastResult(s),s},t.prototype.getCurrentResult=function(r){return r===void 0&&(r=!0),this.maskResult(this.getCurrentFullResult(r))},t.prototype.isDifferentFromLastResult=function(r,n){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query),s=this.queryManager.dataMasking,a=s?i.nonReactiveQuery:this.query,o=s||i.hasNonreactiveDirective?!tw(a,this.last.result,r,this.variables):!Ee(this.last.result,r);return o||n&&!Ee(this.last.variables,n)},t.prototype.getLast=function(r,n){var i=this.last;if(i&&i[r]&&(!n||Ee(i.variables,this.variables)))return i[r]},t.prototype.getLastResult=function(r){return this.getLast("result",r)},t.prototype.getLastError=function(r){return this.getLast("error",r)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(r){var n,i={pollInterval:0},s=this.options.fetchPolicy;if(s==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&r&&C1.call(r,"variables")){var a=jy(this.query),o=a.variableDefinitions;(!o||!o.some(function(l){return l.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&ne.warn(21,r,((n=a.name)===null||n===void 0?void 0:n.value)||a)}return r&&!Ee(this.options.variables,r)&&(i.variables=this.options.variables=O(O({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(i,ge.refetch)},t.prototype.fetchMore=function(r){var n=this,i=O(O({},r.query?r:O(O(O(O({},this.options),{query:this.options.query}),r),{variables:O(O({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var s=this.queryManager.generateQueryId();this.lastQuery=r.query?this.transformDocument(this.options.query):i.query;var a=this.queryInfo,o=a.networkStatus;a.networkStatus=ge.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var l=new Set,c=r?.updateQuery,u=this.options.fetchPolicy!=="no-cache";return u||ne(c,22),this.queryManager.fetchQuery(s,i,ge.fetchMore).then(function(f){if(n.queryManager.removeQuery(s),a.networkStatus===ge.fetchMore&&(a.networkStatus=o),u)n.queryManager.cache.batch({update:function(y){var w=r.updateQuery;w?y.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(x){return w(x,{fetchMoreResult:f.data,variables:i.variables})}):y.writeQuery({query:i.query,variables:i.variables,data:f.data})},onWatchUpdated:function(y){l.add(y.query)}});else{var h=n.getLast("result"),v=c(h.data,{fetchMoreResult:f.data,variables:i.variables});n.reportResult(O(O({},h),{networkStatus:o,loading:si(o),data:v}),n.variables)}return n.maskResult(f)}).finally(function(){u&&!l.has(n.query)&&n.reobserveCacheFirst()})},t.prototype.subscribeToMore=function(r){var n=this,i=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(s){var a=r.updateQuery;a&&n.updateQuery(function(o,l){return a(o,O({subscriptionData:s},l))})},error:function(s){if(r.onError){r.onError(s);return}globalThis.__DEV__!==!1&&ne.error(23,s)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(r){return this.reobserve(r)},t.prototype.silentSetOptions=function(r){var n=Tn(this.options,r||{});ym(this.options,n)},t.prototype.setVariables=function(r){return Ee(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},ge.setVariables):Promise.resolve())},t.prototype.updateQuery=function(r){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}),s=i.result,a=i.complete,o=r(s,{variables:this.variables,complete:!!a,previousData:s});o&&(n.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),n.broadcastQueries())},t.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(r,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,s=i===void 0?"cache-first":i,a=n.initialFetchPolicy,o=a===void 0?s:a;s==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(s,{reason:r,options:n,observable:this,initialFetchPolicy:o}):r==="variables-changed"?n.fetchPolicy=o:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},t.prototype.fetch=function(r,n,i){var s=this._getOrCreateQuery();return s.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(s,r,n,i)},t.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,s=n.options.pollInterval;if(!s||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===s)){ne(s,24);var a=i||(this.pollingInfo={});a.interval=s;var o=function(){var c,u;r.pollingInfo&&(!si(r.queryInfo.networkStatus)&&!(!((u=(c=r.options).skipPollAttempt)===null||u===void 0)&&u.call(c))?r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"}
94,ge.poll).then(l,l):l())},l=function(){var c=r.pollingInfo;c&&(clearTimeout(c.timeout),c.timeout=setTimeout(o,c.interval))};l()}}},t.prototype.updateLastResult=function(r,n){n===void 0&&(n=this.variables);var i=this.getLastError();return i&&this.last&&!Ee(n,this.last.variables)&&(i=void 0),this.last=O({result:this.queryManager.assumeImmutableResults?r:Gy(r),variables:n},i?{error:i}:null)},t.prototype.reobserveAsConcast=function(r,n){var i=this;this.isTornDown=!1;var s=n===ge.refetch||n===ge.fetchMore||n===ge.poll,a=this.options.variables,o=this.options.fetchPolicy,l=Tn(this.options,r||{}),c=s?l:ym(this.options,l),u=this.transformDocument(c.query);this.lastQuery=u,s||(this.updatePolling(),r&&r.variables&&!Ee(r.variables,a)&&c.fetchPolicy!=="standby"&&(c.fetchPolicy===o||typeof c.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",c),n===void 0&&(n=ge.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=Ac(c.fetchPolicy));var f=function(){i.concast===y&&(i.waitForOwnResult=!1)},h=c.variables&&O({},c.variables),v=this.fetch(c,n,u),y=v.concast,w=v.fromLink,x={next:function(p){Ee(i.variables,h)&&(f(),i.reportResult(p,h))},error:function(p){Ee(i.variables,h)&&(Xy(p)||(p=new lr({networkError:p})),f(),i.reportError(p,h))}};return!s&&(w||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=y,this.observer=x),y.addObserver(x),y},t.prototype.reobserve=function(r,n){return yE(this.reobserveAsConcast(r,n).promise.then(this.maskResult))},t.prototype.resubscribeAfterError=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this.last;this.resetLastResults();var s=this.subscribe.apply(this,r);return this.last=i,s},t.prototype.observe=function(){this.reportResult(this.getCurrentFullResult(!1),this.variables)},t.prototype.reportResult=function(r,n){var i=this.getLastError(),s=this.isDifferentFromLastResult(r,n);(i||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,n),(i||s)&&Fs(this.observers,"next",this.maskResult(r))},t.prototype.reportError=function(r,n){var i=O(O({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:ge.error,loading:!1});this.updateLastResult(i,n),Fs(this.observers,"error",this.last.error=r)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(r){return this.queryManager.transform(r)},t.prototype.maskResult=function(r){return r&&"data"in r?O(O({},r),{data:this.queryManager.maskOperation({document:this.query,data:r.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):r},t.prototype.resetNotifications=function(){this.cancelNotifyTimeout(),this.dirty=!1},t.prototype.cancelNotifyTimeout=function(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0)},t.prototype.scheduleNotify=function(){var r=this;this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0)))},t.prototype.notify=function(){if(this.cancelNotifyTimeout(),this.dirty&&(this.options.fetchPolicy=="cache-only"||this.options.fetchPolicy=="cache-and-network"||!si(this.queryInfo.networkStatus))){var r=this.queryInfo.getDiff();r.fromOptimisticTransaction?this.observe():this.reobserveCacheFirst()}this.dirty=!1},t.prototype.reobserveCacheFirst=function(){var r=this.options,n=r.fetchPolicy,i=r.nextFetchPolicy;return n==="cache-and-network"||n==="network-only"?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(s,a){return this.nextFetchPolicy=i,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(s,a):n}}):this.reobserve()},t.inactiveOnCreation=new va,t})(Ne);Ky(Ms);function N1(e){globalThis.__DEV__!==!1&&ne.error(25,e.message,e.stack)}function xw(e){globalThis.__DEV__!==!1&&e&&globalThis.__DEV__!==!1&&ne.debug(26,e)}function Ac(e){return e==="network-only"||e==="no-cache"||e==="standby"}var ai=new(An?WeakMap:Map);function Lc(e,t){var r=e[t];typeof r=="function"&&(e[t]=function(){return ai.set(e,(ai.get(e)+1)%1e15),r.apply(this,arguments)})}var Mc=(function(){function e(t,r){r===void 0&&(r=t.generateQueryId()),this.queryId=r,this.document=null,this.lastRequestId=1,this.stopped=!1,this.observableQuery=null;var n=this.cache=t.cache;ai.has(n)||(ai.set(n,0),Lc(n,"evict"),Lc(n,"modify"),Lc(n,"reset"))}return e.prototype.init=function(t){var r=t.networkStatus||ge.loading;return this.variables&&this.networkStatus!==ge.loading&&!Ee(this.variables,t.variables)&&(r=ge.setVariables),Ee(t.variables,this.variables)||(this.lastDiff=void 0,this.cancel()),Object.assign(this,{document:t.document,variables:t.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:r}),t.observableQuery&&this.setObservableQuery(t.observableQuery),t.lastRequestId&&(this.lastRequestId=t.lastRequestId),this},e.prototype.resetDiff=function(){this.lastDiff=void 0},e.prototype.getDiff=function(){var t=this.getDiffOptions();if(this.lastDiff&&Ee(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var r=this.observableQuery;if(r&&r.options.fetchPolicy==="no-cache")return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(t,r){this.lastDiff=t?{diff:t,options:r||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(t){var r;return t===void 0&&(t=this.variables),{query:this.document,variables:t,returnPartialData:!0,optimistic:!0,canonizeResults:(r=this.observableQuery)===null||r===void 0?void 0:r.options.canonizeResults}},e.prototype.setDiff=function(t){var r,n,i=this.lastDiff&&this.lastDiff.diff;t&&!t.complete&&!((r=this.observableQuery)===null||r===void 0)&&r.getLastError()||(this.updateLastDiff(t),Ee(i&&i.result,t&&t.result)||(n=this.observableQuery)===null||n===void 0||n.scheduleNotify())},e.prototype.setObservableQuery=function(t){t!==this.observableQuery&&(this.observableQuery=t,t&&(t.queryInfo=this))},e.prototype.stop=function(){var t;if(!this.stopped){this.stopped=!0,(t=this.observableQuery)===null||t===void 0||t.resetNotifications(),this.cancel();var r=this.observableQuery;r&&r.stopPolling()}},e.prototype.cancel=function(){var t;(t=this.cancelWatch)===null||t===void 0||t.call(this),this.cancelWatch=void 0},e.prototype.updateWatch=function(t){var r=this;t===void 0&&(t=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=O(O({},this.getDiffOptions(t)),{watcher:this,callback:function(s){return r.setDiff(s)}});(!this.lastWatch||!Ee(i,this.lastWatch))&&(this.cancel(),this.cancelWatch=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(t,r){var n=this.lastWrite;return!(n&&n.dmCount===ai.get(this.cache)&&Ee(r,n.variables)&&Ee(t.data,n.result.data))},e.prototype.markResult=function(t,r,n,i){var s=this,a,o=new en,l=Dt(t.errors)?t.errors.slice(0):[];if((a=this.observableQuery)===null||a===void 0||a.resetNotifications(),"incremental"in t&&Dt(t.incremental)){var c=Jy(this.getDiff().result,t);t.data=c}else if("hasNext"in t&&t.hasNext){var u=this.getDiff();t.data=o.merge(u.result,t.data)}this.graphQLErrors=l,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:t.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(ad(t,n.errorPolicy)?this.cache.performTransaction(function(f){if(s.shouldWrite(t,n.variables))f.writeQuery({query:r,data:t.data,variables:n.variables,overwrite:i===1}),s.lastWrite={result:t,variables:n.variables,dmCount:ai.get(s.cache)};else if(s.lastDiff&&s.lastDiff.diff.complete){t.data=s.lastDiff.diff.result;return}var h=s.getDiffOptions(n.variables),v=f.diff(h);!s.stopped&&Ee(s.variables,n.variables)&&s.updateWatch(n.variables),s.updateLastDiff(v,h),v.complete&&(t.data=v.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=ge.ready},e.prototype.markError=function(t){var r;return this.networkStatus=ge.error,this.lastWrite=void 0,(r=this.observableQuery)===null||r===void 0||r.resetNotifications(),t.graphQLErrors&&(this.graphQLErrors=t.graphQLErrors),t.networkError&&(this.networkError=t.networkError),t},e})();
94function ad(e,t){t===void 0&&(t="none");var r=t==="ignore"||t==="all",n=!po(e);return!n&&r&&e.data&&(n=!0),n}var j1=Object.prototype.hasOwnProperty,wm=Object.create(null),O1=(function(){function e(t){var r=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new Nf(ir["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new _r(!1),this.noCacheWarningsByQueryId=new Set;var n=new Uy(function(s){return r.cache.transformDocument(s)},{cache:!1});this.cache=t.cache,this.link=t.link,this.defaultOptions=t.defaultOptions,this.queryDeduplication=t.queryDeduplication,this.clientAwareness=t.clientAwareness,this.localState=t.localState,this.ssrMode=t.ssrMode,this.assumeImmutableResults=t.assumeImmutableResults,this.dataMasking=t.dataMasking;var i=t.documentTransform;this.documentTransform=i?n.concat(i).concat(n):n,this.defaultContext=t.defaultContext||Object.create(null),(this.onBroadcast=t.onBroadcast)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var t=this;this.queries.forEach(function(r,n){t.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(ut(27))},e.prototype.cancelPendingFetches=function(t){this.fetchCancelFns.forEach(function(r){return r(t)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(t){return Ir(this,arguments,void 0,function(r){var n,i,s,a,o,l,c,u=r.mutation,f=r.variables,h=r.optimisticResponse,v=r.updateQueries,y=r.refetchQueries,w=y===void 0?[]:y,x=r.awaitRefetchQueries,p=x===void 0?!1:x,g=r.update,m=r.onQueryUpdated,b=r.fetchPolicy,_=b===void 0?((l=this.defaultOptions.mutate)===null||l===void 0?void 0:l.fetchPolicy)||"network-only":b,S=r.errorPolicy,k=S===void 0?((c=this.defaultOptions.mutate)===null||c===void 0?void 0:c.errorPolicy)||"none":S,N=r.keepRootFields,R=r.context;return Rr(this,function(P){switch(P.label){case 0:return ne(u,28),ne(_==="network-only"||_==="no-cache",29),n=this.generateMutationId(),u=this.cache.transformForLink(this.transform(u)),i=this.getDocumentInfo(u).hasClientExports,f=this.getVariables(u,f),i?[4,this.localState.addExportedVariables(u,f,R)]:[3,2];case 1:f=P.sent(),P.label=2;case 2:return s=this.mutationStore&&(this.mutationStore[n]={mutation:u,variables:f,loading:!0,error:null}),a=h&&this.markMutationOptimistic(h,{mutationId:n,document:u,variables:f,fetchPolicy:_,errorPolicy:k,context:R,updateQueries:v,update:g,keepRootFields:N}),this.broadcastQueries(),o=this,[2,new Promise(function(H,G){return Tc(o.getObservableFromLink(u,O(O({},R),{optimisticResponse:a?h:void 0}),f,{},!1),function(Q){if(po(Q)&&k==="none")throw new lr({graphQLErrors:Xu(Q)});s&&(s.loading=!1,s.error=null);var U=O({},Q);return typeof w=="function"&&(w=w(U)),k==="ignore"&&po(U)&&delete U.errors,o.markMutationResult({mutationId:n,result:U,document:u,variables:f,fetchPolicy:_,errorPolicy:k,context:R,update:g,updateQueries:v,awaitRefetchQueries:p,refetchQueries:w,removeOptimistic:a?n:void 0,onQueryUpdated:m,keepRootFields:N})}).subscribe({next:function(Q){o.broadcastQueries(),(!("hasNext"in Q)||Q.hasNext===!1)&&H(O(O({},Q),{data:o.maskOperation({document:u,data:Q.data,fetchPolicy:_,id:n})}))},error:function(Q){s&&(s.loading=!1,s.error=Q),a&&o.cache.removeOptimistic(n),o.broadcastQueries(),G(Q instanceof lr?Q:new lr({networkError:Q}))}})})]}})})},e.prototype.markMutationResult=function(t,r){var n=this;r===void 0&&(r=this.cache);var i=t.result,s=[],a=t.fetchPolicy==="no-cache";if(!a&&ad(i,t.errorPolicy)){if(pi(i)||s.push({result:i.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}),pi(i)&&Dt(i.incremental)){var o=r.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}),l=void 0;o.result&&(l=Jy(o.result,i)),typeof l<"u"&&(i.data=l,s.push({result:l,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}))}var c=t.updateQueries;c&&this.queries.forEach(function(f,h){var v=f.observableQuery,y=v&&v.queryName;if(!(!y||!j1.call(c,y))){var w=c[y],x=n.queries.get(h),p=x.document,g=x.variables,m=r.diff({query:p,variables:g,returnPartialData:!0,optimistic:!1}),b=m.result,_=m.complete;if(_&&b){var S=w(b,{mutationResult:i,queryName:p&&xs(p)||void 0,queryVariables:g});S&&s.push({result:S,dataId:"ROOT_QUERY",query:p,variables:g})}}})}if(s.length>0||(t.refetchQueries||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){var u=[];
94if(this.refetchQueries({updateCache:function(f){a||s.forEach(function(w){return f.write(w)});var h=t.update,v=!SE(i)||pi(i)&&!i.hasNext;if(h){if(!a){var y=f.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});y.complete&&(i=O(O({},i),{data:y.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}v&&h(f,i,{context:t.context,variables:t.variables})}!a&&!t.keepRootFields&&v&&f.modify({id:"ROOT_MUTATION",fields:function(w,x){var p=x.fieldName,g=x.DELETE;return p==="__typename"?w:g}})},include:t.refetchQueries,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(function(f){return u.push(f)}),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(u).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(t,r){var n=this,i=typeof t=="function"?t(r.variables,{IGNORE:wm}):t;return i===wm?!1:(this.cache.recordOptimisticTransaction(function(s){try{n.markMutationResult(O(O({},r),{result:{data:i}}),s)}catch(a){globalThis.__DEV__!==!1&&ne.error(a)}},r.mutationId),!0)},e.prototype.fetchQuery=function(t,r,n){return this.fetchConcastWithInfo(this.getOrCreateQuery(t),r,n).concast.promise},e.prototype.getQueryStore=function(){var t=Object.create(null);return this.queries.forEach(function(r,n){t[n]={variables:r.variables,networkStatus:r.networkStatus,networkError:r.networkError,graphQLErrors:r.graphQLErrors}}),t},e.prototype.resetErrors=function(t){var r=this.queries.get(t);r&&(r.networkError=void 0,r.graphQLErrors=[])},e.prototype.transform=function(t){return this.documentTransform.transformDocument(t)},e.prototype.getDocumentInfo=function(t){var r=this.transformCache;if(!r.has(t)){var n={hasClientExports:iS(t),hasForcedResolvers:this.localState.shouldForceResolvers(t),hasNonreactiveDirective:ra(["nonreactive"],t),nonReactiveQuery:oE(t),clientQuery:this.localState.clientQuery(t),serverQuery:qy([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],t),defaultVars:Of(On(t)),asQuery:O(O({},t),{definitions:t.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?O(O({},i),{operation:"query"}):i})})};r.set(t,n)}return r.get(t)},e.prototype.getVariables=function(t,r){return O(O({},this.getDocumentInfo(t).defaultVars),r)},e.prototype.watchQuery=function(t){var r=this.transform(t.query);t=O(O({},t),{variables:this.getVariables(r,t.variables)}),typeof t.notifyOnNetworkStatusChange>"u"&&(t.notifyOnNetworkStatusChange=!1);var n=new Mc(this),i=new Ms({queryManager:this,queryInfo:n,options:t});return i.lastQuery=r,Ms.inactiveOnCreation.getValue()||this.queries.set(i.queryId,n),n.init({document:r,observableQuery:i,variables:i.variables}),i},e.prototype.query=function(t,r){var n=this;r===void 0&&(r=this.generateQueryId()),ne(t.query,30),ne(t.query.kind==="Document",31),ne(!t.returnPartialData,32),ne(!t.pollInterval,33);var i=this.transform(t.query);return this.fetchQuery(r,O(O({},t),{query:i})).then(function(s){return s&&O(O({},s),{data:n.maskOperation({document:i,data:s.data,fetchPolicy:t.fetchPolicy,id:r})})}).finally(function(){return n.stopQuery(r)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(t){var r=this.queries.get(t);r&&r.stop()},e.prototype.clearStore=function(t){return t===void 0&&(t={discardWatches:!0}),this.cancelPendingFetches(ut(34)),this.queries.forEach(function(r){r.observableQuery?r.networkStatus=ge.loading:r.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(t)},e.prototype.getObservableQueries=function(t){var r=this;t===void 0&&(t="active");var n=new Map,i=new Map,s=new Map,a=new Set;
94return Array.isArray(t)&&t.forEach(function(o){if(typeof o=="string")i.set(o,o),s.set(o,!1);else if(RS(o)){var l=vn(r.transform(o));i.set(l,xs(o)),s.set(l,!1)}else Me(o)&&o.query&&a.add(o)}),this.queries.forEach(function(o,l){var c=o.observableQuery,u=o.document;if(c){if(t==="all"){n.set(l,c);return}var f=c.queryName,h=c.options.fetchPolicy;if(h==="standby"||t==="active"&&!c.hasObservers())return;(t==="active"||f&&s.has(f)||u&&s.has(vn(u)))&&(n.set(l,c),f&&s.set(f,!0),u&&s.set(vn(u),!0))}}),a.size&&a.forEach(function(o){var l=$u("legacyOneTimeQuery"),c=r.getOrCreateQuery(l).init({document:o.query,variables:o.variables}),u=new Ms({queryManager:r,queryInfo:c,options:O(O({},o),{fetchPolicy:"network-only"})});ne(u.queryId===l),c.setObservableQuery(u),n.set(l,u)}),globalThis.__DEV__!==!1&&s.size&&s.forEach(function(o,l){if(!o){var c=i.get(l);c?globalThis.__DEV__!==!1&&ne.warn(35,c):globalThis.__DEV__!==!1&&ne.warn(36)}}),n},e.prototype.reFetchObservableQueries=function(t){var r=this;t===void 0&&(t=!1);var n=[];return this.getObservableQueries(t?"all":"active").forEach(function(i,s){var a=i.options.fetchPolicy;i.resetLastResults(),(t||a!=="standby"&&a!=="cache-only")&&n.push(i.refetch()),(r.queries.get(s)||i.queryInfo).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.startGraphQLSubscription=function(t){var r=this,n=t.query,i=t.variables,s=t.fetchPolicy,a=t.errorPolicy,o=a===void 0?"none":a,l=t.context,c=l===void 0?{}:l,u=t.extensions,f=u===void 0?{}:u;n=this.transform(n),i=this.getVariables(n,i);var h=function(y){return r.getObservableFromLink(n,c,y,f).map(function(w){s!=="no-cache"&&(ad(w,o)&&r.cache.write({query:n,result:w.data,dataId:"ROOT_SUBSCRIPTION",variables:y}),r.broadcastQueries());var x=po(w),p=zE(w);if(x||p){var g={};if(x&&(g.graphQLErrors=w.errors),p&&(g.protocolErrors=w.extensions[Df]),o==="none"||p)throw new lr(g)}return o==="ignore"&&delete w.errors,w})};if(this.getDocumentInfo(n).hasClientExports){var v=this.localState.addExportedVariables(n,i,c).then(h);return new Ne(function(y){var w=null;return v.then(function(x){return w=x.subscribe(y)},y.error),function(){return w&&w.unsubscribe()}})}return h(i)},e.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},e.prototype.removeQuery=function(t){var r;this.fetchCancelFns.delete(t),this.queries.has(t)&&((r=this.queries.get(t))===null||r===void 0||r.stop(),this.queries.delete(t))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(t){var r;return(r=t.observableQuery)===null||r===void 0?void 0:r.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(t,r,n,i,s){var a=this,o;s===void 0&&(s=(o=r?.queryDeduplication)!==null&&o!==void 0?o:this.queryDeduplication);var l,c=this.getDocumentInfo(t),u=c.serverQuery,f=c.clientQuery;if(u){var h=this,v=h.inFlightLinkObservables,y=h.link,w={query:u,variables:n,operationName:xs(u)||void 0,context:this.prepareContext(O(O({},r),{forceFetch:!s})),extensions:i};if(r=w.context,s){var x=vn(u),p=Kr(n),g=v.lookup(x,p);if(l=g.observable,!l){var m=new qn([Zu(y,w)]);l=g.observable=m,m.beforeNext(function b(_,S){_==="next"&&"hasNext"in S&&S.hasNext?m.beforeNext(b):v.remove(x,p)})}}else l=new qn([Zu(y,w)])}else l=new qn([Ne.of({data:{}})]),r=this.prepareContext(r);return f&&(l=Tc(l,function(b){return a.localState.runResolvers({document:f,remoteResult:b,context:r,variables:n})})),l},e.prototype.getResultsFromLink=function(t,r,n){var i=t.lastRequestId=this.generateRequestId(),s=this.cache.transformForLink(n.query);return Tc(this.getObservableFromLink(s,n.context,n.variables),function(a){var o=Xu(a),l=o.length>0,c=n.errorPolicy;if(i>=t.lastRequestId){if(l&&c==="none")throw t.markError(new lr({graphQLErrors:o}));t.markResult(a,s,n,r),t.markReady()}var u={data:a.data,loading:!1,networkStatus:ge.ready};return l&&c==="none"&&(u.data=void 0),l&&c!=="ignore"&&(u.errors=o,u.networkStatus=ge.error),u},function(a){var o=Xy(a)?a:new lr({networkError:a});throw i>=t.lastRequestId&&t.markError(o),o})},e.prototype.fetchConcastWithInfo=function(t,r,n,i){var s=this;n===void 0&&(n=ge.loading),i===void 0&&(i=r.query);var a=this.getVariables(i,r.variables),o=this.defaultOptions.watchQuery,l=r.fetchPolicy,c=l===void 0?o&&o.fetchPolicy||"cache-first":l,u=r.errorPolicy,f=u===void 0?o&&o.errorPolicy||"none":u,h=r.returnPartialData,v=h===void 0?!1:h,y=r.notifyOnNetworkStatusChange,w=y===void 0?!1:y,x=r.context,p=x===void 0?{}:x,g=Object.assign({},r,{query:i,variables:a,fetchPolicy:c,errorPolicy:f,returnPartialData:v,notifyOnNetworkStatusChange:w,context:p}),m=function(N){g.variables=N;var R=s.fetchQueryByPolicy(t,g,n);return g.fetchPolicy!=="standby"&&R.sources.length>0&&t.observableQuery&&t.observableQuery.applyNextFetchPolicy("after-fetch",r),R},b=function(){return s.fetchCancelFns.delete(t.queryId)};this.fetchCancelFns.set(t.queryId,function(N){b(),setTimeout(function(){return _.cancel(N)})});var _,S;if(this.getDocumentInfo(g.query).hasClientExports)_=new qn(this.localState.addExportedVariables(g.query,g.variables,g.context).then(m).then(function(N){return N.sources})),S=!0;else{var k=m(g.variables);S=k.fromLink,_=new qn(k.sources)}return _.promise.then(b,b),{concast:_,fromLink:S}},e.prototype.refetchQueries=function(t){var r=this,n=t.updateCache,i=t.include,s=t.optimistic,a=s===void 0?!1:s,o=t.removeOptimistic,l=o===void 0?a?$u("refetchQueries"):void 0:o,c=t.onQueryUpdated,u=new Map;
94i&&this.getObservableQueries(i).forEach(function(h,v){u.set(v,{oq:h,lastDiff:(r.queries.get(v)||h.queryInfo).getDiff()})});var f=new Map;return n&&this.cache.batch({update:n,optimistic:a&&l||!1,removeOptimistic:l,onWatchUpdated:function(h,v,y){var w=h.watcher instanceof Mc&&h.watcher.observableQuery;if(w){if(c){u.delete(w.queryId);var x=c(w,v,y);return x===!0&&(x=w.refetch()),x!==!1&&f.set(w,x),x}c!==null&&u.set(w.queryId,{oq:w,lastDiff:y,diff:v})}}}),u.size&&u.forEach(function(h,v){var y=h.oq,w=h.lastDiff,x=h.diff,p;c&&(x||(x=r.cache.diff(y.queryInfo.getDiffOptions())),p=c(y,x,w)),(!c||p===!0)&&(p=y.refetch()),p!==!1&&f.set(y,p),v.indexOf("legacyOneTimeQuery")>=0&&r.stopQueryNoBroadcast(v)}),l&&this.cache.removeOptimistic(l),f},e.prototype.maskOperation=function(t){var r,n,i,s=t.document,a=t.data;if(globalThis.__DEV__!==!1){var o=t.fetchPolicy,l=t.id,c=(r=On(s))===null||r===void 0?void 0:r.operation,u=((n=c?.[0])!==null&&n!==void 0?n:"o")+l;this.dataMasking&&o==="no-cache"&&!mS(s)&&!this.noCacheWarningsByQueryId.has(u)&&(this.noCacheWarningsByQueryId.add(u),globalThis.__DEV__!==!1&&ne.warn(37,(i=xs(s))!==null&&i!==void 0?i:"Unnamed ".concat(c??"operation")))}return this.dataMasking?c1(a,s,this.cache):a},e.prototype.maskFragment=function(t){var r=t.data,n=t.fragment,i=t.fragmentName;return this.dataMasking?aw(r,n,this.cache,i):r},e.prototype.fetchQueryByPolicy=function(t,r,n){var i=this,s=r.query,a=r.variables,o=r.fetchPolicy,l=r.refetchWritePolicy,c=r.errorPolicy,u=r.returnPartialData,f=r.context,h=r.notifyOnNetworkStatusChange,v=t.networkStatus;t.init({document:s,variables:a,networkStatus:n});var y=function(){return t.getDiff()},w=function(b,_){_===void 0&&(_=t.networkStatus||ge.loading);var S=b.result;globalThis.__DEV__!==!1&&!u&&!Ee(S,{})&&xw(b.missing);var k=function(N){return Ne.of(O({data:N,loading:si(_),networkStatus:_},b.complete?null:{partial:!0}))};return S&&i.getDocumentInfo(s).hasForcedResolvers?i.localState.runResolvers({document:s,remoteResult:{data:S},context:f,variables:a,onlyRunForcedResolvers:!0}).then(function(N){return k(N.data||void 0)}):c==="none"&&_===ge.refetch&&Array.isArray(b.missing)?k(void 0):k(S)},x=o==="no-cache"?0:n===ge.refetch&&l!=="merge"?1:2,p=function(){return i.getResultsFromLink(t,x,{query:s,variables:a,context:f,fetchPolicy:o,errorPolicy:c})},g=h&&typeof v=="number"&&v!==n&&si(n);switch(o){default:case"cache-first":{var m=y();return m.complete?{fromLink:!1,sources:[w(m,t.markReady())]}:u||g?{fromLink:!0,sources:[w(m),p()]}:{fromLink:!0,sources:[p()]}}case"cache-and-network":{var m=y();return m.complete||u||g?{fromLink:!0,sources:[w(m),p()]}:{fromLink:!0,sources:[p()]}}case"cache-only":return{fromLink:!1,sources:[w(y(),t.markReady())]};case"network-only":return g?{fromLink:!0,sources:[w(y()),p()]}:{fromLink:!0,sources:[p()]};case"no-cache":return g?{fromLink:!0,sources:[w(t.getDiff()),p()]}:{fromLink:!0,sources:[p()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getOrCreateQuery=function(t){return t&&!this.queries.has(t)&&this.queries.set(t,new Mc(this,t)),this.queries.get(t)},e.prototype.prepareContext=function(t){t===void 0&&(t={});var r=this.localState.prepareContext(t);return O(O(O({},this.defaultContext),r),{clientAwareness:this.clientAwareness})},e})(),T1=(function(){function e(t){var r=t.cache,n=t.client,i=t.resolvers,s=t.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=r,n&&(this.client=n),i&&this.addResolvers(i),s&&this.setFragmentMatcher(s)}return e.prototype.addResolvers=function(t){var r=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach(function(n){r.resolvers=$p(r.resolvers,n)}):this.resolvers=$p(this.resolvers,t)},e.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(t){return Ir(this,arguments,void 0,function(r){var n=r.document,i=r.remoteResult,s=r.context,a=r.variables,o=r.onlyRunForcedResolvers,l=o===void 0?!1:o;return Rr(this,function(c){return n?[2,this.resolveDocument(n,i.data,s,a,this.fragmentMatcher,l).then(function(u){return O(O({},i),{data:u.result})})]:[2,i]})})},e.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(t){return ra(["client"],t)&&this.resolvers?t:null},e.prototype.serverQuery=function(t){return Vy(t)},e.prototype.prepareContext=function(t){var r=this.cache;return O(O({},t),{cache:r,getCacheKey:function(n){return r.identify(n)}})},e.prototype.addExportedVariables=function(t){return Ir(this,arguments,void 0,function(r,n,i){return n===void 0&&(n={}),i===void 0&&(i={}),Rr(this,function(s){return r?[2,this.resolveDocument(r,this.buildRootValueFromCache(r,n)||{},this.prepareContext(i),n).then(function(a){return O(O({},n),a.exportedVariables)})]:[2,O({},n)]})})},e.prototype.shouldForceResolvers=function(t){var r=!1;return Gt(t,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(r=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),r))return xl}}}),r},e.prototype.buildRootValueFromCache=function(t,r){return this.cache.diff({query:aE(t),variables:r,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(t,r){return Ir(this,arguments,void 0,function(n,i,s,a,o,l){var c,u,f,h,v,y,w,x,p,g,m;return s===void 0&&(s={}),a===void 0&&(a={}),o===void 0&&(o=function(){return!0}),l===void 0&&(l=!1),Rr(this,function(b){return c=ga(n),u=zi(n),f=Mi(u),h=this.collectSelectionsToResolve(c,f),v=c.operation,y=v?v.charAt(0).toUpperCase()+v.slice(1):"Query",w=this,x=w.cache,p=w.client,g={fragmentMap:f,context:O(O({},s),{cache:x,client:p}),variables:a,fragmentMatcher:o,defaultOperationType:y,exportedVariables:{},selectionsToResolve:h,onlyRunForcedResolvers:l},m=!1,[2,this.resolveSelectionSet(c.selectionSet,m,i,g).then(function(_){return{result:_,exportedVariables:g.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(t,r,n,i){return Ir(this,void 0,void 0,function(){var s,a,o,l,c,u=this;return Rr(this,function(f){return s=i.fragmentMap,a=i.context,o=i.variables,l=[n],c=function(h){return Ir(u,void 0,void 0,function(){var v,y;return Rr(this,function(w){return!r&&!i.selectionsToResolve.has(h
94)?[2]:ma(h,o)?Xr(h)?[2,this.resolveField(h,r,n,i).then(function(x){var p;typeof x<"u"&&l.push((p={},p[wr(h)]=x,p))})]:(QS(h)?v=h:(v=s[h.name.value],ne(v,19,h.name.value)),v&&v.typeCondition&&(y=v.typeCondition.name.value,i.fragmentMatcher(n,y,a))?[2,this.resolveSelectionSet(v.selectionSet,r,n,i).then(function(x){l.push(x)})]:[2]):[2]})})},[2,Promise.all(t.selections.map(c)).then(function(){return Nl(l)})]})})},e.prototype.resolveField=function(t,r,n,i){return Ir(this,void 0,void 0,function(){var s,a,o,l,c,u,f,h,v,y=this;return Rr(this,function(w){return n?(s=i.variables,a=t.name.value,o=wr(t),l=a!==o,c=n[o]||n[a],u=Promise.resolve(c),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(t))&&(f=n.__typename||i.defaultOperationType,h=this.resolvers&&this.resolvers[f],h&&(v=h[l?a:o],v&&(u=Promise.resolve($f.withValue(this.cache,v,[n,El(t,s),i.context,{field:t,fragmentMap:i.fragmentMap}]))))),[2,u.then(function(x){var p,g;if(x===void 0&&(x=c),t.directives&&t.directives.forEach(function(b){b.name.value==="export"&&b.arguments&&b.arguments.forEach(function(_){_.name.value==="as"&&_.value.kind==="StringValue"&&(i.exportedVariables[_.value.value]=x)})}),!t.selectionSet||x==null)return x;var m=(g=(p=t.directives)===null||p===void 0?void 0:p.some(function(b){return b.name.value==="client"}))!==null&&g!==void 0?g:!1;if(Array.isArray(x))return y.resolveSubSelectedArray(t,r||m,x,i);if(t.selectionSet)return y.resolveSelectionSet(t.selectionSet,r||m,x,i)})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(t,r,n,i){var s=this;return Promise.all(n.map(function(a){if(a===null)return null;if(Array.isArray(a))return s.resolveSubSelectedArray(t,r,a,i);if(t.selectionSet)return s.resolveSelectionSet(t.selectionSet,r,a,i)}))},e.prototype.collectSelectionsToResolve=function(t,r){var n=function(a){return!Array.isArray(a)},i=this.selectionsToResolveCache;function s(a){if(!i.has(a)){var o=new Set;i.set(a,o),Gt(a,{Directive:function(l,c,u,f,h){l.name.value==="client"&&h.forEach(function(v){n(v)&&Pp(v)&&o.add(v)})},FragmentSpread:function(l,c,u,f,h){var v=r[l.name.value];ne(v,20,l.name.value);var y=s(v);y.size>0&&(h.forEach(function(w){n(w)&&Pp(w)&&o.add(w)}),o.add(l),y.forEach(function(w){o.add(w)}))}})}return i.get(a)}return s(t)},e})(),bm=!1,_w=(function(){function e(t){var r=this,n;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!t.cache)throw ut(16);var i=t.uri,s=t.credentials,a=t.headers,o=t.cache,l=t.documentTransform,c=t.ssrMode,u=c===void 0?!1:c,f=t.ssrForceFetchDelay,h=f===void 0?0:f,v=t.connectToDevTools,y=t.queryDeduplication,w=y===void 0?!0:y,x=t.defaultOptions,p=t.defaultContext,g=t.assumeImmutableResults,m=g===void 0?o.assumeImmutableResults:g,b=t.resolvers,_=t.typeDefs,S=t.fragmentMatcher,k=t.name,N=t.version,R=t.devtools,P=t.dataMasking,H=t.link;H||(H=i?new t1({uri:i,credentials:s,headers:a}):$i.empty()),this.link=H,this.cache=o,this.disableNetworkFetches=u||h>0,this.queryDeduplication=w,this.defaultOptions=x||Object.create(null),this.typeDefs=_,this.devtoolsConfig=O(O({},R),{enabled:(n=R?.enabled)!==null&&n!==void 0?n:v}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=globalThis.__DEV__!==!1),h&&setTimeout(function(){return r.disableNetworkFetches=!1},h),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=bf,this.localState=new T1({cache:o,client:this,resolvers:b,fragmentMatcher:S}),this.queryManager=new O1({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:p,documentTransform:l,queryDeduplication:w,ssrMode:u,dataMasking:!!P,clientAwareness:{name:k,version:N},localState:this.localState,assumeImmutableResults:m,onBroadcast:this.devtoolsConfig.enabled?function(){r.devToolsHookCb&&r.devToolsHookCb({action:{},state:{queries:r.queryManager.getQueryStore(),mutations:r.queryManager.mutationStore||{}},dataWithOptimisticResults:r.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return e.prototype.connectToDevTools=function(){if(!(typeof window>"u")){var t=window,r=Symbol.for("apollo.devtools");(t[r]=t[r]||[]).push(this),t.__APOLLO_CLIENT__=this,!bm&&globalThis.__DEV__!==!1&&(bm=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var n=window.navigator,i=n&&n.userAgent,s=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?s="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(s="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),s&&globalThis.__DEV__!==!1&&ne.log("Download the Apollo DevTools for a better development experience: %s",s)}},1e4))}},Object.defineProperty(e.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform}
94,enumerable:!1,configurable:!0}),e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=mi(this.defaultOptions.watchQuery,t)),this.disableNetworkFetches&&(t.fetchPolicy==="network-only"||t.fetchPolicy==="cache-and-network")&&(t=O(O({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},e.prototype.query=function(t){return this.defaultOptions.query&&(t=mi(this.defaultOptions.query,t)),ne(t.fetchPolicy!=="cache-and-network",17),this.disableNetworkFetches&&t.fetchPolicy==="network-only"&&(t=O(O({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},e.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=mi(this.defaultOptions.mutate,t)),this.queryManager.mutate(t)},e.prototype.subscribe=function(t){var r=this,n=this.queryManager.generateQueryId();return this.queryManager.startGraphQLSubscription(t).map(function(i){return O(O({},i),{data:r.queryManager.maskOperation({document:t.query,data:i.data,fetchPolicy:t.fetchPolicy,id:n})})})},e.prototype.readQuery=function(t,r){return r===void 0&&(r=!1),this.cache.readQuery(t,r)},e.prototype.watchFragment=function(t){var r;return this.cache.watchFragment(O(O({},t),(r={},r[Symbol.for("apollo.dataMasking")]=this.queryManager.dataMasking,r)))},e.prototype.readFragment=function(t,r){return r===void 0&&(r=!1),this.cache.readFragment(t,r)},e.prototype.writeQuery=function(t){var r=this.cache.writeQuery(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),r},e.prototype.writeFragment=function(t){var r=this.cache.writeFragment(t);return t.broadcast!==!1&&this.queryManager.broadcastQueries(),r},e.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},e.prototype.__requestRaw=function(t){return Zu(this.link,t)},e.prototype.resetStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(t.resetStoreCallbacks.map(function(r){return r()}))}).then(function(){return t.reFetchObservableQueries()})},e.prototype.clearStore=function(){var t=this;return Promise.resolve().then(function(){return t.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(t.clearStoreCallbacks.map(function(r){return r()}))})},e.prototype.onResetStore=function(t){var r=this;return this.resetStoreCallbacks.push(t),function(){r.resetStoreCallbacks=r.resetStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.onClearStore=function(t){var r=this;return this.clearStoreCallbacks.push(t),function(){r.clearStoreCallbacks=r.clearStoreCallbacks.filter(function(n){return n!==t})}},e.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},e.prototype.refetchQueries=function(t){var r=this.queryManager.refetchQueries(t),n=[],i=[];r.forEach(function(a,o){n.push(o),i.push(a)});var s=Promise.all(i);return s.queries=n,s.results=i,s.catch(function(a){globalThis.__DEV__!==!1&&ne.debug(18,a)}),s},e.prototype.getObservableQueries=function(t){return t===void 0&&(t="active"),this.queryManager.getObservableQueries(t)},e.prototype.extract=function(t){return this.cache.extract(t)},e.prototype.restore=function(t){return this.cache.restore(t)},e.prototype.addResolvers=function(t){this.localState.addResolvers(t)},e.prototype.setResolvers=function(t){this.localState.setResolvers(t)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},e.prototype.setLink=function(t){this.link=this.queryManager.link=t},Object.defineProperty(e.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),e})();globalThis.__DEV__!==!1&&(_w.prototype.getMemoryInternals=ES);var vo=new Map,od=new Map,Sw=!0,Jo=!1;function Ew(e){return e.replace(/[\s,]+/g," ").trim()}function P1(e){return Ew(e.source.body.substring(e.start,e.end))}function I1(e){var t=new Set,r=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,s=P1(n.loc),a=od.get(i);a&&!a.has(s)?Sw&&console.warn("Warning: fragment with name "+i+` already exists. 95graphql-tag enforces all fragment names across your application to be unique; read more about 96this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||od.set(i,a=new Set),a.add(s),t.has(s)||(t.add(s),r.push(n))}else r.push(n)}),O(O({},e),{definitions:r})}function R1(e){var t=new Set(e.definitions);
96t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var s=n[i];s&&typeof s=="object"&&t.add(s)})});var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}function F1(e){var t=Ew(e);if(!vo.has(t)){var r=G_(e,{experimentalFragmentVariables:Jo,allowLegacyFragmentVariables:Jo});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");vo.set(t,R1(I1(r)))}return vo.get(t)}function kt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(i,s){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=e[s+1]}),F1(n)}function A1(){vo.clear(),od.clear()}function L1(){Sw=!1}function M1(){Jo=!0}function D1(){Jo=!1}var fs={gql:kt,resetCaches:A1,disableFragmentWarnings:L1,enableExperimentalFragmentVariables:M1,disableExperimentalFragmentVariables:D1};(function(e){e.gql=fs.gql,e.resetCaches=fs.resetCaches,e.disableFragmentWarnings=fs.disableFragmentWarnings,e.enableExperimentalFragmentVariables=fs.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=fs.disableExperimentalFragmentVariables})(kt||(kt={})),kt.default=kt;var kw={exports:{}};(function(e){e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,E)})(kw);var be=kw.exports;const z1=Sd(be),$1=B0({__proto__:null,default:z1},[be]);var xm=Cf?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function Vf(){ne(!0,54);var e=be.createContext[xm];return e||(Object.defineProperty(be.createContext,xm,{value:e=be.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var U1=function(e){var t=e.client,r=e.children,n=Vf(),i=be.useContext(n),s=be.useMemo(function(){return O(O({},i),{client:t||i.client})},[i,t]);return ne(s.client,55),be.createElement(n.Provider,{value:s},r)};function Cw(e){var t=be.useContext(Vf()),r=e||t.client;return ne(!!r,58),r}var _m=!1,B1="useSyncExternalStore",q1=$1[B1],V1=q1||function(e,t,r){var n=t();globalThis.__DEV__!==!1&&!_m&&n!==t()&&(_m=!0,globalThis.__DEV__!==!1&&ne.error(68));var i=be.useState({inst:{value:n,getSnapshot:t}}),s=i[0].inst,a=i[1];return hS?be.useLayoutEffect(function(){Object.assign(s,{value:n,getSnapshot:t}),Dc(s)&&a({inst:s})},[e,n,t]):Object.assign(s,{value:n,getSnapshot:t}),be.useEffect(function(){return Dc(s)&&a({inst:s}),e(function(){Dc(s)&&a({inst:s})})},[e]),n};function Dc(e){var t=e.value,r=e.getSnapshot;try{return t!==r()}catch{return!0}}var hr;(function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"})(hr||(hr={}));var yn;function Sm(e){var t;switch(e){case hr.Query:t="Query";break;case hr.Mutation:t="Mutation";break;case hr.Subscription:t="Subscription";break}return t}function Nw(e){yn||(yn=new Nf(ir.parser||1e3));var t=yn.get(e);if(t)return t;var r,n,i;ne(!!e&&!!e.kind,70,e);for(var s=[],a=[],o=[],l=[],c=0,u=e.definitions;c<u.length;c++){var f=u[c];if(f.kind==="FragmentDefinition"){s.push(f);continue}if(f.kind==="OperationDefinition")switch(f.operation){case"query":a.push(f);break;case"mutation":o.push(f);break;case"subscription":l.push(f);break}}ne(!s.length||a.length||o.length||l.length,71),ne(a.length+o.length+l.length<=1,72,e,a.length,l.length,o.length),n=a.length?hr.Query:hr.Mutation,!a.length&&!o.length&&(n=hr.Subscription);var h=a.length?a:o.length?o:l;ne(h.length===1,73,e,h.length);var v=h[0];r=v.variableDefinitions||[],v.name&&v.name.kind==="Name"?i=v.name.value:i="data";var y={name:i,type:n,variables:r};return yn.set(e,y),y}Nw.resetCache=function(){yn=void 0},globalThis.__DEV__!==!1&&jf("parser",function(){return yn?yn.size:0});function Q1(e,t){var r=Nw(e),n=Sm(t),i=Sm(r.type);ne(r.type===t,74,n,n,i)}var W1=_y?be.useLayoutEffect:be.useEffect,H1=Symbol.for("apollo.hook.wrappers");function G1(e,t,r){var n=r.queryManager,i=n&&n[H1],s=i&&i[e];return s?s(t):t}var K1=Object.prototype.hasOwnProperty;function Em(){}var yo=Symbol();function Sr(e,t){return t===void 0&&(t=Object.create(null)),G1("useQuery",J1,Cw(t&&t.client))(e,t)}function J1(e,t){var r=jw(e,t),n=r.result,i=r.obsQueryFields;return be.useMemo(function(){return O(O({},n),i)},[n,i])}function Y1(e,t,r,n,i){function s(f){var h;Q1(t,hr.Query);var v={client:e,query:t,observable:n&&n.getSSRObservable(i())||Ms.inactiveOnCreation.withValue(!n,function(){return e.watchQuery(Qf(void 0,e,r,i()))}),resultData:{previousData:(h=f?.resultData.current)===null||h===void 0?void 0:h.data}};return v}var a=be.useState(s),o=a[0],l=a[1];function c(f){var h,v;Object.assign(o.observable,(h={},h[yo]=f,h));var y=o.resultData;l(O(O({},o),{query:f.query,resultData:Object.assign(y,{previousData:((v=y.current)===null||v===void 0?void 0:v.data)||y.previousData,current:void 0})}))}if(e!==o.client||t!==o.query){var u=s(o);return l(u),[u,c]}return[o,c]}function jw(e,t){var r=Cw(t.client),n=be.useContext(Vf()).renderPromises,i=!!n,s=r.disableNetworkFetches,a=t.ssr!==!1&&!t.skip,o=t.partialRefetch,l=Ow(r,e,t,i),c=Y1(r,e,t,n,l),u=c[0],f=u.observable,h=u.resultData,v=c[1],y=l(f);ek(h,f,r,t,y);var w=be.useMemo(function(){return ik(f)},[f]);Z1(f,n,a);var x=X1(h,f,r,t,y,s,o,i,{onCompleted:t.onCompleted||Em,onError:t.onError||Em});return{result:x,obsQueryFields:w,observable:f,resultData:h,client:r,onQueryExecuted:v}}function X1(e,t,r,n,i,s,a,o,l){var c=be.useRef(l);be.useEffect(function(){c.current=l});var u=(o||s)&&n.ssr===!1&&!n.skip?Tw:n.skip||i.fetchPolicy==="standby"?Pw:void 0,f=e.previousData,h=be.useMemo(function(){return u&&Yo(u,f,t,r)},[r,t,u,f]);return V1(be.useCallback(function(v){if(o)return function(){};var y=function(){var p=e.current,g=t.getCurrentResult();p&&p.loading===g.loading&&p.networkStatus===g.networkStatus&&Ee(p.data,g.data)||ld(g,e,t,r,a,v,c.current)},w=function(p){if(x.current.unsubscribe(),x.current=t.resubscribeAfterError(y,w),!K1.call(p,"graphQLErrors"))throw p;var g=e.current;(!g||g&&g.loading||!Ee(p,g.error))&&ld({data:g&&g.data,error:p,loading:!1,networkStatus:ge.error},e,t,r,a,v,c.current)},x={current:t.subscribe(y,w)};return function(){setTimeout(function(){return x.current.unsubscribe()})}},[s,o,t,e,a,r]),function(){return h||km(e,t,c.current,a,r)},function(){return h||km(e,t,c.current,a,r)})}function Z1(e,t,r){t&&r&&(t.registerSSRObservable(e),e.getCurrentResult().loading&&t.addObservableQueryPromise(e))}function ek(e,t,r,n,i){var s;t[yo]&&!Ee(t[yo],i)&&(t.reobserve(Qf(t,r,n,i)),e.previousData=((s=e.current)===null||s===void 0?void 0:s.data)||e.previousData,e.current=void 0),t[yo]=i}function Ow(e,t,r,n){r===void 0&&(r={});var i=r.skip;r.ssr,r.onCompleted,r.onError;var s=r.defaultOptions,a=At(r,["skip","ssr","onCompleted","onError","defaultOptions"]);return function(o){var l=Object.assign(a,{query:t});return n&&(l.fetchPolicy==="network-only"||l.fetchPolicy==="cache-and-network")&&(l.fetchPolicy="cache-first"),l.variables||(l.variables={}),i?(l.initialFetchPolicy=l.initialFetchPolicy||l.fetchPolicy||cd(s,e.defaultOptions),l.fetchPolicy="standby"):l.fetchPolicy||(l.fetchPolicy=o?.options.initialFetchPolicy||cd(s,e.defaultOptions)),l}}function Qf(e,t,r,n){var i=[],s=t.defaultOptions.watchQuery;return s&&i.push(s),r.defaultOptions&&i.push(r.defaultOptions),i.push(Tn(e&&e.o
96ptions,n)),i.reduce(mi)}function ld(e,t,r,n,i,s,a){var o=t.current;o&&o.data&&(t.previousData=o.data),!e.error&&Dt(e.errors)&&(e.error=new lr({graphQLErrors:e.errors})),t.current=Yo(nk(e,r,i),t.previousData,r,n),s(),tk(e,o?.networkStatus,a)}function tk(e,t,r){if(!e.loading){var n=rk(e);Promise.resolve().then(function(){n?r.onError(n):e.data&&t!==e.networkStatus&&e.networkStatus===ge.ready&&r.onCompleted(e.data)}).catch(function(i){globalThis.__DEV__!==!1&&ne.warn(i)})}}function km(e,t,r,n,i){return e.current||ld(t.getCurrentResult(),e,t,i,n,function(){},r),e.current}function cd(e,t){var r;return e?.fetchPolicy||((r=t?.watchQuery)===null||r===void 0?void 0:r.fetchPolicy)||"cache-first"}function rk(e){return Dt(e.errors)?new lr({graphQLErrors:e.errors}):e.error}function Yo(e,t,r,n){var i=e.data;e.partial;var s=At(e,["data","partial"]),a=O(O({data:i},s),{client:n,observable:r,variables:r.variables,called:e!==Tw&&e!==Pw,previousData:t});return a}function nk(e,t,r){return e.partial&&r&&!e.loading&&(!e.data||Object.keys(e.data).length===0)&&t.options.fetchPolicy!=="cache-only"?(t.refetch(),O(O({},e),{loading:!0,networkStatus:ge.refetch})):e}var Tw=ji({loading:!0,data:void 0,error:void 0,networkStatus:ge.loading}),Pw=ji({loading:!1,data:void 0,error:void 0,networkStatus:ge.ready});function ik(e){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}var sk=["refetch","reobserve","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"];function ak(e,t){var r,n=be.useRef(void 0),i=be.useRef(void 0),s=be.useRef(void 0),a=mi(t,n.current||{}),o=(r=a?.query)!==null&&r!==void 0?r:e;i.current=t,s.current=o;var l=O(O({},a),{skip:!n.current}),c=jw(o,l),u=c.obsQueryFields,f=c.result,h=c.client,v=c.resultData,y=c.observable,w=c.onQueryExecuted,x=y.options.initialFetchPolicy||cd(l.defaultOptions,h.defaultOptions),p=be.useReducer(function(N){return N+1},0)[1],g=be.useMemo(function(){for(var N={},R=function(Q){var U=u[Q];N[Q]=function(){return n.current||(n.current=Object.create(null),p()),U.apply(this,arguments)}},P=0,H=sk;P<H.length;P++){var G=H[P];R(G)}return N},[p,u]),m=!!n.current,b=be.useMemo(function(){return O(O(O({},f),g),{called:m})},[f,g,m]),_=be.useCallback(function(N){n.current=N?O(O({},N),{fetchPolicy:N.fetchPolicy||x}):{fetchPolicy:x};var R=mi(i.current,O({query:s.current},n.current)),P=ok(v,y,h,o,O(O({},R),{skip:!1}),w).then(function(H){return Object.assign(H,g)});return P.catch(function(){}),P},[h,o,g,x,y,v,w]),S=be.useRef(_);W1(function(){S.current=_});var k=be.useCallback(function(){for(var N=[],R=0;R<arguments.length;R++)N[R]=arguments[R];return S.current.apply(S,N)},[]);return[k,b]}function ok(e,t,r,n,i,s){var a=i.query||n,o=Ow(r,a,i,!1)(t),l=t.reobserveAsConcast(Qf(t,r,i,o));return s(o),new Promise(function(c){var u;l.subscribe({next:function(f){u=f},error:function(){c(Yo(t.getCurrentResult(),e.previousData,t,r))},complete:function(){c(Yo(t.maskResult(u),e.previousData,t,r))}})})}function lk(e){return new $i(function(t,r){var n=At(t,[]);return new Ne(function(i){var s,a=!1;return Promise.resolve(n).then(function(o){return e(o,t.getContext())}).then(t.setContext).then(function(){a||(s=r(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){a=!0,s&&s.unsubscribe()}})})}const ud={SHOP_DOMAIN:"jonathanadler-com.myshopify.com",STOREFRONT_ACCESS_TOKEN:"26043ce861e2a4b2fde81ea91e3de71d",API_VERSION:"2024-01"},jl=()=>`https://${ud.SHOP_DOMAIN}/api/${ud.API_VERSION}/graphql.json`,Ol=()=>({"Content-Type":"application/json",Accept:"application/json","X-Shopify-Storefront-Access-Token":ud.STOREFRONT_ACCESS_TOKEN}),ck=ew({uri:jl()}),uk=lk((e,{headers:t})=>({headers:{...t,...Ol()}})),dk=new _w({link:uk.concat(ck),cache:new bw,defaultOptions:{watchQuery:{errorPolicy:"all"},query:{errorPolicy:"all"}}}),Wf=kt` 97 fragment ProductMetafields on Product { 98 metafields(identifiers: [ 99 {namespace: "global", key: "fabric_set"}, 100 {namespace: "global", key: "fabric_type"}, 101 {namespace: "global", key: "microd_name"}, 102 {namespace: "global", key: "base_set"}, 103 {namespace: "global", key: "variant_color_order"}, 104 {namespace: "custom", key: "swatch_color"}, 105 {namespace: "custom", key: "material_type"} 106 ]) { 107 id 108 namespace 109 key 110 value 111 type 112 } 113 } 114`,Tl=kt` 115 fragment VariantMetafields on ProductVariant { 116 fabric_set: metafield(key: "fabric_set", namespace: "global") { 117 id 118 value 119 type 120 } 121 base_set: metafield(key: "base_set", namespace: "global") { 122 id 123 value 124 type 125 } 126 fabric_base: metafield(key: "fabric_base", namespace: "global") { 127 id 128 value 129 type 130 } 131 color_swatch: metafield(key: "color_swatch", namespace: "custom") { 132 id 133 value 134 type 135 } 136 material_info: metafield(key: "material_info", namespace: "global") { 137 id 138 value 139 type 140 } 141 microd_name: metafield(key: "microd_name", namespace: "global") { 142 id 143 value 144 type 145 } 146 site_delivery_info: metafield(key: "site_delivery_info", namespace: "global") { 147 id 148 value 149 type 150 } 151 product_measurement: metafield(key: "product_measurement", namespace: "global") { 152 id 153 value 154 type 155 } 156 ship_message: metafield(key: "ship_message", namespace: "global") { 157 id 158 value 159 type 160 } 161 } 162`,Pl=kt` 163 query GetProduct($handle: String!) { 164 product(handle: $handle) { 165 id 166 title 167 handle 168 description 169 descriptionHtml 170 availableForSale 171 productType 172 vendor 173 tags 174 priceRange { 175 minVariantPrice { 176 amount 177 currencyCode 178 } 179 maxVariantPrice { 180 amount 181 currencyCode 182 } 183 } 184 compareAtPriceRange { 185 minVariantPrice { 186 amount 187 currencyCode 188 } 189 maxVariantPrice { 190 amount 191 currencyCode 192 } 193 } 194 featuredImage { 195 id 196 url 197 altText 198 width 199 height 200 } 201 images(first: 10) { 202 edges { 203 node { 204 id 205 url 206 altText 207 width 208 height 209 } 210 } 211 } 212 variants(first: 100) { 213 edges { 214 node { 215 id 216 title 217 sku 218 availableForSale 219 220 price { 221 amount 222 currencyCode 223 } 224 compareAtPrice { 225 amount 226 currencyCode 227 } 228 selectedOptions { 229 name 230 value 231 } 232 image { 233 id 234 url 235 altText 236 width 237 height 238 } 239 ...VariantMetafields 240 } 241 } 242 } 243 options { 244 id 245 name 246 values 247 } 248 ...ProductMetafields 249 } 250 } 251 ${Tl} 252 ${Wf} 253`,Il=kt` 254 query GetProducts($first: Int!, $after: String, $query: String) { 255 products(first: $first, after: $after, query: $query) { 256 pageInfo { 257 hasNextPage 258 hasPreviousPage 259 startCursor 260 endCursor 261 } 262 edges { 263 cursor 264 node { 265 id 266 title 267 handle 268 priceRange { 269 minVariantPrice { 270 amount 271 currencyCode 272 } 273 } 274 featuredImage { 275 url 276 altText 277 width 278 height 279 } 280 } 281 } 282 } 283 } 284`,fk=kt` 285 query GetSwatches { 286 collectionByHandle(handle: "fabric-swatches") { 287 products(first: 150) { 288 edges { 289 node { 290 title 291 descriptionHtml 292 fabric_type: metafield(key: "fabric_type", namespace: "global") { 293 value 294 } 295 microd_name: metafield(key: "microd_name", namespace: "global") { 296 value 297 } 298 fabric_base: metafield(key: "fabric_base", namespace: "global") { 299 value 300 } 301 images(first: 1) { 302 edges { 303 node { 304 url 305 altText 306 width 307 height 308 } 309 } 310 } 311 } 312 } 313 } 314 } 315 } 316`;kt` 317 query GetVariantMetafields($variantId: ID!) { 318 productVariant(id: $variantId) { 319 id 320 title 321 ...VariantMetafields 322 } 323 } 324 ${Tl} 325`,kt` 326 query GetProductWithSwatches($handle: String!) { 327 product(handle: $handle) { 328 id 329 title 330 handle 331 description 332 descriptionHtml 333 availableForSale 334 productType 335 vendor 336 tags 337 priceRange { 338 minVariantPrice { 339 amount 340 currencyCode 341 } 342 maxVariantPrice { 343 amount 344 currencyCode 345 } 346 } 347 compareAtPriceRange { 348 minVariantPrice { 349 amount 350 currencyCode 351 } 352 maxVariantPrice { 353 amount 354 currencyCode 355 } 356 } 357 featuredImage { 358 id 359 url 360 altText 361 width 362 height 363 } 364 images(first: 10) { 365 edges { 366 node { 367 id 368 url 369 altText 370 width 371 height 372 } 373 } 374 } 375 variants(first: 100) { 376 edges { 377 node { 378 id 379 title 380 sku 381 availableForSale 382 383 price { 384 amount 385 currencyCode 386 } 387 compareAtPrice { 388 amount 389 currencyCode 390 } 391 selectedOptions { 392 name 393 value 394 } 395 image { 396 id 397 url 398 altText 399 width 400 height 401 } 402 ...VariantMetafields 403 } 404 } 405 } 406 options { 407 id 408 name 409 values 410 } 411 ...ProductMetafields 412 } 413 } 414 ${Tl} 415 ${Wf} 416`;const hk=kt` 417 query GetProductById($id: ID!) { 418 product(id: $id) { 419 id 420 handle 421 title 422 description 423 descriptionHtml 424 availableForSale 425 productType 426 vendor 427 tags 428 priceRange { 429 minVariantPrice { 430 amount 431 currencyCode 432 } 433 maxVariantPrice { 434 amount 435 currencyCode 436 } 437 } 438 compareAtPriceRange { 439 minVariantPrice { 440 amount 441 currencyCode 442 } 443 maxVariantPrice { 444 amount 445 currencyCode 446 } 447 } 448 featuredImage { 449 id 450 url 451 altText 452 width 453 height 454 } 455 images(first: 10) { 456 edges { 457 node { 458 id 459 url 460 altText 461 width 462 height 463 } 464 } 465 } 466 variants(first: 100) { 467 edges { 468 node { 469 id 470 title 471 sku 472 availableForSale 473 474 price { 475 amount 476 currencyCode 477 } 478 compareAtPrice { 479 amount 480 currencyCode 481 } 482 selectedOptions { 483 name 484 value 485 } 486 image { 487 id 488 url 489 altText 490 width 491 height 492 } 493 ...VariantMetafields 494 } 495 } 496 } 497 options { 498 id 499 name 500 values 501 } 502 collections(first: 20) { 503 edges { 504 node { 505 id 506 handle 507 title 508 } 509 } 510 } 511 ...ProductMetafields 512 } 513 } 514 ${Tl} 515 ${Wf} 516`,pk=()=>{const[e,t]=E.useState({}),[r,n]=E.useState([]),[i,s]=E.useState(!0),[a,o]=E.useState(null);E.useEffect(()=>{try{const v=sessionStorage.getItem("swatches-us"),y=sessionStorage.getItem("fabric-bases-us");if(v){const w=JSON.parse(v);t(w),s(!1)}if(y){const w=JSON.parse(y);n(w)}}catch(v){o(v)}},[]);const{data:l,loading:c,error:u}=Sr(fk,{skip:Object.keys(e).length>0,onCompleted:v=>{var y,w;if((w=(y=v?.collectionByHandle)==null?void 0:y.products)!=null&&w.edges){const x=v.collectionByHandle.products.edges.reduce((g,{node:m})=>{var _,S,k,N,R,P;
516const b={title:m.title,description:m.descriptionHtml,microd_name:(_=m.microd_name)==null?void 0:_.value,fabric_type:(S=m.fabric_type)==null?void 0:S.value,fabric_base:(k=m.fabric_base)==null?void 0:k.value,image:((P=(R=(N=m.images)==null?void 0:N.edges)==null?void 0:R[0])==null?void 0:P.node)||null};return g[m.title]=b,g},{}),p=v.collectionByHandle.products.edges.map(({node:g})=>{var m;return(m=g.fabric_base)==null?void 0:m.value}).filter((g,m,b)=>g&&b.indexOf(g)===m);t(x),n(p),s(!1);try{sessionStorage.setItem("swatches-us",JSON.stringify(x)),sessionStorage.setItem("fabric-bases-us",JSON.stringify(p))}catch(g){console.error("Error saving swatches to cache:",g)}}else s(!1)},onError:v=>{o(v),s(!1)}}),f=()=>{try{sessionStorage.removeItem("swatches-us"),sessionStorage.removeItem("fabric-bases-us"),t({}),n([]),s(!0)}catch(v){console.error("Error clearing swatches cache:",v)}};return{swatches:e,fabricBases:r,loading:i||c,error:a||u,clearCache:f,refreshSwatches:()=>{f()}}},Iw=E.createContext(),mk=({children:e})=>{const t=pk();return d.jsx(Iw.Provider,{value:t,children:e})},Er=()=>{const e=E.useContext(Iw);if(!e)throw new Error("useSwatchContext must be used within SwatchProvider");return e},gk=e=>{const{swatches:t,loading:r,error:n}=Er(),i=e.reduce((s,a)=>(t[a]&&(s[a]=t[a]),s),{});return{swatches:i,loading:r,error:n,foundCount:Object.keys(i).length,totalRequested:e.length}},aa=({handle:e,className:t="",showImage:r=!0,showTitle:n=!0,showPrice:i=!0,linkToProduct:s=!0})=>{const{loading:a,error:o,data:l}=Sr(Pl,{variables:{handle:e},skip:!e});if(a)return d.jsxs("div",{className:`product-card loading ${t}`,children:[r&&d.jsx("div",{className:"product-card__image-placeholder"}),d.jsxs("div",{className:"product-card__content",children:[n&&d.jsx("div",{className:"product-card__title-placeholder"}),i&&d.jsx("div",{className:"product-card__price-placeholder"})]})]});if(o)return d.jsx("div",{className:`product-card error ${t}`,children:d.jsx("p",{children:"Error loading product"})});if(!(l!=null&&l.product))return d.jsx("div",{className:`product-card not-found ${t}`,children:d.jsx("p",{children:"Product not found"})});const{product:c}=l,{title:u,priceRange:f,featuredImage:h}=c,v=f?.minVariantPrice,y=()=>d.jsxs(d.Fragment,{children:[r&&h&&d.jsx("div",{className:"product-card__image",children:d.jsx("img",{src:h.url,alt:h.altText||u,width:h.width,height:h.height,loading:"lazy"})}),d.jsxs("div",{className:"product-card__content",children:[n&&d.jsx("h3",{className:"product-card__title",children:u}),i&&v&&d.jsxs("p",{className:"product-card__price",children:[v.amount," ",v.currencyCode]})]})]});return s?d.jsx("div",{className:`product-card ${t}`,children:d.jsx("a",{href:`/products/${e}`,className:"product-card__link",children:d.jsx(y,{})})}):d.jsx("div",{className:`product-card ${t}`,children:d.jsx(y,{})})},Rw=({first:e=12,className:t="",showLoadMore:r=!0,collectionHandle:n=null})=>{var y;const[i,s]=E.useState(!0),[a,o]=E.useState(null),{loading:l,error:c,data:u,fetchMore:f}=Sr(Il,{variables:{first:e,after:a},notifyOnNetworkStatusChange:!0}),h=()=>{var w,x;(x=(w=u?.products)==null?void 0:w.pageInfo)!=null&&x.hasNextPage&&f({variables:{after:u.products.pageInfo.endCursor}}).then(p=>{s(p.data.products.pageInfo.hasNextPage)})};if(l&&!u)return d.jsx("div",{className:`product-grid loading ${t}`,children:Array.from({length:e}).map((w,x)=>d.jsx(aa,{handle:null},x))});if(c)return d.jsx("div",{className:`product-grid error ${t}`,children:d.jsxs("p",{children:["Error loading products: ",c.message]})});const v=((y=u?.products)==null?void 0:y.edges)||[];return d.jsxs("div",{className:`product-grid ${t}`,children:[d.jsx("div",{className:"product-grid__items",children:v.map(({node:w})=>d.jsx(aa,{handle:w.handle,className:"product-grid__item"},w.id))}),r&&i&&d.jsx("div",{className:"product-grid__load-more",children:d.jsx("button",{onClick:h,disabled:l,className:"product-grid__load-more-button",children:l?"Loading...":"Load More Products"})})]})},Fw=({className:e=""})=>{var u;const[t,r]=E.useState(""),[n,{loading:i,error:s,data:a}]=ak(Il,{variables:{query:t,first:12}}),o=E.useCallback(f=>{f.preventDefault(),t.trim()&&n({variables:{query:t.trim(),first:12}})},[t,n]),l=f=>{r(f.target.value)},c=((u=a?.products)==null?void 0:u.edges)||[];return d.jsxs("div",{className:`product-search ${e}`,children:[d.jsx("form",{onSubmit:o,className:"product-search__form",children:d.jsxs("div",{className:"product-search__input-group",children:[d.jsx("input",{type:"text",value:t,onChange:l,placeholder:"Search products...",className:"product-search__input"}),d.jsx("button",{type:"submit",disabled:i||!t.trim(),className:"product-search__button",children:i?"Searching...":"Search"})]})}),s&&d.jsx("div",{className:"product-search__error",children:d.jsxs("p",{children:["Error searching products: ",s.message]})}),a&&d.jsxs("div",{className:"product-search__results",children:[d.jsxs("h3",{className:"product-search__results-title",children:["Search Results (",c.length," products)"]}),c.length===0?d.jsxs("p",{className:"product-search__no-results",children:['No products found for "',t,'"']}):d.jsx("div",{className:"product-search__grid",children:c.map(({node:f})=>d.jsx(aa,{handle:f.handle,className:"product-search__item"},f.id))})]})]})},Aw=({handle:e,className:t=""})=>{var U,V;const[r,n]=E.useState(null),[i,s]=E.useState(1),{loading:a,error:o,data:l}=Sr(Pl,{variables:{handle:e},skip:!e});if(a)return d.jsx("div",{className:`product-detail loading ${t}`,children:d.jsxs("div",{className:"product-detail__skeleton",children:[d.jsx("div",{className:"product-detail__image-skeleton"}
516),d.jsxs("div",{className:"product-detail__content-skeleton",children:[d.jsx("div",{className:"product-detail__title-skeleton"}),d.jsx("div",{className:"product-detail__price-skeleton"}),d.jsx("div",{className:"product-detail__description-skeleton"}),d.jsx("div",{className:"product-detail__variants-skeleton"}),d.jsx("div",{className:"product-detail__button-skeleton"})]})]})});if(o)return d.jsx("div",{className:`product-detail error ${t}`,children:d.jsxs("div",{className:"product-detail__error",children:[d.jsx("h2",{children:"Error loading product"}),d.jsx("p",{children:o.message})]})});if(!(l!=null&&l.product))return d.jsx("div",{className:`product-detail not-found ${t}`,children:d.jsxs("div",{className:"product-detail__not-found",children:[d.jsx("h2",{children:"Product not found"}),d.jsx("p",{children:"The requested product could not be found."})]})});const{product:c}=l,{title:u,description:f,descriptionHtml:h,priceRange:v,compareAtPriceRange:y,featuredImage:w,images:x,variants:p,options:g,availableForSale:m,vendor:b,productType:_,tags:S}=c,k=((U=p?.edges)==null?void 0:U.map(A=>A.node))||[],N=((V=x?.edges)==null?void 0:V.map(A=>A.node))||[],R=k[0],P=r||R,H=(A,D)=>{var j;const C={...((j=P?.selectedOptions)==null?void 0:j.reduce((L,M)=>(L[M.name]=M.value,L),{}))||{},[A]:D},T=k.find(L=>L.selectedOptions.every(M=>C[M.name]===M.value));n(T||R)},G=()=>{console.log("Adding to cart:",{variant:P,quantity:i})},Q=A=>A?`${A.amount} ${A.currencyCode}`:"";return d.jsx("div",{className:`product-detail ${t}`,children:d.jsxs("div",{className:"product-detail__container",children:[d.jsxs("div",{className:"product-detail__media",children:[w&&d.jsx("div",{className:"product-detail__main-image",children:d.jsx("img",{src:w.url,alt:w.altText||u,width:w.width,height:w.height,className:"product-detail__image"})}),N.length>1&&d.jsx("div",{className:"product-detail__gallery",children:N.slice(0,4).map(A=>d.jsx("div",{className:"product-detail__thumbnail",children:d.jsx("img",{src:A.url,alt:A.altText||u,width:A.width,height:A.height,className:"product-detail__thumbnail-image"})},A.id))})]}),d.jsxs("div",{className:"product-detail__info",children:[d.jsxs("div",{className:"product-detail__header",children:[b&&d.jsx("p",{className:"product-detail__vendor",children:b}),d.jsx("h1",{className:"product-detail__title",children:u}),d.jsxs("div",{className:"product-detail__price",children:[P?.price&&d.jsx("span",{className:"product-detail__current-price",children:Q(P.price)}),P?.compareAtPrice&&d.jsx("span",{className:"product-detail__compare-price",children:Q(P.compareAtPrice)})]})]}),g&&g.length>0&&d.jsx("div",{className:"product-detail__options",children:g.map(A=>d.jsxs("div",{className:"product-detail__option",children:[d.jsx("label",{className:"product-detail__option-label",children:A.name}),d.jsx("div",{className:"product-detail__option-values",children:A.values.map(D=>{var T;const C=(T=P?.selectedOptions)==null?void 0:T.some(j=>j.name===A.name&&j.value===D);return d.jsx("button",{className:`product-detail__option-value ${C?"selected":""}`,onClick:()=>H(A.name,D),children:D},D)})})]},A.id))}),d.jsxs("div",{className:"product-detail__quantity",children:[d.jsx("label",{className:"product-detail__quantity-label",children:"Quantity"}),d.jsxs("div",{className:"product-detail__quantity-selector",children:[d.jsx("button",{className:"product-detail__quantity-btn",onClick:()=>s(Math.max(1,i-1)),children:"-"}),d.jsx("input",{type:"number",value:i,onChange:A=>s(Math.max(1,parseInt(A.target.value)||1)),className:"product-detail__quantity-input",min:"1"}),d.jsx("button",{className:"product-detail__quantity-btn",onClick:()=>s(i+1),children:"+"})]})]}),d.jsx("div",{className:"product-detail__actions",children:d.jsx("button",{className:"product-detail__add-to-cart",onClick:G,disabled:!(P!=null&&P.availableForSale),children:P!=null&&P.availableForSale?"Add to Cart":"Out of Stock"})}),f&&d.jsxs("div",{className:"product-detail__description",children:[d.jsx("h3",{children:"Description"}),d.jsx("div",{className:"product-detail__description-content",dangerouslySetInnerHTML:{__html:h||f}})]}),d.jsxs("div",{className:"product-detail__meta",children:[_&&d.jsxs("p",{className:"product-detail__type",children:[d.jsx("strong",{children:"Type:"})," ",_]}),S&&S.length>0&&d.jsxs("p",{className:"product-detail__tags",children:[d.jsx("strong",{children:"Tags:"}
516)," ",S.join(", ")]})]})]})]})})},Lw={black:"#000000",white:"#FFFFFF",blue:"#0000FF",red:"#FF0000",green:"#008000",yellow:"#FFFF00",brown:"#964B00",grey:"#808080",gray:"#808080",purple:"#800080",pink:"#FFC0CB",orange:"#FFA500",natural:"#F5DEB3",beige:"#F5F5DC",navy:"#000080",gold:"#FFD700",silver:"#C0C0C0",cream:"#FFFDD0",tan:"#D2B48C",clear:"transparent",ivory:"#FFFFF0",bone:"#E3DAC9",pearl:"#EAE0C8","off-white":"#FAF9F6","off white":"#FAF9F6",linen:"#FAF0E6",multi:"linear-gradient(90deg, #FF0000, #FFFF00, #00FF00, #00FFFF, #0000FF)","black and white":"linear-gradient(45deg, #000 50%, #fff 50%)","black & white":"linear-gradient(45deg, #000 50%, #fff 50%)"},vk=e=>{const t=e.toLowerCase().trim();return Lw[t]||"#CCCCCC"},Mw=e=>typeof e=="string"&&e.toLowerCase().trim()==="white",Pn=({color:e,swatch:t,selected:r=!1,disabled:n=!1,onClick:i,onMouseEnter:s,onMouseLeave:a,onKeyDown:o,onFocus:l,onBlur:c,shape:u="circle",size:f="medium",showLabel:h=!1,className:v=""})=>{const y=m=>{m.preventDefault(),!n&&i&&i(e,t)},w=m=>{o?o(m,e,t):(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),y(m))},x=()=>{var m;return(m=t?.image)!=null&&m.url?{backgroundImage:`url(${t.image.url})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:e&&typeof window.getSwatchImage=="function"?{backgroundImage:`url(${window.getSwatchImage(e)})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:t!=null&&t.color?{backgroundColor:t.color}:e?{background:Lw[e.toLowerCase().trim()]||e}:{}},p=()=>t!=null&&t.title?t.title:e||"Color swatch",g=["swatch",`swatch--${u}`,`swatch--${f}`,r?"swatch--selected":"",n?"swatch--disabled":"",Mw(e)?"swatch--white-bg":"",v].filter(Boolean).join(" ");return d.jsx("div",{className:g,style:x(),onClick:y,onMouseEnter:s,onMouseLeave:a,onKeyDown:w,onFocus:l,onBlur:c,title:p(),role:"button",tabIndex:n?-1:0,"aria-label":`${p()}${r?" (selected)":""}${n?" (disabled)":""}`,"aria-pressed":r,"aria-disabled":n,children:h&&d.jsx("span",{className:"swatch__label",children:p()})})},Rl=({optionName:e,selectedValue:t,onSwatchSelect:r,showLabels:n=!1,shape:i="circle",size:s="medium",maxVisible:a=6,showMore:o=!0,className:l="",filterByFabricType:c=null,sortBy:u="name"})=>{const{swatches:f,loading:h,error:v}=Er(),[y,w]=E.useState(!1);console.log("SwatchGroup render - props:",{optionName:e,selectedValue:t,showLabels:n,shape:i,size:s,maxVisible:a,filterByF
516abricType:c,sortBy:u}),console.log("SwatchGroup context data:",{swatches:f?Object.keys(f).length:0,loading:h,error:v});const x=E.useMemo(()=>{if(!f||Object.keys(f).length===0)return console.log("No swatches available, returning empty array"),[];let S=Object.entries(f);return console.log("Initial swatch entries:",S.length),c&&(S=S.filter(([k,N])=>N.fabric_type===c),console.log("After fabric type filter:",S.length)),S.sort(([k,N],[R,P])=>{var H,G;switch(u){case"fabric_type":return(N.fabric_type||"").localeCompare(P.fabric_type||"");case"microd_name":return(((H=N.microd_name)==null?void 0:H.value)||N.microd_name||"").localeCompare(((G=P.microd_name)==null?void 0:G.value)||P.microd_name||"");default:return k.localeCompare(R)}}),console.log("Final processed swatches:",S.length),S},[f,c,u]),p=(S,k)=>{console.log("Swatch clicked:",{color:S,swatch:k}),r&&r(e,S,k)},g=()=>{w(!y)};if(h)return console.log("SwatchGroup: Loading state"),d.jsxs("div",{className:`swatch-group swatch-group--loading ${l}`,children:[d.jsx("div",{className:"swatch-group__loading-spinner"}),d.jsx("span",{children:"Cargando swatches..."})]});if(v)return console.log("SwatchGroup: Error state",v),d.jsx("div",{className:`swatch-group swatch-group--error ${l}`,children:d.jsxs("span",{children:["Error al cargar swatches: ",v.message]})});if(x.length===0)return console.log("SwatchGroup: No swatches available"),d.jsx("div",{className:`swatch-group swatch-group--empty ${l}`,children:d.jsx("span",{children:"No hay swatches disponibles"})});const m=y?x:x.slice(0,a),b=x.length>a,_=x.length-a;return console.log("SwatchGroup: Rendering swatches",{total:x.length,visible:m.length,hasMore:b,processedSwatches:x}),d.jsxs("div",{className:`swatch-group ${l}`,children:[d.jsx("div",{className:"swatch-group__swatches",children:m.map(([S,k])=>d.jsx(Pn,{color:S,swatch:k,selected:t===S,onClick:p,shape:i,size:s,showLabel:n},S))}),b&&o&&d.jsx("button",{className:"swatch-group__toggle",onClick:g,type:"button","aria-expanded":y,"aria-controls":"swatch-group-content",children:y?d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"Mostrar menos"}),d.jsx("span",{className:"swatch-group__toggle-icon",children:"\u2212"})]}):d.jsxs(d.Fragment,{children:[d.jsxs("span",{children:["Mostrar ",_," m\xE1s"]}),d.jsx("span",{className:"swatch-group__toggle-icon",children:"+"})]})}),x.length>0&&d.jsx("div",{className:"swatch-group__info",children:d.jsxs("small",{children:[m.length," de ",x.length," swatches",c&&` (filtrado por: ${c})`]})})]})},Hf=({product:e,selectedOptions:t={},onOptionChange:r,showLabels:n=!1,shape:i="circle",size:s="medium",maxVisible:a=6,showMore:o=!0,className:l="",filterByFabricType:c=null,sortBy:u="name"})=>{var y;const f=(y=e?.options)==null?void 0:y.find(w=>w.name.toLowerCase()==="color");if(!f)return null;const h=(w,x,p)=>{r&&r(w,x,p)},v=t[f.name];return E.useEffect(()=>{if(!(!r||v))try{const w=new URL(window.location),x=w.searchParams.get("variant")||w.searchParams.get("variant_id");if(!x||!(e!=null&&e.variants))return;const p=m=>{const b=String(m),_=b.match(/(\d+)$/);return _?_[1]:b},g=e.variants.find(m=>p(m.id)===p(x));if(g&&g.selectedOptions){const m=g.selectedOptions.find(b=>b.name.toLowerCase()==="color");m!=null&&m.value&&r(f.name,m.value,null)}}catch{}},[v,r,e,f]),d.jsxs("div",{className:`product-swatches ${l}`,children:[d.jsxs("div",{className:"product-swatches__option",children:[d.jsx("label",{className:"product-swatches__label",children:f.name}),d.jsx(Rl,{optionName:f.name,selectedValue:v,onSwatchSelect:h,showLabels:n,shape:i,size:s,maxVisible:a,showMore:o,filterByF
vendor: 4,178 bytes, line 516
516abricType:c,sortBy:u})]}),v&&d.jsx("div",{className:"product-swatches__selected-info",children:d.jsxs("small",{children:["Color seleccionado: ",d.jsx("strong",{children:v})]})})]})};function Dw(e,t){return function(){return e.apply(t,arguments)}}const{toString:yk}=Object.prototype,{getPrototypeOf:Gf}=Object,{iterator:Fl,toStringTag:zw}=Symbol,Al=(e=>t=>{const r=yk.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Kt=e=>(e=e.toLowerCase(),t=>Al(t)===e),Ll=e=>t=>typeof t===e,{isArray:Ui}=Array,oa=Ll("undefined");function ya(e){return e!==null&&!oa(e)&&e.constructor!==null&&!oa(e.constructor)&&wt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $w=Kt("ArrayBuffer");function wk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$w(e.buffer),t}const bk=Ll("string"),wt=Ll("function"),Uw=Ll("number"),wa=e=>e!==null&&typeof e=="object",xk=e=>e===!0||e===!1,wo=e=>{if(Al(e)!=="object")return!1;const t=Gf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(zw in e)&&!(Fl in e)},_k=e=>{if(!wa(e)||ya(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Sk=Kt("Date"),Ek=Kt("File"),kk=Kt("Blob"),Ck=Kt("FileList"),Nk=e=>wa(e)&&wt(e.pipe),jk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||wt(e.append)&&((t=Al(e))==="formdata"||t==="object"&&wt(e.toString)&&e.toString()==="[object FormData]"))},Ok=Kt("URLSearchParams"),[Tk,Pk,Ik,Rk]=["ReadableStream","Request","Response","Headers"].map(Kt),Fk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ba(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Ui(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(ya(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(n=0;n<a;n++)o=s[n],t.call(null,e[o],o,e)}}function Bw(e,t){if(ya(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const wn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qw=e=>!oa(e)&&e!==wn;function dd(){const{caseless:e}=qw(this)&&this||{},t={},r=(n,i)=>{const s=e&&Bw(t,i)||i;wo(t[s])&&wo(n)?t[s]=dd(t[s],n):wo(n)?t[s]=dd({},n):Ui(n)?t[s]=n.slice():t[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ba(arguments[n],r);return t}const Ak=(e,t,r,{allOwnKeys:n}={})=>(ba(t,(i,s)=>{r&&wt(i)?e[s]=Dw(i,r):e[s]=i},{allOwnKeys:n}),e),Lk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mk=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Dk=(e,t,r,n)=>{let i,s,a;const o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],(!n||n(a,e,t))&&!o[a]&&(t[a]=e[a],o[a]=!0);e=r!==!1&&Gf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},zk=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},$k=e=>{if(!e)return null;if(Ui(e))return e;let t=e.length;if(!Uw(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Uk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Gf(Uint8Array)),Bk=(e,t)=>{const n=(e&&e[Fl]).call(e);let i;for(;(i=n.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},qk=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Vk=Kt("HTMLFormElement"),Qk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Cm=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Wk=Kt("RegExp"),Vw=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ba(r,(i,s)=>{let a;(a=t(i,s,e))!==!1&&(n[s]=a||i)}),Object.defineProperties(e,n)},Hk=e=>{Vw(e,(t,r)=>{if(wt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(wt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Gk=(e,t)=>{const r={},n=i=>
vendor: 1,380 bytes, line 516
516{i.forEach(s=>{r[s]=!0})};return Ui(e)?n(e):n(String(e).split(t)),r},Kk=()=>{},Jk=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yk(e){return!!(e&&wt(e.append)&&e[zw]==="FormData"&&e[Fl])}const Xk=e=>{const t=new Array(10),r=(n,i)=>{if(wa(n)){if(t.indexOf(n)>=0)return;if(ya(n))return n;if(!("toJSON"in n)){t[i]=n;const s=Ui(n)?[]:{};return ba(n,(a,o)=>{const l=r(a,i+1);!oa(l)&&(s[o]=l)}),t[i]=void 0,s}}return n};return r(e,0)},Zk=Kt("AsyncFunction"),eC=e=>e&&(wa(e)||wt(e))&&wt(e.then)&&wt(e.catch),Qw=((e,t)=>e?setImmediate:t?((r,n)=>(wn.addEventListener("message",({source:i,data:s})=>{i===wn&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),wn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",wt(wn.postMessage)),tC=typeof queueMicrotask<"u"?queueMicrotask.bind(wn):typeof process<"u"&&process.nextTick||Qw,rC=e=>e!=null&&wt(e[Fl]),$={isArray:Ui,isArrayBuffer:$w,isBuffer:ya,isFormData:jk,isArrayBufferView:wk,isString:bk,isNumber:Uw,isBoolean:xk,isObject:wa,isPlainObject:wo,isEmptyObject:_k,isReadableStream:Tk,isRequest:Pk,isResponse:Ik,isHeaders:Rk,isUndefined:oa,isDate:Sk,isFile:Ek,isBlob:kk,isRegExp:Wk,isFunction:wt,isStream:Nk,isURLSearchParams:Ok,isTypedArray:Uk,isFileList:Ck,forEach:ba,merge:dd,extend:Ak,trim:Fk,stripBOM:Lk,inherits:Mk,toFlatObject:Dk,kindOf:Al,kindOfTest:Kt,endsWith:zk,toArray:$k,forEac
vendor: 4,784 bytes, line 516
516hEntry:Bk,matchAll:qk,isHTMLForm:Vk,hasOwnProperty:Cm,hasOwnProp:Cm,reduceDescriptors:Vw,freezeMethods:Hk,toObjectSet:Gk,toCamelCase:Qk,noop:Kk,toFiniteNumber:Jk,findKey:Bw,global:wn,isContextDefined:qw,isSpecCompliantForm:Yk,toJSONObject:Xk,isAsyncFn:Zk,isThenable:eC,setImmediate:Qw,asap:tC,isIterable:rC};function fe(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}$.inherits(fe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.status}}});const Ww=fe.prototype,Hw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Hw[e]={value:e}}),Object.defineProperties(fe,Hw),Object.defineProperty(Ww,"isAxiosError",{value:!0}),fe.from=(e,t,r,n,i,s)=>{const a=Object.create(Ww);return $.toFlatObject(e,a,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),fe.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const nC=null;function fd(e){return $.isPlainObject(e)||$.isArray(e)}function Gw(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function Nm(e,t,r){return e?e.concat(t).map(function(i,s){return i=Gw(i),!r&&s?"["+i+"]":i}).join(r?".":""):t}function iC(e){return $.isArray(e)&&!e.some(fd)}const sC=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function Ml(e,t,r){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=$.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,x){return!$.isUndefined(x[w])});const n=r.metaTokens,i=r.visitor||u,s=r.dots,a=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if($.isDate(y))return y.toISOString();if($.isBoolean(y))return y.toString();if(!l&&$.isBlob(y))throw new fe("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(y)||$.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,w,x){let p=y;if(y&&!x&&typeof y=="object"){if($.endsWith(w,"{}"))w=n?w:w.slice(0,-2),y=JSON.stringify(y);else if($.isArray(y)&&iC(y)||($.isFileList(y)||$.endsWith(w,"[]"))&&(p=$.toArray(y)))return w=Gw(w),p.forEach(function(m,b){!($.isUndefined(m)||m===null)&&t.append(a===!0?Nm([w],b,s):a===null?w:w+"[]",c(m))}),!1}return fd(y)?!0:(t.append(Nm(x,w,s),c(y)),!1)}const f=[],h=Object.assign(sC,{defaultVisitor:u,convertValue:c,isVisitable:fd});function v(y,w){if(!$.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+w.join("."));f.push(y),$.forEach(y,function(p,g){(!($.isUndefined(p)||p===null)&&i.call(t,p,$.isString(g)?g.trim():g,w,h))===!0&&v(p,w?w.concat(g):[g])}),f.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return v(e),t}function jm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Kf(e,t){this._pairs=[],e&&Ml(e,this,t)}const Kw=Kf.prototype;Kw.append=function(t,r){this._pairs.push([t,r])},Kw.toString=function(t){const r=t?function(n){return t.call(this,n,jm)}:jm;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function aC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Jw(e,t,r){if(!t)return e;const n=r&&r.encode||aC;$.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(i?s=i(t,r):s=$.isURLSearchParams(t)?t.toString():new Kf(t,r).toString(n),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Om{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Yw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oC=typeof URLSearchParams<"u"?URLSearchParams:Kf,lC=typeof FormData<"u"?FormData:null,cC=typeof Blob<"u"?Blob:null,uC={isBrowser:!0,classes:{
vendor: 6,610 bytes, lines 516-518
516URLSearchParams:oC,FormData:lC,Blob:cC},protocols:["http","https","file","blob","url","data"]},Jf=typeof window<"u"&&typeof document<"u",hd=typeof navigator=="object"&&navigator||void 0,dC=Jf&&(!hd||["ReactNative","NativeScript","NS"].indexOf(hd.product)<0),fC=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hC=Jf&&window.location.href||"http://localhost",pC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Jf,hasStandardBrowserEnv:dC,hasStandardBrowserWebWorkerEnv:fC,navigator:hd,origin:hC},Symbol.toStringTag,{value:"Module"})),it={...pC,...uC};function mC(e,t){return Ml(e,new it.classes.URLSearchParams,{visitor:function(r,n,i,s){return it.isNode&&$.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function gC(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function vC(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function Xw(e){function t(r,n,i,s){let a=r[s++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),l=s>=r.length;return a=!a&&$.isArray(i)?i.length:a,l?($.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!o):((!i[a]||!$.isObject(i[a]))&&(i[a]=[]),t(r,n,i[a],s)&&$.isArray(i[a])&&(i[a]=vC(i[a])),!o)}if($.isFormData(e)&&$.isFunction(e.entries)){const r={};return $.forEachEntry(e,(n,i)=>{t(gC(n),i,r,0)}),r}return null}function yC(e,t,r){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const xa={transitional:Yw,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=$.isObject(t);if(s&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return i?JSON.stringify(Xw(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return mC(t,this.formSerializer).toString();if((o=$.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ml(o?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),yC(t)):t}],transformResponse:[function(t){const r=this.transitional||xa.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(n&&!this.responseType||i)){const a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(o){if(a)throw o.name==="SyntaxError"?fe.from(o,fe.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:it.classes.FormData,Blob:it.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],e=>{xa.headers[e]={}});const wC=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bC=e=>{const t={};let r,n,i;return e&&e.split(` 517`).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||t[r]&&wC[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Tm=Symbol("internals");function hs(e){return e&&String(e).trim().toLowerCase()}function bo(e){return e===!1||e==null?e:$.isArray(e)?e.map(bo):String(e)}function xC(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const _C=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zc(e,t,r,n,i){if($.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!$.isString(t)){if($.isString(n))return t.indexOf(n)!==-1;if($.isRegExp(n))return n.test(t)}}function SC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function EC(e,t){const r=$.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,a){return this[n].call(this,t,i,s,a)},configurable:!0})})}let bt=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(o,l,c){const u=hs(l);if(!u)throw new Error("header name must be a non-empty string");const f=$.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=bo(o))}const a=(o,l)=>$.forEach(o,(c,u)=>s(c,u,l));if($.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if($.isString(t)&&(t=t.trim())&&!_C(t))a(bC(t),r);else if($.isObject(t)&&$.isIterable(t)){let o={},l,c;for(const u of t){if(!$.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[c=u[0]]=(l=o[c])?$.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(o,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=hs(t),t){const n=$.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return xC(i);if($.isFunction(r))return r.call(this,i,n);if($.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=hs(t),t){const n=$.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||zc(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(a){if(a=hs(a),a){const o=$.findKey(n,a);o&&(!r||zc(n,n[o],o,r))&&(delete n[o],i=!0)}}return $.isArray(t)?t.forEach(s):s(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!t||zc(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return $.forEach(this,(i,s)=>{const a=$.findKey(n,s);if(a){r[a]=bo(i),delete r[s];return}const o=t?SC(s):String(s).trim();o!==s&&delete r[s],r[o]=bo(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return $.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&$.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` 518`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>
vendor: 2,199 bytes, line 518
518n.set(i)),n}static accessor(t){const n=(this[Tm]=this[Tm]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=hs(a);n[o]||(EC(i,a),n[o]=!0)}return $.isArray(t)?t.forEach(s):s(t),this}};bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(bt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),$.freezeMethods(bt);function $c(e,t){const r=this||xa,n=t||r,i=bt.from(n.headers);let s=n.data;return $.forEach(e,function(o){s=o.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Zw(e){return!!(e&&e.__CANCEL__)}function Bi(e,t,r){fe.call(this,e??"canceled",fe.ERR_CANCELED,t,r),this.name="CanceledError"}$.inherits(Bi,fe,{__CANCEL__:!0});function e0(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new fe("Request failed with status code "+r.status,[fe.ERR_BAD_REQUEST,fe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function kC(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function CC(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[s];a||(a=c),r[i]=l,n[i]=c;let f=s,h=0;for(;f!==i;)h+=r[f++],f=f%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-a<t)return;const v=u&&c-u;return v?Math.round(h*1e3/v):void 0}}function NC(e,t){let r=0,n=1e3/t,i,s;const a=(c,u=Date.now())=>{r=u,i=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),f=u-r;f>=n?a(c,u):(i=c,s||(s=setTimeout(()=>{s=null,a(i)},n-f)))},()=>i&&a(i)]}const Xo=(e,t,r=3)=>{let n=0;const i=CC(50,250);return NC(s=>{const a=s.loaded,o=s.lengthComputable?s.total:void 0,l=a-n,c=i(l),u=a<=o;n=a;const f={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o&&u?(o-a)/c:void 0,event:s,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(f)},r)},Pm=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Im=e=>(...t)=>$.asap(()=>e(...t)),jC=it.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,it.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(it.origin),it.
vendor: 4,159 bytes, line 518
518navigator&&/(msie|trident)/i.test(it.navigator.userAgent)):()=>!0,OC=it.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const a=[e+"="+encodeURIComponent(t)];$.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),$.isString(n)&&a.push("path="+n),$.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function TC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function PC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function t0(e,t,r){let n=!TC(t);return e&&(n||r==!1)?PC(e,t):t}const Rm=e=>e instanceof bt?{...e}:e;function In(e,t){t=t||{};const r={};function n(c,u,f,h){return $.isPlainObject(c)&&$.isPlainObject(u)?$.merge.call({caseless:h},c,u):$.isPlainObject(u)?$.merge({},u):$.isArray(u)?u.slice():u}function i(c,u,f,h){if($.isUndefined(u)){if(!$.isUndefined(c))return n(void 0,c,f,h)}else return n(c,u,f,h)}function s(c,u){if(!$.isUndefined(u))return n(void 0,u)}function a(c,u){if($.isUndefined(u)){if(!$.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function o(c,u,f){if(f in t)return n(c,u);if(f in e)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(c,u,f)=>i(Rm(c),Rm(u),f,!0)};return $.forEach(Object.keys({...e,...t}),function(u){const f=l[u]||i,h=f(e[u],t[u],u);$.isUndefined(h)&&f!==o||(r[u]=h)}),r}const r0=e=>{const t=In({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:o}=t;t.headers=a=bt.from(a),t.url=Jw(t0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if($.isFormData(r)){if(it.hasStandardBrowserEnv||it.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(it.hasStandardBrowserEnv&&(n&&$.isFunction(n)&&(n=n(t)),n||n!==!1&&jC(t.url))){const c=i&&s&&OC.read(s);c&&a.set(i,c)}return t},IC=typeof XMLHttpRequest<"u",RC=IC&&function(e){return new Promise(function(r,n){const i=r0(e);let s=i.data;const a=bt.from(i.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:c}=i,u,f,h,v,y;function w(){v&&v(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function p(){if(!x)return;const m=bt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:m,config:e,request:x};e0(function(k){r(k),w()},function(k){n(k),w()},_),x=null}"onloadend"in x?x.onloadend=p:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(p)},x.onabort=function(){x&&(n(new fe("Request aborted",fe.ECONNABORTED,e,x)),x=null)},x.onerror=function(){n(new fe("Network Error",fe.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||Yw;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),n(new fe(b,_.clarifyTimeoutError?fe.ETIMEDOUT:fe.ECONNABORTED,e,x)),x=null},s===void 0&&a.setContentType(null),"setRequestHeader"in x&&$.forEach(a.toJSON(),function(b,_){x.setRequestHeader(_,b)}),$.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),o&&o!=="json"&&(x.responseType=i.responseType),c&&
vendor: 4,595 bytes, line 518
518([h,y]=Xo(c,!0),x.addEventListener("progress",h)),l&&x.upload&&([f,v]=Xo(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",v)),(i.cancelToken||i.signal)&&(u=m=>{x&&(n(!m||m.type?new Bi(null,e,x):m),x.abort(),x=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const g=kC(i.url);if(g&&it.protocols.indexOf(g)===-1){n(new fe("Unsupported protocol "+g+":",fe.ERR_BAD_REQUEST,e));return}x.send(s||null)})},FC=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const s=function(c){if(!i){i=!0,o();const u=c instanceof Error?c:this.reason;n.abort(u instanceof fe?u:new Bi(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new fe(`timeout ${t} of ms exceeded`,fe.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>$.asap(o),l}},AC=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},LC=async function*(e,t){for await(const r of MC(e))yield*AC(r,t)},MC=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Fm=(e,t,r,n)=>{const i=LC(e,t);let s=0,a,o=l=>{a||(a=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){o(),l.close();return}let f=u.byteLength;if(r){let h=s+=f;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw o(c),c}},cancel(l){return o(l),i.return()}},{highWaterMark:2})},Dl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",n0=Dl&&typeof ReadableStream=="function",DC=Dl&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),i0=(e,...t)=>{try{return!!e(...t)}catch{return!1}},zC=n0&&i0(()=>{let e=!1;const t=new Request(it.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Am=64*1024,pd=n0&&i0(()=>$.isReadableStream(new Response("").body)),Zo={stream:pd&&(e=>e.body)};Dl&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Zo[t]&&(Zo[t]=$.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new fe(`Response type '${t}' is not supported`,fe.ERR_NOT_SUPPORT,n)})})})(new Response);const $C=async e=>{if(e==null)return 0;if($.isBlob(e))return e.size;if($.isSpecCompliantForm(e))return(await new Request(it.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if($.isArrayBufferView(e)||$.isArrayBuffer(e))return e.byteLength;if($.isURLSearchParams(e)&&(e=e+""),$.isString(e))return(await DC(e)).byteLength},UC=async(e,t)=>$.toFiniteNumber(e.getContentLength())??$C(t),BC=Dl&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:s,timeout:a,onDownloadProgress:o,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=r0(e);c=c?(c+"").toLowerCase():"text";let v=FC([i,s&&s.toAbortSignal()],a),y;const w=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let x;try{if(l&&zC&&r!=="get"&&r!=="head"&&(x=await UC(u,n))!==0){let _=new Request(t,{method:"POST",body:n,duplex:"half"}),S;if($.isFormData(n)&&(S=_.headers.get("content-type"))&&u.setContentType(S),_.body){const[k,N]=Pm(x,Xo(Im(l)));n=Fm(_.body,Am,k,N)}}$.isString(f)||(f=f?"include":"omit");const p="credentials"in Request.prototype;y=new Request(t,{...h,signal:v,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:p?f:void 0});let g=await fetch(y,h);const m=pd&&(c==="stream"||c==="response");if(pd&&(o||m&&w)){const _={};["status","statusText","headers"].forEach(R=>{_[R]=g[R]});const S=$.toFiniteNumber(g.headers.get("content-length")),[k,N]=o&&Pm(S,Xo(Im(o),!0))||[];g=new Response(Fm(g.body,Am,k,()=>{N&&N(),w&&w()}),_)}c=c||"text";let b=await Zo[$.findKey(Zo,c)||"text"](g,e);return!m&&w&&w(),await new Promise((_,S)=>{e0(_,S,{data:b,headers:bt.from(g.headers),status:g.status,statusText:g.statusText,config:e,request:y})})}catch(p){throw w&&w(),p&&p.name==="TypeError"&&/Load failed|fetch/i.test(p.message)?Object.assign(new fe("Network Error",fe.ERR_NETWORK,e,y),{cause:p.cause||p}):fe.from(p,p&&p.code,e,y)}}),md={http:nC,xhr:RC,fetch:BC};$.forEach(md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Lm=e=>`- ${e}`,qC=e=>
vendor: 6,033 bytes, lines 518-521
518$.isFunction(e)||e===null||e===!1,s0={getAdapter:e=>{e=$.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let s=0;s<t;s++){r=e[s];let a;if(n=r,!qC(r)&&(n=md[(a=String(r)).toLowerCase()],n===void 0))throw new fe(`Unknown adapter '${a}'`);if(n)break;i[a||"#"+s]=n}if(!n){const s=Object.entries(i).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since : 519`+s.map(Lm).join(` 520`):" "+Lm(s[0]):"as no adapter specified";throw new fe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:md};function Uc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Bi(null,e)}function Mm(e){return Uc(e),e.headers=bt.from(e.headers),e.data=$c.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),s0.getAdapter(e.adapter||xa.adapter)(e).then(function(n){return Uc(e),n.data=$c.call(e,e.transformResponse,n),n.headers=bt.from(n.headers),n},function(n){return Zw(n)||(Uc(e),n&&n.response&&(n.response.data=$c.call(e,e.transformResponse,n.response),n.response.headers=bt.from(n.response.headers))),Promise.reject(n)})}const a0="1.11.0",zl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zl[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Dm={};zl.transitional=function(t,r,n){function i(s,a){return"[Axios v"+a0+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,o)=>{if(t===!1)throw new fe(i(a," has been removed"+(r?" in "+r:"")),fe.ERR_DEPRECATED);return r&&!Dm[a]&&(Dm[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,a,o):!0}},zl.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function VC(e,t,r){if(typeof e!="object")throw new fe("options must be an object",fe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],a=t[s];if(a){const o=e[s],l=o===void 0||a(o,s,e);if(l!==!0)throw new fe("option "+s+" must be "+l,fe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new fe("Unknown option "+s,fe.ERR_BAD_OPTION)}}const xo={assertOptions:VC,validators:zl},Zt=xo.validators;let _n=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Om,response:new Om}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=` 521`+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=In(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&xo.assertOptions(n,{silentJSONParsing:Zt.transitional(Zt.boolean),forcedJSONParsing:Zt.transitional(Zt.boolean),clarifyTimeoutError:Zt.transitional(Zt.boolean)},!1),i!=null&&($.isFunction(i)?r.paramsSerializer={serialize:i}:xo.assertOptions(i,{encode:Zt.function,serialize:Zt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),xo.assertOptions(r,{baseUrl:Zt.spelling("baseURL"),withXsrfToken:Zt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&$.merge(s.common,s[r.method]);s&&$.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),r.headers=bt.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===!1||(l=l&&w.synchronous,o.unshift(w.fulfilled,w.rejected))});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let u,f=0,h;if(!l){const y=[Mm.bind(this),void 0];for(y.unshift(...o),y.push(...c),h=y.length,u=Promise.resolve(r);f<h;)u=u.then(y[f++],y[f++]);return u}h=o.length;let v=r;for(f=0;f<h;){const y=o[f++],w=o[f++];try{v=y(v)}catch(x){w.call(this,x);break}}try{u=Mm.call(this,v)}catch(y){return Promise.reject(y)}for(f=0,h=c.length;f<h;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=In(this.defaults,t);const r=t0(t.baseURL,t.url,t.allowAbsoluteUrls);return Jw(r,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){_n.prototype[t]=function(r,n){return this.request(In(n||{},{method:t,url:r,data:(n||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,o){return this.request(In(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}_n.prototype[t]=r(),_n.prototype[t+"Form"]=r(!0)});let QC=class o0{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{n.subscribe(o),s=o}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,o){n.reason||(n.reason=new Bi(s,a,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new o0(function(i){t=i}),cancel:t}}};function WC(e){return function(r){return e.apply(null,r)}}function HC(e){return $.isObject(e)&&e.isAxiosError===!0}const gd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
521alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gd).forEach(([e,t])=>{gd[t]=e});function l0(e){const t=new _n(e),r=Dw(_n.prototype.request,t);return $.extend(r,_n.prototype,t,{allOwnKeys:!0}),$.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return l0(In(e,i))},r}const Ce=l0(xa);Ce.Axios=_n,Ce.CanceledError=Bi,Ce.CancelToken=QC,Ce.isCancel=Zw,Ce.VERSION=a0,Ce.toFormData=Ml,Ce.AxiosError=fe,Ce.Cancel=Ce.CanceledError,Ce.all=function(t){return Promise.all(t)},Ce.spread=WC,Ce.isAxiosError=HC,Ce.mergeConfig=In,Ce.AxiosHeaders=bt,Ce.formToJSON=e=>Xw($.isHTMLForm(e)?new FormData(e):e),Ce.getAdapter=s0.getAdapter,Ce.HttpStatusCode=gd,Ce.default=Ce;const{Axios:Fj,AxiosError:Aj,CanceledError:Lj,isCancel:Mj,CancelToken:Dj,VERSION:zj,all:$j,Cancel:Uj,isAxiosError:Bj,spread:qj,toFormData:Vj,AxiosHeaders:Qj,HttpStatusCode:Wj,formToJSON:Hj,getAdapter:Gj,mergeConfig:Kj}=Ce,GC="https://jonathanadler-com.myshopify.com/api/2024-01/graphql.json",KC="26043ce861e2a4b2fde81ea91e3de71d",JC=` 522 query GetProduct($handle: String!) { 523 product(handle: $handle) { 524 id 525 title 526 handle 527 description 528 descriptionHtml 529 availableForSale 530 productType 531 vendor 532 tags 533 priceRange { 534 minVariantPrice { 535 amount 536 currencyCode 537 } 538 maxVariantPrice { 539 amount 540 currencyCode 541 } 542 } 543 compareAtPriceRange { 544 minVariantPrice { 545 amount 546 currencyCode 547 } 548 maxVariantPrice { 549 amount 550 currencyCode 551 } 552 } 553 featuredImage { 554 id 555 url 556 altText 557 width 558 height 559 } 560 images(first: 10) { 561 edges { 562 node { 563 id 564 url 565 altText 566 width 567 height 568 } 569 } 570 } 571 variants(first: 100) { 572 edges { 573 node { 574 id 575 title 576 sku 577 availableForSale 578 price { 579 amount 580 currencyCode 581 } 582 compareAtPrice { 583 amount 584 currencyCode 585 } 586 selectedOptions { 587 name 588 value 589 } 590 image { 591 id 592 url 593 altText 594 width 595 height 596 } 597 metafields(identifiers: [ 598 {namespace: "global", key: "fabric_set"}, 599 {namespace: "global", key: "base_set"}, 600 {namespace: "global", key: "fabric_base"}, 601 {namespace: "global", key: "color_swatch"}, 602 {namespace: "global", key: "material_info"}, 603 {namespace: "global", key: "microd_name"} 604 ]) { 605 type 606 namespace 607 key 608 value 609 } 610 product_measurement: metafield(key: "product_measurement", namespace: "global") { 611 id 612 value 613 type 614 } 615 ship_message: metafield(key: "ship_message", namespace: "global") { 616 id 617 value 618 type 619 } 620 site_delivery_info: metafield(key: "site_delivery_info", namespace: "global") { 621 id 622 value 623 type 624 } 625 } 626 } 627 } 628 options { 629 id 630 name 631 values 632 } 633 collections(first: 20) { 634 edges { 635 node { 636 id 637 handle 638 title 639 } 640 } 641 } 642 metafields(identifiers: [ 643 {namespace: "global", key: "fabric_type"}, 644 {namespace: "global", key: "microd_name"}, 645 {namespace: "custom", key: "swatch_color"}, 646 {namespace: "custom", key: "material_type"} 647 ]) { 648 type 649 namespace 650 key 651 value 652 } 653 } 654 } 655`,c0=e=>{var u,f,h,v;const[t,r]=E.useState(null),[n,i]=E.useState(!1),[s,a]=E.useState(null);E.useEffect(()=>{if(!e){r(null),a(null);return}i(!0),a(null),Ce.post(GC,{query:JC,variables:{handle:e}},{headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":KC}}).then(y=>{var x;const w=y.data;w.errors?(a(new Error(w.errors[0].message)),r(null)):(x=w.data)!=null&&x.product?(r(w.data.product),a(null)):(a(new Error(`No product found for handle: ${e}`)),r(null))}).catch(y=>{a(y),r(null)}).finally(()=>{i(!1)})},[e]);const o=((u=t?.options)==null?void 0:u.map(y=>({id:y.id,name:y.name,values:y.values})))||[],l=((h=(f=t?.variants)==null?void 0:f.edges)==null?void 0:h.map(y=>{const w=y.node,x={};return w.metafields&&w.metafields.forEach(p=>{p&&p.key&&(x[p.key]=p)}),{id:w.id,title:w.title,sku:w.sku,availableForSale:w.availableForSale,price:w.price,compareAtPrice:w.compareAtPrice,selectedOptions:w.selectedOptions,image:w.image,metafields:x,fabric_set:x.fabric_set,base_set:x.base_set,fabric_base:x.fabric_base,color_swatch:x.color_swatch,material_info:x.material_info,microd_name:x.microd_name,product_measurement:w.product_measurement,ship_message:w.ship_message,site_delivery_info:w.site_delivery_info}}))||[],c=((v=t?.metafields)==null?void 0:v.reduce((y,w)=>(w&&w.namespace&&w.key&&(y[`${w.namespace}_${w.key}`]=w.value),y),{}))||{};return{product:t,loading:n,error:s,processedOptions:o,processedVariants:l,metafields:c}},vd={andorra:"andora","andorra blue":"andora_blue","andorra red":"andora_red","andorra green":"andora_green","andorra navy":"andora_navy","andorra cream":"andora_cream","andorra grey":"andora_grey","andorra gray":"andora_gray","andorra white":"andora_white","andorra black":"andora_black","andorra bone":"andora_bone","brussels amethyst":"brussels_ameth","brussels amethyst purple":"brussels_ameth"},u0={espresso:"wood_espresso"},d0=e=>{const t=String(e||"").toLowerCase();return vd[t]?vd[t]:t.startsWith("andorra")?t.replace("andorra","andora").replace(/\s+/g,"_"):t.replace(/\s+/g,"_")},YC=e=>{const t=String(e||"").toLowerCase();return u0[t]||t.replace(/\s+/g,"_")},Ss="customizer-render-image",f0=e=>typeof e=="string"&&e.includes("configure.jonathanadler.com"),XC=(e,t,r)=>{if(!e||!t||!r)return console.warn("Missing required parameters for customization URL:",{variantMicroName:e,fabric:t,base:r}),null;const n=t.toLowerCase(),i=r.toLowerCase(),s=d0(t),a=YC(r),o=encodeURIComponent(e),l=encodeURIComponent(a),c=`https://configure.jonathanadler.com/renderserver.aspx?ID=jnthndlr001&Key=xW8P0Gew&Catalog=1145&sku=${o}&body=${s}&finish=${l}&width=900`;return console.log("\u{1F527} BUILD CUSTOMIZATION URL DEBUG:"),console.log("\u{1F4E5} Input parameters:",{variantMicroName:e,fabric:t,base:r}),console.log("\u{1F504} Formatted fabric:",t,"->",s,vd[n]?"(using mapping)":"(standard formatting)"),console.log("\u{1F504}
655 Formatted base:",r,"->",a,u0[i]?"(using mapping)":"(standard formatting)"),console.log("\u{1F517} Final URL:",c),console.log("\u{1F4CA} URL breakdown:",{sku:o,body:s,finish:a}),c},ZC=async e=>e?(console.log("\u{1F50D} VALIDATING IMAGE URL:",e),new Promise(t=>{const r=new Image;r.onload=()=>{r.width>0&&r.height>0?(console.log("\u2705 Image validation SUCCESS:",r.width+"x"+r.height),t(!0)):(console.log("\u274C Image validation FAILED: Invalid dimensions"),t(!1))},r.onerror=()=>{console.log("\u274C Image validation FAILED: Load error"),t(!1)};const n=setTimeout(()=>{r.src="",console.log("\u23F0 Image validation TIMEOUT after 5 seconds"),t(!1)},5e3);r.src=e,r.onload=()=>{clearTimeout(n),t(!0)}})):!1,eN=e=>{var t;try{return e?(console.log("getVariantMicroName: Checking variant for microd_name:",{id:e.id,title:e.title,sku:e.sku,microd_name:e.microd_name}),(t=e.microd_name)!=null&&t.value?(console.log("Found microd_name.value in variant:",e.microd_name.value),e.microd_name.value):e.microd_name&&typeof e.microd_name=="string"?(console.log("Found microd_name as string in variant:",e.microd_name),e.microd_name):(console.warn("No microd_name found in variant, falling back to SKU:",e.sku),e.sku||null)):(console.warn("getVariantMicroName: No variant provided"),null)}catch(r){return console.error("Error in getVariantMicroName:",r),null}},h0=e=>{if(!e)return;const t=e.getAttribute("width"),r=e.getAttribute("height");t!==null&&e.dataset.originalWidth===void 0&&(e.dataset.originalWidth=t),r!==null&&e.dataset.originalHeight===void 0&&(e.dataset.originalHeight=r),e.removeAttribute("width"),e.removeAttribute("height")},el=e=>{e&&(e.dataset.originalWidth!==void 0&&(e.setAttribute("width",e.dataset.originalWidth),delete e.dataset.originalWidth),e.dataset.originalHeight!==void 0&&(e.setAttribute("height",e.dataset.originalHeight),delete e.dataset.originalHeight))},p0=(e,t)=>{if(!(!e||!t)){if(e.src=t,f0(t)){e.srcset&&(e.dataset.originalSrcset||(e.dataset.originalSrcset=e.srcset),e.removeAttribute("srcset")),h0(e);return}e.dataset.originalSrcset&&(e.srcset=e.dataset.originalSrcset,delete e.dataset.originalSrcset),el(e),e.srcset&&(e.srcset=e.srcset.split(",").map(r=>{const[n,i]=r.trim().split(" "),s=n.match(/_\d+x\./);return s?`${t.replace(/(\.[^.]+)$/,s[0]+"$1")} ${i}`:`${t} ${i}`}).join(", "))}},tN=e=>{if(!(e!=null&&e.id))return console.warn("\u26A0\uFE0F No variant ID provided:",e),!1;const t=typeof e.id=="string"?e.id:String(e.id),r=t.match(/(\d+)$/),n=r?r[1]:t,i=['input[name="id"].product-variant-id','input[name="id"]',"input.product-variant-id",'input[type="hidden"][name="id"]'];let s=null;for(const a of i)if(s=document.querySelector(a),s)break;if(s){s.value,s.value=n;const a=new Event("change",{bubbles:!0});return s.dispatchEvent(a),!0}else return console.warn("\u26A0\uFE0F Hidden variant input not found. Available inputs:",[...document.querySelectorAll("input")].map(a=>({name:a.name,type:a.type,className:a.className,value:a.value}))),!1},rN=e=>{const t=document.querySelector('button[name="add"]')||document.querySelector("#ProductSubmitButton-template--24071040630818__main")||document.querySelector(".product-form__submit");if(!t)return!1;const r=t.querySelector("span");return e?.available||e?.availableForSale?(t.disabled=!1,t.classList.remove("disabled"),r&&(r.textContent="Add to cart")):(t.disabled=!0,t.classList.add("disabled"),r&&(r.textContent="Sold out")),!0},nN=e=>{var o;if(!(e!=null&&e.price))return!1;const t=Number(e.price.amount)*100||0,r=Number((o=e.compareAtPrice)==null?void 0:o.amount)*100||0,n=document.querySelector(".product .product__info-wrapper .price"),i=document.querySelector(".product .product__info-wrapper .price-item--regular"),s=document.querySelector(".product .product__info-wrapper .price-item--sale"),a=n?.querySelector(".price__sale .price-item--regular");return r&&r>t?(i&&(i.textContent=ps(r)),a&&a!==i&&(a.textContent=ps(r)),s&&(s.textContent=ps(t)),n&&n.classList.add("price--on-sale")):(i&&(i.textContent=ps(t)),s&&(s.textContent=ps(t)),n&&n.classList.remove("price--on-sale")),!0},ps=e=>{const t=e/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(t)};let m0=!1;const Bc=e=>{m0=!!e},iN=e=>{var s,a,o;if(!e||m0)return!1;const t=document.querySelectorAll("[data-image-main-react] img");if(t.length===0)return console.warn("\u26A0\uFE0F No main product images found with selector [data-image-main-react] img"),!1;let r=null;if(e.featured_image)typeof e.featured_image=="string"?r=e.featured_image:e.featured_image.src?r=e.featured_image.src:e.featured_image.url&&(r=e.featured_image.url);else if(e.image)typeof e.image=="string"?r=e.image:e.image.src?r=e.image.src:e.image.url&&(r=e.image.url);else if((a=(s=e.featured_media)==null?void 0:s.preview_image)!=null&&a.src)r=e.featured_media.preview_image.src;else if(e.media&&e.media.length>0){const l=e.media[0];(o=l.preview_image)!=null&&o.src?r=l.preview_image.src:l.src?r=l.src:l.url&&(r=l.url)}if(!r)return console.warn("\u26A0\uFE0F No image URL found for variant:",e),!1;let n=!1;t.forEach(l=>{const c=l.src;if(l.src=r,l.classList.remove(Ss),l.dataset.originalSrcset&&(l.srcset=l.dataset.originalSrcset,delete l.dataset.originalSrcset),el(l),l.onerror=null,l.srcset){const f=l.srcset.split(",").map(h=>{const[v,y]=h.trim().split(" "),w=v.match(/_\d+x\./);return w?`${r.replace(/(\.[^.]+)$/,w[0]+"$1")} ${y}`:`${r} ${y}?width=600`});l.srcset=f.join(", ")}const u=new Event("load",{bubbles:!0});l.dispatchEvent(u),n=!0,console.log("\u2705 Updated main product image from",c,"to",r)});const i=document.querySelector(".product__media-wrapper media-gallery-vertical");return i&&i.goToFirstSlide(),n},vi=()=>{const e=document.querySelector('.template-product form[data-type="add-to-cart-form"]');return console.log("\u{1F50D} findPDPForm - Form found:",!!e),e?(console.log("\u{1F4CB}
655 Form ID:",e.id),console.log("\u{1F4CB} Form action:",e.action)):(console.warn('\u274C No form found with selector: .template-product form[data-type="add-to-cart-form"]'),console.log("Available forms:",document.querySelectorAll("form"))),e},g0=e=>{if(console.log("\u{1F3A8} updateCartProperties called with:",e),!e||typeof e!="object")return console.warn("\u274C Invalid properties:",e),!1;const t=vi();if(!t)return console.error("\u274C No form found - cannot update properties"),!1;const r=t.querySelectorAll('input[data-customizer-property="true"]');console.log("\u{1F5D1}\uFE0F Removing existing properties:",r.length),r.forEach(s=>{console.log(" - Removing:",s.name,"=",s.value),s.remove()});let n=!1;Object.entries(e).forEach(([s,a])=>{if(a&&String(a).trim()!==""){const o=document.createElement("input");o.type="hidden",o.name=`properties[${s}]`,o.value=String(a).trim(),o.dataset.customizerProperty="true",t.appendChild(o),console.log("\u2705 Added property:",o.name,"=",o.value),n=!0}});const i=t.querySelectorAll('input[name^="properties["]');return console.log("\u{1F4CA} Total properties in form:",i.length),i.forEach(s=>{console.log(" -",s.name,"=",s.value)}),n},tl=(e,t=null)=>{const r={hiddenInput:tN(e),addToCartButton:rN(e),priceDisplay:nN(e),mainImage:iN(e),cartProperties:t?g0(t):null},n=new CustomEvent("variant-dom-updated",{detail:{variant:e,properties:t,results:r,timestamp:Date.now()},bubbles:!0});return document.dispatchEvent(n),r},v0=()=>window.innerWidth<=749,zm={variantChange:"variant-change"},$l=(e,t,r,n={})=>{const{updateUrl:i=!0}=n,s=E.useRef(null),a=E.useCallback(u=>{var h,v;if(!u||!window.history)return;const f=new URL(window.location);if(f.searchParams.delete("fabric"),f.searchParams.delete("base"),f.searchParams.delete("variant_id"),f.searchParams.delete("variant"),(h=u.fabric_set)!=null&&h.value&&f.searchParams.set("fabric",u.fabric_set.value),(v=u.base_finish)!=null&&v.value&&f.searchParams.set("base",u.base_finish.value),u.id){const y=typeof u.id=="string"?u.id:String(u.id),w=y.match(/(\d+)$/),x=w?w[1]:y;f.searchParams.set("variant",x),f.searchParams.set("variant_id",x)}window.history.replaceState({},"",f.toString())},[]),o=E.useCallback(u=>{var y,w;if(!u)return;const f=new CustomEvent("react-variant-change",{detail:{variant:u,productHandle:e,sectionId:"react-product-section",source:"react-component"},bubbles:!0});if(document.dispatchEvent(f),window.publish&&typeof window.publish=="function"&&window.publish(zm.variantChange,{data:{sectionId:"react-product-section",variant:u,source:"react-component"}}),(y=u.featured_media)!=null&&y.id){const x=new CustomEvent("react-media-change",{detail:{mediaId:u.featured_media.id,variant:u,productHandle:e},bubbles:!0});document.dispatchEvent(x)}const h=new CustomEvent("react-thumbnails-update",{detail:{variant:u,productHandle:e,mediaIds:((w=u.media)==null?void 0:w.map(x=>x.id))||[]},bubbles:!0});document.dispatchEvent(h);const v=new CustomEvent("react-add-to-cart-update",{detail:{variant:u,productHandle:e,variantId:u.id,available:u.available},bubbles:!0});document.dispatchEvent(v)},[e]),l=E.useCallback(u=>{u&&(tl(u),i&&a(u),o(u),r&&r(u))},[a,o,r]),c=E.useCallback(()=>{const u=new URL(window.location),f=u.searchParams.get("variant")||u.searchParams.get("variant_id"),h=u.searchParams.get("fabric"),v=u.searchParams.get("base");return{variantId:f,fabric:h,base:v}},[]);return E.useEffect(()=>(typeof window.subscribe=="function"&&(s.current=window.subscribe(zm.variantChange,u=>{const{variant:f,source:h}=u.data||{}})),()=>{s.current&&s.current()}),[]),E.useEffect(()=>{t&&i&&a(t)},[t,a,i]),{handleVariantChange:l,getVariantFromURL:c,updateURLWithVariantParams:a,triggerVariantChangeEvent:o}};class sN{constructor(){this.cache=new Map,this.maxSize=50,this.accessOrder=new Map}generateKey(t,r=533){return`${t}_${r}`}has(t,r=533){const n=this.generateKey(t,r);return this.cache.has(n)}get(t,r=533){const n=this.generateKey(t,r);return this.cache.has(n)?(this.accessOrder.set(n,Date.now()),this.cache.get(n)):null}preload(t,r=533){const n=this.generateKey(t,r);return this.cache.has(n)?(this.accessOrder.set(n,Date.now()),Promise.resolve(this.cache.get(n))):new Promise((i,s)=>{const a=new Image;a.onload=()=>{this.cache.size>=this.maxSize&&this.evictOldest();const o=this.getOptimizedUrl(t,r),l=this.generateSrcset(t),c={src:o,srcset:l,naturalWi
655dth:a.naturalWidth,naturalHeight:a.naturalHeight,cached:!0,timestamp:Date.now()};this.cache.set(n,c),this.accessOrder.set(n,Date.now()),i(c)},a.onerror=()=>{s(new Error(`Failed to preload image: ${t}`))},a.src=this.getOptimizedUrl(t,r)})}getOptimizedUrl(t,r=533){if(!t)return t;try{const n=new URL(t);return n.searchParams.set("width",r),n.searchParams.set("height",r),n.searchParams.set("crop","center"),n.toString()}catch{return t}}generateSrcset(t){return[165,360,533,720,940,1066].map(n=>`${this.getOptimizedUrl(t,n)} ${n}w`).join(", ")}evictOldest(){if(this.accessOrder.size===0)return;let t=null,r=1/0;for(const[n,i]of this.accessOrder.entries())i<r&&(r=i,t=n);t&&(this.cache.delete(t),this.accessOrder.delete(t))}applyToElement(t,r){!t||!r||(t.style.transition="opacity 0.3s ease",t.style.opacity="0.8",setTimeout(()=>{t.src=r.src,r.srcset&&(t.srcset=r.srcset),t.style.opacity="1"},100))}clear(){this.cache.clear(),this.accessOrder.clear()}getStats(){return{size:this.cache.size,maxSize:this.maxSize,usage:`${this.cache.size}/${this.maxSize}`}}}const Ar=new sN,y0=({color:e,swatch:t,selected:r=!1,disabled:n=!1,onClick:i,onMouseEnter:s,onMouseLeave:a,onKeyDown:o,onFocus:l,onBlur:c,shape:u="circle",size:f="medium",showLabel:h=!1,className:v=""})=>{const y=b=>{b.preventDefault(),!n&&i&&i(e,t)},w=b=>{o?o(b,e,t):(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),y(b))},x=()=>{var N;const b={display:"inline-block",border:"2px solid transparent",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",position:"relative",outline:"none",userSelect:"none",opacity:n?.5:1,pointerEvents:n?"none":"auto"},_={small:{width:"24px",height:"24px",minWidth:"24px",minHeight:"24px"},medium:{width:"32px",height:"32px",minWidth:"32px",minHeight:"32px"},large:{width:"40px",height:"40px",minWidth:"40px",minHeight:"40px"},xlarge:{width:"48px",height:"48px",minWidth:"48px",minHeight:"48px"}},S={circle:{borderRadius:"50%"},square:{borderRadius:"4px"}};r&&(b.borderColor="#000",b.boxShadow="0 0 0 2px #fff, 0 0 0 4px #000"),n||(b.transform="scale(1)");const k={...b,..._[f]||_.medium,...S[u]||S.circle};if((N=t?.image)!=null&&N.url)k.backgroundImage=`url(${t.image.url})`;else if(e&&typeof window.getSwatchImage=="function"){const R=window.getSwatchImage(e);k.backgroundImage=`url(${R})`}else if(t!=null&&t.color)k.backgroundColor=t.color;else if(e){const R={red:"#ff0000",blue:"#0000ff",green:"#00ff00",yellow:"#ffff00",black:"#000000",white:"#ffffff",gray:"#808080",grey:"#808080",pink:"#ffc0cb",purple:"#800080",orange:"#ffa500",brown:"#a52a2a"};k.backgroundColor=R[e.toLowerCase()]||e}return k},p=()=>t!=null&&t.title?t.title:e||"Color swatch",g=["swatch",`swatch--${u}`,`swatch--${f}`,r?"swatch--selected":"",n?"swatch--disabled":"",v].filter(Boolean).join(" "),m={display:h?"block":"none",position:"absolute",bottom:"-20px",left:"50%",transform:"translateX(-50%)",fontSize:"12px",whiteSpace:"nowrap",background:"rgba(0, 0, 0, 0.8)",color:"white",padding:"4px 8px",borderRadius:"4px",zIndex:10,pointerEvents:"none"};return d.jsx("div",{className:g,style:x(),onClick:y,onMouseEnter:s,onMouseLeave:a,onKeyDown:w,onFocus:l,onBlur:c,title:p(),role:"button",tabIndex:n?-1:0,"aria-label":`${p()}${r?" (selected)":""}${n?" (disabled)":""}`,"aria-pressed":r,"aria-disabled":n,children:h&&d.jsx("span",{className:"swatch__label",style:m,children:p()})})},w0=({productHandle:e,selectedVariant:t=null,onVariantChange:r=null,showLabels:n=!1,shape:i="circle",size:s="medium",className:a="",enableLabel:o=!1,position:l="product",optionsCollapsed:c=!1})=>{const[u,f]=E.useState(t),h=E.useRef(null),{swatches:v,loading:y,error:w}=Er(),{product:x,loading:p,error:g,processedOptions:m,processedVariants:b}=c0(e),[_,S]=E.useState(),{handleVariantChange:k,getVariantFromURL:N,updateURLWithVariantParams:R}=$l(e,u,j=>{var L,M;f(j),S((M=(L=j.selectedOptions)==null?void 0:L.find(B=>B.name==="Color"))==null?void 0:M.value),r&&r(j)},{updateUrl:l!=="card"}),P=E.useCallback(j=>{if(!j)return null;if(typeof j=="number")return j;if(typeof j=="string"){const L=j.match(/(\d+)$/);return L?L[1]:j}return j},[]);E.useEffect(()=>{var j,L;t&&t.id!==u?.id&&(f(t),S((L=(j=t.selectedOptions)==null?void 0:j.find(M=>M.name==="Color"))==null?void 0:L.value))},[t,u]);const H=E.useCallback(j=>{if(!(j!=null&&j.sku))return;console.log("\u{1F3F7}\uFE0F [SwatchesByHandle] Updating SKU element with:",j.sku);const L=[".product-sku",".variant-sku",".product__sku","[data-sku]",".sku-value","#product-sku"];let M=null;for(const B of L)if(M=document.querySelector(B),M)break;M?(M.textContent=j.sku,console.log("\u{1F3F7}\uFE0F [SwatchesByHandle] Updated SKU element with:",j.sku)):console.warn("\u26A0\uFE0F [SwatchesByHandle] SKU element not found. Tried selectors:",L)},[]),G=E.useCallback(j=>{var X,ce;if(!j||l!=="product")return;console.log("\u{1F4D1} [SwatchesByHandle] Updating variant-dependent tabs for variant:",j.id);const L=j.variant||j;document.querySelectorAll('[data-variant-dependent="true"]').forEach(Z=>{const q=Z.getAttribute("data-metafield-key");Z.getAttribute("data-metafield-namespace");const F=Z.querySelector("[data-accordion-content]");if(!q||!F)return;const K=L[q],oe=K?.value;if(console.log(`\u{1F4D1} [SwatchesByHandle] Processing tab: ${q}`,{hasMetafield:!!K,value:oe}),oe&&oe.trim()!=="")switch(q){case"product_measurement":F.innerHTML=`<ul>${oe}</ul>`,console.log("\u{1F4CF} [SwatchesByHandle] Updated Dimensions tab");break;case"ship_message":F.innerHTML=oe,console.log("\u{1F69A} [SwatchesByHandle] Updated Shipping & Returns tab");break;case"site_delivery_info":F.innerHTML=oe,console.log("\u{1F4E6} [SwatchesByHandle] Updated Site Delivery Info tab");break;default:F.innerHTML=oe,console.log(`\u{1F4C4} [SwatchesByHandle] Updated ${q} tab`)}else console.log(`\u2139\uFE0F [SwatchesByHandle] No value for ${q} tab (tab remains visible)`)});const B=document.querySelector(".data-accordion-pdp-measurement");B&&(X=L.product_measurement)!=null&&X.value&&(B.innerHTML=`<ul>${L.product_measurement.value}</ul>`,console.log("\u{1F4CF} [SwatchesByHandle] Updated .data-accordion-pdp-measurement"));const z=document.querySelector(".data-accordion-pdp-shipping-returns");z&&(ce=L.ship_message)!=null&&ce.value&&(z.innerHTML=L.ship_message.value,console.log("\u{1F69A} [SwatchesByHandle] Updated .data-accordion-pdp-shipping-returns")),H(j)},[l,H]),Q=E.useCallback(j=>{var Z;if(l!=="product"||!j)return;const L=document.querySelectorAll('input[name="quantity"]'),M=document.querySelectorAll("quantity-input"),B=document.querySelectorAll(".quantity__button");console.log("\u{1F50D} Quantity elements found:",{inputs:L.length,wrappers:M.length,buttons:B.length,variant:j});const z=j.variant||j;let X=!1;const ce=z.availableForSale??z.available;if(ce)if(!z.inventory_management||z.inventory_policy==="continue")X=!0;else if(z.inventory_management==="shopify"){const q=z.inventory_quantity||0,F=((Z=z.quantity_rule)==null?void 0:Z.min)||1;X=q>=F}else X=(z.inventory_quantity||0)>0;console.log("\u{1F4CA} Variant availability check:",{variantAvailable:ce,isAvailable:X,actualVariant:z}
655),L.forEach(q=>{var F;if(X){q.removeAttribute("disabled"),q.removeAttribute("readonly");const K=((F=z.quantity_rule)==null?void 0:F.min)||1;(q.value==="0"||q.value==="")&&(q.value=K.toString())}else q.setAttribute("disabled","disabled"),q.setAttribute("readonly","readonly"),q.value="0"}),M.forEach(q=>{X?q.classList.remove("quantity--disabled"):q.classList.add("quantity--disabled")}),B.forEach(q=>{X?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled")})},[l]),U=E.useCallback(async j=>{if(l!=="card"||!j)return;const L=h.current,M=L?L.closest(".product-card-wrapper"):null;if(!M)return;const B=M.querySelectorAll("img");if(!B||B.length===0)return;const z=j.variant||j;let X=null;if(z.featured_media)X=z.featured_media.src||z.featured_media.url||z.featured_media.preview_image&&(z.featured_media.preview_image.src||z.featured_media.preview_image.url);else if(z.image)X=z.image.src||z.image.url;else if(z.media&&z.media.length>0){const F=z.media[0];X=F.src||F.url}if(!X||Array.from(B).some(F=>F.src.includes(X.split("?")[0])))return;const Z=(()=>{var F,K,oe,de,le;return(F=z.featured_media)!=null&&F.alt?z.featured_media.alt:(K=z.image)!=null&&K.alt?z.image.alt:(oe=z.image)!=null&&oe.altText?z.image.altText:(le=(de=z.media)==null?void 0:de[0])!=null&&le.alt?z.media[0].alt:""})(),q=Ar.get(X);if(q)B.forEach(F=>{Ar.applyToElement(F,q),F.alt=Z}),M.dispatchEvent(new CustomEvent("card-image-updated",{detail:{productHandle:e,variantId:z.id,imageUrl:`${X}&width=600`,cardWrapper:M,cached:!0,loadTime:0},bubbles:!0}));else try{const F=await Ar.preload(X);B.forEach(K=>{Ar.applyToElement(K,F),K.alt=Z}),M.dispatchEvent(new CustomEvent("card-image-updated",{detail:{productHandle:e,variantId:z.id,imageUrl:X,cardWrapper:M,cached:!1,loadTime:Date.now()-F.timestamp},bubbles:!0}))}catch(F){console.warn("Failed to load and cache card image:",X,F);const K=new Image;K.onload=()=>{const de=(le=>[165,360,533,720,940,1066].map(jt=>`${le}?width=${jt} ${jt}w`).join(", ")+`, ${le} 1400w`)(X);B.forEach(le=>{le.src=X,le.srcset=de,le.alt=Z})},K.onerror=()=>{console.warn("Failed to load card image (fallback):",X)},K.src=X}},[l,e]),V=E.useCallback(j=>{if(l!=="card"||!j)return;const L=h.current,M=L?L.closest(".product-card-wrapper"):null;if(!M)return;const B=j.variant||j;if(!(B!=null&&B.id))return;const z=P(B.id),X=B.url||`/products/${e}?variant=${z}`,ce=M.querySelector("[data-card-variant-link]");ce&&(ce.href=X),M.querySelectorAll("a.full-unstyled-link, a.product__view-details").forEach(F=>{F.href=X}),M.querySelectorAll("[data-product-url]").forEach(F=>{F.setAttribute("data-product-url",X)})},[l,e,P]);E.useEffect(()=>{if(u){const j=setTimeout(()=>{l==="card"?(H(u),U(u),V(u)):l==="product"&&(console.log("\u{1F4E6} [SwatchesByHandle] Variant data:",{id:u.id,sku:u.sku,metafields:{product_measurement:u.product_measurement,ship_message:u.ship_message,site_delivery_info:u.site_delivery_info}}),G(u),Q(u))},100);return()=>clearTimeout(j)}},[u,l,U,V,Q,H,G]),E.useEffect(()=>{if(x&&b){const j=N();if(j.variantId){const L=b.find(M=>P(M.id).toString()===j.variantId);L&&!u&&(L.selectedOptions.map(M=>({name:M.name,value:M.value})),k(L))}else if(l==="product"){const M=b.find(B=>B.availableForSale)||b[0];M&&M.id!==u?.id?k(M):u&&Q(u)}}},[x,b,N,k,r,e,P,l,u,Q]),E.useEffect(()=>{const j=M=>{const{variant:B}=M.detail;if(B&&B.id!==u?.id&&r){const z=B.selectedOptions.map(X=>({name:X.name,value:X.value}));r({variant:B,selectedOptions:z,productHandle:e})}},L=M=>{const{variant:B,source:z}=M.detail;if(z==="react-component"&&B&&B.id!==u?.id&&r){const X=B.selectedOptions.map(ce=>({name:ce.name,value:ce.value}));r({variant:B,selectedOptions:X,productHandle:e})}};return document.addEventListener("theme-variant-change",j),document.addEventListener("theme-variant-sync",j),document.addEventListener("react-variant-change",L),()=>{document.removeEventListener("theme-variant-change",j),document.removeEventListener("theme-variant-sync",j),document.removeEventListener("react-variant-change",L)}},[u,r,e]);const A=E.useCallback(j=>!b||!j?null:b.find(L=>L.selectedOptions.every(M=>{const B=j.find(z=>z.name.toLowerCase()===M.name.toLowerCase());return B&&B.value===M.value})),[b]),D=E.useCallback((j,L)=>{const M=m.map(z=>{var X,ce;return{name:z.name,value:z.name===j?L:((ce=(X=u?.selectedOptions)==null?void 0:X.find(Z=>Z.name===z.name))==null?void 0:ce.value)||z.values[0]}}),B=A(M);if(B){if(l==="product"&&(G(B),Q(B)),l==="card"){H(B),U(B),V(B);
655const z=B.variant||B,X=h.current,ce=X?X.closest(".product-card-wrapper"):null;document.dispatchEvent(new CustomEvent("swatch-selected",{detail:{productHandle:e,color:L,swatch:C(L),variant:z,position:l,cardWrapper:ce},bubbles:!0}))}if(l==="product"){const z=B.variant||B;document.dispatchEvent(new CustomEvent("swatch-selected",{detail:{productHandle:e,color:L,swatch:C(L),variant:z,position:l},bubbles:!0}))}if(l==="product"){const z=B.variant||B;R(z),k(B)}}},[m,u,A,k,e,l,U,V,Q,H,G]),C=E.useCallback(j=>v&&v[j]||null,[v]);if(y||p)return d.jsxs("div",{className:`product-swatches-by-handle product-swatches-by-handle--loading ${a}`,children:[d.jsx("div",{className:"product-swatches-by-handle__loading-spinner"}),d.jsx("span",{children:"Loading..."})]});if(w||g)return d.jsx("div",{className:`product-swatches-by-handle product-swatches-by-handle--error ${a}`,children:d.jsxs("span",{children:["Error: ",w?.message||g?.message]})});const T=j=>l=="card"?"product-swatches-by-handle__option-group--card tw-mb-[10px]":`product-swatches-by-handle__option-group tw-mb-[${j?"20":"30"}px]`;return d.jsx("div",{className:`product-swatches-by-handle ${a}`,"data-product-handle":e,ref:h,children:m.map(j=>j.name==="Color"?d.jsxs("div",{className:T(j.values.length>1),children:[o&&d.jsxs("h3",{className:"product-swatches-by-handle__option-title",children:[d.jsx("span",{className:"tw-uppercase",children:j.name}),": ",_||""]}),d.jsx("div",{className:"product-swatches-by-handle__option-values",children:j.values.map(L=>{var X;const M=C(L),B=((X=u?.selectedOptions)==null?void 0:X.some(ce=>ce.name===j.name&&ce.value===L))||_===L,z=l==="card"?ce=>{if(!b)return;const Z=m.map(F=>{var K,oe;return{name:F.name,value:F.name===j.name?L:((oe=(K=u?.selectedOptions)==null?void 0:K.find(de=>de.name===F.name))==null?void 0:oe.value)||F.values[0]}}),q=A(Z);if(q){const F=q.variant||q;let K=null;F.featured_media?K=F.featured_media.src||F.featured_media.url:F.image&&(K=F.image.src||F.image.url),K&&!Ar.has(K)&&Ar.preload(K).catch(()=>{})}}:void 0;return d.jsx(y0,{color:L,swatch:M,selected:B,onClick:()=>D(j.name,L),onMouseEnter:z,shape:i,size:s,showLabel:n},`${j.name}-${L}`)})})]},j.name):j.values.length>1&&(()=>{var M,B;return(()=>{try{const z=(document.querySelector('meta[property="og:title"]')||{}).content||document.title||"";return String(z).toLowerCase().includes("rug")}catch{return!1}})()&&j.name&&String(j.name).toLowerCase()==="size"?d.jsxs("div",{className:T(),children:[d.jsxs("h3",{className:"product-swatches-by-handle__option-title",children:[d.jsx("span",{className:"tw-uppercase",children:j.name}),":"]}),d.jsx("div",{className:"product-swatches-by-handle__size-pills tw-w-full tw-flex tw-flex-wrap tw-gap-2",children:j.values.filter(z=>z!=="Default Title").map(z=>{var Z,q;const ce=(((q=(Z=u?.selectedOptions)==null?void 0:Z.find(F=>F.name===j.name))==null?void 0:q.value)||j.values[0])===z;return d.jsx("button",{type:"button",className:`tw-border tw-border-solid tw-border-black tw-px-4 tw-py-2 tw-text-[12px] tw-font-['brandon-grotesque'] tw-tracking-[0.5px] tw-leading-[17px] ${ce?"tw-bg-black tw-text-white":"tw-bg-transparent tw-text-black"}`,onClick:()=>D(j.name,z),children:z},`${j.name}-${z}`)})})]},j.name):d.jsxs("div",{className:T(),children:[d.jsxs("h3",{className:"product-swatches-by-handle__option-title",children:[d.jsx("span",{className:"tw-uppercase",children:j.name}),":"]}),d.jsx("div",{className:"product-swatches-by-handle__option-values",children:d.jsxs("div",{className:"tw-w-full tw-relative tw-flex tw-gap-[18px] tw-items-center",children:[d.jsx("select",{className:"tw-appearance-none tw-w-full tw-bg-transparent tw-border-solid tw-text-black tw-font-['brandon-grotesque'] tw-text-[12px] tw-font-[420] tw-leading-[17px] tw-tracking-[0.5px] tw-py-4 tw-px-6 focus:tw-outline-none",value:((B=(M=u?.selectedOptions)==null?void 0:M.find(z=>z.name===j.name))==null?void 0:B.value)||j.values[0],onChange:z=>D(j.name,z.target.value),children:j.values.map(z=>z!=="Default Title"&&d.jsx("option",{value:z,children:z},`${j.name}-${z}`))}),d.jsx("div",{className:"tw-absolute tw-right-3 tw-top-1/2 tw-transform -tw-translate-y-1/2 tw-pointer-events-none",children:d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",children:[d.jsx("mask",{id:"mask0_532_18754",maskType:"alpha",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"12",height:"13",children:d.jsx("rect",{y:"0.5",width:"12",height:"12",fill:"#D9D9D9"})}),d.jsx("g",{mask:"url(#mask0_532_18754)",children:d.jsx("path",{d:"M6 8L3.5 5.5H8.5L6 8Z",fill:"black"})})]})})]})})]},j.name)})())})},aN=` 656 query GetVariantMetafields($id: ID!) { 657 node(id: $id) { 658 ... on ProductVariant { 659 id 660 fabric_set: metafield(key: "fabric_set", namespace: "global") { 661 id 662 value 663 type 664 } 665 base_set: metafield(key: "base_set", namespace: "global") { 666 id 667 value 668 type 669 } 670 color_swatch: metafield(key: "color_swatch", namespace: "custom") { 671 id 672 value 673 type 674 } 675 material_info: metafield(key: "material_info", namespace: "global") { 676 id 677 value 678 type 679 } 680 microd_name: metafield(key: "microd_name", namespace: "global") { 681 id 682 value 683 type 684 } 685 product_measurement: metafield(key: "product_measurement", namespace: "global") { 686 id 687 value 688 type 689 } 690 ship_message: metafield(key: "ship_message", namespace: "global") { 691 id 692 value 693 type 694 } 695 } 696 } 697 } 698`,oN=` 699 query GetProductByHandle($handle: String!) { 700 product(handle: $handle) { 701 id 702 title 703 handle 704 description 705 descriptionHtml 706 availableForSale 707 productType 708 vendor 709 tags 710 collections(first: 50) { 711 nodes { 712 id 713 handle 714 title 715 } 716 } 717 priceRange { 718 minVariantPrice { 719 amount 720 currencyCode 721 } 722 maxVariantPrice { 723 amount 724 currencyCode 725 } 726 } 727 compareAtPriceRange { 728 minVariantPrice { 729 amount 730 currencyCode 731 } 732 maxVariantPrice { 733 amount 734 currencyCode 735 } 736 } 737 featuredImage { 738 id 739 url 740 altText 741 width 742 height 743 } 744 images(first: 10) { 745 edges { 746 node { 747 id 748 url 749 altText 750 width 751 height 752 } 753 } 754 } 755 variants(first: 100) { 756 edges { 757 node { 758 id 759 title 760 sku 761 availableForSale 762 763 price { 764 amount 765 currencyCode 766 } 767 compareAtPrice { 768 amount 769 currencyCode 770 } 771 selectedOptions { 772 name 773 value 774 } 775 image { 776 id 777 url 778 altText 779 width 780 height 781 } 782 # Metafields for variants 783 fabric_set: metafield(key: "fabric_set", namespace: "global") { 784 id 785 value 786 type 787 } 788 base_set: metafield(key: "base_set", namespace: "global") { 789 id 790 value 791 type 792 } 793 color_swatch: metafield(key: "color_swatch", namespace: "custom") { 794 id 795 value 796 type 797 } 798 material_info: metafield(key: "material_info", namespace: "global") { 799 id 800 value 801 type 802 } 803 microd_name: metafield(key: "microd_name", namespace: "global") { 804 id 805 value 806 type 807 } 808 product_measurement: metafield(key: "product_measurement", namespace: "global") { 809 id 810 value 811 type 812 } 813 ship_message: metafield(key: "ship_message", namespace: "global") { 814 id 815 value 816 type 817 } 818 } 819 } 820 } 821 options { 822 id 823 name 824 values 825 } 826 # Product metafields 827 metafields(identifiers: [ 828 {namespace: "global", key: "fabric_type"}, 829 {namespace: "global", key: "microd_name"}, 830 {namespace: "global", key: "variant_color_order"}, 831 {namespace: "custom", key: "swatch_color"}, 832 {namespace: "custom", key: "material_type"} 833 ]) { 834 id 835 namespace 836 key 837 value 838 type 839 } 840 } 841 } 842`,lN=async e=>{var t,r;try{const n=await Ce({url:jl(),method:"POST",headers:Ol(),data:{query:aN,variables:{id:e}}});return n.data.errors?(console.error("[fetchVariantMetafields] GraphQL errors:",n.data.errors),null):(r=(t=n.data)==null?void 0:t.data)==null?void 0:r.no
842de}catch(n){return console.error("[fetchVariantMetafields] Error fetching variant metafields:",n),null}},Ul=e=>{const[t,r]=E.useState(!0),[n,i]=E.useState(null),[s,a]=E.useState(null);return E.useEffect(()=>{if(!e){r(!1);return}(async()=>{var l,c,u,f,h,v,y;r(!0),i(null);try{const w=await Ce({url:jl(),method:"POST",headers:Ol(),data:{query:oN,variables:{handle:e}}});if(w.data.errors)throw console.error("[useProductByHandleAxios] GraphQL errors:",w.data.errors),new Error(((l=w.data.errors[0])==null?void 0:l.message)||"GraphQL error occurred");const x=(u=(c=w.data)==null?void 0:c.data)==null?void 0:u.product;if(!x)throw new Error(`Product not found: ${e}`);const p={...x,variants:((h=(f=x.variants)==null?void 0:f.edges)==null?void 0:h.map(m=>m.node))||[],images:((y=(v=x.images)==null?void 0:v.edges)==null?void 0:y.map(m=>m.node))||[]},g=p.variants.filter(m=>!m.fabric_set&&!m.base_set&&!m.color_swatch&&!m.material_info&&!m.microd_name&&!m.product_measurement&&!m.ship_message);if(g.length>0){const m=g.map(_=>lN(_.id).then(S=>({variantId:_.id,metafields:S}))),b=await Promise.all(m);p.variants=p.variants.map(_=>{const S=b.find(k=>k.variantId===_.id);return S!=null&&S.metafields?{..._,fabric_set:S.metafields.fabric_set||_.fabric_set,base_set:S.metafields.base_set||_.base_set,color_swatch:S.metafields.color_swatch||_.color_swatch,material_info:S.metafields.material_info||_.material_info,microd_name:S.metafields.microd_name||_.microd_name,product_measurement:S.metafields.product_measurement||_.product_measurement,ship_message:S.metafields.ship_message||_.ship_message}:_})}a(p)}catch(w){console.error("[useProductByHandleAxios] Error fetching product:",w),i(w)}finally{r(!1)}})()},[e]),{loading:t,error:n,product:s}},b0=({productHandle:e,shape:t="circle",size:r="medium",showLabel:n=!0,maxSwatches:i=5,displayMode:s="group"})=>{const{loading:a,error:o,product:l}=Ul(e),c=E.useMemo(()=>{if(!(l!=null&&l.variants))return[];console.log("[ProductSwatchesByHandleAxios] Processing variants:",{productHandle:e,variantsCount:l.variants.length,firstVariant:l.variants[0]});const p=new Map;
842return l.variants.forEach((g,m)=>{var _,S,k,N,R;const b=(_=g.selectedOptions)==null?void 0:_.find(P=>P.name==="Color");if(b){const P=b.value,H=(S=g.fabric_set)==null?void 0:S.value;m<3&&console.log(`[ProductSwatchesByHandleAxios] Variant ${m}:`,{color:P,fabric_set:g.fabric_set,color_swatch:g.color_swatch,material_info:g.material_info}),p.has(P)||p.set(P,{name:P,value:P,image:(k=g.image)==null?void 0:k.url,fabricSet:H,available:g.availableForSale,variantId:g.id,sku:g.sku,colorSwatch:(N=g.color_swatch)==null?void 0:N.value,materialInfo:(R=g.material_info)==null?void 0:R.value})}}),Array.from(p.values())},[l]),u=E.useMemo(()=>{var g;const p=(g=l?.metafields)==null?void 0:g.find(m=>m.namespace==="global"&&m.key==="variant_color_order");if(!(p!=null&&p.value))return c;try{const m=JSON.parse(p.value);return c.sort((b,_)=>{const S=m.indexOf(b.name),k=m.indexOf(_.name);return S===-1&&k===-1?0:S===-1?1:k===-1?-1:S-k})}catch(m){return console.error("[ProductSwatchesByHandleAxios] Error parsing color order:",m),c}},[c,l]),f=E.useCallback(p=>{if(!(p!=null&&p.variantId))return;const g=typeof p.variantId=="string"?p.variantId:String(p.variantId),m=g.match(/(\d+)$/),b=m?m[1]:g,_=document.querySelector('input[name="id"].product-variant-id');_?(_.value=b,console.log("\u{1F527} [SwatchesByHandle] Updated hidden input with variant ID:",b)):console.warn('\u26A0\uFE0F [SwatchesByHandle] Hidden input not found: input[name="id"].product-variant-id')},[]),h=E.useCallback(p=>{if(!(p!=null&&p.sku))return;console.log("\u{1F3F7}\uFE0F [SwatchesByHandle] Updating SKU element with:",p.sku);const g=[".product-sku",".variant-sku",".product__sku","[data-sku]",".sku-value","#product-sku"];let m=null;for(const b of g)if(m=document.querySelector(b),m)break;m?(m.textContent=p.sku,console.log("\u{1F3F7}\uFE0F [SwatchesByHandle] Updated SKU element with:",p.sku)):console.warn("\u26A0\uFE0F [SwatchesByHandle] SKU element not found. Tried selectors:",g)},[]),v=E.useCallback(p=>{console.log("\u{1F6D2} [SwatchesByHandle] updateAddToCartButton called with variant:",p);const g=document.querySelector('button[name="add"]')||document.querySelector("#ProductSubmitButton-template--24071040630818__main")||document.querySelector(".product-form__submit");if(!g){console.warn("\u26A0\uFE0F [SwatchesByHandle] Add to cart button not found");return}const m=g.querySelector("span"),b=p?.available||p?.availableForSale;console.log("\u{1F6D2} [SwatchesByHandle] Button found:",g,"Available:",b),b?(g.disabled=!1,g.classList.remove("disabled"),m&&(m.textContent="Add to cart"),console.log("\u{1F6D2} [SwatchesByHandle] Button set to available")):(g.disabled=!0,g.classList.add("disabled"),m&&(m.textContent="Sold out"),console.log("\u{1F6D2} [SwatchesByHandle] Button set to sold out"))},[]),y=E.useCallback((p,g)=>{if(!window.history)return;const m=new URL(window.location);if(p&&m.searchParams.set("fabric",p),g.variantId){const b=typeof g.variantId=="string"?g.variantId:String(g.variantId),_=b.match(/(\d+)$/),S=_?_[1]:b;m.searchParams.set("variant_id",S)}window.history.replaceState({},"",m.toString()),console.log("\u{1F517} [SwatchesByHandle] URL updated to:",m.toString()),f(g),h(g),v(g)},[f,h,v]),w=E.useCallback((p,g,m)=>{console.log("\u{1F50D} [SwatchesByHandle] Swatch selected:",{optionName:p,color:g,swatchData:m});const b=u.find(_=>_.name===g);b?(console.log("\u2705 [SwatchesByHandle] Found variant for color:",b),y(g,b)):console.warn("\u274C [SwatchesByHandle] No variant found for color:",g)},[u,y]);if(a&&console.log(`[ProductSwatchesByHandleAxios] Loading product: ${e}`),o)return console.error(`[ProductSwatchesByHandleAxios] Error loading product ${e}:`,o),null;if(!l)return console.warn(`[ProductSwatchesByHandleAxios] No product found for handle: ${e}`),null;if(u.length===0)return console.warn(`[ProductSwatchesByHandleAxios] No color variants found for product: ${e}`),null;console.log("[ProductSwatchesByHandleAxios] Product loaded:",{handle:e,title:l.title,colorVariants:u.map(p=>({color:p.name,fabricSet:p.fabricSet,available:p.available}))});const x=u.map(p=>({color:p.name,label:p.name,image:p.image,available:p.available,variantId:p.variantId,sku:p.sku,fabricSet:p.fabricSet,colorSwatch:p.colorSwatch,materialInfo:p.materialInfo}));return s==="inline"?d.jsx(y0,{swatches:x,shape:t,size:r,maxSwatches:i,productHandle:e,onSwatchSelect:w}):d.jsx("div",{className:"product-swatches-by-handle","data-product-handle":e,children:d.jsxs("div",{className:"product-swatches-list",children:[x.slice(0,i).map(p=>d.jsx("div",{className:`product-swatch product-swatch--${t} product-swatch--${r}`,onClick:()=>w("Color",p.color,p),style:{backgroundImage:p.image?`url(${p.image})`:"none",backgroundColor:p.image?"transparent":"#f0f0f0",cursor:"pointer",width:r==="small"?"30px":r==="large"?"50px":"40px",height:r==="small"?"30px":r==="large"?"50px":"40px",borderRadius:t==="circle"?"50%":"4px",border:"2px s
842olid #ddd",margin:"4px",display:"inline-block",backgroundSize:"cover",backgroundPosition:"center"},title:p.label,children:!p.image&&d.jsx("span",{style:{fontSize:"10px",color:"#666",display:"block",textAlign:"center",lineHeight:r==="small"?"26px":r==="large"?"46px":"36px"},children:p.color.substring(0,2)})},p.color)),n&&x.length>i&&d.jsxs("span",{className:"swatches-more",children:["+",x.length-i," more"]})]})})},x0=(e,t={},r={})=>{const[n,i]=E.useState(null),[s,a]=E.useState("All"),o=E.useMemo(()=>{var x,p;if(!((x=e?.variants)!=null&&x.edges))return!1;const w=(p=e.variants.edges[0])==null?void 0:p.node;return w?.fabric_set&&w.fabric_set.length>0},[e]),{availableFabrics:l,availableBases:c,inStockFabrics:u,inStockBases:f}=E.useMemo(()=>{var m;if(!o||!((m=e?.variants)!=null&&m.edges))return{availableFabrics:{},availableBases:{},inStockFabrics:[],inStockBases:[]};const w={},x={},p=[],g=[];return e.variants.edges.forEach(({node:b})=>{b.fabric_set&&b.fabric_set.forEach(_=>{w[_]=w[_]||{inStockWith:[],variantIds:[],matchedBases:[]},w[_].variantIds.push(b.id),b.title.includes("InStock")?(w[_].inStockWith=Array.from(new Set([...b.base_set,...w[_].inStockWith])),p.includes(_)||p.push(_)):w[_].matchedBases=Array.from(new Set([...b.base_set,...w[_].matchedBases]))}),b.base_set&&b.base_set.forEach(_=>{x[_]=x[_]||{inStockWith:[],variantIds:[],matchedFabrics:[]},x[_].variantIds.push(b.id),b.title.includes("InStock")?(x[_].inStockWith=Array.from(new Set([...b.fabric_set,...x[_].inStockWith])),g.includes(_)||g.push(_)):x[_].matchedFabrics=Array.from(new Set([...b.fabric_set,...x[_].matchedFabrics]))})}),{availableFabrics:w,availableBases:x,inStockFabrics:p.sort(),inStockBases:g.sort()}},[e,o]),h=E.useMemo(()=>{var w;if(!o||!t.base||!t.fabric)return[];if(n)return u;{let x=((w=c[t.base])==null?void 0:w.matchedFabrics)||[];return s!=="All"&&(x=x.filter(p=>{const g=r[p],m=g?.fabric_type;return s==="All"||s===m})),x.sort()}},[o,t,n,s,c,u,r]),v=E.useMemo(()=>{var w,x;return!o||!t.base||!t.fabric?[]:n?f:((x=(w=l[t.fabric])==null?void 0:w.matchedBases)==null?void 0:x.sort())||[]},[o,t,n,l,f]),y=E.useMemo(()=>{var x;if(!o||!((x=e?.variants)!=null&&x.edges))return null;const w=e.variants.edges.map(p=>p.node);return w.find(p=>{var g,m;return((g=p.fabric_set)==null?void 0:g.includes(t.fabric))&&((m=p.base_set)==null?void 0:m.includes(t.base))&&p.title.includes("InStock")===n})||w[0]},[o,e,t,n]);return{isCustomizable:o,selectedInStock:n,setSelectedInStock:i,selectedFabricType:s,setSelectedFabricType:a,availableFabrics:l,availableBases:c,inStockFabrics:u,inStockBases:f,visibleFabrics:h,visibleBases:v,currentVariant:y}},_0=(e,t={})=>{const{autoUpdate:r=!0,updateOnMount:n=!0,debounceMs:i=0,customProperties:s=null}=t,a=E.useCallback((h,v=null)=>{if(!h)return;const y=v||s;if(i>0){const w=setTimeout(()=>{tl(h,y)},i);return()=>clearTimeout(w)}else tl(h,y)},[i,s]);E.useEffect(()=>{r&&e&&a(e)},[e,r,a]),E.useEffect(()=>{n&&e&&a(e)},[]);const o=E.useCallback((h=e,v=null)=>{h&&a(h,v)},[e,a]),l=E.useCallback((h=e)=>{if(h){const{updateHiddenVariantInput:v}=require("../utils/dom-helpers");return v(h)}return!1},[e]),c=E.useCallback((h=e)=>{if(h){const{updateAddToCartButton:v}=require("../utils/dom-helpers");return v(h)}return!1},[e]),u=E.useCallback((h=e)=>{if(h){const{updatePriceDisplay:v}=require("../utils/dom-helpers");return v(h)}return!1},[e]),f=E.useCallback(h=>{const{updateCartProperties:v}=require("../utils/dom-helpers");return v(h)},[]);return{updateDOM:o,updateHiddenInput:l,updateAddToCart:c,updatePrice:u,updateProperties:f,selectedVariant:e}},Yf=(e={},t={})=>{const{autoUpdate:r=!0,includeMicrodProduct:n=!0}=t,i=E.useMemo(()=>{console.log("\u{1F527} useCustomizerProperties - Calculating cartProperties"),console.log(" - selectedOptions:",e),console.log(" - includeMicrodProduct:",n);const c={};if(e.fabric&&(c.fabric=e.fabric,console.log(" \u2705 Added fabric:",e.fabric)),e.base&&(c.base=e.base,console.log(" \u2705 Added base:",e.base)),n&&(e.fabric||e.base)){const u=[];e.fabric&&u.push(e.fabric),e.base&&u.push(e.base),c.microd_product=u.join(" - "),console.log(" \u2705 Added microd_product:",c.microd_product)}return console.log(" \u{1F4E6} Final cartProperties:",c),c},[e.fabric,e.base,n]),s=E.useMemo(()=>Object.keys(i).length>0,[i]),a=E.useCallback((c=null)=>g0(c||i),[i]),o=E.useCallback(()=>{const c=vi();return c?(c.querySelectorAll('input[data-customizer-property="true"]').forEach(f=>f.remove()),!0):!1},[]),l=E.useCallback(()=>{const c=vi(),u={};return c&&c.querySelectorAll('input[name^="properties["]').forEach(h=>{var y;const v=(y=h.name.match(/properties\[(.*?)\]/))==null?void 0:y[1];v&&h.value&&(u[v]=h.value)}),u},[]);return E.useEffect(()=>{r&&s&&a()},[r,s,a]),{cartProperties:i,updateProperties:a,clearProperties:o,getCurrentProperties:l,hasProperties:s}},cN=({productHandle:e,selectedOptions:t={},onOptionChange:r,showLabels:n=!1,shape:i="circle",size:s="medium",maxVisible:a=8,showMore:o=!0,className:l=""})=>{const{product:c}=Ul(e),{swatches:u}
842=Er(),[f,h]=E.useState(!1),[v,y]=E.useState(!1),{isCustomizable:w,selectedInStock:x,setSelectedInStock:p,selectedFabricType:g,setSelectedFabricType:m,visibleFabrics:b,visibleBases:_,currentVariant:S}=x0(c,t,u),{cartProperties:k,updateProperties:N,hasProperties:R}=Yf(t,{autoUpdate:!1,includeMicrodProduct:!0});if(_0(S,{autoUpdate:!0,customProperties:k}),E.useEffect(()=>{if(console.log("\u{1F504} CustomizableProductSwatches - Properties/Variant changed"),console.log(" - hasProperties:",R),console.log(" - currentVariant:",S?.id),console.log(" - cartProperties:",k),R&&S){console.log("\u2728 Calling updateProperties...");const C=N();console.log("\u2728 updateProperties result:",C)}else R||console.log("\u26A0\uFE0F No properties to update"),S||console.log("\u26A0\uFE0F No current variant")},[k,R,N,S]),!w)return null;const P=C=>{r&&r("fabric",C)},H=C=>{r&&r("base",C)},G=()=>{p(!x)},Q=C=>{m(C.target.value)},U=f?b:b.slice(0,a),V=v?_:_.slice(0,a),A=b.length>a,D=_.length>a;return d.jsxs("div",{className:`customizable-product-swatches ${l}`,children:[d.jsx("div",{className:"customizable-product-swatches__in-stock",children:d.jsxs("label",{className:"customizable-product-swatches__label",children:[d.jsx("input",{type:"checkbox",checked:x,onChange:G,className:"customizable-product-swatches__checkbox"}),"In Stock Only"]})}),d.jsx("div",{className:"customizable-product-swatches__fabric-type",children:d.jsxs("label",{className:"customizable-product-swatches__label",children:["Fabric Type:",d.jsxs("select",{value:g,onChange:Q,className:"customizable-product-swatches__select",children:[d.jsx("option",{value:"All",children:"All Types"}),d.jsx("option",{value:"cotton",children:"Cotton"}),d.jsx("option",{value:"linen",children:"Linen"}),d.jsx("option",{value:"silk",children:"Silk"}),d.jsx("option",{value:"polyester",children:"Polyester"}),d.jsx("option",{value:"wool",children:"Wool"})]})]})}),b.length>0&&d.jsxs("div",{className:"customizable-product-swatches__section",children:[d.jsxs("h3",{className:"customizable-product-swatches__section-title",children:["Fabric (",b.length,")"]}),d.jsx("div",{className:"customizable-product-swatches__swatches",children:U.map(C=>{const T=u[C],j=t.fabric===C;return d.jsx(Pn,{color:C,swatch:T,selected:j,onClick:()=>P(C),shape:i,size:s,showLabel:n},C)})}),A&&o&&d.jsx("button",{className:"customizable-product-swatches__toggle",onClick:()=>h(!f),type:"button",children:f?"Show Less":`Show ${b.length-a} More`})]}),_.length>0&&d.jsxs("div",{className:"customizable-product-swatches__section",children:[d.jsxs("h3",{className:"customizable-product-swatches__section-title",children:["Base (",_.length,")"]}),d.jsx("div",{className:"customizable-product-swatches__swatches",children:V.map(C=>{const T=u[C],j=t.base===C;return d.jsx(Pn,{color:C,swatch:T,selected:j,onClick:()=>H(C),shape:i,size:s,showLabel:n},C)})}),D&&o&&d.jsx("button",{className:"customizable-product-swatches__toggle",onClick:()=>y(!v),type:"button",children:v?"Show Less":`Show ${_.length-a} More`})]}),(t.fabric||t.base)&&d.jsx("div",{className:"customizable-product-swatches__selected-info",children:d.jsxs("small",{children:["Selected: ",t.fabric&&`Fabric: ${t.fabric}`,t.fabric&&t.base&&" | ",t.base&&`Base: ${t.base}`,x&&" (In Stock)"]})}),!1]})},Bl=({handle:e,className:t="",showImage:r=!0,showTitle:n=!0,showPrice:i=!0,showSwatches:s=!0,linkToProduct:a=!0,swatchSize:o="small",swatchShape:l="circle",maxSwatchesVisible:c=4,showSwatchLabels:u=!1,filterByFabricType:f=null,sortBy:h="name"})=>{const[v,y]=E.useState({}),[w,x]=E.useState(null),{loading:p,error:g,data:m}=Sr(Pl,{variables:{handle:e},skip:!e}),{variants:b,colorOption:_,availableColors:S}=E.useMemo(()=>{var j,L;if(!(m!=null&&m.product))return{variants:[],colorOption:null,availableColors:[]};const A=m.product,D=((j=A.variants)==null?void 0:j.nodes)||[],C=(L=A.options)==null?void 0:L.find(M=>M.name.toLowerCase()==="color"),T=C?[...new Set(D.map(M=>{var B,z;return(z=(B=M.selectedOptions)==null?void 0:B.find(X=>X.name===C.name))==null?void 0:z.value}).filter(Boolean))]:[];return{variants:D,colorOption:C,availableColors:T}},[m?.product]),k=E.useMemo(()=>
842{if(!b.length||!_)return null;const A=v[_.name];return A&&b.find(D=>{var C;return(C=D.selectedOptions)==null?void 0:C.some(T=>T.name===_.name&&T.value===A)})||b[0]},[b,_,v]);jd.useEffect(()=>{x(k)},[k]);const N=(A,D,C)=>{y(T=>({...T,[A]:D}))},R=()=>{var A;return w!=null&&w.image?w.image:(A=m?.product)==null?void 0:A.featuredImage},P=()=>{var A,D;return w!=null&&w.price?w.price:(D=(A=m?.product)==null?void 0:A.priceRange)==null?void 0:D.minVariantPrice};if(p)return d.jsxs("div",{className:`product-card-with-swatches loading ${t}`,children:[r&&d.jsx("div",{className:"product-card__image-placeholder"}),d.jsxs("div",{className:"product-card__content",children:[n&&d.jsx("div",{className:"product-card__title-placeholder"}),i&&d.jsx("div",{className:"product-card__price-placeholder"}),s&&d.jsx("div",{className:"product-card__swatches-placeholder"})]})]});if(g)return d.jsx("div",{className:`product-card-with-swatches error ${t}`,children:d.jsx("p",{children:"Error loading product"})});if(!(m!=null&&m.product))return d.jsx("div",{className:`product-card-with-swatches not-found ${t}`,children:d.jsx("p",{children:"Product not found"})});const{product:H}=m,{title:G}=H,Q=R(),U=P(),V=()=>d.jsxs(d.Fragment,{children:[r&&Q&&d.jsxs("div",{className:"product-card__image",children:[d.jsx("img",{src:Q.url,alt:Q.altText||G,width:Q.width,height:Q.height,loading:"lazy"}),w&&w!==b[0]&&d.jsx("div",{className:"product-card__image-indicator",children:d.jsx("span",{children:"\u2713"})})]}),d.jsxs("div",{className:"product-card__content",children:[s&&_&&S.length>0&&d.jsx("div",{className:"product-card__swatches",children:d.jsx(Rl,{optionName:_.name,selectedValue:v[_.name],onSwatchSelect:N,showLabels:u,shape:l,size:o,maxVisible:c,showMore:!1,filterByFabricType:f,sortBy:h})}),n&&d.jsx("h3",{className:"product-card__title",children:G}),i&&U&&d.jsxs("p",{className:"product-card__price",children:[U.amount," ",U.currencyCode,w?.compareAtPrice&&d.jsxs("span",{className:"product-card__compare-price",children:[w.compareAtPrice.amount," ",w.compareAtPrice.currencyCode]})]})]})]});return a?d.jsx("div",{className:`product-card-with-swatches ${t}`,children:d.jsx("a",{href:`/products/${e}`,className:"product-card__link",children:d.jsx(V,{})})}):d.jsx("div",{className:`product-card-with-swatches ${t}`,children:d.jsx(V,{})})},S0=({handle:e,className:t="",swatchSize:r="medium",swatchShape:n="circle",maxSwatchesVisible:i=8,showSwatchLabels:s=!0,filterByFabricType:a=null,sortBy:o="name"})=>{const[l,c]=E.useState({}),[u,f]=E.useState(null),[h,v]=E.useState(1),[y,w]=E.useState(0),{loading:x,error:p,data:g}=Sr(Pl,{variables:{handle:e},skip:!e}),{swatches:m}=Er();console.log(g,p),x0(g?.product,l,m);const{product:b,variantsList:_,imagesList:S,colorOption:k,availableColors:N,currentImages:R}=E.useMemo(()=>{var le,xe,jt,Jt,ht;if(!(g!=null&&g.product))return{product:null,variantsList:[],imagesList:[],colorOption:null,availableColors:[],currentImages:[]};const Z=g.product,q=((xe=(le=Z.variants)==null?void 0:le.edges)==null?void 0:xe.map(ye=>ye.node))||[],F=((Jt=(jt=Z.images)==null?void 0:jt.edges)==null?void 0:Jt.map(ye=>ye.node))||[],K=(ht=Z.options)==null?void 0:ht.find(ye=>ye.name.toLowerCase()==="color"),oe=K?[...new Set(q.map(ye=>{var on,kr;return(kr=(on=ye.selectedOptions)==null?void 0:on.find(Yt=>Yt.name===K.name))==null?void 0:kr.value}).filter(Boolean))]:[];return{product:Z,variantsList:q,imagesList:F,colorOption:K,availableColors:oe,currentImages:u!=null&&u.image?[u.image,...F.filter(ye=>ye.id!==u.image.id)]:F}},[g?.product,u]),P=E.useMemo(()=>_.length?Object.keys(l).length===0?_[0]:_.find(Z=>{var q;return(q=Z.selectedOptions)==null?void 0:q.every(F=>l[F.name]===F.value)})||_[0]:null,[_,l]);E.useEffect(()=>{f(P),w(0)},[P]);const H=(Z,q,F)=>{c(K=>({...K,[Z]:q}))},G=Z=>{w(Z)},Q=()=>R.length===0?null:R[y]||R[0],U=()=>{var Z;return u!=null&&u.price?u.price:(Z=b?.priceRange)==null?void 0:Z.minVariantPrice},V=()=>{var Z;return u!=null&&u.compareAtPrice?u.compareAtPrice:(Z=b?.compareAtPriceRange)==null?void 0:Z.minVariantPrice},A=()=>{console.log("Adding to cart:",{variant:u,quantity:h,selectedOptions:l})},D=Z=>Z?`${Z.amount} ${Z.currencyCode}`:"";if(x)return d.jsx("div",{className:`product-detail-with-swatches loading ${t}`,children:d.jsx("div",{className:"product-detail__skeleton",children:d.jsxs("div",{className:"product-detail__c
842ontent-skeleton",children:[d.jsx("div",{className:"product-detail__title-skeleton"}),d.jsx("div",{className:"product-detail__price-skeleton"}),d.jsx("div",{className:"product-detail__swatches-skeleton"}),d.jsx("div",{className:"product-detail__description-skeleton"}),d.jsx("div",{className:"product-detail__button-skeleton"})]})})});if(p)return d.jsx("div",{className:`product-detail-with-swatches error ${t}`,children:d.jsxs("div",{className:"product-detail__error",children:[d.jsx("h2",{children:"Error loading product"}),d.jsx("p",{children:p.message})]})});if(!b)return d.jsx("div",{className:`product-detail-with-swatches not-found ${t}`,children:d.jsxs("div",{className:"product-detail__not-found",children:[d.jsx("h2",{children:"Product not found"}),d.jsx("p",{children:"The requested product could not be found."})]})});const{title:C,description:T,descriptionHtml:j,vendor:L,productType:M,tags:B}=b,z=Q(),X=U(),ce=V();return d.jsx("div",{className:`product-detail-with-swatches ${t}`,children:d.jsxs("div",{className:"product-detail__container",children:[d.jsxs("div",{className:"product-detail__media",children:[z&&d.jsxs("div",{className:"product-detail__main-image",children:[d.jsx("img",{src:z.url,alt:z.altText||C,width:z.width,height:z.height,className:"product-detail__image"}),u&&u!==_[0]&&d.jsx("div",{className:"product-detail__variant-indicator",children:d.jsx("span",{children:"\u2713 Variant Selected"})})]}),R.length>1&&d.jsx("div",{className:"product-detail__gallery",children:R.slice(0,6).map((Z,q)=>d.jsx("button",{className:`product-detail__thumbnail ${y===q?"selected":""}`,onClick:()=>G(q),children:d.jsx("img",{src:Z.url,alt:Z.altText||C,width:Z.width,height:Z.height,className:"product-detail__thumbnail-image"})},Z.id))})]}),d.jsxs("div",{className:"product-detail__info",children:[d.jsxs("div",{className:"product-detail__header",children:[L&&d.jsx("p",{className:"product-detail__vendor",children:L}),d.jsx("h1",{className:"product-detail__title",children:C}),d.jsxs("div",{className:"product-detail__price",children:[X&&d.jsx("span",{className:"product-detail__current-price",children:D(X)}),ce&&d.jsx("span",{className:"product-detail__compare-price",children:D(ce)})]})]}),d.jsxs("div",{className:"product-detail__swatches",children:[d.jsx(cN,{product:b,selectedOptions:l,onOptionChange:H,showLabels:s,shape:n,size:r,maxVisible:i,showMore:!0}),d.jsx(Hf,{product:b,selectedOptions:l,onOptionChange:H,showLabels:s,shape:n,size:r,maxVisible:i,showMore:!0,filterByFabricType:a,sortBy:o})]}),b.options&&b.options.length>0&&d.jsx("div",{className:"product-detail__options",children:b.options.filter(Z=>Z.name.toLowerCase()!=="color").map(Z=>d.jsxs("div",{className:"product-detail__option",children:[d.jsx("label",{className:"product-detail__option-label",children:Z.name}),d.jsx("div",{className:"product-detail__option-values",children:Z.values.map(q=>{var K;const F=(K=u?.selectedOptions)==null?void 0:K.some(oe=>oe.name===Z.name&&oe.value===q);return d.jsx("button",{className:`product-detail__option-value ${F?"selected":""}`,onClick:()=>H(Z.name,q),children:q},q)})})]},Z.id))}),d.jsxs("div",{className:"product-detail__quantity",children:[d.jsx("label",{className:"product-detail__quantity-label",children:"Quantity"}),d.jsxs("div",{className:"product-detail__quantity-selector",children:[d.jsx("button",{className:"product-detail__quantity-btn",onClick:()=>v(Math.max(1,h-1)),children:"-"}),d.jsx("input",{type:"number",value:h,onChange:Z=>v(Math.max(1,parseInt(Z.target.value)||1)),className:"product-detail__quantity-input",min:"1"}),d.jsx("button",{className:"product-detail__quantity-btn",onClick:()=>v(h+1),children:"+"})]})]}),d.jsx("div",{className:"product-detail__actions",children:d.jsx("button",{className:"product-detail__add-to-cart",onClick:A,disabled:!(u!=null&&u.availableForSale),children:u!=null&&u.availableForSale?"Add to Cart":"Out of Stock"})}),T&&d.jsxs("div",{className:"product-detail__description",children:[d.jsx("h3",{children:"Description"}),d.jsx("div",{className:"product-detail__description-content",dangerouslySetInnerHTML:{__html:j||T}})]}),d.jsxs("div",{className:"product-detail__meta",children:[M&&d.jsxs("p",{className:"product-detail__type",children:[d.jsx("strong",{children:"Type:"})," ",M]}),B&&B.length>0&&d.jsxs("p",{className:"product-detail__tags",children:[d.jsx("strong",{children:"Tags:"}
842)," ",B.join(", ")]})]})]})]})})},E0=({first:e=12,className:t="",showLoadMore:r=!0,collectionHandle:n=null,showSwatches:i=!0,swatchSize:s="small",swatchShape:a="circle",maxSwatchesVisible:o=4,showSwatchLabels:l=!1,filterByFabricType:c=null,sortBy:u="name",columns:f=4,gap:h=20,showImage:v=!0,showTitle:y=!0,showPrice:w=!0,linkToProduct:x=!0})=>{var Q,U,V;const[p,g]=E.useState(!0),[m,b]=E.useState(null),{loading:_,error:S,data:k,fetchMore:N}=Sr(Il,{variables:{first:e,after:m,collectionHandle:n},notifyOnNetworkStatusChange:!0}),R=()=>{var A,D;(D=(A=k?.products)==null?void 0:A.pageInfo)!=null&&D.hasNextPage&&N({variables:{after:k.products.pageInfo.endCursor}}).then(C=>{g(C.data.products.pageInfo.hasNextPage)})},P={display:"grid",gridTemplateColumns:`repeat(${f}, 1fr)`,gap:`${h}px`,width:"100%"};if(_&&!k)return d.jsx("div",{className:`product-grid-with-swatches loading ${t}`,children:d.jsx("div",{className:"product-grid__items",style:P,children:Array.from({length:e}).map((A,D)=>d.jsxs("div",{className:"product-grid__item-skeleton",children:[d.jsx("div",{className:"product-grid__image-skeleton"}),d.jsxs("div",{className:"product-grid__content-skeleton",children:[d.jsx("div",{className:"product-grid__title-skeleton"}),d.jsx("div",{className:"product-grid__price-skeleton"}),d.jsx("div",{className:"product-grid__swatches-skeleton"})]})]},D))})});if(S)return d.jsx("div",{className:`product-grid-with-swatches error ${t}`,children:d.jsxs("div",{className:"product-grid__error",children:[d.jsx("h3",{children:"Error loading products"}),d.jsx("p",{children:S.message}),d.jsx("button",{onClick:()=>window.location.reload(),className:"product-grid__retry-button",children:"Try Again"})]})});const H=((Q=k?.products)==null?void 0:Q.edges)||[],G=(V=(U=k?.products)==null?void 0:U.pageInfo)!=null&&V.hasNextPage?`${H.length}+`:H.length;return d.jsxs("div",{className:`product-grid-with-swatches ${t}`,children:[d.jsxs("div",{className:"product-grid__header",children:[d.jsxs("div",{className:"product-grid__info",children:[d.jsx("h2",{className:"product-grid__title",children:n?`Products in ${n}`:"Products"}),d.jsxs("p",{className:"product-grid__count",children:[G," products",c&&` (filtered by ${c})`]})]}),d.jsx("div",{className:"product-grid__controls",children:d.jsxs("div",{className:"product-grid__view-options",children:[d.jsx("button",{className:`product-grid__view-btn ${f===2?"active":""}`,onClick:()=>window.dispatchEvent(new CustomEvent("gridColumnsChange",{detail:2})),title:"2 columns",children:d.jsx("span",{children:"\u25FC\u25FC"})}),d.jsx("button",{className:`product-grid__view-btn ${f===3?"active":""}`,onClick:()=>window.dispatchEvent(new CustomEvent("gridColumnsChange",{detail:3})),title:"3 columns",children:d.jsx("span",{children:"\u25FC\u25FC\u25FC"})}),d.jsx("button",{className:`product-grid__view-btn ${f===4?"active":""}`,onClick:()=>window.dispatchEvent(new CustomEvent("gridColumnsChange",{detail:4})),title:"4 columns",children:d.jsx("span",{children:"\u25FC\u25FC\u25FC\u25FC"})})]})})]}),d.jsx("div",{className:"product-grid__items",style:P,children:H.map(({node:A})=>d.jsx(Bl,{handle:A.handle,className:"product-grid__item",showImage:v,showTitle:y,showPrice:w,showSwatches:i,linkToProduct:x,swatchSize:s,swatchShape:a,maxSwatchesVisible:o,showSwatchLabels:l,filterByFabricType:c,sortBy:u},A.id))}),r&&p&&d.jsx("div",{className:"product-grid__load-more",children:d.jsx("button",{onClick:R,disabled:_,className:"product-grid__load-more-button",children:_?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"product-grid__loading-spinner"}),"Loading..."]}):"Load More Products"})}),!p&&H.length>0&&d.jsx("div",{className:"product-grid__end",children:d.jsx("p",{children:"You've reached the end of the product list."})}),!_&&H.length===0&&d.jsxs("div",{className:"product-grid__empty",children:[d.jsx("h3",{children:"No products found"}),d.jsx("p",{children:c?`No products available with fabric type "${c}"`:"No products are currently available."})]})]})},k0=({first:e=8,className:t="",collectionHandle:r=null,showSwatches:n=!0,swatchSize:i="small",swatchShape:s="circle",maxSwatchesVisible:a=3,showSwatchLabels:o=!1,filterByF
842abricType:l=null,sortBy:c="name",autoplay:u=!0,autoplaySpeed:f=5e3,showNavigation:h=!0,showDots:v=!0,slidesToShow:y=4,slidesToScroll:w=1,showImage:x=!0,showTitle:p=!0,showPrice:g=!0,linkToProduct:m=!0})=>{var B;const[b,_]=E.useState(0),[S,k]=E.useState(u),N=E.useRef(null),R=E.useRef(null),{loading:P,error:H,data:G}=Sr(Il,{variables:{first:e,collectionHandle:r}}),Q=((B=G?.products)==null?void 0:B.edges)||[],U=Math.max(0,Q.length-y+1);E.useEffect(()=>(u&&S&&U>1&&(R.current=setInterval(()=>{_(z=>(z+w)%U)},f)),()=>{R.current&&clearInterval(R.current)}),[u,S,f,w,U]);const V=()=>{u&&(k(!1),R.current&&clearInterval(R.current))},A=()=>{u&&k(!0)},D=z=>{_(Math.max(0,Math.min(z,U-1)))},C=()=>{D(b+w)},T=()=>{D(b-w)},j=()=>{D(0)},L=()=>{D(U-1)},M=()=>{const z=100/y;return`translateX(-${b*z}%)`};return P?d.jsx("div",{className:`product-carousel-with-swatches loading ${t}`,children:d.jsx("div",{className:"product-carousel__skeleton",children:Array.from({length:y}).map((z,X)=>d.jsxs("div",{className:"product-carousel__item-skeleton",children:[d.jsx("div",{className:"product-carousel__image-skeleton"}),d.jsxs("div",{className:"product-carousel__content-skeleton",children:[d.jsx("div",{className:"product-carousel__title-skeleton"}),d.jsx("div",{className:"product-carousel__price-skeleton"}),d.jsx("div",{className:"product-carousel__swatches-skeleton"})]})]},X))})}):H?d.jsx("div",{className:`product-carousel-with-swatches error ${t}`,children:d.jsxs("div",{className:"product-carousel__error",children:[d.jsx("h3",{children:"Error loading products"}),d.jsx("p",{children:H.message})]})}):Q.length===0?d.jsx("div",{className:`product-carousel-with-swatches empty ${t}`,children:d.jsxs("div",{className:"product-carousel__empty",children:[d.jsx("h3",{children:"No products found"}),d.jsx("p",{children:"No products are currently available for this carousel."})]})}):d.jsxs("div",{className:`product-carousel-with-swatches ${t}`,onMouseEnter:V,onMouseLeave:A,children:[d.jsxs("div",{className:"product-carousel__header",children:[d.jsxs("div",{className:"product-carousel__info",children:[d.jsx("h2",{className:"product-carousel__title",children:r?`${r} Products`:"Featured Products"}),d.jsxs("p",{className:"product-carousel__count",children:[Q.length," products",l&&` (filtered by ${l})`]})]}),h&&U>1&&d.jsxs("div",{className:"product-carousel__controls",children:[d.jsx("button",{className:"product-carousel__control-btn product-carousel__control-btn--prev",onClick:T,disabled:b===0,"aria-label":"Previous slide",children:"\u2039"}),d.jsx("button",{className:"product-carousel__control-btn product-carousel__control-btn--next",onClick:C,disabled:b>=U-1,"aria-label":"Next slide",children:"\u203A"})]})]}),d.jsx("div",{className:"product-carousel__container",children:d.jsx("div",{ref:N,className:"product-carousel__track",style:{transform:M()},children:Q.map(({node:z})=>d.jsx("div",{className:"product-carousel__slide",style:{width:`${100/y}%`},children:d.jsx(Bl,{handle:z.handle,className:"product-carousel__item",showImage:x,showTitle:p,showPrice:g,showSwatches:n,linkToProduct:m,swatchSize:i,swatchShape:s,maxSwatchesVisible:a,showSwatchLabels:o,filterByFabricType:l,sortBy:c})},z.id))})}),v&&U>1&&d.jsx("div",{className:"product-carousel__dots",children:Array.from({length:U}).map((z,X)=>d.jsx("button",{className:`product-carousel__dot ${X===b?"active":""}`,onClick:()=>D(X),"aria-label":`Go to slide ${X+1}`},X))}),u&&U>1&&d.jsx("div",{className:"product-carousel__progress",children:d.jsx("div",{className:"product-carousel__progress-bar",style:{width:`${(b+1)/U*100}%`,transition:S?`width ${f}ms linear`:"none"}})}),d.jsxs("div",{className:"product-carousel__keyboard-nav",tabIndex:"-1",children:[d.jsx("button",{onClick:j,"aria-label":"Go to first slide",children:"First"}),d.jsx("button",{onClick:T,"aria-label":"Previous slide",children:"Previous"}),d.jsx("button",{onClick:C,"aria-label":"Next slide",children:"Next"}),d.jsx("button",{onClick:L,"aria-label":"Go to last slide",children:"Last"})]})]})},uN=e=>{if(!e||e.length===0)return[];const t=new Set;return e.forEach(r=>{var n;(n=r.fabric_set)!=null&&n.value&&r.fabric_set.value.split(",").map(s=>
842s.trim()).filter(Boolean).forEach(s=>t.add(s))}),Array.from(t).sort()},dN=e=>{if(!e||Object.keys(e).length===0)return[];const t=new Set;return Object.values(e).forEach(r=>{r.fabric_type&&t.add(r.fabric_type)}),Array.from(t).sort()},fN=e=>{const t={};if(!e||e.length===0)return t;e.forEach(n=>{var l,c;const i=(l=n?.fabric_set)==null?void 0:l.value,s=(c=n?.base_set)==null?void 0:c.value;if(!i||!s)return;const a=String(i).split(",").map(u=>u.trim()).filter(Boolean),o=String(s).split(",").map(u=>u.trim()).filter(Boolean);a.forEach(u=>{t[u]||(t[u]=new Set),o.forEach(f=>t[u].add(f))})});const r={};return Object.entries(t).forEach(([n,i])=>{r[n]=Array.from(i).sort()}),r},hN=(e,t)=>{if(!e||Object.keys(e).length===0)return{};if(t==="all")return e;const r={};return Object.entries(e).forEach(([n,i])=>{i.fabric_type===t&&(r[n]=i)}),r},pN=e=>{if(!e)return null;const t=e.split(" ");if(t.length<3)return null;const r=t[0],n=t[1],i=t[t.length-1],s=i.includes("/")?i.split("/")[1]:null,o=t.slice(2,-1).join(" ");return{referenceNumber:r,stockStatus:n,productName:o,fabricColor:s}},mN=(e,t)=>e.find(r=>(t[r]||[]).length>0)||null,gN=(e,t)=>e.length===0?null:mN(e,t)||e[0]||null,vN=e=>{if(!e||e.length===0)return[];const t=new Set;return e.forEach(r=>{var n;(n=r.base_set)!=null&&n.value&&r.base_set.value.split(",").map(s=>s.trim()).filter(Boolean).forEach(s=>t.add(s))}),Array.from(t).sort()},yN=(e,t)=>{if(!e||!t)return{};const r={};return Object.entries(t).forEach(([n,i])=>{i.fabric_base&&e.forEach(s=>{var a;i.fabric_base===s&&(r[s]={title:i.fabric_base,image:i.image,swatch_name:n,fabric_type:i.fabric_type,microd_name:((a=i.microd_name)==null?void 0:a.value)||i.microd_name})})}),r},wN=e=>{const{inStockVariants:t,customVariants:r,firstVariant:n,firstAvailableInStock:i,firstAvailableCustom:s,hasAvailableInStock:a}=E.useMemo(()=>{if(!(e!=null&&e.variants))return{inStockVariants:[],customVariants:[],firstVariant:null,firstAvailableInStock:null,firstAvailableCustom:null,hasAvailableInStock:!1};const o=[],l=[];
842e.variants.forEach(v=>{const y=pN(v.title);if(y){const w={...v,parsed:y};y.stockStatus.toLowerCase()==="instock"?o.push(w):y.stockStatus.toLowerCase()==="custom"&&l.push(w)}});const c=e.variants.find(v=>v.availableForSale)||e.variants[0],u=o.find(v=>v.availableForSale)||null,f=l.find(v=>v.availableForSale)||null,h=o.some(v=>v.availableForSale);return{inStockVariants:o,customVariants:l,firstVariant:c,firstAvailableInStock:u,firstAvailableCustom:f,hasAvailableInStock:h}},[e]);return{inStockVariants:t,customVariants:r,firstVariant:n,firstAvailableInStock:i,firstAvailableCustom:s,hasAvailableInStock:a}},bN=(e,t=null)=>{const[r,n]=E.useState(t),[i,s]=E.useState([]),a=E.useCallback(u=>{if(!u||u.id===r?.id)return;n(u),s(v=>[...v,u]),tl(u);const f=new CustomEvent("variant-state-change",{detail:{variant:u,previousVariant:r,product:e},bubbles:!0});document.dispatchEvent(f);const h=new CustomEvent("react-variant-change",{detail:{variant:u,productHandle:e?.handle},bubbles:!0});document.dispatchEvent(h)},[r,e]),o=E.useCallback(u=>e!=null&&e.variants?e.variants.find(f=>Object.entries(u).every(([h,v])=>{var y;if(h==="fabric"&&f.fabric_set)return f.fabric_set.value===v;if(h==="base"&&f.base_set)return f.base_set.value===v;if(f.options){const w=(y=e.options)==null?void 0:y.findIndex(x=>x.name.toLowerCase()===h.toLowerCase());if(w!==-1)return f.options[w]===v}return!1})):null,[e]),l=E.useCallback((u,f)=>e!=null&&e.variants?e.variants.find(v=>{var x,p;const y=!u||((x=v.fabric_set)==null?void 0:x.value)===u,w=!f||((p=v.base_set)==null?void 0:p.value)===f;return y&&w}):null,[e]),c=E.useCallback(()=>{var u,f,h,v,y,w;return r?{id:r.id,title:r.title,price:r.price,compareAtPrice:r.compare_at_price,available:r.available,fabric:(u=r.fabric_set)==null?void 0:u.value,fabricName:(f=r.fabric_set)==null?void 0:f.name,base:(h=r.base_set)==null?void 0:h.value,baseName:(v=r.base_set)==null?void 0:v.name,featuredMediaId:(y=r.featured_media)==null?void 0:y.id,mediaIds:((w=r.media)==null?void 0:w.map(x=>x.id))||[],sku:r.sku,barcode:r.barcode}:null},[r]);return E.useEffect(()=>{const u=f=>{const{variant:h}=f.detail;h&&h.id!==r?.id&&n(h)};return document.addEventListener("theme-variant-change",u),document.addEventListener("theme-variant-sync",u),()=>{document.removeEventListener("theme-variant-change",u),document.removeEventListener("theme-variant-sync",u)}},[r]),{selectedVariant:r,changeVariant:a,getVariantByOptions:o,detectVariantFromSwatches:l,getVariantInfo:c,variantHistory:i}},ql=(e,t="all")=>{const r=E.useRef(null),n=E.useMemo(()=>uN(e),[e]),i=E.useMemo(()=>vN(e),[e]),s=E.useMemo(()=>{if(!r.current)return!0;const w=r.current;return w.length!==n.length||!w.every((x,p)=>x===n[p])},[n]);E.useEffect(()=>{s&&(r.current=n)},[n,s]);const{swatches:a,loading:o,error:l,foundCount:c,totalRequested:u}=gk(n),f=E.useMemo(()=>yN(i,a),[i,a]),h=E.useMemo(()=>dN(a),[a]),v=E.useMemo(()=>hN(a,t),[a,t]),y=E.useMemo(()=>fN(e),[e]);return{allFabricValues:n,allBaseValues:i,fabricSwatches:a,baseImages:f,fabricTypes:h,filteredSwatches:v,basesByFabric:y,swatchesLoading:o,swatchesError:l,foundCount:c,totalRequested:u}},C0=(e,t={})=>{if(!e||typeof e!="string")return e;const{width:r,height:n,format:i="webp",quality:s,crop:a="center",scale:o=1}=t,l=new URL(e),c=r?Math.round(r*o):void 0,u=n?Math.round(n*o):void 0;return c&&l.searchParams.set("width",c),u&&l.searchParams.set("height",u),i&&l.searchParams.set("format",i),s&&l.searchParams.set("quality",s),a&&(c||u)&&l.searchParams.set("crop",a),l.toString()},xN=(e,t=[150,300,450,600],r={})=>e?t.map(n=>`${C0(e,{...r,width:n})} ${n}w`).join(", "):"",_N=()=>{const e=document.createElement("canvas");return e.width=1,e.height=1,e.toDataURL("image/webp").indexOf("image/webp")===0?"webp":"jpg"},SN=(e=10,t=10)=>{const r=document.createElement("canvas");r.width=e,r.height=t;const n=r.getContext("2d"),i=n.createLinearGradient(0,0,e,t);return i.addColorStop(0,"#f0f0f0"),i.addColorStop(1,"#e0e0e0"),n.fillStyle=i,n.fillRect(0,0,e,t),r.toDataURL("image/jpeg",.1)},EN=(e,t={})=>{const{threshold:r=.1,rootMargin:n="50px",placeholder:i=SN(),onLoad:s,onError:a}=t,[o,l]=E.useState(i),[c,u]=E.useState(null),[f,h]=E.useState(!0),[v,y]=E.useState(!1),[w,x]=E.useState(!1),p=E.useRef(null),g=E.useRef(null);return E.useEffect(()=>
842{if(!c||!("IntersectionObserver"in window)){l(e);return}return p.current=new IntersectionObserver(m=>{m.forEach(b=>{var _;b.isIntersecting&&(x(!0),(_=p.current)==null||_.disconnect())})},{threshold:r,rootMargin:n}),p.current.observe(c),()=>{var m;(m=p.current)==null||m.disconnect()}},[c,r,n,e]),E.useEffect(()=>{if(!w||!e)return;h(!0),y(!1);const m=new Image;return m.onload=()=>{l(e),h(!1),s?.()},m.onerror=()=>{y(!0),h(!1),a?.()},m.src=e,g.current=m,()=>{g.current&&(g.current.onload=null,g.current.onerror=null)}},[w,e,s,a]),{ref:u,src:o,isLoading:f,isError:v,isInView:w}};class kN{constructor(){this.metrics={totalImages:0,loadedImages:0,failedImages:0,totalLoadTime:0,imageSizes:[],loadTimes:[]},this.observers=new Map}startImageLoad(t){const r=performance.now();return(n=!0,i=0)=>{const s=performance.now()-r;this.metrics.totalImages++,n?(this.metrics.loadedImages++,this.metrics.totalLoadTime+=s,this.metrics.loadTimes.push(s),i>0&&this.metrics.imageSizes.push(i)):this.metrics.failedImages++}}getSummary(){const t=this.metrics.loadedImages>0?this.metrics.totalLoadTime/this.metrics.loadedImages:0,r=this.metrics.imageSizes.length>0?this.metrics.imageSizes.reduce((n,i)=>n+i,0)/this.metrics.imageSizes.length:0;return{totalImages:this.metrics.totalImages,loadedImages:this.metrics.loadedImages,failedImages:this.metrics.failedImages,successRate:this.metrics.totalImages>0?(this.metrics.loadedImages/this.metrics.totalImages*100).toFixed(2)+"%":"0%",averageLoadTime:`${t.toFixed(2)}ms`,averageImageSize:r>0?`${(r/1024).toFixed(2)}KB`:"unknown",totalLoadTime:`${this.metrics.totalLoadTime.toFixed(2)}ms`}}logSummary(){const t=this.getSummary();console.group("\u{1F5BC}\uFE0F Image Performance Summary"),console.table(t),console.groupEnd()}reset(){this.metrics={totalImages:0,loadedImages:0,failedImages:0,totalLoadTime:0,imageSizes:[],loadTimes:[]}}}const CN=new kN,Oi=({src:e,alt:t,width:r=150,height:n=150,className:i="",onClick:s,sizes:a="(max-width: 640px) 100vw, (max-width: 768px) 50vw, 33vw",quality:o=85,eager:l=!1,onLoad:c,onError:u})=>{const f=_N(),h=C0(e,{width:r,height:n,format:f,quality:o,crop:"center"}),v=xN(e,[150,300,450,600],{format:f,quality:o,crop:"center"}),y=E.useRef(null);E.useEffect(()=>(y.current=CN.startImageLoad(e),()=>{y.current&&y.current(!1)}),[e]);const{ref:w,src:x,isLoading:p}=EN(l?h:e,{placeholder:`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='%23f0f0f0'/%3E%3C/svg%3E`,onLoad:()=>{y.current&&(y.current(!0),y.current=null),c?.()},onError:()=>{y.current&&(y.current(!1),y.current=null),u?.()}}),g=l?h:x,m=!l&&p;return d.jsxs("div",{className:`optimized-swatch-image ${m?"is-loading":""}`,children:[d.jsx("img",{ref:l?null:w,src:`${g}&width=${r}`,srcSet:m?void 0:v,sizes:a,alt:t,width:r,height:n,loading:l?"eager":"lazy",decoding:"async",className:`${i} ${p?"opacity-0":"opacity-100"} transition-opacity duration-300`,onClick:s,onError:b=>{console.warn("Failed to load image:",e),b.target.src=`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='%23e0e0e0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='.3em' fill='%23999' font-family='sans-serif' font-size='14'%3ENo Image%3C/text%3E%3C/svg%3E`}}),m&&d.jsx("div",{className:"absolute inset-0 bg-gray-200 animate-pulse",style:{width:`${r}px`,height:`${n}px`}})]})},NN=({variants:e,onVariantSelect:t})=>{var w,x,p,g,m;const{fabricSwatches:r,baseImages:n}=ql(e),{swatches:i}=Er(),[s,a]=E.useState(null);if(!e||e.length===0)return d.jsx("div",{className:"customizable-product__tabs tw-flex tw-w-full tw-flex-col tw-gap-4",children:d.jsx("div",{className:"tw-flex tw-w-full tw-items-center tw-justify-center tw-py-8",children:d.jsx("p",{className:"tw-text-gray-500 tw-text-center",children:"No in-stock variants available"})})});const o=e.find(b=>b.availableForSale)||e[0]||{};r[(w=o.fabric_set)==null?void 0:w.value];const l=(g=(p=(x=o.base_set)==null?void 0:x.value)==null?void 0:p.split(",")[0])==null?void 0:g.trim(),c=n[l]||{},u=s||((m=o.fabric_set)==null?void 0:m.value)||Object.keys(r)[0],f=E.useMemo(()=>({fabric:u||"",base:l||""}),[u,l]);Yf(f,{autoUpdate:!0,includeMicrodProduct:!0});const h=E.useCallback(b=>{if(!(b!=null&&b.sku))return;const _=[".product-sku",".variant-sku",".product__sku","[data-sku]",".sku-value","#product-sku"];let S=null;for(const k of _)if(S=document.querySelector(k),S)break;S&&(S.textContent=b.sku)},[]),v=E.useCallback(b=>!e||e.length===0?null:e.find(_=>{var k,N;return(((N=(k=_.fabric_set)==null?void 0:k.value)==null?void 0:N.split(",").map(R=>R.trim()))||[]).includes(b)}),[e]),y=(b,_)=>{a(b),_&&(h(_),t&&t(_))};return d.jsx("div",{className:"customizable-product__tabs tw-flex tw-w-full tw-flex-col tw-gap-4",children:d.jsxs("div",{className:"tw-flex tw-w-full",children:[d.jsxs("div",{className:"customizable-product__tabs-item customizable-product__tab--color",children:[d.jsx("p",{className:"tw-text-[#1F1F1F] tw-uppercase",children:"Color:"}),d.jsx("span",{className:`active-customize-option ${u?"fabric-selected":""}`,children:u||"No options available"}),d.jsx("div",{className:"customize-swatch-container",children:Object.entries(r).length===0?d.jsx("div",{className:"tw-text-gray-500 tw-text-sm",children:"No fabric options available"}):Object.entries(r).map(([b,_],S)=>{const k=v(b),N=u===b;return d.jsx("div",{className:`customize-swatch-item tw-border tw-relative tw-overflow-hidden tw-cursor-pointer tw-transition-all tw-duration-200 ${N?"tw-border-black tw-border-2 swatch-active":"tw-border-gray-200 hover:tw-border-gray-400 hover:tw-shadow-sm"}`,title:b,onClick:()=>y(b,k),children:_.image&&d.jsx(Oi,{src:_.image.url,alt:b,width:150,height:150,className:`tw-w-full tw-h-auto tw-object-cover tw-cursor-pointer tw-transition-transform tw-duration-200 ${N?"tw-scale-110":"hover:tw-scale-105"}`,sizes:"(max-width: 640px) 33vw, (max-width: 768px) 25vw, 150px",eager:S<6})},b)})})]}),d.jsxs("div",{className:"customizable-product__tabs-item customizable-product__tab--base",children:[d.jsx("p",{className:"tw-text-[#1F1F1F] tw-uppercase",children:"Base Finish:"}),d.jsx("span",{className:`active-customize-option ${l?"base-selected":""}`,children:l||"No Base"}),d.jsx("div",{className:"customize-swatch-container",children:l?(()=>{const b=i[l]||c;return d.jsx("div",{className:"customize-swatch-item tw-w-[41px] tw-h-[41px] tw-flex tw-flex-col tw-items-center tw-gap-2 tw-cursor-pointer tw-relative tw-overflow-hidden tw-transition-all tw-duration-200 tw-border-black tw-border-2 tw-ring-2 tw-ring-gray-200 tw-bg-gray-50 base-active",title:l,children:b!=null&&b.image?d.jsx(Oi,{src:b.image.url,alt:l,width:64,height:64,className:"tw-w-16 tw-h-16 tw-object-cover tw-transition-transform tw-duration-200 tw-scale-105",sizes:"64px",eager:!0}):d.jsx("span",{className:"tw-text-[10px] tw-text-center tw-leading-tight tw-p-0.5",children:l})})})():d.jsx("div",{className:"customize-swatch-item-base-not-found tw-w-[41px] tw-h-[41px] tw-bg-[#F5F5F5] tw-border tw-border-gray-400 tw-border-solid"})})]})]})})},jN=(e,t)=>{const[r,n]=E.useState(null),i=E.useRef(!1);E.useEffect(()=>{const o=Object.keys(e);if(o.length===0){n(null),i.current=!1;return}const l=r&&o.includes(r);if(!i.current||!l){const c=gN(o,t);n(c),i.current=!1}},[e,t,r]);const s=E.useMemo(()=>r?t[r]||[]:[],[t,r]),a=E.useCallback(o=>{i.current=!0,n(o)},[]);return{selectedFabricName:r,setSelectedFabricName:n,basesForSelectedFabric:s,handleFabricSelect:a}},Xf=({onImageChange:e,autoUpdate:t=!0,targetElement:r=null}={})=>{const[n,i]=E.useState(!1),[s,a]=E.useState(null),o=E.useRef(0),l=E.useCallback(h=>{document.querySelectorAll("[data-image-main-react] img, .product__media img.product__modal-opener--image").forEach(y=>{h?(y.style.opacity="0.5",y.style.transition="opacity 0.3s"):y.style.opacity="1"})},[]),c=E.useCallback((h,v=!1)=>{var w,x;if(!h&&!v)return;if(console.log("\u{1F5BC}\uFE0F updateMainProductImages called with URL:",h),h){l(!1);const p=(_,S)=>{if(f0(S)){const k=_.getAttribute("src"),N=_.dataset.originalSrcset||_.getAttribute("srcset"),R=_.classList.contains(Ss);_.srcset&&(_.dataset.originalSrcset||(_.dataset.originalSrcset=_.srcset),_.removeAttribute("srcset")),_.classList.add(Ss),h0(_),_.onerror=()=>{_.onerror=null,console.warn("\u26A0\uFE0F Render image failed to load; keeping the previous image:",S),!(!k||k===S)&&(R||(_.classList.remove(Ss),el(_),N&&(_.srcset=N,delete _.dataset.originalSrcset)),_.src=k)},_.src=S}else{if(_.onerror=null,_.src=S,_.dataset.originalSrcset&&(_.srcset=_.dataset.originalSrcset,delete _.dataset.originalSrcset),_.srcset){const k=_.srcset.split(",").map(N=>{const[R,P]=N.trim().split(" "),H=R.match(/_\d+x\./);return H?`${S.replace(/(\.[^.]+)$/,H[0]+"$1")} ${P}`:`${S} ${P}`});_.srcset=k.join(", ")}_.classList.remove(Ss),el(_)}},g=[".product__media img.global-media-settings",".product__media .global-media-settings","media-gallery img.global-media-settings","media-gallery .product__media img.global-media-settings",".product__media[data-media-id] img","media-gallery .product__media[data-media-id]:first-child img",".product__media:first-child img.global-media-settings",".product__media img",".swiper-slide img","media-gallery .product__media:first-child img","media-gallery-vertical .product__media:first-child img",".product__media:first-child img",".swiper-slide:first-child img",".product__media-item:first-child img",".media:first-child img",".product__media-container:first-child img","[data-image-main-react] img",".thumbnail-list-vertical li:nth-child(1) img",".thumbnail-list li:nth-child(1) img",".product-card__image img",".product-card img",".product-item img",".product-grid-item img",".collection-
842product img",'img[alt*="product"]','img[class*="product"]','img[src*="products"]'];let m=!1;if(r){console.log("\u{1F3AF} Searching within target element:",r);for(const _ of g)if(!m){const S=r.querySelectorAll(_);if(console.log(`\u{1F50D} Selector "${_}" found ${S.length} images within target element`),S.length>0){const k=S[0];console.log("\u{1F4F8} First image in target:",{src:k.src,alt:k.alt,className:k.className,parentElement:(w=k.parentElement)==null?void 0:w.tagName}),k.src&&!k.src.includes("data:")&&!k.src.includes("placeholder")&&!k.src.includes("blank")&&(console.log(`\u2705 Updating image in target with selector: ${_}`),p(k,h),m=!0)}}}if(!m){for(const _ of g)if(!m){const S=document.querySelectorAll(_);if(console.log(`\u{1F50D} Selector "${_}" found ${S.length} images globally`),S.length>0){const k=S[0];console.log("\u{1F4F8} First image globally:",{src:k.src,alt:k.alt,className:k.className,parentElement:(x=k.parentElement)==null?void 0:x.tagName}),k.src&&!k.src.includes("data:")&&!k.src.includes("placeholder")&&!k.src.includes("blank")&&(console.log(`\u2705 Updating image globally with selector: ${_}`),p(k,h),m=!0)}}}console.log(`\u{1F3AF}
842 Image update result: ${m?"SUCCESS":"FAILED"}`);const b=new CustomEvent("product-image-change",{detail:{imageUrl:h},bubbles:!0});document.dispatchEvent(b),e&&e(h)}const y=new CustomEvent("react-media-change",{detail:{mediaId:"custom-image",imageUrl:h},bubbles:!0});document.dispatchEvent(y)},[l,e]),u=E.useCallback(async(h,v,y)=>{if(!y||!h||!v)return;i(!0),l(!0);const w=eN(y);if(!w){i(!1),l(!1);return}const x=XC(w,h,v);if(!x){i(!1),l(!1);return}const p=++o.current,g=await ZC(x);p===o.current&&(g?(c(x),a(x)):(l(!1),s&&c(s,!0)),i(!1))},[c,l,s]),f=E.useCallback(h=>{c(h)},[c]);return{updateMainProductImages:c,updateCustomizationImage:u,updateProductImage:f,isLoadingImage:n,lastValidImageUrl:s,showImageLoadingState:l}},ON=({variants:e,onVariantSelect:t,product:r})=>{const[n,i]=E.useState("all"),[s,a]=E.useState(null),[o,l]=E.useState(null),[c,u]=E.useState(!1),{swatches:f}=Er(),{updateCustomizationImage:h,isLoadingImage:v,lastValidImageUrl:y}=Xf(),{fabricTypes:w,filteredSwatches:x,basesByFabric:p,swatchesLoading:g}=ql(e,n),{selectedFabricName:m,basesForSelectedFabric:b,handleFabricSelect:_}=jN(x,p),S=E.useMemo(()=>({fabric:m||"",base:s||b[0]||""}),[m,s,b]),{cartProperties:k,updateProperties:N,hasProperties:R}=Yf(S,{autoUpdate:!1,includeMicrodProduct:!0});_0(null,{autoUpdate:!1});const P=E.useCallback(C=>{if(!(C!=null&&C.sku))return;console.log("\u{1F3F7}\uFE0F [TabCustomize] Updating SKU element with:",C.sku);const T=[".product-sku",".variant-sku",".product__sku","[data-sku]",".sku-value","#product-sku"];let j=null;for(const L of T)if(j=document.querySelector(L),j)break;j?(j.textContent=C.sku,console.log("\u{1F3F7}\uFE0F [TabCustomize] Updated SKU element with:",C.sku)):console.warn("\u26A0\uFE0F [TabCustomize] SKU element not found. Tried selectors:",T)},[]),H=E.useCallback(C=>{C&&(console.log("\u{1F4D1} [TabCustomize] Updating variant-dependent tabs for variant:",C.id),document.querySelectorAll('[data-variant-dependent="true"]').forEach(j=>{const L=j.getAttribute("data-metafield-key");j.getAttribute("data-metafield-namespace");const M=j.querySelector("[data-accordion-content]");if(!L||!M)return;const B=C[L],z=B?.value;if(console.log(`\u{1F4D1} [TabCustomize] Processing tab: ${L}`,{hasMetafield:!!B,value:z}),z&&z.trim()!=="")switch(L){case"product_measurement":M.innerHTML=`<ul>${z}</ul>`,console.log("\u{1F4CF} [TabCustomize] Updated Dimensions tab");break;case"ship_message":M.innerHTML=z,console.log("\u{1F69A} [TabCustomize] Updated Shipping & Returns tab");break;case"site_delivery_info":M.innerHTML=z,console.log("\u{1F4E6} [TabCustomize] Updated Site Delivery Info tab");break;default:M.innerHTML=z,console.log(`\u{1F4C4} [TabCustomize] Updated ${L} tab`)}else console.log(`\u2139\uFE0F [TabCustomize] No value for ${L} tab (tab remains visible)`)}),P(C))},[P]);E.useEffect(()=>{e&&e.length>0&&e[0]&&!o&&l(e[0])},[e,o]);const G=E.useCallback((C,T=null)=>!e||e.length===0?null:e.find(j=>{var z,X,ce,Z;const M=(((X=(z=j.fabric_set)==null?void 0:z.value)==null?void 0:X.split(",").map(q=>q.trim()))||[]).includes(C);let B=!0;return T&&(B=(((Z=(ce=j.base_set)==null?void 0:ce.value)==null?void 0:Z.split(",").map(F=>F.trim()))||[]).includes(T)),M&&B}),[e]),Q=E.useCallback(C=>{if(!C)return;H(C),document.querySelectorAll('input[name="id"]').forEach(L=>{if(C.id){const M=String(C.id).replace(/\D/g,"");L.value=M}});const j=new CustomEvent("variant:change",{detail:{variant:C},bubbles:!0});document.dispatchEvent(j)},[H]),U=(C,T)=>{if(!window.history)return;const j=new URL(window.location);j.searchParams.delete("fabric"),j.searchParams.delete("base"),j.searchParams.delete("variant_id"),j.searchParams.delete("variant"),C&&j.searchParams.set("fabric",C);const L=s||b[0]||"No Base";if(j.searchParams.set("base",L),T.id){const M=typeof T.id=="string"?T.id:String(T.id),B=M.match(/(\d+)$/),z=B?B[1]:M;j.searchParams.set("variant_id",z)}window.history.replaceState({},"",j.toString()),Q(T)};E.useEffect(()=>{if(m){const C=s||(b.length>0?b[0]:null),T=G(m,C);if(T)U(m,T),l(T),C&&h(m,C,T);else{const j=e?.find(L=>{var M;return(M=L.title)==null?void 0:M.toLowerCase().includes(m.toLowerCase())});j&&(U(m,j),l(j),C&&h(m,C,j))}}},[m,s,b,G,e,h]),E.useEffect(()=>{R&&o&&(N(),console.log("\u{1F3A8} [TabCustomize] Customizer properties updated:",k))},[k,R,N,o]),E.useEffect(()=>{const C=vi();if(!C)return;const T=C.querySelector('input[name="properties[_customization_image]"]');if(y)if(T)T.value=y;else{const j=document.createElement("input");j.type="hidden",j.name="properties[_customization_image]",j.value=y,j.dataset.customizationImage="true",C.appendChild(j)}else T&&T.remove()},[y]),E.useEffect(()=>{const C=vi(),T=document.querySelector(".product-form__submit");
842if(C)return v?(C.dataset.blockSubmit="true",T?.classList.add("is-loading-customization")):(delete C.dataset.blockSubmit,T?.classList.remove("is-loading-customization")),()=>{delete C.dataset.blockSubmit,T?.classList.remove("is-loading-customization")}},[v]),E.useEffect(()=>()=>{const C=vi(),T=C?.querySelector('input[name="properties[_customization_image]"]');T&&T.remove()},[]);const V=C=>{u(!0),i(C.target.value),setTimeout(()=>{u(!1)},100)},A=(C,T)=>{_(C);const j=p[C]||[],L=s&&j.includes(s)?s:null;a(L);const M=L||(j.length>0?j[0]:null),B=G(C,M);B&&(P(B),t&&t(B))},D=C=>{if(a(C),m){const T=G(m,C);T&&(P(T),U(m,T),t&&t(T))}};return d.jsx("div",{className:"customizable-product__tabs tw-flex tw-flex-col tw-gap-4",children:d.jsxs("div",{className:"tw-flex tw-flex-row tw-flex-wrap",children:[d.jsxs("div",{className:"customizable-product__tabs-item customizable-product__tab--fabric tw-w-full",children:[d.jsxs("p",{className:"tw-text-[#1F1F1F] tw-uppercase tw-mb-[10px]",children:["Fabric Type: ",d.jsx("span",{className:"active-customize-option",children:n})]}),d.jsxs("select",{id:"fabric_type",className:"fabric-type-select tw-w-full tw-h-[44px] tw-px-3 tw-py-[15px] tw-bg-white tw-border tw-border-[#BBC1CF] tw-shadow-sm tw-text-gray-900 tw-font-medium focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-blue-500 tw-appearance-none tw-cursor-pointer",name:"fabric_type",value:n,onChange:V,children:[d.jsx("option",{value:"all",children:"All"}),w.map((C,T)=>d.jsx("option",{value:C,children:C},T))]})]}),d.jsxs("div",{className:"customizable-product__tabs-item customizable-product__tab--color",children:[d.jsx("p",{className:"tw-text-[#1F1F1F] tw-uppercase",children:"Color:"}),d.jsxs("span",{className:`active-customize-option ${m?"fabric-selected":""}`,children:[m||(Object.keys(x).length>0?Object.keys(x)[0]:"No colors available"),n!=="all"&&` (${n})`]}),d.jsx("div",{className:"customize-swatch-container",children:g&&!c?Array.from({length:6}).map((C,T)=>d.jsx("div",{className:"customize-swatch-item tw-border tw-border-gray-200 tw-relative tw-overflow-hidden tw-animate-pulse",children:d.jsx("div",{className:"tw-w-full tw-h-0 tw-pb-[100%] tw-bg-gray-200"})},`skeleton-${T}`)):Object.entries(x).map(([C,T],j)=>{const L=m===C;return d.jsx("div",{className:`customize-swatch-item tw-border tw-relative tw-overflow-hidden tw-cursor-pointer tw-transition-all tw-duration-200 ${L?"tw-border-black tw-border-2 swatch-active":"tw-border-gray-200 hover:tw-border-gray-400 hover:tw-shadow-sm"}`,title:C,children:T.image&&d.jsx(Oi,{src:T.image.url,alt:C,width:150,height:150,className:`tw-w-full tw-h-auto tw-object-cover tw-cursor-pointer tw-transition-transform tw-duration-200 ${L?"tw-scale-110":"hover:tw-scale-105"}`,onClick:()=>A(C),sizes:"(max-width: 640px) 33vw, (max-width: 768px) 25vw, 150px",eager:j<6})},C)})})]}),d.jsxs("div",{className:"customizable-product__tabs-item customizable-product__tab--base",children:[d.jsx("p",{className:"tw-text-[#1F1F1F] tw-uppercase",children:"Base Finish:"}),d.jsx("span",{className:`active-customize-option ${s||b[0]?"base-selected":""}`,children:s||b[0]||"No Base"}),d.jsxs("div",{className:"customize-swatch-container",children:[b.length===0&&d.jsx("div",{className:"customize-swatch-item-base-not-found tw-w-[41px] tw-h-[41px] tw-bg-[#F5F5F5] tw-border tw-border-gray-400 tw-border-solid"}),b.map((C,T)=>{const j=f[C],L=s===C||!s&&T===0;return d.jsx("div",{className:`customize-swatch-item tw-flex tw-flex-col tw-items-center tw-gap-2 tw-border tw-cursor-pointer tw-relative tw-overflow-hidden tw-transition-all tw-duration-200 ${L?"tw-border-black tw-border-2 tw-ring-2 tw-ring-gray-200 tw-bg-gray-50 base-active":"tw-border-gray-200 hover:tw-border-black hover:tw-shadow-md"}`,title:C,onClick:()=>D(C),children:j!=null&&j.image?d.jsx(Oi,{src:j.image.url,alt:C,width:64,height:64,className:`tw-w-16 tw-h-16 tw-object-cover tw-transition-transform tw-duration-200 ${L?"tw-scale-105":"hover:tw-scale-102"}`,sizes:"64px",eager:T<3}):d.jsx("div",{className:`tw-flex tw-items-center tw-justify-center tw-text-[12px] tw-leading-[1] tw-p-2 tw-w-16 tw-h-16 tw-transition-all tw-duration-200 ${L?"tw-font-semibold tw-text-black":"tw-text-gray-600"}`,children:C})},C)})]})]})]})})},N0=({productHandle:e})=>{const{product:t}=Ul(e),{inStockVariants:r,customVariants:n,firstVariant:i,firstAvailableInStock:s,firstAvailableCustom:a,hasAvailableInStock:o}=wN(t),l=!r||r.length===0||!o,[c,u]=E.useState(!1),[f,h]=E.useState(()=>l?2:1),{selectedVariant:v,changeVariant:y,detectVariantFromSwatches:w}=bN(t,i),{handleVariantChange:x,getVariantFromURL:p}=$l(e,v,y),g=[{id:1,name:"In Stock",disabled:l},{id:2,name:"Customize It",disabled:!1}],m=S=>{Bc(f===2),y(S),x(S),b(S)},b=S=>{var R,P;if(!S)return;const k=document.querySelector(".data-accordion-pdp-measurement");k&&(R=S.product_measurement)!=null&&R.value&&(k.innerHTML=`<ul>${S.product_measurement.value}</ul>`);const N=document.querySelector(".data-accordion-pdp-shipping-returns");N&&(P=S.ship_message)!=null&&P.value&&(N.innerHTML=S.ship_message.value)};E.useLayoutEffect(()=>{Bc(f===2)},[f]),E.useEffect(()=>()=>Bc(!1),[]),E.useEffect(()=>{l&&f===1?h(2):!l&&f===2&&t&&r?.length>0&&!c&&h(1)},[l,f,t,r,c]),E.useEffect(()=>{if(t!=null&&t.variants){const{variantId:S,fabric:k}=p();if(S){const N=t.variants.find(R=>R.id===S);if(N){y(N),x(N),b(N);return}}if(k){const N=w(k,null);if(N){y(N),x(N),b(N);return}}if(!v){let N=null;!l&&s?N=s:a?N=a:N=i||t.variants&&t.variants[0],N&&(y(N),x(N),b(N))}}},[t,p,x,i,v,y,w,l,s,a]),E.useEffect(()=>{v&&b(v)},[v]);const _=S=>{const k=g.find(N=>N.id===S);k!=null&&k.disabled||(h(S),u(!0))};return d.jsxs("div",{className:"customizable-product",children:[d.jsxs("div",{className:"customizable-product__content",children:[d.jsx("div",{className:"customizable-product__tabs tw-flex",role:"tablist","aria-label":"Purchase options",children:g.map(S=>d.jsx("div",{className:`customizable-product__tab ${f===S.id?"tab-active":""} ${S.disabled?"tab-disabled":""}`,role:"tab","aria-selected":f===S.id,"aria-disabled":S.disabled||void 0,tabIndex:S.disabled?-1:0,title:S.disabled?"Currently unavailable \u2014 no in-stock options for this item":void 0,onClick:()=>_(S.id),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),_(S.id))},children:d.jsx("p",{className:`tw-uppercase ${S.disabled?"tw-cursor-not-allowed tw-text-gray-300":"tw-cursor-pointer"} ${f===S.id?"tw-text-[#1E3060]":S.disabled?"tw-text-gray-300":"tw-text-gray-500"}`,children:S.name})},S.id))}),d.jsx("div",{className:"customizable-product__content-content",children:f===1?d.jsx(NN,{variants:r,onVariantSelect:m}):d.jsx(ON,{variants:n,onVariantSelect:m,product:t})})]}),d.jsx("div",{className:"customizable-product__footer",children:d.jsx("div",{className:"customizable-product__footer-content",children:d.jsxs("p",{className:"tw-flex tw-gap-[10px]",children:[d.jsx("span",{children:d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",children:d.jsx("path",{d:"M4.15933 13.1109C4.15933 13.7024 3.51894 14.0722 3.00662 13.7764C2.4943 13.4806 2.4943 12.7411 3.00662 12.4453C3.12344 12.3779 3.25596 12.3424 3.39085 12.3424C3.81527 12.3424 4.15933 12.6865 4.15933 13.1109ZM15.8402 11.2811V15.2626C15.8402 15.8568 15.3585 16.3385 14.7643 16.3385H3.39
842085C3.19561 16.3386 3.00072 16.3219 2.80835 16.2885C1.06149 15.9694 -0.0995016 14.2992 0.210136 12.5506L2.13132 1.55146C2.23203 0.964994 2.7914 0.572988 3.37702 0.678469L7.57827 1.42543C8.16138 1.53069 8.54961 2.08761 8.44665 2.67113L7.47299 8.23796L12.9292 6.25914C13.4853 6.05828 14.0992 6.34382 14.304 6.89851L15.771 10.9115C15.8133 11.0303 15.8366 11.1551 15.8402 11.2811ZM5.61405 13.5097L7.54062 2.51205C7.55565 2.42943 7.50159 2.35004 7.4192 2.33377L3.21564 1.58374H3.18951C3.15997 1.58389 3.13121 1.59329 3.10729 1.61063C3.07381 1.63421 3.05113 1.67017 3.04427 1.71053L1.12309 12.7097C0.900911 13.9576 1.72785 15.1509 2.97434 15.3809C3.56546 15.4865 4.17425 15.3512 4.66499 15.0052C5.16812 14.6541 5.50945 14.116 5.61252 13.5112L5.61405 13.5097ZM6.24804 14.5218L14.8188 11.4202C14.8561 11.4066 14.8867 11.379 14.9041 11.3434C14.9209 11.3082 14.9226 11.2676 14.9088 11.2312L13.4417 7.21896C13.4119 7.14133 13.3258 7.10149 13.2473 7.12905L7.28933 9.2877L6.52085 13.6734C6.46982 13.968 6.378 14.2541 6.24804 14.5233V14.5218ZM14.918 12.3631L6.49165 15.4163H14.7643C14.8492 15.4163 14.918 15.3475 14.918 15.2626V12.3631Z",fill:"#1F1F1F"})})}),d.jsx("a",{className:"tw-underline tw-text-[#1F1F1F]",href:"/collections/fabric-swatches",children:"Request Swatches"})]})})})]})},TN=({productHandle:e,variants:t=[],className:r="",showPrice:n=!0,showAvailability:i=!0,showImages:s=!0})=>{var p;const[a,o]=E.useState(null),[l,c]=E.useState(0),{handleVariantChange:u,getVariantFromURL:f}=$l(e,a,g=>{console.log("Variant changed:",g),o(g),c(0)});E.useEffect(()=>{if(t.length>0){const{variantId:g,fabric:m,base:b}=f();let _=null;if(g?_=t.find(S=>S.id===g):m&&(_=t.find(S=>{var k;return((k=S.fabric_set)==null?void 0:k.value)===m})),_)o(_),u(_);else if(t.length>0){const S=t.find(k=>k.availableForSale)||t[0];o(S),u(S)}}},[t,f,u]),E.useEffect(()=>{const g=m=>{const{variant:b}=m.detail;b&&b.id!==a?.id&&(console.log("Theme variant change detected:",b),o(b))};return document.addEventListener("theme-variant-change",g),()=>{document.removeEventListener("theme-variant-change",g)}},[a]);const h=g=>{g&&g.id!==a?.id&&(console.log("Selecting variant:",g),o(g),u(g))},v=g=>{c(g)},y=()=>{var m,b;if(!a)return[];const g=[];if(a.image&&g.push(a.image),(m=a.product)!=null&&m.images){const _=((b=a.product.images.edges)==null?void 0:b.map(S=>S.node))||[];g.push(..._.filter(S=>{var k;return S.id!==((k=a.image)==null?void 0:k.id)}))}return g},w=()=>{const g=y();return g[l]||g[0]},x=g=>g?`${g.amount} ${g.currencyCode}`:"";return t.length===0?d.jsx("div",{className:`product-variant-selector empty ${r}`,children:d.jsx("p",{children:"No variants available"})}):d.jsxs("div",{className:`product-variant-selector ${r}`,children:[s&&d.jsxs("div",{className:"product-variant-selector__images",children:[w()&&d.jsx("div",{className:"product-variant-selector__main-image",children:d.jsx("img",{src:w().url,alt:w().altText||"Product image",className:"product-variant-selector__image"})}),y().length>1&&d.jsx("div",{className:"product-variant-selector__thumbnails",children:y().slice(0,6).map((g,m)=>d.jsx("button",{className:`product-variant-selector__thumbnail ${l===m?"selected":""}`,onClick:()=>v(m),children:d.jsx("img",{src:g.url,alt:g.altText||"Product thumbnail",className:"product-variant-selector__thumbnail-image"})},g.id))})]}),d.jsx("div",{className:"product-variant-selector__info",children:a&&d.jsxs(d.Fragment,{children:[n&&a.price&&d.jsxs("div",{className:"product-variant-selector__price",children:[d.jsx("span",{className:"product-variant-selector__price-amount",children:x(a.price)}),a.compareAtPrice&&d.jsx("span",{className:"product-variant-selector__compare-price",children:x(a.compareAtPrice)})]}),i&&d.jsx("div",{className:"product-variant-selector__availability",children:d.jsx("span",{className:`product-variant-selector__status ${a.availableForSale?"in-stock":"out-of-stock"}`,children:a.availableForSale?"In Stock":"Out of Stock"})}),d.jsx("div",{className:"product-variant-selector__options",children:(p=a.selectedOptions)==null?void 0:p.map((g,m)=>d.jsxs("div",{className:"product-variant-selector__option",children:[d.jsxs("span",{className:"product-variant-selector__option-name",children:[g.name,":"]}),d.jsx("span",{className:"product-variant-selector__option-value",children:g.value})]},m))})]})}),d.jsxs("div",{className:"product-variant-selector__variants",children:[d.jsx("h3",{children:"Available Variants"}),d.jsx("div",{className:"product-variant-selector__variant-list",children:t.map(g=>d.jsxs("button",{className:`product-variant-selector__variant ${a?.id===g.id?"selected":""} ${g.availableForSale?"":"unavailable"}`,onClick:()=>h(g),disabled:!g.availableForSale,children:[d.jsxs("div",{className:"product-variant-selector__variant-info",children:[d.jsx("span",{className:"product-variant-selector__variant-title",children:g.title}),g.price&&d.jsx("span",{className:"product-variant-selector__variant-price",children:x(g.price)})]}),g.image&&d.jsx("img",{src:g.image.url,alt:g.image.altText||g.title,className:"product-variant-selector__variant-image"})]},g.id))})]})]})};var br;(function(e){e.production="production",e.development="development"})(br||(br={}));var PN=function(t){return IN(t)&&!RN(t)};function IN(e){return!!e&&typeof e=="object"}function RN(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||LN(e)}var FN=typeof Symbol=="function"&&Symbol.for,AN=FN?Symbol.for("react.element"):60103;function LN(e){return e.$$typeof===AN}function MN(e){return Array.isArray(e)?[]:{}}function la(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Ti(MN(e),e,t):e}function DN(e,t,r){return e.concat(t).map(function(n){return la(n,r)})}function zN(e,t){if(!t.customMerge)return Ti;var r=t.customMerge(e);return typeof r=="function"?r:Ti}function $N(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function $m(e){return Object.keys(e).concat($N(e))}function j0(e,t){try{return t in e}catch{return!1}}function UN(e,t){return j0(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function BN(e,t,r){var n={};return r.isMergeableObject(e)&&$m(e).forEach(function(i){n[i]=la(e[i],r)}),$m(t).forEach(function(i){UN(e,i)||(j0(e,i)&&r.isMergeableObject(t[i])?n[i]=zN(i,r)(e[i],t[i],r):n[i]=la(t[i],r))}),n}function Ti(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||DN,r.isMergeableObject=r.isMergeableObject||PN,r.cloneUnlessOtherwiseSpecified=la;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):BN(e,t,r):la(t,r)}Ti.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Ti(n,i,r)},{})};var qN=Ti,VN=qN;const It=Sd(VN),QN=e=>{let t=1,r=0,n;for(;e>=0;)n=t,t=t+r,r=n,e--;return r},ms="ss-networkcache",WN={enabled:!0,ttl:3e5,maxSize:200,purgeable:!0};class HN{constructor(t){var r;this.memoryCache={},this.config=It(WN,t||{}),(r=this.config)!=null&&r.entries&&Object.keys(this.config.entries).map(n=>{this.config.entries&&this.config.entries[n]&&this.set(n,this.config.entries[n])})}get(t){if(this.config.enabled)try{if(this.memoryCache[t]&&Date.now()<this.memoryCache[t].expires)return It({},this.memoryCache[t].value);if(typeof window<"u"&&window!=null&&window.sessionStorage){const r=window.sessionStorage.getItem(ms),n=r&&JSON.parse(r);if(n&&t&&n[t])if(Date.now()>=n[t].expires){const i={...n};delete i[t],window.sessionStorage.setItem(ms,JSON.stringify(i))}else return n[t].value}}catch{console.warn("something went wrong getting from cache")}}set(t,r){if(this.config.enabled)try{const n={value:r,expires:Date.now()+this.config.ttl,purgeable:this.config.purgeable};
842if(this.memoryCache[t]=n,typeof window<"u"&&window!=null&&window.sessionStorage){const i=window.sessionStorage.getItem(ms),s={...i&&JSON.parse(i)};s[t]=n;let a=new Blob([JSON.stringify(s)],{endings:"native"}).size/1024;for(;a>this.config.maxSize;){const o=Object.keys(s).filter(l=>s[l].purgeable).sort((l,c)=>s[l].expires-s[c].expires)[0];if(!o)break;delete s[o],a=new Blob([JSON.stringify(s)],{endings:"native"}).size/1024}a<this.config.maxSize&&window.sessionStorage.setItem(ms,JSON.stringify(s))}}catch{console.warn("something went wrong setting to cache")}}clear(){try{this.memoryCache={},typeof window<"u"&&window!=null&&window.sessionStorage&&window.sessionStorage.setItem(ms,"")}catch{console.warn("something went wrong clearing cache")}}}const GN=e=>typeof Blob<"u"&&e instanceof Blob;class Vl{constructor(t){this.configuration=t,this.retryDelay=1e3,this.retryCount=0,this.cache=new HN(this.configuration.cache)}get mode(){return this.configuration.mode}async request(t,r){var o;const{url:n,init:i}=this.createFetchParams(t);if(r){const l=this.cache.get(`${t.path}/${r}`)||this.cache.get(`${t.path}/*`);if(l)return this.retryCount=0,this.retryDelay=1e3,Array.isArray(l)?l.forEach(c=>{c._cached=!0}):l._cached=!0,l}let s,a;try{if(s=await this.fetchApi(n,i),a=await s?.json(),s.status>=200&&s.status<300)return this.retryCount=0,this.retryDelay=1e3,r&&this.cache.set(`${t.path}/${r}`,a),a;throw s.status==429?this.retryCount<this.configuration.maxRetry?(await new Promise(l=>setTimeout(l,this.retryDelay)),this.retryDelay=QN(this.retryCount)*1e3,this.retryCount++,new Error("Rate limited.")):new Error("Retry rate limit exceeded."):s.status==404&&a?.message=="Profile is currently paused"?new Error(`${a.message}: ${(o=t.query)==null?void 0:o.tag}`):new Error("Unexpected Response Status.")}catch(l){if(l.message=="Rate limited.")return await this.request(t,r);throw{err:l,fetchDetails:{status:s?.status,message:s?.statusText||"FAILED",url:n,...i}}}}createFetchParams(t){var u,f;const r=((u=t?.body)==null?void 0:u.siteId)||((f=t?.query)==null?void 0:f.siteId);if(!r)throw new Error('Request failed. Missing "siteId" parameter.');const n=`https://${r}.a.searchspring.io`;let s=`${(this.configuration.origin||n).replace(/\/$/,"")}/${t.path.replace(/^\//,"")}`;const a=It(t.query||{},this.configuration.globals);Object.keys(a).length!==0&&(s+="?"+this.configuration.queryParamsStringify(a));const o=typeof FormData<"u"&&t.body instanceof FormData||t.body instanceof URLSearchParams||GN(t.body)?t.body:JSON.stringify(t.body?It(t.body,this.configuration.globals):t.body),l={...this.configuration.headers,...t.headers},c={method:t.method,headers:l,body:o};return{url:s,init:c}}async fetchApi(t,r){return await this.configuration.fetchApi(t,r)}}class Lr{constructor(t={}){this.config=t,t.maxRetry||(this.config.maxRetry=8),this.config.cache=this.config.cache||{},this.config.mode=this.config.mode||br.production,this.config.mode==br.development&&(this.config.cache.enabled=!1)}get cache(){var t;return((t=this.config)==null?void 0:t.cache)||{}}get maxRetry(){return this.config.maxRetry||8}get origin(){return this.config.origin||""}get fetchApi(){var t;return this.config.fetchApi||(typeof window<"u"?(t=window.fetch)==null?void 0:t.bind(window):fetch)}get queryParamsStringify(){return this.config.queryParamsStringify||O0}get headers(){return this.config.headers||{}}set headers(t){this.config.headers=t}get globals(){return this.config.globals||{}}set globals(t){this.config.globals=t}get mode(){return this.config.mode}}function O0(e,t=""){return Object.keys(e).map(r=>{const n=t+(t.length?`[${r}]`:r),i=e[r];if(i instanceof Array){const s=i.map(a=>encodeURIComponent(String(a))).join(`&${encodeURIComponent(n)}=`);return`${encodeURIComponent(n)}=${s}`}return i instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(i.toISOString())}`:i instanceof Object?O0(i,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`}).filter(r=>r.length>0).join("&")}function KN(...e){const t={};return e.reverse().forEach(r=>{Object.keys(r).forEach(n=>{const i=r[n]instanceof Array?r[n]:[r[n]];t[n]=(t[n]||[]).concat(i)})}),t}const Zf="noBeacon";function ze(e){const t=KN(ze.sorts(e),ze.search(e),ze.filters(e),ze.merchandising(e),ze.pagination(e),ze.siteId(e),ze.facets(e),ze.tracking(e),ze.personalization(e));return t[Zf]=!0,t}ze.sorts=(e={})=>(e.sorts||[]).reduce((t,r)=>!r.field||!r.direction||r.direction!="asc"&&r.direction!="desc"?t:{...t,["sort."+r.field]:(t[r.field]||[]).concat([r.direction])},{}),ze.search=(e={})=>{const t=e.search||{},r={};return t.query&&t.query.string&&(r.q=t.query.string),t.subQuery&&(r.rq=t.subQuery.trim()),t.originalQuery&&(r.originalQuery=t.originalQuery.trim()),t.fallbackQuery&&(r.fallbackQuery=t.fallbackQuery.trim()),t.redirectResponse&&(r.redirectResponse=t.redirectResponse),r},ze.filters=(e={})=>(e.filters||[]).reduce((t,r)=>{var i,s;const n=r.background?"bgfilter":"filter";if(r.type=="value"){const a=n+"."+r.field;return{...t,[a]:(t[a]||[]).concat([r.value])}}else if(r.type=="range"){const a=n+"."+r.field+".low",o=n+"."+r.field+".high",l=((i=r?.value)==null?void 0:i.low)??"*",c=((s=r?.value)==null?void 0:s.high)??"*";return{...t,[a]:(t[a]||[]).concat([l]),[o]:(t[o]||[]).concat([c])}}return t},{}),ze.merchandising=(e={})=>{const t=e.merchandising||{},r=t.disabled?{disableMerchandising:!0}:{};return t.landingPage&&(r["landing-page"]=t.landingPage),t.segments instanceof Array&&t.segments.length&&(r.tag=t.segments.map(n=>`merch.segment/${n}`)),typeof t.intellisuggest=="boolean"&&(r.intellisuggest=t.intellisuggest),t.disableInlineBanners&&(r.disableInlineBanners=t.disableInlineBanners),r},ze.pagination=(e={})=>{const t=e.pagination||{},r={};return t.page&&(r.page=t.page),(t.pageSize||t.pageSize===0)&&(r.resultsPerPage=t.pageSize),r},ze.siteId=(e={})=>e.siteId?{siteId:e.siteId}:{},ze.facets=(e={})=>{var n,i;const t=e.facets||{},r={};if(t.include&&t.include.length&&t.exclude&&t.exclude.length)throw"cannot use facet include and exclude at the same time";return(n=t.include)!=null&&n.length&&(r.includedFacets=t.include),(i=t.exclude)!=null&&i.length&&(r.excludedFacets=t.exclude),t.autoDrillDown===!1&&(r.disableFacetDrillDown=!0),r},ze.tracking=(e={})=>{const t=e.tracking||{},r={};return t.userId&&(r.userId=t.userId),t.domain&&(r.domain=t.domain),t.sessionId&&(r.sessionId=t.sessionId),t.pageLoadId&&
842(r.pageLoadId=t.pageLoadId),r},ze.personalization=(e={})=>{const t=e.personalization||{},r={};return t.disabled&&(r.skipPersonalization=t.disabled),t.cart&&(r.cart=t.cart),t.lastViewed&&(r.lastViewed=t.lastViewed),t.shopper&&(r.shopper=t.shopper),r};function Um(e){return e.replace(/>/g,">").replace(/</g,"<").replace(/�?39;/g,"'").replace(/"/g,'"').replace(/&/g,"&")}const Bm=["uid","sku","name","url","addToCartUrl","price","msrp","imageUrl","secureImageUrl","thumbnailImageUrl","secureThumbnailImageUrl","rating","ratingCount","description","stockMessage","brand","popularity","caption"];class JN{constructor(t){Object.assign(this,t)}}function Ve(e,t){return{_cached:e._cached??!1,...Ve.pagination(e),...Ve.results(e),...Ve.filters(e),...Ve.facets(e,t),...Ve.sorting(e),...Ve.merchandising(e),...Ve.search(e,t)}}Ve.pagination=e=>{const t=e?.pagination;return{pagination:{totalResults:t?.totalResults,page:t?.currentPage,pageSize:t?.perPage,totalPages:t?.totalPages}}},Ve.results=e=>({results:(e?.results||[]).map(Ve.result)}),Ve.result=e=>{var i;const t=Bm.reduce((s,a)=>typeof e[a]<"u"?{...s,[a]:qc(e[a]||"")}:s,{});t.price&&(t.price=+t.price),t.msrp&&(t.msrp=+t.msrp);const r=Object.keys(e).filter(s=>Bm.indexOf(s)==-1).filter(s=>{var a;return!(s=="badges"&&Array.isArray(e[s])&&typeof((a=e[s])==null?void 0:a[0])=="object")}).reduce((s,a)=>({...s,[a]:qc(e[a]||"")}),{}),n=((i=e?.children)==null?void 0:i.map(s=>({attributes:{...Object.keys(s).reduce((a,o)=>({...a,[o]:qc(s[o])}),{})}})))||[];return new JN({id:e.uid,mappings:{core:t},attributes:r,badges:Array.isArray(e.badges)&&typeof e.badges[0]=="object"?e.badges:[],children:n})},Ve.filters=e=>({filters:(e?.filterSummary||[]).map(r=>{let n=r.value,i="value";return typeof r.value=="object"&&r&&r.value&&r.value.rangeHigh&&r.value.rangeLow&&(i="range",n={low:+r.value.rangeLow,high:+r.value.rangeHigh}),{type:i,field:r.field,label:r.filterValue,value:n}})}),Ve.facets=(e,t={})=>{var o,l;const r=t.filters||[],n=e?.facets||[],i=(o=t?.facets)==null?void 0:o.limit,s=(l=t?.facets)==null?void 0:l.valueLimit;let a=n.map(c=>{var f;let u={field:c.field,type:"value",filtered:!!c.facet_active};if(c.step)c.range&&(u={...u,type:"range",step:c.step,range:{low:c.range[0]=="*"?void 0:+c.range[0],high:c.range[1]=="*"?void 0:+c.range[1]}}),c.active&&typeof c.active!="boolean"&&c.active.length>1&&(u.active={low:c.active[0]=="*"?void 0:+c.active[0],high:c.active[1]=="*"?void 0:+c.active[1]});else if(c.values instanceof Array)if(c.type=="hierarchy"){u.type="value",u.values=(c.values||[]).map(y=>({filtered:!!y.active,value:y.value,label:y.label,count:y.count}));const h=r.find(y=>y.field==c.field),v=[];if(h&&!h.background){const y=(f=h.value)==null?void 0:f.split(c.hierarchyDelimiter||">");if(y)for(let w=y.length-1;w>=0;w--){const x=y.slice(0,w+1),p=x.join(c.hierarchyDelimiter);v.unshift({value:p,filtered:p==h.value,label:x[x.length-1]})}v.unshift({value:null,filtered:!1,label:"View All"})}u.values=v.concat(u.values)}else c.values[0].type=="value"?(u.type="value",u.values=c.values.map(h=>({filtered:h.active,value:h.value,label:h.label,count:h.count}))):c.values[0].type=="range"&&(u.type="range-buckets",u.values=c.values.map(h=>({filtered:h.active,low:h.low=="*"?null:h.low?+h.low:null,high:h.high=="*"?null:h.high?+h.high:null,label:h.label,count:h.count})));return u});return i&&(a=a.slice(0,i)),s&&(a=a.map(c=>(c.values&&(c.values=c.values.slice(0,s)),c))),{facets:a}},Ve.sorting=e=>{var n;return{sorting:(((n=e?.sorting)==null?void 0:n.options)||[]).filter(i=>i.active).map(i=>({field:i.field,direction:i.direction}))}},Ve.merchandising=e=>{const t=e?.merchandising;return t!=null&&t.content&&Array.isArray(t.content)&&!t.content.length&&(t.content={}),{merchandising:{redirect:t?.redirect||"",content:t?.content||{},campaigns:t?.triggeredCampaigns||[],personalized:t?.personalized,experiments:t?.experiments||[]}}},Ve.search=(e,t)=>{var n,i,s,a,o,l,c,u,f;const r={search:{query:(i=(n=t?.search)==null?void 0:n.query)==null?void 0:i.string,didYouMean:(s=e?.didYouMean)==null?void 0:s.query,matchType:(a=e?.query)==null?void 0:a.matchType}};return(o=e?.query)!=null&&o.corrected&&e!=null&&e.query.original?(r.search.query=(l=e?.query)==null?void 0:l.corrected,r.search.originalQuery=(c=e?.query)==null?void 0:c.original):(u=t?.search)!=null&&u.originalQuery&&(r.search.originalQuery=(f=t?.search)==null?void 0:f.originalQuery),r};function qc(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?Um(String(t)):t):Um(String(e))}function dr(e){return{...dr.query(e),...dr.correctedQuery(e),...dr.suggested(e),...dr.alternatives(e)}}dr.query=e=>e!=null&&e.query?{query:e.query}:{},dr.correctedQuery=e=>typeof e!="object"||!e["corrected-query"]?{}:{correctedQuery:e["corrected-query"]},dr.suggested=e=>{var t,r,n;return typeof e!="object"||!e.suggested||typeof e.suggested!="object"?{}:{suggested:{text:(t=e.suggested)==null?void 0:t.text,type:(r=e.suggested)==null?void 0:r.type,source:(n=e.suggested)==null?void 0:n.source}}},dr.alternatives=e=>({alternatives:(e?.alternatives||[]).map(r=>({text:r.text}))});const qm=e=>{if(!e)return;const t=[];return e.map(r=>{if(r.type=="value"){const n=t.findIndex(i=>i.field==r.field);if(n>-1)t[n].values.push(r.value);else{const i={field:r.field,type:"=",values:[r.value]};t.push(i)}}else if(r.type=="range"){if(typeof r.value.low=="number"){const n={field:r.field,type:">
842=",values:[r.value.low]},i=t.findIndex(s=>s.field==r.field&&s.type==">=");i>-1?t[i]=n:t.push(n)}if(typeof r.value.high=="number"){const n={field:r.field,type:"<=",values:[r.value.high]},i=t.findIndex(s=>s.field==r.field&&s.type=="<=");i>-1?t[i]=n:t.push(n)}}}),t};class YN extends Vl{async getEndpoint(t,r="/api/search/search.json"){t.resultsFormat="native";const n={},i={...t};return delete i.pageLoadId,delete i.domain,delete i[Zf],await this.request({path:r,method:"GET",headers:n,query:t},JSON.stringify(i))}async postMeta(t){const r={};return r["Content-Type"]="application/json",await this.request({path:"/api/meta/meta.json",method:"POST",headers:r,body:t},JSON.stringify(t))}async getMeta(t){const r={};return await this.request({path:"/api/meta/meta.json",method:"GET",headers:r,query:t},JSON.stringify(t))}async getSearch(t){return t.ajaxCatalog="Snap",this.getEndpoint(t,"/api/search/search.json")}async getAutocomplete(t){return t.ajaxCatalog="Snap",this.getEndpoint(t,"/api/search/autocomplete.json")}async getFinder(t){return t.ajaxCatalog="Snap",this.getEndpoint(t,"/api/search/finder.json")}}class XN{constructor(){this.promise=new Promise((t,r)=>{this.reject=r,this.resolve=t})}}const ZN=150;class ej extends Vl{constructor(t){super(t),this.batches={}}async getProfile(t){const r={};return await this.request({path:"/api/personalized-recommendations/profile.json",method:"GET",headers:r,query:t},JSON.stringify(t))}async batchRecommendations(t){var l;const r=t.batchId||1,n=t.batched?`${((l=t.profile)==null?void 0:l.siteId)||t.siteId}:${r}`:`${Math.random()}:${r}`,i=this.batches[n]=this.batches[n]||{timeout:null,request:{profiles:[]},entries:[]},s=new XN;i.entries.push({request:t,deferred:s});const a=typeof window<"u"?window.clearTimeout:clearTimeout,o=typeof window<"u"?window.setTimeout:setTimeout;return a&&a(i.timeout),i.timeout=o(async()=>{var c,u;delete this.batches[n],i.entries.sort(tj),i.entries.map(f=>{var S,k,N;if(f.request.product&&(Array.isArray(f.request.products)&&f.request.products.indexOf(f.request.product)==-1?f.request.products=f.request.products.concat(f.request.product):f.request.products=[f.request.product]),f.request.profile){const{tag:R,profile:{categories:P,brands:H,blockedItems:G,limit:Q,query:U,filters:V,dedupe:A}}=f.request,D={tag:R,...Vc({categories:P,brands:H,blockedItems:G,limit:Q,searchTerm:U,filters:qm(V),dedupe:A})};(S=i.request.profiles)==null||S.push(D)}else{const{tag:R,categories:P,brands:H,limit:G,query:Q,dedupe:U}=f.request,V={tag:R,...Vc({categories:P,brands:H,limit:G,searchTerm:Q,dedupe:U})};(k=i.request.profiles)==null||k.push(V)}
842const{products:h,blockedItems:v,filters:y,test:w,cart:x,lastViewed:p,shopper:g}=f.request,m=Array.from(new Set((i.request.products||[]).concat(h||[]))),b=Array.from(new Set((i.request.blockedItems||[]).concat(v||[]))),_=Array.from(new Set((i.request.filters||[]).concat(qm(y)||[]).map(R=>JSON.stringify(R)))).map(R=>JSON.parse(R));i.request={...i.request,...Vc({siteId:((N=f.request.profile)==null?void 0:N.siteId)||f.request.siteId,products:m.length?m:void 0,blockedItems:b.length?b:void 0,filters:_.length?_:void 0,test:w,cart:x,lastViewed:p,shopper:g}),[Zf]:!0}});try{this.configuration.mode==br.development&&(i.request.test=!0);const f=await this.postRecommendations(i.request);(c=i.entries)==null||c.forEach((h,v)=>{h.deferred.resolve([f[v]])})}catch(f){(u=i.entries)==null||u.forEach(h=>{h.deferred.reject(f)})}},ZN),s.promise}async postRecommendations(t){const r={};r["Content-Type"]="text/plain";const i=`/boost/${t.siteId}/recommend`;return await this.request({path:i,method:"POST",headers:r,body:t},JSON.stringify(t))}}function tj(e,t){var a,o;const r=e.request,n=t.request,i=r.order||((a=r.profile)==null?void 0:a.order),s=n.order||((o=n.profile)==null?void 0:o.order);return i==null&&s==null?0:i==null&&s!=null?1:s==null&&i!=null||i<s?-1:i>s?1:0}function Vc(e){const t={};return Object.keys(e).map(r=>{e[r]!==void 0&&(t[r]=e[r])}),t}class T0 extends Vl{async getSuggest(t){const r={};return await this.request({path:"/api/suggest/query",method:"GET",headers:r,query:t},JSON.stringify(t))}async postSuggest(t){const r={};return r["Content-Type"]="application/json",await this.request({path:"/api/suggest/query",method:"POST",headers:r,body:t},JSON.stringify(t))}async getTrending(t){const r={};return await this.request({path:"/api/suggest/trending",method:"GET",headers:r,query:t},JSON.stringify(t))}async postTrending(t){const r={};return r["Content-Type"]="application/json",await this.request({path:"/api/suggest/trending",method:"POST",headers:r,body:t},JSON.stringify(t))}}class Ya extends Vl{constructor(t,r){super(t);const n=It({mode:this.configuration.mode,origin:this.configuration.origin,cache:this.configuration.cache,fetchApi:this.configuration.fetchApi},r?.legacy||{});t.mode==br.development&&(n.headers={...n.headers,"searchspring-no-beacon":""});const i=It({mode:this.configuration.mode,origin:this.configuration.origin,cache:this.configuration.cache,fetchApi:this.configuration.fetchApi},r?.suggest||{}),s=new Lr(n),a=new Lr(i);this.requesters={legacy:new YN(s),suggest:new T0(a)}}async getMeta(t){const r=t;return this.requesters.legacy.getMeta(r)}async getSearch(t){const r=ze(t),n=await this.requesters.legacy.getSearch(r);return Ve(n,t)}async getFinder(t){const r=ze(t),n=await this.requesters.legacy.getFinder(r);return Ve(n,t)}async getAutocomplete(t){var u,f,h,v;const r=ze(t),n={siteId:r.siteId,language:"en",query:r.q,suggestionCount:(t.suggestions||{}).count||5};((t.search||{}).query||{}).spellCorrection||(n.disableSpellCorrect=!0);const i=await this.requesters.suggest.getSuggest(n),s=dr(i);let a=(s.suggested||{}).text||s.correctedQuery||s.query;(f=(u=this.requesters.suggest.configuration)==null?void 0:u.globals)!=null&&f.integratedSpellCorrection&&(a=(s.suggested||{}).text||s.query||s.correctedQuery);const o={...r,redirectResponse:"full",q:a};(v=(h=t.search)==null?void 0:h.query)!=null&&v.string&&(t.search.query.string=a);const l=await this.requesters.legacy.getAutocomplete(o);return{...Ve(l,t),autocomplete:s}}}const rj={mode:br.production,meta:{cache:{purgeable:!1}},search:{},autocomplete:{},recommend:{},finder:{},suggest:{}};class nj{constructor(t,r={}){var n,i,s,a,o,l,c,u,f,h,v,y,w,x,p,g,m,b,_,S,k,N,R,P,H;if(this.mode=br.production,!(t!=null&&t.siteId))throw"no siteId specified!";this.globals=t,this.config=It(rj,r),Object.values(br).includes(this.config.mode)&&(this.mode=this.config.mode),this.requesters={autocomplete:new Ya(new Lr({fetchApi:this.config.fetchApi,mode:this.mode,origin:(n=this.config.autocomplete)==null?void 0:n.origin,headers:(i=this.config.autocomplete)==null?void 0:i.headers,cache:(s=this.config.autocomplete)==null?void 0:s.cache,globals:(a=this.config.autocomplete)==null?void 0:a.globals}),(o=this.config.autocomplete)==null?void 0:o.requesters),meta:new Ya(new Lr({fetchApi:this.config.fetchApi,mode:this.mode,origin:(l=this.config.meta)==null?void 0:l.origin,headers:(c=this.config.meta)==null?void 0:c.headers,cache:(u=this.config.meta)==null?void 0:u.cache,globals:(f=this.config.meta)==null?void 0:f.globals})),recommend:new ej(new Lr({fetchApi:this.config.fetchApi,mode:this.mode,origin:(h=this.config.recommend)==null?void 0:h.origin,headers:(v=this.config.recommend)==null?void 0:v.headers,cache:(y=this.config.recommend)==null?void 0:y.cache,globals:(w=this.config.recommend)==null?void 0:w.globals})),search:new Ya(new Lr({fetchApi:this.config.fetchApi,mode:this.mode,origin:(x=this.config.search)==null?void 0:x.origin,headers:(p=this.config.search)==null?void 0:p.headers,cache:(g=this.config.search)==null?void 0:g.cache,globals:(m=this.config.search)==null?void 0:m.globals})),finder:new Ya(new Lr({fetchApi:this.config.fetchApi,mode:this.mode,origin:(b=this.config.finder)==null?void 0:b.origin,headers:(_=this.config.finder)==null?void 0:_.headers,cache:(S=this.config.finder)==null?void 0:S.cache,globals:(k=this.config.finder)==null?void 0:k.globals})),suggest:new T0(new Lr({fetchApi:this.config.fetchApi,mode:this.mode,origin:(N=this.config.suggest)==null?void 0:N.origin,headers:(R=this.config.suggest)==null?void 0:R.headers,cache:(P=this.config.suggest)==null?void 0:P.cache,globals:(H=this.config.suggest)==null?void 0:H.globals}))}}async meta(t){const r={siteId:this.globals.siteId};return t=It(r,t||{}),this.requesters.meta.getMeta(t)}async autocomplete(t={}){var r,n;
842if(!((n=(r=t.search)==null?void 0:r.query)!=null&&n.string))throw"query string parameter is required";return t=It(this.globals,t),Promise.all([this.meta({siteId:t.siteId||""}),this.requesters.autocomplete.getAutocomplete(t)])}async search(t={}){return t=It(this.globals,t),Promise.all([this.meta({siteId:t.siteId||""}),this.requesters.search.getSearch(t)])}async finder(t={}){return t=It(this.globals,t),Promise.all([this.meta({siteId:t.siteId||""}),this.requesters.finder.getFinder(t)])}async trending(t){return t=It({siteId:this.globals.siteId},t||{}),this.requesters.suggest.getTrending(t)}async recommend(t){const{tag:r,...n}=t;if(!r)throw"tag parameter is required";const i={tag:r,siteId:t.siteId||this.globals.siteId};n.branch&&(i.branch=n.branch,delete n.branch);const s={tag:r,...n,siteId:t.siteId||this.globals.siteId},[a,o,l]=await Promise.all([this.meta(t.siteId?{siteId:t.siteId}:void 0),this.requesters.recommend.getProfile(i),this.requesters.recommend.batchRecommendations(s)]);return{...o,meta:a,results:l[0]&&l[0].results,_cached:!!o._cached&&!!(l[0]&&l[0]._cached)}}}function Ql(e){const t=e||(typeof window<"u"?window.location.search:""),r=new URLSearchParams(t),n={},i={};(l=>{try{return decodeURIComponent(l)}catch{return l}})(t.startsWith("?")?t.slice(1):t).split("&").forEach(l=>{if(!l||l.includes("="))return;const c=l.match(/^filter:([a-zA-Z0-9_\.]+):(\d+):(\d+)$/);if(c){const u=c[1],f=Number(c[2]),h=Number(c[3]);i[u]={min:f,max:h}}});for(const[l,c]of r.entries())if(l.startsWith("filter.")){const u=l.slice(7);if(c.includes("..")){const[f,h]=c.split(".."),v=f?Number(f):void 0,y=h?Number(h):void 0;i[u]={min:v,max:y}}else n[u]=c?c.split(",").filter(Boolean):[]}else if(l.startsWith("f[")&&l.endsWith("]")){const u=l.slice(2,-1);n[u]=c?c.split(",").filter(Boolean):[]}else if(l.startsWith("r[")&&l.endsWith("]")){const u=l.slice(2,-1),[f,h]=(c||"").split(".."),v=f?Number(f):void 0,y=h?Number(h):void 0;i[u]={min:v,max:y}}else if(l.startsWith("[")&&l.endsWith("]")){const u=l.slice(1,-1),[f,h]=(c||"").split(".."),v=f?Number(f):void 0,y=h?Number(h):void 0;i[u]={min:v,max:y}}else if(l&&!c){const u=l.match(/^filter:([a-zA-Z0-9_\.]+):(\d+):(\d+)$/);if(u){const f=u[1],h=Number(u[2]),v=Number(u[3]);i[f]={min:h,max:v}}}return{filters:n,ranges:i}}function P0(e=[]){return e.map(r=>{var i,s,a,o,l;let n=r.type;if(n==="palette"?n="value":n==="slider"&&(n="range"),n||(r.range||r.values&&r.values.length>0&&((i=r.values[0])==null?void 0:i.from)!==void 0?n="range":r.values&&Array.isArray(r.values)&&(n="value")),n==="value")return{field:r.field,type:"value",values:(r.values||[]).map(u=>({value:u.value,label:u.label||u.value,count:u.count,selected:!!u.selected}))};if(n&&n.startsWith("range")){let c,u;if(r.range&&(c=r.range.low!==void 0?Number(r.range.low):void 0,u=r.range.high!==void 0?Number(r.range.high):void 0),(c===void 0||u===void 0)&&r.values&&r.values.length>0){const h=r.values||[],v=h.map(w=>w.from).filter(w=>typeof w=="number"),y=h.map(w=>w.to).filter(w=>typeof w=="number");c=c!==void 0?c:v.length?Math.min(...v):void 0,u=u!==void 0?u:y.length?Math.max(...y):void 0}return{field:r.field,type:"range",min:c,max:u,selectedMin:((s=r.selected)==null?void 0:s.low)!==void 0?Number(r.selected.low):((a=r.selected)==null?void 0:a.gte)!==void 0?Number(r.selected.gte):void 0,selectedMax:((o=r.selected)==null?void 0:o.high)!==void 0?Number(r.selected.high):((l=r.selected)==null?void 0:l.lte)!==void 0?Number(r.selected.lte):void 0,buckets:(r.values||[]).map(h=>({from:h.from,to:h.to,count:h.count})),range:r.range,step:r.step}}return console.log("\u26A0\uFE0F [normalizeFacets] Facet type not recognized, returning as-is:",r.type),r})}const yd="qva9ht",wd=new nj({siteId:yd}),ij=async(e=6)=>{var t,r;try{return((r=(t=(await Ce.get(`https://${yd}.a.searchspring.io/api/suggest/trending`,{params:{siteId:yd,limit:e}})).data)==null?void 0:t.trending)==null?void 0:r.queries)||[]}catch{return[]}},Vm=()=>typeof window>"u"?!1:window.innerWidth<=768,eh=(e=50,t=null)=>{const r=Vm()?52:54;if(!Vm()&&t&&t>0){const n=r%t;if(n!==0)return r+(t-n)}return r},sj=async({handle:e,id:t,collectionTitle:r,collectionTitleFormated:n,filters:i={},ranges:s={},page:a=1,pageSize:o=28,sort:l=void 0,gridColumns:c=null})=>{var R,P,H,G,Q,U,V;if(!t&&!e&&!r)return{results:{results:[],facets:[],pagination:{page:1,pageSize:28,totalResults:0,totalPages:0}},meta:{}};const u="collection_handle",f=e||r,{ranges:h}=Ql(typeof window<"u"?window.location.search:""),v={...h,...s},y=Object.entries({...i,[u]:[f]}).flatMap(([A,D])=>(D||[]).map(C=>({field:A,value:C,type:"value"}))),w=Object.entries(v||{}).flatMap(([A,D])=>{if(!D)return[];const{min:C,max:T}=D;return typeof C=="number"&&typeof T=="number"?[{field:A,type:"range",value:{low:C,high:T}}]:typeof C=="number"?[{field:A,type:"range",value:{low:C}}]:typeof T=="number"?[{field:A,type:"range",value:{high:T}}]:[]}
842),x=typeof a=="string"?parseInt(a,10):a,p=!isNaN(x)&&x>0?x:1,g=eh(o,c),m=g>0&&g<=100?g:28,b={siteId:"qva9ht",search:{query:{string:"*"}},filters:[...y,...w],pagination:{page:p,pageSize:m}};l&&(b.sorts=[{field:l.field||l,direction:l.direction||"asc"}]);const[_,S]=await wd.search(b);if(!S)throw new Error("No search response received from SearchSpring");S.pagination||(S.pagination={page:p,pageSize:m,totalResults:((R=S?.results)==null?void 0:R.length)||0,totalPages:1});let k=S.merchandising||_?.merchandising||{};if(!k.triggeredCampaigns&&!k.elevated&&!k.removed&&(_!=null&&_.triggeredCampaigns||_!=null&&_.elevated||_!=null&&_.removed||_!=null&&_.is_elevated)&&(k={triggeredCampaigns:_.triggeredCampaigns,elevated:_.elevated,removed:_.removed,is_elevated:_.is_elevated,..._.merchandising}),!((P=k.triggeredCampaigns)!=null&&P.length||(H=k.elevated)!=null&&H.length||(G=k.removed)!=null&&G.length||(Q=k.is_elevated)!=null&&Q.length)&&r&&u==="collection_handle"){const A=Object.entries({...i,collection_name:[r]}).flatMap(([M,B])=>(B||[]).map(z=>({field:M,value:z,type:"value"}))),D={siteId:"qva9ht",search:{query:{string:"*"}},filters:[...A,...w],pagination:{page:p,pageSize:m}};l&&(D.sorts=[{field:l.field||l,direction:l.direction||"asc"}]);const[C,T]=await wd.search(D);let j=T?.merchandising||C?.merchandising||{};if((C!=null&&C.triggeredCampaigns||C!=null&&C.elevated||C!=null&&C.removed||C!=null&&C.is_elevated)&&(j={triggeredCampaigns:C.triggeredCampaigns,elevated:C.elevated,removed:C.removed,is_elevated:C.is_elevated,...C.merchandising}),((U=T?.results)==null?void 0:U.length)>0)return T.pagination||(T.pagination={page:p,pageSize:m,totalResults:((V=T?.results)==null?void 0:V.length)||0,totalPages:1}),{results:T,meta:C,merchandising:j}}return{results:S,meta:_,merchandising:k}},th=(e,t)=>{if(!t||!t.elevated&&!t.removed&&!t.is_elevated)return e;let r=[...e];if(t.removed&&t.removed.length>0){const n=t.removed.map(i=>String(i.uid||i.id));r=r.filter(i=>{const s=String(i.uid||i.id);return!n.includes(s)})}if(t.elevated&&t.elevated.length>0){const n=new Map;t.elevated.forEach(l=>{const c=l.position||0;n.set(c,l)});const i=t.elevated.map(l=>String(l.uid||l.id)),s=r.filter(l=>{const c=String(l.uid||l.id);return!i.includes(c)}),a=[];let o=0;for(let l=0;l<r.length+t.elevated.length;l++)n.has(l)?a.push(n.get(l)):o<s.length&&(a.push(s[o]),o++);r=a}if(t.is_elevated&&Array.isArray(t.is_elevated)&&t.is_elevated.length>0){const n=t.is_elevated.map(a=>String(a)),i=[],s=[];r.forEach(a=>{const o=String(a.uid||a.id);n.includes(o)?i.push(a):s.push(a)}),i.sort((a,o)=>{const l=String(a.uid||a.id),c=String(o.uid||o.id);return n.indexOf(l)-n.indexOf(c)}),r=[...i,...s]}return r},aj=async({handle:e,id:t,collectionTitle:r,collectionTitleFormated:n,filters:i={},ranges:s={},page:a=1,pageSize:o=50,sort:l=void 0,gridColumns:c=null})=>{var R,P,H,G,Q,U,V;if(!t&&!e&&!r)return{results:{results:[],facets:[],pagination:{page:1,pageSize:50,totalResults:0,totalPages:0}},meta:{}};const{ranges:u}=Ql(typeof window<"u"?window.location.search:""),f={...u,...s},h=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(A){const D=Math.random()*16|0;return(A==="x"?D:D&3|8).toString(16)}),v=[];e&&v.push(`collection_handle=${encodeURIComponent(e)}`);const y=eh(o,c);if(v.push("siteId=qva9ht"),v.push(`resultsPerPage=${y}`),v.push("resultsFormat=native"),r)if(n)v.push(`bgfilter.collection_name=${n}`);else{const A=r.replace(/\s+/g," "),D=encodeURIComponent(A);v.push(`bgfilter.collection_name=${D}`)}if(v.push(`page=${a}`),Object.entries(i).forEach(([A,D])=>{if(D&&D.length>0){if(A==="collection_name"||A==="collection_handle")return;D.forEach(C=>{v.push(`filter.${A}=${encodeURIComponent(C)}`)})}}),Object.entries(f||{}).forEach(([A,D])=>{D&&(typeof D.min=="number"||typeof D.max=="number")&&(typeof D.min=="number"&&v.push(`filter.${A}.low=${D.min}`),typeof D.max=="number"&&v.push(`filter.${A}.high=${D.max}`))}),l&&l.field){const A=l.field;let D=l.direction||"asc";if(l.label)switch(l.label.toLowerCase()){case"name: a - z":D="asc";break;case"name: z - a":D="desc";break;case"price: low to high":D="asc";break;case"price: high to low":D="desc";break;default:D=l.direction||l.label||"asc";break}v.push(`sort.${A}=${D}`)}const w="https://qva9ht.a.searchspring.io/api/search/search.json",x=`${w}?${v.join("&")}`,g=(await Ce.get(x,{headers:{"Content-Type":"application/json","searchspring-user-id":h(),"searchspring-session-id":h(),"searchspring-page-load-id":h()}})).data;if(!g)return{results:{results:[],facets:[],pagination:{page:a,pageSize:y,totalResults:0,totalPages:0}},meta:{}};g.results||(g.results=[]),g.facets||(g.facets=[]),g.pagination||(g.pagination={page:a,pageSize:y,totalResults:g?.totalResults||((R=g?.results)==null?void 0:R.length)||0,totalPages:Math.ceil((g?.totalResults||((P=g?.results)==null?void 0:P.length)||0)/y)});let m=g.merchandising||{};const b=((H=g.results)==null?void 0:H.length)||0,_=((G=g.pagination)==null?void 0:G.totalResults)||g.totalResults||b,S=y,k=(a-1)*S;
842if(a===1&&b<S&&_>k+b){const D=Math.ceil(S*1.5);try{const C=v.map(L=>L.startsWith("resultsPerPage=")?`resultsPerPage=${D}`:L),T=`${w}?${C.join("&")}`,j=await Ce.get(T,{headers:{"Content-Type":"application/json","searchspring-user-id":h(),"searchspring-session-id":h(),"searchspring-page-load-id":h()}});((U=(Q=j.data)==null?void 0:Q.results)==null?void 0:U.length)>b&&(g.results=j.data.results.slice(0,S),j.data.merchandising&&(m=j.data.merchandising))}catch(C){console.warn("Failed to fetch buffered results:",C)}}return{results:g,meta:{sortOptions:((V=g.sorting)==null?void 0:V.options)||[{field:"relevance",label:"Relevance",direction:"desc"},{field:"ss_price",label:"Price: Low to High",direction:"asc"},{field:"ss_price",label:"Price: High to Low",direction:"desc"},{field:"ss_days_since_published",label:"Newest",direction:"asc"},{field:"title",label:"Name: A - Z",direction:"asc"},{field:"title",label:"Name: Z - A",direction:"desc"}]},merchandising:m}},I0=async({query:e,filters:t={},ranges:r={},page:n=1,pageSize:i=50,sort:s=void 0,gridColumns:a=null})=>{var S,k,N,R,P,H;if(!e||e.trim()==="")return{results:{results:[],facets:[],pagination:{page:1,pageSize:50,totalResults:0,totalPages:0}},meta:{}};const{ranges:o}=Ql(typeof window<"u"?window.location.search:""),l={...o,...r},c=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(G){const Q=Math.random()*16|0;return(G==="x"?Q:Q&3|8).toString(16)}),u=[],f=!isNaN(n)&&n>0?n:1,h=eh(i,a);if(u.push("siteId=qva9ht"),u.push(`q=${encodeURIComponent(e.trim())}`),u.push(`resultsPerPage=${h}`),u.push("resultsFormat=native"),u.push(`page=${f}`),Object.entries(t).forEach(([G,Q])=>{Q&&Q.length>0&&Q.forEach(U=>{u.push(`filter.${G}=${encodeURIComponent(U)}`)})}),Object.entries(l||{}).forEach(([G,Q])=>{Q&&(typeof Q.min=="number"||typeof Q.max=="number")&&(typeof Q.min=="number"&&u.push(`filter.${G}.low=${Q.min}`),typeof Q.max=="number"&&u.push(`filter.${G}.high=${Q.max}`))}),s&&s.field){const G=s.field;let Q=s.direction||"asc";if(s.label)switch(s.label.toLowerCase()){case"name: a - z":Q="asc";break;case"name: z - a":Q="desc";break;case"price: low to high":Q="asc";break;case"price: high to low":Q="desc";break;default:Q=s.direction||s.label||"asc";break}u.push(`sort.${G}=${Q}`)}const v="https://qva9ht.a.searchspring.io/api/search/search.json",y=`${v}?${u.join("&")}`,x=(await Ce.get(y,{headers:{"Content-Type":"application/json","searchspring-user-id":c(),"searchspring-session-id":c(),"searchspring-page-load-id":c()}})).data;if(!x)return{results:{results:[],facets:[],pagination:{page:f,pageSize:h,totalResults:0,totalPages:0}},meta:{}};if(x.results||(x.results=[]),x.facets||(x.facets=[]),x.pagination){const G=x.pagination;typeof G.page=="string"&&(G.page=parseInt(G.page,10)),!G.totalResults&&x.totalResults&&(G.totalResults=x.totalResults),!G.totalPages&&G.totalResults&&(G.totalPages=Math.ceil(G.totalResults/(G.pageSize||h))),G.pageSize||(G.pageSize=h)}else{const G=x?.totalResults||((S=x?.results)==null?void 0:S.length)||0;x.pagination={page:f,pageSize:h,totalResults:G,totalPages:Math.ceil(G/h)}}let p=x.merchandising||{};const g=((k=x.results)==null?void 0:k.length)||0,m=((N=x.pagination)==null?void 0:N.totalResults)||x.totalResults||g,b=h,_=(f-1)*b;if(f===1&&g<b&&m>_+g){const Q=Math.ceil(b*1.5);try{const U=u.map(D=>D.startsWith("resultsPerPage=")?`resultsPerPage=${Q}`:D),V=`${v}?${U.join("&")}`,A=await Ce.get(V,{headers:{"Content-Type":"application/json","searchspring-user-id":c(),"searchspring-session-id":c(),"searchspring-page-load-id":c()}});((P=(R=A.data)==null?void 0:R.results)==null?void 0:P.length)>g&&(x.results=A.data.results.slice(0,b),A.data.merchandising&&(p=A.data.merchandising))}catch(U){console.warn("Failed to fetch buffered results:",U)}}return{results:x,meta:{sortOptions:((H=x.sorting)==null?void 0:H.options)||[{field:"relevance",label:"Relevance",direction:"desc"},{field:"ss_price",label:"Price: Low to High",direction:"asc"},{field:"ss_price",label:"Price: High to Low",direction:"desc"},{field:"ss_days_since_published",label:"Newest",direction:"asc"},{field:"title",label:"Name: A - Z",direction:"asc"},{field:"title",label:"Name: Z - A",direction:"desc"}]},merchandising:p}},rh=(e,t)=>{var s;const r=(s=t?.content)==null?void 0:s.inline;if(!Array.isArray(r)||r.length===0)return e;const n=[...e];return[...r].sort((a,o)=>{var u,f,h,v;const l=((f=(u=a?.config)==null?void 0:u.position)==null?void 0:f.index)??1/0;return(((v=(h=o?.config)==null?void 0:h.position)==null?void 0:v.index)??1/0)-l}
842).forEach((a,o)=>{var u,f;const l=((f=(u=a?.config)==null?void 0:u.position)==null?void 0:f.index)??n.length,c=Math.min(l,n.length);n.splice(c,0,{_isBanner:!0,_bannerHtml:a.value||a,_bannerId:`inline-${o}`})}),n},R0=e=>{if(!e||e.length===0)return{min:0,max:1e3};const t=e.map(r=>{var s,a,o,l,c;const n=r.price||r.ss_price||r.Price||r.msrp||((a=(s=r.variants)==null?void 0:s[0])==null?void 0:a.price)||((l=(o=r.variants)==null?void 0:o[0])==null?void 0:l.Price)||((c=r.uid)==null?void 0:c.split("_").pop()),i=typeof n=="number"?n:parseFloat(n);if(isNaN(i)&&r.uid){const u=r.uid.split("_"),f=u[u.length-1],h=parseFloat(f);if(!isNaN(h))return h}return i}).filter(r=>!isNaN(r)&&r>0);return t.length===0?{min:0,max:1e3}:{min:Math.min(...t),max:Math.max(...t)}},ca=(e,t,r)=>{const{hasOtherFilters:n,hasSortApplied:i}=Wl(e,t,r);return n||i},Wl=(e,t,r)=>{const n=Object.values(e).some(a=>Array.isArray(a)&&a.length>0),i=Object.values(t).some(a=>a&&(a.min!==void 0||a.max!==void 0));return{hasValueFilters:n,hasRangeFilters:i,hasSortApplied:r!==null,hasOtherFilters:n||i}},oj=(e,t,r=1,n=null)=>{const i=new URLSearchParams,a=new URLSearchParams(window.location.search).get("q");return a&&i.set("q",a),Object.entries(e).forEach(([o,l])=>{l&&l.length&&i.set(`filter.${o}`,l.join(","))}),Object.entries(t).forEach(([o,l])=>{if(l&&(typeof l.min=="number"||typeof l.max=="number")){const c=typeof l.min=="number",u=typeof l.max=="number",f=`${c?l.min:""}..${u?l.max:""}`;i.set(`filter.${o}`,f)}}),r&&r>1&&i.set("page",r),n&&i.set("sort",n.label),`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}`},F0=(e,t,r,n)=>{const i=R0(n);return P0(e||[]).map(s=>{var a,o;if(s.type==="value")return{...s,values:s.values.map(l=>{var c;return{...l,selected:((c=t[s.field])==null?void 0:c.includes(l.value))||!1}})};if(s.type==="range"){const l=s.field==="price"||s.field==="ss_price";return{...s,min:l&&s.min===void 0?i.min:s.min,max:l&&s.max===void 0?i.max:s.max,selectedMin:(a=r[s.field])==null?void 0:a.min,selectedMax:(o=r[s.field])==null?void 0:o.max}}return s})},nh=e=>{const[t,r]=E.useState({}),[n,i]=E.useState({}),[s,a]=E.useState(1),[o,l]=E.useState(null),[c,u]=E.useState(null);E.useEffect(()=>{const m=()=>{const{filters:_,ranges:S}=Ql();r(_),i(S);const k=new URLSearchParams(window.location.search),N=k.get("page"),R=N?parseInt(N,10):1;a(R>0?R:1),u(k.get("sort"))};m();const b=()=>{m()};return window.addEventListener("popstate",b),()=>{window.removeEventListener("popstate",b)}},[]),E.useEffect(()=>{var _;const m=(_=e?.meta)==null?void 0:_.sortOptions;if(!m)return;if(!c){o&&l(null);return}if(o?.label===c)return;const b=m.find(S=>S.label===c);l(b||null)},[e,c,o]);const f=E.useCallback((m,b,_=1,S=null)=>{const k=oj(m,b,_,S);window.history.pushState({},"",k)},[]),h=E.useCallback((m,b)=>{r(_=>{const S=_[m]||[],k=S.includes(b)?S.filter(R=>R!==b):[...S,b],N={..._,[m]:k.length>0?k:void 0};return Object.keys(N).forEach(R=>{(!N[R]||N[R].length===0)&&delete N[R]}),a(1),f(N,n,1,o),N})},[n,o,f]),v=E.useCallback(m=>{r(b=>{const _={...b};return delete _[m],a(1),f(_,n,1,o),_})},[n,o,f]),y=E.useCallback((m,b,_)=>{i(S=>{const k={...S,[m]:{min:b,max:_}};return Object.keys(k).forEach(N=>{const R=k[N];(!R||typeof R.min!="number"&&typeof R.max!="number")&&delete k[N]}),a(1),f(t,k,1,o),k})},[t,o,f]),w=E.useCallback(()=>{r({}),i({}),l(null),u(null),a(1);const b=new URLSearchParams(window.location.search).get("q");b?window.history.pushState({},"",`${window.location.pathname}?q=${encodeURIComponent(b)}`):window.history.pushState({},"",window.location.pathname)},[]),x=E.useCallback((m,b)=>{r(m),i(b),a(1),f(m,b,1,o)},[o,f]),p=E.useCallback(m=>{l(m),u(m?.label??null),a(1),f(t,n,1,m)},[t,n,f]),g=E.useCallback(m=>{a(m),f(t,n,m,o),window.scrollTo({top:0,behavior:"smooth"})},[t,n,o,f]);return{filters:t,ranges:n,currentPage:s,sort:o,handleToggleValue:h,handleClearField:v,handleSetRange:y,handleClearAll:w,handleApplyFilters:x,handleSortChange:p,handlePageChange:g,setCurrentPage:a}},lj=768,bd=`(min-width: ${lj}px)`,cj="collection_grid_columns",Qm=()=>{try{const e=localStorage.getItem(cj);if(e){const t=parseInt(e,10);if([1,2,3,4].includes(t))return t}}catch(e){console.warn("Error loading grid columns from localStorage:",e)}return null},Wm=()=>window.innerWidth<990?2:3,ih=()=>{const[e,t]=E.useState(()=>!window.matchMedia(bd).matches);return E.useEffect(()=>{const r=window.matchMedia(bd),n=i=>t(!i.matches);
842return t(!r.matches),r.addEventListener("change",n),()=>r.removeEventListener("change",n)},[]),e},A0=()=>{const[e,t]=E.useState(()=>Qm()??Wm()),[r,n]=E.useState(!1);return E.useEffect(()=>{const i=window.matchMedia(bd),s=()=>n(i.matches),a=()=>{Qm()===null&&t(Wm())};return s(),a(),i.addEventListener("change",s),window.addEventListener("resize",a),()=>{i.removeEventListener("change",s),window.removeEventListener("resize",a)}},[]),{gridColumns:e,setGridColumns:t,sidebarOpen:r,setSidebarOpen:n}},Pi={fabric_set:"Fabric",fabric_type:"Fabric Type",microd_name:"Microd Name",base_set:"Base Set",variant_color_order:"Variant Color Order",product_type:"Product Type",vendor:"Vendor",tags:"Tags",price:"Price",compare_at_price:"Compare at Price",available_for_sale:"Available for Sale",quantity_available:"Quantity Available",created_at:"Created At",updated_at:"Updated At",published_at:"Published At",status:"Status",taxable:"Taxable",tax_code:"Tax Code",ss_price:"Price",tags_color:"Color",tags_collection:"Collection",tags_material:"Material",ss_created_at:"SS Created At",ss_updated_at:"SS Updated At",ss_published_at:"SS Published At"};function uj(){return typeof window>"u"||!window.productDiscountMessages?[]:window.productDiscountMessages.messages||[]}function L0(e){if(!e||!Array.isArray(e))return null;const t=uj();for(const r of e){const n=r.handle||r;for(const i of t)if(i.collectionId===n||i.collectionHandle===n)return i.message}return null}const dj=(e,t,r,n,i)=>{const[s,a]=E.useState(null),o=E.useCallback(h=>{a(h)},[]),l=E.useCallback(()=>{a(null)},[]),c=E.useCallback(h=>{if(!h)return h;const v={...h};return v.url&&!v.url.includes("width=")&&(v.url=v.url.includes("?")?`${v.url}&width=400`:`${v.url}?width=400`),v},[]),u=E.useCallback(()=>{var h,v;if(r&&((v=(h=e?.images)==null?void 0:h.edges)==null?void 0:v.length)>1&&!(i&&n)){const y=e.images.edges[1].node;return c(y)}return s?{url:s,altText:e?.title||"Product image",width:400,height:400}:t!=null&&t.image?c(t.image):c(e?.featuredImage)},[s,r,e,i,n,t,c]),f=E.useCallback(()=>{var h,v;return(v=(h=e?.images)==null?void 0:h.edges)!=null&&v.length?r&&e.images.edges[1]&&!(i&&n)?[c(e.images.edges[1].node)]:s?[{url:s,altText:e?.title||"Product image",width:400,height:400}]:i&&n?t!=null&&t.image?[c(t.image)]:[c(e.featuredImage)]:t!=null&&t.image?[c(t.image)]:[c(e.featuredImage)]:[]},[s,r,e,i,n,t,c]);return{customImageUrl:s,updateMainImage:o,resetMainImage:l,getCurrentImage:u,getCurrentImages:f}},M0=e=>{const t=E.useRef(null),r=E.useCallback(s=>!t.current||!s?null:s,[]),n=E.useCallback(async s=>{var c,u,f,h,v,y,w,x,p,g,m,b,_,S,k;if(e!=="card"||!s)return null;const a=s.variant||s;let o=null;if(a.featured_media)o=a.featured_media.src||a.featured_media.url;else if(a.image)o=a.image.src||a.image.url;else if(a.media&&a.media.length>0){const N=a.media[0];o=N.src||N.url}if(!o)return null;const l=Ar.get(o);if(l)return{url:o,altText:((c=a.featured_media)==null?void 0:c.alt)||((u=a.image)==null?void 0:u.alt)||((f=a.image)==null?void 0:f.altText)||((v=(h=a.media)==null?void 0:h[0])==null?void 0:v.alt)||"",width:l.width||400,height:l.height||400,srcset:l.srcset};try{const N=await Ar.preload(o);return{url:o,altText:((y=a.featured_media)==null?void 0:y.alt)||((w=a.image)==null?void 0:w.alt)||((x=a.image)==null?void 0:x.altText)||((g=(p=a.media)==null?void 0:p[0])==null?void 0:g.alt)||"",width:N.width||400,height:N.height||400,srcset:N.srcset}}catch(N){return console.warn("Failed to load and cache card image:",o,N),{url:o,altText:((m=a.featured_media)==null?void 0:m.alt)||((b=a.image)==null?void 0:b.alt)||((_=a.image)==null?void 0:_.altText)||((k=(S=a.media)==null?void 0:S[0])==null?void 0:k.alt)||"",width:400,height:400}}},[e]),i=E.useCallback(s=>[165,360,533,720,940,1066].map(o=>`${s}?width=${o} ${o}w`).join(", ")+`, ${s} 1400w`,[]);return{rootRef:t,updateCardImageState:r,updateCardImageWithCache:n,generateSrcset:i}},fj=({productId:e,selectedVariant:t=null,className:r="",showImage:n=!0,showTitle:i=!0,showPrice:s=!0,showSwatches:a=!0,linkToProduct:o=!0,swatchSize:l="small",swatchShape:c="circle",maxSwatchesVisible:u=4,showSwatchLabels:f=!1,filterByF
842abricType:h=null,sortBy:v="name",position:y="card",onVariantChange:w=null,enableLabel:x=!1,shape:p="circle",size:g="small",showLabels:m=!1,customTags:b=[]})=>{var ja,Ji,Yi,J;const _=`gid://shopify/Product/${e}`,{loading:S,error:k,data:N}=Sr(hk,{variables:{id:_},skip:!e,errorPolicy:"all"}),{product:R,loading:P,error:H,processedOptions:G,processedVariants:Q}=c0(((ja=N?.product)==null?void 0:ja.handle)||""),U=N?.product||R,A=E.useMemo(()=>{var I,ee;return(ee=(I=N?.product)==null?void 0:I.variants)!=null&&ee.edges?N.product.variants.edges.map(ae=>{const re=ae.node;return{...re,fabric_set:re.fabric_set,base_set:re.base_set,fabric_base:re.fabric_base,color_swatch:re.color_swatch,material_info:re.material_info,microd_name:re.microd_name}}):null},[(Yi=(Ji=N?.product)==null?void 0:Ji.variants)==null?void 0:Yi.edges])||Q;let D,C,T;try{const I=Er();D=I.swatches,C=I.loading,T=I.error}catch{D={},C=!1,T=null}const[j,L]=E.useState(null),[M,B]=E.useState(t),[z,X]=E.useState(!1),[ce,Z]=E.useState(null),[q,F]=E.useState(null),[K,oe]=E.useState(null),[de,le]=E.useState([]),[xe,jt]=E.useState(""),[Jt,ht]=E.useState(!1),{rootRef:ye}=M0(y),{updateCustomizationImage:on}=Xf({onImageChange:I=>{w&&w({imageUrl:I})},autoUpdate:y!=="card"});E.useEffect(()=>{var I;if(j&&(I=j.fabric_set)!=null&&I.value){const ae=j.fabric_set.value.split(",").map(re=>re.trim());ae.length>0&&Z(ae[0])}},[j]),E.useEffect(()=>{var I,ee;(I=U?.images)!=null&&I.edges&&U.images.edges.length>=2?(le([U.images.edges[0].node.url,U.images.edges[1].node.url]),jt(U.images.edges[1].node.url)):(ee=U?.images)!=null&&ee.edges&&U.images.edges.length===1&&(le([U.images.edges[0].node.url]),jt(""))},[U]);const kr=E.useCallback(I=>{if(!ye.current||!I)return;const ee=ye.current.querySelector(".product-card__image img");ee&&(p0(ee,I),ee.onerror=()=>{console.error("Failed to load custom image:",I)},ee.onload=()=>{})},[]),Yt=(J=N?.product)==null?void 0:J.handle,Hl=E.useMemo(()=>A?A.some(ee=>{var ue,he,we,je,Ot,cn;const ae=((ue=ee.fabric_set)==null?void 0:ue.value)||((we=(he=ee.metafields)==null?void 0:he.fabric_set)==null?void 0:we.value),re=((je=ee.base_set)==null?void 0:je.value)||((cn=(Ot=ee.metafields)==null?void 0:Ot.base_set)==null?void 0:cn.value);return ae||re}):!1,[A]),{filteredSwatches:Ln,swatchesLoading:Gl}=ql(A||[],"all"),Ea=E.useMemo(()=>U!=null&&U.metafields?U.metafields.some(I=>I&&(I.key==="fabric_set"||I.key==="base_set")):!1,[U?.metafields]),qi=Hl||Ea;dj(U,M,z,qi,ce);const{handleVariantChange:Vi,updateURLWithVariantParams:Qi}=$l(Yt,M,I=>{B(I),w&&w(I)},{updateUrl:y!=="card"}),Wi=v0(),ot=E.useCallback(I=>{if(!I)return null;if(typeof I=="number")return I;if(typeof I=="string"){const ee=I.match(/(\d+)$/);return ee?ee[1]:I}return I},[]),Mn=E.useCallback(I=>D&&D[I]||null,[D]),ka=E.useCallback(()=>{window.location.href=`/products/${Yt}`},[Yt]),Kl=E.useCallback((I,ee)=>{var ae;if(oe(null),F({fabricName:I,swatch:ee}),A){const re=A.find(ue=>{var je;const he=(je=ue.fabric_set)==null?void 0:je.value;return he?he.split(",").map(Ot=>Ot.trim()).includes(I):!1});if(re){const ue=((ae=re.microd_name)==null?void 0:ae.value)||re.microd_name||re.sku;if(ue){const he=`https://configure.jonathanadler.com/renderserver.aspx?ID=jnthndlr001&Key=xW8P0Gew&Catalog=1145&sku=${encodeURIComponent(ue)}&body=${I.toLowerCase().replace(/\s+/g,"_")}&finish=no_base&width=350`;kr(he),console.log("customURL",he),le([he,xe]),ht(!0)}L(re),B(re),Z(I),w&&w(re)}}},[A,on,kr,w,xe,y]),Hi=E.useCallback(I=>{if(y!=="card"||!I)return;const ee=ye.current,ae=ee?ee.closest(".product-card-wrapper"):null;if(!ae)return;const re=I.variant||I;
842if(!(re!=null&&re.id))return;const ue=ot(re.id),he=re.url||`/products/${Yt}?variant=${ue}`,we=ae.querySelector("[data-card-variant-link]");we&&(we.href=he),ae.querySelectorAll("a.full-unstyled-link, a.product__view-details").forEach(cn=>{cn.href=he}),ae.querySelectorAll("[data-product-url]").forEach(cn=>{cn.setAttribute("data-product-url",he)})},[y,Yt,ot]),Ca=E.useCallback(I=>!A||!I?null:A.find(ee=>ee.selectedOptions.every(ae=>{const re=I.find(ue=>ue.name===ae.name);return re&&re.value===ae.value})),[A]),Jl=E.useCallback((I,ee)=>{const ae=G.map(ue=>{var he,we;return{name:ue.name,value:ue.name===I?ee:((we=(he=M?.selectedOptions)==null?void 0:he.find(je=>je.name===ue.name))==null?void 0:we.value)||ue.values[0]}}),re=Ca(ae);if(re){if(F(null),oe(null),console.log("optionName",I,re),I==="Color"){const ue=Mn(ee);oe({color:ee,swatch:ue})}le(ue=>{var he;return[(he=re?.image)==null?void 0:he.url,ue[1]||""]}),L(re),Hi(re),Vi(re)}},[G,M,Ca,Vi,Yt,y,Hi,Mn,Qi,kr]);if(S||P)return d.jsx("div",{className:`product-by-id loading ${r}`,children:d.jsxs("div",{className:"product-card-with-swatches loading",children:[n&&d.jsx("div",{className:"product-card__image-placeholder"}),d.jsxs("div",{className:"product-card__content",children:[i&&d.jsx("div",{className:"product-card__title-placeholder"}),s&&d.jsx("div",{className:"product-card__price-placeholder"}),a&&d.jsx("div",{className:"product-card__swatches-placeholder"})]})]})});if(k||H)return console.error("Error loading product by ID:",k||H),d.jsx("div",{className:`product-by-id error ${r}`,children:d.jsxs("p",{children:["Error loading product: ",(k||H).message]})});if(!U)return d.jsx("div",{className:`product-by-id not-found ${r}`,children:d.jsx("p",{children:"Product not found"})});const{handle:Cr,title:Dn}=U,Gi=()=>{var I;return M!=null&&M.price?M.price:(I=U?.priceRange)==null?void 0:I.minVariantPrice},Ki=()=>{var I;return M!=null&&M.compareAtPrice?M.compareAtPrice:((I=U?.compareAtPriceRange)==null?void 0:I.maxVariantPrice)||null},zn=()=>y==="card"?"product-swatches-by-handle__option-group--card":"product-swatches-by-handle__option-group tw-mb-[30px]",Na=()=>{if(!(U!=null&&U.priceRange))return null;const{minVariantPrice:I,maxVariantPrice:ee}=U.priceRange;return Number(I.amount)===Number(ee.amount)?!1:`$${Nr(I)} - $${Nr(ee)}`},Nr=I=>{const ee=typeof I=="object"&&I?.amount!=null?Number(I.amount):Number(I);return Number.isFinite(ee)?ee.toFixed(2):"0.00"},ln=()=>{var dh,fh,hh;const I=Gi(),ee=Na(),ae=Ki(),re=((hh=(fh=(dh=N?.product)==null?void 0:dh.collections)==null?void 0:fh.edges)==null?void 0:hh.map(_e=>_e.node))||[],ue=L0(re);let he=!1,we=!1,je=!1,Ot=!1;return(b.length>0?b:U?.tags||[]).forEach(_e=>{_e.includes("status:Markdown")&&(he=!0),_e.includes("status:SpecialOffers")&&(we=!0),_e.includes("status:New")&&(je=!0)}),re.forEach(_e=>{_e.handle==="bestsellers"&&(Ot=!0)}),d.jsxs(d.Fragment,{children:[n&&d.jsxs("a",{className:`product-card__image tw-border-none tw-box-shadow-none ${Wi?"mobile-slider":""}`,href:M?`/products/${Cr}?variant=${ot(M.id)}`:`/products/${Cr}`,style:{position:"relative",cursor:"pointer"},children:[de.map((_e,Je)=>d.jsx("img",{src:_e,alt:Dn,width:100,height:100,className:`product-card__image product-card__image-${Je===0?"main":"secondary tw-absolute tw-top-0 tw-left-0"} ${Je===0&&Jt?"image-fabric-updated":""}`},Je)),(he||we||je||Ot)&&d.jsx("div",{className:"tw-flex tw-flex-wrap tw-gap-2 tw-absolute tw-top-4 tw-left-4 tw-whitespace-nowrap",children:he?d.jsx("span",{className:"tw-inline-flex tw-items-center tw-px-3 tw-py-2 tw-font-semibold tw-bg-white sale-badge tw-uppercase tw-tracking-wide tw-leading-none",children:"CLEARANCE"}):we?d.jsx("span",{className:"tw-inline-flex tw-items-center tw-px-3 tw-py-2 tw-font-semibold tw-bg-white sale-badge tw-uppercase tw-tracking-wide tw-leading-none",children:"SPECIAL OFFER"}):je?d.jsx("span",{className:"tw-inline-flex tw-items-center tw-px-3 tw-py-2 tw-font-semibold tw-bg-white new-badge tw-uppercase tw-tracking-wide tw-leading-none",children:"NEW"}):Ot?d.jsx("span",{className:"tw-inline-flex tw-items-center tw-px-3 tw-py-2 tw-bg-white bestseller-badge tw-uppercase tw-tracking-wide tw-leading-none",children:"BESTSELLER"}):null})]}),d.jsxs("div",{className:"product-card__content",children:[a&&(qi?d.jsxs("div",{className:zn(),children:[x&&d.jsx("h3",{className:"product-swatches-by-handle__option-title",children:d.jsx("span",{className:"tw-uppercase",children:"Color:"})}),d.jsx("div",{className:"product-swatches-by-handle__option-values",children:Gl?Array.from({length:4}).map((_e,Je)=>d.jsx("div",{className:"Ytw-w-[25px] tw-h-[25px] tw-border tw-border-gray-200 tw-animate-pulse tw-bg-gray-200"},`skeleton-${Je}`)):Object.keys(Ln).length>0?d.jsxs(d.Fragment,{children:[Object.entries(Ln).slice(0,4).map(([_e,Je],Yl)=>{var Zi;const Xi=q?q.fabricName===_e:((Zi=M?.fabric_set)==null?void 0:Zi.value)&&M.fabric_set.value.split(",").map(Oa=>Oa.trim()).includes(_e);return d.jsx("div",{className:`tw-inline-block tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-scale-105 ${Xi?"swatch-card-active ":""}`,title:_e,onClick:()=>{Kl(_e,Je)},children:Je.image?d.jsx(Oi,{src:Je.image.url,alt:_e,width:32,height:32,className:`tw-w-[25px] tw-h-[25px] tw-object-cover tw-border-2 tw-transition-all tw-duration-200 ${Xi?"tw-border-black tw-shadow-md":"tw-border-gray-200 hover:tw-border-gray-400"}`,sizes:"32px",eager:Yl<4}):d.jsx("div",{className:`tw-w-[25px] tw-h-[25px] tw-border-2 tw-flex tw-items-center tw-justify-center tw-text-xs tw-font-medium tw-transition-all tw-duration-200 ${Xi?"tw-border-black tw-bg-gray-50 tw-text-black tw-shadow-md":"tw-border-gray-200 tw-bg-gray-50 hover:tw-border-gray-400"}`,children:_e.charAt(0).toUpperCase()})},_e)}),Object.keys(Ln).length>4&&d.jsx("div",{className:"tw-inline-block tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-scale-105",title:`${Object.keys(Ln).length-4} more colors available`,onClick:()=>{ka()},children:d.jsx("div",{className:"text-view-more-swatches",children:"+ More"})})]}):d.jsx("div",{className:"tw-flex tw-gap-2",children:["Blue","Red","Green"].map((_e,Je)=>d.jsx("div",{className:"tw-w-[25px] tw-h-[25px] tw-border-2 tw-border-gray-200 tw-bg-gray-100 tw-flex tw-items-center tw-justify-center tw-text-xs tw-font-medium tw-cursor-pointer hover:tw-border-gray-400 tw-transition-all tw-duration-200",title:`${_e} (Test)`,children:_e.charAt(0)},_e))})})]}):G.map(_e=>_e.name==="Color"?d.jsxs("div",{className:zn(),children:[x&&d.jsx("h3",{className:"product-swatches-by-handle__option-title",children:d.jsxs("span",{className:"tw-uppercase",children:[_e.name,":"]})}),d.jsx("div",{className:"product-swatches-by-handle__option-values",children:_e.values.map(Je=>{var Zi;const Yl=Mn(Je),Xi=K?K.color===Je:(Zi=M?.selectedOptions)==null?void 0:Zi.some(Oa=>Oa.name===_e.name&&Oa.value===Je);return d.jsx(Pn,{color:Je,swatch:Yl,selected:Xi,onClick:()=>Jl(_e.name,Je),shape:p,size:g,showLabel:m},`${_e.name}-${Je}`)})})]},_e.name):null)),i&&d.jsx("h3",{className:"product-card__title",children:d.jsx("a",{href:M?`/products/${Cr}?variant=${ot(M.id)}`:`/products/${Cr}`,className:"product-card__title-link disabled-white-text",children:Dn})}),s&&ee&&!M?d.jsx("p",{className:"product-card__price is-range",children:ee}):I&&d.jsxs("p",{className:"product-card__price single-price",children:["$",Nr(I),ae&&Number(I.amount)<Number(ae.amount)&&d.jsxs("span",{className:"product-card__compare-price",children:["$",Nr(ae)]})]}),ue&&d.jsx("p",{className:"product-card__discount-message",children:ue})]})]})};return o?d.jsx("div",{className:`product-card-by-id ${r}`,ref:ye,children:d.jsx("div",{className:"product-card__link",children:d.jsx(ln,{})})}):d.jsx("div",{className:`product-card-by-id ${r}`,ref:ye,children:d.jsx(ln,{})})},_a=E.memo(fj);class hj{constructor(){this.cache=new Map,this.pendingRequests=new Map,this.cacheTimeout=3e5}getCacheKey(t){return`metafields_${t}`}get(t){const r=this.getCacheKey(t),n=this.cache.get(r);return n&&Date.now()-n.timestamp<this.cacheTimeout?n.data:(n&&this.cache.delete(r),null)}set(t,r){const n=this.getCacheKey(t);this.cache.set(n,{data:r,timestamp:Date.now()})}getPending(t){return this.pendingRequests.get(this.getCacheKey(t))}setPending(t,r){this.pendingRequests.set(this.getCacheKey(t),r)}deletePending(t){this.pendingRequests.delete(this.getCacheKey(t))}clear(){this.cache.clear(),this.pendingRequests.clear()}}const Un=new hj,pj=` 843query($handle: String!) { 844 product(handle: $handle) { 845 id 846 handle 847 metafields(identifiers: [ 848 {namespace: "yotpo", key: "reviews_average"} 849 ]) { 850 id 851 namespace 852 key 853 value 854 type 855 } 856 } 857}`,mj=e=>{const[t,r]=E.useState(null),[n,i]=E.useState(!1),[s,a]=E.useState(null),o=E.useRef(null);return E.useEffect(()=>{if(o.current&&o.current.abort(),!e||typeof e!="string"){i(!1),r(null),a(null);return}const l=new AbortController;return o.current=l,(async()=>{i(!0),a(null);const u=Un.get(e);if(u!==null){r(u),i(!1);return}const f=Un.getPending(e);if(f){try{const v=await f;l.signal.aborted||r(v)}catch(v){!l.signal.aborted&&v.name!=="CanceledError"&&a(v)}finally{l.signal.aborted||i(!1)}return}const h=(async()=>{var v,y,w;try{const x=await Ce({url:jl(),method:"POST",headers:Ol(),data:{query:pj,variables:{handle:e}},signal:l.signal});if(x.data.errors)throw new Error(((v=x.data.errors[0])==null?void 0:v.message)||"GraphQL error occurred");const p=(w=(y=x.data)==null?void 0:y.data)==null?void 0:w.product;let g=null;return p!=null&&p.reviews_average?g=[p.reviews_average]:p!=null&&p.metafields&&p.metafields.length>0&&(g=p.metafields),Un.set(e,g),Un.deletePending(e),l.signal.aborted||r(g),g}catch(x){throw Un.deletePending(e),x}})();Un.setPending(e,h);try{await h}catch(v){!l.signal.aborted&&v.name!=="CanceledError"&&a(v)}finally{l.signal.aborted||i(!1)}})(),()=>{o.current&&o.current.abort()}},[e]),{loading:n,error:s,metafields:t}},gj=(e,t=300)=>{const[r,n]=E.useState(e);return E.useEffect(()=>{const i=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(i)}},[e,t]),r},vj=/_(pico|icon|thumb|small|compact|medium|large|grande|original|master|\d+x\d*|\d*x\d+)\./,yj=e=>!e||typeof e!="string"?e:e.replace(vj,"."),_o=(e,t)=>{if(!e||typeof e!="string")return e;if(e.includes("cdn.shopify.com")){const r=yj(e),[n,i]=r.split("?"),s=i?`?${i}&width=${t}`:`?width=${t}`;return`${n}${s}`}return e},Qc=e=>!e||typeof e!="string"||!e.includes("cdn.shopify.com")?void 0:[360,533,720,940,1066].map(r=>`${_o(e,r)} ${r}w`).join(", "),wj=e=>{if(typeof e!="string")return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value},Sa=E.memo(({product:e,className:t="",showImage:r=!0,showTitle:n=!0,showPrice:i=!0,showSwatches:s=!0,linkToProduct:a=!0,swatchSize:o="small",swatchShape:l="circle",maxSwatchesVisible:c=4,showSwatchLabels:u=!1,enableLabel:f=!1,shape:h="circle",size:v="small",showLabels:y=!1})=>{const w=E.useRef(null),x=v0(),[p,g]=E.useState(null),[m,b]=E.useState(null),[_,S]=E.useState(null),[k,N]=E.useState(null),[R,P]=E.useState(null),[H,G]=E.useState([]),[Q,U]=E.useState(""),[V,A]=E.useState(!1);let D={};try{D=Er().swatches||{}}catch{}if(!e)return d.jsx("div",{className:`searchspring-product-card not-found ${t}`,children:d.jsx("p",{children:"Product not found"})});const{name:C,price:T,msrp:j,compare_at_price:L,thumbnailImageUrl:M,imageUrl:B,url:z,url_name:X,tags:ce,collection_name:Z}=e,q=wj(C),F=X||z?.split("/").pop()||"",K=gj(F,500),{metafields:oe}=mj(K||null),de=!e.options||e.options.length===0||!e.images||!Array.isArray(e.images)||e.images.length<2,{product:le}=Ul(de?K:null),xe=E.useMemo(()=>!de||!le?e:{...e,options:le.options||e.options,variants:le.variants||e.variants,collections:le.collections||e.collections,tags:le.tags||e.tags,images:le.images||e.images},[e,le,de]);E.useMemo(()=>{var J;
857return oe?(J=oe.find(I=>I?.key=="reviews_average"))==null?void 0:J.value:null},[oe]);const jt=E.useMemo(()=>xe.options?xe.options.map(J=>({id:J.id||J.name,name:J.name,values:J.values||[]})):[],[xe.options]),Jt=E.useMemo(()=>xe.variants?xe.variants.map(J=>{var ee,ae,re;const I=J.node||J;return{id:((ee=I.id)==null?void 0:ee.toString())||((ae=I.variant_id)==null?void 0:ae.toString()),title:I.title||I.name,sku:I.sku,availableForSale:I.availableForSale??I.available??!0,price:I.price?typeof I.price=="object"?I.price:{amount:I.price,currencyCode:"USD"}:null,compareAtPrice:I.compareAtPrice||(I.compare_at_price?{amount:I.compare_at_price,currencyCode:"USD"}:null),selectedOptions:I.selectedOptions||((re=I.options)==null?void 0:re.map((ue,he)=>{var we,je;return{name:((je=(we=xe.options)==null?void 0:we[he])==null?void 0:je.name)||`Option${he+1}`,value:ue}}))||[],image:I.image?typeof I.image=="object"?I.image:{url:I.image,altText:I.title||q}:null,fabric_set:I.fabric_set?typeof I.fabric_set=="object"?I.fabric_set:{value:I.fabric_set}:null,base_set:I.base_set?typeof I.base_set=="object"?I.base_set:{value:I.base_set}:null,microd_name:I.microd_name||I.sku,metafields:I.metafields||{}}}):[],[xe.variants,xe.options,q]),ht=jt,ye=Jt,{filteredSwatches:on,fabricSwatches:kr,swatchesLoading:Yt}=ql(ye||[],"all"),Hl=E.useMemo(()=>ye?ye.some(I=>{var re,ue,he,we,je,Ot;const ee=((re=I.fabric_set)==null?void 0:re.value)||((he=(ue=I.metafields)==null?void 0:ue.fabric_set)==null?void 0:he.value),ae=((we=I.base_set)==null?void 0:we.value)||((Ot=(je=I.metafields)==null?void 0:je.base_set)==null?void 0:Ot.value);return ee||ae}):!1,[ye]),Ln=E.useMemo(()=>e.metafields?(Array.isArray(e.metafields)?e.metafields:Object.values(e.metafields)).some(I=>I&&(I.key==="fabric_set"||I.key==="base_set")):!1,[e.metafields]),Gl=Hl||Ln,Ea=E.useMemo(()=>{var J;if(!ye)return null;for(const I of ye){const ee=((J=I.microd_name)==null?void 0:J.value)||(typeof I.microd_name=="string"?I.microd_name:null);if(ee&&ee!==I.sku)return ee}return null},[ye]);M0("card"),Xf({onImageChange:J=>{},autoUpdate:!1});const qi=J=>{const I=typeof J=="string"?parseFloat(J):J;return I?I.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2}):"0.00"},Vi=typeof T=="string"?parseFloat(T):T||0,Qi=j||L,Wi=typeof Qi=="string"?parseFloat(Qi):Qi||0,ot=B||e.image_url||e.image||M;E.useEffect(()=>{var J,I,ee,ae,re,ue,he;if((J=e.images)!=null&&J.edges&&e.images.edges.length>=2)G([e.images.edges[0].node.url,e.images.edges[1].node.url]),U(e.images.edges[1].node.url);else if(le!=null&&le.images&&Array.isArray(le.images)&&le.images.length>=2){const we=((I=le.images[0])==null?void 0:I.url)||le.images[0],je=((ee=le.images[1])==null?void 0:ee.url)||le.images[1];G([ot||we,je]),U(je)}else if(e.images&&Array.isArray(e.images)&&e.images.length>=2){const we=typeof e.images[0]=="string"?e.images[0]:((ae=e.images[0])==null?void 0:ae.src)||((re=e.images[0])==null?void 0:re.url),je=typeof e.images[1]=="string"?e.images[1]:((ue=e.images[1])==null?void 0:ue.src)||((he=e.images[1])==null?void 0:he.url);G([we,je]),U(je)}else ot&&(G([ot,""]),U(""))},[e.images,ot,le?.images]),E.useEffect(()=>{var J;if(p&&(J=p.fabric_set)!=null&&J.value){const ee=p.fabric_set.value.split(",").map(ae=>ae.trim());ee.length>0&&S(ee[0])}},[p]);const Mn=E.useCallback(J=>{if(!w.current||!J)return;const I=w.current.querySelector(".product-card__image img");I&&p0(I,J)},[]),ka=E.useCallback(J=>{if(!J)return null;if(typeof J=="number")return J;if(typeof J=="string"){const I=J.match(/(\d+)$/);return I?I[1]:J}return J},[]),Kl=E.useCallback((J,I)=>{var ee;if(P(null),N({fabricName:J,swatch:I}),ye){const ae=ye.find(re=>{var we;const ue=(we=re.fabric_set)==null?void 0:we.value;return ue?ue.split(",").map(je=>je.trim()).includes(J):!1});if(ae){const ue=((ee=ae.microd_name)==null?void 0:ee.value)||(typeof ae.microd_name=="string"&&ae.microd_name!==ae.sku?ae.microd_name:null)||Ea||ae.sku,he=d0(J);if(ue){const we=`https://configure.jonathanadler.com/renderserver.aspx?ID=jnthndlr001&Key=xW8P0Gew&Catalog=1145&sku=${encodeURIComponent(ue)}&body=${encodeURIComponent(he)}&finish=no_base&width=350`;Mn(we),G([we,Q]),A(!0)}g(ae),b(ae),S(J)}}},[ye,Mn,Q,Ea]),Hi=E.useCallback(J=>!ye||!J?null:ye.find(I=>I.selectedOptions.every(ee=>{const ae=J.find(re=>re.name===ee.name);return ae&&ae.value===ee.value})),[ye]),Ca=E.useCallback((J,I)=>{if(!ht)return;const ee=ht.map(re=>{var ue,he;return{name:re.name,value:re.name===J?I:((he=(ue=m?.selectedOptions)==null?void 0:ue.find(we=>we.name===re.name))==null?void 0:he.value)||re.values[0]}}),ae=Hi(ee);if(ae){if(N(null),P(null),J==="Color"){const re=Na(I);P({color:I,swatch:re})}G(re=>{var ue;return[((ue=ae?.image)==null?void 0:ue.url)||re[0],re[1]||""]}),g(ae),b(ae)}},[ht,m,Hi]),Jl=E.useMemo(()=>{const J=xe.tags||ce;return J?Array.isArray(J)?J:typeof J=="string"?J.split(",").map(I=>I.trim()):[]:[]},[xe.tags,ce]),Cr=E.useMemo(()=>Z?Array.isArray(Z)?Z:typeof Z=="string"?Z.split(",").map(J=>J.trim()):[]:[],[Z]);let Dn=!1,Gi=!1,Ki=!1,zn=!1;Jl.forEach(J=>{J.includes("status:Markdown")&&(Dn=!0),J.includes("status:SpecialOffers")&&(Gi=!0),J.includes("status:New")&&(Ki=!0)}),Cr.forEach(J=>{J==="bestsellers"&&(zn=!0)});const Na=E.useCallback(J=>D&&D[J]||null,[D]),Nr=z||`/products/${F}`,ln=Object.keys(on).length>0?on:kr,ja=E.useMemo(()=>{var J,I;return(J=xe.collections)!=null&&J.edges?xe.collections.edges.map(ee=>ee.node):(I=xe.collections)!=null&&I.nodes?xe.collections.nodes:Cr},[xe.collections,Cr]),Ji=L0(ja),Yi=()=>d.jsxs(d.Fragment,{children:[r&&d.jsxs("a",{href:m?`/products/${F}
857?variant=${ka(m.id)}`:Nr,className:`product-card__image ${x?"mobile-slider":""}`,style:{position:"relative",cursor:a?"pointer":"default"},children:[H.length>0?H.map((J,I)=>J&&d.jsx("img",{src:_o(J,800),srcSet:Qc(J),sizes:"(min-width: 1200px) 25vw, (min-width: 990px) 33vw, 50vw",alt:q,className:`product-card__image product-card__image-${I===0?"main":"secondary tw-absolute tw-top-0 tw-left-0"} ${I===0&&V?"image-fabric-updated":""}`,loading:I===0?"eager":"lazy",onError:I===0?ee=>{const ae=_o(ot,800);ot&&ee.currentTarget.src!==ae&&(ee.currentTarget.src=ae,ee.currentTarget.srcset=Qc(ot)||"")}:void 0},I)):ot?d.jsx("img",{src:_o(ot,800),srcSet:Qc(ot),sizes:"(min-width: 1200px) 25vw, (min-width: 990px) 33vw, 50vw",alt:q,className:"product-card__image product-card__image-main",loading:"lazy"}):null,(Dn||Gi||Ki||zn)&&d.jsx("div",{className:"tw-flex tw-flex-wrap tw-gap-2 tw-absolute tw-top-4 tw-left-4 tw-whitespace-nowrap",children:Dn?d.jsx("span",{className:"tw-inline-flex tw-items-center tw-px-3 tw-py-2 tw-font-semibold tw-bg-white sale-badge tw-uppercase tw-tracking-wide tw-leading-none",children:"CLEARANCE"}):Gi?d.jsx("span",{className:"tw-inline-flex tw-items-center tw-px-3 tw-py-2 tw-font-semibold tw-bg-white sale-badge tw-uppercase tw-tracking-wide tw-leading-none",children:"SPECIAL OFFER"}):Ki?d.jsx("span",{className:"tw-inline-flex tw-items-center tw-px-3 tw-py-2 tw-font-semibold tw-bg-white new-badge tw-uppercase tw-tracking-wide tw-leading-none",children:"NEW"}):zn?d.jsx("span",{className:"tw-inline-flex tw-items-center tw-px-3 tw-py-2 tw-bg-white bestseller-badge tw-uppercase tw-tracking-wide tw-leading-none",children:"BESTSELLER"}):null})]}),d.jsxs("div",{className:"product-card__content",children:[s&&(Gl?d.jsxs("div",{className:"product-swatches-by-handle__option-group--card",children:[f&&d.jsx("h3",{className:"product-swatches-by-handle__option-title",children:d.jsx("span",{className:"tw-uppercase",children:"Color:"})}),d.jsx("div",{className:"product-swatches-by-handle__option-values",children:Yt?Array.from({length:4}).map((J,I)=>d.jsx("div",{className:"tw-w-[25px] tw-h-[25px] tw-border tw-border-gray-200 tw-animate-pulse tw-bg-gray-200"},`skeleton-${I}`)):Object.keys(ln).length>0?d.jsxs(d.Fragment,{children:[Object.entries(ln).slice(0,4).map(([J,I],ee)=>{var re;const ae=k?k.fabricName===J:((re=m?.fabric_set)==null?void 0:re.value)&&m.fabric_set.value.split(",").map(ue=>ue.trim()).includes(J);return d.jsx("div",{className:`tw-inline-block tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-scale-105 ${ae?"swatch-card-active ":""}`,title:J,onClick:()=>{Kl(J,I)},children:I.image?d.jsx(Oi,{src:I.image.url,alt:J,width:32,height:32,className:`tw-w-[25px] tw-h-[25px] tw-object-cover tw-border-2 tw-transition-all tw-duration-200 ${ae?"tw-border-black tw-shadow-md":"tw-border-gray-200 hover:tw-border-gray-400"}`,sizes:"32px",eager:ee<4}):d.jsx("div",{className:`tw-w-[25px] tw-h-[25px] tw-border-2 tw-flex tw-items-center tw-justify-center tw-text-xs tw-font-medium tw-transition-all tw-duration-200 ${ae?"tw-border-black tw-bg-gray-50 tw-text-black tw-shadow-md":"tw-border-gray-200 tw-bg-gray-50 hover:tw-border-gray-400"}`,children:J.charAt(0).toUpperCase()})},J)}),Object.keys(ln).length>4&&d.jsx("div",{className:"tw-inline-block tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-scale-105",title:`${Object.keys(ln).length-4} more colors available`,onClick:()=>{window.location.href=Nr},children:d.jsx("div",{className:"text-view-more-swatches",children:"+ More"})})]}):null})]}):ht?.map(J=>J.name==="Color"?d.jsxs("div",{className:"product-swatches-by-handle__option-group--card",children:[f&&d.jsx("h3",{className:"product-swatches-by-handle__option-title",children:d.jsxs("span",{className:"tw-uppercase",children:[J.name,":"]})}),d.jsx("div",{className:"product-swatches-by-handle__option-values",children:J.values.map(I=>{var re;const ee=Na(I),ae=R?R.color===I:(re=m?.selectedOptions)==null?void 0:re.some(ue=>ue.name===J.name&&ue.value===I);return d.jsx(Pn,{color:I,swatch:ee,selected:ae,onClick:()=>Ca(J.name,I),shape:h,size:v,showLabel:y},`${J.name}-${I}`)})})]},J.name):null)),n&&d.jsx("h3",{className:"product-card__title",children:a?d.jsx("a",{href:m?`/products/${F}
857?variant=${ka(m.id)}`:Nr,className:"product-card__title-link",children:q}):q}),i&&d.jsxs("p",{className:"product-card__price single-price",children:["$",qi(Vi),Wi>0&&Wi>Vi&&d.jsxs("span",{className:"product-card__compare-price",children:["$",qi(Wi)]})]}),Ji&&d.jsx("p",{className:"product-card__discount-message",children:Ji})]})]});return a?d.jsx("div",{className:`product-card-by-id searchspring-product-card ${t}`,ref:w,children:d.jsx("div",{className:"product-card__link",children:d.jsx(Yi,{})})}):d.jsx("div",{className:`product-card-by-id searchspring-product-card ${t}`,ref:w,children:d.jsx(Yi,{})})});Sa.displayName="SearchSpringProductCard";const Hm="collection_grid_columns",sh=({gridColumns:e=3,onGridChange:t,totalItems:r=0,onClearAll:n,onToggleSidebar:i,sidebarOpen:s=!1,hasActiveFilters:a=!1,activeFilterTypes:o={},sortOptions:l=[],currentSort:c=null,onSortChange:u})=>{const[f,h]=E.useState(!1),v=E.useRef(null),y=E.useRef(!1);E.useEffect(()=>{if(!y.current&&t){try{const m=localStorage.getItem(Hm);if(m){const b=parseInt(m,10);[1,2,3,4].includes(b)&&t(b)}}catch(m){console.warn("Error loading grid columns from localStorage:",m)}y.current=!0}},[t]);const w=m=>{try{localStorage.setItem(Hm,m.toString())}catch(b){console.warn("Error saving grid columns to localStorage:",b)}t&&t(m)};E.useEffect(()=>{const m=b=>{v.current&&!v.current.contains(b.target)&&h(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[]);const x=m=>{u(m),h(!1)},p=()=>{if(!c)return"Sort";const m=l.find(b=>b.field===c.field&&b.direction===c.direction);return m?m.label:"Sort"},g=()=>{const{hasSortApplied:m,hasOtherFilters:b}=o;return m&&!b?"CLEAR SORT":"CLEAR ALL"};return d.jsx("div",{className:`collection-actions-bar tw-mb-[40px] ${s?"":"collection-actions-bar--sticky"}`,children:d.jsxs("div",{className:"collection-actions-wrapper tw-flex tw-items-center tw-justify-between tw-gap-[20px] tw-px-[20px] md:tw-px-[40px] tw-py-[20px]",children:[d.jsx("div",{className:"collection-action-left",children:d.jsx("div",{className:"filter-layout-toggle caption tw-flex tw-items-center tw-gap-[10px]",children:d.jsxs("div",{className:"filter-layout-toggle__buttons",children:[d.jsxs("button",{type:"button",className:"filter-layout-toggle__button filter-layout-toggle__button--toggle tw-w-max tw-gap-[10px]","data-layout":"fullwidth","data-toggle-layout":"sidebar","aria-label":"Toggle filters",title:"Toggle filters",onClick:i,children:[d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[d.jsx("mask",{id:"mask0_980_39742",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:d.jsx("rect",{y:"24",width:"24",height:"24",transform:"rotate(-90 0 24)",fill:"#D9D9D9"})}),d.jsx("g",{mask:"url(#mask0_980_39742)",children:d.jsx("path",{d:"M9 11H7V8H3V6H7V3H9V11ZM21 8L11 8L11 6L21 6V8ZM21 18H17V21H15V13H17V16H21V18ZM13 18H3L3 16H13V18Z",fill:"#1C1B1F"})})]}),d.jsx("span",{className:"tw-uppercase action-bar-text tw-flex tw-items-center",children:"FILTER"})]}),a&&d.jsx("button",{type:"button",onClick:n,className:"tw-cursor-pointer button-clear-desktop tw-bg-transparent tw-border-none tw-p-0 tw-text-inherit",children:d.jsx("span",{className:"action-bar-text tw-uppercase",children:g()})})]})})}),d.jsx("div",{className:"collection-action-center only-mobile",children:d.jsx("p",{className:"product-count__text text-body",children:d.jsxs("span",{className:"tw-uppercase action-bar-text",children:[r," ITEMS"]})})}),d.jsxs("div",{className:"collection-action-right tw-flex tw-items-center tw-justify-end tw-gap-[15px] md:tw-gap-[20px]",children:[d.jsx("div",{className:"collection-actions__product-count light",role:"status",children:d.jsx("p",{className:"product-count__text text-body only-desktop",children:d.jsxs("span",{className:"tw-uppercase action-bar-text",children:[r," ITEMS"]})})}),d.jsxs("div",{className:"view-control caption tw-flex tw-items-center tw-gap-[2px] md:tw-gap-[10px]",children:[d.jsx("p",{className:"view-control__label caption-large text-body action-bar-text tw-uppercase tw-m-0 tw-flex tw-items-center tw-h-[24px]",children:"VIEW"}),d.jsxs("div",{className:"view-control__buttons tw-flex tw-flex-row tw-gap-[5px] md:tw-gap-[10px]",children:[d.jsx("button",{type:"button",className:`view-control__button view-control__button--3-col only-desktop ${e===3?"active":""}
857`,"data-view":"3","aria-label":"show 3 columns",title:"show 3 columns",onClick:()=>w(3),children:d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[d.jsx("rect",{x:"2.25",y:"2.25",width:"6",height:"6",fill:"#BBC1CF"}),d.jsx("rect",{x:"2.25",y:"9.75",width:"6",height:"6",fill:"#BBC1CF"}),d.jsx("rect",{x:"9.75",y:"2.25",width:"6",height:"6",fill:"#BBC1CF"}),d.jsx("rect",{x:"9.75",y:"9.75",width:"6",height:"6",fill:"#BBC1CF"})]})}),d.jsx("button",{type:"button",className:`view-control__button view-control__button--2-col ${e===2?"active":""}`,"data-view":"2","aria-label":"show 2 columns",title:"show 2 columns",onClick:()=>w(2),children:d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[d.jsx("rect",{x:"2.25",y:"2.25",width:"6",height:"13.5",fill:"#BBC1CF"}),d.jsx("rect",{x:"9.75",y:"2.25",width:"6",height:"13.5",fill:"#BBC1CF"})]})}),d.jsx("button",{type:"button",className:`view-control__button view-control__button--4-col only-desktop ${e===4?"active":""}`,"data-view":"4","aria-label":"show 4 columns",title:"show 4 columns",onClick:()=>w(4),children:d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[d.jsx("rect",{x:"1.5",y:"1.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"5.5",y:"1.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"9.5",y:"1.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"13.5",y:"1.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"1.5",y:"5.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"5.5",y:"5.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"9.5",y:"5.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"13.5",y:"5.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"1.5",y:"9.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"5.5",y:"9.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"9.5",y:"9.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"13.5",y:"9.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"1.5",y:"13.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"5.5",y:"13.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"9.5",y:"13.5",width:"3",height:"3",fill:"#BBC1CF"}),d.jsx("rect",{x:"13.5",y:"13.5",width:"3",height:"3",fill:"#BBC1CF"})]})}),d.jsx("button",{type:"button",className:`tw-flex only-mobile view-control__button view-control__button--2-col ${e===1?"active":""}`,"data-view":"1","aria-label":"show 1 column",title:"show 1 column",onClick:()=>w(1),children:d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:d.jsx("rect",{x:"2.25",y:"2.25",width:"13.5",height:"13.5",fill:"#BBC1CF"})})})]})]}),d.jsx("div",{className:"collection-actions__sorting only-desktop",children:d.jsx("div",{className:"facet-filters sorting caption",children:d.jsxs("div",{className:"facet-filters__field tw-relative",ref:v,children:[d.jsxs("button",{type:"button",className:"sort-dropdown-trigger tw-flex tw-items-center tw-gap-[8px] tw-cursor-pointer tw-bg-transparent tw-border-none tw-p-0","aria-label":"Sort products",title:"Sort products",onClick:()=>h(!f),children:[d.jsx("h2",{className:"facet-filters__label caption-large text-body tw-m-0 action-bar-text tw-uppercase tw-flex tw-items-center tw-h-[24px]",children:p()}),d.jsx("svg",{className:`tw-w-4 tw-h-4 tw-transition-transform ${f?"tw-rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),d.jsxs("div",{className:`sort-dropdown tw-absolute tw-top-full tw-right-0 tw-mt-[8px] tw-bg-white tw-border tw-border-gray-200 tw-rounded-md tw-shadow-lg tw-z-50 tw-min-w-[200px] ${f?"tw-block":"tw-hidden"}`,children:[d.jsx("ul",{className:"sort-options-list tw-list-none tw-m-0 tw-p-0",children:l.map((m,b)=>d.jsx("li",{className:"tw-border-b tw-border-gray-100 last:tw-border-b-0",children:d.jsx("button",{type:"button",className:`tw-w-full tw-text-left tw-px-4 tw-py-3 tw-text-sm tw-hover:tw-bg-gray-50 tw-transition-colors ${c&&c.field===m.field&&c.direction===m.direction?"tw-bg-blue-50 tw-text-blue-600":"tw-text-gray-700"}`,onClick:()=>x(m),children:m.label})},b))}),d.jsxs("select",{name:"sort_by",className:"facet-filters__sort tw-hidden",id:"SortBy","aria-describedby":"a11y-refresh-page-message",value:c?JSON.stringify(c):"",onCh
857ange:m=>{m.target.value&&x(JSON.parse(m.target.value))},children:[d.jsx("option",{value:"",children:"Sort"}),l.map((m,b)=>d.jsx("option",{value:JSON.stringify(m),children:m.label},b))]})]})]})})})]})]})})};function bj({min:e=0,max:t=100,step:r=1,valueMin:n,valueMax:i,onChange:s,showInputs:a=!1,className:o=""}){var G,Q;const[l,c]=E.useState(n??e),[u,f]=E.useState(i??t),h=E.useRef(null),v=E.useRef(null),y=E.useRef(!1),w=E.useRef({min:n??e,max:i??t});E.useEffect(()=>{!y.current&&typeof n=="number"&&c(n)},[n]),E.useEffect(()=>{!y.current&&typeof i=="number"&&f(i)},[i]),E.useEffect(()=>{l>u&&c(u)},[u]),E.useEffect(()=>{u<l&&f(l)},[l]);function x(U){const V=Number(U.target.value),A=Math.min(Math.max(V,e),u);c(A)}function p(U){const V=Number(U.target.value),A=Math.max(Math.min(V,t),l);f(A)}function g(){y.current=!1,s&&(w.current.min===l&&w.current.max===u||(w.current={min:l,max:u},s({min:l,max:u})))}function m(){y.current=!0}function b(U,V){const A=U.getBoundingClientRect(),D=Math.min(Math.max(V-A.left,0),A.width),C=A.width>0?D/A.width:0,T=e+C*(t-e),j=Math.round(T/r)*r;return Math.min(Math.max(j,e),t)}function _(U){try{const V=U.currentTarget,A=U.touches&&U.touches[0]?U.touches[0].clientX:U.clientX;if(typeof A!="number")return;const D=b(V,A),C=(D-e)/Math.max(1,t-e)*100,T=Math.abs(C-R),j=Math.abs(C-P);if(T<=j){const L=Math.min(D,u);c(L),setTimeout(()=>{s&&(w.current={min:L,max:u},s({min:L,max:u}))},0)}else{const L=Math.max(D,l);f(L),setTimeout(()=>{s&&(w.current={min:l,max:L},s({min:l,max:L}))},0)}}catch{}}const S=Math.max(1,t-e),k=(l-e)/S*100,N=(u-e)/S*100,R=Math.min(100,Math.max(0,k)),P=Math.min(100,Math.max(0,N)),H=l>=t-r;return d.jsxs("div",{className:`tw-w-full tw-flex tw-flex-col tw-gap-3 ${o}`,children:[d.jsx("style",{children:` 858 .range-slider-input { 859 pointer-events: none; 860 } 861 .range-slider-input::-webkit-slider-thumb { 862 pointer-events: auto; 863 cursor: pointer; 864 } 865 .range-slider-input::-moz-range-thumb { 866 pointer-events: auto; 867 cursor: pointer; 868 } 869 `}),d.jsxs("div",{className:"tw-relative tw-w-full tw-h-10",onClick:_,onTouchEnd:_,children:[d.jsx("div",{className:"tw-absolute tw-left-0 tw-right-0 tw-top-1/2 tw-h-1 tw--translate-y-1/2 tw-rounded-full tw-bg-gray-200"}),d.jsx("div",{className:"tw-absolute tw-top-1/2 tw-h-1 tw--translate-y-1/2 tw-rounded-full",style:{left:"2px",width:"98%",background:"#dadce1",display:"block",height:"2px",top:"14px"}}),d.jsx("input",{ref:h,type:"range",min:e,max:t,step:r,value:l,onChange:x,onMouseDown:m,onTouchStart:m,onMouseUp:g,onTouchEnd:g,"aria-label":"Min value",className:"range-slider-input tw-absolute tw-w-full tw-left-0 tw-h-10 tw-appearance-none",style:{background:"transparent",WebkitAppearance:"none",zIndex:H?5:3,touchAction:"none"}}),d.jsx("input",{ref:v,type:"range",min:e,max:t,step:r,value:u,onChange:p,onMouseDown:m,onTouchStart:m,onMouseUp:g,onTouchEnd:g,"aria-label":"Max value",className:"range-slider-input tw-absolute tw-w-full tw-left-0 tw-h-10 tw-appearance-none",style:{background:"transparent",WebkitAppearance:"none",zIndex:H?4:5,touchAction:"none"}})]}),a&&d.jsxs("div",{className:"tw-flex tw-items-center tw-gap-4",children:[d.jsxs("div",{className:"tw-flex tw-flex-col tw-gap-1 tw-w-1/2",children:[d.jsx("label",{className:"tw-text-sm tw-font-medium tw-text-gray-700",children:"Min"}),d.jsx("input",{type:"number",value:l,onChange:U=>{const V=Number(U.target.value||0),A=Math.min(Math.max(V,e),u);c(A)},className:"tw-w-full tw-px-2 tw-py-1 tw-border tw-rounded tw-text-sm tw-outline-none tw-border-gray-300"})]}),d.jsxs("div",{className:"tw-flex tw-flex-col tw-gap-1 tw-w-1/2",children:[d.jsx("label",{className:"tw-text-sm tw-font-medium tw-text-gray-700",children:"Max"}),d.jsx("input",{type:"number",value:u,onChange:U=>{const V=Number(U.target.value||0),A=Math.max(Math.min(V,t),l);f(A)},className:"tw-w-full tw-px-2 tw-py-1 tw-border tw-rounded tw-text-sm tw-outline-none tw-border-gray-300"})]})]}),d.jsxs("div",{className:"tw-relative tw-w-full tw-mt-2",children:[d.jsx("div",{className:"tw-absolute tw-text-xs tw-text-gray-600 tw-font-medium",style:{left:"0%"},children:(G=window.Shopify)!=null&&G.formatMoney?window.Shopify.formatMoney(l*100):`$${l}`}),d.jsx("div",{className:"tw-absolute tw-text-xs tw-text-gray-600 tw-font-medium",style:{left:"88%"},children:(Q=window.Shopify)!=null&&Q.formatMoney?window.Shopify.formatMoney(u*100):`$${u}`})]})]})}const xj=(e,t,r,n,i)=>{var w,x;const[s,a]=E.useState({}),o=E.useRef(null),l=p=>{let g=0,m=1e3;if(p.type==="range"){if(p.range&&typeof p.range=="object"&&(p.range.low!==void 0&&p.range.low!==null&&(g=Number(p.range.low)),p.range.high!==void 0&&p.range.high!==null&&(m=Number(p.range.high))),g===0&&m===1e3&&(p.min!==void 0&&p.min!==null&&(g=Number(p.min)),p.max!==void 0&&p.max!==null&&(m=Number(p.max))),g===0&&m===1e3&&p.buckets&&p.buckets.length>0){const b=p.buckets.map(S=>S.from).filter(S=>typeof S=="number"&&!isNaN(S)&&S>0),_=p.buckets.map(S=>S.to).filter(S=>typeof S=="number"&&!isNaN(S)&&S>0);b.length>0&&(g=Math.min(...b)),_.length>0&&(m=Math.max(..._))}}else if(p.min!==void 0&&p.min!==null)g=Number(p.min);else if(p.buckets&&p.buckets.length>0){const b=p.buckets.map(_=>_.from).filter(_=>typeof _=="number"&&!isNaN(_));b.length>0&&(g=Math.min(...b))}if(p.max!==void 0&&p.max!==null)m=Number(p.max);else if(p.buckets&&p.buckets.length>0){const b=p.buckets.map(_=>_.to).filter(_=>typeof _=="number"&&!isNaN(_));b.length>0&&(m=Math.max(...b))}return(isNaN(g)||g<0)&&(g=0),(isNaN(m)||m<=g)&&(m=g+100),{facetMin:g,facetMax:m}};E.useEffect(()=>{if(e&&e.type==="range"){const{facetMin:p,facetMax:g}=l(e);let m=p,b=g;t&&!r?(e.selectedMin!==void 0&&e.selectedMin!==null&&(m=Number(e.selectedMin)),e.selectedMax!==void 0&&e.selectedMax!==null?b=Number(e.selectedMax):e.active&&typeof e.active=="object"&&(e.active.low!==void 0&&e.active.low!==null&&(m=Number(e.active.low)),e.active.high!==void 0&&e.active.high!==null&&(b=Number(e.active.high)))):i[e.field]&&(i[e.field].min!==void 0&&i[e.field].min!==null&&(m=Number(i[e.field].min)),i[e.field].max!==void 0&&i[e.field].max!==null&&(b=Number(i[e.field].max))),m===p&&b===g||m>b&&(m=p,b=g),a({min:m,max:b})}},[e,i,t,r]);const c=({min:p,max:g})=>{const m=Math.max(0,Number(p)||0),b=Math.max(m,Number(g)||m+100);a({min:m,max:b}),t&&!r?n&&n(e.field,m,b):r&&n&&n(e.field,m,b)},u=e?l(e):{facetMin:0,facetMax:100};o.current||(o.current={min:u.facetMin,max:u.facetMax});const f=((w=o.current)==null?void 0:w.min)??u.facetMin,h=((x=o.current)==null?void 0:x.max)??u.facetMax,v=s.min??f,y=s.max??h;return{facetMin:f,facetMax:h,currentMin:v,currentMax:y,handleRangeChange:c}},_j=({facet:e,accordion:t,isExpanded:r,onToggleAccordion:n,getFieldLabel:i,autoApply:s,isMobile:a,onSetRange:o,pendingRanges:l})=>{const{facetMin:c,facetMax:u,currentMin:f,currentMax:h,handleRangeChange:v}=xj(e,s,a,o,l);return d.jsxs("section",{children:[d.jsx("header",{className:`tw-flex tw-justify-between tw-items-center tw-py-2 tw-border-b tw-border-gray-200 ${t?"tw-cursor-pointer":"tw-cursor-default"}`,onClick:t?n:void 0,children:d.jsxs("div",{className:"tw-flex tw-items-center tw-gap-2 accordion-header-content",children:[d.jsx("strong",{className:"tw-uppercase",children:i(e.field)}),t&&d.jsx("span",{className:"tw-text-base tw-p-1 tw-min-w-5 tw-text-center",children:r?d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",children:d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11277 8.95832L7.00012 6.07097L9.88747 8.95832H4.11277Z",fill:"#1F1F1F"})}):d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",children:d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.88723 6.04168L6.99988 8.92903L4.11253 6.04168H9.88723Z",fill:"#1F1F1F"})})})]})}),r&&d.jsx("div",{className:"tw-my-4 ",children:d.jsx(bj,{min:c,max:u,valueMin:f,valueMax:h,onChange:v,showInputs:!1,className:"tw-w-full"})})]})},Ii=({facets:e=[],onToggleValue:t,onClearField:r,onSetRange:n,onClearAll:i,autoApply:s=!0,onApplyFilters:a,accordion:o=!0,fieldLabels:l={},sortOptions:c=[],currentSort:u=null,onSortChange:f,showSortOnMobile:h=!1,isMobile:v=!1,onCloseMobile:y})=>{const[w,x]=E.useState({}),[p,g]=E.useState({}),[m,b]=E.useState(new Set);E.useEffect(()=>{if(!s){const V={},A={};e.forEach(D=>
869{if(D.type==="value"){const C=D.values.filter(T=>T.selected).map(T=>T.value);C.length>0&&(V[D.field]=C)}else D.type==="range"&&(D.selectedMin!==void 0||D.selectedMax!==void 0)&&(A[D.field]={min:D.selectedMin,max:D.selectedMax})}),x(V),g(A)}},[e,s]);const _=(V,A)=>{s?t&&t(V,A):x(D=>{const C=D[V]||[],T=C.includes(A)?C.filter(L=>L!==A):[...C,A],j={...D,[V]:T.length>0?T:void 0};return Object.keys(j).forEach(L=>{(!j[L]||j[L].length===0)&&delete j[L]}),j})},S=(V,A,D)=>{const C=Math.max(0,Number(A)||0),T=Math.max(C,Number(D)||C+100);s?n&&n(V,C,T):g(j=>{const L={...j,[V]:{min:C,max:T}};return Object.keys(L).forEach(M=>{const B=L[M];(!B||typeof B.min!="number"&&typeof B.max!="number")&&delete L[M]}),L})},k=()=>{s?i&&i():(x({}),g({}))},N=()=>{a&&a(w,p)},R=()=>{a&&a(w,p),y&&y()},P=Object.keys(w).length>0||Object.keys(p).length>0,H=V=>l[V]||V,G=V=>{b(A=>{const D=new Set(A);return D.has(V)?D.delete(V):D.add(V),D})},Q=V=>{if(V.type==="value"){const A=V.values.some(C=>C.selected),D=w[V.field]&&w[V.field].length>0;return A||D}else if(V.type==="range"){const A=V.selectedMin!==void 0||V.selectedMax!==void 0,D=p[V.field]!==void 0;return A||D}return!1},U=V=>{if(!o||m.has(V))return!0;const A=e.find(D=>D.field===V);return!!(A&&Q(A))};return d.jsxs("aside",{children:[h&&c.length>0&&d.jsxs("section",{className:"tw-pb-5 tw-border-b-2 tw-border-gray-200",children:[d.jsx("header",{className:"tw-flex tw-justify-between tw-items-center tw-py-2 tw-mb-3",children:d.jsxs("div",{className:"tw-flex tw-w-full tw-items-center tw-gap-2 tw-text-black tw-uppercase",children:[d.jsx("strong",{children:"SORT BY"}),u&&d.jsxs("span",{className:"tw-text-sm tw-text-black tw-font-normal tw-italic",children:["(",u.label,")"]})]})}),d.jsx("ul",{className:"tw-my-2 tw-pl-0 tw-list-none",children:c.map((V,A)=>{const D=u&&u.field===V.field&&u.direction===V.direction;return d.jsx("li",{className:"tw-my-1",children:d.jsxs("label",{className:"tw-flex tw-items-center tw-gap-2 sort-option-item tw-cursor-pointer tw-py-2",children:[d.jsx("input",{type:"radio",name:"sort-option",checked:D,onChange:()=>f&&f(V),className:"tw-m-0"}),d.jsx("span",{children:V.label})]})},A)})})]}),v&&e.some(V=>V.type==="value"||V.type==="range")&&d.jsx("section",{className:"tw-pb-5 tw-border-b-2 tw-border-gray-200",children:d.jsx("header",{className:"tw-flex tw-justify-between tw-items-center tw-py-2 tw-mb-[20px]",children:d.jsx("div",{className:"tw-flex tw-w-full tw-items-center tw-gap-2 tw-text-black",children:"FILTER"})})}),e.map(V=>{if(V.type==="value"){const A=!o||U(V.field),D=V.field.toLowerCase().includes("color")||H(V.field).toLowerCase()==="color";return d.jsxs("section",{children:[d.jsx("header",{className:`tw-flex filter-sidebar-header tw-justify-between tw-items-center tw-py-2 ${o?"tw-cursor-pointer":"tw-cursor-default"}`,onClick:o?()=>G(V.field):void 0,children:d.jsxs("div",{className:"tw-flex tw-items-center tw-gap-2 accordion-header-content",children:[d.jsx("strong",{className:"tw-uppercase",children:H(V.field)}),o&&d.jsx("span",{className:"tw-text-base tw-p-1 tw-min-w-5 tw-text-center",children:A?d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",children:d.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.11277 8.95832L7.00012 6.07097L9.88747 8.95832H4.11277Z",fill:"#1F1F1F"})}):d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",children:d.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.88723 6.04168L6.99988 8.92903L4.11253 6.04168H9.88723Z",fill:"#1F1F1F"})})})]})}),A&&d.jsx("ul",{className:`tw-my-2 tw-list-none ${o?"tw-pl-2.5":"tw-pl-0"}`,children:V.values.map(C=>{var j;const T=s?!!C.selected:((j=w[V.field])==null?void 0:j.includes(C.value))||!1;return d.jsx("li",{className:"tw-my-1",children:d.jsxs("label",{className:"tw-flex tw-items-center tw-gap-2 tw-cursor-pointer",children:[D?d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"checkbox",className:"color-filter-checkbox tw-sr-only",checked:T,onChange:()=>_(V.field,C.value),onKeyDown:L=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),_(V.field,C.value))}}),d.jsx("div",{className:"color-filter-swatch tw-w-4 tw-h-4 tw-rounded-sm tw-cursor-pointer tw-flex-shrink-0 tw-block","aria-hidden":"true","data-color":C.label??C.value,style:{background:vk(C.label??C.value),border:Mw(C.label??C.value)?"1px solid var(--swatch-outline-strong)":"1px solid var(--swatch-outline)",outline:T?"2px solid #000":"none",outlineOffset:"1px"}})]}):d.jsx("input",{type:"checkbox",checked:T,onChange:()=>_(V.field,C.value),onKeyDown:L=>{L.key===" "&&(L.preventDefault(),_(V.field,C.value))}}),d.jsxs("span",{children:[C.label??C.value," (",C.count,")"]})]})},String(C.value))})})]},V.field)}return V.type==="range"?d.jsx(_j,{facet:V,accordion:o,isExpanded:!o||U(V.field),onToggleAccordion:()=>G(V.field),getFieldLabel:H,autoApply:s,isMobile:v,onSetRange:S,pendingRanges:p},V.field):null}),!s&&d.jsxs("div",{className:"tw-mt-5 tw-p-2.5 tw-border-t tw-border-gray-300 tw-flex tw-flex-col tw-justify-center tw-items-center",children:[d.jsx("button",{type:"button",onClick:v?R:N,disabled:!P,className:`tw-w-full tw-text-white button-sidebar-mobile-action tw-uppercase tw-border-none tw-px-[20px] tw-py-[15px] tw-cursor-pointer ${P?"tw-bg-[#1E3060]":"tw-bg-gray-400 tw-cursor-not-allowed"} ${v?"tw-mb-2.5":"tw-mb-0"}`,children:v?"Show Results":"Apply Filters"}),v&&d.jsx("button",{type:"button",onClick:k,className:"tw-w-full tw-text-center button-sidebar-mobile tw-bg-transparent tw-border-none tw-text-black tw-border tw-border-gray-300 tw-rounded tw-cursor-pointer hover:tw-bg-gray-50 tw-text-[12px]",children:"Clear All"})]})]})},Sj='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not
869([tabindex="-1"])',D0=({open:e,onClose:t,children:r})=>{const n=E.useRef(null),i=E.useRef(null),s=E.useRef(t);E.useEffect(()=>{s.current=t});const a=ih(),o=e&&a;return E.useEffect(()=>{var y;if(!o)return;const l=document.activeElement,c=document.body.style.overflow;document.body.style.overflow="hidden",(y=i.current)==null||y.focus();const u=()=>{var w;return[...((w=n.current)==null?void 0:w.querySelectorAll(Sj))||[]].filter(x=>x.offsetParent!==null)};let f=!1;const h=w=>{var x;if(w.key==="Escape"){w.preventDefault(),(x=s.current)==null||x.call(s);return}w.key==="Tab"&&(f=w.shiftKey,u().length===0&&w.preventDefault())},v=w=>{if(!n.current||n.current.contains(w.target))return;const x=u();x.length!==0&&(f?x[x.length-1]:x[0]).focus()};return document.addEventListener("keydown",h),document.addEventListener("focusin",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("focusin",v),document.body.style.overflow=c,l&&typeof l.focus=="function"&&document.contains(l)&&l.focus()}},[o]),o?d.jsx("div",{className:"mobile-filter-drawer__backdrop tw-fixed tw-inset-0 tw-bg-black tw-bg-opacity-50 md:tw-hidden",onClick:t,children:d.jsx("div",{ref:n,className:"mobile-filter-drawer tw-fixed tw-top-0 tw-left-0 tw-h-full tw-w-[calc(100%_-_48px)] tw-max-w-[400px] tw-bg-white tw-shadow-lg tw-overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":"mobile-filter-drawer-title",onClick:l=>l.stopPropagation(),children:d.jsxs("div",{className:"tw-p-4",children:[d.jsxs("div",{className:"tw-flex tw-justify-between tw-items-center tw-mb-4",children:[d.jsx("h3",{id:"mobile-filter-drawer-title",className:"tw-uppercase tw-text-lg tw-font-semibold",children:"Filter"}),d.jsx("button",{ref:i,type:"button",onClick:t,className:"tw-text-gray-500 hover:tw-text-gray-700 tw-text-2xl close-filters-btn","aria-label":"Close filters",children:d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:d.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.28774 7.22703L7.22708 8.28769L10.9394 12L7.22708 15.7123L8.28774 16.773L12.0001 13.0607L15.7124 16.773L16.773 15.7123L13.0607 12L16.773 8.28769L15.7124 7.22703L12.0001 10.9393L8.28774 7.22703Z",fill:"#1F1F1F"})})})]}),r]})})}):null},Ej=(e,t)=>{const r=()=>{if(typeof window>"u")return 1;const g=new URLSearchParams(window.location.search).get("page"),m=g?parseInt(g,10):1;return console.log("\u{1F50D} [usePagination] URL page param:",g,"parsed:",m),!isNaN(m)&&m>0?m:1},[n,i]=E.useState(()=>r());E.useEffect(()=>{const p=r(),g=e!=null&&e.page?typeof e.page=="string"?parseInt(e.page,10):e.page:null;console.log("\u{1F50D} [usePagination] Sync effect - URL page:",p,"Prop page:",g);const m=p>1?p:g&&g>0?g:1;console.log("\u{1F50D} [usePagination] Page to use:",m,"Current state:",n),!isNaN(m)&&m>0&&m!==n&&(console.log("\u{1F50D} [usePagination] Updating page state to:",m),i(m))},[e?.page,n]),E.useEffect(()=>{const p=()=>{const g=r();g!==n&&i(g)};return window.addEventListener("popstate",p),()=>{window.removeEventListener("popstate",p)}},[n]);const s=e?.totalPages||1,a=e?.totalResults||0,o=e?.pageSize||50,l=Math.max(1,Math.min(n,s)),c=p=>{if(typeof window>"u")return;const g=new URL(window.location);p>1?g.searchParams.set("page",p.toString()):g.searchParams.delete("page"),window.history.pushState({},"",g.toString())},u=p=>{const g=typeof p=="string"?parseInt(p,10):p;!isNaN(g)&&g>=1&&g<=s&&g!==l&&(i(g),c(g),t&&t(g))},f=()=>{l>1&&u(l-1)},h=()=>{l<s&&u(l+1)},v=()=>{u(1)},y=()=>{u(s)},w=E.useMemo(()=>{const p=[];if(s<=5)for(let m=1;m<=s;m++)p.push(m);else{const m=Math.max(1,l-2),b=Math.min(s,l+2);m>1&&(p.push(1),m>2&&p.push("..."));for(let _=m;_<=b;_++)p.push(_);b<s&&(b<s-1&&p.push("..."),p.push(s))}return p},[l,s]),x=E.useMemo(()=>{const p=(l-1)*o+1,g=Math.min(l*o,a);return{start:p,end:g}},[l,o,a]);return{currentPage:l,totalPages:s,totalResults:a,pageSize:o,pageNumbers:w,resultsRange:x,isFirstPage:l===1,isLastPage:l===s,hasPagination:s>1,goToPage:u,goToPreviousPage:f,goToNextPage:h,goToFirstPage:v,goToLastPage:y}},ah=({pagination:e,onPageChange:t})=>{if(!e||e.totalPages<=1)return null;const{currentPage:r,pageNumbers:n,isFirstPage:i,isLastPage:s,goToPage:a,goToPreviousPage:o,goToNextPage:l}=Ej(e,t),c=()=>{window.scrollTo({top:0,behavior:"smooth"})};
869return d.jsxs("div",{className:"pagination tw-mt-8 tw-px-[20px] md:tw-px-[40px]",children:[d.jsxs("div",{className:"pagination-controls tw-flex tw-items-center tw-justify-center tw-gap-2 md:tw-gap-4",children:[d.jsx("button",{onClick:o,disabled:i,className:`pagination-arrow tw-px-2 tw-py-1 tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-transition-all tw-duration-200 ${i?"tw-opacity-50 tw-cursor-not-allowed tw-bg-gray-50":"tw-bg-white hover:tw-bg-gray-50 tw-cursor-pointer"}`,"aria-label":"Go to previous page",children:d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx("polyline",{points:"15 18 9 12 15 6"})})}),d.jsx("div",{className:"pagination-numbers tw-flex tw-items-center tw-gap-1 md:tw-gap-2",children:n.map((u,f)=>d.jsx(jd.Fragment,{children:u==="..."?d.jsx("span",{className:"tw-px-2 tw-text-gray-400",children:"..."}):d.jsx("button",{onClick:()=>a(u),className:`pagination-number tw-min-w-[32px] tw-px-2 tw-py-1 tw-text-sm tw-border tw-rounded tw-transition-all tw-duration-200 ${u==r?"tw-text-[#1E3060] tw-font-bold pagination-number-active":"tw-bg-white tw-text-gray-700 tw-border-gray-300 hover:tw-bg-gray-50 tw-cursor-pointer"}`,"aria-label":`Go to page ${u}`,"aria-current":u===r?"page":void 0,children:u})},f))}),d.jsx("button",{onClick:l,disabled:s,className:`pagination-arrow tw-px-2 tw-py-1 tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-transition-all tw-duration-200 ${s?"tw-opacity-50 tw-cursor-not-allowed tw-bg-gray-50":"tw-bg-white hover:tw-bg-gray-50 tw-cursor-pointer"}`,"aria-label":"Go to next page",children:d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx("polyline",{points:"9 18 15 12 9 6"})})})]}),d.jsx("div",{className:"tw-flex tw-justify-center tw-mt-6",children:d.jsx("button",{onClick:c,className:"back-to-top-btn tw-px-4 tw-py-2 tw-text-white tw-bg-[#1E3060] tw-rounded hover:tw-bg-[#2a4080] tw-transition-colors",children:"Back to Top"})})]})},oh=({hasActiveFilters:e,onClearAll:t,emptyMessage:r="No products are available in this collection at the moment."})=>d.jsx("div",{className:"empty-state",children:d.jsxs("div",{className:"empty-state__container",children:[d.jsx("div",{className:"empty-state__icon",children:d.jsx("svg",{className:"empty-state__icon-svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 15c-2.34 0-4.29-1.009-5.824-2.709M15 6.291A7.962 7.962 0 0012 4c-2.34 0-4.29 1.009-5.824 2.709"})})}),d.jsx("h3",{className:"empty-state__title",children:"No products found"}),d.jsx("p",{className:"empty-state__message",children:e?"No products match the selected filters. Try adjusting your search criteria.":r}),e&&d.jsxs("button",{onClick:t,className:"empty-state-button",children:[d.jsx("svg",{className:"empty-state-button__icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Clear filters"]})]})}),pr=({merchandising:e,position:t})=>{const r=e?.content;if(!r)return null;const n=Array.isArray(r[t])?r[t]:[];return n.length===0?null:d.jsx("div",{className:`ss-campaign-banner ss-campaign-banner--${t}`,children:n.map((i,s)=>d.jsx("div",{className:"ss-campaign-banner__item",dangerouslySetInnerHTML:{__html:i.value||i}},`ss-banner-${t}-${s}`))})},lh=E.memo(({collectionHandle:e,collectionId:t,collectionTitle:r,collectionTitleFormated:n,autoApplyFilters:i=!0,useAxios:s=!1})=>{var M,B,z,X,ce,Z,q;const[a,o]=E.useState(null),[l,c]=E.useState(!0),[u,f]=E.useState(!1),[h,v]=E.useState(null),{gridColumns:y,setGridColumns:w,sidebarOpen:x,setSidebarOpen:p}=A0(),g=ih(),{filters:m,ranges:b,currentPage:_,sort:S,handleToggleValue:k,handleClearField:N,handleSetRange:R,handleClearAll:P,handleApplyFilters:H,handleSortChange:G,handlePageChange:Q}=nh(a),U=E.useRef({collectionHandle:e,collectionId:t,collectionTitle:r,collectionTitleFormated:n,filters:m,ranges:b,currentPage:_,sort:S,useAxios:s,gridColumns:y});E.useEffect(()=>{e&&t&&r&&(async()=>{var K;try{const oe=U.current;a!==null&&oe.gridColumns!==y&&oe.collectionHandle===e&&oe.collectionId===t&&oe.collectionTitle===r&&oe.collectionTitleFormated===n&&JSON.stringify(oe.filters)===JSON.stringify(m)&&JSON.stringify(oe.ranges)===JSON.stringify(b)&&oe.currentPage===_&&JSON.stringify(oe.sort)===JSON.stringify(S)&&oe.useAxios===s?f(!0):c(!0),v(null);const le=s?await aj({handle:e,id:t,collectionTitle:r,collectionTitleFormated:n,filters:m,ranges:b,page:_,pageSize:50,sort:S,gridColumns:y}):await sj({handle:e,id:t,collectionTitle:r,collectionTitleFormated:n,filters:m,ranges:b,page:_,pageSize:28,sort:S,gridColumns:y});if(le!=null&&le.merchandising&&(K=le?.results)!=null&&K.results){const xe=th(le.results.results,le.merchandising);le.results.results=xe}o(le),U.current={collectionHandle:e,collectionId:t,collectionTitle:r,collectionTitleFormated:n,filters:m,ranges:b,currentPage:_,sort:S,useAxios:s,gridColumns:y}}catch(oe){v(oe)}finally{c(!1),f(!1)}})()},[e,t,r,n,m,b,_,S,s,y]);const V=F=>{w(F)},A=()=>{p(F=>!F)},D=F=>{G(F),g&&p(!1)};if(l&&!a)return d.jsx("div",{className:"clp_loading tw-px-[20px] md:tw-px-[40px] tw-mt-12",children:"Loading..."});if(h&&!a)return d.jsxs("div",{className:"tw-px-[20px] md:tw-px-[40px] tw-mt-12",children:["Error loading products: ",h.message]});const C=((M=a?.results)==null?void 0:M.results)||[],T=(B=a?.results)==null?void 0:B.pagination,j=C&&C.length>0,L=F0((z=a?.results)==null?void 0:z.facets,m,b,(X=a?.results)==null?void 0:X.results);return d.jsxs(d.Fragment,{children:[d.jsx(sh,{gridColumns:y,onGridChange:V,totalItems:T?.totalResults||0,onClearAll:P,onToggleSidebar:A,sidebarOpen:x,hasActiveFilters:ca(m,b,S),activeFilterTypes:Wl(m,b,S),sortOptions:((ce=a?.meta)==null?void 0:ce.sortOptions)||[],currentSort:S,onSortChange:G}),!j&&d.jsx(oh,{hasActiveFilters:ca(m,b,S),onClearAll:P}),d.jsx(D0,{open:x,onClose:A,children:d.jsx(Ii,{facets:L,onToggleValue:k,onClearField:N,onSetRange:R,onClearAll:P,autoApply:i,onApplyFilters:H,fieldLabels:Pi,sortOptions:((Z=a?.meta)==null?void 0:Z.sortOptions)||[],currentSort:S,onSortChange:D,showSortOnMobile:!0,isMobile:!0,onCloseMobile:A})}),d.jsx(pr,{merchandising:a?.merchandising,position:"header"}),d.jsx(pr,{merchandising:a?.merchandising,position:"banner"}),j&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"collection-grid-container tw-w-full tw-px-[20px] md:tw-px-[40px] tw-flex tw-gap-[40px]",children:[d.jsxs("div",{className:`collection-sidebar tw-w-full tw-max-w-[18%] tw-hidden md:tw-block ${x?"md:tw-block":"md:tw-hidden"}`,role:"region","aria-label":"Filters",tabIndex:0,children:[d.jsx("h3",{className:"tw-uppercase",children:"Filter"}),d.jsx(Ii,{facets:L,onToggleValue:k,onClearField:N,onSetRange:R,onClearAll:P,autoApply:i,onApplyFilters:H,fieldLabels:Pi,sortOptions:((q=a?.meta)==null?void 0:q.sortOptions)||[],currentSort:S,onSortChange:G,showSortOnMobile:!1,isMobile:!1})]}
869),d.jsxs("div",{className:`collection-grid tw-grid tw-gap-[20px] tw-w-full tw-relative ${y===1?"tw-grid-cols-1":y===2?"tw-grid-cols-2":y===4?"tw-grid-cols-4":"tw-grid-cols-3"}`,children:[u&&d.jsx("div",{className:"tw-absolute tw-inset-0 tw-bg-white tw-bg-opacity-75 tw-flex tw-items-center tw-justify-center tw-z-10",children:d.jsx("div",{className:"clp_loading",children:"Loading..."})}),rh(C,a?.merchandising).filter(F=>F._isBanner||F&&typeof F=="object"&&F.id).map(F=>F._isBanner?d.jsx("div",{className:"ss-inline-banner",dangerouslySetInnerHTML:{__html:F._bannerHtml}},`banner-${F._bannerId}`):s&&F.uid?d.jsx(Sa,{product:F,className:"collection-grid__item",showImage:!0,showTitle:!0,showPrice:!0,showBrand:!1,showCollection:!1,linkToProduct:!0},F.id):d.jsx(_a,{productId:F.id,className:"collection-grid__item"},F.id))]})]}),d.jsx(pr,{merchandising:a?.merchandising,position:"footer"}),d.jsx(ah,{pagination:T,onPageChange:Q})]})]})});lh.displayName="CollectionGrid";const z0=({autoApplyFilters:e=!0})=>{var A,D,C,T,j,L,M;const[t,r]=E.useState(null),[n,i]=E.useState(!0),[s,a]=E.useState(null),[o,l]=E.useState(""),{gridColumns:c,setGridColumns:u,sidebarOpen:f,setSidebarOpen:h}=A0(),v=ih(),{filters:y,ranges:w,currentPage:x,sort:p,handleToggleValue:g,handleClearField:m,handleSetRange:b,handleClearAll:_,handleApplyFilters:S,handleSortChange:k,handlePageChange:N}=nh(t);E.useEffect(()=>{const B=()=>{const z=new URLSearchParams(window.location.search);l(z.get("q")||"")};return B(),window.addEventListener("popstate",B),()=>window.removeEventListener("popstate",B)},[]),E.useEffect(()=>{o?(async()=>{var z;try{i(!0),a(null);const X=await I0({query:o,filters:y,ranges:w,page:x,pageSize:28,sort:p,gridColumns:c});X!=null&&X.merchandising&&(z=X?.results)!=null&&z.results&&(X.results.results=th(X.results.results,X.merchandising)),r(X)}catch(X){a(X),console.error("Error fetching search results:",X)}finally{i(!1)}})():(i(!1),r({results:{results:[],facets:[],pagination:{page:1,pageSize:28,totalResults:0,totalPages:0}},meta:{}}))},[o,y,w,x,p,c]);const R=B=>{u(B)},P=()=>{h(B=>!B)},H=B=>{k(B),v&&h(!1)};if(n&&!t)return d.jsx("div",{className:"clp_loading tw-px-[20px] md:tw-px-[40px] tw-mt-12",children:"Loading..."});if(s&&!t)return d.jsxs("div",{className:"tw-px-[20px] md:tw-px-[40px] tw-mt-12",children:["Error loading search results: ",s.message]});const G=((A=t?.results)==null?void 0:A.results)||[],Q=(D=t?.results)==null?void 0:D.pagination,U=F0((C=t?.results)==null?void 0:C.facets,y,w,(T=t?.results)==null?void 0:T.results),V=ca(y,w,p);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"search-results-header tw-px-[20px] md:tw-px-[40px] tw-mb-4",children:[d.jsx("h1",{className:"tw-text-2xl tw-font-bold",children:o?`Search Results for "${o}"`:"Search"}),Q&&Q.totalResults>0&&d.jsxs("p",{className:"tw-text-gray-600",children:[Q.totalResults," results found"]})]}),d.jsx(sh,{gridColumns:c,onGridChange:R,totalItems:Q?.totalResults||0,onClearAll:_,onToggleSidebar:P,sidebarOpen:f,hasActiveFilters:V,activeFilterTypes:Wl(y,w,p),sortOptions:((j=t?.meta)==null?void 0:j.sortOptions)||[],currentSort:p,onSortChange:k}),d.jsx(D0,{open:f,onClose:P,children:d.jsx(Ii,{facets:U,onToggleValue:g,onClearField:m,onSetRange:b,onClearAll:_,autoApply:e,onApplyFilters:S,fieldLabels:Pi,sortOptions:((L=t?.meta)==null?void 0:L.sortOptions)||[],currentSort:p,onSortChange:H,showSortOnMobile:!0,isMobile:!0,onCloseMobile:P})}),d.jsx(pr,{merchandising:t?.merchandising,position:"header"}),d.jsx(pr,{merchandising:t?.merchandising,position:"banner"}),d.jsxs("div",{className:"collection-grid-container search-grid-container tw-w-full tw-px-[20px] md:tw-px-[40px] tw-flex tw-gap-[40px]",children:[d.jsxs("div",{className:`collection-sidebar search-sidebar tw-w-full tw-max-w-[18%] tw-hidden md:tw-block ${f?"md:tw-block":"md:tw-hidden"}`,role:"region","aria-label":"Filters",tabIndex:0,children:[d.jsx("h3",{className:"tw-uppercase",children:"Filter"}),d.jsx(Ii,{facets:U,onToggleValue:g,onClearField:m,onSetRange:b,onClearAll:_,autoApply:e,onApplyFilters:S,fieldLabels:Pi,sortOptions:((M=t?.meta)==null?void 0:M.sortOptions)||[],currentSort:p,onSortChange:k,showSortOnMobile:!1,isMobile:!1})]}),G.length>
8690?d.jsxs("div",{className:`collection-grid search-grid tw-grid tw-gap-[20px] tw-w-full tw-relative ${c===1?"tw-grid-cols-1":c===2?"tw-grid-cols-2":c===4?"tw-grid-cols-4":"tw-grid-cols-3"}`,children:[n&&d.jsx("div",{className:"tw-absolute tw-inset-0 tw-bg-white tw-bg-opacity-75 tw-flex tw-items-center tw-justify-center tw-z-10",children:d.jsx("div",{className:"clp_loading",children:"Loading..."})}),rh(G,t?.merchandising).filter(B=>B._isBanner||B&&typeof B=="object"&&B.uid).map(B=>B._isBanner?d.jsx("div",{className:"ss-inline-banner",dangerouslySetInnerHTML:{__html:B._bannerHtml}},`banner-${B._bannerId}`):d.jsx(_a,{productId:B.uid,className:"search-grid__item"},B.uid))]}):d.jsx("div",{className:"tw-w-full",children:n?d.jsx("div",{className:"clp_loading tw-py-12 tw-text-center",children:"Loading..."}):d.jsx(oh,{hasActiveFilters:V,onClearAll:_,emptyMessage:o?`We couldn't find anything for "${o}". Try a different search term.`:"Enter a search term to see results."})})]}),d.jsx(pr,{merchandising:t?.merchandising,position:"footer"}),G.length>0&&d.jsx(ah,{pagination:Q,onPageChange:N})]})},$0=({hideSubmit:e=!0})=>{const[t,r]=E.useState(""),[n,i]=E.useState([]),[s,a]=E.useState(!1),[o,l]=E.useState(-1),[c,u]=E.useState(!1),[f,h]=E.useState([]),[v,y]=E.useState([]),[w,x]=E.useState(!1),[p,g]=E.useState([]),m=E.useRef(null),b=E.useRef(null),_=E.useRef(null),S=E.useRef(null),k=E.useRef(!1),N=E.useRef(!1),R=E.useRef(0),P=E.useRef(0);E.useEffect(()=>{ij().then(g)},[]);const H=E.useCallback(()=>{_.current&&(_.current.blur(),document.activeElement&&document.activeElement.blur&&document.activeElement.blur())},[]),G=E.useCallback(async F=>{var K;if(F.length<2){i([]),u(!1);return}a(!0);try{const[oe,de]=await wd.autocomplete({search:{query:{string:F}},pagination:{pageSize:8}});console.log("Autocomplete results:",de,oe);const le=((K=de?.autocomplete)==null?void 0:K.alternatives)||[];h(le);const xe=de?.results||[];i(xe);const jt=xe.map(Jt=>{const ht=Jt.id||Jt.uid||Jt.productId||"";if(!ht)return null;const ye=String(ht).match(/(\d+)/g);return ye?ye.pop():null}).filter(Boolean);y(jt),u(!0)}catch(oe){console.error("Autocomplete error:",oe),i([]),h([]),y([]),u(!0)}finally{a(!1)}},[]);E.useEffect(()=>(m.current&&clearTimeout(m.current),t.trim()?m.current=setTimeout(()=>{G(t)},300):(i([]),h([]),y([]),u(!1)),()=>{m.current&&clearTimeout(m.current)}),[t,G]),E.useEffect(()=>{const F=de=>{b.current&&!b.current.contains(de.target)&&_.current&&!_.current.contains(de.target)&&(u(!1),H())},K=de=>{B(de)},oe=()=>{z()};return document.addEventListener("click",F),document.addEventListener("mousemove",K),document.addEventListener("mouseup",oe),()=>{document.removeEventListener("click",F),document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",oe)}},[c,H]),E.useEffect(()=>{const F="is-autocomplete-open",K=document.querySelector(".section-header");return w||c?(document.body.classList.add(F),K&&K.classList.add("shopify-section-header-sticky")):(document.body.classList.remove(F),K&&K.classList.remove("shopify-section-header-sticky")),()=>{document.body.classList.remove(F),K&&K.classList.remove("shopify-section-header-sticky")}},[c,w]);const Q=F=>{r(F.target.value),l(-1)},U=F=>{if(!c){F.key==="Enter"&&A(F);return}switch(F.key){case"ArrowDown":F.preventDefault(),l(K=>K<n.length-1?K+1:K);break;case"ArrowUp":F.preventDefault(),l(K=>K>-1?K-1:-1);break;case"Enter":F.preventDefault(),o>=0&&o<n.length?V(n[o]):A(F);break;case"Escape":u(!1),l(-1),H();break}},V=F=>{r(F.name||F.title||""),u(!1),l(-1),H(),F.url?window.location.href=F.url:A(new Event("submit"))},A=F=>{if(F.preventDefault(),k.current){k.current=!1;return}t.trim()&&(H(),window.location.href=`/search?q=${encodeURIComponent(t)}`)},D=F=>{F.preventDefault(),F.stopPropagation(),r(""),i([]),h([]),y([]),u(!1),l(-1),H(),setTimeout(()=>{var K;(K=_.current)==null||K.focus()},0)},C=()=>{x(!0),n.length>0&&u(!0)},T=()=>{setTimeout(()=>{x(!1)},150)},j=F=>{r(F),u(!1),H(),window.location.href=`/search?q=${encodeURIComponent(F)}`},L=async(F,K)=>{K&&typeof K.preventDefault=="function"&&(K.preventDefault(),K.stopPropagation()),k.current=!0,r(F),l(-1),await G(F),u(!0),S.current&&(S.current.scrollLeft=0)},M=F=>{const K=S.current;K&&(N.current=!0,R.current=F.pageX-K.offsetLeft,P.current=K.scrollLeft,K.style.cursor="grabbing",K.style.userSelect="none")},B=F=>{if(!N.current)return;F.preventDefault();const K=S.current;if(!K)return;const de=(F.pageX-K.offsetLeft-R.current)*2;K.scrollLeft=P.current-de},z=()=>{N.current=!1;const F=S.current;F&&(F.style.cursor="grab",F.style.userSelect="auto")},X=()=>{N.current=!1;const F=S.current;F&&(F.style.cursor="grab",F.style.userSelect="auto")},ce=F=>{const K=S.current;K&&(N.current=!0,R.current=F.touches[0].pageX-K.offsetLeft,P.current=K.scrollLeft)},Z=F=>{if(!N.current)return;F.preventDefault(),F.stopPropagation();const K=S.current;if(!K)return;const de=(F.touches[0].pageX-K.offsetLeft-R.current)*2;K.scrollLeft=P.current-de},q=()=>{N.current=!1};return d.jsx("form",{className:"autocomplete-search",onSubmit:A,children:d.jsxs("div",{className:"autocomplete-search__container",children:[d.jsxs("div",{className:"autocomplete-search__input-wrapper",children:[d.jsx("input",{ref:_,type:"text",className:"autocomplete-search__input",value:t,onChange:Q,onKeyDown:U,onFocus:C,onBlur:T,placeholder:"Search",autoComplete:"off",id:"autocomplete-search-input",n
869ame:"q"}),!w&&d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"nav-search-btn",children:d.jsx("path",{d:"m14.889 15.114 3.018 3.277m-6.481-2.099a5.346 5.346 0 1 0 0-10.692 5.346 5.346 0 0 0 0 10.692z",stroke:"#1F1F1F",strokeWidth:".9",strokeLinejoin:"round"})}),w&&t&&d.jsx("button",{type:"button",className:"autocomplete-search__clear",onClick:D,"aria-label":"Clear search",children:"\u2715"})]}),!e&&d.jsx("button",{type:"submit",className:"autocomplete-search__submit",children:"Search"}),c&&d.jsx("div",{ref:b,className:"autocomplete-search__results",children:d.jsxs("div",{className:"autocomplete-search__two-col",children:[d.jsxs("div",{className:"autocomplete-search__col-left",children:[p.length>0&&d.jsxs("div",{className:"autocomplete-search__popular-searches",children:[d.jsx("p",{className:"tw-uppercase tw-text-[14px] autocomplete-search_title",children:"Popular Searches"}),d.jsx("ul",{className:"autocomplete-search__suggestions-list",children:p.map((F,K)=>d.jsx("li",{className:"autocomplete-search__suggestion-item",children:d.jsx("button",{type:"button",onClick:()=>j(F.searchQuery),className:"autocomplete-search__suggestion-button",children:F.searchQuery})},`trending-${K}`))})]}),d.jsx("p",{className:"tw-uppercase tw-text-[14px] autocomplete-search_title",children:"design suggetions"}),d.jsx("ul",{className:"autocomplete-search__suggestions-list",children:f&&f.length>0?f.map((F,K)=>d.jsx("li",{className:"autocomplete-search__suggestion-item",children:d.jsx("button",{type:"button",onClick:oe=>L(F.text,oe),className:"autocomplete-search__suggestion-button",children:F.text})},`sugg-${K}`)):d.jsx("li",{className:"autocomplete-search__suggestion-item is-empty",children:"No suggestions"})})]}),d.jsxs("div",{className:"autocomplete-search__col-right",children:[d.jsxs("div",{className:"tw-flex tw-justify-between tw-items-center",children:[d.jsxs("p",{className:"autocomplete-search_title",children:["Products (",v.length,")"]}),v.length>0&&d.jsx("a",{className:"autocomplete-search_title tw-decoration-none tw-color-black tw-uppercase tw-text-[16px] disabled-white-text",href:`/search?q=${encodeURIComponent(t)}`,children:"See all results"})]}),v.length>0?d.jsx("div",{className:"autocomplete-search__slider",ref:S,onMouseDown:M,onMouseLeave:X,onTouchStart:ce,onTouchMove:Z,onTouchEnd:q,children:d.jsx("div",{className:"autocomplete-search__slides",children:v.slice(0,12).map((F,K)=>d.jsx("div",{className:"autocomplete-search__slide",children:d.jsx(_a,{productId:F,showSwatches:!0,className:"autocomplete-search__product-card"})},`slide-${F}-${K}`))})}):d.jsx("div",{className:"autocomplete-search__empty-state",children:d.jsx("p",{children:"No results found"})})]})]})}),s&&d.jsx("div",{className:"autocomplete-search__loading",children:"Searching..."})]})})},kj=({autoApplyFilters:e=!0})=>{var L,M,B,z,X,ce,Z;const[t,r]=E.useState(null),[n,i]=E.useState(!0),[s,a]=E.useState(!1),[o,l]=E.useState(null),c=()=>{try{const q=localStorage.getItem("collection_grid_columns");if(q){const F=parseInt(q,10);if([1,2,3,4].includes(F))return F}}catch(q){console.warn("Error loading grid columns from localStorage:",q)}return window.innerWidth<990?2:3},[u,f]=E.useState(c),[h,v]=E.useState(!1),[y,w]=E.useState(""),{filters:x,ranges:p,currentPage:g,sort:m,handleToggleValue:b,handleClearField:_,handleSetRange:S,handleClearAll:k,handleApplyFilters:N,handleSortChange:R,handlePageChange:P}=nh(t),H=E.useRef({searchQuery:y,filters:x,ranges:p,currentPage:g,sort:m,gridColumns:u});E.useEffect(()=>{const q=()=>{const de=new URLSearchParams(window.location.search).get("q")||"";w(de)};q();const F=()=>{q()},K=oe=>{oe.persisted&&q()};return window.addEventListener("popstate",F),window.addEventListener("pageshow",K),()=>{window.removeEventListener("popstate",F),window.removeEventListener("pageshow",K)}},[]),E.useEffect(()=>{const q=()=>{window.innerWidth>=768?v(!0):v(!1);try{localStorage.getItem("collection_grid_columns")||(window.innerWidth<990?f(2):f(3))}catch{window.innerWidth<990?f(2):f(3)}};return q(),window.addEventListener("resize",q),()=>window.removeEventListener("resize",q)},[]),E.useEffect(()=>{(async()=>{var F;try{const K=H.current;if(t!==null&&K.gridColumns!==u&&K.searchQuery===y&&JSON.stringify(K.filters)===JSON.stringify(x)&&JSON.stringify(K.ranges)===JSON.stringify(p)&&K.currentPage===g&&JSON.stringify(K.sort)===JSON.stringify(m)?a(!0):i(!0),l(null),!y){r({results:{results:[],facets:[],pagination:{page:1,pageSize:50,totalResults:0,totalPages:0}},meta:{}}),i(!1),a(!1);return}const de=await I0({query:y,filters:x,ranges:p,page:g,pageSize:50,sort:m,gridColumns:u});if(de!=null&&de.merchandising&&(F=de?.results)!=null&&F.results){const le=th(de.results.results,de.merchandising);de.results.results=le}r(de),H.current={searchQuery:y,filters:x,ranges:p,currentPage:g,sort:m,gridColumns:u}}catch(K){l(K)}finally{i(!1),a(!1)}})()},[y,x,p,g,m,u]);const G=q=>{try{localStorage.setItem("collection_grid_columns",q.toString())}catch(F){console.warn("Error saving grid columns to localStorage:",F)}f(q)},Q=()=>{v(q=>!q)},U=q=>{R(q),window.innerWidth<768&&v(!1)};if(n&&!t)return d.jsx("div",{className:"clp_loading tw-px-[20px] md:tw-px-[40px] tw-mt-12",children:"Loading..."});if(o&&!t)return d.jsxs("div",{className:"tw-px-[20px] md:tw-px-[40px] tw-mt-12",children:["Error loading products: ",o.message]});const V=((L=t?.results)==null?void 0:L.results)||[],A=(M=t?.results)==null?void 0:M.pagination,D=V&&V.length>0,C=R0((B=t?.results)==null?void 0:B.results),T=((z=t?.results)==null?void 0:z.facets)||[],j=P0(T).map(q=>{var F,K,oe,de;return q.type==="value"?{...q,values:q.values.map(le=>{var xe;return{...le,selected:((xe=x[q.field])==null?void 0:xe.includes(le.value))||!1}})}:q.type==="range"?(q.field==="price"||q.field==="ss_price")&&(q.min===void 0||q.max===void 0)?{...q,min:q.min!==void 0?q.min:C.min,max:q.max!==void 0?q.max:C.max,selectedMin:(F=p[q.field])==null?void 0:F.min,selectedMax:(K=p[q.field])==null?void 0:K.max}:{...q,selectedMin:(oe=p[q.field])==null?void 0:oe.min,selectedMax:(de=p[q.field])==null?void 0:de.max}:q});return d.jsxs(d.Fragment,{children:[d.jsx(sh,{gridColumns:u,onGridChange:G,totalItems:A?.totalResults||0,onClearAll:k,onToggleSidebar:Q,sidebarOpen:h,hasActiveFilters:ca(x,p,m),activeFilterTypes:Wl(x,p,m),sortOptions:((X=t?.meta)==null?void 0:X.sortOptions)||[],currentSort:m,onSortChange:R}),!D&&d.jsx(oh,{hasActiveFilters:ca(x,p,m),onClearAll:k}),h&&d.jsx("div",{className:"tw-fixed tw-inset-0 tw-bg-black tw-bg-opacity-50 tw-z-50 md:tw-hidden",onClick:Q,children:d.jsx("div",{className:"tw-fixed tw-top-0 tw-left-0 tw-h-full tw-w-[400px] tw-bg-white tw-shadow-lg tw-overflow-y-auto",onClick:q=>q.stopPropagation(),children:d.jsxs("div",{className:"tw-p-4",children:[d.jsxs("div",{className:"tw-flex tw-justify-between tw-items-center tw-mb-4",children:[d.jsx("h3",{className:"tw-uppercase tw-text-lg tw-font-semibold",children:"Filter"}),d.jsx("button",{onClick:Q,className:"tw-text-gray-500 hover:tw-text-gray-700 tw-text-2xl close-filters-btn","aria-label":"Close filters",children:d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:d.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.28774 7.22703L7.22708 8.28769L10.9394 12L7.22708 15.7123L8.28774 16.773L12.0001 13.0607L15.7124 16.773L16.773 15.7123L13.0607 12L16.773 8.28769L15.7124 7.22703L12.0001 10.9393L8.28774 7.22703Z",fill:"#1F1F1F"})})})]}),d.jsx(Ii,{facets:j,onToggleValue:b,onClearField:_,onSetRange:S,onClearAll:k,autoApply:e,onApplyFilters:N,fieldLabels:Pi,sortOptions:((ce=t?.meta)==null?void 0:ce.sortOptions)||[],currentSort:m,onSortChange:U,showSortOnMobile:!0,isMobile:!0,onCloseMobile:Q})]})})}),d.jsx(pr,{merchandising:t?.merchandising,position:"header"}),d.jsx(pr,{merchandising:t?.merchandising,position:"banner"}),d.jsxs("div",{className:"search-template-container tw-w-full tw-px-[20px] md:tw-px-[40px] tw-flex tw-gap-[40px]",children:[d.jsxs("div",{className:`search-sidebar tw-w-full tw-max-w-[18%] tw-hidden md:tw-block ${h?"md:tw-block":"md:tw-hidden"}`,children:[d.jsx("h3",{className:"tw-uppercase",children:"Filter"}),d.jsx(Ii,{facets:j,onToggleValue:b,onClearField:_,onSetRange:S,onClearAll:k,autoApply:e,onApplyFilters:N,fieldLabels:Pi,sortOptions:((Z=t?.meta)==null?void 0:Z.sortOptions)||[],currentSort:m,onSortChange:R,showSortOnMobile:!1,isMobile:!1})]}
869),D&&d.jsxs("div",{className:`search-grid tw-grid tw-gap-[20px] tw-w-full tw-relative ${u===1?"tw-grid-cols-1":u===2?"tw-grid-cols-2":u===4?"tw-grid-cols-4":"tw-grid-cols-3"}`,children:[s&&d.jsx("div",{className:"tw-absolute tw-inset-0 tw-bg-white tw-bg-opacity-75 tw-flex tw-items-center tw-justify-center tw-z-10",children:d.jsx("div",{className:"clp_loading",children:"Loading..."})}),rh(V,t?.merchandising).filter(q=>q._isBanner||q&&typeof q=="object"&&q.id).map(q=>q._isBanner?d.jsx("div",{className:"ss-inline-banner",dangerouslySetInnerHTML:{__html:q._bannerHtml}},`banner-${q._bannerId}`):d.jsx(Sa,{product:q,className:"search-grid__item",showImage:!0,showTitle:!0,showPrice:!0,showBrand:!1,showCollection:!1,linkToProduct:!0},q.id))]})]}),d.jsx(pr,{merchandising:t?.merchandising,position:"footer"}),D&&d.jsx(ah,{pagination:A,onPageChange:P})]})},ch=e=>{const t={};for(const r of e.attributes){const{name:n,value:i}=r;if(n.startsWith("data-")){let s=n.replace("data-","");s=s.replace(/-([a-z])/g,(a,o)=>o.toUpperCase());try{t[s]=JSON.parse(i)}catch{t[s]=i}}}return t},uh=(e,t,r={})=>{if(t)try{ay(t).render(d.jsx(U1,{client:dk,children:d.jsx(mk,{children:jd.createElement(e,r)})}))}catch(n){console.error("Error rendering React component:",n)}},xd={"product-card":aa,"product-card-with-swatches":Bl,"product-grid":Rw,"product-grid-with-swatches":E0,"product-carousel-with-swatches":k0,"product-search":Fw,"product-detail":Aw,"product-detail-with-swatches":S0,swatch:Pn,"swatch-group":Rl,"product-swatches":Hf,"product-swatches-by-handle":w0,"product-swatches-by-handle-axios":b0,"customizable-product":N0,"product-variant-selector":TN,"collection-grid":lh,"search-results-grid":z0,"product-by-id":_a,"searchspring-product-card":Sa,"autocomplete-search":$0,"search-template":kj},rl=new WeakSet,an=(e=document)=>{Object.entries(xd).forEach(([t,r])=>{e.querySelectorAll(`[data-react-component="${t}"]:not([data-react-initialized])`).forEach(i=>{if(!rl.has(i)){const s=ch(i);uh(r,i,s),i.setAttribute("data-react-initialized","true"),rl.add(i)}})})};document.addEventListener("DOMContentLoaded",()=>{an()});const Cj=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.forEach(r=>{if(r.nodeType===1){if(r.hasAttribute&&r.hasAttribute("data-react-component")){const n=r.getAttribute("data-react-component");if(xd[n]&&!rl.has(r)){const i=ch(r);uh(xd[n],r,i),r.setAttribute("data-react-initialized","true"),rl.add(r)}}an(r)}})})});document.addEventListener("DOMContentLoaded",()=>{Cj.observe(document.body,{childList:!0,subtree:!0})}),window.initializeReactComponents=an,document.addEventListener("shopify:section:load",e=>{an(e.target)}),document.addEventListener("shopify:section:reorder",e=>{an(e.target)}),document.addEventListener("cart:updated",()=>{an()}),document.addEventListener("product:quickview:loaded",()=>{an()}),window.ReactComponents={ProductCard:aa,ProductCardWithSwatches:Bl,ProductGrid:Rw,ProductGridWithSwatches:E0,ProductCarouselWithSwatches:k0,ProductSearch:Fw,ProductDetail:Aw,ProductDetailWithSwatches:S0,Swatch:Pn,SwatchGroup:Rl,ProductSwatches:Hf,ProductSwatchesByHandle:w0,ProductSwatchesByHandleAxios:b0,CustomizableProduct:N0,initializeReactComponents:an,renderReactComponent:uh,getPropsFromAttributes:ch,CollectionGrid:lh,SearchResultsGrid:z0,ProductById:_a,SearchSpringProductCard:Sa,AutocompleteSearch:$0}});export default Nj(); 870//# sourceMappingURL=/cdn/shop/t/1298/assets/react-components.js.map?v=121087348221182523411790885858
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.