var xj=e=>{throw TypeError(e)};var S0=(e,t,r)=>t.has(e)||xj("Cannot "+r);var X=(e,t,r)=>(S0(e,t,"read from private field"),r?r.call(e):t.get(e)),et=(e,t,r)=>t.has(e)?xj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),$e=(e,t,r,n)=>(S0(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),bt=(e,t,r)=>(S0(e,t,"access private method"),r);var Mh=(e,t,r,n)=>({set _(a){$e(e,t,a,r)},get _(){return X(e,t,n)}});function s5(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();function SS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n5(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var ES={exports:{}},dx={},kS={exports:{}},Nt={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var mh=Symbol.for("react.element"),a5=Symbol.for("react.portal"),i5=Symbol.for("react.fragment"),o5=Symbol.for("react.strict_mode"),l5=Symbol.for("react.profiler"),c5=Symbol.for("react.provider"),u5=Symbol.for("react.context"),d5=Symbol.for("react.forward_ref"),f5=Symbol.for("react.suspense"),h5=Symbol.for("react.memo"),m5=Symbol.for("react.lazy"),gj=Symbol.iterator;function p5(e){return e===null||typeof e!="object"?null:(e=gj&&e[gj]||e["@@iterator"],typeof e=="function"?e:null)}var TS={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},AS=Object.assign,RS={};function zu(e,t,r){this.props=e,this.context=t,this.refs=RS,this.updater=r||TS}zu.prototype.isReactComponent={};zu.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")};zu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function DS(){}DS.prototype=zu.prototype;function ey(e,t,r){this.props=e,this.context=t,this.refs=RS,this.updater=r||TS}var ty=ey.prototype=new DS;ty.constructor=ey;AS(ty,zu.prototype);ty.isPureReactComponent=!0;var vj=Array.isArray,OS=Object.prototype.hasOwnProperty,ry={current:null},PS={key:!0,ref:!0,__self:!0,__source:!0};function IS(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)OS.call(t,n)&&!PS.hasOwnProperty(n)&&(a[n]=t[n]);var l=arguments.length-2;if(l===1)a.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)a[n]===void 0&&(a[n]=l[n]);return{$$typeof:mh,type:e,key:i,ref:o,props:a,_owner:ry.current}}function x5(e,t){return{$$typeof:mh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function sy(e){return typeof e=="object"&&e!==null&&e.$$typeof===mh}function g5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var yj=/\/+/g;function E0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?g5(""+e.key):t.toString(36)}function Dm(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case mh:case a5:o=!0}}if(o)return o=e,a=a(o),e=n===""?"."+E0(o,0):n,vj(a)?(r="",e!=null&&(r=e.replace(yj,"$&/")+"/"),Dm(a,t,r,"",function(u){return u})):a!=null&&(sy(a)&&(a=x5(a,r+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(yj,"$&/")+"/")+e)),t.push(a)),1;if(o=0,n=n===""?".":n+":",vj(e))for(var l=0;l<e.length;l++){i=e[l];var c=n+E0(i,l);o+=Dm(i,t,r,c,a)}else if(c=p5(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=n+E0(i,l++),o+=Dm(i,t,r,c,a);else if(i==="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 o}function Bh(e,t,r){if(e==null)return e;var n=[],a=0;return Dm(e,n,"","",function(i){return t.call(r,i,a++)}),n}function v5(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 Ds={current:null},Om={transition:null},y5={ReactCurrentDispatcher:Ds,ReactCurrentBatchConfig:Om,ReactCurrentOwner:ry};function FS(){throw Error("act(...) is not supported in production builds of React.")}Nt.Children={map:Bh,forEach:function(e,t,r){Bh(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Bh(e,function(){t++}),t},toArray:function(e){return Bh(e,function(t){return t})||[]},only:function(e){if(!sy(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Nt.Component=zu;Nt.Fragment=i5;Nt.Profiler=l5;Nt.PureComponent=ey;Nt.StrictMode=o5;Nt.Suspense=f5;Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=y5;Nt.act=FS;Nt.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=AS({},e.props),a=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=ry.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)OS.call(t,c)&&!PS.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:mh,type:e.type,key:a,ref:i,props:n,_owner:o}};Nt.createContext=function(e){return e={$$typeof:u5,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:c5,_context:e},e.Consumer=e};Nt.createElement=IS;Nt.createFactory=function(e){var t=IS.bind(null,e);return t.type=e,t};Nt.createRef=function(){return{current:null}};Nt.forwardRef=function(e){return{$$typeof:d5,render:e}};Nt.isValidElement=sy;Nt.lazy=function(e){return{$$typeof:m5,_payload:{_status:-1,_result:e},_init:v5}};Nt.memo=function(e,t){return{$$typeof:h5,type:e,compare:t===void 0?null:t}};Nt.startTransition=function(e){var t=Om.transition;Om.transition={};try{e()}finally{Om.transition=t}};Nt.unstable_act=FS;Nt.useCallback=function(e,t){return Ds.current.useCallback(e,t)};Nt.useContext=function(e){return Ds.current.useContext(e)};Nt.useDebugValue=function(){};Nt.useDeferredValue=function(e){return Ds.current.useDeferredValue(e)};Nt.useEffect=function(e,t){return Ds.current.useEffect(e,t)};Nt.useId=function(){return Ds.current.useId()};Nt.useImperativeHandle=function(e,t,r){return Ds.current.useImperativeHandle(e,t,r)};Nt.useInsertionEffect=function(e,t){return Ds.current.useInsertionEffect(e,t)};Nt.useLayoutEffect=function(e,t){return Ds.current.useLayoutEffect(e,t)};Nt.useMemo=function(e,t){return Ds.current.useMemo(e,t)};Nt.useReducer=function(e,t,r){return Ds.current.useReducer(e,t,r)};Nt.useRef=function(e){return Ds.current.useRef(e)};Nt.useState=function(e){return Ds.current.useState(e)};Nt.useSyncExternalStore=function(e,t,r){return Ds.current.useSyncExternalStore(e,t,r)};Nt.useTransition=function(){return Ds.current.useTransition()};Nt.version="18.3.1";kS.exports=Nt;var g=kS.exports;const de=SS(g),ny=s5({__proto__:null,default:de},[g]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var b5=g,w5=Symbol.for("react.element"),j5=Symbol.for("react.fragment"),N5=Object.prototype.hasOwnProperty,_5=b5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C5={key:!0,ref:!0,__self:!0,__source:!0};function LS(e,t,r){var n,a={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)N5.call(t,n)&&!C5.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:w5,type:e,key:i,ref:o,props:a,_owner:_5.current}}dx.Fragment=j5;dx.jsx=LS;dx.jsxs=LS;ES.exports=dx;var s=ES.exports,MS={exports:{}},pn={},BS={exports:{}},US={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(Q,O){var ne=Q.length;Q.push(O);e:for(;0<ne;){var he=ne-1>>>1,I=Q[he];if(0<a(I,O))Q[he]=O,Q[ne]=I,ne=he;else break e}}function r(Q){return Q.length===0?null:Q[0]}function n(Q){if(Q.length===0)return null;var O=Q[0],ne=Q.pop();if(ne!==O){Q[0]=ne;e:for(var he=0,I=Q.length,Y=I>>>1;he<Y;){var E=2*(he+1)-1,B=Q[E],ee=E+1,J=Q[ee];if(0>a(B,ne))ee<I&&0>a(J,B)?(Q[he]=J,Q[ee]=ne,he=ee):(Q[he]=B,Q[E]=ne,he=E);else if(ee<I&&0>a(J,ne))Q[he]=J,Q[ee]=ne,he=ee;else break e}}return O}function a(Q,O){var ne=Q.sortIndex-O.sortIndex;return ne!==0?ne:Q.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,h=3,m=!1,v=!1,p=!1,x=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(Q){for(var O=r(u);O!==null;){if(O.callback===null)n(u);else if(O.startTime<=Q)n(u),O.sortIndex=O.expirationTime,t(c,O);else break;O=r(u)}}function N(Q){if(p=!1,b(Q),!v)if(r(c)!==null)v=!0,V(C);else{var O=r(u);O!==null&&Z(N,O.startTime-Q)}}function C(Q,O){v=!1,p&&(p=!1,w(S),S=-1),m=!0;var ne=h;try{for(b(O),f=r(c);f!==null&&(!(f.expirationTime>O)||Q&&!M());){var he=f.callback;if(typeof he=="function"){f.callback=null,h=f.priorityLevel;var I=he(f.expirationTime<=O);O=e.unstable_now(),typeof I=="function"?f.callback=I:f===r(c)&&n(c),b(O)}else n(c);f=r(c)}if(f!==null)var Y=!0;else{var E=r(u);E!==null&&Z(N,E.startTime-O),Y=!1}return Y}finally{f=null,h=ne,m=!1}}var _=!1,j=null,S=-1,k=5,D=-1;function M(){return!(e.unstable_now()-D<k)}function T(){if(j!==null){var Q=e.unstable_now();D=Q;var O=!0;try{O=j(!0,Q)}finally{O?A():(_=!1,j=null)}}else _=!1}var A;if(typeof y=="function")A=function(){y(T)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,P=W.port2;W.port1.onmessage=T,A=function(){P.postMessage(null)}}else A=function(){x(T,0)};function V(Q){j=Q,_||(_=!0,A())}function Z(Q,O){S=x(function(){Q(e.unstable_now())},O)}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(Q){Q.callback=null},e.unstable_continueExecution=function(){v||m||(v=!0,V(C))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(Q){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var ne=h;h=O;try{return Q()}finally{h=ne}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,O){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var ne=h;h=Q;try{return O()}finally{h=ne}},e.unstable_scheduleCallback=function(Q,O,ne){var he=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?he+ne:he):ne=he,Q){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=ne+I,Q={id:d++,callback:O,priorityLevel:Q,startTime:ne,expirationTime:I,sortIndex:-1},ne>he?(Q.sortIndex=ne,t(u,Q),r(c)===null&&Q===r(u)&&(p?(w(S),S=-1):p=!0,Z(N,ne-he))):(Q.sortIndex=I,t(c,Q),v||m||(v=!0,V(C))),Q},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(Q){var O=h;return function(){var ne=h;h=O;try{return Q.apply(this,arguments)}finally{h=ne}}}})(US);BS.exports=US;var S5=BS.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var E5=g,dn=S5;function Ee(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 $S=new Set,vf={};function tc(e,t){yu(e,t),yu(e+"Capture",t)}function yu(e,t){for(vf[e]=t,e=0;e<t.length;e++)$S.add(t[e])}var yi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bg=Object.prototype.hasOwnProperty,k5=/^[: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]*$/,bj={},wj={};function T5(e){return Bg.call(wj,e)?!0:Bg.call(bj,e)?!1:k5.test(e)?wj[e]=!0:(bj[e]=!0,!1)}function A5(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 R5(e,t,r,n){if(t===null||typeof t>"u"||A5(e,t,r,n))return!0;if(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 Os(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var rs={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rs[e]=new Os(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rs[t]=new Os(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rs[e]=new Os(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rs[e]=new Os(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){rs[e]=new Os(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rs[e]=new Os(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rs[e]=new Os(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rs[e]=new Os(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rs[e]=new Os(e,5,!1,e.toLowerCase(),null,!1,!1)});var ay=/[\-:]([a-z])/g;function iy(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(ay,iy);rs[t]=new Os(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(ay,iy);rs[t]=new Os(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(ay,iy);rs[t]=new Os(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rs[e]=new Os(e,1,!1,e.toLowerCase(),null,!1,!1)});rs.xlinkHref=new Os("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rs[e]=new Os(e,1,!1,e.toLowerCase(),null,!0,!0)});function oy(e,t,r,n){var a=rs.hasOwnProperty(t)?rs[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(R5(t,r,a,n)&&(r=null),n||a===null?T5(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ai=E5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Uh=Symbol.for("react.element"),Pc=Symbol.for("react.portal"),Ic=Symbol.for("react.fragment"),ly=Symbol.for("react.strict_mode"),Ug=Symbol.for("react.profiler"),qS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),cy=Symbol.for("react.forward_ref"),$g=Symbol.for("react.suspense"),qg=Symbol.for("react.suspense_list"),uy=Symbol.for("react.memo"),Yi=Symbol.for("react.lazy"),VS=Symbol.for("react.offscreen"),jj=Symbol.iterator;function vd(e){return e===null||typeof e!="object"?null:(e=jj&&e[jj]||e["@@iterator"],typeof e=="function"?e:null)}var ir=Object.assign,k0;function Rd(e){if(k0===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);k0=t&&t[1]||""}return`
`+k0+e}var T0=!1;function A0(e,t){if(!e||T0)return"";T0=!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(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var a=u.stack.split(`
`),i=n.stack.split(`
`),o=a.length-1,l=i.length-1;1<=o&&0<=l&&a[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(a[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||a[o]!==i[l]){var c=`
`+a[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{T0=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Rd(e):""}function D5(e){switch(e.tag){case 5:return Rd(e.type);case 16:return Rd("Lazy");case 13:return Rd("Suspense");case 19:return Rd("SuspenseList");case 0:case 2:case 15:return e=A0(e.type,!1),e;case 11:return e=A0(e.type.render,!1),e;case 1:return e=A0(e.type,!0),e;default:return""}}function zg(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 Ic:return"Fragment";case Pc:return"Portal";case Ug:return"Profiler";case ly:return"StrictMode";case $g:return"Suspense";case qg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case zS:return(e.displayName||"Context")+".Consumer";case qS:return(e._context.displayName||"Context")+".Provider";case cy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uy:return t=e.displayName||null,t!==null?t:zg(e.type)||"Memo";case Yi:t=e._payload,e=e._init;try{return zg(e(t))}catch{}}return null}function O5(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 zg(t);case 8:return t===ly?"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 Oo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function HS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function P5(e){var t=HS(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 a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $h(e){e._valueTracker||(e._valueTracker=P5(e))}function WS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=HS(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Jm(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 Vg(e,t){var r=t.checked;return ir({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Nj(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Oo(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 GS(e,t){t=t.checked,t!=null&&oy(e,"checked",t,!1)}function Hg(e,t){GS(e,t);var r=Oo(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")?Wg(e,t.type,r):t.hasOwnProperty("defaultValue")&&Wg(e,t.type,Oo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _j(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 Wg(e,t,r){(t!=="number"||Jm(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Dd=Array.isArray;function Gc(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Oo(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Gg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ee(91));return ir({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Cj(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Ee(92));if(Dd(r)){if(1<r.length)throw Error(Ee(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Oo(r)}}function KS(e,t){var r=Oo(t.value),n=Oo(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 Sj(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function YS(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 Kg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?YS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qh,XS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qh=qh||document.createElement("div"),qh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Vd={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},I5=["Webkit","ms","Moz","O"];Object.keys(Vd).forEach(function(e){I5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vd[t]=Vd[e]})});function QS(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Vd.hasOwnProperty(e)&&Vd[e]?(""+t).trim():t+"px"}function JS(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=QS(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var F5=ir({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 Yg(e,t){if(t){if(F5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ee(62))}}function Xg(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 Qg=null;function dy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jg=null,Kc=null,Yc=null;function Ej(e){if(e=gh(e)){if(typeof Jg!="function")throw Error(Ee(280));var t=e.stateNode;t&&(t=xx(t),Jg(e.stateNode,e.type,t))}}function ZS(e){Kc?Yc?Yc.push(e):Yc=[e]:Kc=e}function eE(){if(Kc){var e=Kc,t=Yc;if(Yc=Kc=null,Ej(e),t)for(e=0;e<t.length;e++)Ej(t[e])}}function tE(e,t){return e(t)}function rE(){}var R0=!1;function sE(e,t,r){if(R0)return e(t,r);R0=!0;try{return tE(e,t,r)}finally{R0=!1,(Kc!==null||Yc!==null)&&(rE(),eE())}}function bf(e,t){var r=e.stateNode;if(r===null)return null;var n=xx(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(Ee(231,t,typeof r));return r}var Zg=!1;if(yi)try{var yd={};Object.defineProperty(yd,"passive",{get:function(){Zg=!0}}),window.addEventListener("test",yd,yd),window.removeEventListener("test",yd,yd)}catch{Zg=!1}function L5(e,t,r,n,a,i,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var Hd=!1,Zm=null,ep=!1,ev=null,M5={onError:function(e){Hd=!0,Zm=e}};function B5(e,t,r,n,a,i,o,l,c){Hd=!1,Zm=null,L5.apply(M5,arguments)}function U5(e,t,r,n,a,i,o,l,c){if(B5.apply(this,arguments),Hd){if(Hd){var u=Zm;Hd=!1,Zm=null}else throw Error(Ee(198));ep||(ep=!0,ev=u)}}function rc(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 nE(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 kj(e){if(rc(e)!==e)throw Error(Ee(188))}function $5(e){var t=e.alternate;if(!t){if(t=rc(e),t===null)throw Error(Ee(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return kj(a),e;if(i===n)return kj(a),t;i=i.sibling}throw Error(Ee(188))}if(r.return!==n.return)r=a,n=i;else{for(var o=!1,l=a.child;l;){if(l===r){o=!0,r=a,n=i;break}if(l===n){o=!0,n=a,r=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===r){o=!0,r=i,n=a;break}if(l===n){o=!0,n=i,r=a;break}l=l.sibling}if(!o)throw Error(Ee(189))}}if(r.alternate!==n)throw Error(Ee(190))}if(r.tag!==3)throw Error(Ee(188));return r.stateNode.current===r?e:t}function aE(e){return e=$5(e),e!==null?iE(e):null}function iE(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=iE(e);if(t!==null)return t;e=e.sibling}return null}var oE=dn.unstable_scheduleCallback,Tj=dn.unstable_cancelCallback,q5=dn.unstable_shouldYield,z5=dn.unstable_requestPaint,xr=dn.unstable_now,V5=dn.unstable_getCurrentPriorityLevel,fy=dn.unstable_ImmediatePriority,lE=dn.unstable_UserBlockingPriority,tp=dn.unstable_NormalPriority,H5=dn.unstable_LowPriority,cE=dn.unstable_IdlePriority,fx=null,Ma=null;function W5(e){if(Ma&&typeof Ma.onCommitFiberRoot=="function")try{Ma.onCommitFiberRoot(fx,e,void 0,(e.current.flags&128)===128)}catch{}}var ua=Math.clz32?Math.clz32:Y5,G5=Math.log,K5=Math.LN2;function Y5(e){return e>>>=0,e===0?32:31-(G5(e)/K5|0)|0}var zh=64,Vh=4194304;function Od(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 rp(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~a;l!==0?n=Od(l):(i&=o,i!==0&&(n=Od(i)))}else o=r&~a,o!==0?n=Od(o):i!==0&&(n=Od(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&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-ua(t),a=1<<r,n|=e[r],t&=~a;return n}function X5(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 Q5(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-ua(i),l=1<<o,c=a[o];c===-1?(!(l&r)||l&n)&&(a[o]=X5(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function tv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function uE(){var e=zh;return zh<<=1,!(zh&4194240)&&(zh=64),e}function D0(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ph(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ua(t),e[t]=r}function J5(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 a=31-ua(r),i=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~i}}function hy(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-ua(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var $t=0;function dE(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var fE,my,hE,mE,pE,rv=!1,Hh=[],yo=null,bo=null,wo=null,wf=new Map,jf=new Map,Ji=[],Z5="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 Aj(e,t){switch(e){case"focusin":case"focusout":yo=null;break;case"dragenter":case"dragleave":bo=null;break;case"mouseover":case"mouseout":wo=null;break;case"pointerover":case"pointerout":wf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jf.delete(t.pointerId)}}function bd(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=gh(t),t!==null&&my(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function eI(e,t,r,n,a){switch(t){case"focusin":return yo=bd(yo,e,t,r,n,a),!0;case"dragenter":return bo=bd(bo,e,t,r,n,a),!0;case"mouseover":return wo=bd(wo,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return wf.set(i,bd(wf.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,jf.set(i,bd(jf.get(i)||null,e,t,r,n,a)),!0}return!1}function xE(e){var t=hl(e.target);if(t!==null){var r=rc(t);if(r!==null){if(t=r.tag,t===13){if(t=nE(r),t!==null){e.blockedOn=t,pE(e.priority,function(){hE(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 Pm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=sv(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Qg=n,r.target.dispatchEvent(n),Qg=null}else return t=gh(r),t!==null&&my(t),e.blockedOn=r,!1;t.shift()}return!0}function Rj(e,t,r){Pm(e)&&r.delete(t)}function tI(){rv=!1,yo!==null&&Pm(yo)&&(yo=null),bo!==null&&Pm(bo)&&(bo=null),wo!==null&&Pm(wo)&&(wo=null),wf.forEach(Rj),jf.forEach(Rj)}function wd(e,t){e.blockedOn===t&&(e.blockedOn=null,rv||(rv=!0,dn.unstable_scheduleCallback(dn.unstable_NormalPriority,tI)))}function Nf(e){function t(a){return wd(a,e)}if(0<Hh.length){wd(Hh[0],e);for(var r=1;r<Hh.length;r++){var n=Hh[r];n.blockedOn===e&&(n.blockedOn=null)}}for(yo!==null&&wd(yo,e),bo!==null&&wd(bo,e),wo!==null&&wd(wo,e),wf.forEach(t),jf.forEach(t),r=0;r<Ji.length;r++)n=Ji[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ji.length&&(r=Ji[0],r.blockedOn===null);)xE(r),r.blockedOn===null&&Ji.shift()}var Xc=Ai.ReactCurrentBatchConfig,sp=!0;function rI(e,t,r,n){var a=$t,i=Xc.transition;Xc.transition=null;try{$t=1,py(e,t,r,n)}finally{$t=a,Xc.transition=i}}function sI(e,t,r,n){var a=$t,i=Xc.transition;Xc.transition=null;try{$t=4,py(e,t,r,n)}finally{$t=a,Xc.transition=i}}function py(e,t,r,n){if(sp){var a=sv(e,t,r,n);if(a===null)q0(e,t,n,np,r),Aj(e,n);else if(eI(a,e,t,r,n))n.stopPropagation();else if(Aj(e,n),t&4&&-1<Z5.indexOf(e)){for(;a!==null;){var i=gh(a);if(i!==null&&fE(i),i=sv(e,t,r,n),i===null&&q0(e,t,n,np,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else q0(e,t,n,null,r)}}var np=null;function sv(e,t,r,n){if(np=null,e=dy(n),e=hl(e),e!==null)if(t=rc(e),t===null)e=null;else if(r=t.tag,r===13){if(e=nE(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 np=e,null}function gE(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(V5()){case fy:return 1;case lE:return 4;case tp:case H5:return 16;case cE:return 536870912;default:return 16}default:return 16}}var ho=null,xy=null,Im=null;function vE(){if(Im)return Im;var e,t=xy,r=t.length,n,a="value"in ho?ho.value:ho.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===a[i-n];n++);return Im=a.slice(e,1<n?1-n:void 0)}function Fm(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 Wh(){return!0}function Dj(){return!1}function xn(e){function t(r,n,a,i,o){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Wh:Dj,this.isPropagationStopped=Dj,this}return ir(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=Wh)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Wh)},persist:function(){},isPersistent:Wh}),t}var Vu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gy=xn(Vu),xh=ir({},Vu,{view:0,detail:0}),nI=xn(xh),O0,P0,jd,hx=ir({},xh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vy,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!==jd&&(jd&&e.type==="mousemove"?(O0=e.screenX-jd.screenX,P0=e.screenY-jd.screenY):P0=O0=0,jd=e),O0)},movementY:function(e){return"movementY"in e?e.movementY:P0}}),Oj=xn(hx),aI=ir({},hx,{dataTransfer:0}),iI=xn(aI),oI=ir({},xh,{relatedTarget:0}),I0=xn(oI),lI=ir({},Vu,{animationName:0,elapsedTime:0,pseudoElement:0}),cI=xn(lI),uI=ir({},Vu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dI=xn(uI),fI=ir({},Vu,{data:0}),Pj=xn(fI),hI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mI={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"},pI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xI(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pI[e])?!!t[e]:!1}function vy(){return xI}var gI=ir({},xh,{key:function(e){if(e.key){var t=hI[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mI[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vy,charCode:function(e){return e.type==="keypress"?Fm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vI=xn(gI),yI=ir({},hx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ij=xn(yI),bI=ir({},xh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vy}),wI=xn(bI),jI=ir({},Vu,{propertyName:0,elapsedTime:0,pseudoElement:0}),NI=xn(jI),_I=ir({},hx,{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}),CI=xn(_I),SI=[9,13,27,32],yy=yi&&"CompositionEvent"in window,Wd=null;yi&&"documentMode"in document&&(Wd=document.documentMode);var EI=yi&&"TextEvent"in window&&!Wd,yE=yi&&(!yy||Wd&&8<Wd&&11>=Wd),Fj=" ",Lj=!1;function bE(e,t){switch(e){case"keyup":return SI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wE(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fc=!1;function kI(e,t){switch(e){case"compositionend":return wE(t);case"keypress":return t.which!==32?null:(Lj=!0,Fj);case"textInput":return e=t.data,e===Fj&&Lj?null:e;default:return null}}function TI(e,t){if(Fc)return e==="compositionend"||!yy&&bE(e,t)?(e=vE(),Im=xy=ho=null,Fc=!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 yE&&t.locale!=="ko"?null:t.data;default:return null}}var AI={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 Mj(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!AI[e.type]:t==="textarea"}function jE(e,t,r,n){ZS(n),t=ap(t,"onChange"),0<t.length&&(r=new gy("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Gd=null,_f=null;function RI(e){OE(e,0)}function mx(e){var t=Bc(e);if(WS(t))return e}function DI(e,t){if(e==="change")return t}var NE=!1;if(yi){var F0;if(yi){var L0="oninput"in document;if(!L0){var Bj=document.createElement("div");Bj.setAttribute("oninput","return;"),L0=typeof Bj.oninput=="function"}F0=L0}else F0=!1;NE=F0&&(!document.documentMode||9<document.documentMode)}function Uj(){Gd&&(Gd.detachEvent("onpropertychange",_E),_f=Gd=null)}function _E(e){if(e.propertyName==="value"&&mx(_f)){var t=[];jE(t,_f,e,dy(e)),sE(RI,t)}}function OI(e,t,r){e==="focusin"?(Uj(),Gd=t,_f=r,Gd.attachEvent("onpropertychange",_E)):e==="focusout"&&Uj()}function PI(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mx(_f)}function II(e,t){if(e==="click")return mx(t)}function FI(e,t){if(e==="input"||e==="change")return mx(t)}function LI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pa=typeof Object.is=="function"?Object.is:LI;function Cf(e,t){if(pa(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 a=r[n];if(!Bg.call(t,a)||!pa(e[a],t[a]))return!1}return!0}function $j(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qj(e,t){var r=$j(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=$j(r)}}function CE(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?CE(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function SE(){for(var e=window,t=Jm();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Jm(e.document)}return t}function by(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 MI(e){var t=SE(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&CE(r.ownerDocument.documentElement,r)){if(n!==null&&by(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 a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=qj(r,i);var o=qj(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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 BI=yi&&"documentMode"in document&&11>=document.documentMode,Lc=null,nv=null,Kd=null,av=!1;function zj(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;av||Lc==null||Lc!==Jm(n)||(n=Lc,"selectionStart"in n&&by(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}),Kd&&Cf(Kd,n)||(Kd=n,n=ap(nv,"onSelect"),0<n.length&&(t=new gy("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Lc)))}function Gh(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Mc={animationend:Gh("Animation","AnimationEnd"),animationiteration:Gh("Animation","AnimationIteration"),animationstart:Gh("Animation","AnimationStart"),transitionend:Gh("Transition","TransitionEnd")},M0={},EE={};yi&&(EE=document.createElement("div").style,"AnimationEvent"in window||(delete Mc.animationend.animation,delete Mc.animationiteration.animation,delete Mc.animationstart.animation),"TransitionEvent"in window||delete Mc.transitionend.transition);function px(e){if(M0[e])return M0[e];if(!Mc[e])return e;var t=Mc[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in EE)return M0[e]=t[r];return e}var kE=px("animationend"),TE=px("animationiteration"),AE=px("animationstart"),RE=px("transitionend"),DE=new Map,Vj="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 Wo(e,t){DE.set(e,t),tc(t,[e])}for(var B0=0;B0<Vj.length;B0++){var U0=Vj[B0],UI=U0.toLowerCase(),$I=U0[0].toUpperCase()+U0.slice(1);Wo(UI,"on"+$I)}Wo(kE,"onAnimationEnd");Wo(TE,"onAnimationIteration");Wo(AE,"onAnimationStart");Wo("dblclick","onDoubleClick");Wo("focusin","onFocus");Wo("focusout","onBlur");Wo(RE,"onTransitionEnd");yu("onMouseEnter",["mouseout","mouseover"]);yu("onMouseLeave",["mouseout","mouseover"]);yu("onPointerEnter",["pointerout","pointerover"]);yu("onPointerLeave",["pointerout","pointerover"]);tc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));tc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));tc("onBeforeInput",["compositionend","keypress","textInput","paste"]);tc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));tc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));tc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pd="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(" "),qI=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pd));function Hj(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,U5(n,t,void 0,e),e.currentTarget=null}function OE(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var l=n[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&a.isPropagationStopped())break e;Hj(a,l,u),i=c}else for(o=0;o<n.length;o++){if(l=n[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&a.isPropagationStopped())break e;Hj(a,l,u),i=c}}}if(ep)throw e=ev,ep=!1,ev=null,e}function Xt(e,t){var r=t[uv];r===void 0&&(r=t[uv]=new Set);var n=e+"__bubble";r.has(n)||(PE(t,e,2,!1),r.add(n))}function $0(e,t,r){var n=0;t&&(n|=4),PE(r,e,n,t)}var Kh="_reactListening"+Math.random().toString(36).slice(2);function Sf(e){if(!e[Kh]){e[Kh]=!0,$S.forEach(function(r){r!=="selectionchange"&&(qI.has(r)||$0(r,!1,e),$0(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kh]||(t[Kh]=!0,$0("selectionchange",!1,t))}}function PE(e,t,r,n){switch(gE(t)){case 1:var a=rI;break;case 4:a=sI;break;default:a=py}r=a.bind(null,t,r,e),a=void 0,!Zg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function q0(e,t,r,n,a){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;if(l===a||l.nodeType===8&&l.parentNode===a)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;o=o.return}for(;l!==null;){if(o=hl(l),o===null)return;if(c=o.tag,c===5||c===6){n=i=o;continue e}l=l.parentNode}}n=n.return}sE(function(){var u=i,d=dy(r),f=[];e:{var h=DE.get(e);if(h!==void 0){var m=gy,v=e;switch(e){case"keypress":if(Fm(r)===0)break e;case"keydown":case"keyup":m=vI;break;case"focusin":v="focus",m=I0;break;case"focusout":v="blur",m=I0;break;case"beforeblur":case"afterblur":m=I0;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":m=Oj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=iI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=wI;break;case kE:case TE:case AE:m=cI;break;case RE:m=NI;break;case"scroll":m=nI;break;case"wheel":m=CI;break;case"copy":case"cut":case"paste":m=dI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Ij}var p=(t&4)!==0,x=!p&&e==="scroll",w=p?h!==null?h+"Capture":null:h;p=[];for(var y=u,b;y!==null;){b=y;var N=b.stateNode;if(b.tag===5&&N!==null&&(b=N,w!==null&&(N=bf(y,w),N!=null&&p.push(Ef(y,N,b)))),x)break;y=y.return}0<p.length&&(h=new m(h,v,null,r,d),f.push({event:h,listeners:p}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&r!==Qg&&(v=r.relatedTarget||r.fromElement)&&(hl(v)||v[bi]))break e;if((m||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,m?(v=r.relatedTarget||r.toElement,m=u,v=v?hl(v):null,v!==null&&(x=rc(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=u),m!==v)){if(p=Oj,N="onMouseLeave",w="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(p=Ij,N="onPointerLeave",w="onPointerEnter",y="pointer"),x=m==null?h:Bc(m),b=v==null?h:Bc(v),h=new p(N,y+"leave",m,r,d),h.target=x,h.relatedTarget=b,N=null,hl(d)===u&&(p=new p(w,y+"enter",v,r,d),p.target=b,p.relatedTarget=x,N=p),x=N,m&&v)t:{for(p=m,w=v,y=0,b=p;b;b=pc(b))y++;for(b=0,N=w;N;N=pc(N))b++;for(;0<y-b;)p=pc(p),y--;for(;0<b-y;)w=pc(w),b--;for(;y--;){if(p===w||w!==null&&p===w.alternate)break t;p=pc(p),w=pc(w)}p=null}else p=null;m!==null&&Wj(f,h,m,p,!1),v!==null&&x!==null&&Wj(f,x,v,p,!0)}}e:{if(h=u?Bc(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var C=DI;else if(Mj(h))if(NE)C=FI;else{C=PI;var _=OI}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(C=II);if(C&&(C=C(e,u))){jE(f,C,r,d);break e}_&&_(e,h,u),e==="focusout"&&(_=h._wrapperState)&&_.controlled&&h.type==="number"&&Wg(h,"number",h.value)}switch(_=u?Bc(u):window,e){case"focusin":(Mj(_)||_.contentEditable==="true")&&(Lc=_,nv=u,Kd=null);break;case"focusout":Kd=nv=Lc=null;break;case"mousedown":av=!0;break;case"contextmenu":case"mouseup":case"dragend":av=!1,zj(f,r,d);break;case"selectionchange":if(BI)break;case"keydown":case"keyup":zj(f,r,d)}var j;if(yy)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Fc?bE(e,r)&&(S="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(S="onCompositionStart");S&&(yE&&r.locale!=="ko"&&(Fc||S!=="onCompositionStart"?S==="onCompositionEnd"&&Fc&&(j=vE()):(ho=d,xy="value"in ho?ho.value:ho.textContent,Fc=!0)),_=ap(u,S),0<_.length&&(S=new Pj(S,e,null,r,d),f.push({event:S,listeners:_}),j?S.data=j:(j=wE(r),j!==null&&(S.data=j)))),(j=EI?kI(e,r):TI(e,r))&&(u=ap(u,"onBeforeInput"),0<u.length&&(d=new Pj("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=j))}OE(f,t)})}function Ef(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ap(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=bf(e,r),i!=null&&n.unshift(Ef(e,i,a)),i=bf(e,t),i!=null&&n.push(Ef(e,i,a))),e=e.return}return n}function pc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Wj(e,t,r,n,a){for(var i=t._reactName,o=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,a?(c=bf(r,i),c!=null&&o.unshift(Ef(r,c,l))):a||(c=bf(r,i),c!=null&&o.push(Ef(r,c,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var zI=/\r\n?/g,VI=/\u0000|\uFFFD/g;function Gj(e){return(typeof e=="string"?e:""+e).replace(zI,`
`).replace(VI,"")}function Yh(e,t,r){if(t=Gj(t),Gj(e)!==t&&r)throw Error(Ee(425))}function ip(){}var iv=null,ov=null;function lv(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 cv=typeof setTimeout=="function"?setTimeout:void 0,HI=typeof clearTimeout=="function"?clearTimeout:void 0,Kj=typeof Promise=="function"?Promise:void 0,WI=typeof queueMicrotask=="function"?queueMicrotask:typeof Kj<"u"?function(e){return Kj.resolve(null).then(e).catch(GI)}:cv;function GI(e){setTimeout(function(){throw e})}function z0(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),Nf(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);Nf(t)}function jo(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 Yj(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 Hu=Math.random().toString(36).slice(2),Oa="__reactFiber$"+Hu,kf="__reactProps$"+Hu,bi="__reactContainer$"+Hu,uv="__reactEvents$"+Hu,KI="__reactListeners$"+Hu,YI="__reactHandles$"+Hu;function hl(e){var t=e[Oa];if(t)return t;for(var r=e.parentNode;r;){if(t=r[bi]||r[Oa]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Yj(e);e!==null;){if(r=e[Oa])return r;e=Yj(e)}return t}e=r,r=e.parentNode}return null}function gh(e){return e=e[Oa]||e[bi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Bc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ee(33))}function xx(e){return e[kf]||null}var dv=[],Uc=-1;function Go(e){return{current:e}}function Qt(e){0>Uc||(e.current=dv[Uc],dv[Uc]=null,Uc--)}function Gt(e,t){Uc++,dv[Uc]=e.current,e.current=t}var Po={},gs=Go(Po),Hs=Go(!1),Pl=Po;function bu(e,t){var r=e.type.contextTypes;if(!r)return Po;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ws(e){return e=e.childContextTypes,e!=null}function op(){Qt(Hs),Qt(gs)}function Xj(e,t,r){if(gs.current!==Po)throw Error(Ee(168));Gt(gs,t),Gt(Hs,r)}function IE(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(Ee(108,O5(e)||"Unknown",a));return ir({},r,n)}function lp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Po,Pl=gs.current,Gt(gs,e),Gt(Hs,Hs.current),!0}function Qj(e,t,r){var n=e.stateNode;if(!n)throw Error(Ee(169));r?(e=IE(e,t,Pl),n.__reactInternalMemoizedMergedChildContext=e,Qt(Hs),Qt(gs),Gt(gs,e)):Qt(Hs),Gt(Hs,r)}var ai=null,gx=!1,V0=!1;function FE(e){ai===null?ai=[e]:ai.push(e)}function XI(e){gx=!0,FE(e)}function Ko(){if(!V0&&ai!==null){V0=!0;var e=0,t=$t;try{var r=ai;for($t=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ai=null,gx=!1}catch(a){throw ai!==null&&(ai=ai.slice(e+1)),oE(fy,Ko),a}finally{$t=t,V0=!1}}return null}var $c=[],qc=0,cp=null,up=0,Nn=[],_n=0,Il=null,ci=1,ui="";function al(e,t){$c[qc++]=up,$c[qc++]=cp,cp=e,up=t}function LE(e,t,r){Nn[_n++]=ci,Nn[_n++]=ui,Nn[_n++]=Il,Il=e;var n=ci;e=ui;var a=32-ua(n)-1;n&=~(1<<a),r+=1;var i=32-ua(t)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,ci=1<<32-ua(t)+a|r<<a|n,ui=i+e}else ci=1<<i|r<<a|n,ui=e}function wy(e){e.return!==null&&(al(e,1),LE(e,1,0))}function jy(e){for(;e===cp;)cp=$c[--qc],$c[qc]=null,up=$c[--qc],$c[qc]=null;for(;e===Il;)Il=Nn[--_n],Nn[_n]=null,ui=Nn[--_n],Nn[_n]=null,ci=Nn[--_n],Nn[_n]=null}var on=null,an=null,Zt=!1,ta=null;function ME(e,t){var r=Sn(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 Jj(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,on=e,an=jo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,on=e,an=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Il!==null?{id:ci,overflow:ui}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Sn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,on=e,an=null,!0):!1;default:return!1}}function fv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function hv(e){if(Zt){var t=an;if(t){var r=t;if(!Jj(e,t)){if(fv(e))throw Error(Ee(418));t=jo(r.nextSibling);var n=on;t&&Jj(e,t)?ME(n,r):(e.flags=e.flags&-4097|2,Zt=!1,on=e)}}else{if(fv(e))throw Error(Ee(418));e.flags=e.flags&-4097|2,Zt=!1,on=e}}}function Zj(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;on=e}function Xh(e){if(e!==on)return!1;if(!Zt)return Zj(e),Zt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!lv(e.type,e.memoizedProps)),t&&(t=an)){if(fv(e))throw BE(),Error(Ee(418));for(;t;)ME(e,t),t=jo(t.nextSibling)}if(Zj(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ee(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){an=jo(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}an=null}}else an=on?jo(e.stateNode.nextSibling):null;return!0}function BE(){for(var e=an;e;)e=jo(e.nextSibling)}function wu(){an=on=null,Zt=!1}function Ny(e){ta===null?ta=[e]:ta.push(e)}var QI=Ai.ReactCurrentBatchConfig;function Nd(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(Ee(309));var n=r.stateNode}if(!n)throw Error(Ee(147,e));var a=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=a.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(Ee(284));if(!r._owner)throw Error(Ee(290,e))}return e}function Qh(e,t){throw e=Object.prototype.toString.call(t),Error(Ee(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function e2(e){var t=e._init;return t(e._payload)}function UE(e){function t(w,y){if(e){var b=w.deletions;b===null?(w.deletions=[y],w.flags|=16):b.push(y)}}function r(w,y){if(!e)return null;for(;y!==null;)t(w,y),y=y.sibling;return null}function n(w,y){for(w=new Map;y!==null;)y.key!==null?w.set(y.key,y):w.set(y.index,y),y=y.sibling;return w}function a(w,y){return w=So(w,y),w.index=0,w.sibling=null,w}function i(w,y,b){return w.index=b,e?(b=w.alternate,b!==null?(b=b.index,b<y?(w.flags|=2,y):b):(w.flags|=2,y)):(w.flags|=1048576,y)}function o(w){return e&&w.alternate===null&&(w.flags|=2),w}function l(w,y,b,N){return y===null||y.tag!==6?(y=Q0(b,w.mode,N),y.return=w,y):(y=a(y,b),y.return=w,y)}function c(w,y,b,N){var C=b.type;return C===Ic?d(w,y,b.props.children,N,b.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Yi&&e2(C)===y.type)?(N=a(y,b.props),N.ref=Nd(w,y,b),N.return=w,N):(N=zm(b.type,b.key,b.props,null,w.mode,N),N.ref=Nd(w,y,b),N.return=w,N)}function u(w,y,b,N){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=J0(b,w.mode,N),y.return=w,y):(y=a(y,b.children||[]),y.return=w,y)}function d(w,y,b,N,C){return y===null||y.tag!==7?(y=Tl(b,w.mode,N,C),y.return=w,y):(y=a(y,b),y.return=w,y)}function f(w,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Q0(""+y,w.mode,b),y.return=w,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Uh:return b=zm(y.type,y.key,y.props,null,w.mode,b),b.ref=Nd(w,null,y),b.return=w,b;case Pc:return y=J0(y,w.mode,b),y.return=w,y;case Yi:var N=y._init;return f(w,N(y._payload),b)}if(Dd(y)||vd(y))return y=Tl(y,w.mode,b,null),y.return=w,y;Qh(w,y)}return null}function h(w,y,b,N){var C=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return C!==null?null:l(w,y,""+b,N);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Uh:return b.key===C?c(w,y,b,N):null;case Pc:return b.key===C?u(w,y,b,N):null;case Yi:return C=b._init,h(w,y,C(b._payload),N)}if(Dd(b)||vd(b))return C!==null?null:d(w,y,b,N,null);Qh(w,b)}return null}function m(w,y,b,N,C){if(typeof N=="string"&&N!==""||typeof N=="number")return w=w.get(b)||null,l(y,w,""+N,C);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Uh:return w=w.get(N.key===null?b:N.key)||null,c(y,w,N,C);case Pc:return w=w.get(N.key===null?b:N.key)||null,u(y,w,N,C);case Yi:var _=N._init;return m(w,y,b,_(N._payload),C)}if(Dd(N)||vd(N))return w=w.get(b)||null,d(y,w,N,C,null);Qh(y,N)}return null}function v(w,y,b,N){for(var C=null,_=null,j=y,S=y=0,k=null;j!==null&&S<b.length;S++){j.index>S?(k=j,j=null):k=j.sibling;var D=h(w,j,b[S],N);if(D===null){j===null&&(j=k);break}e&&j&&D.alternate===null&&t(w,j),y=i(D,y,S),_===null?C=D:_.sibling=D,_=D,j=k}if(S===b.length)return r(w,j),Zt&&al(w,S),C;if(j===null){for(;S<b.length;S++)j=f(w,b[S],N),j!==null&&(y=i(j,y,S),_===null?C=j:_.sibling=j,_=j);return Zt&&al(w,S),C}for(j=n(w,j);S<b.length;S++)k=m(j,w,S,b[S],N),k!==null&&(e&&k.alternate!==null&&j.delete(k.key===null?S:k.key),y=i(k,y,S),_===null?C=k:_.sibling=k,_=k);return e&&j.forEach(function(M){return t(w,M)}),Zt&&al(w,S),C}function p(w,y,b,N){var C=vd(b);if(typeof C!="function")throw Error(Ee(150));if(b=C.call(b),b==null)throw Error(Ee(151));for(var _=C=null,j=y,S=y=0,k=null,D=b.next();j!==null&&!D.done;S++,D=b.next()){j.index>S?(k=j,j=null):k=j.sibling;var M=h(w,j,D.value,N);if(M===null){j===null&&(j=k);break}e&&j&&M.alternate===null&&t(w,j),y=i(M,y,S),_===null?C=M:_.sibling=M,_=M,j=k}if(D.done)return r(w,j),Zt&&al(w,S),C;if(j===null){for(;!D.done;S++,D=b.next())D=f(w,D.value,N),D!==null&&(y=i(D,y,S),_===null?C=D:_.sibling=D,_=D);return Zt&&al(w,S),C}for(j=n(w,j);!D.done;S++,D=b.next())D=m(j,w,S,D.value,N),D!==null&&(e&&D.alternate!==null&&j.delete(D.key===null?S:D.key),y=i(D,y,S),_===null?C=D:_.sibling=D,_=D);return e&&j.forEach(function(T){return t(w,T)}),Zt&&al(w,S),C}function x(w,y,b,N){if(typeof b=="object"&&b!==null&&b.type===Ic&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Uh:e:{for(var C=b.key,_=y;_!==null;){if(_.key===C){if(C=b.type,C===Ic){if(_.tag===7){r(w,_.sibling),y=a(_,b.props.children),y.return=w,w=y;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Yi&&e2(C)===_.type){r(w,_.sibling),y=a(_,b.props),y.ref=Nd(w,_,b),y.return=w,w=y;break e}r(w,_);break}else t(w,_);_=_.sibling}b.type===Ic?(y=Tl(b.props.children,w.mode,N,b.key),y.return=w,w=y):(N=zm(b.type,b.key,b.props,null,w.mode,N),N.ref=Nd(w,y,b),N.return=w,w=N)}return o(w);case Pc:e:{for(_=b.key;y!==null;){if(y.key===_)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){r(w,y.sibling),y=a(y,b.children||[]),y.return=w,w=y;break e}else{r(w,y);break}else t(w,y);y=y.sibling}y=J0(b,w.mode,N),y.return=w,w=y}return o(w);case Yi:return _=b._init,x(w,y,_(b._payload),N)}if(Dd(b))return v(w,y,b,N);if(vd(b))return p(w,y,b,N);Qh(w,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(r(w,y.sibling),y=a(y,b),y.return=w,w=y):(r(w,y),y=Q0(b,w.mode,N),y.return=w,w=y),o(w)):r(w,y)}return x}var ju=UE(!0),$E=UE(!1),dp=Go(null),fp=null,zc=null,_y=null;function Cy(){_y=zc=fp=null}function Sy(e){var t=dp.current;Qt(dp),e._currentValue=t}function mv(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 Qc(e,t){fp=e,_y=zc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Vs=!0),e.firstContext=null)}function An(e){var t=e._currentValue;if(_y!==e)if(e={context:e,memoizedValue:t,next:null},zc===null){if(fp===null)throw Error(Ee(308));zc=e,fp.dependencies={lanes:0,firstContext:e}}else zc=zc.next=e;return t}var ml=null;function Ey(e){ml===null?ml=[e]:ml.push(e)}function qE(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,Ey(t)):(r.next=a.next,a.next=r),t.interleaved=r,wi(e,n)}function wi(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 Xi=!1;function ky(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zE(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 fi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function No(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,At&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,wi(e,r)}return a=n.interleaved,a===null?(t.next=t,Ey(n)):(t.next=a.next,a.next=t),n.interleaved=t,wi(e,r)}function Lm(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,hy(e,r)}}function t2(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?a=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,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 hp(e,t,r,n){var a=e.updateQueue;Xi=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,l=a.shared.pending;if(l!==null){a.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var f=a.baseState;o=0,d=u=c=null,l=i;do{var h=l.lane,m=l.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,p=l;switch(h=t,m=r,p.tag){case 1:if(v=p.payload,typeof v=="function"){f=v.call(m,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=p.payload,h=typeof v=="function"?v.call(m,f,h):v,h==null)break e;f=ir({},f,h);break e;case 2:Xi=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=a.effects,h===null?a.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,o|=h;if(l=l.next,l===null){if(l=a.shared.pending,l===null)break;h=l,l=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);if(d===null&&(c=f),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=d,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);Ll|=o,e.lanes=o,e.memoizedState=f}}function r2(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(Ee(191,a));a.call(n)}}}var vh={},Ba=Go(vh),Tf=Go(vh),Af=Go(vh);function pl(e){if(e===vh)throw Error(Ee(174));return e}function Ty(e,t){switch(Gt(Af,t),Gt(Tf,e),Gt(Ba,vh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Kg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Kg(t,e)}Qt(Ba),Gt(Ba,t)}function Nu(){Qt(Ba),Qt(Tf),Qt(Af)}function VE(e){pl(Af.current);var t=pl(Ba.current),r=Kg(t,e.type);t!==r&&(Gt(Tf,e),Gt(Ba,r))}function Ay(e){Tf.current===e&&(Qt(Ba),Qt(Tf))}var sr=Go(0);function mp(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 H0=[];function Ry(){for(var e=0;e<H0.length;e++)H0[e]._workInProgressVersionPrimary=null;H0.length=0}var Mm=Ai.ReactCurrentDispatcher,W0=Ai.ReactCurrentBatchConfig,Fl=0,ar=null,Ir=null,zr=null,pp=!1,Yd=!1,Rf=0,JI=0;function as(){throw Error(Ee(321))}function Dy(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!pa(e[r],t[r]))return!1;return!0}function Oy(e,t,r,n,a,i){if(Fl=i,ar=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Mm.current=e===null||e.memoizedState===null?rF:sF,e=r(n,a),Yd){i=0;do{if(Yd=!1,Rf=0,25<=i)throw Error(Ee(301));i+=1,zr=Ir=null,t.updateQueue=null,Mm.current=nF,e=r(n,a)}while(Yd)}if(Mm.current=xp,t=Ir!==null&&Ir.next!==null,Fl=0,zr=Ir=ar=null,pp=!1,t)throw Error(Ee(300));return e}function Py(){var e=Rf!==0;return Rf=0,e}function Ta(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zr===null?ar.memoizedState=zr=e:zr=zr.next=e,zr}function Rn(){if(Ir===null){var e=ar.alternate;e=e!==null?e.memoizedState:null}else e=Ir.next;var t=zr===null?ar.memoizedState:zr.next;if(t!==null)zr=t,Ir=e;else{if(e===null)throw Error(Ee(310));Ir=e,e={memoizedState:Ir.memoizedState,baseState:Ir.baseState,baseQueue:Ir.baseQueue,queue:Ir.queue,next:null},zr===null?ar.memoizedState=zr=e:zr=zr.next=e}return zr}function Df(e,t){return typeof t=="function"?t(e):t}function G0(e){var t=Rn(),r=t.queue;if(r===null)throw Error(Ee(311));r.lastRenderedReducer=e;var n=Ir,a=n.baseQueue,i=r.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}n.baseQueue=a=i,r.pending=null}if(a!==null){i=a.next,n=n.baseState;var l=o=null,c=null,u=i;do{var d=u.lane;if((Fl&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,o=n):c=c.next=f,ar.lanes|=d,Ll|=d}u=u.next}while(u!==null&&u!==i);c===null?o=n:c.next=l,pa(n,t.memoizedState)||(Vs=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do i=a.lane,ar.lanes|=i,Ll|=i,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function K0(e){var t=Rn(),r=t.queue;if(r===null)throw Error(Ee(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);pa(i,t.memoizedState)||(Vs=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function HE(){}function WE(e,t){var r=ar,n=Rn(),a=t(),i=!pa(n.memoizedState,a);if(i&&(n.memoizedState=a,Vs=!0),n=n.queue,Iy(YE.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||zr!==null&&zr.memoizedState.tag&1){if(r.flags|=2048,Of(9,KE.bind(null,r,n,a,t),void 0,null),Hr===null)throw Error(Ee(349));Fl&30||GE(r,t,a)}return a}function GE(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ar.updateQueue,t===null?(t={lastEffect:null,stores:null},ar.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function KE(e,t,r,n){t.value=r,t.getSnapshot=n,XE(t)&&QE(e)}function YE(e,t,r){return r(function(){XE(t)&&QE(e)})}function XE(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!pa(e,r)}catch{return!0}}function QE(e){var t=wi(e,1);t!==null&&da(t,e,1,-1)}function s2(e){var t=Ta();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Df,lastRenderedState:e},t.queue=e,e=e.dispatch=tF.bind(null,ar,e),[t.memoizedState,e]}function Of(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ar.updateQueue,t===null?(t={lastEffect:null,stores:null},ar.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 JE(){return Rn().memoizedState}function Bm(e,t,r,n){var a=Ta();ar.flags|=e,a.memoizedState=Of(1|t,r,void 0,n===void 0?null:n)}function vx(e,t,r,n){var a=Rn();n=n===void 0?null:n;var i=void 0;if(Ir!==null){var o=Ir.memoizedState;if(i=o.destroy,n!==null&&Dy(n,o.deps)){a.memoizedState=Of(t,r,i,n);return}}ar.flags|=e,a.memoizedState=Of(1|t,r,i,n)}function n2(e,t){return Bm(8390656,8,e,t)}function Iy(e,t){return vx(2048,8,e,t)}function ZE(e,t){return vx(4,2,e,t)}function ek(e,t){return vx(4,4,e,t)}function tk(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 rk(e,t,r){return r=r!=null?r.concat([e]):null,vx(4,4,tk.bind(null,t,e),r)}function Fy(){}function sk(e,t){var r=Rn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Dy(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function nk(e,t){var r=Rn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Dy(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function ak(e,t,r){return Fl&21?(pa(r,t)||(r=uE(),ar.lanes|=r,Ll|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Vs=!0),e.memoizedState=r)}function ZI(e,t){var r=$t;$t=r!==0&&4>r?r:4,e(!0);var n=W0.transition;W0.transition={};try{e(!1),t()}finally{$t=r,W0.transition=n}}function ik(){return Rn().memoizedState}function eF(e,t,r){var n=Co(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ok(e))lk(t,r);else if(r=qE(e,t,r,n),r!==null){var a=Ts();da(r,e,n,a),ck(r,t,n)}}function tF(e,t,r){var n=Co(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ok(e))lk(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,r);if(a.hasEagerState=!0,a.eagerState=l,pa(l,o)){var c=t.interleaved;c===null?(a.next=a,Ey(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=qE(e,t,a,n),r!==null&&(a=Ts(),da(r,e,n,a),ck(r,t,n))}}function ok(e){var t=e.alternate;return e===ar||t!==null&&t===ar}function lk(e,t){Yd=pp=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ck(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,hy(e,r)}}var xp={readContext:An,useCallback:as,useContext:as,useEffect:as,useImperativeHandle:as,useInsertionEffect:as,useLayoutEffect:as,useMemo:as,useReducer:as,useRef:as,useState:as,useDebugValue:as,useDeferredValue:as,useTransition:as,useMutableSource:as,useSyncExternalStore:as,useId:as,unstable_isNewReconciler:!1},rF={readContext:An,useCallback:function(e,t){return Ta().memoizedState=[e,t===void 0?null:t],e},useContext:An,useEffect:n2,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Bm(4194308,4,tk.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Bm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bm(4,2,e,t)},useMemo:function(e,t){var r=Ta();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ta();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=eF.bind(null,ar,e),[n.memoizedState,e]},useRef:function(e){var t=Ta();return e={current:e},t.memoizedState=e},useState:s2,useDebugValue:Fy,useDeferredValue:function(e){return Ta().memoizedState=e},useTransition:function(){var e=s2(!1),t=e[0];return e=ZI.bind(null,e[1]),Ta().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ar,a=Ta();if(Zt){if(r===void 0)throw Error(Ee(407));r=r()}else{if(r=t(),Hr===null)throw Error(Ee(349));Fl&30||GE(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,n2(YE.bind(null,n,i,e),[e]),n.flags|=2048,Of(9,KE.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Ta(),t=Hr.identifierPrefix;if(Zt){var r=ui,n=ci;r=(n&~(1<<32-ua(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Rf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=JI++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sF={readContext:An,useCallback:sk,useContext:An,useEffect:Iy,useImperativeHandle:rk,useInsertionEffect:ZE,useLayoutEffect:ek,useMemo:nk,useReducer:G0,useRef:JE,useState:function(){return G0(Df)},useDebugValue:Fy,useDeferredValue:function(e){var t=Rn();return ak(t,Ir.memoizedState,e)},useTransition:function(){var e=G0(Df)[0],t=Rn().memoizedState;return[e,t]},useMutableSource:HE,useSyncExternalStore:WE,useId:ik,unstable_isNewReconciler:!1},nF={readContext:An,useCallback:sk,useContext:An,useEffect:Iy,useImperativeHandle:rk,useInsertionEffect:ZE,useLayoutEffect:ek,useMemo:nk,useReducer:K0,useRef:JE,useState:function(){return K0(Df)},useDebugValue:Fy,useDeferredValue:function(e){var t=Rn();return Ir===null?t.memoizedState=e:ak(t,Ir.memoizedState,e)},useTransition:function(){var e=K0(Df)[0],t=Rn().memoizedState;return[e,t]},useMutableSource:HE,useSyncExternalStore:WE,useId:ik,unstable_isNewReconciler:!1};function Yn(e,t){if(e&&e.defaultProps){t=ir({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function pv(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ir({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var yx={isMounted:function(e){return(e=e._reactInternals)?rc(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ts(),a=Co(e),i=fi(n,a);i.payload=t,r!=null&&(i.callback=r),t=No(e,i,a),t!==null&&(da(t,e,a,n),Lm(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ts(),a=Co(e),i=fi(n,a);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=No(e,i,a),t!==null&&(da(t,e,a,n),Lm(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ts(),n=Co(e),a=fi(r,n);a.tag=2,t!=null&&(a.callback=t),t=No(e,a,n),t!==null&&(da(t,e,n,r),Lm(t,e,n))}};function a2(e,t,r,n,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!Cf(r,n)||!Cf(a,i):!0}function uk(e,t,r){var n=!1,a=Po,i=t.contextType;return typeof i=="object"&&i!==null?i=An(i):(a=Ws(t)?Pl:gs.current,n=t.contextTypes,i=(n=n!=null)?bu(e,a):Po),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yx,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function i2(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&&yx.enqueueReplaceState(t,t.state,null)}function xv(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},ky(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=An(i):(i=Ws(t)?Pl:gs.current,a.context=bu(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(pv(e,t,i,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&yx.enqueueReplaceState(a,a.state,null),hp(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function _u(e,t){try{var r="",n=t;do r+=D5(n),n=n.return;while(n);var a=r}catch(i){a=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:a,digest:null}}function Y0(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function gv(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var aF=typeof WeakMap=="function"?WeakMap:Map;function dk(e,t,r){r=fi(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){vp||(vp=!0,Ev=n),gv(e,t)},r}function fk(e,t,r){r=fi(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){gv(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){gv(e,t),typeof n!="function"&&(_o===null?_o=new Set([this]):_o.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function o2(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new aF;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=yF.bind(null,e,t,r),t.then(e,e))}function l2(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 c2(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,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=fi(-1,1),t.tag=2,No(r,t,1))),r.lanes|=1),e)}var iF=Ai.ReactCurrentOwner,Vs=!1;function Ns(e,t,r,n){t.child=e===null?$E(t,null,r,n):ju(t,e.child,r,n)}function u2(e,t,r,n,a){r=r.render;var i=t.ref;return Qc(t,a),n=Oy(e,t,r,n,i,a),r=Py(),e!==null&&!Vs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,ji(e,t,a)):(Zt&&r&&wy(t),t.flags|=1,Ns(e,t,n,a),t.child)}function d2(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!Vy(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,hk(e,t,i,n,a)):(e=zm(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Cf,r(o,n)&&e.ref===t.ref)return ji(e,t,a)}return t.flags|=1,e=So(i,n),e.ref=t.ref,e.return=t,t.child=e}function hk(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if(Cf(i,n)&&e.ref===t.ref)if(Vs=!1,t.pendingProps=n=i,(e.lanes&a)!==0)e.flags&131072&&(Vs=!0);else return t.lanes=e.lanes,ji(e,t,a)}return vv(e,t,r,n,a)}function mk(e,t,r){var n=t.pendingProps,a=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gt(Hc,Js),Js|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Gt(Hc,Js),Js|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Gt(Hc,Js),Js|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Gt(Hc,Js),Js|=n;return Ns(e,t,a,r),t.child}function pk(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function vv(e,t,r,n,a){var i=Ws(r)?Pl:gs.current;return i=bu(t,i),Qc(t,a),r=Oy(e,t,r,n,i,a),n=Py(),e!==null&&!Vs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,ji(e,t,a)):(Zt&&n&&wy(t),t.flags|=1,Ns(e,t,r,a),t.child)}function f2(e,t,r,n,a){if(Ws(r)){var i=!0;lp(t)}else i=!1;if(Qc(t,a),t.stateNode===null)Um(e,t),uk(t,r,n),xv(t,r,n,a),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=r.contextType;typeof u=="object"&&u!==null?u=An(u):(u=Ws(r)?Pl:gs.current,u=bu(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||c!==u)&&i2(t,o,n,u),Xi=!1;var h=t.memoizedState;o.state=h,hp(t,n,o,a),c=t.memoizedState,l!==n||h!==c||Hs.current||Xi?(typeof d=="function"&&(pv(t,r,d,n),c=t.memoizedState),(l=Xi||a2(t,r,l,n,h,c,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),o.props=n,o.state=c,o.context=u,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,zE(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Yn(t.type,l),o.props=u,f=t.pendingProps,h=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=An(c):(c=Ws(r)?Pl:gs.current,c=bu(t,c));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||h!==c)&&i2(t,o,n,c),Xi=!1,h=t.memoizedState,o.state=h,hp(t,n,o,a);var v=t.memoizedState;l!==f||h!==v||Hs.current||Xi?(typeof m=="function"&&(pv(t,r,m,n),v=t.memoizedState),(u=Xi||a2(t,r,u,n,h,v,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,v,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,v,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=v),o.props=n,o.state=v,o.context=c,n=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return yv(e,t,r,n,i,a)}function yv(e,t,r,n,a,i){pk(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return a&&Qj(t,r,!1),ji(e,t,i);n=t.stateNode,iF.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=ju(t,e.child,null,i),t.child=ju(t,null,l,i)):Ns(e,t,l,i),t.memoizedState=n.state,a&&Qj(t,r,!0),t.child}function xk(e){var t=e.stateNode;t.pendingContext?Xj(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Xj(e,t.context,!1),Ty(e,t.containerInfo)}function h2(e,t,r,n,a){return wu(),Ny(a),t.flags|=256,Ns(e,t,r,n),t.child}var bv={dehydrated:null,treeContext:null,retryLane:0};function wv(e){return{baseLanes:e,cachePool:null,transitions:null}}function gk(e,t,r){var n=t.pendingProps,a=sr.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(a&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Gt(sr,a&1),e===null)return hv(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):(o=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=jx(o,n,0,null),e=Tl(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=wv(r),t.memoizedState=bv,e):Ly(t,o));if(a=e.memoizedState,a!==null&&(l=a.dehydrated,l!==null))return oF(e,t,o,n,l,a,r);if(i){i=n.fallback,o=t.mode,a=e.child,l=a.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=So(a,c),n.subtreeFlags=a.subtreeFlags&14680064),l!==null?i=So(l,i):(i=Tl(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?wv(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=bv,n}return i=e.child,e=i.sibling,n=So(i,{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 Ly(e,t){return t=jx({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Jh(e,t,r,n){return n!==null&&Ny(n),ju(t,e.child,null,r),e=Ly(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oF(e,t,r,n,a,i,o){if(r)return t.flags&256?(t.flags&=-257,n=Y0(Error(Ee(422))),Jh(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,a=t.mode,n=jx({mode:"visible",children:n.children},a,0,null),i=Tl(i,a,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&ju(t,e.child,null,o),t.child.memoizedState=wv(o),t.memoizedState=bv,i);if(!(t.mode&1))return Jh(e,t,o,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var l=n.dgst;return n=l,i=Error(Ee(419)),n=Y0(i,n,void 0),Jh(e,t,o,n)}if(l=(o&e.childLanes)!==0,Vs||l){if(n=Hr,n!==null){switch(o&-o){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|o)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,wi(e,a),da(n,e,a,-1))}return zy(),n=Y0(Error(Ee(421))),Jh(e,t,o,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=bF.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,an=jo(a.nextSibling),on=t,Zt=!0,ta=null,e!==null&&(Nn[_n++]=ci,Nn[_n++]=ui,Nn[_n++]=Il,ci=e.id,ui=e.overflow,Il=t),t=Ly(t,n.children),t.flags|=4096,t)}function m2(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),mv(e.return,t,r)}function X0(e,t,r,n,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=a)}function vk(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;if(Ns(e,t,n.children,r),n=sr.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&&m2(e,r,t);else if(e.tag===19)m2(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(Gt(sr,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&mp(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),X0(t,!1,a,r,i);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&mp(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}X0(t,!0,r,null,i);break;case"together":X0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Um(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ji(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ll|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ee(153));if(t.child!==null){for(e=t.child,r=So(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=So(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function lF(e,t,r){switch(t.tag){case 3:xk(t),wu();break;case 5:VE(t);break;case 1:Ws(t.type)&&lp(t);break;case 4:Ty(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;Gt(dp,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Gt(sr,sr.current&1),t.flags|=128,null):r&t.child.childLanes?gk(e,t,r):(Gt(sr,sr.current&1),e=ji(e,t,r),e!==null?e.sibling:null);Gt(sr,sr.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return vk(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Gt(sr,sr.current),n)break;return null;case 22:case 23:return t.lanes=0,mk(e,t,r)}return ji(e,t,r)}var yk,jv,bk,wk;yk=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}};jv=function(){};bk=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,pl(Ba.current);var i=null;switch(r){case"input":a=Vg(e,a),n=Vg(e,n),i=[];break;case"select":a=ir({},a,{value:void 0}),n=ir({},n,{value:void 0}),i=[];break;case"textarea":a=Gg(e,a),n=Gg(e,n),i=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ip)}Yg(r,n);var o;r=null;for(u in a)if(!n.hasOwnProperty(u)&&a.hasOwnProperty(u)&&a[u]!=null)if(u==="style"){var l=a[u];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(vf.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var c=n[u];if(l=a!=null?a[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(i||(i=[]),i.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(vf.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Xt("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};wk=function(e,t,r,n){r!==n&&(t.flags|=4)};function _d(e,t){if(!Zt)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 is(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function cF(e,t,r){var n=t.pendingProps;switch(jy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return is(t),null;case 1:return Ws(t.type)&&op(),is(t),null;case 3:return n=t.stateNode,Nu(),Qt(Hs),Qt(gs),Ry(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Xh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ta!==null&&(Av(ta),ta=null))),jv(e,t),is(t),null;case 5:Ay(t);var a=pl(Af.current);if(r=t.type,e!==null&&t.stateNode!=null)bk(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Ee(166));return is(t),null}if(e=pl(Ba.current),Xh(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Oa]=t,n[kf]=i,e=(t.mode&1)!==0,r){case"dialog":Xt("cancel",n),Xt("close",n);break;case"iframe":case"object":case"embed":Xt("load",n);break;case"video":case"audio":for(a=0;a<Pd.length;a++)Xt(Pd[a],n);break;case"source":Xt("error",n);break;case"img":case"image":case"link":Xt("error",n),Xt("load",n);break;case"details":Xt("toggle",n);break;case"input":Nj(n,i),Xt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Xt("invalid",n);break;case"textarea":Cj(n,i),Xt("invalid",n)}Yg(r,i),a=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?n.textContent!==l&&(i.suppressHydrationWarning!==!0&&Yh(n.textContent,l,e),a=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Yh(n.textContent,l,e),a=["children",""+l]):vf.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Xt("scroll",n)}switch(r){case"input":$h(n),_j(n,i,!0);break;case"textarea":$h(n),Sj(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=ip)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=YS(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Oa]=t,e[kf]=n,yk(e,t,!1,!1),t.stateNode=e;e:{switch(o=Xg(r,n),r){case"dialog":Xt("cancel",e),Xt("close",e),a=n;break;case"iframe":case"object":case"embed":Xt("load",e),a=n;break;case"video":case"audio":for(a=0;a<Pd.length;a++)Xt(Pd[a],e);a=n;break;case"source":Xt("error",e),a=n;break;case"img":case"image":case"link":Xt("error",e),Xt("load",e),a=n;break;case"details":Xt("toggle",e),a=n;break;case"input":Nj(e,n),a=Vg(e,n),Xt("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=ir({},n,{value:void 0}),Xt("invalid",e);break;case"textarea":Cj(e,n),a=Gg(e,n),Xt("invalid",e);break;default:a=n}Yg(r,a),l=a;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?JS(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&XS(e,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&yf(e,c):typeof c=="number"&&yf(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(vf.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Xt("scroll",e):c!=null&&oy(e,i,c,o))}switch(r){case"input":$h(e),_j(e,n,!1);break;case"textarea":$h(e),Sj(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Oo(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Gc(e,!!n.multiple,i,!1):n.defaultValue!=null&&Gc(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=ip)}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 is(t),null;case 6:if(e&&t.stateNode!=null)wk(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Ee(166));if(r=pl(Af.current),pl(Ba.current),Xh(t)){if(n=t.stateNode,r=t.memoizedProps,n[Oa]=t,(i=n.nodeValue!==r)&&(e=on,e!==null))switch(e.tag){case 3:Yh(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yh(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Oa]=t,t.stateNode=n}return is(t),null;case 13:if(Qt(sr),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Zt&&an!==null&&t.mode&1&&!(t.flags&128))BE(),wu(),t.flags|=98560,i=!1;else if(i=Xh(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(Ee(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Ee(317));i[Oa]=t}else wu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;is(t),i=!1}else ta!==null&&(Av(ta),ta=null),i=!0;if(!i)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||sr.current&1?Lr===0&&(Lr=3):zy())),t.updateQueue!==null&&(t.flags|=4),is(t),null);case 4:return Nu(),jv(e,t),e===null&&Sf(t.stateNode.containerInfo),is(t),null;case 10:return Sy(t.type._context),is(t),null;case 17:return Ws(t.type)&&op(),is(t),null;case 19:if(Qt(sr),i=t.memoizedState,i===null)return is(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)_d(i,!1);else{if(Lr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mp(e),o!==null){for(t.flags|=128,_d(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Gt(sr,sr.current&1|2),t.child}e=e.sibling}i.tail!==null&&xr()>Cu&&(t.flags|=128,n=!0,_d(i,!1),t.lanes=4194304)}else{if(!n)if(e=mp(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_d(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Zt)return is(t),null}else 2*xr()-i.renderingStartTime>Cu&&r!==1073741824&&(t.flags|=128,n=!0,_d(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xr(),t.sibling=null,r=sr.current,Gt(sr,n?r&1|2:r&1),t):(is(t),null);case 22:case 23:return qy(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Js&1073741824&&(is(t),t.subtreeFlags&6&&(t.flags|=8192)):is(t),null;case 24:return null;case 25:return null}throw Error(Ee(156,t.tag))}function uF(e,t){switch(jy(t),t.tag){case 1:return Ws(t.type)&&op(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nu(),Qt(Hs),Qt(gs),Ry(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ay(t),null;case 13:if(Qt(sr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ee(340));wu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qt(sr),null;case 4:return Nu(),null;case 10:return Sy(t.type._context),null;case 22:case 23:return qy(),null;case 24:return null;default:return null}}var Zh=!1,fs=!1,dF=typeof WeakSet=="function"?WeakSet:Set,He=null;function Vc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){cr(e,t,n)}else r.current=null}function Nv(e,t,r){try{r()}catch(n){cr(e,t,n)}}var p2=!1;function fF(e,t){if(iv=sp,e=SE(),by(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 a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(l=o+a),f!==i||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===r&&++u===a&&(l=o),h===i&&++d===n&&(c=o),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(ov={focusedElem:e,selectionRange:r},sp=!1,He=t;He!==null;)if(t=He,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,He=e;else for(;He!==null;){t=He;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var p=v.memoizedProps,x=v.memoizedState,w=t.stateNode,y=w.getSnapshotBeforeUpdate(t.elementType===t.type?p:Yn(t.type,p),x);w.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(N){cr(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,He=e;break}He=t.return}return v=p2,p2=!1,v}function Xd(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&Nv(t,r,i)}a=a.next}while(a!==n)}}function bx(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 _v(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function jk(e){var t=e.alternate;t!==null&&(e.alternate=null,jk(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Oa],delete t[kf],delete t[uv],delete t[KI],delete t[YI])),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 Nk(e){return e.tag===5||e.tag===3||e.tag===4}function x2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nk(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 Cv(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=ip));else if(n!==4&&(e=e.child,e!==null))for(Cv(e,t,r),e=e.sibling;e!==null;)Cv(e,t,r),e=e.sibling}function Sv(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(Sv(e,t,r),e=e.sibling;e!==null;)Sv(e,t,r),e=e.sibling}var Qr=null,Zn=!1;function Bi(e,t,r){for(r=r.child;r!==null;)_k(e,t,r),r=r.sibling}function _k(e,t,r){if(Ma&&typeof Ma.onCommitFiberUnmount=="function")try{Ma.onCommitFiberUnmount(fx,r)}catch{}switch(r.tag){case 5:fs||Vc(r,t);case 6:var n=Qr,a=Zn;Qr=null,Bi(e,t,r),Qr=n,Zn=a,Qr!==null&&(Zn?(e=Qr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Qr.removeChild(r.stateNode));break;case 18:Qr!==null&&(Zn?(e=Qr,r=r.stateNode,e.nodeType===8?z0(e.parentNode,r):e.nodeType===1&&z0(e,r),Nf(e)):z0(Qr,r.stateNode));break;case 4:n=Qr,a=Zn,Qr=r.stateNode.containerInfo,Zn=!0,Bi(e,t,r),Qr=n,Zn=a;break;case 0:case 11:case 14:case 15:if(!fs&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Nv(r,t,o),a=a.next}while(a!==n)}Bi(e,t,r);break;case 1:if(!fs&&(Vc(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){cr(r,t,l)}Bi(e,t,r);break;case 21:Bi(e,t,r);break;case 22:r.mode&1?(fs=(n=fs)||r.memoizedState!==null,Bi(e,t,r),fs=n):Bi(e,t,r);break;default:Bi(e,t,r)}}function g2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new dF),t.forEach(function(n){var a=wF.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function qn(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Qr=l.stateNode,Zn=!1;break e;case 3:Qr=l.stateNode.containerInfo,Zn=!0;break e;case 4:Qr=l.stateNode.containerInfo,Zn=!0;break e}l=l.return}if(Qr===null)throw Error(Ee(160));_k(i,o,a),Qr=null,Zn=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(u){cr(a,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ck(t,e),t=t.sibling}function Ck(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qn(t,e),Sa(e),n&4){try{Xd(3,e,e.return),bx(3,e)}catch(p){cr(e,e.return,p)}try{Xd(5,e,e.return)}catch(p){cr(e,e.return,p)}}break;case 1:qn(t,e),Sa(e),n&512&&r!==null&&Vc(r,r.return);break;case 5:if(qn(t,e),Sa(e),n&512&&r!==null&&Vc(r,r.return),e.flags&32){var a=e.stateNode;try{yf(a,"")}catch(p){cr(e,e.return,p)}}if(n&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&GS(a,i),Xg(l,o);var u=Xg(l,i);for(o=0;o<c.length;o+=2){var d=c[o],f=c[o+1];d==="style"?JS(a,f):d==="dangerouslySetInnerHTML"?XS(a,f):d==="children"?yf(a,f):oy(a,d,f,u)}switch(l){case"input":Hg(a,i);break;case"textarea":KS(a,i);break;case"select":var h=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Gc(a,!!i.multiple,m,!1):h!==!!i.multiple&&(i.defaultValue!=null?Gc(a,!!i.multiple,i.defaultValue,!0):Gc(a,!!i.multiple,i.multiple?[]:"",!1))}a[kf]=i}catch(p){cr(e,e.return,p)}}break;case 6:if(qn(t,e),Sa(e),n&4){if(e.stateNode===null)throw Error(Ee(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(p){cr(e,e.return,p)}}break;case 3:if(qn(t,e),Sa(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Nf(t.containerInfo)}catch(p){cr(e,e.return,p)}break;case 4:qn(t,e),Sa(e);break;case 13:qn(t,e),Sa(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(Uy=xr())),n&4&&g2(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(fs=(u=fs)||d,qn(t,e),fs=u):qn(t,e),Sa(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(He=e,d=e.child;d!==null;){for(f=He=d;He!==null;){switch(h=He,m=h.child,h.tag){case 0:case 11:case 14:case 15:Xd(4,h,h.return);break;case 1:Vc(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(p){cr(n,r,p)}}break;case 5:Vc(h,h.return);break;case 22:if(h.memoizedState!==null){y2(f);continue}}m!==null?(m.return=h,He=m):y2(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,c=f.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=QS("display",o))}catch(p){cr(e,e.return,p)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(p){cr(e,e.return,p)}}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;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:qn(t,e),Sa(e),n&4&&g2(e);break;case 21:break;default:qn(t,e),Sa(e)}}function Sa(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Nk(r)){var n=r;break e}r=r.return}throw Error(Ee(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(yf(a,""),n.flags&=-33);var i=x2(e);Sv(e,i,a);break;case 3:case 4:var o=n.stateNode.containerInfo,l=x2(e);Cv(e,l,o);break;default:throw Error(Ee(161))}}catch(c){cr(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hF(e,t,r){He=e,Sk(e)}function Sk(e,t,r){for(var n=(e.mode&1)!==0;He!==null;){var a=He,i=a.child;if(a.tag===22&&n){var o=a.memoizedState!==null||Zh;if(!o){var l=a.alternate,c=l!==null&&l.memoizedState!==null||fs;l=Zh;var u=fs;if(Zh=o,(fs=c)&&!u)for(He=a;He!==null;)o=He,c=o.child,o.tag===22&&o.memoizedState!==null?b2(a):c!==null?(c.return=o,He=c):b2(a);for(;i!==null;)He=i,Sk(i),i=i.sibling;He=a,Zh=l,fs=u}v2(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,He=i):v2(e)}}function v2(e){for(;He!==null;){var t=He;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:fs||bx(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!fs)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Yn(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&r2(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}r2(t,o,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Nf(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ee(163))}fs||t.flags&512&&_v(t)}catch(h){cr(t,t.return,h)}}if(t===e){He=null;break}if(r=t.sibling,r!==null){r.return=t.return,He=r;break}He=t.return}}function y2(e){for(;He!==null;){var t=He;if(t===e){He=null;break}var r=t.sibling;if(r!==null){r.return=t.return,He=r;break}He=t.return}}function b2(e){for(;He!==null;){var t=He;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{bx(4,t)}catch(c){cr(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(c){cr(t,a,c)}}var i=t.return;try{_v(t)}catch(c){cr(t,i,c)}break;case 5:var o=t.return;try{_v(t)}catch(c){cr(t,o,c)}}}catch(c){cr(t,t.return,c)}if(t===e){He=null;break}var l=t.sibling;if(l!==null){l.return=t.return,He=l;break}He=t.return}}var mF=Math.ceil,gp=Ai.ReactCurrentDispatcher,My=Ai.ReactCurrentOwner,En=Ai.ReactCurrentBatchConfig,At=0,Hr=null,Tr=null,Zr=0,Js=0,Hc=Go(0),Lr=0,Pf=null,Ll=0,wx=0,By=0,Qd=null,$s=null,Uy=0,Cu=1/0,si=null,vp=!1,Ev=null,_o=null,em=!1,mo=null,yp=0,Jd=0,kv=null,$m=-1,qm=0;function Ts(){return At&6?xr():$m!==-1?$m:$m=xr()}function Co(e){return e.mode&1?At&2&&Zr!==0?Zr&-Zr:QI.transition!==null?(qm===0&&(qm=uE()),qm):(e=$t,e!==0||(e=window.event,e=e===void 0?16:gE(e.type)),e):1}function da(e,t,r,n){if(50<Jd)throw Jd=0,kv=null,Error(Ee(185));ph(e,r,n),(!(At&2)||e!==Hr)&&(e===Hr&&(!(At&2)&&(wx|=r),Lr===4&&Zi(e,Zr)),Gs(e,n),r===1&&At===0&&!(t.mode&1)&&(Cu=xr()+500,gx&&Ko()))}function Gs(e,t){var r=e.callbackNode;Q5(e,t);var n=rp(e,e===Hr?Zr:0);if(n===0)r!==null&&Tj(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Tj(r),t===1)e.tag===0?XI(w2.bind(null,e)):FE(w2.bind(null,e)),WI(function(){!(At&6)&&Ko()}),r=null;else{switch(dE(n)){case 1:r=fy;break;case 4:r=lE;break;case 16:r=tp;break;case 536870912:r=cE;break;default:r=tp}r=Pk(r,Ek.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Ek(e,t){if($m=-1,qm=0,At&6)throw Error(Ee(327));var r=e.callbackNode;if(Jc()&&e.callbackNode!==r)return null;var n=rp(e,e===Hr?Zr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=bp(e,n);else{t=n;var a=At;At|=2;var i=Tk();(Hr!==e||Zr!==t)&&(si=null,Cu=xr()+500,kl(e,t));do try{gF();break}catch(l){kk(e,l)}while(!0);Cy(),gp.current=i,At=a,Tr!==null?t=0:(Hr=null,Zr=0,t=Lr)}if(t!==0){if(t===2&&(a=tv(e),a!==0&&(n=a,t=Tv(e,a))),t===1)throw r=Pf,kl(e,0),Zi(e,n),Gs(e,xr()),r;if(t===6)Zi(e,n);else{if(a=e.current.alternate,!(n&30)&&!pF(a)&&(t=bp(e,n),t===2&&(i=tv(e),i!==0&&(n=i,t=Tv(e,i))),t===1))throw r=Pf,kl(e,0),Zi(e,n),Gs(e,xr()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(Ee(345));case 2:il(e,$s,si);break;case 3:if(Zi(e,n),(n&130023424)===n&&(t=Uy+500-xr(),10<t)){if(rp(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){Ts(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=cv(il.bind(null,e,$s,si),t);break}il(e,$s,si);break;case 4:if(Zi(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var o=31-ua(n);i=1<<o,o=t[o],o>a&&(a=o),n&=~i}if(n=a,n=xr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*mF(n/1960))-n,10<n){e.timeoutHandle=cv(il.bind(null,e,$s,si),n);break}il(e,$s,si);break;case 5:il(e,$s,si);break;default:throw Error(Ee(329))}}}return Gs(e,xr()),e.callbackNode===r?Ek.bind(null,e):null}function Tv(e,t){var r=Qd;return e.current.memoizedState.isDehydrated&&(kl(e,t).flags|=256),e=bp(e,t),e!==2&&(t=$s,$s=r,t!==null&&Av(t)),e}function Av(e){$s===null?$s=e:$s.push.apply($s,e)}function pF(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 a=r[n],i=a.getSnapshot;a=a.value;try{if(!pa(i(),a))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 Zi(e,t){for(t&=~By,t&=~wx,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-ua(t),n=1<<r;e[r]=-1,t&=~n}}function w2(e){if(At&6)throw Error(Ee(327));Jc();var t=rp(e,0);if(!(t&1))return Gs(e,xr()),null;var r=bp(e,t);if(e.tag!==0&&r===2){var n=tv(e);n!==0&&(t=n,r=Tv(e,n))}if(r===1)throw r=Pf,kl(e,0),Zi(e,t),Gs(e,xr()),r;if(r===6)throw Error(Ee(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,il(e,$s,si),Gs(e,xr()),null}function $y(e,t){var r=At;At|=1;try{return e(t)}finally{At=r,At===0&&(Cu=xr()+500,gx&&Ko())}}function Ml(e){mo!==null&&mo.tag===0&&!(At&6)&&Jc();var t=At;At|=1;var r=En.transition,n=$t;try{if(En.transition=null,$t=1,e)return e()}finally{$t=n,En.transition=r,At=t,!(At&6)&&Ko()}}function qy(){Js=Hc.current,Qt(Hc)}function kl(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,HI(r)),Tr!==null)for(r=Tr.return;r!==null;){var n=r;switch(jy(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&op();break;case 3:Nu(),Qt(Hs),Qt(gs),Ry();break;case 5:Ay(n);break;case 4:Nu();break;case 13:Qt(sr);break;case 19:Qt(sr);break;case 10:Sy(n.type._context);break;case 22:case 23:qy()}r=r.return}if(Hr=e,Tr=e=So(e.current,null),Zr=Js=t,Lr=0,Pf=null,By=wx=Ll=0,$s=Qd=null,ml!==null){for(t=0;t<ml.length;t++)if(r=ml[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=a,n.next=o}r.pending=n}ml=null}return e}function kk(e,t){do{var r=Tr;try{if(Cy(),Mm.current=xp,pp){for(var n=ar.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}pp=!1}if(Fl=0,zr=Ir=ar=null,Yd=!1,Rf=0,My.current=null,r===null||r.return===null){Lr=1,Pf=t,Tr=null;break}e:{var i=e,o=r.return,l=r,c=t;if(t=Zr,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=l2(o);if(m!==null){m.flags&=-257,c2(m,o,l,i,t),m.mode&1&&o2(i,u,t),t=m,c=u;var v=t.updateQueue;if(v===null){var p=new Set;p.add(c),t.updateQueue=p}else v.add(c);break e}else{if(!(t&1)){o2(i,u,t),zy();break e}c=Error(Ee(426))}}else if(Zt&&l.mode&1){var x=l2(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),c2(x,o,l,i,t),Ny(_u(c,l));break e}}i=c=_u(c,l),Lr!==4&&(Lr=2),Qd===null?Qd=[i]:Qd.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var w=dk(i,c,t);t2(i,w);break e;case 1:l=c;var y=i.type,b=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(_o===null||!_o.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t;var N=fk(i,l,t);t2(i,N);break e}}i=i.return}while(i!==null)}Rk(r)}catch(C){t=C,Tr===r&&r!==null&&(Tr=r=r.return);continue}break}while(!0)}function Tk(){var e=gp.current;return gp.current=xp,e===null?xp:e}function zy(){(Lr===0||Lr===3||Lr===2)&&(Lr=4),Hr===null||!(Ll&268435455)&&!(wx&268435455)||Zi(Hr,Zr)}function bp(e,t){var r=At;At|=2;var n=Tk();(Hr!==e||Zr!==t)&&(si=null,kl(e,t));do try{xF();break}catch(a){kk(e,a)}while(!0);if(Cy(),At=r,gp.current=n,Tr!==null)throw Error(Ee(261));return Hr=null,Zr=0,Lr}function xF(){for(;Tr!==null;)Ak(Tr)}function gF(){for(;Tr!==null&&!q5();)Ak(Tr)}function Ak(e){var t=Ok(e.alternate,e,Js);e.memoizedProps=e.pendingProps,t===null?Rk(e):Tr=t,My.current=null}function Rk(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=uF(r,t),r!==null){r.flags&=32767,Tr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Lr=6,Tr=null;return}}else if(r=cF(r,t,Js),r!==null){Tr=r;return}if(t=t.sibling,t!==null){Tr=t;return}Tr=t=e}while(t!==null);Lr===0&&(Lr=5)}function il(e,t,r){var n=$t,a=En.transition;try{En.transition=null,$t=1,vF(e,t,r,n)}finally{En.transition=a,$t=n}return null}function vF(e,t,r,n){do Jc();while(mo!==null);if(At&6)throw Error(Ee(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Ee(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(J5(e,i),e===Hr&&(Tr=Hr=null,Zr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||em||(em=!0,Pk(tp,function(){return Jc(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=En.transition,En.transition=null;var o=$t;$t=1;var l=At;At|=4,My.current=null,fF(e,r),Ck(r,e),MI(ov),sp=!!iv,ov=iv=null,e.current=r,hF(r),z5(),At=l,$t=o,En.transition=i}else e.current=r;if(em&&(em=!1,mo=e,yp=a),i=e.pendingLanes,i===0&&(_o=null),W5(r.stateNode),Gs(e,xr()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(vp)throw vp=!1,e=Ev,Ev=null,e;return yp&1&&e.tag!==0&&Jc(),i=e.pendingLanes,i&1?e===kv?Jd++:(Jd=0,kv=e):Jd=0,Ko(),null}function Jc(){if(mo!==null){var e=dE(yp),t=En.transition,r=$t;try{if(En.transition=null,$t=16>e?16:e,mo===null)var n=!1;else{if(e=mo,mo=null,yp=0,At&6)throw Error(Ee(331));var a=At;for(At|=4,He=e.current;He!==null;){var i=He,o=i.child;if(He.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(He=u;He!==null;){var d=He;switch(d.tag){case 0:case 11:case 15:Xd(8,d,i)}var f=d.child;if(f!==null)f.return=d,He=f;else for(;He!==null;){d=He;var h=d.sibling,m=d.return;if(jk(d),d===u){He=null;break}if(h!==null){h.return=m,He=h;break}He=m}}}var v=i.alternate;if(v!==null){var p=v.child;if(p!==null){v.child=null;do{var x=p.sibling;p.sibling=null,p=x}while(p!==null)}}He=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,He=o;else e:for(;He!==null;){if(i=He,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Xd(9,i,i.return)}var w=i.sibling;if(w!==null){w.return=i.return,He=w;break e}He=i.return}}var y=e.current;for(He=y;He!==null;){o=He;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,He=b;else e:for(o=y;He!==null;){if(l=He,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:bx(9,l)}}catch(C){cr(l,l.return,C)}if(l===o){He=null;break e}var N=l.sibling;if(N!==null){N.return=l.return,He=N;break e}He=l.return}}if(At=a,Ko(),Ma&&typeof Ma.onPostCommitFiberRoot=="function")try{Ma.onPostCommitFiberRoot(fx,e)}catch{}n=!0}return n}finally{$t=r,En.transition=t}}return!1}function j2(e,t,r){t=_u(r,t),t=dk(e,t,1),e=No(e,t,1),t=Ts(),e!==null&&(ph(e,1,t),Gs(e,t))}function cr(e,t,r){if(e.tag===3)j2(e,e,r);else for(;t!==null;){if(t.tag===3){j2(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(_o===null||!_o.has(n))){e=_u(r,e),e=fk(t,e,1),t=No(t,e,1),e=Ts(),t!==null&&(ph(t,1,e),Gs(t,e));break}}t=t.return}}function yF(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ts(),e.pingedLanes|=e.suspendedLanes&r,Hr===e&&(Zr&r)===r&&(Lr===4||Lr===3&&(Zr&130023424)===Zr&&500>xr()-Uy?kl(e,0):By|=r),Gs(e,t)}function Dk(e,t){t===0&&(e.mode&1?(t=Vh,Vh<<=1,!(Vh&130023424)&&(Vh=4194304)):t=1);var r=Ts();e=wi(e,t),e!==null&&(ph(e,t,r),Gs(e,r))}function bF(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Dk(e,r)}function wF(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Ee(314))}n!==null&&n.delete(t),Dk(e,r)}var Ok;Ok=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Hs.current)Vs=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Vs=!1,lF(e,t,r);Vs=!!(e.flags&131072)}else Vs=!1,Zt&&t.flags&1048576&&LE(t,up,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Um(e,t),e=t.pendingProps;var a=bu(t,gs.current);Qc(t,r),a=Oy(null,t,n,e,a,r);var i=Py();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ws(n)?(i=!0,lp(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ky(t),a.updater=yx,t.stateNode=a,a._reactInternals=t,xv(t,n,e,r),t=yv(null,t,n,!0,i,r)):(t.tag=0,Zt&&i&&wy(t),Ns(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Um(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=NF(n),e=Yn(n,e),a){case 0:t=vv(null,t,n,e,r);break e;case 1:t=f2(null,t,n,e,r);break e;case 11:t=u2(null,t,n,e,r);break e;case 14:t=d2(null,t,n,Yn(n.type,e),r);break e}throw Error(Ee(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Yn(n,a),vv(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Yn(n,a),f2(e,t,n,a,r);case 3:e:{if(xk(t),e===null)throw Error(Ee(387));n=t.pendingProps,i=t.memoizedState,a=i.element,zE(e,t),hp(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=_u(Error(Ee(423)),t),t=h2(e,t,n,r,a);break e}else if(n!==a){a=_u(Error(Ee(424)),t),t=h2(e,t,n,r,a);break e}else for(an=jo(t.stateNode.containerInfo.firstChild),on=t,Zt=!0,ta=null,r=$E(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(wu(),n===a){t=ji(e,t,r);break e}Ns(e,t,n,r)}t=t.child}return t;case 5:return VE(t),e===null&&hv(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,lv(n,a)?o=null:i!==null&&lv(n,i)&&(t.flags|=32),pk(e,t),Ns(e,t,o,r),t.child;case 6:return e===null&&hv(t),null;case 13:return gk(e,t,r);case 4:return Ty(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ju(t,null,n,r):Ns(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Yn(n,a),u2(e,t,n,a,r);case 7:return Ns(e,t,t.pendingProps,r),t.child;case 8:return Ns(e,t,t.pendingProps.children,r),t.child;case 12:return Ns(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,Gt(dp,n._currentValue),n._currentValue=o,i!==null)if(pa(i.value,o)){if(i.children===a.children&&!Hs.current){t=ji(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=fi(-1,r&-r),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),mv(i.return,r,t),l.lanes|=r;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(Ee(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),mv(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ns(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Qc(t,r),a=An(a),n=n(a),t.flags|=1,Ns(e,t,n,r),t.child;case 14:return n=t.type,a=Yn(n,t.pendingProps),a=Yn(n.type,a),d2(e,t,n,a,r);case 15:return hk(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Yn(n,a),Um(e,t),t.tag=1,Ws(n)?(e=!0,lp(t)):e=!1,Qc(t,r),uk(t,n,a),xv(t,n,a,r),yv(null,t,n,!0,e,r);case 19:return vk(e,t,r);case 22:return mk(e,t,r)}throw Error(Ee(156,t.tag))};function Pk(e,t){return oE(e,t)}function jF(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=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 Sn(e,t,r,n){return new jF(e,t,r,n)}function Vy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function NF(e){if(typeof e=="function")return Vy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cy)return 11;if(e===uy)return 14}return 2}function So(e,t){var r=e.alternate;return r===null?(r=Sn(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 zm(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")Vy(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ic:return Tl(r.children,a,i,t);case ly:o=8,a|=8;break;case Ug:return e=Sn(12,r,t,a|2),e.elementType=Ug,e.lanes=i,e;case $g:return e=Sn(13,r,t,a),e.elementType=$g,e.lanes=i,e;case qg:return e=Sn(19,r,t,a),e.elementType=qg,e.lanes=i,e;case VS:return jx(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qS:o=10;break e;case zS:o=9;break e;case cy:o=11;break e;case uy:o=14;break e;case Yi:o=16,n=null;break e}throw Error(Ee(130,e==null?e:typeof e,""))}return t=Sn(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function Tl(e,t,r,n){return e=Sn(7,e,n,t),e.lanes=r,e}function jx(e,t,r,n){return e=Sn(22,e,n,t),e.elementType=VS,e.lanes=r,e.stateNode={isHidden:!1},e}function Q0(e,t,r){return e=Sn(6,e,null,t),e.lanes=r,e}function J0(e,t,r){return t=Sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _F(e,t,r,n,a){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=D0(0),this.expirationTimes=D0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=D0(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Hy(e,t,r,n,a,i,o,l,c){return e=new _F(e,t,r,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Sn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ky(i),e}function CF(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pc,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Ik(e){if(!e)return Po;e=e._reactInternals;e:{if(rc(e)!==e||e.tag!==1)throw Error(Ee(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ws(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ee(171))}if(e.tag===1){var r=e.type;if(Ws(r))return IE(e,r,t)}return t}function Fk(e,t,r,n,a,i,o,l,c){return e=Hy(r,n,!0,e,a,i,o,l,c),e.context=Ik(null),r=e.current,n=Ts(),a=Co(r),i=fi(n,a),i.callback=t??null,No(r,i,a),e.current.lanes=a,ph(e,a,n),Gs(e,n),e}function Nx(e,t,r,n){var a=t.current,i=Ts(),o=Co(a);return r=Ik(r),t.context===null?t.context=r:t.pendingContext=r,t=fi(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=No(a,t,o),e!==null&&(da(e,a,o,i),Lm(e,a,o)),o}function wp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function N2(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Wy(e,t){N2(e,t),(e=e.alternate)&&N2(e,t)}function SF(){return null}var Lk=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gy(e){this._internalRoot=e}_x.prototype.render=Gy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ee(409));Nx(e,t,null,null)};_x.prototype.unmount=Gy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ml(function(){Nx(null,e,null,null)}),t[bi]=null}};function _x(e){this._internalRoot=e}_x.prototype.unstable_scheduleHydration=function(e){if(e){var t=mE();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ji.length&&t!==0&&t<Ji[r].priority;r++);Ji.splice(r,0,e),r===0&&xE(e)}};function Ky(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function _2(){}function EF(e,t,r,n,a){if(a){if(typeof n=="function"){var i=n;n=function(){var u=wp(o);i.call(u)}}var o=Fk(t,n,e,0,null,!1,!1,"",_2);return e._reactRootContainer=o,e[bi]=o.current,Sf(e.nodeType===8?e.parentNode:e),Ml(),o}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var l=n;n=function(){var u=wp(c);l.call(u)}}var c=Hy(e,0,!1,null,null,!1,!1,"",_2);return e._reactRootContainer=c,e[bi]=c.current,Sf(e.nodeType===8?e.parentNode:e),Ml(function(){Nx(t,c,r,n)}),c}function Sx(e,t,r,n,a){var i=r._reactRootContainer;if(i){var o=i;if(typeof a=="function"){var l=a;a=function(){var c=wp(o);l.call(c)}}Nx(t,o,e,a)}else o=EF(r,t,e,a,n);return wp(o)}fE=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Od(t.pendingLanes);r!==0&&(hy(t,r|1),Gs(t,xr()),!(At&6)&&(Cu=xr()+500,Ko()))}break;case 13:Ml(function(){var n=wi(e,1);if(n!==null){var a=Ts();da(n,e,1,a)}}),Wy(e,1)}};my=function(e){if(e.tag===13){var t=wi(e,134217728);if(t!==null){var r=Ts();da(t,e,134217728,r)}Wy(e,134217728)}};hE=function(e){if(e.tag===13){var t=Co(e),r=wi(e,t);if(r!==null){var n=Ts();da(r,e,t,n)}Wy(e,t)}};mE=function(){return $t};pE=function(e,t){var r=$t;try{return $t=e,t()}finally{$t=r}};Jg=function(e,t,r){switch(t){case"input":if(Hg(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 a=xx(n);if(!a)throw Error(Ee(90));WS(n),Hg(n,a)}}}break;case"textarea":KS(e,r);break;case"select":t=r.value,t!=null&&Gc(e,!!r.multiple,t,!1)}};tE=$y;rE=Ml;var kF={usingClientEntryPoint:!1,Events:[gh,Bc,xx,ZS,eE,$y]},Cd={findFiberByHostInstance:hl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},TF={bundleType:Cd.bundleType,version:Cd.version,rendererPackageName:Cd.rendererPackageName,rendererConfig:Cd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ai.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=aE(e),e===null?null:e.stateNode},findFiberByHostInstance:Cd.findFiberByHostInstance||SF,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 tm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tm.isDisabled&&tm.supportsFiber)try{fx=tm.inject(TF),Ma=tm}catch{}}pn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kF;pn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ky(t))throw Error(Ee(200));return CF(e,t,null,r)};pn.createRoot=function(e,t){if(!Ky(e))throw Error(Ee(299));var r=!1,n="",a=Lk;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Hy(e,1,!1,null,null,r,!1,n,a),e[bi]=t.current,Sf(e.nodeType===8?e.parentNode:e),new Gy(t)};pn.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(Ee(188)):(e=Object.keys(e).join(","),Error(Ee(268,e)));return e=aE(t),e=e===null?null:e.stateNode,e};pn.flushSync=function(e){return Ml(e)};pn.hydrate=function(e,t,r){if(!Cx(t))throw Error(Ee(200));return Sx(null,e,t,!0,r)};pn.hydrateRoot=function(e,t,r){if(!Ky(e))throw Error(Ee(405));var n=r!=null&&r.hydratedSources||null,a=!1,i="",o=Lk;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Fk(t,null,e,1,r??null,a,!1,i,o),e[bi]=t.current,Sf(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new _x(t)};pn.render=function(e,t,r){if(!Cx(t))throw Error(Ee(200));return Sx(null,e,t,!1,r)};pn.unmountComponentAtNode=function(e){if(!Cx(e))throw Error(Ee(40));return e._reactRootContainer?(Ml(function(){Sx(null,null,e,!1,function(){e._reactRootContainer=null,e[bi]=null})}),!0):!1};pn.unstable_batchedUpdates=$y;pn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Cx(r))throw Error(Ee(200));if(e==null||e._reactInternals===void 0)throw Error(Ee(38));return Sx(e,t,r,!1,n)};pn.version="18.3.1-next-f1338f8080-20240426";function Mk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mk)}catch(e){console.error(e)}}Mk(),MS.exports=pn;var sc=MS.exports;const Bk=SS(sc);var Uk,C2=sc;Uk=C2.createRoot,C2.hydrateRoot;const AF=1,RF=1e6;let Z0=0;function DF(){return Z0=(Z0+1)%Number.MAX_SAFE_INTEGER,Z0.toString()}const eg=new Map,S2=e=>{if(eg.has(e))return;const t=setTimeout(()=>{eg.delete(e),Zd({type:"REMOVE_TOAST",toastId:e})},RF);eg.set(e,t)},OF=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,AF)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?S2(r):e.toasts.forEach(n=>{S2(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Vm=[];let Hm={toasts:[]};function Zd(e){Hm=OF(Hm,e),Vm.forEach(t=>{t(Hm)})}function PF({...e}){const t=DF(),r=a=>Zd({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>Zd({type:"DISMISS_TOAST",toastId:t});return Zd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function Yy(){const[e,t]=g.useState(Hm);return g.useEffect(()=>(Vm.push(t),()=>{const r=Vm.indexOf(t);r>-1&&Vm.splice(r,1)}),[e]),{...e,toast:PF,dismiss:r=>Zd({type:"DISMISS_TOAST",toastId:r})}}function ke(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function E2(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ex(...e){return t=>{let r=!1;const n=e.map(a=>{const i=E2(a,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():E2(e[a],null)}}}}function pt(...e){return g.useCallback(Ex(...e),e)}function IF(e,t){const r=g.createContext(t),n=i=>{const{children:o,...l}=i,c=g.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function a(i){const o=g.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,a]}function Yr(e,t=[]){let r=[];function n(i,o){const l=g.createContext(o),c=r.length;r=[...r,o];const u=f=>{var w;const{scope:h,children:m,...v}=f,p=((w=h==null?void 0:h[e])==null?void 0:w[c])||l,x=g.useMemo(()=>v,Object.values(v));return s.jsx(p.Provider,{value:x,children:m})};u.displayName=i+"Provider";function d(f,h){var p;const m=((p=h==null?void 0:h[e])==null?void 0:p[c])||l,v=g.useContext(m);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const a=()=>{const i=r.map(o=>g.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[n,FF(a,...t)]}function FF(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((l,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...l,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function Bl(e){const t=LF(e),r=g.forwardRef((n,a)=>{const{children:i,...o}=n,l=g.Children.toArray(i),c=l.find(BF);if(c){const u=c.props.children,d=l.map(f=>f===c?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:f);return s.jsx(t,{...o,ref:a,children:g.isValidElement(u)?g.cloneElement(u,void 0,d):null})}return s.jsx(t,{...o,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}var $k=Bl("Slot");function LF(e){const t=g.forwardRef((r,n)=>{const{children:a,...i}=r;if(g.isValidElement(a)){const o=$F(a),l=UF(i,a.props);return a.type!==g.Fragment&&(l.ref=n?Ex(n,o):o),g.cloneElement(a,l)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qk=Symbol("radix.slottable");function MF(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=qk,t}function BF(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qk}function UF(e,t){const r={...t};for(const n in t){const a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function $F(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function yh(e){const t=e+"CollectionProvider",[r,n]=Yr(t),[a,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:x,children:w}=p,y=de.useRef(null),b=de.useRef(new Map).current;return s.jsx(a,{scope:x,itemMap:b,collectionRef:y,children:w})};o.displayName=t;const l=e+"CollectionSlot",c=Bl(l),u=de.forwardRef((p,x)=>{const{scope:w,children:y}=p,b=i(l,w),N=pt(x,b.collectionRef);return s.jsx(c,{ref:N,children:y})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=Bl(d),m=de.forwardRef((p,x)=>{const{scope:w,children:y,...b}=p,N=de.useRef(null),C=pt(x,N),_=i(d,w);return de.useEffect(()=>(_.itemMap.set(N,{ref:N,...b}),()=>void _.itemMap.delete(N))),s.jsx(h,{[f]:"",ref:C,children:y})});m.displayName=d;function v(p){const x=i(e+"CollectionConsumer",p);return de.useCallback(()=>{const y=x.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((_,j)=>b.indexOf(_.ref.current)-b.indexOf(j.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},v,n]}var qF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ze=qF.reduce((e,t)=>{const r=Bl(`Primitive.${t}`),n=g.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Xy(e,t){e&&sc.flushSync(()=>e.dispatchEvent(t))}function dr(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function zF(e,t=globalThis==null?void 0:globalThis.document){const r=dr(e);g.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var VF="DismissableLayer",Rv="dismissableLayer.update",HF="dismissableLayer.pointerDownOutside",WF="dismissableLayer.focusOutside",k2,zk=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wu=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=g.useContext(zk),[d,f]=g.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=g.useState({}),v=pt(t,j=>f(j)),p=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(x),y=d?p.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,N=y>=w,C=KF(j=>{const S=j.target,k=[...u.branches].some(D=>D.contains(S));!N||k||(a==null||a(j),o==null||o(j),j.defaultPrevented||l==null||l())},h),_=YF(j=>{const S=j.target;[...u.branches].some(D=>D.contains(S))||(i==null||i(j),o==null||o(j),j.defaultPrevented||l==null||l())},h);return zF(j=>{y===u.layers.size-1&&(n==null||n(j),!j.defaultPrevented&&l&&(j.preventDefault(),l()))},h),g.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(k2=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),T2(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=k2)}},[d,h,r,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),T2())},[d,u]),g.useEffect(()=>{const j=()=>m({});return document.addEventListener(Rv,j),()=>document.removeEventListener(Rv,j)},[]),s.jsx(ze.div,{...c,ref:v,style:{pointerEvents:b?N?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,_.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,C.onPointerDownCapture)})});Wu.displayName=VF;var GF="DismissableLayerBranch",Vk=g.forwardRef((e,t)=>{const r=g.useContext(zk),n=g.useRef(null),a=pt(t,n);return g.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),s.jsx(ze.div,{...e,ref:a})});Vk.displayName=GF;function KF(e,t=globalThis==null?void 0:globalThis.document){const r=dr(e),n=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=l=>{if(l.target&&!n.current){let c=function(){Hk(HF,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function YF(e,t=globalThis==null?void 0:globalThis.document){const r=dr(e),n=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!n.current&&Hk(WF,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function T2(){const e=new CustomEvent(Rv);document.dispatchEvent(e)}function Hk(e,t,r,{discrete:n}){const a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Xy(a,i):a.dispatchEvent(i)}var XF=Wu,QF=Vk,fr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},JF="Portal",bh=g.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[a,i]=g.useState(!1);fr(()=>i(!0),[]);const o=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Bk.createPortal(s.jsx(ze.div,{...n,ref:t}),o):null});bh.displayName=JF;function ZF(e,t){return g.useReducer((r,n)=>t[r][n]??r,e)}var Xr=e=>{const{present:t,children:r}=e,n=e8(t),a=typeof r=="function"?r({present:n.isPresent}):g.Children.only(r),i=pt(n.ref,t8(a));return typeof r=="function"||n.isPresent?g.cloneElement(a,{ref:i}):null};Xr.displayName="Presence";function e8(e){const[t,r]=g.useState(),n=g.useRef(null),a=g.useRef(e),i=g.useRef("none"),o=e?"mounted":"unmounted",[l,c]=ZF(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=rm(n.current);i.current=l==="mounted"?u:"none"},[l]),fr(()=>{const u=n.current,d=a.current;if(d!==e){const h=i.current,m=rm(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),fr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const p=rm(n.current).includes(m.animationName);if(m.target===t&&p&&(c("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=m=>{m.target===t&&(i.current=rm(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function rm(e){return(e==null?void 0:e.animationName)||"none"}function t8(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var r8=ny[" useInsertionEffect ".trim().toString()]||fr;function fn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[a,i,o]=s8({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:a;{const d=g.useRef(e!==void 0);g.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,n])}const u=g.useCallback(d=>{var f;if(l){const h=n8(d)?d(e):d;h!==e&&((f=o.current)==null||f.call(o,h))}else i(d)},[l,e,i,o]);return[c,u]}function s8({defaultProp:e,onChange:t}){const[r,n]=g.useState(e),a=g.useRef(r),i=g.useRef(t);return r8(()=>{i.current=t},[t]),g.useEffect(()=>{var o;a.current!==r&&((o=i.current)==null||o.call(i,r),a.current=r)},[r,a]),[r,n,i]}function n8(e){return typeof e=="function"}var Wk=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),a8="VisuallyHidden",kx=g.forwardRef((e,t)=>s.jsx(ze.span,{...e,ref:t,style:{...Wk,...e.style}}));kx.displayName=a8;var i8=kx,Qy="ToastProvider",[Jy,o8,l8]=yh("Toast"),[Gk]=Yr("Toast",[l8]),[c8,Tx]=Gk(Qy),Kk=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:o}=e,[l,c]=g.useState(null),[u,d]=g.useState(0),f=g.useRef(!1),h=g.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Qy}\`. Expected non-empty \`string\`.`),s.jsx(Jy.Provider,{scope:t,children:s.jsx(c8,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:g.useCallback(()=>d(m=>m+1),[]),onToastRemove:g.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};Kk.displayName=Qy;var Yk="ToastViewport",u8=["F8"],Dv="toast.viewportPause",Ov="toast.viewportResume",Xk=g.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=u8,label:a="Notifications ({hotkey})",...i}=e,o=Tx(Yk,r),l=o8(r),c=g.useRef(null),u=g.useRef(null),d=g.useRef(null),f=g.useRef(null),h=pt(t,f,o.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;g.useEffect(()=>{const x=w=>{var b;n.length!==0&&n.every(N=>w[N]||w.code===N)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]),g.useEffect(()=>{const x=c.current,w=f.current;if(v&&x&&w){const y=()=>{if(!o.isClosePausedRef.current){const _=new CustomEvent(Dv);w.dispatchEvent(_),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const _=new CustomEvent(Ov);w.dispatchEvent(_),o.isClosePausedRef.current=!1}},N=_=>{!x.contains(_.relatedTarget)&&b()},C=()=>{x.contains(document.activeElement)||b()};return x.addEventListener("focusin",y),x.addEventListener("focusout",N),x.addEventListener("pointermove",y),x.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{x.removeEventListener("focusin",y),x.removeEventListener("focusout",N),x.removeEventListener("pointermove",y),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[v,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:x})=>{const y=l().map(b=>{const N=b.ref.current,C=[N,...N8(N)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?y.reverse():y).flat()},[l]);return g.useEffect(()=>{const x=f.current;if(x){const w=y=>{var C,_,j;const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const S=document.activeElement,k=y.shiftKey;if(y.target===x&&k){(C=u.current)==null||C.focus();return}const T=p({tabbingDirection:k?"backwards":"forwards"}),A=T.findIndex(W=>W===S);tg(T.slice(A+1))?y.preventDefault():k?(_=u.current)==null||_.focus():(j=d.current)==null||j.focus()}};return x.addEventListener("keydown",w),()=>x.removeEventListener("keydown",w)}},[l,p]),s.jsxs(QF,{ref:c,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&s.jsx(Pv,{ref:u,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"forwards"});tg(x)}}),s.jsx(Jy.Slot,{scope:r,children:s.jsx(ze.ol,{tabIndex:-1,...i,ref:h})}),v&&s.jsx(Pv,{ref:d,onFocusFromOutsideViewport:()=>{const x=p({tabbingDirection:"backwards"});tg(x)}})]})});Xk.displayName=Yk;var Qk="ToastFocusProxy",Pv=g.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,i=Tx(Qk,r);return s.jsx(kx,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&n()}})});Pv.displayName=Qk;var wh="Toast",d8="toast.swipeStart",f8="toast.swipeMove",h8="toast.swipeCancel",m8="toast.swipeEnd",Jk=g.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:i,...o}=e,[l,c]=fn({prop:n,defaultProp:a??!0,onChange:i,caller:wh});return s.jsx(Xr,{present:r||l,children:s.jsx(g8,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:dr(e.onPause),onResume:dr(e.onResume),onSwipeStart:ke(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ke(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ke(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ke(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});Jk.displayName=wh;var[p8,x8]=Gk(wh,{onClose(){}}),g8=g.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:a,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...v}=e,p=Tx(wh,r),[x,w]=g.useState(null),y=pt(t,W=>w(W)),b=g.useRef(null),N=g.useRef(null),C=a||p.duration,_=g.useRef(0),j=g.useRef(C),S=g.useRef(0),{onToastAdd:k,onToastRemove:D}=p,M=dr(()=>{var P;(x==null?void 0:x.contains(document.activeElement))&&((P=p.viewport)==null||P.focus()),o()}),T=g.useCallback(W=>{!W||W===1/0||(window.clearTimeout(S.current),_.current=new Date().getTime(),S.current=window.setTimeout(M,W))},[M]);g.useEffect(()=>{const W=p.viewport;if(W){const P=()=>{T(j.current),u==null||u()},V=()=>{const Z=new Date().getTime()-_.current;j.current=j.current-Z,window.clearTimeout(S.current),c==null||c()};return W.addEventListener(Dv,V),W.addEventListener(Ov,P),()=>{W.removeEventListener(Dv,V),W.removeEventListener(Ov,P)}}},[p.viewport,C,c,u,T]),g.useEffect(()=>{i&&!p.isClosePausedRef.current&&T(C)},[i,C,p.isClosePausedRef,T]),g.useEffect(()=>(k(),()=>D()),[k,D]);const A=g.useMemo(()=>x?a4(x):null,[x]);return p.viewport?s.jsxs(s.Fragment,{children:[A&&s.jsx(v8,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:A}),s.jsx(p8,{scope:r,onClose:M,children:sc.createPortal(s.jsx(Jy.ItemSlot,{scope:r,children:s.jsx(XF,{asChild:!0,onEscapeKeyDown:ke(l,()=>{p.isFocusedToastEscapeKeyDownRef.current||M(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(ze.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...v,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ke(e.onKeyDown,W=>{W.key==="Escape"&&(l==null||l(W.nativeEvent),W.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:ke(e.onPointerDown,W=>{W.button===0&&(b.current={x:W.clientX,y:W.clientY})}),onPointerMove:ke(e.onPointerMove,W=>{if(!b.current)return;const P=W.clientX-b.current.x,V=W.clientY-b.current.y,Z=!!N.current,Q=["left","right"].includes(p.swipeDirection),O=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,ne=Q?O(0,P):0,he=Q?0:O(0,V),I=W.pointerType==="touch"?10:2,Y={x:ne,y:he},E={originalEvent:W,delta:Y};Z?(N.current=Y,sm(f8,f,E,{discrete:!1})):A2(Y,p.swipeDirection,I)?(N.current=Y,sm(d8,d,E,{discrete:!1}),W.target.setPointerCapture(W.pointerId)):(Math.abs(P)>I||Math.abs(V)>I)&&(b.current=null)}),onPointerUp:ke(e.onPointerUp,W=>{const P=N.current,V=W.target;if(V.hasPointerCapture(W.pointerId)&&V.releasePointerCapture(W.pointerId),N.current=null,b.current=null,P){const Z=W.currentTarget,Q={originalEvent:W,delta:P};A2(P,p.swipeDirection,p.swipeThreshold)?sm(m8,m,Q,{discrete:!0}):sm(h8,h,Q,{discrete:!0}),Z.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),v8=e=>{const{__scopeToast:t,children:r,...n}=e,a=Tx(wh,t),[i,o]=g.useState(!1),[l,c]=g.useState(!1);return w8(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:s.jsx(bh,{asChild:!0,children:s.jsx(kx,{...n,children:i&&s.jsxs(s.Fragment,{children:[a.label," ",r]})})})},y8="ToastTitle",Zk=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return s.jsx(ze.div,{...n,ref:t})});Zk.displayName=y8;var b8="ToastDescription",e4=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return s.jsx(ze.div,{...n,ref:t})});e4.displayName=b8;var t4="ToastAction",r4=g.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?s.jsx(n4,{altText:r,asChild:!0,children:s.jsx(Zy,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${t4}\`. Expected non-empty \`string\`.`),null)});r4.displayName=t4;var s4="ToastClose",Zy=g.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=x8(s4,r);return s.jsx(n4,{asChild:!0,children:s.jsx(ze.button,{type:"button",...n,ref:t,onClick:ke(e.onClick,a.onClose)})})});Zy.displayName=s4;var n4=g.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return s.jsx(ze.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function a4(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),j8(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...a4(n))}}),t}function sm(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?Xy(a,i):a.dispatchEvent(i)}var A2=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),i=n>a;return t==="left"||t==="right"?i&&n>r:!i&&a>r};function w8(e=()=>{}){const t=dr(e);fr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function j8(e){return e.nodeType===e.ELEMENT_NODE}function N8(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function tg(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var _8=Kk,i4=Xk,o4=Jk,l4=Zk,c4=e4,u4=r4,d4=Zy;function f4(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=f4(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function h4(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=f4(e))&&(n&&(n+=" "),n+=t);return n}const R2=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,D2=h4,Gu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return D2(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(u=>{const d=r==null?void 0:r[u],f=i==null?void 0:i[u];if(d===null)return null;const h=R2(d)||R2(f);return a[u][h]}),l=r&&Object.entries(r).reduce((u,d)=>{let[f,h]=d;return h===void 0||(u[f]=h),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(v=>{let[p,x]=v;return Array.isArray(x)?x.includes({...i,...l}[p]):{...i,...l}[p]===x})?[...u,f,h]:u},[]);return D2(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const C8=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),m4=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var S8={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const E8=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o,...l},c)=>g.createElement("svg",{ref:c,...S8,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:m4("lucide",a),...l},[...o.map(([u,d])=>g.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ce=(e,t)=>{const r=g.forwardRef(({className:n,...a},i)=>g.createElement(E8,{ref:i,iconNode:t,className:m4(`lucide-${C8(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p4=Ce("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const k8=Ce("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dn=Ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kn=Ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const x4=Ce("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T8=Ce("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eb=Ce("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A8=Ce("BellOff",[["path",{d:"M8.7 3A6 6 0 0 1 18 8a21.3 21.3 0 0 0 .6 5",key:"o7mx20"}],["path",{d:"M17 17H3s3-2 3-9a4.67 4.67 0 0 1 .3-1.7",key:"16f1lm"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const R8=Ce("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D8=Ce("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const g4=Ce("Bone",[["path",{d:"M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z",key:"w610uw"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Iv=Ce("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O8=Ce("Cake",[["path",{d:"M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8",key:"1w3rig"}],["path",{d:"M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1",key:"n2jgmb"}],["path",{d:"M2 21h20",key:"1nyx9w"}],["path",{d:"M7 8v3",key:"1qtyvj"}],["path",{d:"M12 8v3",key:"hwp4zt"}],["path",{d:"M17 8v3",key:"1i6e5u"}],["path",{d:"M7 4h.01",key:"1bh4kh"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M17 4h.01",key:"1upcoc"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tb=Ce("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const If=Ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fv=Ce("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Io=Ce("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P8=Ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I8=Ce("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aa=Ce("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ot=Ce("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F8=Ce("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Su=Ce("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v4=Ce("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L8=Ce("Citrus",[["path",{d:"M21.66 17.67a1.08 1.08 0 0 1-.04 1.6A12 12 0 0 1 4.73 2.38a1.1 1.1 0 0 1 1.61-.04z",key:"4ite01"}],["path",{d:"M19.65 15.66A8 8 0 0 1 8.35 4.34",key:"1gxipu"}],["path",{d:"m14 10-5.5 5.5",key:"92pfem"}],["path",{d:"M14 17.85V10H6.15",key:"xqmtsk"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M8=Ce("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ri=Ce("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B8=Ce("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U8=Ce("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rb=Ce("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ku=Ce("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sb=Ce("Euro",[["path",{d:"M4 10h12",key:"1y6xl8"}],["path",{d:"M4 14h9",key:"1loblj"}],["path",{d:"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",key:"1j6lzo"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Al=Ce("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Us=Ce("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $8=Ce("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q8=Ce("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const O2=Ce("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z8=Ce("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V8=Ce("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H8=Ce("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jh=Ce("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W8=Ce("Footprints",[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ut=Ce("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G8=Ce("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Eu=Ce("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ul=Ce("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K8=Ce("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y8=Ce("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ss=Ce("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X8=Ce("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wr=Ce("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q8=Ce("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const y4=Ce("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xa=Ce("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yu=Ce("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b4=Ce("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jp=Ce("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Np=Ce("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ef=Ce("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hs=Ce("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J8=Ce("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z8=Ce("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P2=Ce("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ff=Ce("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eL=Ce("Pill",[["path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z",key:"wa1lgi"}],["path",{d:"m8.5 8.5 7 7",key:"rvfmvr"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $l=Ce("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ln=Ce("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tL=Ce("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rL=Ce("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ql=Ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ku=Ce("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sL=Ce("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nL=Ce("ShieldX",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const On=Ce("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zl=Ce("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ga=Ce("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fo=Ce("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I2=Ce("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nh=Ce("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aL=Ce("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iL=Ce("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oL=Ce("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lL=Ce("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vl=Ce("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cL=Ce("TreePine",[["path",{d:"m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",key:"cpyugq"}],["path",{d:"M12 22v-3",key:"kmzjlo"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const w4=Ce("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ax=Ce("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rx=Ce("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nc=Ce("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j4=Ce("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N4=Ce("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hi=Ce("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lv=Ce("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uL=Ce("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dL=Ce("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tu=Ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fL=Ce("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dx=Ce("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),nb="-",hL=e=>{const t=pL(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(nb);return l[0]===""&&l.length!==1&&l.shift(),_4(l,t)||mL(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},_4=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?_4(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(nb);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},F2=/^\[(.+)\]$/,mL=e=>{if(F2.test(e)){const t=F2.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},pL=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return gL(Object.entries(e.classGroups),r).forEach(([i,o])=>{Mv(o,n,i,t)}),n},Mv=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:L2(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(xL(a)){Mv(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{Mv(o,L2(t,i),r,n)})})},L2=(e,t)=>{let r=e;return t.split(nb).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},xL=e=>e.isThemeGetter,gL=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[r,a]}):e,vL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},C4="!",yL=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=l=>{const c=[];let u=0,d=0,f;for(let x=0;x<l.length;x++){let w=l[x];if(u===0){if(w===a&&(n||l.slice(x,x+i)===t)){c.push(l.slice(d,x)),d=x+i;continue}if(w==="/"){f=x;continue}}w==="["?u++:w==="]"&&u--}const h=c.length===0?l:l.substring(d),m=h.startsWith(C4),v=m?h.substring(1):h,p=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:p}};return r?l=>r({className:l,parseClassName:o}):o},bL=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},wL=e=>({cache:vL(e.cacheSize),parseClassName:yL(e),...hL(e)}),jL=/\s+/,NL=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(jL);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=r(u);let v=!!m,p=n(v?h.substring(0,m):h);if(!p){if(!v){l=u+(l.length>0?" "+l:l);continue}if(p=n(h),!p){l=u+(l.length>0?" "+l:l);continue}v=!1}const x=bL(d).join(":"),w=f?x+C4:x,y=w+p;if(i.includes(y))continue;i.push(y);const b=a(p,v);for(let N=0;N<b.length;++N){const C=b[N];i.push(w+C)}l=u+(l.length>0?" "+l:l)}return l};function _L(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=S4(t))&&(n&&(n+=" "),n+=r);return n}const S4=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=S4(e[n]))&&(r&&(r+=" "),r+=t);return r};function CL(e,...t){let r,n,a,i=o;function o(c){const u=t.reduce((d,f)=>f(d),e());return r=wL(u),n=r.cache.get,a=r.cache.set,i=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=NL(c,r);return a(c,d),d}return function(){return i(_L.apply(null,arguments))}}const Yt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},E4=/^\[(?:([a-z-]+):)?(.+)\]$/i,SL=/^\d+\/\d+$/,EL=new Set(["px","full","screen"]),kL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,RL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ei=e=>Zc(e)||EL.has(e)||SL.test(e),Ui=e=>Xu(e,"length",UL),Zc=e=>!!e&&!Number.isNaN(Number(e)),rg=e=>Xu(e,"number",Zc),Sd=e=>!!e&&Number.isInteger(Number(e)),OL=e=>e.endsWith("%")&&Zc(e.slice(0,-1)),vt=e=>E4.test(e),$i=e=>kL.test(e),PL=new Set(["length","size","percentage"]),IL=e=>Xu(e,PL,k4),FL=e=>Xu(e,"position",k4),LL=new Set(["image","url"]),ML=e=>Xu(e,LL,qL),BL=e=>Xu(e,"",$L),Ed=()=>!0,Xu=(e,t,r)=>{const n=E4.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},UL=e=>TL.test(e)&&!AL.test(e),k4=()=>!1,$L=e=>RL.test(e),qL=e=>DL.test(e),zL=()=>{const e=Yt("colors"),t=Yt("spacing"),r=Yt("blur"),n=Yt("brightness"),a=Yt("borderColor"),i=Yt("borderRadius"),o=Yt("borderSpacing"),l=Yt("borderWidth"),c=Yt("contrast"),u=Yt("grayscale"),d=Yt("hueRotate"),f=Yt("invert"),h=Yt("gap"),m=Yt("gradientColorStops"),v=Yt("gradientColorStopPositions"),p=Yt("inset"),x=Yt("margin"),w=Yt("opacity"),y=Yt("padding"),b=Yt("saturate"),N=Yt("scale"),C=Yt("sepia"),_=Yt("skew"),j=Yt("space"),S=Yt("translate"),k=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",vt,t],T=()=>[vt,t],A=()=>["",ei,Ui],W=()=>["auto",Zc,vt],P=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",vt],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>[Zc,vt];return{cacheSize:500,separator:":",theme:{colors:[Ed],spacing:[ei,Ui],blur:["none","",$i,vt],brightness:he(),borderColor:[e],borderRadius:["none","","full",$i,vt],borderSpacing:T(),borderWidth:A(),contrast:he(),grayscale:O(),hueRotate:he(),invert:O(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[OL,Ui],inset:M(),margin:M(),opacity:he(),padding:T(),saturate:he(),scale:he(),sepia:O(),skew:he(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",vt]}],container:["container"],columns:[{columns:[$i]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...P(),vt]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Sd,vt]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",vt]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Sd,vt]}],"grid-cols":[{"grid-cols":[Ed]}],"col-start-end":[{col:["auto",{span:["full",Sd,vt]},vt]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Ed]}],"row-start-end":[{row:["auto",{span:[Sd,vt]},vt]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",vt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",vt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",vt,t]}],"min-w":[{"min-w":[vt,t,"min","max","fit"]}],"max-w":[{"max-w":[vt,t,"none","full","min","max","fit","prose",{screen:[$i]},$i]}],h:[{h:[vt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[vt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[vt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[vt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$i,Ui]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rg]}],"font-family":[{font:[Ed]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",vt]}],"line-clamp":[{"line-clamp":["none",Zc,rg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ei,vt]}],"list-image":[{"list-image":["none",vt]}],"list-style-type":[{list:["none","disc","decimal",vt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ei,Ui]}],"underline-offset":[{"underline-offset":["auto",ei,vt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",vt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...P(),FL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",IL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ML]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:V()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[ei,vt]}],"outline-w":[{outline:[ei,Ui]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ei,Ui]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$i,BL]}],"shadow-color":[{shadow:[Ed]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...Z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",$i,vt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",vt]}],duration:[{duration:he()}],ease:[{ease:["linear","in","out","in-out",vt]}],delay:[{delay:he()}],animate:[{animate:["none","spin","ping","pulse","bounce",vt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Sd,vt]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",vt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",vt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",vt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ei,Ui,rg]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},VL=CL(zL);function Pe(...e){return VL(h4(e))}const HL=_8,T4=g.forwardRef(({className:e,...t},r)=>s.jsx(i4,{ref:r,className:Pe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));T4.displayName=i4.displayName;const WL=Gu("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),A4=g.forwardRef(({className:e,variant:t,...r},n)=>s.jsx(o4,{ref:n,className:Pe(WL({variant:t}),e),...r}));A4.displayName=o4.displayName;const GL=g.forwardRef(({className:e,...t},r)=>s.jsx(u4,{ref:r,className:Pe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));GL.displayName=u4.displayName;const R4=g.forwardRef(({className:e,...t},r)=>s.jsx(d4,{ref:r,className:Pe("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(Tu,{className:"h-4 w-4"})}));R4.displayName=d4.displayName;const D4=g.forwardRef(({className:e,...t},r)=>s.jsx(l4,{ref:r,className:Pe("text-sm font-semibold",e),...t}));D4.displayName=l4.displayName;const O4=g.forwardRef(({className:e,...t},r)=>s.jsx(c4,{ref:r,className:Pe("text-sm opacity-90",e),...t}));O4.displayName=c4.displayName;function KL(){const{toasts:e}=Yy();return s.jsxs(HL,{children:[e.map(function({id:t,title:r,description:n,action:a,...i}){return s.jsxs(A4,{...i,children:[s.jsxs("div",{className:"grid gap-1",children:[r&&s.jsx(D4,{children:r}),n&&s.jsx(O4,{children:n})]}),a,s.jsx(R4,{})]},t)}),s.jsx(T4,{})]})}var M2=["light","dark"],YL="(prefers-color-scheme: dark)",XL=g.createContext(void 0),QL={setTheme:e=>{},themes:[]},JL=()=>{var e;return(e=g.useContext(XL))!=null?e:QL};g.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:a,defaultTheme:i,value:o,attrs:l,nonce:c})=>{let u=i==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=a?M2.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(v,p=!1,x=!0)=>{let w=o?o[v]:v,y=p?v+"|| ''":`'${w}'`,b="";return a&&x&&!p&&M2.includes(v)&&(b+=`d.style.colorScheme = '${v}';`),r==="class"?p||w?b+=`c.add(${y})`:b+="null":w&&(b+=`d[s](n,${y})`),b},m=e?`!function(){${d}${h(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${YL}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}${u?"":"else{"+h(i,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${f}}catch(t){}}();`;return g.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var ZL=e=>{switch(e){case"success":return rM;case"info":return nM;case"warning":return sM;case"error":return aM;default:return null}},eM=Array(12).fill(0),tM=({visible:e,className:t})=>de.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},de.createElement("div",{className:"sonner-spinner"},eM.map((r,n)=>de.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),rM=de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},de.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),sM=de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},de.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),nM=de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},de.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),aM=de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},de.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),iM=de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},de.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),de.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),oM=()=>{let[e,t]=de.useState(document.hidden);return de.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Bv=1,lM=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Bv++,i=this.toasts.find(l=>l.id===a),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...e,id:a,title:r}),{...l,...e,id:a,dismissible:o,title:r}):l):this.addToast({title:r,...n,dismissible:o,id:a}),a},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),a=r!==void 0,i,o=n.then(async c=>{if(i=["resolve",c],de.isValidElement(c))a=!1,this.create({id:r,type:"default",message:c});else if(uM(c)&&!c.ok){a=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){a=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){a=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var c;a&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Bv++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ms=new lM,cM=(e,t)=>{let r=(t==null?void 0:t.id)||Bv++;return Ms.addToast({title:e,...t,id:r}),r},uM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",dM=cM,fM=()=>Ms.toasts,hM=()=>Ms.getActiveToasts(),fe=Object.assign(dM,{success:Ms.success,info:Ms.info,warning:Ms.warning,error:Ms.error,custom:Ms.custom,message:Ms.message,promise:Ms.promise,dismiss:Ms.dismiss,loading:Ms.loading},{getHistory:fM,getToasts:hM});function mM(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}mM(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
`);function nm(e){return e.label!==void 0}var pM=3,xM="32px",gM="16px",B2=4e3,vM=356,yM=14,bM=20,wM=200;function zn(...e){return e.filter(Boolean).join(" ")}function jM(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var NM=e=>{var t,r,n,a,i,o,l,c,u,d,f;let{invert:h,toast:m,unstyled:v,interacting:p,setHeights:x,visibleToasts:w,heights:y,index:b,toasts:N,expanded:C,removeToast:_,defaultRichColors:j,closeButton:S,style:k,cancelButtonStyle:D,actionButtonStyle:M,className:T="",descriptionClassName:A="",duration:W,position:P,gap:V,loadingIcon:Z,expandByDefault:Q,classNames:O,icons:ne,closeButtonAriaLabel:he="Close toast",pauseWhenPageIsHidden:I}=e,[Y,E]=de.useState(null),[B,ee]=de.useState(null),[J,K]=de.useState(!1),[ae,te]=de.useState(!1),[xe,F]=de.useState(!1),[We,je]=de.useState(!1),[Oe,Ne]=de.useState(!1),[ge,Me]=de.useState(0),[Xe,G]=de.useState(0),re=de.useRef(m.duration||W||B2),ce=de.useRef(null),_e=de.useRef(null),we=b===0,ye=b+1<=w,Te=m.type,Ze=m.dismissible!==!1,ot=m.className||"",qt=m.descriptionClassName||"",st=de.useMemo(()=>y.findIndex(dt=>dt.toastId===m.id)||0,[y,m.id]),Et=de.useMemo(()=>{var dt;return(dt=m.closeButton)!=null?dt:S},[m.closeButton,S]),Ar=de.useMemo(()=>m.duration||W||B2,[m.duration,W]),_t=de.useRef(0),or=de.useRef(0),Qa=de.useRef(0),$n=de.useRef(null),[dd,tl]=P.split("-"),fd=de.useMemo(()=>y.reduce((dt,Ft,Ht)=>Ht>=st?dt:dt+Ft.height,0),[y,st]),hd=oM(),N0=m.invert||h,md=Te==="loading";or.current=de.useMemo(()=>st*V+fd,[st,fd]),de.useEffect(()=>{re.current=Ar},[Ar]),de.useEffect(()=>{K(!0)},[]),de.useEffect(()=>{let dt=_e.current;if(dt){let Ft=dt.getBoundingClientRect().height;return G(Ft),x(Ht=>[{toastId:m.id,height:Ft,position:m.position},...Ht]),()=>x(Ht=>Ht.filter(Xs=>Xs.toastId!==m.id))}},[x,m.id]),de.useLayoutEffect(()=>{if(!J)return;let dt=_e.current,Ft=dt.style.height;dt.style.height="auto";let Ht=dt.getBoundingClientRect().height;dt.style.height=Ft,G(Ht),x(Xs=>Xs.find(Qs=>Qs.toastId===m.id)?Xs.map(Qs=>Qs.toastId===m.id?{...Qs,height:Ht}:Qs):[{toastId:m.id,height:Ht,position:m.position},...Xs])},[J,m.title,m.description,x,m.id]);let Ys=de.useCallback(()=>{te(!0),Me(or.current),x(dt=>dt.filter(Ft=>Ft.toastId!==m.id)),setTimeout(()=>{_(m)},wM)},[m,_,x,or]);de.useEffect(()=>{if(m.promise&&Te==="loading"||m.duration===1/0||m.type==="loading")return;let dt;return C||p||I&&hd?(()=>{if(Qa.current<_t.current){let Ft=new Date().getTime()-_t.current;re.current=re.current-Ft}Qa.current=new Date().getTime()})():re.current!==1/0&&(_t.current=new Date().getTime(),dt=setTimeout(()=>{var Ft;(Ft=m.onAutoClose)==null||Ft.call(m,m),Ys()},re.current)),()=>clearTimeout(dt)},[C,p,m,Te,I,hd,Ys]),de.useEffect(()=>{m.delete&&Ys()},[Ys,m.delete]);function _0(){var dt,Ft,Ht;return ne!=null&&ne.loading?de.createElement("div",{className:zn(O==null?void 0:O.loader,(dt=m==null?void 0:m.classNames)==null?void 0:dt.loader,"sonner-loader"),"data-visible":Te==="loading"},ne.loading):Z?de.createElement("div",{className:zn(O==null?void 0:O.loader,(Ft=m==null?void 0:m.classNames)==null?void 0:Ft.loader,"sonner-loader"),"data-visible":Te==="loading"},Z):de.createElement(tM,{className:zn(O==null?void 0:O.loader,(Ht=m==null?void 0:m.classNames)==null?void 0:Ht.loader),visible:Te==="loading"})}return de.createElement("li",{tabIndex:0,ref:_e,className:zn(T,ot,O==null?void 0:O.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,O==null?void 0:O.default,O==null?void 0:O[Te],(r=m==null?void 0:m.classNames)==null?void 0:r[Te]),"data-sonner-toast":"","data-rich-colors":(n=m.richColors)!=null?n:j,"data-styled":!(m.jsx||m.unstyled||v),"data-mounted":J,"data-promise":!!m.promise,"data-swiped":Oe,"data-removed":ae,"data-visible":ye,"data-y-position":dd,"data-x-position":tl,"data-index":b,"data-front":we,"data-swiping":xe,"data-dismissible":Ze,"data-type":Te,"data-invert":N0,"data-swipe-out":We,"data-swipe-direction":B,"data-expanded":!!(C||Q&&J),style:{"--index":b,"--toasts-before":b,"--z-index":N.length-b,"--offset":`${ae?ge:or.current}px`,"--initial-height":Q?"auto":`${Xe}px`,...k,...m.style},onDragEnd:()=>{F(!1),E(null),$n.current=null},onPointerDown:dt=>{md||!Ze||(ce.current=new Date,Me(or.current),dt.target.setPointerCapture(dt.pointerId),dt.target.tagName!=="BUTTON"&&(F(!0),$n.current={x:dt.clientX,y:dt.clientY}))},onPointerUp:()=>{var dt,Ft,Ht,Xs;if(We||!Ze)return;$n.current=null;let Qs=Number(((dt=_e.current)==null?void 0:dt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_a=Number(((Ft=_e.current)==null?void 0:Ft.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ja=new Date().getTime()-((Ht=ce.current)==null?void 0:Ht.getTime()),bs=Y==="x"?Qs:_a,Ca=Math.abs(bs)/Ja;if(Math.abs(bs)>=bM||Ca>.11){Me(or.current),(Xs=m.onDismiss)==null||Xs.call(m,m),ee(Y==="x"?Qs>0?"right":"left":_a>0?"down":"up"),Ys(),je(!0),Ne(!1);return}F(!1),E(null)},onPointerMove:dt=>{var Ft,Ht,Xs,Qs;if(!$n.current||!Ze||((Ft=window.getSelection())==null?void 0:Ft.toString().length)>0)return;let _a=dt.clientY-$n.current.y,Ja=dt.clientX-$n.current.x,bs=(Ht=e.swipeDirections)!=null?Ht:jM(P);!Y&&(Math.abs(Ja)>1||Math.abs(_a)>1)&&E(Math.abs(Ja)>Math.abs(_a)?"x":"y");let Ca={x:0,y:0};Y==="y"?(bs.includes("top")||bs.includes("bottom"))&&(bs.includes("top")&&_a<0||bs.includes("bottom")&&_a>0)&&(Ca.y=_a):Y==="x"&&(bs.includes("left")||bs.includes("right"))&&(bs.includes("left")&&Ja<0||bs.includes("right")&&Ja>0)&&(Ca.x=Ja),(Math.abs(Ca.x)>0||Math.abs(Ca.y)>0)&&Ne(!0),(Xs=_e.current)==null||Xs.style.setProperty("--swipe-amount-x",`${Ca.x}px`),(Qs=_e.current)==null||Qs.style.setProperty("--swipe-amount-y",`${Ca.y}px`)}},Et&&!m.jsx?de.createElement("button",{"aria-label":he,"data-disabled":md,"data-close-button":!0,onClick:md||!Ze?()=>{}:()=>{var dt;Ys(),(dt=m.onDismiss)==null||dt.call(m,m)},className:zn(O==null?void 0:O.closeButton,(a=m==null?void 0:m.classNames)==null?void 0:a.closeButton)},(i=ne==null?void 0:ne.close)!=null?i:iM):null,m.jsx||g.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:de.createElement(de.Fragment,null,Te||m.icon||m.promise?de.createElement("div",{"data-icon":"",className:zn(O==null?void 0:O.icon,(o=m==null?void 0:m.classNames)==null?void 0:o.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||_0():null,m.type!=="loading"?m.icon||(ne==null?void 0:ne[Te])||ZL(Te):null):null,de.createElement("div",{"data-content":"",className:zn(O==null?void 0:O.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},de.createElement("div",{"data-title":"",className:zn(O==null?void 0:O.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?de.createElement("div",{"data-description":"",className:zn(A,qt,O==null?void 0:O.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),g.isValidElement(m.cancel)?m.cancel:m.cancel&&nm(m.cancel)?de.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||D,onClick:dt=>{var Ft,Ht;nm(m.cancel)&&Ze&&((Ht=(Ft=m.cancel).onClick)==null||Ht.call(Ft,dt),Ys())},className:zn(O==null?void 0:O.cancelButton,(d=m==null?void 0:m.classNames)==null?void 0:d.cancelButton)},m.cancel.label):null,g.isValidElement(m.action)?m.action:m.action&&nm(m.action)?de.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||M,onClick:dt=>{var Ft,Ht;nm(m.action)&&((Ht=(Ft=m.action).onClick)==null||Ht.call(Ft,dt),!dt.defaultPrevented&&Ys())},className:zn(O==null?void 0:O.actionButton,(f=m==null?void 0:m.classNames)==null?void 0:f.actionButton)},m.action.label):null))};function U2(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function _M(e,t){let r={};return[e,t].forEach((n,a)=>{let i=a===1,o=i?"--mobile-offset":"--offset",l=i?gM:xM;function c(u){["top","right","bottom","left"].forEach(d=>{r[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${o}-${u}`]=l:r[`${o}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(l)}),r}var CM=g.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:f,duration:h,style:m,visibleToasts:v=pM,toastOptions:p,dir:x=U2(),gap:w=yM,loadingIcon:y,icons:b,containerAriaLabel:N="Notifications",pauseWhenPageIsHidden:C}=e,[_,j]=de.useState([]),S=de.useMemo(()=>Array.from(new Set([n].concat(_.filter(I=>I.position).map(I=>I.position)))),[_,n]),[k,D]=de.useState([]),[M,T]=de.useState(!1),[A,W]=de.useState(!1),[P,V]=de.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=de.useRef(null),Q=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=de.useRef(null),ne=de.useRef(!1),he=de.useCallback(I=>{j(Y=>{var E;return(E=Y.find(B=>B.id===I.id))!=null&&E.delete||Ms.dismiss(I.id),Y.filter(({id:B})=>B!==I.id)})},[]);return de.useEffect(()=>Ms.subscribe(I=>{if(I.dismiss){j(Y=>Y.map(E=>E.id===I.id?{...E,delete:!0}:E));return}setTimeout(()=>{Bk.flushSync(()=>{j(Y=>{let E=Y.findIndex(B=>B.id===I.id);return E!==-1?[...Y.slice(0,E),{...Y[E],...I},...Y.slice(E+1)]:[I,...Y]})})})}),[]),de.useEffect(()=>{if(d!=="system"){V(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:Y})=>{V(Y?"dark":"light")})}catch{I.addListener(({matches:E})=>{try{V(E?"dark":"light")}catch(B){console.error(B)}})}},[d]),de.useEffect(()=>{_.length<=1&&T(!1)},[_]),de.useEffect(()=>{let I=Y=>{var E,B;a.every(ee=>Y[ee]||Y.code===ee)&&(T(!0),(E=Z.current)==null||E.focus()),Y.code==="Escape"&&(document.activeElement===Z.current||(B=Z.current)!=null&&B.contains(document.activeElement))&&T(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[a]),de.useEffect(()=>{if(Z.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,ne.current=!1)}},[Z.current]),de.createElement("section",{ref:t,"aria-label":`${N} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((I,Y)=>{var E;let[B,ee]=I.split("-");return _.length?de.createElement("ol",{key:I,dir:x==="auto"?U2():x,tabIndex:-1,ref:Z,className:l,"data-sonner-toaster":!0,"data-theme":P,"data-y-position":B,"data-lifted":M&&_.length>1&&!i,"data-x-position":ee,style:{"--front-toast-height":`${((E=k[0])==null?void 0:E.height)||0}px`,"--width":`${vM}px`,"--gap":`${w}px`,...m,..._M(c,u)},onBlur:J=>{ne.current&&!J.currentTarget.contains(J.relatedTarget)&&(ne.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||ne.current||(ne.current=!0,O.current=J.relatedTarget)},onMouseEnter:()=>T(!0),onMouseMove:()=>T(!0),onMouseLeave:()=>{A||T(!1)},onDragEnd:()=>T(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},_.filter(J=>!J.position&&Y===0||J.position===I).map((J,K)=>{var ae,te;return de.createElement(NM,{key:J.id,icons:b,index:K,toast:J,defaultRichColors:f,duration:(ae=p==null?void 0:p.duration)!=null?ae:h,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:r,visibleToasts:v,closeButton:(te=p==null?void 0:p.closeButton)!=null?te:o,interacting:A,position:I,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:he,toasts:_.filter(xe=>xe.position==J.position),heights:k.filter(xe=>xe.position==J.position),setHeights:D,expandByDefault:i,gap:w,loadingIcon:y,expanded:M,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const SM=({...e})=>{const{theme:t="system"}=JL();return s.jsx(CM,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var EM=ny[" useId ".trim().toString()]||(()=>{}),kM=0;function cn(e){const[t,r]=g.useState(EM());return fr(()=>{r(n=>n??String(kM++))},[e]),t?`radix-${t}`:""}const TM=["top","right","bottom","left"],Lo=Math.min,en=Math.max,_p=Math.round,am=Math.floor,Ua=e=>({x:e,y:e}),AM={left:"right",right:"left",bottom:"top",top:"bottom"},RM={start:"end",end:"start"};function Uv(e,t,r){return en(e,Lo(t,r))}function Ni(e,t){return typeof e=="function"?e(t):e}function _i(e){return e.split("-")[0]}function Qu(e){return e.split("-")[1]}function ab(e){return e==="x"?"y":"x"}function ib(e){return e==="y"?"height":"width"}const DM=new Set(["top","bottom"]);function Fa(e){return DM.has(_i(e))?"y":"x"}function ob(e){return ab(Fa(e))}function OM(e,t,r){r===void 0&&(r=!1);const n=Qu(e),a=ob(e),i=ib(a);let o=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Cp(o)),[o,Cp(o)]}function PM(e){const t=Cp(e);return[$v(e),t,$v(t)]}function $v(e){return e.replace(/start|end/g,t=>RM[t])}const $2=["left","right"],q2=["right","left"],IM=["top","bottom"],FM=["bottom","top"];function LM(e,t,r){switch(e){case"top":case"bottom":return r?t?q2:$2:t?$2:q2;case"left":case"right":return t?IM:FM;default:return[]}}function MM(e,t,r,n){const a=Qu(e);let i=LM(_i(e),r==="start",n);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map($v)))),i}function Cp(e){return e.replace(/left|right|bottom|top/g,t=>AM[t])}function BM(e){return{top:0,right:0,bottom:0,left:0,...e}}function P4(e){return typeof e!="number"?BM(e):{top:e,right:e,bottom:e,left:e}}function Sp(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function z2(e,t,r){let{reference:n,floating:a}=e;const i=Fa(t),o=ob(t),l=ib(o),c=_i(t),u=i==="y",d=n.x+n.width/2-a.width/2,f=n.y+n.height/2-a.height/2,h=n[l]/2-a[l]/2;let m;switch(c){case"top":m={x:d,y:n.y-a.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-a.width,y:f};break;default:m={x:n.x,y:n.y}}switch(Qu(t)){case"start":m[o]-=h*(r&&u?-1:1);break;case"end":m[o]+=h*(r&&u?-1:1);break}return m}const UM=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:o}=r,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:f}=z2(u,n,c),h=n,m={},v=0;for(let p=0;p<l.length;p++){const{name:x,fn:w}=l[p],{x:y,y:b,data:N,reset:C}=await w({x:d,y:f,initialPlacement:n,placement:h,strategy:a,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});d=y??d,f=b??f,m={...m,[x]:{...m[x],...N}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):C.rects),{x:d,y:f}=z2(u,h,c)),p=-1)}return{x:d,y:f,placement:h,strategy:a,middlewareData:m}};async function Lf(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Ni(t,e),v=P4(m),x=l[h?f==="floating"?"reference":"floating":f],w=Sp(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),y=f==="floating"?{x:n,y:a,width:o.floating.width,height:o.floating.height}:o.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),N=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},C=Sp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:b,strategy:c}):y);return{top:(w.top-C.top+v.top)/N.y,bottom:(C.bottom-w.bottom+v.bottom)/N.y,left:(w.left-C.left+v.left)/N.x,right:(C.right-w.right+v.right)/N.x}}const $M=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Ni(e,t)||{};if(u==null)return{};const f=P4(d),h={x:r,y:n},m=ob(a),v=ib(m),p=await o.getDimensions(u),x=m==="y",w=x?"top":"left",y=x?"bottom":"right",b=x?"clientHeight":"clientWidth",N=i.reference[v]+i.reference[m]-h[m]-i.floating[v],C=h[m]-i.reference[m],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let j=_?_[b]:0;(!j||!await(o.isElement==null?void 0:o.isElement(_)))&&(j=l.floating[b]||i.floating[v]);const S=N/2-C/2,k=j/2-p[v]/2-1,D=Lo(f[w],k),M=Lo(f[y],k),T=D,A=j-p[v]-M,W=j/2-p[v]/2+S,P=Uv(T,W,A),V=!c.arrow&&Qu(a)!=null&&W!==P&&i.reference[v]/2-(W<T?D:M)-p[v]/2<0,Z=V?W<T?W-T:W-A:0;return{[m]:h[m]+Z,data:{[m]:P,centerOffset:W-P-Z,...V&&{alignmentOffset:Z}},reset:V}}}),qM=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:p=!0,...x}=Ni(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const w=_i(a),y=Fa(l),b=_i(l)===l,N=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=h||(b||!p?[Cp(l)]:PM(l)),_=v!=="none";!h&&_&&C.push(...MM(l,p,v,N));const j=[l,...C],S=await Lf(t,x),k=[];let D=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&k.push(S[w]),f){const W=OM(a,o,N);k.push(S[W[0]],S[W[1]])}if(D=[...D,{placement:a,overflows:k}],!k.every(W=>W<=0)){var M,T;const W=(((M=i.flip)==null?void 0:M.index)||0)+1,P=j[W];if(P&&(!(f==="alignment"?y!==Fa(P):!1)||D.every(Q=>Q.overflows[0]>0&&Fa(Q.placement)===y)))return{data:{index:W,overflows:D},reset:{placement:P}};let V=(T=D.filter(Z=>Z.overflows[0]<=0).sort((Z,Q)=>Z.overflows[1]-Q.overflows[1])[0])==null?void 0:T.placement;if(!V)switch(m){case"bestFit":{var A;const Z=(A=D.filter(Q=>{if(_){const O=Fa(Q.placement);return O===y||O==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(O=>O>0).reduce((O,ne)=>O+ne,0)]).sort((Q,O)=>Q[1]-O[1])[0])==null?void 0:A[0];Z&&(V=Z);break}case"initialPlacement":V=l;break}if(a!==V)return{reset:{placement:V}}}return{}}}};function V2(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function H2(e){return TM.some(t=>e[t]>=0)}const zM=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Ni(e,t);switch(n){case"referenceHidden":{const i=await Lf(t,{...a,elementContext:"reference"}),o=V2(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:H2(o)}}}case"escaped":{const i=await Lf(t,{...a,altBoundary:!0}),o=V2(i,r.floating);return{data:{escapedOffsets:o,escaped:H2(o)}}}default:return{}}}}},I4=new Set(["left","top"]);async function VM(e,t){const{placement:r,platform:n,elements:a}=e,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),o=_i(r),l=Qu(r),c=Fa(r)==="y",u=I4.has(o)?-1:1,d=i&&c?-1:1,f=Ni(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),c?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const HM=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:i,placement:o,middlewareData:l}=t,c=await VM(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},WM=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:x=>{let{x:w,y}=x;return{x:w,y}}},...c}=Ni(e,t),u={x:r,y:n},d=await Lf(t,c),f=Fa(_i(a)),h=ab(f);let m=u[h],v=u[f];if(i){const x=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=m+d[x],b=m-d[w];m=Uv(y,m,b)}if(o){const x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",y=v+d[x],b=v-d[w];v=Uv(y,v,b)}const p=l.fn({...t,[h]:m,[f]:v});return{...p,data:{x:p.x-r,y:p.y-n,enabled:{[h]:i,[f]:o}}}}}},GM=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Ni(e,t),d={x:r,y:n},f=Fa(a),h=ab(f);let m=d[h],v=d[f];const p=Ni(l,t),x=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const b=h==="y"?"height":"width",N=i.reference[h]-i.floating[b]+x.mainAxis,C=i.reference[h]+i.reference[b]-x.mainAxis;m<N?m=N:m>C&&(m=C)}if(u){var w,y;const b=h==="y"?"width":"height",N=I4.has(_i(a)),C=i.reference[f]-i.floating[b]+(N&&((w=o.offset)==null?void 0:w[f])||0)+(N?0:x.crossAxis),_=i.reference[f]+i.reference[b]+(N?0:((y=o.offset)==null?void 0:y[f])||0)-(N?x.crossAxis:0);v<C?v=C:v>_&&(v=_)}return{[h]:m,[f]:v}}}},KM=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=Ni(e,t),d=await Lf(t,u),f=_i(a),h=Qu(a),m=Fa(a)==="y",{width:v,height:p}=i.floating;let x,w;f==="top"||f==="bottom"?(x=f,w=h===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(w=f,x=h==="end"?"top":"bottom");const y=p-d.top-d.bottom,b=v-d.left-d.right,N=Lo(p-d[x],y),C=Lo(v-d[w],b),_=!t.middlewareData.shift;let j=N,S=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(S=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(j=y),_&&!h){const D=en(d.left,0),M=en(d.right,0),T=en(d.top,0),A=en(d.bottom,0);m?S=v-2*(D!==0||M!==0?D+M:en(d.left,d.right)):j=p-2*(T!==0||A!==0?T+A:en(d.top,d.bottom))}await c({...t,availableWidth:S,availableHeight:j});const k=await o.getDimensions(l.floating);return v!==k.width||p!==k.height?{reset:{rects:!0}}:{}}}};function Ox(){return typeof window<"u"}function Ju(e){return F4(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ga(e){var t;return(t=(F4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function F4(e){return Ox()?e instanceof Node||e instanceof un(e).Node:!1}function va(e){return Ox()?e instanceof Element||e instanceof un(e).Element:!1}function Va(e){return Ox()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function W2(e){return!Ox()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}const YM=new Set(["inline","contents"]);function _h(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=ya(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!YM.has(a)}const XM=new Set(["table","td","th"]);function QM(e){return XM.has(Ju(e))}const JM=[":popover-open",":modal"];function Px(e){return JM.some(t=>{try{return e.matches(t)}catch{return!1}})}const ZM=["transform","translate","scale","rotate","perspective"],eB=["transform","translate","scale","rotate","perspective","filter"],tB=["paint","layout","strict","content"];function lb(e){const t=cb(),r=va(e)?ya(e):e;return ZM.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||eB.some(n=>(r.willChange||"").includes(n))||tB.some(n=>(r.contain||"").includes(n))}function rB(e){let t=Mo(e);for(;Va(t)&&!Au(t);){if(lb(t))return t;if(Px(t))return null;t=Mo(t)}return null}function cb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sB=new Set(["html","body","#document"]);function Au(e){return sB.has(Ju(e))}function ya(e){return un(e).getComputedStyle(e)}function Ix(e){return va(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mo(e){if(Ju(e)==="html")return e;const t=e.assignedSlot||e.parentNode||W2(e)&&e.host||Ga(e);return W2(t)?t.host:t}function L4(e){const t=Mo(e);return Au(t)?e.ownerDocument?e.ownerDocument.body:e.body:Va(t)&&_h(t)?t:L4(t)}function Mf(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=L4(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),o=un(a);if(i){const l=qv(o);return t.concat(o,o.visualViewport||[],_h(a)?a:[],l&&r?Mf(l):[])}return t.concat(a,Mf(a,[],r))}function qv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function M4(e){const t=ya(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Va(e),i=a?e.offsetWidth:r,o=a?e.offsetHeight:n,l=_p(r)!==i||_p(n)!==o;return l&&(r=i,n=o),{width:r,height:n,$:l}}function ub(e){return va(e)?e:e.contextElement}function eu(e){const t=ub(e);if(!Va(t))return Ua(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:i}=M4(t);let o=(i?_p(r.width):r.width)/n,l=(i?_p(r.height):r.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const nB=Ua(0);function B4(e){const t=un(e);return!cb()||!t.visualViewport?nB:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aB(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==un(e)?!1:t}function Hl(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),i=ub(e);let o=Ua(1);t&&(n?va(n)&&(o=eu(n)):o=eu(e));const l=aB(i,r,n)?B4(i):Ua(0);let c=(a.left+l.x)/o.x,u=(a.top+l.y)/o.y,d=a.width/o.x,f=a.height/o.y;if(i){const h=un(i),m=n&&va(n)?un(n):n;let v=h,p=qv(v);for(;p&&n&&m!==v;){const x=eu(p),w=p.getBoundingClientRect(),y=ya(p),b=w.left+(p.clientLeft+parseFloat(y.paddingLeft))*x.x,N=w.top+(p.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,f*=x.y,c+=b,u+=N,v=un(p),p=qv(v)}}return Sp({width:d,height:f,x:c,y:u})}function db(e,t){const r=Ix(e).scrollLeft;return t?t.left+r:Hl(Ga(e)).left+r}function U4(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:db(e,n)),i=n.top+t.scrollTop;return{x:a,y:i}}function iB(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const i=a==="fixed",o=Ga(n),l=t?Px(t.floating):!1;if(n===o||l&&i)return r;let c={scrollLeft:0,scrollTop:0},u=Ua(1);const d=Ua(0),f=Va(n);if((f||!f&&!i)&&((Ju(n)!=="body"||_h(o))&&(c=Ix(n)),Va(n))){const m=Hl(n);u=eu(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}const h=o&&!f&&!i?U4(o,c,!0):Ua(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:r.y*u.y-c.scrollTop*u.y+d.y+h.y}}function oB(e){return Array.from(e.getClientRects())}function lB(e){const t=Ga(e),r=Ix(e),n=e.ownerDocument.body,a=en(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=en(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+db(e);const l=-r.scrollTop;return ya(n).direction==="rtl"&&(o+=en(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:o,y:l}}function cB(e,t){const r=un(e),n=Ga(e),a=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,l=0,c=0;if(a){i=a.width,o=a.height;const u=cb();(!u||u&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:i,height:o,x:l,y:c}}const uB=new Set(["absolute","fixed"]);function dB(e,t){const r=Hl(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Va(e)?eu(e):Ua(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=a*i.x,u=n*i.y;return{width:o,height:l,x:c,y:u}}function G2(e,t,r){let n;if(t==="viewport")n=cB(e,r);else if(t==="document")n=lB(Ga(e));else if(va(t))n=dB(t,r);else{const a=B4(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Sp(n)}function $4(e,t){const r=Mo(e);return r===t||!va(r)||Au(r)?!1:ya(r).position==="fixed"||$4(r,t)}function fB(e,t){const r=t.get(e);if(r)return r;let n=Mf(e,[],!1).filter(l=>va(l)&&Ju(l)!=="body"),a=null;const i=ya(e).position==="fixed";let o=i?Mo(e):e;for(;va(o)&&!Au(o);){const l=ya(o),c=lb(o);!c&&l.position==="fixed"&&(a=null),(i?!c&&!a:!c&&l.position==="static"&&!!a&&uB.has(a.position)||_h(o)&&!c&&$4(e,o))?n=n.filter(d=>d!==o):a=l,o=Mo(o)}return t.set(e,n),n}function hB(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[...r==="clippingAncestors"?Px(t)?[]:fB(t,this._c):[].concat(r),n],l=o[0],c=o.reduce((u,d)=>{const f=G2(t,d,a);return u.top=en(f.top,u.top),u.right=Lo(f.right,u.right),u.bottom=Lo(f.bottom,u.bottom),u.left=en(f.left,u.left),u},G2(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function mB(e){const{width:t,height:r}=M4(e);return{width:t,height:r}}function pB(e,t,r){const n=Va(t),a=Ga(t),i=r==="fixed",o=Hl(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=Ua(0);function u(){c.x=db(a)}if(n||!n&&!i)if((Ju(t)!=="body"||_h(a))&&(l=Ix(t)),n){const m=Hl(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else a&&u();i&&!n&&a&&u();const d=a&&!n&&!i?U4(a,l):Ua(0),f=o.left+l.scrollLeft-c.x-d.x,h=o.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:o.width,height:o.height}}function sg(e){return ya(e).position==="static"}function K2(e,t){if(!Va(e)||ya(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ga(e)===r&&(r=r.ownerDocument.body),r}function q4(e,t){const r=un(e);if(Px(e))return r;if(!Va(e)){let a=Mo(e);for(;a&&!Au(a);){if(va(a)&&!sg(a))return a;a=Mo(a)}return r}let n=K2(e,t);for(;n&&QM(n)&&sg(n);)n=K2(n,t);return n&&Au(n)&&sg(n)&&!lb(n)?r:n||rB(e)||r}const xB=async function(e){const t=this.getOffsetParent||q4,r=this.getDimensions,n=await r(e.floating);return{reference:pB(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function gB(e){return ya(e).direction==="rtl"}const vB={convertOffsetParentRelativeRectToViewportRelativeRect:iB,getDocumentElement:Ga,getClippingRect:hB,getOffsetParent:q4,getElementRects:xB,getClientRects:oB,getDimensions:mB,getScale:eu,isElement:va,isRTL:gB};function z4(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yB(e,t){let r=null,n;const a=Ga(e);function i(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=u;if(l||t(),!h||!m)return;const v=am(f),p=am(a.clientWidth-(d+h)),x=am(a.clientHeight-(f+m)),w=am(d),b={rootMargin:-v+"px "+-p+"px "+-x+"px "+-w+"px",threshold:en(0,Lo(1,c))||1};let N=!0;function C(_){const j=_[0].intersectionRatio;if(j!==c){if(!N)return o();j?o(!1,j):n=setTimeout(()=>{o(!1,1e-7)},1e3)}j===1&&!z4(u,e.getBoundingClientRect())&&o(),N=!1}try{r=new IntersectionObserver(C,{...b,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,b)}r.observe(e)}return o(!0),i}function bB(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=ub(e),d=a||i?[...u?Mf(u):[],...Mf(t)]:[];d.forEach(w=>{a&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});const f=u&&l?yB(u,r):null;let h=-1,m=null;o&&(m=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),r()}),u&&!c&&m.observe(u),m.observe(t));let v,p=c?Hl(e):null;c&&x();function x(){const w=Hl(e);p&&!z4(p,w)&&r(),p=w,v=requestAnimationFrame(x)}return r(),()=>{var w;d.forEach(y=>{a&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),f==null||f(),(w=m)==null||w.disconnect(),m=null,c&&cancelAnimationFrame(v)}}const wB=HM,jB=WM,NB=qM,_B=KM,CB=zM,Y2=$M,SB=GM,EB=(e,t,r)=>{const n=new Map,a={platform:vB,...r},i={...a.platform,_c:n};return UM(e,t,{...a,platform:i})};var kB=typeof document<"u",TB=function(){},Wm=kB?g.useLayoutEffect:TB;function Ep(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Ep(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const i=a[n];if(!(i==="_owner"&&e.$$typeof)&&!Ep(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function V4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function X2(e,t){const r=V4(e);return Math.round(t*r)/r}function ng(e){const t=g.useRef(e);return Wm(()=>{t.current=e}),t}function AB(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=g.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=g.useState(n);Ep(h,n)||m(n);const[v,p]=g.useState(null),[x,w]=g.useState(null),y=g.useCallback(Q=>{Q!==_.current&&(_.current=Q,p(Q))},[]),b=g.useCallback(Q=>{Q!==j.current&&(j.current=Q,w(Q))},[]),N=i||v,C=o||x,_=g.useRef(null),j=g.useRef(null),S=g.useRef(d),k=c!=null,D=ng(c),M=ng(a),T=ng(u),A=g.useCallback(()=>{if(!_.current||!j.current)return;const Q={placement:t,strategy:r,middleware:h};M.current&&(Q.platform=M.current),EB(_.current,j.current,Q).then(O=>{const ne={...O,isPositioned:T.current!==!1};W.current&&!Ep(S.current,ne)&&(S.current=ne,sc.flushSync(()=>{f(ne)}))})},[h,t,r,M,T]);Wm(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(Q=>({...Q,isPositioned:!1})))},[u]);const W=g.useRef(!1);Wm(()=>(W.current=!0,()=>{W.current=!1}),[]),Wm(()=>{if(N&&(_.current=N),C&&(j.current=C),N&&C){if(D.current)return D.current(N,C,A);A()}},[N,C,A,D,k]);const P=g.useMemo(()=>({reference:_,floating:j,setReference:y,setFloating:b}),[y,b]),V=g.useMemo(()=>({reference:N,floating:C}),[N,C]),Z=g.useMemo(()=>{const Q={position:r,left:0,top:0};if(!V.floating)return Q;const O=X2(V.floating,d.x),ne=X2(V.floating,d.y);return l?{...Q,transform:"translate("+O+"px, "+ne+"px)",...V4(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:ne}},[r,l,V.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:A,refs:P,elements:V,floatingStyles:Z}),[d,A,P,V,Z])}const RB=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Y2({element:n.current,padding:a}).fn(r):{}:n?Y2({element:n,padding:a}).fn(r):{}}}},DB=(e,t)=>({...wB(e),options:[e,t]}),OB=(e,t)=>({...jB(e),options:[e,t]}),PB=(e,t)=>({...SB(e),options:[e,t]}),IB=(e,t)=>({...NB(e),options:[e,t]}),FB=(e,t)=>({..._B(e),options:[e,t]}),LB=(e,t)=>({...CB(e),options:[e,t]}),MB=(e,t)=>({...RB(e),options:[e,t]});var BB="Arrow",H4=g.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...i}=e;return s.jsx(ze.svg,{...i,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});H4.displayName=BB;var UB=H4;function fb(e){const[t,r]=g.useState(void 0);return fr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var hb="Popper",[W4,Zu]=Yr(hb),[$B,G4]=W4(hb),K4=e=>{const{__scopePopper:t,children:r}=e,[n,a]=g.useState(null);return s.jsx($B,{scope:t,anchor:n,onAnchorChange:a,children:r})};K4.displayName=hb;var Y4="PopperAnchor",X4=g.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,i=G4(Y4,r),o=g.useRef(null),l=pt(t,o);return g.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:s.jsx(ze.div,{...a,ref:l})});X4.displayName=Y4;var mb="PopperContent",[qB,zB]=W4(mb),Q4=g.forwardRef((e,t)=>{var J,K,ae,te,xe,F;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:v,...p}=e,x=G4(mb,r),[w,y]=g.useState(null),b=pt(t,We=>y(We)),[N,C]=g.useState(null),_=fb(N),j=(_==null?void 0:_.width)??0,S=(_==null?void 0:_.height)??0,k=n+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(u)?u:[u],T=M.length>0,A={padding:D,boundary:M.filter(HB),altBoundary:T},{refs:W,floatingStyles:P,placement:V,isPositioned:Z,middlewareData:Q}=AB({strategy:"fixed",placement:k,whileElementsMounted:(...We)=>bB(...We,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[DB({mainAxis:a+S,alignmentAxis:o}),c&&OB({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?PB():void 0,...A}),c&&IB({...A}),FB({...A,apply:({elements:We,rects:je,availableWidth:Oe,availableHeight:Ne})=>{const{width:ge,height:Me}=je.reference,Xe=We.floating.style;Xe.setProperty("--radix-popper-available-width",`${Oe}px`),Xe.setProperty("--radix-popper-available-height",`${Ne}px`),Xe.setProperty("--radix-popper-anchor-width",`${ge}px`),Xe.setProperty("--radix-popper-anchor-height",`${Me}px`)}}),N&&MB({element:N,padding:l}),WB({arrowWidth:j,arrowHeight:S}),h&&LB({strategy:"referenceHidden",...A})]}),[O,ne]=eT(V),he=dr(v);fr(()=>{Z&&(he==null||he())},[Z,he]);const I=(J=Q.arrow)==null?void 0:J.x,Y=(K=Q.arrow)==null?void 0:K.y,E=((ae=Q.arrow)==null?void 0:ae.centerOffset)!==0,[B,ee]=g.useState();return fr(()=>{w&&ee(window.getComputedStyle(w).zIndex)},[w]),s.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:Z?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B,"--radix-popper-transform-origin":[(te=Q.transformOrigin)==null?void 0:te.x,(xe=Q.transformOrigin)==null?void 0:xe.y].join(" "),...((F=Q.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(qB,{scope:r,placedSide:O,onArrowChange:C,arrowX:I,arrowY:Y,shouldHideArrow:E,children:s.jsx(ze.div,{"data-side":O,"data-align":ne,...p,ref:b,style:{...p.style,animation:Z?void 0:"none"}})})})});Q4.displayName=mb;var J4="PopperArrow",VB={top:"bottom",right:"left",bottom:"top",left:"right"},Z4=g.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,i=zB(J4,n),o=VB[i.placedSide];return s.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:s.jsx(UB,{...a,ref:r,style:{...a.style,display:"block"}})})});Z4.displayName=J4;function HB(e){return e!==null}var WB=e=>({name:"transformOrigin",options:e,fn(t){var x,w,y;const{placement:r,rects:n,middlewareData:a}=t,o=((x=a.arrow)==null?void 0:x.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=eT(r),f={start:"0%",center:"50%",end:"100%"}[d],h=(((w=a.arrow)==null?void 0:w.x)??0)+l/2,m=(((y=a.arrow)==null?void 0:y.y)??0)+c/2;let v="",p="";return u==="bottom"?(v=o?f:`${h}px`,p=`${-c}px`):u==="top"?(v=o?f:`${h}px`,p=`${n.floating.height+c}px`):u==="right"?(v=`${-c}px`,p=o?f:`${m}px`):u==="left"&&(v=`${n.floating.width+c}px`,p=o?f:`${m}px`),{data:{x:v,y:p}}}});function eT(e){const[t,r="center"]=e.split("-");return[t,r]}var pb=K4,xb=X4,gb=Q4,vb=Z4,[Fx]=Yr("Tooltip",[Zu]),Lx=Zu(),tT="TooltipProvider",GB=700,zv="tooltip.open",[KB,yb]=Fx(tT),rT=e=>{const{__scopeTooltip:t,delayDuration:r=GB,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:i}=e,o=g.useRef(!0),l=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(KB,{scope:t,isOpenDelayedRef:o,delayDuration:r,onOpen:g.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(u=>{l.current=u},[]),disableHoverableContent:a,children:i})};rT.displayName=tT;var Bf="Tooltip",[YB,Mx]=Fx(Bf),sT=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:l}=e,c=yb(Bf,e.__scopeTooltip),u=Lx(t),[d,f]=g.useState(null),h=cn(),m=g.useRef(0),v=o??c.disableHoverableContent,p=l??c.delayDuration,x=g.useRef(!1),[w,y]=fn({prop:n,defaultProp:a??!1,onChange:j=>{j?(c.onOpen(),document.dispatchEvent(new CustomEvent(zv))):c.onClose(),i==null||i(j)},caller:Bf}),b=g.useMemo(()=>w?x.current?"delayed-open":"instant-open":"closed",[w]),N=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,y(!0)},[y]),C=g.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),_=g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,y(!0),m.current=0},p)},[p,y]);return g.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(pb,{...u,children:s.jsx(YB,{scope:t,contentId:h,open:w,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?_():N()},[c.isOpenDelayedRef,_,N]),onTriggerLeave:g.useCallback(()=>{v?C():(window.clearTimeout(m.current),m.current=0)},[C,v]),onOpen:N,onClose:C,disableHoverableContent:v,children:r})})};sT.displayName=Bf;var Vv="TooltipTrigger",nT=g.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=Mx(Vv,r),i=yb(Vv,r),o=Lx(r),l=g.useRef(null),c=pt(t,l,a.onTriggerChange),u=g.useRef(!1),d=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),s.jsx(xb,{asChild:!0,...o,children:s.jsx(ze.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:c,onPointerMove:ke(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:ke(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:ke(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ke(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:ke(e.onBlur,a.onClose),onClick:ke(e.onClick,a.onClose)})})});nT.displayName=Vv;var XB="TooltipPortal",[ble,QB]=Fx(XB,{forceMount:void 0}),Ru="TooltipContent",aT=g.forwardRef((e,t)=>{const r=QB(Ru,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...i}=e,o=Mx(Ru,e.__scopeTooltip);return s.jsx(Xr,{present:n||o.open,children:o.disableHoverableContent?s.jsx(iT,{side:a,...i,ref:t}):s.jsx(JB,{side:a,...i,ref:t})})}),JB=g.forwardRef((e,t)=>{const r=Mx(Ru,e.__scopeTooltip),n=yb(Ru,e.__scopeTooltip),a=g.useRef(null),i=pt(t,a),[o,l]=g.useState(null),{trigger:c,onClose:u}=r,d=a.current,{onPointerInTransitChange:f}=n,h=g.useCallback(()=>{l(null),f(!1)},[f]),m=g.useCallback((v,p)=>{const x=v.currentTarget,w={x:v.clientX,y:v.clientY},y=s9(w,x.getBoundingClientRect()),b=n9(w,y),N=a9(p.getBoundingClientRect()),C=o9([...b,...N]);l(C),f(!0)},[f]);return g.useEffect(()=>()=>h(),[h]),g.useEffect(()=>{if(c&&d){const v=x=>m(x,d),p=x=>m(x,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",p)}}},[c,d,m,h]),g.useEffect(()=>{if(o){const v=p=>{const x=p.target,w={x:p.clientX,y:p.clientY},y=(c==null?void 0:c.contains(x))||(d==null?void 0:d.contains(x)),b=!i9(w,o);y?h():b&&(h(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,o,u,h]),s.jsx(iT,{...e,ref:i})}),[ZB,e9]=Fx(Bf,{isInside:!1}),t9=MF("TooltipContent"),iT=g.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=Mx(Ru,r),u=Lx(r),{onClose:d}=c;return g.useEffect(()=>(document.addEventListener(zv,d),()=>document.removeEventListener(zv,d)),[d]),g.useEffect(()=>{if(c.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),s.jsx(Wu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:s.jsxs(gb,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(t9,{children:n}),s.jsx(ZB,{scope:r,isInside:!0,children:s.jsx(i8,{id:c.contentId,role:"tooltip",children:a||n})})]})})});aT.displayName=Ru;var oT="TooltipArrow",r9=g.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,a=Lx(r);return e9(oT,r).isInside?null:s.jsx(vb,{...a,...n,ref:t})});r9.displayName=oT;function s9(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function n9(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function a9(e){const{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function i9(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,f=c.x,h=c.y;d>n!=h>n&&r<(f-u)*(n-d)/(h-d)+u&&(a=!a)}return a}function o9(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),l9(t)}function l9(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const a=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const a=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var c9=rT,u9=sT,d9=nT,lT=aT;const f9=c9,h9=u9,m9=d9,cT=g.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(lT,{ref:n,sideOffset:t,className:Pe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));cT.displayName=lT.displayName;var ed=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wl=typeof window>"u"||"Deno"in globalThis;function _s(){}function p9(e,t){return typeof e=="function"?e(t):e}function Hv(e){return typeof e=="number"&&e>=0&&e!==1/0}function uT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Eo(e,t){return typeof e=="function"?e(t):e}function jn(e,t){return typeof e=="function"?e(t):e}function Q2(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;if(o){if(n){if(t.queryHash!==bb(o,t.options))return!1}else if(!Uf(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function J2(e,t){const{exact:r,status:n,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Gl(t.options.mutationKey)!==Gl(i))return!1}else if(!Uf(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function bb(e,t){return((t==null?void 0:t.queryKeyHashFn)||Gl)(e)}function Gl(e){return JSON.stringify(e,(t,r)=>Wv(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function Uf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Uf(e[r],t[r])):!1}function dT(e,t){if(e===t)return e;const r=Z2(e)&&Z2(t);if(r||Wv(e)&&Wv(t)){const n=r?e:Object.keys(e),a=n.length,i=r?t:Object.keys(t),o=i.length,l=r?[]:{},c=new Set(n);let u=0;for(let d=0;d<o;d++){const f=r?d:i[d];(!r&&c.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(l[f]=void 0,u++):(l[f]=dT(e[f],t[f]),l[f]===e[f]&&e[f]!==void 0&&u++)}return a===o&&u===a?e:l}return t}function kp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Z2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Wv(e){if(!eN(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!eN(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function eN(e){return Object.prototype.toString.call(e)==="[object Object]"}function x9(e){return new Promise(t=>{setTimeout(t,e)})}function Gv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?dT(e,t):t}function g9(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function v9(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var wb=Symbol();function fT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===wb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hT(e,t){return typeof e=="function"?e(...t):!!e}var yl,ro,ou,xS,y9=(xS=class extends ed{constructor(){super();et(this,yl);et(this,ro);et(this,ou);$e(this,ou,t=>{if(!Wl&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){X(this,ro)||this.setEventListener(X(this,ou))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,ro))==null||t.call(this),$e(this,ro,void 0))}setEventListener(t){var r;$e(this,ou,t),(r=X(this,ro))==null||r.call(this),$e(this,ro,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){X(this,yl)!==t&&($e(this,yl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof X(this,yl)=="boolean"?X(this,yl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},yl=new WeakMap,ro=new WeakMap,ou=new WeakMap,xS),jb=new y9,lu,so,cu,gS,b9=(gS=class extends ed{constructor(){super();et(this,lu,!0);et(this,so);et(this,cu);$e(this,cu,t=>{if(!Wl&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){X(this,so)||this.setEventListener(X(this,cu))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,so))==null||t.call(this),$e(this,so,void 0))}setEventListener(t){var r;$e(this,cu,t),(r=X(this,so))==null||r.call(this),$e(this,so,t(this.setOnline.bind(this)))}setOnline(t){X(this,lu)!==t&&($e(this,lu,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return X(this,lu)}},lu=new WeakMap,so=new WeakMap,cu=new WeakMap,gS),Tp=new b9;function Kv(){let e,t;const r=new Promise((a,i)=>{e=a,t=i});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}function w9(e){return Math.min(1e3*2**e,3e4)}function mT(e){return(e??"online")==="online"?Tp.isOnline():!0}var pT=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ag(e){return e instanceof pT}function xT(e){let t=!1,r=0,n=!1,a;const i=Kv(),o=p=>{var x;n||(h(new pT(p)),(x=e.abort)==null||x.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>jb.isFocused()&&(e.networkMode==="always"||Tp.isOnline())&&e.canRun(),d=()=>mT(e.networkMode)&&e.canRun(),f=p=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,p),a==null||a(),i.resolve(p))},h=p=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,p),a==null||a(),i.reject(p))},m=()=>new Promise(p=>{var x;a=w=>{(n||u())&&p(w)},(x=e.onPause)==null||x.call(e)}).then(()=>{var p;a=void 0,n||(p=e.onContinue)==null||p.call(e)}),v=()=>{if(n)return;let p;const x=r===0?e.initialPromise:void 0;try{p=x??e.fn()}catch(w){p=Promise.reject(w)}Promise.resolve(p).then(f).catch(w=>{var _;if(n)return;const y=e.retry??(Wl?0:3),b=e.retryDelay??w9,N=typeof b=="function"?b(r,w):b,C=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,w);if(t||!C){h(w);return}r++,(_=e.onFail)==null||_.call(e,r,w),x9(N).then(()=>u()?void 0:m()).then(()=>{t?h(w):v()})})};return{promise:i,cancel:o,continue:()=>(a==null||a(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?v():m().then(v),i)}}var j9=e=>setTimeout(e,0);function N9(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=j9;const i=l=>{t?e.push(l):a(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var Fr=N9(),bl,vS,gT=(vS=class{constructor(){et(this,bl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hv(this.gcTime)&&$e(this,bl,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wl?1/0:5*60*1e3))}clearGcTimeout(){X(this,bl)&&(clearTimeout(X(this,bl)),$e(this,bl,void 0))}},bl=new WeakMap,vS),uu,wl,wn,jl,cs,uh,Nl,Qn,ri,yS,_9=(yS=class extends gT{constructor(t){super();et(this,Qn);et(this,uu);et(this,wl);et(this,wn);et(this,jl);et(this,cs);et(this,uh);et(this,Nl);$e(this,Nl,!1),$e(this,uh,t.defaultOptions),this.setOptions(t.options),this.observers=[],$e(this,jl,t.client),$e(this,wn,X(this,jl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$e(this,uu,C9(this.options)),this.state=t.state??X(this,uu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=X(this,cs))==null?void 0:t.promise}setOptions(t){this.options={...X(this,uh),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,wn).remove(this)}setData(t,r){const n=Gv(this.state.data,t,this.options);return bt(this,Qn,ri).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){bt(this,Qn,ri).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,a;const r=(n=X(this,cs))==null?void 0:n.promise;return(a=X(this,cs))==null||a.cancel(t),r?r.then(_s).catch(_s):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,uu))}isActive(){return this.observers.some(t=>jn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Eo(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!uT(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=X(this,cs))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=X(this,cs))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),X(this,wn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(X(this,cs)&&(X(this,Nl)?X(this,cs).cancel({revert:!0}):X(this,cs).cancelRetry()),this.scheduleGc()),X(this,wn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||bt(this,Qn,ri).call(this,{type:"invalidate"})}fetch(t,r){var u,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(X(this,cs))return X(this,cs).continueRetry(),X(this,cs).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,a=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>($e(this,Nl,!0),n.signal)})},i=()=>{const h=fT(this.options,r),v=(()=>{const p={client:X(this,jl),queryKey:this.queryKey,meta:this.meta};return a(p),p})();return $e(this,Nl,!1),this.options.persister?this.options.persister(h,v,this):h(v)},l=(()=>{const h={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:X(this,jl),state:this.state,fetchFn:i};return a(h),h})();(u=this.options.behavior)==null||u.onFetch(l,this),$e(this,wl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&bt(this,Qn,ri).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta});const c=h=>{var m,v,p,x;ag(h)&&h.silent||bt(this,Qn,ri).call(this,{type:"error",error:h}),ag(h)||((v=(m=X(this,wn).config).onError)==null||v.call(m,h,this),(x=(p=X(this,wn).config).onSettled)==null||x.call(p,this.state.data,h,this)),this.scheduleGc()};return $e(this,cs,xT({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var m,v,p,x;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(w){c(w);return}(v=(m=X(this,wn).config).onSuccess)==null||v.call(m,h,this),(x=(p=X(this,wn).config).onSettled)==null||x.call(p,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,m)=>{bt(this,Qn,ri).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{bt(this,Qn,ri).call(this,{type:"pause"})},onContinue:()=>{bt(this,Qn,ri).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),X(this,cs).start()}},uu=new WeakMap,wl=new WeakMap,wn=new WeakMap,jl=new WeakMap,cs=new WeakMap,uh=new WeakMap,Nl=new WeakMap,Qn=new WeakSet,ri=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...vT(n.data,this.options),fetchMeta:t.meta??null};case"success":return $e(this,wl,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return ag(a)&&a.revert&&X(this,wl)?{...X(this,wl),fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Fr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),X(this,wn).notify({query:this,type:"updated",action:t})})},yS);function vT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function C9(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Aa,bS,S9=(bS=class extends ed{constructor(t={}){super();et(this,Aa);this.config=t,$e(this,Aa,new Map)}build(t,r,n){const a=r.queryKey,i=r.queryHash??bb(a,r);let o=this.get(i);return o||(o=new _9({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){X(this,Aa).has(t.queryHash)||(X(this,Aa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=X(this,Aa).get(t.queryHash);r&&(t.destroy(),r===t&&X(this,Aa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Fr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return X(this,Aa).get(t)}getAll(){return[...X(this,Aa).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Q2(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Q2(t,n)):r}notify(t){Fr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Fr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Fr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Aa=new WeakMap,bS),Ra,ws,_l,Da,Gi,wS,E9=(wS=class extends gT{constructor(t){super();et(this,Da);et(this,Ra);et(this,ws);et(this,_l);this.mutationId=t.mutationId,$e(this,ws,t.mutationCache),$e(this,Ra,[]),this.state=t.state||yT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){X(this,Ra).includes(t)||(X(this,Ra).push(t),this.clearGcTimeout(),X(this,ws).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$e(this,Ra,X(this,Ra).filter(r=>r!==t)),this.scheduleGc(),X(this,ws).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){X(this,Ra).length||(this.state.status==="pending"?this.scheduleGc():X(this,ws).remove(this))}continue(){var t;return((t=X(this,_l))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,l,c,u,d,f,h,m,v,p,x,w,y,b,N,C,_,j,S;const r=()=>{bt(this,Da,Gi).call(this,{type:"continue"})};$e(this,_l,xT({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,D)=>{bt(this,Da,Gi).call(this,{type:"failed",failureCount:k,error:D})},onPause:()=>{bt(this,Da,Gi).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,ws).canRun(this)}));const n=this.state.status==="pending",a=!X(this,_l).canStart();try{if(n)r();else{bt(this,Da,Gi).call(this,{type:"pending",variables:t,isPaused:a}),await((o=(i=X(this,ws).config).onMutate)==null?void 0:o.call(i,t,this));const D=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));D!==this.state.context&&bt(this,Da,Gi).call(this,{type:"pending",context:D,variables:t,isPaused:a})}const k=await X(this,_l).start();return await((d=(u=X(this,ws).config).onSuccess)==null?void 0:d.call(u,k,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,k,t,this.state.context)),await((v=(m=X(this,ws).config).onSettled)==null?void 0:v.call(m,k,null,this.state.variables,this.state.context,this)),await((x=(p=this.options).onSettled)==null?void 0:x.call(p,k,null,t,this.state.context)),bt(this,Da,Gi).call(this,{type:"success",data:k}),k}catch(k){try{throw await((y=(w=X(this,ws).config).onError)==null?void 0:y.call(w,k,t,this.state.context,this)),await((N=(b=this.options).onError)==null?void 0:N.call(b,k,t,this.state.context)),await((_=(C=X(this,ws).config).onSettled)==null?void 0:_.call(C,void 0,k,this.state.variables,this.state.context,this)),await((S=(j=this.options).onSettled)==null?void 0:S.call(j,void 0,k,t,this.state.context)),k}finally{bt(this,Da,Gi).call(this,{type:"error",error:k})}}finally{X(this,ws).runNext(this)}}},Ra=new WeakMap,ws=new WeakMap,_l=new WeakMap,Da=new WeakSet,Gi=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Fr.batch(()=>{X(this,Ra).forEach(n=>{n.onMutationUpdate(t)}),X(this,ws).notify({mutation:this,type:"updated",action:t})})},wS);function yT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ii,Jn,dh,jS,k9=(jS=class extends ed{constructor(t={}){super();et(this,ii);et(this,Jn);et(this,dh);this.config=t,$e(this,ii,new Set),$e(this,Jn,new Map),$e(this,dh,0)}build(t,r,n){const a=new E9({mutationCache:this,mutationId:++Mh(this,dh)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){X(this,ii).add(t);const r=im(t);if(typeof r=="string"){const n=X(this,Jn).get(r);n?n.push(t):X(this,Jn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(X(this,ii).delete(t)){const r=im(t);if(typeof r=="string"){const n=X(this,Jn).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&X(this,Jn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=im(t);if(typeof r=="string"){const n=X(this,Jn).get(r),a=n==null?void 0:n.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=im(t);if(typeof r=="string"){const a=(n=X(this,Jn).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Fr.batch(()=>{X(this,ii).forEach(t=>{this.notify({type:"removed",mutation:t})}),X(this,ii).clear(),X(this,Jn).clear()})}getAll(){return Array.from(X(this,ii))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>J2(r,n))}findAll(t={}){return this.getAll().filter(r=>J2(t,r))}notify(t){Fr.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Fr.batch(()=>Promise.all(t.map(r=>r.continue().catch(_s))))}},ii=new WeakMap,Jn=new WeakMap,dh=new WeakMap,jS);function im(e){var t;return(t=e.options.scope)==null?void 0:t.id}function tN(e){return{onFetch:(t,r)=>{var d,f,h,m,v;const n=t.options,a=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let p=!1;const x=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},w=fT(t.options,t.fetchOptions),y=async(b,N,C)=>{if(p)return Promise.reject();if(N==null&&b.pages.length)return Promise.resolve(b);const j=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:N,direction:C?"backward":"forward",meta:t.options.meta};return x(M),M})(),S=await w(j),{maxPages:k}=t.options,D=C?v9:g9;return{pages:D(b.pages,S,k),pageParams:D(b.pageParams,N,k)}};if(a&&i.length){const b=a==="backward",N=b?T9:rN,C={pages:i,pageParams:o},_=N(n,C);l=await y(C,_,b)}else{const b=e??i.length;do{const N=c===0?o[0]??n.initialPageParam:rN(n,l);if(c>0&&N==null)break;l=await y(l,N),c++}while(c<b)}return l};t.options.persister?t.fetchFn=()=>{var p,x;return(x=(p=t.options).persister)==null?void 0:x.call(p,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function rN(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function T9(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var lr,no,ao,du,fu,io,hu,mu,NS,A9=(NS=class{constructor(e={}){et(this,lr);et(this,no);et(this,ao);et(this,du);et(this,fu);et(this,io);et(this,hu);et(this,mu);$e(this,lr,e.queryCache||new S9),$e(this,no,e.mutationCache||new k9),$e(this,ao,e.defaultOptions||{}),$e(this,du,new Map),$e(this,fu,new Map),$e(this,io,0)}mount(){Mh(this,io)._++,X(this,io)===1&&($e(this,hu,jb.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,lr).onFocus())})),$e(this,mu,Tp.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,lr).onOnline())})))}unmount(){var e,t;Mh(this,io)._--,X(this,io)===0&&((e=X(this,hu))==null||e.call(this),$e(this,hu,void 0),(t=X(this,mu))==null||t.call(this),$e(this,mu,void 0))}isFetching(e){return X(this,lr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return X(this,no).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=X(this,lr).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=X(this,lr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Eo(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return X(this,lr).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=X(this,lr).get(n.queryHash),i=a==null?void 0:a.state.data,o=p9(t,i);if(o!==void 0)return X(this,lr).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Fr.batch(()=>X(this,lr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=X(this,lr).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=X(this,lr);Fr.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=X(this,lr);return Fr.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Fr.batch(()=>X(this,lr).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(_s).catch(_s)}invalidateQueries(e,t={}){return Fr.batch(()=>(X(this,lr).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Fr.batch(()=>X(this,lr).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,r);return r.throwOnError||(i=i.catch(_s)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(_s)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=X(this,lr).build(this,t);return r.isStaleByTime(Eo(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_s).catch(_s)}fetchInfiniteQuery(e){return e.behavior=tN(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_s).catch(_s)}ensureInfiniteQueryData(e){return e.behavior=tN(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Tp.isOnline()?X(this,no).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,lr)}getMutationCache(){return X(this,no)}getDefaultOptions(){return X(this,ao)}setDefaultOptions(e){$e(this,ao,e)}setQueryDefaults(e,t){X(this,du).set(Gl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...X(this,du).values()],r={};return t.forEach(n=>{Uf(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){X(this,fu).set(Gl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...X(this,fu).values()],r={};return t.forEach(n=>{Uf(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...X(this,ao).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=bb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===wb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...X(this,ao).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){X(this,lr).clear(),X(this,no).clear()}},lr=new WeakMap,no=new WeakMap,ao=new WeakMap,du=new WeakMap,fu=new WeakMap,io=new WeakMap,hu=new WeakMap,mu=new WeakMap,NS),Is,Ct,fh,js,Cl,pu,oo,lo,hh,xu,gu,Sl,El,co,vu,Lt,Id,Yv,Xv,Qv,Jv,Zv,e1,t1,bT,_S,R9=(_S=class extends ed{constructor(t,r){super();et(this,Lt);et(this,Is);et(this,Ct);et(this,fh);et(this,js);et(this,Cl);et(this,pu);et(this,oo);et(this,lo);et(this,hh);et(this,xu);et(this,gu);et(this,Sl);et(this,El);et(this,co);et(this,vu,new Set);this.options=r,$e(this,Is,t),$e(this,lo,null),$e(this,oo,Kv()),this.options.experimental_prefetchInRender||X(this,oo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(X(this,Ct).addObserver(this),sN(X(this,Ct),this.options)?bt(this,Lt,Id).call(this):this.updateResult(),bt(this,Lt,Jv).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return r1(X(this,Ct),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return r1(X(this,Ct),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,bt(this,Lt,Zv).call(this),bt(this,Lt,e1).call(this),X(this,Ct).removeObserver(this)}setOptions(t){const r=this.options,n=X(this,Ct);if(this.options=X(this,Is).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof jn(this.options.enabled,X(this,Ct))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");bt(this,Lt,t1).call(this),X(this,Ct).setOptions(this.options),r._defaulted&&!kp(this.options,r)&&X(this,Is).getQueryCache().notify({type:"observerOptionsUpdated",query:X(this,Ct),observer:this});const a=this.hasListeners();a&&nN(X(this,Ct),n,this.options,r)&&bt(this,Lt,Id).call(this),this.updateResult(),a&&(X(this,Ct)!==n||jn(this.options.enabled,X(this,Ct))!==jn(r.enabled,X(this,Ct))||Eo(this.options.staleTime,X(this,Ct))!==Eo(r.staleTime,X(this,Ct)))&&bt(this,Lt,Yv).call(this);const i=bt(this,Lt,Xv).call(this);a&&(X(this,Ct)!==n||jn(this.options.enabled,X(this,Ct))!==jn(r.enabled,X(this,Ct))||i!==X(this,co))&&bt(this,Lt,Qv).call(this,i)}getOptimisticResult(t){const r=X(this,Is).getQueryCache().build(X(this,Is),t),n=this.createResult(r,t);return O9(this,n)&&($e(this,js,n),$e(this,pu,this.options),$e(this,Cl,X(this,Ct).state)),n}getCurrentResult(){return X(this,js)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),Reflect.get(n,a))})}trackProp(t){X(this,vu).add(t)}getCurrentQuery(){return X(this,Ct)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=X(this,Is).defaultQueryOptions(t),n=X(this,Is).getQueryCache().build(X(this,Is),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return bt(this,Lt,Id).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),X(this,js)))}createResult(t,r){var k;const n=X(this,Ct),a=this.options,i=X(this,js),o=X(this,Cl),l=X(this,pu),u=t!==n?t.state:X(this,fh),{state:d}=t;let f={...d},h=!1,m;if(r._optimisticResults){const D=this.hasListeners(),M=!D&&sN(t,r),T=D&&nN(t,n,r,a);(M||T)&&(f={...f,...vT(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:p,status:x}=f;m=f.data;let w=!1;if(r.placeholderData!==void 0&&m===void 0&&x==="pending"){let D;i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(D=i.data,w=!0):D=typeof r.placeholderData=="function"?r.placeholderData((k=X(this,gu))==null?void 0:k.state.data,X(this,gu)):r.placeholderData,D!==void 0&&(x="success",m=Gv(i==null?void 0:i.data,D,r),h=!0)}if(r.select&&m!==void 0&&!w)if(i&&m===(o==null?void 0:o.data)&&r.select===X(this,hh))m=X(this,xu);else try{$e(this,hh,r.select),m=r.select(m),m=Gv(i==null?void 0:i.data,m,r),$e(this,xu,m),$e(this,lo,null)}catch(D){$e(this,lo,D)}X(this,lo)&&(v=X(this,lo),m=X(this,xu),p=Date.now(),x="error");const y=f.fetchStatus==="fetching",b=x==="pending",N=x==="error",C=b&&y,_=m!==void 0,S={status:x,fetchStatus:f.fetchStatus,isPending:b,isSuccess:x==="success",isError:N,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:p,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:N&&!_,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:N&&_,isStale:Nb(t,r),refetch:this.refetch,promise:X(this,oo),isEnabled:jn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=A=>{S.status==="error"?A.reject(S.error):S.data!==void 0&&A.resolve(S.data)},M=()=>{const A=$e(this,oo,S.promise=Kv());D(A)},T=X(this,oo);switch(T.status){case"pending":t.queryHash===n.queryHash&&D(T);break;case"fulfilled":(S.status==="error"||S.data!==T.value)&&M();break;case"rejected":(S.status!=="error"||S.error!==T.reason)&&M();break}}return S}updateResult(){const t=X(this,js),r=this.createResult(X(this,Ct),this.options);if($e(this,Cl,X(this,Ct).state),$e(this,pu,this.options),X(this,Cl).data!==void 0&&$e(this,gu,X(this,Ct)),kp(r,t))return;$e(this,js,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!X(this,vu).size)return!0;const o=new Set(i??X(this,vu));return this.options.throwOnError&&o.add("error"),Object.keys(X(this,js)).some(l=>{const c=l;return X(this,js)[c]!==t[c]&&o.has(c)})};bt(this,Lt,bT).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&bt(this,Lt,Jv).call(this)}},Is=new WeakMap,Ct=new WeakMap,fh=new WeakMap,js=new WeakMap,Cl=new WeakMap,pu=new WeakMap,oo=new WeakMap,lo=new WeakMap,hh=new WeakMap,xu=new WeakMap,gu=new WeakMap,Sl=new WeakMap,El=new WeakMap,co=new WeakMap,vu=new WeakMap,Lt=new WeakSet,Id=function(t){bt(this,Lt,t1).call(this);let r=X(this,Ct).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(_s)),r},Yv=function(){bt(this,Lt,Zv).call(this);const t=Eo(this.options.staleTime,X(this,Ct));if(Wl||X(this,js).isStale||!Hv(t))return;const n=uT(X(this,js).dataUpdatedAt,t)+1;$e(this,Sl,setTimeout(()=>{X(this,js).isStale||this.updateResult()},n))},Xv=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(X(this,Ct)):this.options.refetchInterval)??!1},Qv=function(t){bt(this,Lt,e1).call(this),$e(this,co,t),!(Wl||jn(this.options.enabled,X(this,Ct))===!1||!Hv(X(this,co))||X(this,co)===0)&&$e(this,El,setInterval(()=>{(this.options.refetchIntervalInBackground||jb.isFocused())&&bt(this,Lt,Id).call(this)},X(this,co)))},Jv=function(){bt(this,Lt,Yv).call(this),bt(this,Lt,Qv).call(this,bt(this,Lt,Xv).call(this))},Zv=function(){X(this,Sl)&&(clearTimeout(X(this,Sl)),$e(this,Sl,void 0))},e1=function(){X(this,El)&&(clearInterval(X(this,El)),$e(this,El,void 0))},t1=function(){const t=X(this,Is).getQueryCache().build(X(this,Is),this.options);if(t===X(this,Ct))return;const r=X(this,Ct);$e(this,Ct,t),$e(this,fh,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},bT=function(t){Fr.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(X(this,js))}),X(this,Is).getQueryCache().notify({query:X(this,Ct),type:"observerResultsUpdated"})})},_S);function D9(e,t){return jn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function sN(e,t){return D9(e,t)||e.state.data!==void 0&&r1(e,t,t.refetchOnMount)}function r1(e,t,r){if(jn(t.enabled,e)!==!1&&Eo(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Nb(e,t)}return!1}function nN(e,t,r,n){return(e!==t||jn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Nb(e,r)}function Nb(e,t){return jn(t.enabled,e)!==!1&&e.isStaleByTime(Eo(t.staleTime,e))}function O9(e,t){return!kp(e.getCurrentResult(),t)}var uo,fo,Fs,oi,vi,Gm,s1,CS,P9=(CS=class extends ed{constructor(r,n){super();et(this,vi);et(this,uo);et(this,fo);et(this,Fs);et(this,oi);$e(this,uo,r),this.setOptions(n),this.bindMethods(),bt(this,vi,Gm).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var a;const n=this.options;this.options=X(this,uo).defaultMutationOptions(r),kp(this.options,n)||X(this,uo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:X(this,Fs),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Gl(n.mutationKey)!==Gl(this.options.mutationKey)?this.reset():((a=X(this,Fs))==null?void 0:a.state.status)==="pending"&&X(this,Fs).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=X(this,Fs))==null||r.removeObserver(this)}onMutationUpdate(r){bt(this,vi,Gm).call(this),bt(this,vi,s1).call(this,r)}getCurrentResult(){return X(this,fo)}reset(){var r;(r=X(this,Fs))==null||r.removeObserver(this),$e(this,Fs,void 0),bt(this,vi,Gm).call(this),bt(this,vi,s1).call(this)}mutate(r,n){var a;return $e(this,oi,n),(a=X(this,Fs))==null||a.removeObserver(this),$e(this,Fs,X(this,uo).getMutationCache().build(X(this,uo),this.options)),X(this,Fs).addObserver(this),X(this,Fs).execute(r)}},uo=new WeakMap,fo=new WeakMap,Fs=new WeakMap,oi=new WeakMap,vi=new WeakSet,Gm=function(){var n;const r=((n=X(this,Fs))==null?void 0:n.state)??yT();$e(this,fo,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},s1=function(r){Fr.batch(()=>{var n,a,i,o,l,c,u,d;if(X(this,oi)&&this.hasListeners()){const f=X(this,fo).variables,h=X(this,fo).context;(r==null?void 0:r.type)==="success"?((a=(n=X(this,oi)).onSuccess)==null||a.call(n,r.data,f,h),(o=(i=X(this,oi)).onSettled)==null||o.call(i,r.data,null,f,h)):(r==null?void 0:r.type)==="error"&&((c=(l=X(this,oi)).onError)==null||c.call(l,r.error,f,h),(d=(u=X(this,oi)).onSettled)==null||d.call(u,void 0,r.error,f,h))}this.listeners.forEach(f=>{f(X(this,fo))})})},CS),wT=g.createContext(void 0),Ch=e=>{const t=g.useContext(wT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},I9=({client:e,children:t})=>(g.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(wT.Provider,{value:e,children:t})),jT=g.createContext(!1),F9=()=>g.useContext(jT);jT.Provider;function L9(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var M9=g.createContext(L9()),B9=()=>g.useContext(M9),U9=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},$9=e=>{g.useEffect(()=>{e.clearReset()},[e])},q9=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||hT(r,[e.error,n])),z9=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},V9=(e,t)=>e.isLoading&&e.isFetching&&!t,H9=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,aN=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function W9(e,t,r){var f,h,m,v,p;const n=F9(),a=B9(),i=Ch(),o=i.defaultQueryOptions(e);(h=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,o),o._optimisticResults=n?"isRestoring":"optimistic",z9(o),U9(o,a),$9(a);const l=!i.getQueryCache().get(o.queryHash),[c]=g.useState(()=>new t(i,o)),u=c.getOptimisticResult(o),d=!n&&e.subscribed!==!1;if(g.useSyncExternalStore(g.useCallback(x=>{const w=d?c.subscribe(Fr.batchCalls(x)):_s;return c.updateResult(),w},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),g.useEffect(()=>{c.setOptions(o)},[o,c]),H9(o,u))throw aN(o,c,a);if(q9({result:u,errorResetBoundary:a,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((v=(m=i.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||v.call(m,o,u),o.experimental_prefetchInRender&&!Wl&&V9(u,n)){const x=l?aN(o,c,a):(p=i.getQueryCache().get(o.queryHash))==null?void 0:p.promise;x==null||x.catch(_s).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function Vr(e,t){return W9(e,R9)}function _b(e,t){const r=Ch(),[n]=g.useState(()=>new P9(r,e));g.useEffect(()=>{n.setOptions(e)},[n,e]);const a=g.useSyncExternalStore(g.useCallback(o=>n.subscribe(Fr.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=g.useCallback((o,l)=>{n.mutate(o,l).catch(_s)},[n]);if(a.error&&hT(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}/**
 * @remix-run/router v1.23.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function $f(){return $f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$f.apply(this,arguments)}var po;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(po||(po={}));const iN="popstate";function G9(e){e===void 0&&(e={});function t(n,a){let{pathname:i,search:o,hash:l}=n.location;return n1("",{pathname:i,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Ap(a)}return Y9(t,r,null,e)}function gr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function NT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function K9(){return Math.random().toString(36).substr(2,8)}function oN(e,t){return{usr:e.state,key:e.key,idx:t}}function n1(e,t,r,n){return r===void 0&&(r=null),$f({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?td(t):t,{state:r,key:t&&t.key||n||K9()})}function Ap(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function td(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Y9(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,l=po.Pop,c=null,u=d();u==null&&(u=0,o.replaceState($f({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){l=po.Pop;let x=d(),w=x==null?null:x-u;u=x,c&&c({action:l,location:p.location,delta:w})}function h(x,w){l=po.Push;let y=n1(p.location,x,w);u=d()+1;let b=oN(y,u),N=p.createHref(y);try{o.pushState(b,"",N)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(N)}i&&c&&c({action:l,location:p.location,delta:1})}function m(x,w){l=po.Replace;let y=n1(p.location,x,w);u=d();let b=oN(y,u),N=p.createHref(y);o.replaceState(b,"",N),i&&c&&c({action:l,location:p.location,delta:0})}function v(x){let w=a.location.origin!=="null"?a.location.origin:a.location.href,y=typeof x=="string"?x:Ap(x);return y=y.replace(/ $/,"%20"),gr(w,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,w)}let p={get action(){return l},get location(){return e(a,o)},listen(x){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(iN,f),c=x,()=>{a.removeEventListener(iN,f),c=null}},createHref(x){return t(a,x)},createURL:v,encodeLocation(x){let w=v(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:m,go(x){return o.go(x)}};return p}var lN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(lN||(lN={}));function X9(e,t,r){return r===void 0&&(r="/"),Q9(e,t,r)}function Q9(e,t,r,n){let a=typeof t=="string"?td(t):t,i=Cb(a.pathname||"/",r);if(i==null)return null;let o=_T(e);J9(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=u7(i);l=o7(o[c],u)}return l}function _T(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(gr(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=ko([n,c.relativePath]),d=r.concat(c);i.children&&i.children.length>0&&(gr(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),_T(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:a7(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))a(i,o);else for(let c of CT(i.path))a(i,o,c)}),t}function CT(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=CT(n.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function J9(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:i7(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Z9=/^:[\w-]+$/,e7=3,t7=2,r7=1,s7=10,n7=-2,cN=e=>e==="*";function a7(e,t){let r=e.split("/"),n=r.length;return r.some(cN)&&(n+=n7),t&&(n+=t7),r.filter(a=>!cN(a)).reduce((a,i)=>a+(Z9.test(i)?e7:i===""?r7:s7),n)}function i7(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function o7(e,t,r){let{routesMeta:n}=e,a={},i="/",o=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=l7({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f)return null;Object.assign(a,f.params),o.push({params:a,pathname:ko([i,f.pathname]),pathnameBase:m7(ko([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=ko([i,f.pathnameBase]))}return o}function l7(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=c7(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,d,f)=>{let{paramName:h,isOptional:m}=d;if(h==="*"){let p=l[f]||"";o=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const v=l[f];return m&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function c7(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),NT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function u7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return NT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Cb(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function d7(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?td(e):e;return{pathname:r?r.startsWith("/")?r:f7(r,t):t,search:p7(n),hash:x7(a)}}function f7(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function ig(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function h7(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Sb(e,t){let r=h7(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Eb(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=td(e):(a=$f({},e),gr(!a.pathname||!a.pathname.includes("?"),ig("?","pathname","search",a)),gr(!a.pathname||!a.pathname.includes("#"),ig("#","pathname","hash",a)),gr(!a.search||!a.search.includes("#"),ig("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;a.pathname=h.join("/")}l=f>=0?t[f]:"/"}let c=d7(a,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ko=e=>e.join("/").replace(/\/\/+/g,"/"),m7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),p7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,x7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function g7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ST=["post","put","patch","delete"];new Set(ST);const v7=["get",...ST];new Set(v7);/**
 * React Router v6.30.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function qf(){return qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qf.apply(this,arguments)}const kb=g.createContext(null),y7=g.createContext(null),Yo=g.createContext(null),Bx=g.createContext(null),Di=g.createContext({outlet:null,matches:[],isDataRoute:!1}),ET=g.createContext(null);function b7(e,t){let{relative:r}=t===void 0?{}:t;rd()||gr(!1);let{basename:n,navigator:a}=g.useContext(Yo),{hash:i,pathname:o,search:l}=TT(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:ko([n,o])),a.createHref({pathname:c,search:l,hash:i})}function rd(){return g.useContext(Bx)!=null}function Oi(){return rd()||gr(!1),g.useContext(Bx).location}function kT(e){g.useContext(Yo).static||g.useLayoutEffect(e)}function wa(){let{isDataRoute:e}=g.useContext(Di);return e?O7():w7()}function w7(){rd()||gr(!1);let e=g.useContext(kb),{basename:t,future:r,navigator:n}=g.useContext(Yo),{matches:a}=g.useContext(Di),{pathname:i}=Oi(),o=JSON.stringify(Sb(a,r.v7_relativeSplatPath)),l=g.useRef(!1);return kT(()=>{l.current=!0}),g.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let f=Eb(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ko([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,o,i,e])}function Ux(){let{matches:e}=g.useContext(Di),t=e[e.length-1];return t?t.params:{}}function TT(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=g.useContext(Yo),{matches:a}=g.useContext(Di),{pathname:i}=Oi(),o=JSON.stringify(Sb(a,n.v7_relativeSplatPath));return g.useMemo(()=>Eb(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function j7(e,t){return N7(e,t)}function N7(e,t,r,n){rd()||gr(!1);let{navigator:a}=g.useContext(Yo),{matches:i}=g.useContext(Di),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Oi(),d;if(t){var f;let x=typeof t=="string"?td(t):t;c==="/"||(f=x.pathname)!=null&&f.startsWith(c)||gr(!1),d=x}else d=u;let h=d.pathname||"/",m=h;if(c!=="/"){let x=c.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let v=X9(e,{pathname:m}),p=k7(v&&v.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:ko([c,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:ko([c,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,r,n);return t&&p?g.createElement(Bx.Provider,{value:{location:qf({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:po.Pop}},p):p}function _7(){let e=D7(),t=g7(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:a},r):null,null)}const C7=g.createElement(_7,null);class S7 extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?g.createElement(Di.Provider,{value:this.props.routeContext},g.createElement(ET.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function E7(e){let{routeContext:t,match:r,children:n}=e,a=g.useContext(kb);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(Di.Provider,{value:t},n)}function k7(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=(a=r)==null?void 0:a.errors;if(l!=null){let d=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||gr(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:m}=r,v=f.route.loader&&h[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||v){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let m,v=!1,p=null,x=null;r&&(m=l&&f.route.id?l[f.route.id]:void 0,p=f.route.errorElement||C7,c&&(u<0&&h===0?(P7("route-fallback"),v=!0,x=null):u===h&&(v=!0,x=f.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,h+1)),y=()=>{let b;return m?b=p:v?b=x:f.route.Component?b=g.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=d,g.createElement(E7,{match:f,routeContext:{outlet:d,matches:w,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?g.createElement(S7,{location:r.location,revalidation:r.revalidation,component:p,error:m,children:y(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):y()},null)}var AT=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(AT||{}),RT=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(RT||{});function T7(e){let t=g.useContext(kb);return t||gr(!1),t}function A7(e){let t=g.useContext(y7);return t||gr(!1),t}function R7(e){let t=g.useContext(Di);return t||gr(!1),t}function DT(e){let t=R7(),r=t.matches[t.matches.length-1];return r.route.id||gr(!1),r.route.id}function D7(){var e;let t=g.useContext(ET),r=A7(),n=DT();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function O7(){let{router:e}=T7(AT.UseNavigateStable),t=DT(RT.UseNavigateStable),r=g.useRef(!1);return kT(()=>{r.current=!0}),g.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,qf({fromRouteId:t},i)))},[e,t])}const uN={};function P7(e,t,r){uN[e]||(uN[e]=!0)}function I7(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function zt(e){let{to:t,replace:r,state:n,relative:a}=e;rd()||gr(!1);let{future:i,static:o}=g.useContext(Yo),{matches:l}=g.useContext(Di),{pathname:c}=Oi(),u=wa(),d=Eb(t,Sb(l,i.v7_relativeSplatPath),c,a==="path"),f=JSON.stringify(d);return g.useEffect(()=>u(JSON.parse(f),{replace:r,state:n,relative:a}),[u,f,a,r,n]),null}function Ae(e){gr(!1)}function F7(e){let{basename:t="/",children:r=null,location:n,navigationType:a=po.Pop,navigator:i,static:o=!1,future:l}=e;rd()&&gr(!1);let c=t.replace(/^\/*/,"/"),u=g.useMemo(()=>({basename:c,navigator:i,static:o,future:qf({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof n=="string"&&(n=td(n));let{pathname:d="/",search:f="",hash:h="",state:m=null,key:v="default"}=n,p=g.useMemo(()=>{let x=Cb(d,c);return x==null?null:{location:{pathname:x,search:f,hash:h,state:m,key:v},navigationType:a}},[c,d,f,h,m,v,a]);return p==null?null:g.createElement(Yo.Provider,{value:u},g.createElement(Bx.Provider,{children:r,value:p}))}function L7(e){let{children:t,location:r}=e;return j7(a1(t),r)}new Promise(()=>{});function a1(e,t){t===void 0&&(t=[]);let r=[];return g.Children.forEach(e,(n,a)=>{if(!g.isValidElement(n))return;let i=[...t,a];if(n.type===g.Fragment){r.push.apply(r,a1(n.props.children,i));return}n.type!==Ae&&gr(!1),!n.props.index||!n.props.children||gr(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=a1(n.props.children,i)),r.push(o)}),r}/**
 * React Router DOM v6.30.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i1.apply(this,arguments)}function M7(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function B7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function U7(e,t){return e.button===0&&(!t||t==="_self")&&!B7(e)}function o1(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function $7(e,t){let r=o1(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}const q7=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],z7="6";try{window.__reactRouterVersion=z7}catch{}const V7="startTransition",dN=ny[V7];function H7(e){let{basename:t,children:r,future:n,window:a}=e,i=g.useRef();i.current==null&&(i.current=G9({window:a,v5Compat:!0}));let o=i.current,[l,c]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=n||{},d=g.useCallback(f=>{u&&dN?dN(()=>c(f)):c(f)},[c,u]);return g.useLayoutEffect(()=>o.listen(d),[o,d]),g.useEffect(()=>I7(n),[n]),g.createElement(F7,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:o,future:n})}const W7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",G7=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pe=g.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,h=M7(t,q7),{basename:m}=g.useContext(Yo),v,p=!1;if(typeof u=="string"&&G7.test(u)&&(v=u,W7))try{let b=new URL(window.location.href),N=u.startsWith("//")?new URL(b.protocol+u):new URL(u),C=Cb(N.pathname,m);N.origin===b.origin&&C!=null?u=C+N.search+N.hash:p=!0}catch{}let x=b7(u,{relative:a}),w=K7(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:a,viewTransition:f});function y(b){n&&n(b),b.defaultPrevented||w(b)}return g.createElement("a",i1({},h,{href:v||x,onClick:p||i?n:y,ref:r,target:c}))});var fN;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(fN||(fN={}));var hN;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(hN||(hN={}));function K7(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=wa(),u=Oi(),d=TT(e,{relative:o});return g.useCallback(f=>{if(U7(f,r)){f.preventDefault();let h=n!==void 0?n:Ap(u)===Ap(d);c(e,{replace:h,state:a,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,d,n,a,r,e,i,o,l])}function $x(e){let t=g.useRef(o1(e)),r=g.useRef(!1),n=Oi(),a=g.useMemo(()=>$7(n.search,r.current?null:t.current),[n.search]),i=wa(),o=g.useCallback((l,c)=>{const u=o1(typeof l=="function"?l(a):l);r.current=!0,i("?"+u,c)},[i,a]);return[a,o]}const Rl=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ha=globalThis,tf="10.35.0";function qx(){return Tb(Ha),Ha}function Tb(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||tf,t[tf]=t[tf]||{}}function Ab(e,t,r=Ha){const n=r.__SENTRY__=r.__SENTRY__||{},a=n[tf]=n[tf]||{};return a[e]||(a[e]=t())}const Y7="Sentry Logger ",mN={};function OT(e){if(!("console"in Ha))return e();const t=Ha.console,r={},n=Object.keys(mN);n.forEach(a=>{const i=mN[a];r[a]=t[a],t[a]=i});try{return e()}finally{n.forEach(a=>{t[a]=r[a]})}}function X7(){Db().enabled=!0}function Q7(){Db().enabled=!1}function PT(){return Db().enabled}function J7(...e){Rb("log",...e)}function Z7(...e){Rb("warn",...e)}function eU(...e){Rb("error",...e)}function Rb(e,...t){Rl&&PT()&&OT(()=>{Ha.console[e](`${Y7}[${e}]:`,...t)})}function Db(){return Rl?Ab("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const ia={enable:X7,disable:Q7,isEnabled:PT,log:J7,warn:Z7,error:eU},IT=Object.prototype.toString;function tU(e){switch(IT.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return aU(e,Error)}}function rU(e,t){return IT.call(e)===`[object ${t}]`}function sU(e){return rU(e,"Object")}function nU(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function aU(e,t){try{return e instanceof t}catch{return!1}}function iU(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Rl&&ia.log(`Failed to add non-enumerable property "${t}" to object`,e)}}let xc;function zx(e){if(xc!==void 0)return xc?xc(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=Ha;return t in r&&typeof r[t]=="function"?(xc=r[t],xc(e)):(xc=null,e())}function l1(){return zx(()=>Math.random())}function oU(){return zx(()=>Date.now())}function lU(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function cU(){const e=Ha;return e.crypto||e.msCrypto}let og;function uU(){return l1()*16}function rf(e=cU()){try{if(e!=null&&e.randomUUID)return zx(()=>e.randomUUID()).replace(/-/g,"")}catch{}return og||(og="10000000100040008000"+1e11),og.replace(/[018]/g,t=>(t^(uU()&15)>>t/4).toString(16))}const FT=1e3;function LT(){return oU()/FT}function dU(){const{performance:e}=Ha;if(!(e!=null&&e.now)||!e.timeOrigin)return LT;const t=e.timeOrigin;return()=>(t+zx(()=>e.now()))/FT}let pN;function fU(){return(pN??(pN=dU()))()}function hU(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||fU(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:rf()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function MT(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&Object.keys(t).length===0)return e;const n={...e};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=MT(n[a],t[a],r-1));return n}function xN(){return rf()}const c1="_sentrySpan";function gN(e,t){t?iU(e,c1,t):delete e[c1]}function vN(e){return e[c1]}const mU=100;class Bo{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:xN(),sampleRand:l1()}}clone(){const t=new Bo;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,gN(t,vN(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&hU(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this.setTags({[t]:r})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,r){return this.setAttributes({[t]:r})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,n=r instanceof Bo?r.getScopeData():sU(r)?t:void 0,{tags:a,attributes:i,extra:o,user:l,contexts:c,level:u,fingerprint:d=[],propagationContext:f}=n||{};return this._tags={...this._tags,...a},this._attributes={...this._attributes,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...c},l&&Object.keys(l).length&&(this._user=l),u&&(this._level=u),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,gN(this,void 0),this._attachments=[],this.setPropagationContext({traceId:xN(),sampleRand:l1()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){var i;const n=typeof r=="number"?r:mU;if(n<=0)return this;const a={timestamp:LT(),...t,message:t.message?lU(t.message,2048):t.message};return this._breadcrumbs.push(a),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),(i=this._client)==null||i.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:vN(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=MT(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=(r==null?void 0:r.event_id)||rf();if(!this._client)return Rl&&ia.warn("No client configured on scope - will not capture exception!"),n;const a=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:a,...r,event_id:n},this),n}captureMessage(t,r,n){const a=(n==null?void 0:n.event_id)||rf();if(!this._client)return Rl&&ia.warn("No client configured on scope - will not capture message!"),a;const i=(n==null?void 0:n.syntheticException)??new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:a},this),a}captureEvent(t,r){const n=(r==null?void 0:r.event_id)||rf();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(Rl&&ia.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function pU(){return Ab("defaultCurrentScope",()=>new Bo)}function xU(){return Ab("defaultIsolationScope",()=>new Bo)}class gU{constructor(t,r){let n;t?n=t:n=new Bo;let a;r?a=r:a=new Bo,this._stack=[{scope:n}],this._isolationScope=a}withScope(t){const r=this._pushScope();let n;try{n=t(r)}catch(a){throw this._popScope(),a}return nU(n)?n.then(a=>(this._popScope(),a),a=>{throw this._popScope(),a}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Du(){const e=qx(),t=Tb(e);return t.stack=t.stack||new gU(pU(),xU())}function vU(e){return Du().withScope(e)}function yU(e,t){const r=Du();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function yN(e){return Du().withScope(()=>e(Du().getIsolationScope()))}function bU(){return{withIsolationScope:yN,withScope:vU,withSetScope:yU,withSetIsolationScope:(e,t)=>yN(t),getCurrentScope:()=>Du().getScope(),getIsolationScope:()=>Du().getIsolationScope()}}function Ob(e){const t=Tb(e);return t.acs?t.acs:bU()}function Pb(){const e=qx();return Ob(e).getCurrentScope()}function wU(){const e=qx();return Ob(e).getIsolationScope()}function BT(...e){const t=qx(),r=Ob(t);if(e.length===2){const[n,a]=e;return n?r.withSetScope(n,a):r.withScope(a)}return r.withScope(e[0])}function UT(){return Pb().getClient()}const jU=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function NU(e){return e==="http"||e==="https"}function _U(e,t=!1){const{host:r,path:n,pass:a,port:i,projectId:o,protocol:l,publicKey:c}=e;return`${l}://${c}${t&&a?`:${a}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${o}`}function CU(e){const t=jU.exec(e);if(!t){OT(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,a="",i="",o="",l=""]=t.slice(1);let c="",u=l;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return $T({host:i,pass:a,path:c,projectId:u,port:o,protocol:r,publicKey:n})}function $T(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function SU(e){if(!Rl)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(ia.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:r.match(/^\d+$/)?NU(n)?t&&isNaN(parseInt(t,10))?(ia.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(ia.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(ia.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function EU(e){const t=typeof e=="string"?CU(e):$T(e);if(!(!t||!SU(t)))return t}function kU(e){if(e)return TU(e)?{captureContext:e}:RU(e)?{captureContext:e}:e}function TU(e){return e instanceof Bo||typeof e=="function"}const AU=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function RU(e){return Object.keys(e).some(t=>AU.includes(t))}function DU(e,t){return Pb().captureException(e,kU(t))}function OU(){return wU().lastEventId()}function PU(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function IU(e,t){const r=EU(e);if(!r)return"";const n=`${PU(r)}embed/error-page/`;let a=`dsn=${_U(r)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const o=t.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${n}?${a}`}const om=Ha,bN=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function wN(e={}){const t=om.document,r=(t==null?void 0:t.head)||(t==null?void 0:t.body);if(!r){bN&&ia.error("[showReportDialog] Global document not defined");return}const n=Pb(),a=UT(),i=a==null?void 0:a.getDsn();if(!i){bN&&ia.error("[showReportDialog] DSN not configured");return}const o={...e,user:{...n.getUser(),...e.user},eventId:e.eventId||OU()},l=om.document.createElement("script");l.async=!0,l.crossOrigin="anonymous",l.src=IU(i,o);const{onLoad:c,onClose:u}=o;if(c&&(l.onload=c),u){const d=f=>{if(f.data==="__sentry_reportdialog_closed__")try{u()}finally{om.removeEventListener("message",d)}};om.addEventListener("message",d)}r.appendChild(l)}function FU(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function LU(e,t){const r=new WeakSet;function n(a,i){if(!r.has(a)){if(a.cause)return r.add(a),n(a.cause,i);a.cause=i}}n(e,t)}function MU(e,{componentStack:t},r){if(FU(g.version)&&tU(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,LU(e,n)}return BT(n=>(n.setContext("react",{componentStack:t}),DU(e,r)))}const BU=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,lg={componentStack:null,error:null,eventId:null};class UU extends g.Component{constructor(t){super(t),this.state=lg,this._openFallbackReportDialog=!0;const r=UT();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&wN({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){const{componentStack:n}=r,{beforeCapture:a,onError:i,showDialog:o,dialogOptions:l}=this.props;BT(c=>{a&&a(c,t,n);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,d=MU(t,r,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});i&&i(t,n,d),o&&(this._lastEventId=d,this._openFallbackReportDialog&&wN({...l,eventId:d})),this.setState({error:t,componentStack:n,eventId:d})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:a}=this.props;a&&(this.state===lg?a(null,null,null):a(t,r,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:r,componentStack:n,eventId:a}=this.state;t&&t(r,n,a),this.setState(lg)}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.componentStack===null)return typeof r=="function"?r():r;const a=typeof t=="function"?g.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):t;return g.isValidElement(a)?a:(t&&BU&&ia.warn("fallback did not produce a valid ReactElement"),null)}}const $U=Gu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),se=g.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...a},i)=>{const o=n?$k:"button";return s.jsx(o,{className:Pe($U({variant:t,size:r,className:e})),ref:i,...a})});se.displayName="Button";const qU=({error:e,resetError:t})=>s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:s.jsxs("div",{className:"max-w-md w-full text-center space-y-6",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"p-4 bg-destructive/10 rounded-full",children:s.jsx(Ax,{className:"h-12 w-12 text-destructive"})})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Oups ! Une erreur s'est produite"}),s.jsx("p",{className:"text-muted-foreground",children:"Nous avons été informés du problème et travaillons à le résoudre."})]}),!1,s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[s.jsxs(se,{onClick:t,variant:"default",className:"gap-2",children:[s.jsx(ln,{className:"h-4 w-4"}),"Réessayer"]}),s.jsx(se,{asChild:!0,variant:"outline",className:"gap-2",children:s.jsxs(pe,{to:"/",children:[s.jsx(Ul,{className:"h-4 w-4"}),"Retour à l'accueil"]})})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Si le problème persiste, contactez-nous via WhatsApp."})]})}),zU=({children:e})=>s.jsx(UU,{fallback:({error:t,resetError:r})=>s.jsx(qU,{error:t instanceof Error?t:new Error(String(t)),resetError:r}),onError:(t,r)=>{console.error("Error caught by boundary:",t,r)},children:e}),Ib="noto-cart",u1=new EventTarget,d1="cart-change",jN=()=>{if(typeof window>"u")return[];const e=localStorage.getItem(Ib);if(!e)return[];try{return JSON.parse(e).map(r=>({...r,paymentType:r.paymentType||"euro",pointsCost:r.pointsCost||0}))}catch{return[]}},gc=e=>{localStorage.setItem(Ib,JSON.stringify(e)),u1.dispatchEvent(new CustomEvent(d1,{detail:e}))},sd=()=>{const[e,t]=g.useState(jN);g.useEffect(()=>{const x=w=>{t(w.detail)};return u1.addEventListener(d1,x),()=>u1.removeEventListener(d1,x)},[]),g.useEffect(()=>{const x=w=>{w.key===Ib&&t(jN())};return window.addEventListener("storage",x),()=>window.removeEventListener("storage",x)},[]);const r=g.useCallback(x=>{t(w=>{const y=w.findIndex(N=>N.productId===x.productId&&N.variantId===x.variantId&&N.paymentType===x.paymentType);let b;return y>-1?(b=[...w],b[y]={...b[y],quantity:b[y].quantity+x.quantity}):b=[...w,x],gc(b),b})},[]),n=g.useCallback((x,w,y)=>{t(b=>{const N=b.filter(C=>!(C.productId===x&&C.variantId===w&&(y===void 0||C.paymentType===y)));return gc(N),N})},[]),a=g.useCallback((x,w,y,b)=>{if(y<=0){t(N=>{const C=N.filter(_=>!(_.productId===x&&_.variantId===w&&(b===void 0||_.paymentType===b)));return gc(C),C});return}t(N=>{const C=N.map(_=>_.productId===x&&_.variantId===w&&(b===void 0||_.paymentType===b)?{..._,quantity:y}:_);return gc(C),C})},[]),i=g.useCallback(()=>{gc([]),t([])},[]),o=g.useCallback(()=>{t(x=>{const w=x.filter(y=>y.paymentType!=="points");return gc(w),w})},[]),l=g.useCallback(()=>e.reduce((x,w)=>x+w.quantity,0),[e]),c=g.useCallback(()=>e.reduce((x,w)=>x+w.price*w.quantity,0),[e]),u=g.useCallback(()=>e.filter(x=>x.paymentType==="euro"),[e]),d=g.useCallback(()=>e.filter(x=>x.paymentType==="points"),[e]),f=g.useCallback(()=>e.filter(x=>x.paymentType==="euro").reduce((x,w)=>x+w.price*w.quantity,0),[e]),h=g.useCallback(()=>e.filter(x=>x.paymentType==="points").reduce((x,w)=>x+(w.pointsCost||0)*w.quantity,0),[e]),m=g.useCallback(()=>e.filter(x=>x.paymentType==="points").reduce((x,w)=>x+w.price*w.quantity,0),[e]),v=g.useCallback(()=>e.some(x=>x.paymentType==="points"),[e]),p=g.useCallback(()=>e.some(x=>x.paymentType==="euro"),[e]);return{items:e,addItem:r,removeItem:n,updateQuantity:a,clearCart:i,clearLoyaltyItems:o,getTotalItems:l,getTotalPrice:c,getEuroItems:u,getLoyaltyItems:d,getEuroTotal:f,getPointsTotal:h,getLoyaltyValue:m,hasLoyaltyItems:v,hasEuroItems:p}},VU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvUAAADJCAMAAACUuz1AAAAAG1BMVEVHcEwYl3QYl3QYl3QYl3QYl3QYl3QYl3QYl3Ron8c/AAAACHRSTlMAccrsoSoQRSzWhCoAAA7xSURBVHja7Z3rluSmDoUt7u//xKdqks7p6S6DwKAtY+lHLisrY9fW542QAR/H86IIxmFhYdRbWBj1FhZGvYWFUW9hYdRbWBj1FhZGvYWFUW9hYdRbGPVGvYVRb9RbGPVGvYVRb9RbGPVGvYVRb9RbGPVGvYVRb2Fh1FtYGPUWFka9hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYXFqiCTwOJxUXIyESyeRn0xt29Fyv9GNC32kL4Y9meRMwXnfu6EdS5QzqbO0oh/pPcfpKcptcn7Twsm80/gX6LXt4H7F/um0wrgv6T3p9K7y+gXWexvcJZAJsc9AcFByN/3dIcX8WzpwxXyiyz2yqlPFHwfHC/PT0b9FLfplf5lOvGahMGoPw6+0/wdgYx6ceS/wE9XJAxPpz4O6v6v40ej/kJhc0H6EvIFCcOjqSfnL1LiyKgftPmrt+q7S/wii71K6lP2fgInUtxvRX12U+62s9D5PlSkZ1JPbhYpMtxvRP086X0X938lLT2Q+nnCS3G/DfV5qvQ9fl9ksddG/WTh3xpmo543h3V+8i3z6/sii70u6mOYT4tfXiluQX2iFTft4pCELj2IevJrgPFk1LfG2EXSMxeVFVnsFVGf3DJivItGfS3CuvtmSV9ksddD/Sqj/yoxjfqK0S/VnkYkXIq9FupTWE3Nuur+7tTT6ltvE3xhSnBj6qNfj80yGe9N/cLCkj/Sfvy/4ubUkxcBJxv1EL9pVzmfn5W4NfVBRvlVu9TuTD0JKd8oMIss9gqoX1/SL17bdF/qE8lJXy3uiyz2eOol6sq1rYH7Uh9EpY8DEsY9qZeFfgn2d6VeWvoKwufz4Lgj9UOTKRecC8F92LUPwf6m1A9B/4/0778MSH+OcJHFHkx9J/TvgxB+qJDaxycIL/LQ/0JwBPr3QQj5qvSnCAu/X8Smogd6V9kGnnKP/CDsdVHfA311B37uWRp+hr1w5w2aCr7yrr0PNvLBx2Cvi3rHR75htumIHeDHgSJx+iGYyFSwoefuP2bv+HSPp56tFJO4yO2B+jQwNaKNUsGD3vccspKYb3nDw6lnQt910gTT8D8OtM236mmXVAQe852/l8k9PZp6nkbd6/V43IeRNhhtkgpaIvwLe94LR3ow9XG6z3c9TmGk+TvV7WGpyAtnnZHhOT4+lvrkOfX84J/N6eP/JljYplCpYCh/Zd8fY0OcT0+l3i1FjLPfPw5QPxN7VCrcMqNn94fCQ6lvz6dcvKI9YzXhr9wKtyBAqaD1TzZpK+2VUJ9XTKZ6R9owQv087DGpaE6nZryGbmovXNrroL5dWk4wg/bEKo9QPw17TCrc0uqGrb17IPVBwG8YBeaPWZXw/ghIKkgEeob29Djqc7OkF3q6whD1k7BHpCKurivZ2IvWOBqob9U3E1cohZ4ap8hij0iFk+uttLB3D6O+0U2fuiwvdNQ4RRZ7QCpIsqHYwj4/ivokuhY18MvLnkX6E0oB+VQ0OHT3vpxu6p3sAuzALi+FtwXJp4KEl743sKcHUZ8FujcdT1kYpP46JOKpSOLTy3rfXm5hAp56J13sNRwnDlJ/GXvxVNDATpulFkePoZ7kZzj1LaJulPqr2Eunot46I0C6xcweTr0DrErKvCetyGIvnQqCrAdzGsweTX2GPPuBlfAii71wKhLGdasjjH8I9U68tGxfNg1Tfwl74VQQqHdOCsweTH0ESRA5Zl9GsI93SYUTWYjQeWH3COqDaL+Y6Thfw/vn/9i9OUVnKjJsTUzCv6DFUg8UwLcHmc9QL1sqLpuKgKszCL6rCks98Pfn9qTqszDLsBdNRW1SuXpOWb122p96B5nKcq99Iswq7EVTUfObnIBmR9tTH5FDXW5e/ESY1N7uGNWnIkDbhw5c4kCpD4z2IUR6X6Oesft5yO0lU5GQVl8XMO1OPfaRj62Z9LkwS7CXTAWB3xR5bImDpD4Cq3rOQ3cuTPuckYG1opKpqNw/SZgtYUscJPUEfluRG4ZXEYZxshFpToXH+k3N8Pzm1Afwy4oaurFOPeeYvN76WDAVEd0wB+ceST18FRLVnboqDOOLNqQ2FQRfCZOhdwCkPsMNp2F5dWEYJwH3ub1gKgK2hVKvsdzW1BO4tqzOZ32Teg72pDQVHu031Qdva+odfrd8/cFrCMP5JEGP28ulIirYxAf1PCD1CgwnVdPfFCZMdXu5VGR8gVOb1dHG1Ef0ctP6eBMY1M/FXi4VhB9lG9JvS70Kwwm1/DOEYWAf9KXC4UfZyqPn3cbUqzCcXJtTcYSZiL0G6rMS6belPmgwnFSbU7GEmYe9XCrwzbO69Glf6lUYTvUueMIwvvQWdKUiIpuGnG5G3pd6FYZTsWpiUs/5WmtQlYqsobaE2p5G6gWVr/Tc2dRzXleFe1Av+i1AwrUuYeSdD7NO8uujNd/jCpPmYC+VigTE7enUKxlmZ1DPK3KSmlQooT5f0Go/6knS69MU6jlFTnMIE0tFUNFHQPoejHolhlObXnQIkxgLj1vYi6XCeRXUJ6Me5fWV/tnRJcx17OWoV9E9O//BflvqK1MqUcOpINBH/XXsFXj9oYL6R3q9MPV+EvWXsVfg9UqoL7tSv5/XX8bevH576jf0etbJCRXszevN62/o9Tzso3m9eT26kTDT61nYn/4+8/rvm5bN62/j9Szsz04DVOD1SQf1YVfqt6zrr2GvwOuzDuqf2K+XfTc72es5Z2CeYG8rEmxFgoIp1agwYay2V7D6TAf1+76bra0+0zKlGhZmzO01rLnUscjbVhovjjhnzeUM7BVQL7mrJNn6en3r6/0V6jnYZ1gqlEgfHki9jh2EVd+7cnOMfSaESkXENcqVtJJst/j1fbOdhvr/5CZQKs5vSbKuB94FjvpdTgY5K1s52INS4TVI/8xToJyKJk5ZRT3nyOO/p7RyqdB94l+xE/+QhnNVGIbbR0Qqkp3uqpD6osFw/HXqj9xccP994bGcGqShsC/AtwY48HY4ybtlqu19Jg6RCg3SZ+Q9AO323Gbv8tUGBl9N7AMiFQVf2EM/jQWkXvcXevIU6hnYEyAVDt+xt6+xwTr2dcOZIkwT+/8aOYKpIHiJg/0AJZB67CdHGwWOOyZRn2Jrwb1P4qnAf/T0sV9ZrjCH/8pymEU9Y5+Jk09FAXdxEvYGkM1Dhx5nGzcwS5gm9kE8FQE8zlKBTuqQ1AfwOFt7i3RMpL6NPUmngsDjrMc+dUjqI3icbT1184RpYh+FU1GR3hPWb+Lm1IOf+DRkvscS7H0UToWDlhie97Z6T+pDu7GBufo/Q81UYUJzaYJoKqgAHQd6cTj1Gfnr49j08liFvWwqUgGavQMXOFjqaz/fr/75ofnITRamgX2QpT7gHIcKtLyCUx9YC1TExxl/rKCec2KIXCqooMrLxN9osyf1QAFc+4GbLQxjn4lgKiozyrXL/0Lbb/amvsre0sGuCmBaQz1rD7lYKgjkONW9NkIH8oCpzwVTXlbXhLljFfWc7VVSqYjc3S6Th3df0HNZOPX1PvY6DRzH6BYIk8hrob4+zQh7XVUX9fVx1mGvukQYUkN9KoCBtv7z00Oor7vuomc/X9jmsfjikqkIrGX/gsqLbeSCU0/yjlPf6OGOtdRzPsgsk4rIWvYvp7zc8V9w6g8v7TiNNTG0mHrWtwplUhGK7IyWrfz+1OcijH0ozLnEMmH6sF/YS/CiBUdrCV56EPV1s5/vOI03pFmA+j7sYeXlbOxdUWL1GqjPRRL7wE/0QmF6sMc5zlzsm8vvHkU9YxGu2LV8lKGe9YlOgVS0GkrzsG/+4Pww6lvGNxH71gIwOoSo78Ae6TglJJmf6yU/k6KC+uabGxeFcuwOMer52C+VPrVKrTmW0z4e5Xgc9UdTkyjDWRSkno09dFY1R/v2Mbf5gdQ3HWfGFuam3/zsIqwWhok9dlY1o7lC6y9xR+o5uqTVpvari7BcmBQUUM949q4V94wLuPRI6hmOc62453zxO0lTz9tehW4mlE8fTJxZ3azfLaqV+sTQ5sIwmBnFBO9TmOJPO/Iz79/sfhBMVhWXj4dSz3pvM2z3HEulA0E949YOFdj7kRKTt2eSjsdSf7D2WwxVmLw/+cBQ38ZeYKBlzS8cLRFe9IPm6qjn7bfotxxidUo+zaeEhCE49dxukusRn7ttzB2Ppp55coanOJ35z00EKWEynHr2uwPPre9jYK40km7fqKP+4L6tDMzpTyTunxgPIPWN6lfNtOrL8OM83THQ66KevzbFU26zxD516aRzJidMhlPftQrU1Wwn85EXOc5UPfU9KxFfg21OM9zmvF0sKAzBqe9b8+9f5NNP/VOmHtkRjXqV1Hdh/8d0KP8ULr/Mxk+RXlKYyrucQyP2XwlwrxS8Irz+YeD/BkGvjfpe7L+kdy/hX0YzIv2534gKc87coRn7K4Gp6TVSP4R98T/+PmeQlRXmlDk57aN7BvT6qGe+MpkVtcpSWJgz7LVbzmAEHPQKqR8+8Xq630gLc4L9ltr7gCRMI/VjR//O9xtxYT5XGDtq7+kw6js6GlOhH9BGvsLYUHtUx1I39SLzquaicYAwn7C/RT/hNiW9ZuoF5rTtZjFCmA/IyWtPO1c3mqnnLlNdOZuCCPMbe8RQu1B7lw6jHjPSunwopf73z4ZoT/savW7qF9o9r7BECRM0pGLNzEqD0WunflF17/IFbeSb5vs00nzWgZVy6nnbvFeNsThhgoolUWnuWKujuLkF9dPLnHBRm0Mc+z3GWk/pMOp7ZlZeuKDHU//9FSm4xvSTmFcE/R2on8d959sRpDApa0lFIreVz9+G+oO967sqfZyhjXzvEO45F8UPWRtMt6H+Na+9VGO6AbsBC5MVpSKOgu8o6kPpRtRfGGvd2Hl1aGFIVRM5Bieku1F/3XOcwhG2y+01qd8xtw0UD4t587wO6V8DbLrxb/2zHkab77Tlf2/iN1Bnz67e0jc937v7S//nO+Qajee9M/9E9PeBIckoXTb+0wn77sNZLTd2e63W8z6EJdN/8foXg11M+/hd+/2kj159DtI7DEZ55b9iw99mc0ILwfgfEDWnINguV3IAAAAASUVORK5CYII=";var HU=g.createContext(void 0);function ac(e){const t=g.useContext(HU);return e||t||"ltr"}var cg=0;function Fb(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??NN()),document.body.insertAdjacentElement("beforeend",e[1]??NN()),cg++,()=>{cg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),cg--}},[])}function NN(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ug="focusScope.autoFocusOnMount",dg="focusScope.autoFocusOnUnmount",_N={bubbles:!1,cancelable:!0},WU="FocusScope",Vx=g.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=g.useState(null),u=dr(a),d=dr(i),f=g.useRef(null),h=pt(t,p=>c(p)),m=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(n){let p=function(b){if(m.paused||!l)return;const N=b.target;l.contains(N)?f.current=N:Ki(f.current,{select:!0})},x=function(b){if(m.paused||!l)return;const N=b.relatedTarget;N!==null&&(l.contains(N)||Ki(f.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&Ki(l)};document.addEventListener("focusin",p),document.addEventListener("focusout",x);const y=new MutationObserver(w);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",x),y.disconnect()}}},[n,l,m.paused]),g.useEffect(()=>{if(l){SN.add(m);const p=document.activeElement;if(!l.contains(p)){const w=new CustomEvent(ug,_N);l.addEventListener(ug,u),l.dispatchEvent(w),w.defaultPrevented||(GU(JU(qT(l)),{select:!0}),document.activeElement===p&&Ki(l))}return()=>{l.removeEventListener(ug,u),setTimeout(()=>{const w=new CustomEvent(dg,_N);l.addEventListener(dg,d),l.dispatchEvent(w),w.defaultPrevented||Ki(p??document.body,{select:!0}),l.removeEventListener(dg,d),SN.remove(m)},0)}}},[l,u,d,m]);const v=g.useCallback(p=>{if(!r&&!n||m.paused)return;const x=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(x&&w){const y=p.currentTarget,[b,N]=KU(y);b&&N?!p.shiftKey&&w===N?(p.preventDefault(),r&&Ki(b,{select:!0})):p.shiftKey&&w===b&&(p.preventDefault(),r&&Ki(N,{select:!0})):w===y&&p.preventDefault()}},[r,n,m.paused]);return s.jsx(ze.div,{tabIndex:-1,...o,ref:h,onKeyDown:v})});Vx.displayName=WU;function GU(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ki(n,{select:t}),document.activeElement!==r)return}function KU(e){const t=qT(e),r=CN(t,e),n=CN(t.reverse(),e);return[r,n]}function qT(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function CN(e,t){for(const r of e)if(!YU(r,{upTo:t}))return r}function YU(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XU(e){return e instanceof HTMLInputElement&&"select"in e}function Ki(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&XU(e)&&t&&e.select()}}var SN=QU();function QU(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=EN(e,t),e.unshift(t)},remove(t){var r;e=EN(e,t),(r=e[0])==null||r.resume()}}}function EN(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function JU(e){return e.filter(t=>t.tagName!=="A")}var fg="rovingFocusGroup.onEntryFocus",ZU={bubbles:!1,cancelable:!0},Sh="RovingFocusGroup",[f1,zT,e$]=yh(Sh),[t$,nd]=Yr(Sh,[e$]),[r$,s$]=t$(Sh),VT=g.forwardRef((e,t)=>s.jsx(f1.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(f1.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(n$,{...e,ref:t})})}));VT.displayName=Sh;var n$=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=g.useRef(null),m=pt(t,h),v=ac(i),[p,x]=fn({prop:o,defaultProp:l??null,onChange:c,caller:Sh}),[w,y]=g.useState(!1),b=dr(u),N=zT(r),C=g.useRef(!1),[_,j]=g.useState(0);return g.useEffect(()=>{const S=h.current;if(S)return S.addEventListener(fg,b),()=>S.removeEventListener(fg,b)},[b]),s.jsx(r$,{scope:r,orientation:n,dir:v,loop:a,currentTabStopId:p,onItemFocus:g.useCallback(S=>x(S),[x]),onItemShiftTab:g.useCallback(()=>y(!0),[]),onFocusableItemAdd:g.useCallback(()=>j(S=>S+1),[]),onFocusableItemRemove:g.useCallback(()=>j(S=>S-1),[]),children:s.jsx(ze.div,{tabIndex:w||_===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:ke(e.onMouseDown,()=>{C.current=!0}),onFocus:ke(e.onFocus,S=>{const k=!C.current;if(S.target===S.currentTarget&&k&&!w){const D=new CustomEvent(fg,ZU);if(S.currentTarget.dispatchEvent(D),!D.defaultPrevented){const M=N().filter(V=>V.focusable),T=M.find(V=>V.active),A=M.find(V=>V.id===p),P=[T,A,...M].filter(Boolean).map(V=>V.ref.current);GT(P,d)}}C.current=!1}),onBlur:ke(e.onBlur,()=>y(!1))})})}),HT="RovingFocusGroupItem",WT=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:o,...l}=e,c=cn(),u=i||c,d=s$(HT,r),f=d.currentTabStopId===u,h=zT(r),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:p}=d;return g.useEffect(()=>{if(n)return m(),()=>v()},[n,m,v]),s.jsx(f1.ItemSlot,{scope:r,id:u,focusable:n,active:a,children:s.jsx(ze.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:ke(e.onMouseDown,x=>{n?d.onItemFocus(u):x.preventDefault()}),onFocus:ke(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:ke(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=o$(x,d.orientation,d.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=h().filter(N=>N.focusable).map(N=>N.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const N=b.indexOf(x.currentTarget);b=d.loop?l$(b,N+1):b.slice(N+1)}setTimeout(()=>GT(b))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:p!=null}):o})})});WT.displayName=HT;var a$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function i$(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function o$(e,t,r){const n=i$(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return a$[n]}function GT(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function l$(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Lb=VT,Mb=WT,c$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vc=new WeakMap,lm=new WeakMap,cm={},hg=0,KT=function(e){return e&&(e.host||KT(e.parentNode))},u$=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=KT(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},d$=function(e,t,r,n){var a=u$(t,Array.isArray(e)?e:[e]);cm[r]||(cm[r]=new WeakMap);var i=cm[r],o=[],l=new Set,c=new Set(a),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};a.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(l.has(h))d(h);else try{var m=h.getAttribute(n),v=m!==null&&m!=="false",p=(vc.get(h)||0)+1,x=(i.get(h)||0)+1;vc.set(h,p),i.set(h,x),o.push(h),p===1&&v&&lm.set(h,!0),x===1&&h.setAttribute(r,"true"),v||h.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return d(t),l.clear(),hg++,function(){o.forEach(function(f){var h=vc.get(f)-1,m=i.get(f)-1;vc.set(f,h),i.set(f,m),h||(lm.has(f)||f.removeAttribute(n),lm.delete(f)),m||f.removeAttribute(r)}),hg--,hg||(vc=new WeakMap,vc=new WeakMap,lm=new WeakMap,cm={})}},Bb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=c$(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),d$(n,a,r,"aria-hidden")):function(){return null}},h1=function(e,t){return h1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},h1(e,t)};function YT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");h1(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Cn=function(){return Cn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Cn.apply(this,arguments)};function Xo(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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function XT(e,t,r,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function QT(e,t){return function(r,n){t(r,n,e)}}function JT(e,t,r,n,a,i){function o(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var l=n.kind,c=l==="getter"?"get":l==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f,h=!1,m=r.length-1;m>=0;m--){var v={};for(var p in n)v[p]=p==="access"?{}:n[p];for(var p in n.access)v.access[p]=n.access[p];v.addInitializer=function(w){if(h)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(w||null))};var x=(0,r[m])(l==="accessor"?{get:d.get,set:d.set}:d[c],v);if(l==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(f=o(x.get))&&(d.get=f),(f=o(x.set))&&(d.set=f),(f=o(x.init))&&a.unshift(f)}else(f=o(x))&&(l==="field"?a.unshift(f):d[c]=f)}u&&Object.defineProperty(u,n.name,d),h=!0}function ZT(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0}function e3(e){return typeof e=="symbol"?e:"".concat(e)}function t3(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function r3(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Ye(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function l(d){try{u(n.next(d))}catch(f){o(f)}}function c(d){try{u(n.throw(d))}catch(f){o(f)}}function u(d){d.done?i(d.value):a(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}function s3(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Hx=Object.create?function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};function n3(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Hx(t,e,r)}function Rp(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ub(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(l){o={error:l}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function a3(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ub(arguments[t]));return e}function i3(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var i=arguments[t],o=0,l=i.length;o<l;o++,a++)n[a]=i[o];return n}function $b(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function Ou(e){return this instanceof Ou?(this.v=e,this):new Ou(e)}function o3(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),a,i=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",o),a[Symbol.asyncIterator]=function(){return this},a;function o(m){return function(v){return Promise.resolve(v).then(m,f)}}function l(m,v){n[m]&&(a[m]=function(p){return new Promise(function(x,w){i.push([m,p,x,w])>1||c(m,p)})},v&&(a[m]=v(a[m])))}function c(m,v){try{u(n[m](v))}catch(p){h(i[0][3],p)}}function u(m){m.value instanceof Ou?Promise.resolve(m.value.v).then(d,f):h(i[0][2],m)}function d(m){c("next",m)}function f(m){c("throw",m)}function h(m,v){m(v),i.shift(),i.length&&c(i[0][0],i[0][1])}}function l3(e){var t,r;return t={},n("next"),n("throw",function(a){throw a}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(a,i){t[a]=e[a]?function(o){return(r=!r)?{value:Ou(e[a](o)),done:!1}:i?i(o):o}:i}}function c3(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Rp=="function"?Rp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(o){return new Promise(function(l,c){o=e[i](o),a(l,c,o.done,o.value)})}}function a(i,o,l,c){Promise.resolve(c).then(function(u){i({value:u,done:l})},o)}}function u3(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var f$=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},m1=function(e){return m1=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},m1(e)};function d3(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=m1(e),n=0;n<r.length;n++)r[n]!=="default"&&Hx(t,e,r[n]);return f$(t,e),t}function f3(e){return e&&e.__esModule?e:{default:e}}function h3(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function m3(e,t,r,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r}function p3(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function x3(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,a;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(a=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");a&&(n=function(){try{a.call(this)}catch(i){return Promise.reject(i)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var h$=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function g3(e){function t(i){e.error=e.hasError?new h$(i,e.error,"An error was suppressed during disposal."):i,e.hasError=!0}var r,n=0;function a(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(a);if(r.dispose){var i=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(i).then(a,function(o){return t(o),a()})}else n|=1}catch(o){t(o)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return a()}function v3(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,a,i,o){return n?t?".jsx":".js":a&&(!i||!o)?r:a+i+"."+o.toLowerCase()+"js"}):e}const m$={__extends:YT,__assign:Cn,__rest:Xo,__decorate:XT,__param:QT,__esDecorate:JT,__runInitializers:ZT,__propKey:e3,__setFunctionName:t3,__metadata:r3,__awaiter:Ye,__generator:s3,__createBinding:Hx,__exportStar:n3,__values:Rp,__read:Ub,__spread:a3,__spreadArrays:i3,__spreadArray:$b,__await:Ou,__asyncGenerator:o3,__asyncDelegator:l3,__asyncValues:c3,__makeTemplateObject:u3,__importStar:d3,__importDefault:f3,__classPrivateFieldGet:h3,__classPrivateFieldSet:m3,__classPrivateFieldIn:p3,__addDisposableResource:x3,__disposeResources:g3,__rewriteRelativeImportExtension:v3},p$=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:x3,get __assign(){return Cn},__asyncDelegator:l3,__asyncGenerator:o3,__asyncValues:c3,__await:Ou,__awaiter:Ye,__classPrivateFieldGet:h3,__classPrivateFieldIn:p3,__classPrivateFieldSet:m3,__createBinding:Hx,__decorate:XT,__disposeResources:g3,__esDecorate:JT,__exportStar:n3,__extends:YT,__generator:s3,__importDefault:f3,__importStar:d3,__makeTemplateObject:u3,__metadata:r3,__param:QT,__propKey:e3,__read:Ub,__rest:Xo,__rewriteRelativeImportExtension:v3,__runInitializers:ZT,__setFunctionName:t3,__spread:a3,__spreadArray:$b,__spreadArrays:i3,__values:Rp,default:m$},Symbol.toStringTag,{value:"Module"}));var Km="right-scroll-bar-position",Ym="width-before-scroll-bar",x$="with-scroll-bars-hidden",g$="--removed-body-scroll-bar-size";function mg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function v$(e,t){var r=g.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var y$=typeof window<"u"?g.useLayoutEffect:g.useEffect,kN=new WeakMap;function b$(e,t){var r=v$(null,function(n){return e.forEach(function(a){return mg(a,n)})});return y$(function(){var n=kN.get(r);if(n){var a=new Set(n),i=new Set(e),o=r.current;a.forEach(function(l){i.has(l)||mg(l,null)}),i.forEach(function(l){a.has(l)||mg(l,o)})}kN.set(r,e)},[e]),r}function w$(e){return e}function j$(e,t){t===void 0&&(t=w$);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(l){return i(l)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(i),o=r}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),r}}}};return a}function N$(e){e===void 0&&(e={});var t=j$(null);return t.options=Cn({async:!0,ssr:!1},e),t}var y3=function(e){var t=e.sideCar,r=Xo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return g.createElement(n,Cn({},r))};y3.isSideCarExport=!0;function _$(e,t){return e.useMedium(t),y3}var b3=N$(),pg=function(){},Wx=g.forwardRef(function(e,t){var r=g.useRef(null),n=g.useState({onScrollCapture:pg,onWheelCapture:pg,onTouchMoveCapture:pg}),a=n[0],i=n[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,v=e.noIsolation,p=e.inert,x=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,b=e.gapMode,N=Xo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,_=b$([r,t]),j=Cn(Cn({},N),a);return g.createElement(g.Fragment,null,d&&g.createElement(C,{sideCar:b3,removeScrollBar:u,shards:f,noRelative:m,noIsolation:v,inert:p,setCallbacks:i,allowPinchZoom:!!x,lockRef:r,gapMode:b}),o?g.cloneElement(g.Children.only(l),Cn(Cn({},j),{ref:_})):g.createElement(y,Cn({},j,{className:c,ref:_}),l))});Wx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wx.classNames={fullWidth:Ym,zeroRight:Km};var C$=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function S$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=C$();return t&&e.setAttribute("nonce",t),e}function E$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function k$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var T$=function(){var e=0,t=null;return{add:function(r){e==0&&(t=S$())&&(E$(t,r),k$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},A$=function(){var e=T$();return function(t,r){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},w3=function(){var e=A$(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},R$={left:0,top:0,right:0,gap:0},xg=function(e){return parseInt(e||"",10)||0},D$=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[xg(r),xg(n),xg(a)]},O$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return R$;var t=D$(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},P$=w3(),tu="data-scroll-locked",I$=function(e,t,r,n){var a=e.left,i=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),`
  .`.concat(x$,` {
   overflow: hidden `).concat(n,`;
   padding-right: `).concat(l,"px ").concat(n,`;
  }
  body[`).concat(tu,`] {
    overflow: hidden `).concat(n,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
    padding-left: `.concat(a,`px;
    padding-top: `).concat(i,`px;
    padding-right: `).concat(o,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l,"px ").concat(n,`;
    `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Km,` {
    right: `).concat(l,"px ").concat(n,`;
  }
  
  .`).concat(Ym,` {
    margin-right: `).concat(l,"px ").concat(n,`;
  }
  
  .`).concat(Km," .").concat(Km,` {
    right: 0 `).concat(n,`;
  }
  
  .`).concat(Ym," .").concat(Ym,` {
    margin-right: 0 `).concat(n,`;
  }
  
  body[`).concat(tu,`] {
    `).concat(g$,": ").concat(l,`px;
  }
`)},TN=function(){var e=parseInt(document.body.getAttribute(tu)||"0",10);return isFinite(e)?e:0},F$=function(){g.useEffect(function(){return document.body.setAttribute(tu,(TN()+1).toString()),function(){var e=TN()-1;e<=0?document.body.removeAttribute(tu):document.body.setAttribute(tu,e.toString())}},[])},L$=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;F$();var i=g.useMemo(function(){return O$(a)},[a]);return g.createElement(P$,{styles:I$(i,!t,a,r?"":"!important")})},p1=!1;if(typeof window<"u")try{var um=Object.defineProperty({},"passive",{get:function(){return p1=!0,!0}});window.addEventListener("test",um,um),window.removeEventListener("test",um,um)}catch{p1=!1}var yc=p1?{passive:!1}:!1,M$=function(e){return e.tagName==="TEXTAREA"},j3=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!M$(e)&&r[t]==="visible")},B$=function(e){return j3(e,"overflowY")},U$=function(e){return j3(e,"overflowX")},AN=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=N3(e,n);if(a){var i=_3(e,n),o=i[1],l=i[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},$$=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},q$=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},N3=function(e,t){return e==="v"?B$(t):U$(t)},_3=function(e,t){return e==="v"?$$(t):q$(t)},z$=function(e,t){return e==="h"&&t==="rtl"?-1:1},V$=function(e,t,r,n,a){var i=z$(e,window.getComputedStyle(t).direction),o=i*n,l=r.target,c=t.contains(l),u=!1,d=o>0,f=0,h=0;do{if(!l)break;var m=_3(e,l),v=m[0],p=m[1],x=m[2],w=p-x-i*v;(v||w)&&N3(e,l)&&(f+=w,h+=v);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},dm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RN=function(e){return[e.deltaX,e.deltaY]},DN=function(e){return e&&"current"in e?e.current:e},H$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},W$=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},G$=0,bc=[];function K$(e){var t=g.useRef([]),r=g.useRef([0,0]),n=g.useRef(),a=g.useState(G$++)[0],i=g.useState(w3)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=$b([e.lockRef.current],(e.shards||[]).map(DN),!0).filter(Boolean);return p.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(p,x){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var w=dm(p),y=r.current,b="deltaX"in p?p.deltaX:y[0]-w[0],N="deltaY"in p?p.deltaY:y[1]-w[1],C,_=p.target,j=Math.abs(b)>Math.abs(N)?"h":"v";if("touches"in p&&j==="h"&&_.type==="range")return!1;var S=AN(j,_);if(!S)return!0;if(S?C=j:(C=j==="v"?"h":"v",S=AN(j,_)),!S)return!1;if(!n.current&&"changedTouches"in p&&(b||N)&&(n.current=C),!C)return!0;var k=n.current||C;return V$(k,x,p,k==="h"?b:N)},[]),c=g.useCallback(function(p){var x=p;if(!(!bc.length||bc[bc.length-1]!==i)){var w="deltaY"in x?RN(x):dm(x),y=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&H$(C.delta,w)})[0];if(y&&y.should){x.cancelable&&x.preventDefault();return}if(!y){var b=(o.current.shards||[]).map(DN).filter(Boolean).filter(function(C){return C.contains(x.target)}),N=b.length>0?l(x,b[0]):!o.current.noIsolation;N&&x.cancelable&&x.preventDefault()}}},[]),u=g.useCallback(function(p,x,w,y){var b={name:p,delta:x,target:w,should:y,shadowParent:Y$(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(N){return N!==b})},1)},[]),d=g.useCallback(function(p){r.current=dm(p),n.current=void 0},[]),f=g.useCallback(function(p){u(p.type,RN(p),p.target,l(p,e.lockRef.current))},[]),h=g.useCallback(function(p){u(p.type,dm(p),p.target,l(p,e.lockRef.current))},[]);g.useEffect(function(){return bc.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,yc),document.addEventListener("touchmove",c,yc),document.addEventListener("touchstart",d,yc),function(){bc=bc.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,yc),document.removeEventListener("touchmove",c,yc),document.removeEventListener("touchstart",d,yc)}},[]);var m=e.removeScrollBar,v=e.inert;return g.createElement(g.Fragment,null,v?g.createElement(i,{styles:W$(a)}):null,m?g.createElement(L$,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Y$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const X$=_$(b3,K$);var Gx=g.forwardRef(function(e,t){return g.createElement(Wx,Cn({},e,{ref:t,sideCar:X$}))});Gx.classNames=Wx.classNames;var x1=["Enter"," "],Q$=["ArrowDown","PageUp","Home"],C3=["ArrowUp","PageDown","End"],J$=[...Q$,...C3],Z$={ltr:[...x1,"ArrowRight"],rtl:[...x1,"ArrowLeft"]},eq={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Eh="Menu",[zf,tq,rq]=yh(Eh),[ic,S3]=Yr(Eh,[rq,Zu,nd]),Kx=Zu(),E3=nd(),[sq,oc]=ic(Eh),[nq,kh]=ic(Eh),k3=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:i,modal:o=!0}=e,l=Kx(t),[c,u]=g.useState(null),d=g.useRef(!1),f=dr(i),h=ac(a);return g.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(pb,{...l,children:s.jsx(sq,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:u,children:s.jsx(nq,{scope:t,onClose:g.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:o,children:n})})})};k3.displayName=Eh;var aq="MenuAnchor",qb=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Kx(r);return s.jsx(xb,{...a,...n,ref:t})});qb.displayName=aq;var zb="MenuPortal",[iq,T3]=ic(zb,{forceMount:void 0}),A3=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,i=oc(zb,t);return s.jsx(iq,{scope:t,forceMount:r,children:s.jsx(Xr,{present:r||i.open,children:s.jsx(bh,{asChild:!0,container:a,children:n})})})};A3.displayName=zb;var Tn="MenuContent",[oq,Vb]=ic(Tn),R3=g.forwardRef((e,t)=>{const r=T3(Tn,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=oc(Tn,e.__scopeMenu),o=kh(Tn,e.__scopeMenu);return s.jsx(zf.Provider,{scope:e.__scopeMenu,children:s.jsx(Xr,{present:n||i.open,children:s.jsx(zf.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(lq,{...a,ref:t}):s.jsx(cq,{...a,ref:t})})})})}),lq=g.forwardRef((e,t)=>{const r=oc(Tn,e.__scopeMenu),n=g.useRef(null),a=pt(t,n);return g.useEffect(()=>{const i=n.current;if(i)return Bb(i)},[]),s.jsx(Hb,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ke(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),cq=g.forwardRef((e,t)=>{const r=oc(Tn,e.__scopeMenu);return s.jsx(Hb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),uq=Bl("MenuContent.ScrollLock"),Hb=g.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:v,...p}=e,x=oc(Tn,r),w=kh(Tn,r),y=Kx(r),b=E3(r),N=tq(r),[C,_]=g.useState(null),j=g.useRef(null),S=pt(t,j,x.onContentChange),k=g.useRef(0),D=g.useRef(""),M=g.useRef(0),T=g.useRef(null),A=g.useRef("right"),W=g.useRef(0),P=v?Gx:g.Fragment,V=v?{as:uq,allowPinchZoom:!0}:void 0,Z=O=>{var J,K;const ne=D.current+O,he=N().filter(ae=>!ae.disabled),I=document.activeElement,Y=(J=he.find(ae=>ae.ref.current===I))==null?void 0:J.textValue,E=he.map(ae=>ae.textValue),B=jq(E,ne,Y),ee=(K=he.find(ae=>ae.textValue===B))==null?void 0:K.ref.current;(function ae(te){D.current=te,window.clearTimeout(k.current),te!==""&&(k.current=window.setTimeout(()=>ae(""),1e3))})(ne),ee&&setTimeout(()=>ee.focus())};g.useEffect(()=>()=>window.clearTimeout(k.current),[]),Fb();const Q=g.useCallback(O=>{var he,I;return A.current===((he=T.current)==null?void 0:he.side)&&_q(O,(I=T.current)==null?void 0:I.area)},[]);return s.jsx(oq,{scope:r,searchRef:D,onItemEnter:g.useCallback(O=>{Q(O)&&O.preventDefault()},[Q]),onItemLeave:g.useCallback(O=>{var ne;Q(O)||((ne=j.current)==null||ne.focus(),_(null))},[Q]),onTriggerLeave:g.useCallback(O=>{Q(O)&&O.preventDefault()},[Q]),pointerGraceTimerRef:M,onPointerGraceIntentChange:g.useCallback(O=>{T.current=O},[]),children:s.jsx(P,{...V,children:s.jsx(Vx,{asChild:!0,trapped:a,onMountAutoFocus:ke(i,O=>{var ne;O.preventDefault(),(ne=j.current)==null||ne.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(Wu,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:s.jsx(Lb,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:n,currentTabStopId:C,onCurrentTabStopIdChange:_,onEntryFocus:ke(c,O=>{w.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(gb,{role:"menu","aria-orientation":"vertical","data-state":G3(x.open),"data-radix-menu-content":"",dir:w.dir,...y,...p,ref:S,style:{outline:"none",...p.style},onKeyDown:ke(p.onKeyDown,O=>{const he=O.target.closest("[data-radix-menu-content]")===O.currentTarget,I=O.ctrlKey||O.altKey||O.metaKey,Y=O.key.length===1;he&&(O.key==="Tab"&&O.preventDefault(),!I&&Y&&Z(O.key));const E=j.current;if(O.target!==E||!J$.includes(O.key))return;O.preventDefault();const ee=N().filter(J=>!J.disabled).map(J=>J.ref.current);C3.includes(O.key)&&ee.reverse(),bq(ee)}),onBlur:ke(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(k.current),D.current="")}),onPointerMove:ke(e.onPointerMove,Vf(O=>{const ne=O.target,he=W.current!==O.clientX;if(O.currentTarget.contains(ne)&&he){const I=O.clientX>W.current?"right":"left";A.current=I,W.current=O.clientX}}))})})})})})})});R3.displayName=Tn;var dq="MenuGroup",Wb=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(ze.div,{role:"group",...n,ref:t})});Wb.displayName=dq;var fq="MenuLabel",D3=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(ze.div,{...n,ref:t})});D3.displayName=fq;var Dp="MenuItem",ON="menu.itemSelect",Yx=g.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,i=g.useRef(null),o=kh(Dp,e.__scopeMenu),l=Vb(Dp,e.__scopeMenu),c=pt(t,i),u=g.useRef(!1),d=()=>{const f=i.current;if(!r&&f){const h=new CustomEvent(ON,{bubbles:!0,cancelable:!0});f.addEventListener(ON,m=>n==null?void 0:n(m),{once:!0}),Xy(f,h),h.defaultPrevented?u.current=!1:o.onClose()}};return s.jsx(O3,{...a,ref:c,disabled:r,onClick:ke(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),u.current=!0},onPointerUp:ke(e.onPointerUp,f=>{var h;u.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:ke(e.onKeyDown,f=>{const h=l.searchRef.current!=="";r||h&&f.key===" "||x1.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Yx.displayName=Dp;var O3=g.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...i}=e,o=Vb(Dp,r),l=E3(r),c=g.useRef(null),u=pt(t,c),[d,f]=g.useState(!1),[h,m]=g.useState("");return g.useEffect(()=>{const v=c.current;v&&m((v.textContent??"").trim())},[i.children]),s.jsx(zf.ItemSlot,{scope:r,disabled:n,textValue:a??h,children:s.jsx(Mb,{asChild:!0,...l,focusable:!n,children:s.jsx(ze.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:u,onPointerMove:ke(e.onPointerMove,Vf(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ke(e.onPointerLeave,Vf(v=>o.onItemLeave(v))),onFocus:ke(e.onFocus,()=>f(!0)),onBlur:ke(e.onBlur,()=>f(!1))})})})}),hq="MenuCheckboxItem",P3=g.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return s.jsx(B3,{scope:e.__scopeMenu,checked:r,children:s.jsx(Yx,{role:"menuitemcheckbox","aria-checked":Op(r)?"mixed":r,...a,ref:t,"data-state":Kb(r),onSelect:ke(a.onSelect,()=>n==null?void 0:n(Op(r)?!0:!r),{checkForDefaultPrevented:!1})})})});P3.displayName=hq;var I3="MenuRadioGroup",[mq,pq]=ic(I3,{value:void 0,onValueChange:()=>{}}),F3=g.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,i=dr(n);return s.jsx(mq,{scope:e.__scopeMenu,value:r,onValueChange:i,children:s.jsx(Wb,{...a,ref:t})})});F3.displayName=I3;var L3="MenuRadioItem",M3=g.forwardRef((e,t)=>{const{value:r,...n}=e,a=pq(L3,e.__scopeMenu),i=r===a.value;return s.jsx(B3,{scope:e.__scopeMenu,checked:i,children:s.jsx(Yx,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":Kb(i),onSelect:ke(n.onSelect,()=>{var o;return(o=a.onValueChange)==null?void 0:o.call(a,r)},{checkForDefaultPrevented:!1})})})});M3.displayName=L3;var Gb="MenuItemIndicator",[B3,xq]=ic(Gb,{checked:!1}),U3=g.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,i=xq(Gb,r);return s.jsx(Xr,{present:n||Op(i.checked)||i.checked===!0,children:s.jsx(ze.span,{...a,ref:t,"data-state":Kb(i.checked)})})});U3.displayName=Gb;var gq="MenuSeparator",$3=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(ze.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});$3.displayName=gq;var vq="MenuArrow",q3=g.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=Kx(r);return s.jsx(vb,{...a,...n,ref:t})});q3.displayName=vq;var yq="MenuSub",[jle,z3]=ic(yq),Fd="MenuSubTrigger",V3=g.forwardRef((e,t)=>{const r=oc(Fd,e.__scopeMenu),n=kh(Fd,e.__scopeMenu),a=z3(Fd,e.__scopeMenu),i=Vb(Fd,e.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>d,[d]),g.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),s.jsx(qb,{asChild:!0,...u,children:s.jsx(O3,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":G3(r.open),...e,ref:Ex(t,a.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ke(e.onPointerMove,Vf(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:ke(e.onPointerLeave,Vf(f=>{var m,v;d();const h=(m=r.content)==null?void 0:m.getBoundingClientRect();if(h){const p=(v=r.content)==null?void 0:v.dataset.side,x=p==="right",w=x?-5:5,y=h[x?"left":"right"],b=h[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+w,y:f.clientY},{x:y,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:y,y:h.bottom}],side:p}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ke(e.onKeyDown,f=>{var m;const h=i.searchRef.current!=="";e.disabled||h&&f.key===" "||Z$[n.dir].includes(f.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),f.preventDefault())})})})});V3.displayName=Fd;var H3="MenuSubContent",W3=g.forwardRef((e,t)=>{const r=T3(Tn,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=oc(Tn,e.__scopeMenu),o=kh(Tn,e.__scopeMenu),l=z3(H3,e.__scopeMenu),c=g.useRef(null),u=pt(t,c);return s.jsx(zf.Provider,{scope:e.__scopeMenu,children:s.jsx(Xr,{present:n||i.open,children:s.jsx(zf.Slot,{scope:e.__scopeMenu,children:s.jsx(Hb,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:ke(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ke(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:ke(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),h=eq[o.dir].includes(d.key);f&&h&&(i.onOpenChange(!1),(m=l.trigger)==null||m.focus(),d.preventDefault())})})})})})});W3.displayName=H3;function G3(e){return e?"open":"closed"}function Op(e){return e==="indeterminate"}function Kb(e){return Op(e)?"indeterminate":e?"checked":"unchecked"}function bq(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function wq(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function jq(e,t,r){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=wq(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==r));const c=o.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function Nq(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,f=c.x,h=c.y;d>n!=h>n&&r<(f-u)*(n-d)/(h-d)+u&&(a=!a)}return a}function _q(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return Nq(r,t)}function Vf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Cq=k3,Sq=qb,Eq=A3,kq=R3,Tq=Wb,Aq=D3,Rq=Yx,Dq=P3,Oq=F3,Pq=M3,Iq=U3,Fq=$3,Lq=q3,Mq=V3,Bq=W3,Xx="DropdownMenu",[Uq]=Yr(Xx,[S3]),Ps=S3(),[$q,K3]=Uq(Xx),Y3=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=Ps(t),u=g.useRef(null),[d,f]=fn({prop:a,defaultProp:i??!1,onChange:o,caller:Xx});return s.jsx($q,{scope:t,triggerId:cn(),triggerRef:u,contentId:cn(),open:d,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(h=>!h),[f]),modal:l,children:s.jsx(Cq,{...c,open:d,onOpenChange:f,dir:n,modal:l,children:r})})};Y3.displayName=Xx;var X3="DropdownMenuTrigger",Q3=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,i=K3(X3,r),o=Ps(r);return s.jsx(Sq,{asChild:!0,...o,children:s.jsx(ze.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:Ex(t,i.triggerRef),onPointerDown:ke(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:ke(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Q3.displayName=X3;var qq="DropdownMenuPortal",J3=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Ps(t);return s.jsx(Eq,{...n,...r})};J3.displayName=qq;var Z3="DropdownMenuContent",eA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=K3(Z3,r),i=Ps(r),o=g.useRef(!1);return s.jsx(kq,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...n,ref:t,onCloseAutoFocus:ke(e.onCloseAutoFocus,l=>{var c;o.current||(c=a.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:ke(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!a.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eA.displayName=Z3;var zq="DropdownMenuGroup",Vq=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Tq,{...a,...n,ref:t})});Vq.displayName=zq;var Hq="DropdownMenuLabel",tA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Aq,{...a,...n,ref:t})});tA.displayName=Hq;var Wq="DropdownMenuItem",rA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Rq,{...a,...n,ref:t})});rA.displayName=Wq;var Gq="DropdownMenuCheckboxItem",sA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Dq,{...a,...n,ref:t})});sA.displayName=Gq;var Kq="DropdownMenuRadioGroup",Yq=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Oq,{...a,...n,ref:t})});Yq.displayName=Kq;var Xq="DropdownMenuRadioItem",nA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Pq,{...a,...n,ref:t})});nA.displayName=Xq;var Qq="DropdownMenuItemIndicator",aA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Iq,{...a,...n,ref:t})});aA.displayName=Qq;var Jq="DropdownMenuSeparator",iA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Fq,{...a,...n,ref:t})});iA.displayName=Jq;var Zq="DropdownMenuArrow",ez=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Lq,{...a,...n,ref:t})});ez.displayName=Zq;var tz="DropdownMenuSubTrigger",oA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Mq,{...a,...n,ref:t})});oA.displayName=tz;var rz="DropdownMenuSubContent",lA=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=Ps(r);return s.jsx(Bq,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});lA.displayName=rz;var sz=Y3,nz=Q3,az=J3,cA=eA,uA=tA,dA=rA,fA=sA,hA=nA,mA=aA,pA=iA,xA=oA,gA=lA;const PN=sz,IN=nz,iz=g.forwardRef(({className:e,inset:t,children:r,...n},a)=>s.jsxs(xA,{ref:a,className:Pe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...n,children:[r,s.jsx(Io,{className:"ml-auto h-4 w-4"})]}));iz.displayName=xA.displayName;const oz=g.forwardRef(({className:e,...t},r)=>s.jsx(gA,{ref:r,className:Pe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));oz.displayName=gA.displayName;const g1=g.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx(az,{children:s.jsx(cA,{ref:n,sideOffset:t,className:Pe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));g1.displayName=cA.displayName;const Tc=g.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(dA,{ref:n,className:Pe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...r}));Tc.displayName=dA.displayName;const lz=g.forwardRef(({className:e,children:t,checked:r,...n},a)=>s.jsxs(fA,{ref:a,className:Pe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:r,...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(mA,{children:s.jsx(tb,{className:"h-4 w-4"})})}),t]}));lz.displayName=fA.displayName;const cz=g.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(hA,{ref:n,className:Pe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(mA,{children:s.jsx(v4,{className:"h-2 w-2 fill-current"})})}),t]}));cz.displayName=hA.displayName;const uz=g.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(uA,{ref:n,className:Pe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));uz.displayName=uA.displayName;const dz=g.forwardRef(({className:e,...t},r)=>s.jsx(pA,{ref:r,className:Pe("-mx-1 my-1 h-px bg-muted",e),...t}));dz.displayName=pA.displayName;const at=()=>{const[e,t]=g.useState(!1),{getTotalItems:r}=sd(),n=[{text:"🚚 LIVRAISON OFFERTE en point relais dès 70€",link:"/panier"},{text:"🎁 1 ACHETÉ = 1 OFFERT sur les Shampoings Secs",link:"/produit/shampoing-sec-cbd-cheveux-clairs"},{text:"🎁 1 ACHETÉ = 1 OFFERT sur les Huiles CBD 5% 10ml",link:"/produit/huile-cbd-500mg-citron-10ml"},{text:"📉 PRIX EN BAISSE sur toute la gamme !",link:"/produits"},{text:"💬 Support WhatsApp ultra-rapide !",link:"/contact"}];return s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"bg-primary text-primary-foreground py-2 text-sm font-medium overflow-hidden",children:s.jsx("div",{className:"animate-marquee whitespace-nowrap inline-flex",children:[...n,...n,...n,...n].map((a,i)=>a.link.startsWith("http")?s.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",className:"mx-8 hover:underline",children:a.text},i):s.jsx(pe,{to:a.link,className:"mx-8 hover:underline",children:a.text},i))})}),s.jsxs("header",{className:"border-b bg-background sticky top-0 z-50",children:[s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"flex items-center justify-between h-20",children:[s.jsxs("div",{className:"flex items-center gap-8",children:[s.jsx("button",{className:"lg:hidden",onClick:()=>t(!e),children:s.jsx(b4,{className:"h-6 w-6"})}),s.jsxs("nav",{className:"hidden lg:flex items-center gap-6 text-sm",children:[s.jsx(pe,{to:"/produits",className:"hover:text-primary transition-colors",children:"TOUS LES PRODUITS"}),s.jsxs(PN,{children:[s.jsxs(IN,{className:"flex items-center gap-1 hover:text-primary transition-colors outline-none",children:["PROGRAMME DE FIDÉLITÉ",s.jsx(If,{className:"h-4 w-4"})]}),s.jsxs(g1,{align:"start",className:"w-48",children:[s.jsx(Tc,{asChild:!0,children:s.jsx(pe,{to:"/programme-fidelite",className:"w-full cursor-pointer",children:"Le programme"})}),s.jsx(Tc,{asChild:!0,children:s.jsx(pe,{to:"/boutique-fidelite",className:"w-full cursor-pointer",children:"Boutique cadeau"})})]})]})]})]}),s.jsx(pe,{to:"/",className:"absolute left-1/2 -translate-x-1/2",children:s.jsx("img",{src:VU,alt:"NŌTO",className:"h-8"})}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsxs("nav",{className:"hidden lg:flex items-center gap-6 text-sm",children:[s.jsxs(PN,{children:[s.jsxs(IN,{className:"flex items-center gap-1 hover:text-primary transition-colors outline-none",children:["À PROPOS",s.jsx(If,{className:"h-4 w-4"})]}),s.jsxs(g1,{align:"end",className:"w-48",children:[s.jsx(Tc,{asChild:!0,children:s.jsx(pe,{to:"/notre-marque",className:"w-full cursor-pointer",children:"Notre Marque"})}),s.jsx(Tc,{asChild:!0,children:s.jsx(pe,{to:"/notre-cbd",className:"w-full cursor-pointer",children:"Notre CBD"})}),s.jsx(Tc,{asChild:!0,children:s.jsx(pe,{to:"/faq",className:"w-full cursor-pointer",children:"FAQ - Tout sur le CBD"})})]})]}),s.jsx(pe,{to:"/blog",className:"hover:text-primary transition-colors",children:"BLOG"}),s.jsx(pe,{to:"/temoignages",className:"hover:text-primary transition-colors",children:"AVIS"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(se,{variant:"ghost",size:"icon",asChild:!0,children:s.jsx(pe,{to:"/mon-compte",children:s.jsx(N4,{className:"h-5 w-5"})})}),s.jsx(se,{variant:"ghost",size:"icon",className:"relative",asChild:!0,children:s.jsxs(pe,{to:"/panier",children:[s.jsx(ga,{className:"h-5 w-5"}),r()>0&&s.jsx("span",{className:"absolute -top-1 -right-1 bg-primary text-primary-foreground text-xs rounded-full h-5 w-5 flex items-center justify-center",children:r()})]})})]})]})]})}),e&&s.jsx("div",{className:"lg:hidden border-t bg-background p-4",children:s.jsxs("nav",{className:"flex flex-col gap-4",children:[s.jsx(pe,{to:"/produits",className:"hover:text-primary transition-colors",onClick:()=>t(!1),children:"TOUS LES PRODUITS"}),s.jsxs("div",{className:"pl-0",children:[s.jsx("span",{className:"font-medium text-foreground",children:"PROGRAMME DE FIDÉLITÉ"}),s.jsxs("div",{className:"pl-4 mt-2 flex flex-col gap-2",children:[s.jsx(pe,{to:"/programme-fidelite",className:"text-muted-foreground hover:text-primary transition-colors",onClick:()=>t(!1),children:"Le programme"}),s.jsx(pe,{to:"/boutique-fidelite",className:"text-muted-foreground hover:text-primary transition-colors",onClick:()=>t(!1),children:"Boutique cadeau"})]})]}),s.jsxs("div",{className:"pl-0",children:[s.jsx("span",{className:"font-medium text-foreground",children:"À PROPOS"}),s.jsxs("div",{className:"pl-4 mt-2 flex flex-col gap-2",children:[s.jsx(pe,{to:"/notre-marque",className:"text-muted-foreground hover:text-primary transition-colors",onClick:()=>t(!1),children:"Notre Marque"}),s.jsx(pe,{to:"/notre-cbd",className:"text-muted-foreground hover:text-primary transition-colors",onClick:()=>t(!1),children:"Notre CBD"}),s.jsx(pe,{to:"/faq",className:"text-muted-foreground hover:text-primary transition-colors",onClick:()=>t(!1),children:"FAQ - Tout sur le CBD"})]})]}),s.jsx(pe,{to:"/blog",className:"hover:text-primary transition-colors",onClick:()=>t(!1),children:"BLOG"}),s.jsx(pe,{to:"/temoignages",className:"hover:text-primary transition-colors",onClick:()=>t(!1),children:"AVIS"})]})})]})]})},fz="/assets/hero-oils-4IsR29eq.webp",hz=()=>s.jsxs("section",{className:"relative bg-gradient-to-br from-primary-light via-background to-primary-light/50 py-12 lg:py-20 overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-20 left-10 w-64 h-64 bg-primary/5 rounded-full blur-3xl"}),s.jsx("div",{className:"absolute bottom-20 right-10 w-96 h-96 bg-primary/10 rounded-full blur-3xl"})]}),s.jsx("div",{className:"container mx-auto px-4 relative z-10",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-16 items-center",children:[s.jsxs("div",{className:"order-2 lg:order-1 relative",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/20 to-primary/5 rounded-3xl transform rotate-3 scale-105 group-hover:rotate-6 transition-transform duration-500"}),s.jsx("img",{src:fz,alt:"Produits NŌTO CBD premium",className:"relative rounded-3xl shadow-2xl w-full transform group-hover:scale-[1.02] transition-transform duration-500"})]}),s.jsx("div",{className:"absolute -top-4 -right-4 lg:top-4 lg:-right-8 bg-background rounded-2xl shadow-xl p-4 animate-fade-in hidden md:block",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(ss,{className:"w-6 h-6 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-bold text-primary",children:"100% Naturel"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Made in France"})]})]})}),s.jsx("div",{className:"absolute -bottom-4 -left-4 lg:bottom-8 lg:-left-8 bg-background rounded-2xl shadow-xl p-4 animate-fade-in hidden md:block",style:{animationDelay:"0.2s"},children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(On,{className:"w-6 h-6 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-bold text-primary",children:"Qualité Premium"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Labo Breton"})]})]})})]}),s.jsxs("div",{className:"order-1 lg:order-2 space-y-6 lg:space-y-8",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 rounded-full px-4 py-2",children:[s.jsx(Fo,{className:"w-4 h-4 text-primary"}),s.jsx("span",{className:"text-sm font-semibold text-primary",children:"Bien-être naturel"})]}),s.jsxs("h1",{className:"text-3xl sm:text-4xl lg:text-5xl xl:text-6xl font-bold text-primary leading-tight",children:["Soulager le corps,",s.jsx("br",{}),s.jsx("span",{className:"text-foreground",children:"Apaiser l'esprit"})]}),s.jsx("p",{className:"text-base lg:text-lg text-muted-foreground max-w-lg",children:"Découvrez notre gamme de produits CBD premium, développés en Bretagne pour vous aider à retrouver sérénité et bien-être au quotidien."}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 py-4",children:[s.jsxs("div",{className:"text-center p-3 bg-background/50 rounded-xl",children:[s.jsx("p",{className:"text-2xl lg:text-3xl font-bold text-primary",children:"12M"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Français touchés"})]}),s.jsxs("div",{className:"text-center p-3 bg-background/50 rounded-xl",children:[s.jsx("p",{className:"text-2xl lg:text-3xl font-bold text-primary",children:"1/5"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Stress & Anxiété"})]}),s.jsxs("div",{className:"text-center p-3 bg-background/50 rounded-xl",children:[s.jsx("p",{className:"text-2xl lg:text-3xl font-bold text-primary",children:"1/3"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Troubles sommeil"})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[s.jsx(pe,{to:"/produits",children:s.jsx(se,{size:"lg",className:"w-full sm:w-auto h-14 px-8 text-lg font-semibold rounded-full shadow-lg hover:shadow-xl transition-all",children:"Découvrir nos produits"})}),s.jsx(se,{variant:"outline",size:"lg",className:"h-14 px-8 text-lg font-semibold rounded-full border-2 border-primary text-primary hover:bg-primary hover:text-primary-foreground transition-all",children:"En savoir plus"})]})]})]})})]}),mz=()=>s.jsx("section",{className:"py-16 bg-background",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"bg-primary rounded-3xl p-12 flex items-center justify-center gap-8 shadow-xl",children:[s.jsx(Yu,{className:"h-16 w-16 text-primary-foreground flex-shrink-0"}),s.jsx("div",{className:"text-center",children:s.jsx("div",{className:"text-7xl font-bold text-primary-foreground",children:"1113"})})]}),s.jsxs("div",{className:"mt-12 space-y-4 text-center",children:[s.jsx("h2",{className:"text-3xl font-bold text-primary",children:"NŌTO est présent dans 1113 Pharmacies"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto",children:"Nous sommes ravis d'annoncer que NŌTO a franchi une étape majeure dans son engagement à rendre le CBD accessible à tous. Aujourd'hui, notre laboratoire est fièrement présent dans 1113 pharmacies à travers la France !"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto",children:"Cette présence étendue dans les pharmacies françaises marque un pas important dans notre mission de décomplexer le chanvre et de soutenir le bien-être quotidien de chacun."})]})]})})}),ve=g.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Pe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ve.displayName="Card";const tt=g.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Pe("flex flex-col space-y-1.5 p-6",e),...t}));tt.displayName="CardHeader";const rt=g.forwardRef(({className:e,...t},r)=>s.jsx("h3",{ref:r,className:Pe("text-2xl font-semibold leading-none tracking-tight",e),...t}));rt.displayName="CardTitle";const fa=g.forwardRef(({className:e,...t},r)=>s.jsx("p",{ref:r,className:Pe("text-sm text-muted-foreground",e),...t}));fa.displayName="CardDescription";const Ie=g.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Pe("p-6 pt-0",e),...t}));Ie.displayName="CardContent";const pz=g.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Pe("flex items-center p-6 pt-0",e),...t}));pz.displayName="CardFooter";const xz=Gu("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Je({className:e,variant:t,...r}){return s.jsx("div",{className:Pe(xz({variant:t}),e),...r})}const gz=e=>{if(!e.product_variants||e.product_variants.length===0)return"Prix sur demande";const t=e.product_variants.map(n=>n.price/n.quantity);return`${Math.min(...t).toFixed(2)}€`},Kr=({product:e})=>{const t=gz(e);return s.jsx(pe,{to:`/produit/${e.slug}`,className:"block h-full",children:s.jsxs(ve,{className:"group h-full overflow-hidden border-2 border-transparent hover:border-primary/20 bg-background hover:shadow-2xl transition-all duration-300 rounded-2xl",children:[s.jsxs("div",{className:"relative aspect-square bg-gradient-to-br from-primary-light/50 to-background p-6 overflow-hidden",children:[s.jsx("div",{className:"absolute top-3 left-3 z-10 flex flex-col gap-2",children:e.bestseller&&s.jsxs(Je,{className:"bg-sale text-white px-3 py-1 text-xs font-bold shadow-lg",children:[s.jsx(Nh,{className:"w-3 h-3 mr-1 fill-current"}),"Bestseller"]})}),s.jsx("div",{className:"relative w-full h-full flex items-center justify-center",children:s.jsx("img",{src:e.image_url||"/placeholder.svg",alt:e.name,className:"max-w-full max-h-full object-contain group-hover:scale-110 transition-transform duration-500"})}),s.jsx("div",{className:"absolute inset-0 bg-primary/0 group-hover:bg-primary/5 transition-colors duration-300 flex items-center justify-center",children:s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transform translate-y-4 group-hover:translate-y-0 transition-all duration-300",children:s.jsx("div",{className:"bg-primary text-primary-foreground rounded-full p-3 shadow-xl",children:s.jsx(zl,{className:"w-6 h-6"})})})})]}),s.jsxs("div",{className:"p-5 space-y-3",children:[e.subcategory&&s.jsx(Je,{variant:"outline",className:"px-3 py-1 text-xs font-medium border-primary/30 text-primary bg-primary/5 rounded-full",children:e.subcategory}),s.jsx("h3",{className:"font-bold text-base lg:text-lg text-foreground group-hover:text-primary transition-colors line-clamp-2 min-h-[2.5rem] lg:min-h-[3rem]",children:e.name}),s.jsxs("div",{className:"flex items-baseline gap-1 flex-wrap",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"à partir de"}),s.jsx("span",{className:"text-xl lg:text-2xl font-bold text-primary",children:t}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"/ unité"})]}),s.jsx(se,{className:"w-full h-11 font-semibold rounded-full bg-primary hover:bg-primary-dark text-primary-foreground shadow-md hover:shadow-lg transition-all",children:"Voir le produit"})]})]})})},vz=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Yb extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class FN extends Yb{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class LN extends Yb{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class MN extends Yb{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var v1;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(v1||(v1={}));class yz{constructor(t,{headers:r={},customFetch:n,region:a=v1.Any}={}){this.url=t,this.headers=r,this.region=a,this.fetch=vz(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Ye(this,arguments,void 0,function*(r,n={}){var a;try{const{headers:i,method:o,body:l,signal:c}=n;let u={},{region:d}=n;d||(d=this.region);const f=new URL(`${this.url}/${r}`);d&&d!=="any"&&(u["x-region"]=d,f.searchParams.set("forceFunctionRegion",d));let h;l&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)?typeof Blob<"u"&&l instanceof Blob||l instanceof ArrayBuffer?(u["Content-Type"]="application/octet-stream",h=l):typeof l=="string"?(u["Content-Type"]="text/plain",h=l):typeof FormData<"u"&&l instanceof FormData?h=l:(u["Content-Type"]="application/json",h=JSON.stringify(l)):h=l;const m=yield this.fetch(f.toString(),{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},u),this.headers),i),body:h,signal:c}).catch(w=>{throw w.name==="AbortError"?w:new FN(w)}),v=m.headers.get("x-relay-error");if(v&&v==="true")throw new LN(m);if(!m.ok)throw new MN(m);let p=((a=m.headers.get("Content-Type"))!==null&&a!==void 0?a:"text/plain").split(";")[0].trim(),x;return p==="application/json"?x=yield m.json():p==="application/octet-stream"||p==="application/pdf"?x=yield m.blob():p==="text/event-stream"?x=m:p==="multipart/form-data"?x=yield m.formData():x=yield m.text(),{data:x,error:null,response:m}}catch(i){return i instanceof Error&&i.name==="AbortError"?{data:null,error:new FN(i)}:{data:null,error:i,response:i instanceof MN||i instanceof LN?i.context:void 0}}})}}var qs={};const ad=n5(p$);var fm={},hm={},mm={},pm={},xm={},gm={},BN;function vA(){if(BN)return gm;BN=1,Object.defineProperty(gm,"__esModule",{value:!0});class e extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.code=r.code}}return gm.default=e,gm}var UN;function yA(){if(UN)return xm;UN=1,Object.defineProperty(xm,"__esModule",{value:!0});const t=ad.__importDefault(vA());class r{constructor(a){var i,o;this.shouldThrowOnError=!1,this.method=a.method,this.url=a.url,this.headers=new Headers(a.headers),this.schema=a.schema,this.body=a.body,this.shouldThrowOnError=(i=a.shouldThrowOnError)!==null&&i!==void 0?i:!1,this.signal=a.signal,this.isMaybeSingle=(o=a.isMaybeSingle)!==null&&o!==void 0?o:!1,a.fetch?this.fetch=a.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(a,i){return this.headers=new Headers(this.headers),this.headers.set(a,i),this}then(a,i){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const o=this.fetch;let l=o(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async c=>{var u,d,f,h;let m=null,v=null,p=null,x=c.status,w=c.statusText;if(c.ok){if(this.method!=="HEAD"){const C=await c.text();C===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((u=this.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?v=C:v=JSON.parse(C))}const b=(d=this.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),N=(f=c.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");b&&N&&N.length>1&&(p=parseInt(N[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(v)&&(v.length>1?(m={code:"PGRST116",details:`Results contain ${v.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},v=null,p=null,x=406,w="Not Acceptable"):v.length===1?v=v[0]:v=null)}else{const b=await c.text();try{m=JSON.parse(b),Array.isArray(m)&&c.status===404&&(v=[],m=null,x=200,w="OK")}catch{c.status===404&&b===""?(x=204,w="No Content"):m={message:b}}if(m&&this.isMaybeSingle&&(!((h=m==null?void 0:m.details)===null||h===void 0)&&h.includes("0 rows"))&&(m=null,x=200,w="OK"),m&&this.shouldThrowOnError)throw new t.default(m)}return{error:m,data:v,count:p,status:x,statusText:w}});return this.shouldThrowOnError||(l=l.catch(c=>{var u,d,f;return{error:{message:`${(u=c==null?void 0:c.name)!==null&&u!==void 0?u:"FetchError"}: ${c==null?void 0:c.message}`,details:`${(d=c==null?void 0:c.stack)!==null&&d!==void 0?d:""}`,hint:"",code:`${(f=c==null?void 0:c.code)!==null&&f!==void 0?f:""}`},data:null,count:null,status:0,statusText:""}})),l.then(a,i)}returns(){return this}overrideTypes(){return this}}return xm.default=r,xm}var $N;function bA(){if($N)return pm;$N=1,Object.defineProperty(pm,"__esModule",{value:!0});const t=ad.__importDefault(yA());class r extends t.default{select(a){let i=!1;const o=(a??"*").split("").map(l=>/\s/.test(l)&&!i?"":(l==='"'&&(i=!i),l)).join("");return this.url.searchParams.set("select",o),this.headers.append("Prefer","return=representation"),this}order(a,{ascending:i=!0,nullsFirst:o,foreignTable:l,referencedTable:c=l}={}){const u=c?`${c}.order`:"order",d=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${d?`${d},`:""}${a}.${i?"asc":"desc"}${o===void 0?"":o?".nullsfirst":".nullslast"}`),this}limit(a,{foreignTable:i,referencedTable:o=i}={}){const l=typeof o>"u"?"limit":`${o}.limit`;return this.url.searchParams.set(l,`${a}`),this}range(a,i,{foreignTable:o,referencedTable:l=o}={}){const c=typeof l>"u"?"offset":`${l}.offset`,u=typeof l>"u"?"limit":`${l}.limit`;return this.url.searchParams.set(c,`${a}`),this.url.searchParams.set(u,`${i-a+1}`),this}abortSignal(a){return this.signal=a,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:a=!1,verbose:i=!1,settings:o=!1,buffers:l=!1,wal:c=!1,format:u="text"}={}){var d;const f=[a?"analyze":null,i?"verbose":null,o?"settings":null,l?"buffers":null,c?"wal":null].filter(Boolean).join("|"),h=(d=this.headers.get("Accept"))!==null&&d!==void 0?d:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${h}"; options=${f};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(a){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${a}`),this}}return pm.default=r,pm}var qN;function Xb(){if(qN)return mm;qN=1,Object.defineProperty(mm,"__esModule",{value:!0});const t=ad.__importDefault(bA()),r=new RegExp("[,()]");class n extends t.default{eq(i,o){return this.url.searchParams.append(i,`eq.${o}`),this}neq(i,o){return this.url.searchParams.append(i,`neq.${o}`),this}gt(i,o){return this.url.searchParams.append(i,`gt.${o}`),this}gte(i,o){return this.url.searchParams.append(i,`gte.${o}`),this}lt(i,o){return this.url.searchParams.append(i,`lt.${o}`),this}lte(i,o){return this.url.searchParams.append(i,`lte.${o}`),this}like(i,o){return this.url.searchParams.append(i,`like.${o}`),this}likeAllOf(i,o){return this.url.searchParams.append(i,`like(all).{${o.join(",")}}`),this}likeAnyOf(i,o){return this.url.searchParams.append(i,`like(any).{${o.join(",")}}`),this}ilike(i,o){return this.url.searchParams.append(i,`ilike.${o}`),this}ilikeAllOf(i,o){return this.url.searchParams.append(i,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(i,o){return this.url.searchParams.append(i,`ilike(any).{${o.join(",")}}`),this}is(i,o){return this.url.searchParams.append(i,`is.${o}`),this}in(i,o){const l=Array.from(new Set(o)).map(c=>typeof c=="string"&&r.test(c)?`"${c}"`:`${c}`).join(",");return this.url.searchParams.append(i,`in.(${l})`),this}contains(i,o){return typeof o=="string"?this.url.searchParams.append(i,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(i,`cs.{${o.join(",")}}`):this.url.searchParams.append(i,`cs.${JSON.stringify(o)}`),this}containedBy(i,o){return typeof o=="string"?this.url.searchParams.append(i,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(i,`cd.{${o.join(",")}}`):this.url.searchParams.append(i,`cd.${JSON.stringify(o)}`),this}rangeGt(i,o){return this.url.searchParams.append(i,`sr.${o}`),this}rangeGte(i,o){return this.url.searchParams.append(i,`nxl.${o}`),this}rangeLt(i,o){return this.url.searchParams.append(i,`sl.${o}`),this}rangeLte(i,o){return this.url.searchParams.append(i,`nxr.${o}`),this}rangeAdjacent(i,o){return this.url.searchParams.append(i,`adj.${o}`),this}overlaps(i,o){return typeof o=="string"?this.url.searchParams.append(i,`ov.${o}`):this.url.searchParams.append(i,`ov.{${o.join(",")}}`),this}textSearch(i,o,{config:l,type:c}={}){let u="";c==="plain"?u="pl":c==="phrase"?u="ph":c==="websearch"&&(u="w");const d=l===void 0?"":`(${l})`;return this.url.searchParams.append(i,`${u}fts${d}.${o}`),this}match(i){return Object.entries(i).forEach(([o,l])=>{this.url.searchParams.append(o,`eq.${l}`)}),this}not(i,o,l){return this.url.searchParams.append(i,`not.${o}.${l}`),this}or(i,{foreignTable:o,referencedTable:l=o}={}){const c=l?`${l}.or`:"or";return this.url.searchParams.append(c,`(${i})`),this}filter(i,o,l){return this.url.searchParams.append(i,`${o}.${l}`),this}}return mm.default=n,mm}var zN;function wA(){if(zN)return hm;zN=1,Object.defineProperty(hm,"__esModule",{value:!0});const t=ad.__importDefault(Xb());class r{constructor(a,{headers:i={},schema:o,fetch:l}){this.url=a,this.headers=new Headers(i),this.schema=o,this.fetch=l}select(a,i){const{head:o=!1,count:l}=i??{},c=o?"HEAD":"GET";let u=!1;const d=(a??"*").split("").map(f=>/\s/.test(f)&&!u?"":(f==='"'&&(u=!u),f)).join("");return this.url.searchParams.set("select",d),l&&this.headers.append("Prefer",`count=${l}`),new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(a,{count:i,defaultToNull:o=!0}={}){var l;const c="POST";if(i&&this.headers.append("Prefer",`count=${i}`),o||this.headers.append("Prefer","missing=default"),Array.isArray(a)){const u=a.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(u.length>0){const d=[...new Set(u)].map(f=>`"${f}"`);this.url.searchParams.set("columns",d.join(","))}}return new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:(l=this.fetch)!==null&&l!==void 0?l:fetch})}upsert(a,{onConflict:i,ignoreDuplicates:o=!1,count:l,defaultToNull:c=!0}={}){var u;const d="POST";if(this.headers.append("Prefer",`resolution=${o?"ignore":"merge"}-duplicates`),i!==void 0&&this.url.searchParams.set("on_conflict",i),l&&this.headers.append("Prefer",`count=${l}`),c||this.headers.append("Prefer","missing=default"),Array.isArray(a)){const f=a.reduce((h,m)=>h.concat(Object.keys(m)),[]);if(f.length>0){const h=[...new Set(f)].map(m=>`"${m}"`);this.url.searchParams.set("columns",h.join(","))}}return new t.default({method:d,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}update(a,{count:i}={}){var o;const l="PATCH";return i&&this.headers.append("Prefer",`count=${i}`),new t.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:a,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}delete({count:a}={}){var i;const o="DELETE";return a&&this.headers.append("Prefer",`count=${a}`),new t.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}}return hm.default=r,hm}var VN;function bz(){if(VN)return fm;VN=1,Object.defineProperty(fm,"__esModule",{value:!0});const e=ad,t=e.__importDefault(wA()),r=e.__importDefault(Xb());class n{constructor(i,{headers:o={},schema:l,fetch:c}={}){this.url=i,this.headers=new Headers(o),this.schemaName=l,this.fetch=c}from(i){const o=new URL(`${this.url}/${i}`);return new t.default(o,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(i){return new n(this.url,{headers:this.headers,schema:i,fetch:this.fetch})}rpc(i,o={},{head:l=!1,get:c=!1,count:u}={}){var d;let f;const h=new URL(`${this.url}/rpc/${i}`);let m;l||c?(f=l?"HEAD":"GET",Object.entries(o).filter(([p,x])=>x!==void 0).map(([p,x])=>[p,Array.isArray(x)?`{${x.join(",")}}`:`${x}`]).forEach(([p,x])=>{h.searchParams.append(p,x)})):(f="POST",m=o);const v=new Headers(this.headers);return u&&v.set("Prefer",`count=${u}`),new r.default({method:f,url:h,headers:v,schema:this.schemaName,body:m,fetch:(d=this.fetch)!==null&&d!==void 0?d:fetch})}}return fm.default=n,fm}Object.defineProperty(qs,"__esModule",{value:!0});var jA=qs.PostgrestError=DA=qs.PostgrestBuilder=AA=qs.PostgrestTransformBuilder=kA=qs.PostgrestFilterBuilder=SA=qs.PostgrestQueryBuilder=_A=qs.PostgrestClient=void 0;const id=ad,NA=id.__importDefault(bz());var _A=qs.PostgrestClient=NA.default;const CA=id.__importDefault(wA());var SA=qs.PostgrestQueryBuilder=CA.default;const EA=id.__importDefault(Xb());var kA=qs.PostgrestFilterBuilder=EA.default;const TA=id.__importDefault(bA());var AA=qs.PostgrestTransformBuilder=TA.default;const RA=id.__importDefault(yA());var DA=qs.PostgrestBuilder=RA.default;const OA=id.__importDefault(vA());jA=qs.PostgrestError=OA.default;var PA=qs.default={PostgrestClient:NA.default,PostgrestQueryBuilder:CA.default,PostgrestFilterBuilder:EA.default,PostgrestTransformBuilder:TA.default,PostgrestBuilder:RA.default,PostgrestError:OA.default};const wz=Object.freeze(Object.defineProperty({__proto__:null,get PostgrestBuilder(){return DA},get PostgrestClient(){return _A},get PostgrestError(){return jA},get PostgrestFilterBuilder(){return kA},get PostgrestQueryBuilder(){return SA},get PostgrestTransformBuilder(){return AA},default:PA},Symbol.toStringTag,{value:"Module"})),{PostgrestClient:jz,PostgrestQueryBuilder:Nle,PostgrestFilterBuilder:_le,PostgrestTransformBuilder:Cle,PostgrestBuilder:Sle,PostgrestError:Ele}=PA||wz;class Nz{static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,a=parseInt(n.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
import ws from "ws"
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`

Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const _z="2.80.0",Cz=`realtime-js/${_z}`,Sz="1.0.0",y1=1e4,Ez=1e3,kz=100;var sf;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(sf||(sf={}));var Rr;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Rr||(Rr={}));var ea;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(ea||(ea={}));var b1;(function(e){e.websocket="websocket"})(b1||(b1={}));var ul;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(ul||(ul={}));class Tz{constructor(){this.HEADER_LENGTH=1}decode(t,r){return t.constructor===ArrayBuffer?r(this._binaryDecode(t)):r(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const r=new DataView(t),n=new TextDecoder;return this._decodeBroadcast(t,r,n)}_decodeBroadcast(t,r,n){const a=r.getUint8(1),i=r.getUint8(2);let o=this.HEADER_LENGTH+2;const l=n.decode(t.slice(o,o+a));o=o+a;const c=n.decode(t.slice(o,o+i));o=o+i;const u=JSON.parse(n.decode(t.slice(o,t.byteLength)));return{ref:null,topic:l,event:c,payload:u}}}class IA{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Wt;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Wt||(Wt={}));const HN=(e,t,r={})=>{var n;const a=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=Az(o,e,t,a),i),{}):{}},Az=(e,t,r,n)=>{const a=t.find(l=>l.name===e),i=a==null?void 0:a.type,o=r[e];return i&&!n.includes(i)?FA(i,o):w1(o)},FA=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return Pz(t,r)}switch(e){case Wt.bool:return Rz(t);case Wt.float4:case Wt.float8:case Wt.int2:case Wt.int4:case Wt.int8:case Wt.numeric:case Wt.oid:return Dz(t);case Wt.json:case Wt.jsonb:return Oz(t);case Wt.timestamp:return Iz(t);case Wt.abstime:case Wt.date:case Wt.daterange:case Wt.int4range:case Wt.int8range:case Wt.money:case Wt.reltime:case Wt.text:case Wt.time:case Wt.timestamptz:case Wt.timetz:case Wt.tsrange:case Wt.tstzrange:return w1(t);default:return w1(t)}},w1=e=>e,Rz=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Dz=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Oz=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},Pz=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let i;const o=e.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(l=>FA(t,l))}return e},Iz=e=>typeof e=="string"?e.replace(" ","T"):e,LA=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class gg{constructor(t,r,n={},a=y1){this.channel=t,this.event=r,this.payload=n,this.timeout=a,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var WN;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(WN||(WN={}));class nf{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},a=>{const{onJoin:i,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=nf.syncState(this.state,a,i,o),this.pendingDiffs.forEach(c=>{this.state=nf.syncDiff(this.state,c,i,o)}),this.pendingDiffs=[],l()}),this.channel._on(n.diff,{},a=>{const{onJoin:i,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(a):(this.state=nf.syncDiff(this.state,a,i,o),l())}),this.onJoin((a,i,o)=>{this.channel._trigger("presence",{event:"join",key:a,currentPresences:i,newPresences:o})}),this.onLeave((a,i,o)=>{this.channel._trigger("presence",{event:"leave",key:a,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,a){const i=this.cloneDeep(t),o=this.transformState(r),l={},c={};return this.map(i,(u,d)=>{o[u]||(c[u]=d)}),this.map(o,(u,d)=>{const f=i[u];if(f){const h=d.map(x=>x.presence_ref),m=f.map(x=>x.presence_ref),v=d.filter(x=>m.indexOf(x.presence_ref)<0),p=f.filter(x=>h.indexOf(x.presence_ref)<0);v.length>0&&(l[u]=v),p.length>0&&(c[u]=p)}else l[u]=d}),this.syncDiff(i,{joins:l,leaves:c},n,a)}static syncDiff(t,r,n,a){const{joins:i,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),a||(a=()=>{}),this.map(i,(l,c)=>{var u;const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const f=t[l].map(m=>m.presence_ref),h=d.filter(m=>f.indexOf(m.presence_ref)<0);t[l].unshift(...h)}n(l,d,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(f=>f.presence_ref);u=u.filter(f=>d.indexOf(f.presence_ref)<0),t[l]=u,a(l,u,c),u.length===0&&delete t[l]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const a=t[n];return"metas"in a?r[n]=a.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):r[n]=a,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var GN;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(GN||(GN={}));var af;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(af||(af={}));var ni;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(ni||(ni={}));class Qb{constructor(t,r={config:{}},n){var a,i;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Rr.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new gg(this,ea.join,this.params,this.timeout),this.rejoinTimer=new IA(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Rr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Rr.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Rr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Rr.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=Rr.errored,this.rejoinTimer.scheduleTimeout())}),this._on(ea.reply,{},(o,l)=>{this._trigger(this._replyEventName(l),o)}),this.presence=new nf(this),this.broadcastEndpointURL=LA(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(a=this.params.config)===null||a===void 0?void 0:a.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,a,i;if(this.socket.isConnected()||this.socket.connect(),this.state==Rr.closed){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(a=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(m=>m.filter))!==null&&a!==void 0?a:[],d=!!this.bindings[af.PRESENCE]&&this.bindings[af.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,f={},h={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(m=>t==null?void 0:t(ni.CHANNEL_ERROR,m)),this._onClose(()=>t==null?void 0:t(ni.CLOSED)),this.updateJoinPayload(Object.assign({config:h},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:m})=>{var v;if(this.socket.setAuth(),m===void 0){t==null||t(ni.SUBSCRIBED);return}else{const p=this.bindings.postgres_changes,x=(v=p==null?void 0:p.length)!==null&&v!==void 0?v:0,w=[];for(let y=0;y<x;y++){const b=p[y],{filter:{event:N,schema:C,table:_,filter:j}}=b,S=m&&m[y];if(S&&S.event===N&&S.schema===C&&S.table===_&&S.filter===j)w.push(Object.assign(Object.assign({},b),{id:S.id}));else{this.unsubscribe(),this.state=Rr.errored,t==null||t(ni.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=w,t&&t(ni.SUBSCRIBED);return}}).receive("error",m=>{this.state=Rr.errored,t==null||t(ni.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(ni.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===Rr.joined&&t===af.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var a;const i=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(r==null)return Promise.reject("Payload is required for httpSend()");const o={method:"POST",headers:{Authorization:i,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(a=n.timeout)!==null&&a!==void 0?a:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,a;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,c={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((a=u.body)===null||a===void 0?void 0:a.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,l,c;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Rr.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(ea.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(a=>{n=new gg(this,ea.leave,{},t),n.receive("ok",()=>{r(),a("ok")}).receive("timeout",()=>{r(),a("timed out")}).receive("error",()=>{a("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Rr.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const a=new AbortController,i=setTimeout(()=>a.abort(),n),o=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:a.signal}));return clearTimeout(i),o}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let a=new gg(this,t,r,n);return this._canPush()?a.send():this._addToPushBuffer(a),a}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>kz){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var a,i;const o=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=ea;if(n&&[l,c,u,d].indexOf(o)>=0&&n!==this._joinRef())return;let h=this._onMessage(o,r,n);if(r&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(a=this.bindings.postgres_changes)===null||a===void 0||a.filter(m=>{var v,p,x;return((v=m.filter)===null||v===void 0?void 0:v.event)==="*"||((x=(p=m.filter)===null||p===void 0?void 0:p.event)===null||x===void 0?void 0:x.toLocaleLowerCase())===o}).map(m=>m.callback(h,n)):(i=this.bindings[o])===null||i===void 0||i.filter(m=>{var v,p,x,w,y,b;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in m){const N=m.id,C=(v=m.filter)===null||v===void 0?void 0:v.event;return N&&((p=r.ids)===null||p===void 0?void 0:p.includes(N))&&(C==="*"||(C==null?void 0:C.toLocaleLowerCase())===((x=r.data)===null||x===void 0?void 0:x.type.toLocaleLowerCase()))}else{const N=(y=(w=m==null?void 0:m.filter)===null||w===void 0?void 0:w.event)===null||y===void 0?void 0:y.toLocaleLowerCase();return N==="*"||N===((b=r==null?void 0:r.event)===null||b===void 0?void 0:b.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===o}).map(m=>{if(typeof h=="object"&&"ids"in h){const v=h.data,{schema:p,table:x,commit_timestamp:w,type:y,errors:b}=v;h=Object.assign(Object.assign({},{schema:p,table:x,commit_timestamp:w,eventType:y,new:{},old:{},errors:b}),this._getPayloadRecords(v))}m.callback(h,n)})}_isClosed(){return this.state===Rr.closed}_isJoined(){return this.state===Rr.joined}_isJoining(){return this.state===Rr.joining}_isLeaving(){return this.state===Rr.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const a=t.toLocaleLowerCase(),i={type:a,filter:r,callback:n};return this.bindings[a]?this.bindings[a].push(i):this.bindings[a]=[i],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(a=>{var i;return!(((i=a.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===n&&Qb.isEqual(a.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(ea.close,{},t)}_onError(t){this._on(ea.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Rr.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=HN(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=HN(t.columns,t.old_record)),r}}const vg=()=>{},vm={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Fz=[1e3,2e3,5e3,1e4],Lz=1e4,Mz=`
  addEventListener("message", (e) => {
    if (e.data.event === "start") {
      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
    }
  });`;class Bz{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=y1,this.transport=null,this.heartbeatIntervalMs=vm.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=vg,this.ref=0,this.reconnectTimer=null,this.logger=vg,this.conn=null,this.sendBuffer=[],this.serializer=new Tz,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=a=>a?(...i)=>a(...i):(...i)=>fetch(...i),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${b1.websocket}`,this.httpEndpoint=LA(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=Nz.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r}

To use Realtime in Node.js, you need to provide a WebSocket implementation:

Option 1: Use Node.js 22+ which has native WebSocket support
Option 2: Install and provide the "ws" package:

  npm install ws

  import ws from "ws"
  const client = new RealtimeClient(url, {
    ...options,
    transport: ws
  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:Sz}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},t?this.conn.close(t,r??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case sf.connecting:return ul.Connecting;case sf.open:return ul.Open;case sf.closing:return ul.Closing;default:return ul.Closed}}isConnected(){return this.connectionState()===ul.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,a=this.getChannels().find(i=>i.topic===n);if(a)return a;{const i=new Qb(`realtime:${t}`,r,this);return this.channels.push(i),i}}push(t){const{topic:r,event:n,payload:a,ref:i}=t,o=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${r} ${n} (${i})`,a),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(Ez,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout()},vm.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:a,payload:i,ref:o}=r,l=o?`(${o})`:"",c=i.status||"";this.log("receive",`${c} ${n} ${a} ${l}`.trim(),i),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(a,i,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(ea.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",a=new URLSearchParams(r);return`${t}${n}${a}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([Mz],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r;t?r=t:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const a={access_token:r,version:Cz};r&&n.updateJoinPayload(a),n.joinedOnce&&n._isJoined()&&n._push(ea.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(r=>{this.log("error",`error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(a){this.log("error",`error in ${t} callback`,a)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new IA(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},vm.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,a,i,o,l,c,u,d;if(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:y1,this.heartbeatIntervalMs=(a=t==null?void 0:t.heartbeatIntervalMs)!==null&&a!==void 0?a:vm.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(l=t==null?void 0:t.heartbeatCallback)!==null&&l!==void 0?l:vg,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:f=>Fz[f-1]||Lz,this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(f,h)=>h(JSON.stringify(f)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}class Jb extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function rr(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class Uz extends Jb{constructor(t,r,n){super(t),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class j1 extends Jb{constructor(t,r){super(t),this.name="StorageUnknownError",this.originalError=r}}const Zb=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),$z=()=>Response,N1=e=>{if(Array.isArray(e))return e.map(r=>N1(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const a=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[a]=N1(n)}),t},qz=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},yg=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},zz=(e,t,r)=>Ye(void 0,void 0,void 0,function*(){const n=yield $z();e instanceof n&&!(r!=null&&r.noResolveJson)?e.json().then(a=>{const i=e.status||500,o=(a==null?void 0:a.statusCode)||i+"";t(new Uz(yg(a),i,o))}).catch(a=>{t(new j1(yg(a),a))}):t(new j1(yg(e),e))}),Vz=(e,t,r,n)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?a:(qz(n)?(a.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),a.body=JSON.stringify(n)):a.body=n,t!=null&&t.duplex&&(a.duplex=t.duplex),Object.assign(Object.assign({},a),r))};function Th(e,t,r,n,a,i){return Ye(this,void 0,void 0,function*(){return new Promise((o,l)=>{e(r,Vz(t,n,a,i)).then(c=>{if(!c.ok)throw c;return n!=null&&n.noResolveJson?c:c.json()}).then(c=>o(c)).catch(c=>zz(c,l,n))})})}function Hf(e,t,r,n){return Ye(this,void 0,void 0,function*(){return Th(e,"GET",t,r,n)})}function Xn(e,t,r,n,a){return Ye(this,void 0,void 0,function*(){return Th(e,"POST",t,n,a,r)})}function _1(e,t,r,n,a){return Ye(this,void 0,void 0,function*(){return Th(e,"PUT",t,n,a,r)})}function Hz(e,t,r,n){return Ye(this,void 0,void 0,function*(){return Th(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function ew(e,t,r,n,a){return Ye(this,void 0,void 0,function*(){return Th(e,"DELETE",t,n,a,r)})}class Wz{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r}then(t,r){return this.execute().then(t,r)}execute(){return Ye(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(rr(t))return{data:null,error:t};throw t}})}}var MA;class Gz{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r,this[MA]="BlobDownloadBuilder",this.promise=null}asStream(){return new Wz(this.downloadFn,this.shouldThrowOnError)}then(t,r){return this.getPromise().then(t,r)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return Ye(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(rr(t))return{data:null,error:t};throw t}})}}MA=Symbol.toStringTag;const Kz={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},KN={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class Yz{constructor(t,r={},n,a){this.shouldThrowOnError=!1,this.url=t,this.headers=r,this.bucketId=n,this.fetch=Zb(a)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,r,n,a){return Ye(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},KN),a);let l=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",this.encodeMetadata(c)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),c&&!i.has("metadata")&&i.append("metadata",this.encodeMetadata(c))):(i=n,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=this.toBase64(this.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),a!=null&&a.headers&&(l=Object.assign(Object.assign({},l),a.headers));const u=this._removeEmptyFolders(r),d=this._getFinalPath(u),f=yield(t=="PUT"?_1:Xn)(this.fetch,`${this.url}/object/${d}`,i,Object.assign({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:f.Id,fullPath:f.Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(rr(i))return{data:null,error:i};throw i}})}upload(t,r,n){return Ye(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,r,n)})}uploadToSignedUrl(t,r,n,a){return Ye(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(t),o=this._getFinalPath(i),l=new URL(this.url+`/object/upload/sign/${o}`);l.searchParams.set("token",r);try{let c;const u=Object.assign({upsert:KN.upsert},a),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",u.cacheControl)):(c=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType);const f=yield _1(this.fetch,l.toString(),c,{headers:d});return{data:{path:i,fullPath:f.Key},error:null}}catch(c){if(this.shouldThrowOnError)throw c;if(rr(c))return{data:null,error:c};throw c}})}createSignedUploadUrl(t,r){return Ye(this,void 0,void 0,function*(){try{let n=this._getFinalPath(t);const a=Object.assign({},this.headers);r!=null&&r.upsert&&(a["x-upsert"]="true");const i=yield Xn(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:a}),o=new URL(this.url+i.url),l=o.searchParams.get("token");if(!l)throw new Jb("No token returned by API");return{data:{signedUrl:o.toString(),path:t,token:l},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(rr(n))return{data:null,error:n};throw n}})}update(t,r,n){return Ye(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,r,n)})}move(t,r,n){return Ye(this,void 0,void 0,function*(){try{return{data:yield Xn(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(rr(a))return{data:null,error:a};throw a}})}copy(t,r,n){return Ye(this,void 0,void 0,function*(){try{return{data:{path:(yield Xn(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(rr(a))return{data:null,error:a};throw a}})}createSignedUrl(t,r,n){return Ye(this,void 0,void 0,function*(){try{let a=this._getFinalPath(t),i=yield Xn(this.fetch,`${this.url}/object/sign/${a}`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(rr(a))return{data:null,error:a};throw a}})}createSignedUrls(t,r,n){return Ye(this,void 0,void 0,function*(){try{const a=yield Xn(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:t},{headers:this.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:a.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(rr(a))return{data:null,error:a};throw a}})}download(t,r){const a=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),o=i?`?${i}`:"",l=this._getFinalPath(t),c=()=>Hf(this.fetch,`${this.url}/${a}/${l}${o}`,{headers:this.headers,noResolveJson:!0});return new Gz(c,this.shouldThrowOnError)}info(t){return Ye(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{const n=yield Hf(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:N1(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(rr(n))return{data:null,error:n};throw n}})}exists(t){return Ye(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{return yield Hz(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(rr(n)&&n instanceof j1){const a=n.originalError;if([400,404].includes(a==null?void 0:a.status))return{data:!1,error:n}}throw n}})}getPublicUrl(t,r){const n=this._getFinalPath(t),a=[],i=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";i!==""&&a.push(i);const l=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",c=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});c!==""&&a.push(c);let u=a.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${n}${u}`)}}}remove(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield ew(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rr(r))return{data:null,error:r};throw r}})}list(t,r,n){return Ye(this,void 0,void 0,function*(){try{const a=Object.assign(Object.assign(Object.assign({},Kz),r),{prefix:t||""});return{data:yield Xn(this.fetch,`${this.url}/object/list/${this.bucketId}`,a,{headers:this.headers},n),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(rr(a))return{data:null,error:a};throw a}})}listV2(t,r){return Ye(this,void 0,void 0,function*(){try{const n=Object.assign({},t);return{data:yield Xn(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(rr(n))return{data:null,error:n};throw n}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const r=[];return t.width&&r.push(`width=${t.width}`),t.height&&r.push(`height=${t.height}`),t.resize&&r.push(`resize=${t.resize}`),t.format&&r.push(`format=${t.format}`),t.quality&&r.push(`quality=${t.quality}`),r.join("&")}}const BA="2.80.0",UA={"X-Client-Info":`storage-js/${BA}`};class Xz{constructor(t,r={},n,a){this.shouldThrowOnError=!1;const i=new URL(t);a!=null&&a.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},UA),r),this.fetch=Zb(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(t){return Ye(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(t);return{data:yield Hf(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rr(r))return{data:null,error:r};throw r}})}getBucket(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield Hf(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rr(r))return{data:null,error:r};throw r}})}createBucket(t){return Ye(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield Xn(this.fetch,`${this.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(rr(a))return{data:null,error:a};throw a}})}updateBucket(t,r){return Ye(this,void 0,void 0,function*(){try{return{data:yield _1(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(rr(n))return{data:null,error:n};throw n}})}emptyBucket(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield Xn(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rr(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield ew(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rr(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(t){const r={};return t&&("limit"in t&&(r.limit=String(t.limit)),"offset"in t&&(r.offset=String(t.offset)),t.search&&(r.search=t.search),t.sortColumn&&(r.sortColumn=t.sortColumn),t.sortOrder&&(r.sortOrder=t.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}class Qz{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},UA),r),this.fetch=Zb(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield Xn(this.fetch,`${this.url}/bucket`,{name:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rr(r))return{data:null,error:r};throw r}})}listBuckets(t){return Ye(this,void 0,void 0,function*(){try{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),a=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield Hf(this.fetch,a,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rr(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield ew(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rr(r))return{data:null,error:r};throw r}})}}const tw={"X-Client-Info":`storage-js/${BA}`,"Content-Type":"application/json"};class $A extends Error{constructor(t){super(t),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function rn(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}class bg extends $A{constructor(t,r,n){super(t),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Jz extends $A{constructor(t,r){super(t),this.name="StorageVectorsUnknownError",this.originalError=r}}var YN;(function(e){e.InternalError="InternalError",e.S3VectorConflictException="S3VectorConflictException",e.S3VectorNotFoundException="S3VectorNotFoundException",e.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",e.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",e.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(YN||(YN={}));const rw=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Zz=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},XN=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),eV=(e,t,r)=>Ye(void 0,void 0,void 0,function*(){if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const a=e.status||500,i=e;if(typeof i.json=="function")i.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||a+"";t(new bg(XN(o),a,l))}).catch(()=>{const o=a+"",l=i.statusText||`HTTP ${a} error`;t(new bg(l,a,o))});else{const o=a+"",l=i.statusText||`HTTP ${a} error`;t(new bg(l,a,o))}}else t(new Jz(XN(e),e))}),tV=(e,t,r,n)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(Zz(n)?(a.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),a.body=JSON.stringify(n)):a.body=n,Object.assign(Object.assign({},a),r)):a};function rV(e,t,r,n,a,i){return Ye(this,void 0,void 0,function*(){return new Promise((o,l)=>{e(r,tV(t,n,a,i)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;const u=c.headers.get("content-type");return!u||!u.includes("application/json")?{}:c.json()}).then(c=>o(c)).catch(c=>eV(c,l,n))})})}function sn(e,t,r,n,a){return Ye(this,void 0,void 0,function*(){return rV(e,"POST",t,n,a,r)})}class sV{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},tw),r),this.fetch=rw(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(t){return Ye(this,void 0,void 0,function*(){try{return{data:(yield sn(this.fetch,`${this.url}/CreateIndex`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}getIndex(t,r){return Ye(this,void 0,void 0,function*(){try{return{data:yield sn(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(rn(n))return{data:null,error:n};throw n}})}listIndexes(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield sn(this.fetch,`${this.url}/ListIndexes`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}deleteIndex(t,r){return Ye(this,void 0,void 0,function*(){try{return{data:(yield sn(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(rn(n))return{data:null,error:n};throw n}})}}class nV{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},tw),r),this.fetch=rw(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(t){return Ye(this,void 0,void 0,function*(){try{if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield sn(this.fetch,`${this.url}/PutVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}getVectors(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield sn(this.fetch,`${this.url}/GetVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}listVectors(t){return Ye(this,void 0,void 0,function*(){try{if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return{data:yield sn(this.fetch,`${this.url}/ListVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}queryVectors(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield sn(this.fetch,`${this.url}/QueryVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}deleteVectors(t){return Ye(this,void 0,void 0,function*(){try{if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield sn(this.fetch,`${this.url}/DeleteVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}}class aV{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},tw),r),this.fetch=rw(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Ye(this,void 0,void 0,function*(){try{return{data:(yield sn(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}getBucket(t){return Ye(this,void 0,void 0,function*(){try{return{data:yield sn(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}listBuckets(){return Ye(this,arguments,void 0,function*(t={}){try{return{data:yield sn(this.fetch,`${this.url}/ListVectorBuckets`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Ye(this,void 0,void 0,function*(){try{return{data:(yield sn(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(rn(r))return{data:null,error:r};throw r}})}}class iV extends aV{constructor(t,r={}){super(t,r.headers||{},r.fetch)}from(t){return new oV(this.url,this.headers,t,this.fetch)}}class oV extends sV{constructor(t,r,n,a){super(t,r,a),this.vectorBucketName=n}createIndex(t){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return Ye(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const t=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return Ye(this,arguments,void 0,function*(r={}){return t.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(t){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return Ye(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,t)})}deleteIndex(t){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return Ye(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,t)})}index(t){return new lV(this.url,this.headers,this.vectorBucketName,t,this.fetch)}}class lV extends nV{constructor(t,r,n,a,i){super(t,r,i),this.vectorBucketName=n,this.indexName=a}putVectors(t){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return Ye(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(t){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return Ye(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const t=Object.create(null,{listVectors:{get:()=>super.listVectors}});return Ye(this,arguments,void 0,function*(r={}){return t.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(t){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return Ye(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(t){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return Ye(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class cV extends Xz{constructor(t,r={},n,a){super(t,r,n,a)}from(t){return new Yz(this.url,this.headers,t,this.fetch)}get vectors(){return new iV(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Qz(this.url+"/iceberg",this.headers,this.fetch)}}const uV="2.80.0";let Ld="";typeof Deno<"u"?Ld="deno":typeof document<"u"?Ld="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ld="react-native":Ld="node";const dV={"X-Client-Info":`supabase-js-${Ld}/${uV}`},fV={headers:dV},hV={schema:"public"},mV={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},pV={},xV=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),gV=()=>Headers,vV=(e,t,r)=>{const n=xV(r),a=gV();return async(i,o)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new a(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),n(i,Object.assign(Object.assign({},o),{headers:u}))}};function yV(e){return e.endsWith("/")?e:e+"/"}function bV(e,t){var r,n;const{db:a,auth:i,realtime:o,global:l}=e,{db:c,auth:u,realtime:d,global:f}=t,h={db:Object.assign(Object.assign({},c),a),auth:Object.assign(Object.assign({},u),i),realtime:Object.assign(Object.assign({},d),o),storage:{},global:Object.assign(Object.assign(Object.assign({},f),l),{headers:Object.assign(Object.assign({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=l==null?void 0:l.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function wV(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(yV(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const qA="2.80.0",Ac=30*1e3,C1=3,wg=C1*Ac,jV="http://localhost:9999",NV="supabase.auth.token",_V={"X-Client-Info":`gotrue-js/${qA}`},S1="X-Supabase-Api-Version",zA={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},CV=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,SV=10*60*1e3;class Wf extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function Qe(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class EV extends Wf{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function kV(e){return Qe(e)&&e.name==="AuthApiError"}class dl extends Wf{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class Qo extends Wf{constructor(t,r,n,a){super(t,n,a),this.name=r,this.status=n}}class Wn extends Qo{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function TV(e){return Qe(e)&&e.name==="AuthSessionMissingError"}class wc extends Qo{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class ym extends Qo{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class bm extends Qo{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function AV(e){return Qe(e)&&e.name==="AuthImplicitGrantRedirectError"}class QN extends Qo{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class E1 extends Qo{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function jg(e){return Qe(e)&&e.name==="AuthRetryableFetchError"}class JN extends Qo{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class k1 extends Qo{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Pp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),ZN=` 	
\r=`.split(""),RV=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<ZN.length;t+=1)e[ZN[t].charCodeAt(0)]=-2;for(let t=0;t<Pp.length;t+=1)e[Pp[t].charCodeAt(0)]=t;return e})();function e_(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Pp[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Pp[n]),t.queuedBits-=6}}function VA(e,t,r){const n=RV[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function t_(e){const t=[],r=o=>{t.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},a={queue:0,queuedBits:0},i=o=>{PV(o,n,r)};for(let o=0;o<e.length;o+=1)VA(e.charCodeAt(o),a,i);return t.join("")}function DV(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function OV(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const a=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|a)+65536,r+=1}DV(n,t)}}function PV(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function ru(e){const t=[],r={queue:0,queuedBits:0},n=a=>{t.push(a)};for(let a=0;a<e.length;a+=1)VA(e.charCodeAt(a),r,n);return new Uint8Array(t)}function IV(e){const t=[];return OV(e,r=>t.push(r)),new Uint8Array(t)}function xl(e){const t=[],r={queue:0,queuedBits:0},n=a=>{t.push(a)};return e.forEach(a=>e_(a,r,n)),e_(null,r,n),t.join("")}function FV(e){return Math.round(Date.now()/1e3)+e}function LV(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const ls=()=>typeof window<"u"&&typeof document<"u",sl={tested:!1,writable:!1},HA=()=>{if(!ls())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(sl.tested)return sl.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),sl.tested=!0,sl.writable=!0}catch{sl.tested=!0,sl.writable=!1}return sl.writable};function MV(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((a,i)=>{t[i]=a})}catch{}return r.searchParams.forEach((n,a)=>{t[a]=n}),t}const WA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),BV=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Rc=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},nl=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},qi=async(e,t)=>{await e.removeItem(t)};class Qx{constructor(){this.promise=new Qx.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Qx.promiseConstructor=Promise;function Ng(e){const t=e.split(".");if(t.length!==3)throw new k1("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!CV.test(t[n]))throw new k1("JWT not in base64url format");return{header:JSON.parse(t_(t[0])),payload:JSON.parse(t_(t[1])),signature:ru(t[2]),raw:{header:t[0],payload:t[1]}}}async function UV(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function $V(e,t){return new Promise((n,a)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){n(o);return}}catch(o){if(!t(i,o)){a(o);return}}})()})}function qV(e){return("0"+e.toString(16)).substr(-2)}function zV(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let a="";for(let i=0;i<56;i++)a+=r.charAt(Math.floor(Math.random()*n));return a}return crypto.getRandomValues(t),Array.from(t,qV).join("")}async function VV(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),a=new Uint8Array(n);return Array.from(a).map(i=>String.fromCharCode(i)).join("")}async function HV(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await VV(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function jc(e,t,r=!1){const n=zV();let a=n;r&&(a+="/PASSWORD_RECOVERY"),await Rc(e,`${t}-code-verifier`,a);const i=await HV(n);return[i,n===i?"plain":"s256"]}const WV=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function GV(e){const t=e.headers.get(S1);if(!t||!t.match(WV))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function KV(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function YV(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const XV=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Nc(e){if(!XV.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function _g(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function QV(e,t){return new Proxy(e,{get:(r,n,a)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,a)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,a)}})}function r_(e){return JSON.parse(JSON.stringify(e))}const ol=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),JV=[502,503,504];async function s_(e){var t;if(!BV(e))throw new E1(ol(e),0);if(JV.includes(e.status))throw new E1(ol(e),e.status);let r;try{r=await e.json()}catch(i){throw new dl(ol(i),i)}let n;const a=GV(e);if(a&&a.getTime()>=zA["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new JN(ol(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Wn}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new JN(ol(r),e.status,r.weak_password.reasons);throw new EV(ol(r),e.status||500,n)}const ZV=(e,t,r,n)=>{const a={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?a:(a.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),a.body=JSON.stringify(n),Object.assign(Object.assign({},a),r))};async function ct(e,t,r,n){var a;const i=Object.assign({},n==null?void 0:n.headers);i[S1]||(i[S1]=zA["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(a=n==null?void 0:n.query)!==null&&a!==void 0?a:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await eH(e,t,r+l,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function eH(e,t,r,n,a,i){const o=ZV(t,n,a,i);let l;try{l=await e(r,Object.assign({},o))}catch(c){throw console.error(c),new E1(ol(c),0)}if(l.ok||await s_(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await s_(c)}}function Gn(e){var t;let r=null;sH(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=FV(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function n_(e){const t=Gn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function eo(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function tH(e){return{data:e,error:null}}function rH(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:a,verification_type:i}=e,o=Xo(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:a,verification_type:i},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function a_(e){return e}function sH(e){return e.access_token&&e.refresh_token&&e.expires_in}const Cg=["global","local","others"];class nH{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=WA(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=Cg[0]){if(Cg.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Cg.join(", ")}`);try{return await ct(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Qe(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await ct(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:eo})}catch(n){if(Qe(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Xo(t,["options"]),a=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(a.new_email=n==null?void 0:n.newEmail,delete a.newEmail),await ct(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:a,headers:this.headers,xform:rH,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(Qe(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await ct(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:eo})}catch(r){if(Qe(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,a,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ct(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:a_});if(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(v=>{const p=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(v.split(";")[1].split("=")[1]);u[`${x}Page`]=p}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(Qe(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){Nc(t);try{return await ct(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:eo})}catch(r){if(Qe(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){Nc(t);try{return await ct(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:eo})}catch(n){if(Qe(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){Nc(t);try{return await ct(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:eo})}catch(n){if(Qe(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){Nc(t.userId);try{const{data:r,error:n}=await ct(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:a=>({data:{factors:a},error:null})});return{data:r,error:n}}catch(r){if(Qe(r))return{data:null,error:r};throw r}}async _deleteFactor(t){Nc(t.userId),Nc(t.id);try{return{data:await ct(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(Qe(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,a,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ct(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(a=t==null?void 0:t.perPage)===null||a===void 0?void 0:a.toString())!==null&&i!==void 0?i:""},xform:a_});if(d.error)throw d.error;const f=await d.json(),h=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(v=>{const p=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(v.split(";")[1].split("=")[1]);u[`${x}Page`]=p}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},f),u),error:null}}catch(u){if(Qe(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await ct(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Qe(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await ct(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Qe(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await ct(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Qe(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await ct(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Qe(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await ct(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Qe(r))return{data:null,error:r};throw r}}}function i_(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const _c={debug:!!(globalThis&&HA()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class GA extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class aH extends GA{}async function iH(e,t,r){_c.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),_c.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async a=>{if(a){_c.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,a.name);try{return await r()}finally{_c.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,a.name)}}else{if(t===0)throw _c.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new aH(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(_c.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null,"  "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function oH(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function KA(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function lH(e){return parseInt(e,16)}function cH(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function uH(e){var t;const{chainId:r,domain:n,expirationTime:a,issuedAt:i=new Date,nonce:o,notBefore:l,requestId:c,resources:u,scheme:d,uri:f,version:h}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const m=KA(e.address),v=d?`${d}://${n}`:n,p=e.statement?`${e.statement}
`:"",x=`${v} wants you to sign in with your Ethereum account:
${m}

${p}`;let w=`URI: ${f}
Version: ${h}
Chain ID: ${r}${o?`
Nonce: ${o}`:""}
Issued At: ${i.toISOString()}`;if(a&&(w+=`
Expiration Time: ${a.toISOString()}`),l&&(w+=`
Not Before: ${l.toISOString()}`),c&&(w+=`
Request ID: ${c}`),u){let y=`
Resources:`;for(const b of u){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);y+=`
- ${b}`}w+=y}return`${x}
${w}`}class Nr extends Error{constructor({message:t,code:r,cause:n,name:a}){var i;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=a??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class Ip extends Nr{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function dH({error:e,options:t}){var r,n,a;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Nr({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Nr({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Nr({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((a=i.authenticatorSelection)===null||a===void 0?void 0:a.userVerification)==="required")return new Nr({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Nr({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Nr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Nr({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Nr({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(YA(o)){if(i.rp.id!==o)return new Nr({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Nr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Nr({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Nr({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Nr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function fH({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Nr({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Nr({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(YA(n)){if(r.rpId!==n)return new Nr({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Nr({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Nr({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Nr({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class hH{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const mH=new hH;function pH(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,a=Xo(e,["challenge","user","excludeCredentials"]),i=ru(t).buffer,o=Object.assign(Object.assign({},r),{id:ru(r.id).buffer}),l=Object.assign(Object.assign({},a),{challenge:i,user:o});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:ru(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function xH(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Xo(e,["challenge","allowCredentials"]),a=ru(t).buffer,i=Object.assign(Object.assign({},n),{challenge:a});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const l=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},l),{id:ru(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return i}function gH(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:xl(new Uint8Array(e.response.attestationObject)),clientDataJSON:xl(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function vH(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),a=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:xl(new Uint8Array(a.authenticatorData)),clientDataJSON:xl(new Uint8Array(a.clientDataJSON)),signature:xl(new Uint8Array(a.signature)),userHandle:a.userHandle?xl(new Uint8Array(a.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function YA(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function o_(){var e,t;return!!(ls()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function yH(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ip("Browser returned unexpected credential type",t)}:{data:null,error:new Ip("Empty credential response",t)}}catch(t){return{data:null,error:dH({error:t,options:e})}}}async function bH(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Ip("Browser returned unexpected credential type",t)}:{data:null,error:new Ip("Empty credential response",t)}}catch(t){return{data:null,error:fH({error:t,options:e})}}}const wH={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"none"},jH={userVerification:"preferred",hints:["security-key"]};function Fp(...e){const t=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),r=a=>a instanceof ArrayBuffer||ArrayBuffer.isView(a),n={};for(const a of e)if(a)for(const i in a){const o=a[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(t(o)){const l=n[i];t(l)?n[i]=Fp(l,o):n[i]=Fp(o)}else n[i]=o}return n}function NH(e,t){return Fp(wH,e,t||{})}function _H(e,t){return Fp(jH,e,t||{})}class CH{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:a},i){try{const{data:o,error:l}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!o)return{data:null,error:l};const c=a??mH.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(o.webauthn.type){case"create":{const u=NH(o.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await yH({publicKey:u,signal:c});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=_H(o.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await bH(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(o){return Qe(o)?{data:null,error:o}:{data:null,error:new dl("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:a}},i){if(!r)return{data:null,error:new Wf("rpId is required for WebAuthn authentication")};try{if(!o_())return{data:null,error:new dl("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:a},{request:i});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(o){return Qe(o)?{data:null,error:o}:{data:null,error:new dl("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:a},i){if(!r)return{data:null,error:new Wf("rpId is required for WebAuthn registration")};try{if(!o_())return{data:null,error:new dl("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var f;return(f=d.data)===null||f===void 0?void 0:f.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:a},{create:i});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return Qe(o)?{data:null,error:o}:{data:null,error:new dl("Unexpected error in register",o)}}}}oH();const SH={url:jV,storageKey:NV,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:_V,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function l_(e,t,r){return await r()}const Cc={};class Gf{get jwks(){var t,r;return(r=(t=Cc[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Cc[this.storageKey]=Object.assign(Object.assign({},Cc[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Cc[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Cc[this.storageKey]=Object.assign(Object.assign({},Cc[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},SH),t);if(this.storageKey=i.storageKey,this.instanceID=(r=Gf.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Gf.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&ls()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new nH({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=WA(i.fetch),this.lock=i.lock||l_,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,i.lock?this.lock=i.lock:ls()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=iH:this.lock=l_,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new CH(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:HA()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=i_(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=i_(this.memoryStorage)),ls()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${qA}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(ls()&&(r=MV(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),ls()&&this.detectSessionInUrl&&n!=="none"){const{data:a,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),AV(i)){const c=(t=i.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{error:i}}const{session:o,redirectType:l}=a;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return Qe(r)?this._returnResult({error:r}):this._returnResult({error:new dl("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,a;try{const i=await ct(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(a=t==null?void 0:t.options)===null||a===void 0?void 0:a.captchaToken}},xform:Gn}),{data:o,error:l}=i;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(Qe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var r,n,a;try{let i;if("email"in t){const{email:d,password:f,options:h}=t;let m=null,v=null;this.flowType==="pkce"&&([m,v]=await jc(this.storage,this.storageKey)),i=await ct(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:d,password:f,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:m,code_challenge_method:v},xform:Gn})}else if("phone"in t){const{phone:d,password:f,options:h}=t;i=await ct(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},channel:(a=h==null?void 0:h.channel)!==null&&a!==void 0?a:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Gn})}else throw new ym("You must provide either an email or phone number and a password");const{data:o,error:l}=i;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(Qe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let r;if("email"in t){const{email:i,password:o,options:l}=t;r=await ct(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:n_})}else if("phone"in t){const{phone:i,password:o,options:l}=t;r=await ct(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:n_})}else throw new ym("You must provide either an email or phone number and a password");const{data:n,error:a}=r;if(a)return this._returnResult({data:{user:null,session:null},error:a});if(!n||!n.session||!n.user){const i=new wc;return this._returnResult({data:{user:null,session:null},error:i})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:a})}catch(r){if(Qe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,a,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(a=t.options)===null||a===void 0?void 0:a.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,a,i,o,l,c,u,d,f,h;let m,v;if("message"in t)m=t.message,v=t.signature;else{const{chain:p,wallet:x,statement:w,options:y}=t;let b;if(ls())if(typeof x=="object")b=x;else{const k=window;if("ethereum"in k&&typeof k.ethereum=="object"&&"request"in k.ethereum&&typeof k.ethereum.request=="function")b=k.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=x}const N=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href),C=await b.request({method:"eth_requestAccounts"}).then(k=>k).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!C||C.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=KA(C[0]);let j=(n=y==null?void 0:y.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!j){const k=await b.request({method:"eth_chainId"});j=lH(k)}const S={domain:N.host,address:_,statement:w,uri:N.href,version:"1",chainId:j,nonce:(a=y==null?void 0:y.signInWithEthereum)===null||a===void 0?void 0:a.nonce,issuedAt:(o=(i=y==null?void 0:y.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=y==null?void 0:y.signInWithEthereum)===null||d===void 0?void 0:d.resources};m=uH(S),v=await b.request({method:"personal_sign",params:[cH(m),_]})}try{const{data:p,error:x}=await ct(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:v},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Gn});if(x)throw x;if(!p||!p.session||!p.user){const w=new wc;return this._returnResult({data:{user:null,session:null},error:w})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("SIGNED_IN",p.session)),this._returnResult({data:Object.assign({},p),error:x})}catch(p){if(Qe(p))return this._returnResult({data:{user:null,session:null},error:p});throw p}}async signInWithSolana(t){var r,n,a,i,o,l,c,u,d,f,h,m;let v,p;if("message"in t)v=t.message,p=t.signature;else{const{chain:x,wallet:w,statement:y,options:b}=t;let N;if(ls())if(typeof w=="object")N=w;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))N=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=w}const C=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in N&&N.signIn){const _=await N.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:C.host,uri:C.href}),y?{statement:y}:null));let j;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")j=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)j=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in j&&"signature"in j&&(typeof j.signedMessage=="string"||j.signedMessage instanceof Uint8Array)&&j.signature instanceof Uint8Array)v=typeof j.signedMessage=="string"?j.signedMessage:new TextDecoder().decode(j.signedMessage),p=j.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in N)||typeof N.signMessage!="function"||!("publicKey"in N)||typeof N!="object"||!N.publicKey||!("toBase58"in N.publicKey)||typeof N.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${C.host} wants you to sign in with your Solana account:`,N.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${C.href}`,`Issued At: ${(a=(n=b==null?void 0:b.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&a!==void 0?a:new Date().toISOString()}`,...!((i=b==null?void 0:b.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((c=b==null?void 0:b.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((u=b==null?void 0:b.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((f=(d=b==null?void 0:b.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||f===void 0)&&f.length?["Resources",...b.signInWithSolana.resources.map(j=>`- ${j}`)]:[]].join(`
`);const _=await N.signMessage(new TextEncoder().encode(v),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=_}}try{const{data:x,error:w}=await ct(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:xl(p)},!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:Gn});if(w)throw w;if(!x||!x.session||!x.user){const y=new wc;return this._returnResult({data:{user:null,session:null},error:y})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:w})}catch(x){if(Qe(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(t){const r=await nl(this.storage,`${this.storageKey}-code-verifier`),[n,a]=(r??"").split("/");try{const{data:i,error:o}=await ct(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Gn});if(await qi(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const l=new wc;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:a??null}),error:o})}catch(i){if(Qe(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:r,provider:n,token:a,access_token:i,nonce:o}=t,l=await ct(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:a,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Gn}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new wc;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(r){if(Qe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,a,i,o;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await jc(this.storage,this.storageKey));const{error:f}=await ct(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await ct(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(a=c==null?void 0:c.data)!==null&&a!==void 0?a:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new ym("You must provide either an email or phone number.")}catch(l){if(Qe(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let a,i;"options"in t&&(a=(r=t.options)===null||r===void 0?void 0:r.redirectTo,i=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:l}=await ct(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:a,xform:Gn});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(Qe(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithSSO(t){var r,n,a;try{let i=null,o=null;this.flowType==="pkce"&&([i,o]=await jc(this.storage,this.storageKey));const l=await ct(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((a=t==null?void 0:t.options)===null||a===void 0)&&a.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:tH});return this._returnResult(l)}catch(i){if(Qe(i))return this._returnResult({data:null,error:i});throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Wn;const{error:a}=await ct(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:a})})}catch(t){if(Qe(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:a,options:i}=t,{error:o}=await ct(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:a,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:n,type:a,options:i}=t,{data:o,error:l}=await ct(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:a,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l})}throw new ym("You must provide either an email or phone number and a type")}catch(r){if(Qe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),a=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await a}catch{}})()),a}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const a=[...this.pendingInLock];await Promise.all(a),this.pendingInLock.splice(0,a.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await nl(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<wg:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const o=await nl(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=_g()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=QV(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:a},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await ct(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:eo}):await this._useSession(async r=>{var n,a,i;const{data:o,error:l}=r;if(l)throw l;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Wn}:await ct(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(a=o.session)===null||a===void 0?void 0:a.access_token)!==null&&i!==void 0?i:void 0,xform:eo})})}catch(r){if(Qe(r))return TV(r)&&(await this._removeSession(),await qi(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:a,error:i}=n;if(i)throw i;if(!a.session)throw new Wn;const o=a.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await jc(this.storage,this.storageKey));const{data:u,error:d}=await ct(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:eo});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(Qe(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Wn;const r=Date.now()/1e3;let n=r,a=!0,i=null;const{payload:o}=Ng(t.access_token);if(o.exp&&(n=o.exp,a=n<=r),a){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};i=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)throw c;i={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(Qe(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:o,error:l}=r;if(l)throw l;t=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Wn;const{data:a,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):a?this._returnResult({data:{user:a.user,session:a},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(Qe(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!ls())throw new bm("No browser detected.");if(t.error||t.error_description||t.error_code)throw new bm(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new QN("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new bm("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new QN("No code detected.");const{data:y,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const N=new URL(window.location.href);return N.searchParams.delete("code"),window.history.replaceState(window.history.state,"",N.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:a,access_token:i,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!i||!l||!o||!u)throw new bm("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;c&&(h=parseInt(c));const m=h-d;m*1e3<=Ac&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${f}s`);const v=h-f;d-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,h,d):d-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,h,d);const{data:p,error:x}=await this._getUser(i);if(x)throw x;const w={provider_token:n,provider_refresh_token:a,access_token:i,expires_in:f,expires_at:h,refresh_token:o,token_type:u,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:w,redirectType:t.type},error:null})}catch(n){if(Qe(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await nl(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:a,error:i}=r;if(i)return this._returnResult({error:i});const o=(n=a.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(kV(l)&&(l.status===404||l.status===401||l.status===403)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await qi(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=LV(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,a;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,r={}){let n=null,a=null;this.flowType==="pkce"&&([n,a]=await jc(this.storage,this.storageKey,!0));try{return await ct(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:a,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(Qe(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(Qe(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:a}=await this._useSession(async i=>{var o,l,c,u,d;const{data:f,error:h}=i;if(h)throw h;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ct(this.fetch,"GET",m,{headers:this.headers,jwt:(d=(u=f.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(a)throw a;return ls()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(Qe(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:a,data:{session:i}}=r;if(a)throw a;const{options:o,provider:l,token:c,access_token:u,nonce:d}=t,f=await ct(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Gn}),{data:h,error:m}=f;return m?this._returnResult({data:{user:null,session:null},error:m}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new wc}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:m}))}catch(a){if(Qe(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,a;const{data:i,error:o}=r;if(o)throw o;return await ct(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(a=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&a!==void 0?a:void 0})})}catch(r){if(Qe(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await $V(async a=>(a>0&&await UV(200*Math.pow(2,a-1)),this._debug(r,"refreshing attempt",a),await ct(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Gn})),(a,i)=>{const o=200*Math.pow(2,a);return i&&jg(i)&&Date.now()+o-n<Ac})}catch(n){if(this._debug(r,"error",n),Qe(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),ls()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const a=await nl(this.storage,this.storageKey);if(a&&this.userStorage){let o=await nl(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:a.user},await Rc(this.userStorage,this.storageKey+"-user",o)),a.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:_g()}else if(a&&!a.user&&!a.user){const o=await nl(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(a.user=o.user,await qi(this.storage,this.storageKey+"-user"),await Rc(this.storage,this.storageKey,a)):a.user=_g()}if(this._debug(n,"session from storage",a),!this._isValidSession(a)){this._debug(n,"session is not valid"),a!==null&&await this._removeSession();return}const i=((r=a.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<wg;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${wg}s`),i){if(this.autoRefreshToken&&a.refresh_token){const{error:o}=await this._callRefreshToken(a.refresh_token);o&&(console.error(o),jg(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(a.user&&a.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(a.access_token);!l&&(o!=null&&o.user)?(a.user=o.user,await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){this._debug(n,"error",a),console.error(a);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Wn;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const a=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(a,"begin");try{this.refreshingDeferred=new Qx;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Wn;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const l={data:i.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(i){if(this._debug(a,"error",i),Qe(i)){const o={data:null,error:i};return jg(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(a,"end")}}async _notifyAllSubscribers(t,r,n=!0){const a=`#_notifyAllSubscribers(${t})`;this._debug(a,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){i.push(c)}});if(await Promise.all(o),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(a,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Rc(this.userStorage,this.storageKey+"-user",{user:r.user});const a=Object.assign({},r);delete a.user;const i=r_(a);await Rc(this.storage,this.storageKey,i)}else{const a=r_(r);await Rc(this.storage,this.storageKey,a)}}async _removeSession(){this._debug("#_removeSession()"),await qi(this.storage,this.storageKey),await qi(this.storage,this.storageKey+"-code-verifier"),await qi(this.storage,this.storageKey+"-user"),this.userStorage&&await qi(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&ls()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Ac);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const a=Math.floor((n.expires_at*1e3-t)/Ac);this._debug("#_autoRefreshTokenTick()",`access token expires in ${a} ticks, a tick lasts ${Ac}ms, refresh threshold is ${C1} ticks`),a<=C1&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof GA)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!ls()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const a=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&a.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&a.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await jc(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});a.push(l.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);a.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&a.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${a.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;return i?this._returnResult({data:null,error:i}):await ct(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(Qe(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,a;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await ct(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((a=c==null?void 0:c.totp)===null||a===void 0)&&a.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(Qe(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?gH(t.webauthn.credential_response):vH(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await ct(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if(Qe(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:a,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await ct(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:l}=o;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:pH(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:xH(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(Qe(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const a={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])a.all.push(i),i.status==="verified"&&a[i.factor_type].push(i);return{data:a,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:a}=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=Ng(n.access_token);let o=null;i.aal&&(o=i.aal);let l=o;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const u=i.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:a}=r;return a?this._returnResult({data:null,error:a}):n?await ct(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Wn})})}catch(r){if(Qe(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:a},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!a)return this._returnResult({data:null,error:new Wn});const o=await ct(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&ls()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(Qe(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:a},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!a)return this._returnResult({data:null,error:new Wn});const o=await ct(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:a.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&ls()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(Qe(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const a=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+SV>a)return n;const{data:i,error:o}=await ct(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=a,n=i.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:m,error:v}=await this.getSession();if(v||!m.session)return this._returnResult({data:null,error:v});n=m.session.access_token}const{header:a,payload:i,signature:o,raw:{header:l,payload:c}}=Ng(n);r!=null&&r.allowExpired||KV(i.exp);const u=!a.alg||a.alg.startsWith("HS")||!a.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(a.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:m}=await this.getUser(n);if(m)throw m;return{data:{claims:i,header:a,signature:o},error:null}}const d=YV(a.alg),f=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,f,o,IV(`${l}.${c}`)))throw new k1("Invalid JWT signature");return{data:{claims:i,header:a,signature:o},error:null}}catch(n){if(Qe(n))return this._returnResult({data:null,error:n});throw n}}}Gf.nextInstanceID={};const EH=Gf;class kH extends EH{constructor(t){super(t)}}class TH{constructor(t,r,n){var a,i,o;this.supabaseUrl=t,this.supabaseKey=r;const l=wV(t);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,u={db:hV,realtime:pV,auth:Object.assign(Object.assign({},mV),{storageKey:c}),global:fV},d=bV(n??{},u);this.storageKey=(a=d.auth.storageKey)!==null&&a!==void 0?a:"",this.headers=(i=d.global.headers)!==null&&i!==void 0?i:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(f,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=d.auth)!==null&&o!==void 0?o:{},this.headers,d.global.fetch),this.fetch=vV(r,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new jz(new URL("rest/v1",l).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new cV(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new yz(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,r,n)}channel(t,r={config:{}}){return this.realtime.channel(t,r)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(t=n.session)===null||t===void 0?void 0:t.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:a,userStorage:i,storageKey:o,flowType:l,lock:c,debug:u,throwOnError:d},f,h){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new kH({url:this.authUrl.href,headers:Object.assign(Object.assign({},m),f),storageKey:o,autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:a,userStorage:i,flowType:l,lock:c,debug:u,throwOnError:d,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(v=>v.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new Bz(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(t,r,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const AH=(e,t,r)=>new TH(e,t,r);function RH(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}RH()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const DH="https://aofconlituyjgjoidsoq.supabase.co",OH="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFvZmNvbmxpdHV5amdqb2lkc29xIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjI2ODkxNTMsImV4cCI6MjA3ODI2NTE1M30.aUH9y42SUTA4AUidBjT76t4eC1k3EytN-Yu5GJ7T9Kg",be=AH(DH,OH,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),lc=()=>Vr({queryKey:["products"],queryFn:async()=>{const{data:e,error:t}=await be.from("products").select(`
          *,
          product_variants (*)
        `).order("created_at",{ascending:!1});if(t)throw t;return e}}),sw=e=>Vr({queryKey:["products",e],queryFn:async()=>{let t=be.from("products").select(`
          *,
          product_variants (*)
        `);e&&(t=t.eq("category",e));const{data:r,error:n}=await t;if(n)throw n;const a={"Huiles CBD":1,"Gummies CBD":2,"Spray CBD":3,"Granules CBD":4,"Capsules CBD":5,"Cosmétiques CBD":6};return r.sort((i,o)=>{const l=a[i.category]||99,c=a[o.category]||99;return l!==c?l-c:i.bestseller&&!o.bestseller?-1:!i.bestseller&&o.bestseller?1:i.name.localeCompare(o.name)})}}),PH=(e=6)=>Vr({queryKey:["products","new",e],queryFn:async()=>{const{data:t,error:r}=await be.from("products").select(`
          *,
          product_variants (*)
        `).order("created_at",{ascending:!1}).limit(e);if(r)throw r;return t}}),XA=()=>Vr({queryKey:["product-categories"],queryFn:async()=>{const{data:e,error:t}=await be.from("product_categories").select("*").order("sort_order",{ascending:!0});if(t)throw t;return e}}),IH=({categoryName:e})=>{const{data:t,isLoading:r}=sw(e),n=g.useRef(null),[a,i]=g.useState(!1),[o,l]=g.useState(!0),c=()=>{if(n.current){const{scrollLeft:d,scrollWidth:f,clientWidth:h}=n.current;i(d>0),l(d<f-h-10)}};g.useEffect(()=>{c();const d=n.current;if(d)return d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)},[t]);const u=d=>{n.current&&n.current.scrollBy({left:d==="left"?-320:320,behavior:"smooth"})};return r?s.jsx("div",{className:"flex gap-6 overflow-hidden",children:[...Array(4)].map((d,f)=>s.jsx("div",{className:"flex-shrink-0 w-[280px] lg:w-[320px] h-[420px] bg-muted animate-pulse rounded-2xl"},f))}):!t||t.length===0?null:s.jsxs("div",{className:"relative group",children:[a&&s.jsx(se,{variant:"secondary",size:"icon",onClick:()=>u("left"),className:"absolute -left-3 lg:-left-6 top-1/2 -translate-y-1/2 z-10 w-12 h-12 bg-background shadow-xl rounded-full hover:bg-primary hover:text-primary-foreground border-2 border-primary/10 hidden md:flex transition-all",children:s.jsx(Fv,{className:"h-6 w-6"})}),s.jsx("div",{ref:n,className:"flex gap-5 lg:gap-6 overflow-x-auto pb-6 snap-x snap-mandatory scrollbar-hide px-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map(d=>s.jsx("div",{className:"flex-shrink-0 w-[260px] md:w-[280px] lg:w-[300px] snap-start",children:s.jsx(Kr,{product:d})},d.id))}),o&&s.jsx(se,{variant:"secondary",size:"icon",onClick:()=>u("right"),className:"absolute -right-3 lg:-right-6 top-1/2 -translate-y-1/2 z-10 w-12 h-12 bg-background shadow-xl rounded-full hover:bg-primary hover:text-primary-foreground border-2 border-primary/10 hidden md:flex transition-all",children:s.jsx(Io,{className:"h-6 w-6"})}),s.jsx("div",{className:"flex justify-center gap-2 mt-2 md:hidden",children:s.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground bg-muted/50 px-3 py-1.5 rounded-full",children:[s.jsx(Fv,{className:"w-3 h-3"}),s.jsx("span",{children:"Glisser"}),s.jsx(Io,{className:"w-3 h-3"})]})})]})},FH=()=>{const{data:e,isLoading:t}=XA();return t?s.jsx("section",{className:"py-16 bg-background",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"h-96 bg-muted animate-pulse rounded-2xl"})})}):!e||e.length===0?null:s.jsx("section",{className:"py-12 lg:py-20 bg-background",children:s.jsx("div",{className:"container mx-auto px-4 space-y-16 lg:space-y-24",children:e.map((r,n)=>s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between gap-4 mb-8 lg:mb-10",children:[s.jsxs("div",{children:[s.jsx("div",{className:"inline-block bg-primary/10 rounded-full px-4 py-1.5 mb-3",children:s.jsxs("span",{className:"text-xs font-semibold text-primary uppercase tracking-wider",children:["Catégorie ",n+1]})}),s.jsx("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground",children:s.jsx("span",{className:"text-primary",children:r.name})}),r.description&&s.jsx("p",{className:"text-base lg:text-lg text-muted-foreground mt-3 max-w-2xl",children:r.description})]}),s.jsxs(pe,{to:"/produits",className:"inline-flex items-center gap-2 text-primary font-semibold hover:gap-3 transition-all group",children:["Voir tout",s.jsx(kn,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]}),s.jsx(IH,{categoryName:r.name})]},r.id))})})},LH="/assets/nature-landscape-UpBsP4ZB.jpg",MH="/assets/noto-pack-citron-CDWQgPNr.jpg",QA="/assets/cannabis-icon-K4T_NAmH.png",BH=()=>s.jsx("section",{className:"py-16 bg-secondary",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-8 max-w-6xl mx-auto",children:[s.jsx("div",{className:"bg-card rounded-2xl overflow-hidden shadow-lg",children:s.jsx("img",{src:LH,alt:"Nature",className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"bg-card rounded-2xl p-8 flex flex-col items-center justify-center text-center space-y-6",children:[s.jsx("img",{src:QA,alt:"CBD",className:"h-24 w-24 object-contain"}),s.jsx("img",{src:MH,alt:"Huiles CBD",className:"w-full max-w-md"}),s.jsx(se,{className:"bg-primary hover:bg-primary-dark text-primary-foreground",children:"VOIR NOS HUILES CBD"})]})]})})}),UH="/assets/notre-cbd-home-Ce2wi-GB.jpg",$H=()=>s.jsx("section",{className:"py-16 md:py-24 bg-background",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-16 items-center max-w-7xl mx-auto",children:[s.jsx("div",{className:"relative order-2 lg:order-1",children:s.jsxs("div",{className:"relative rounded-2xl overflow-hidden shadow-2xl",children:[s.jsx("img",{src:UH,alt:"Culture de chanvre au coucher du soleil",className:"w-full h-[300px] md:h-[400px] object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/50 to-transparent"}),s.jsx("div",{className:"absolute bottom-6 left-6 right-6",children:s.jsx("p",{className:"text-white text-lg font-medium",children:"Du Colorado à votre bien-être"})})]})}),s.jsxs("div",{className:"order-1 lg:order-2",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4",children:"Notre engagement"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Notre Cannabidiol"}),s.jsx("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:"Notre engagement est de fournir un CBD de qualité inégalée. Cela se traduit par un partenariat avec Spectrums Europe, fournissant une traçabilité totale de la graine jusqu'au produit fini."}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-2",children:s.jsx(On,{className:"w-6 h-6 text-primary"})}),s.jsx("p",{className:"text-xs font-medium text-foreground",children:"Sans THC"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-2",children:s.jsx(ss,{className:"w-6 h-6 text-primary"})}),s.jsx("p",{className:"text-xs font-medium text-foreground",children:"100% Vegan"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-2",children:s.jsx(jh,{className:"w-6 h-6 text-primary"})}),s.jsx("p",{className:"text-xs font-medium text-foreground",children:"Testé en labo"})]})]}),s.jsx(pe,{to:"/notre-cbd",children:s.jsxs(se,{className:"rounded-full px-6 group",children:["Découvrir notre CBD",s.jsx(kn,{className:"w-4 h-4 ml-2 group-hover:translate-x-1 transition-transform"})]})})]})]})})}),qH=()=>{const e="33744976885",t=encodeURIComponent("Bonjour, j'ai une question concernant vos produits CBD."),r=`https://wa.me/${e}?text=${t}`;return s.jsx("section",{className:"py-16 md:py-24 bg-gradient-to-br from-[#25D366]/10 via-background to-[#25D366]/5",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"max-w-5xl mx-auto",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-8 md:gap-12 items-center",children:[s.jsxs("div",{className:"text-center md:text-left space-y-6",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-[#25D366]/20 text-[#25D366] px-4 py-2 rounded-full text-sm font-medium",children:[s.jsx(jp,{className:"w-4 h-4"}),"Support WhatsApp"]}),s.jsxs("h2",{className:"text-3xl md:text-4xl font-bold text-foreground",children:["Une question ?",s.jsx("br",{}),s.jsx("span",{className:"text-[#25D366]",children:"Contactez-nous sur WhatsApp"})]}),s.jsx("p",{className:"text-muted-foreground text-lg",children:"Notre équipe d'experts CBD est disponible pour répondre à toutes vos questions et vous accompagner dans le choix de vos produits."}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[s.jsx(Ot,{className:"w-5 h-5 text-[#25D366] flex-shrink-0"}),s.jsx("span",{children:"Réponse rapide en moins de 2h"})]}),s.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[s.jsx(Ot,{className:"w-5 h-5 text-[#25D366] flex-shrink-0"}),s.jsx("span",{children:"Conseils personnalisés par nos experts"})]}),s.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[s.jsx(Ot,{className:"w-5 h-5 text-[#25D366] flex-shrink-0"}),s.jsx("span",{children:"Suivi de commande en temps réel"})]})]}),s.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:s.jsxs(se,{size:"lg",className:"bg-[#25D366] hover:bg-[#20BD5A] text-white gap-3 text-lg px-8 py-6 rounded-full shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105",children:[s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:"w-6 h-6 fill-white",children:s.jsx("path",{d:"M16.002 0C7.165 0 .001 7.163.001 16c0 2.825.736 5.572 2.137 7.996L.004 32l8.217-2.156A15.932 15.932 0 0016.002 32C24.838 32 32 24.837 32 16S24.838 0 16.002 0zm0 29.091c-2.617 0-5.18-.708-7.41-2.048l-.531-.316-5.503 1.444 1.471-5.371-.346-.55A13.009 13.009 0 012.91 16c0-7.218 5.873-13.091 13.092-13.091S29.091 8.782 29.091 16 23.22 29.091 16.002 29.091zm7.173-9.808c-.393-.197-2.329-1.149-2.69-1.28-.361-.131-.624-.197-.886.197-.262.393-1.017 1.28-1.247 1.543-.23.262-.459.295-.852.098-.393-.197-1.66-.612-3.161-1.951-1.169-1.042-1.958-2.33-2.188-2.723-.23-.393-.025-.606.173-.802.178-.176.393-.459.59-.689.197-.23.262-.393.393-.656.131-.262.066-.492-.033-.689-.098-.197-.886-2.134-1.214-2.921-.32-.767-.645-.663-.886-.676-.23-.011-.492-.014-.755-.014-.262 0-.689.098-1.05.492-.361.393-1.378 1.346-1.378 3.282s1.411 3.807 1.608 4.07c.197.262 2.778 4.241 6.731 5.948.94.406 1.674.649 2.247.83.944.3 1.803.258 2.482.157.757-.113 2.329-.952 2.658-1.871.328-.919.328-1.707.23-1.871-.098-.164-.361-.262-.755-.459z"})}),"Discuter maintenant"]})})]}),s.jsx("div",{className:"relative",children:s.jsxs("div",{className:"bg-card rounded-3xl p-8 shadow-2xl border border-border/50 relative overflow-hidden",children:[s.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-[#25D366]/20 rounded-full blur-3xl"}),s.jsxs("div",{className:"relative space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-[#25D366] flex items-center justify-center flex-shrink-0",children:s.jsx("span",{className:"text-white font-bold text-sm",children:"N"})}),s.jsx("div",{className:"bg-[#25D366]/10 rounded-2xl rounded-tl-none p-4 max-w-[80%]",children:s.jsx("p",{className:"text-sm text-foreground",children:"Bonjour ! Comment puis-je vous aider aujourd'hui ? 😊"})})]}),s.jsx("div",{className:"flex items-start gap-3 justify-end",children:s.jsx("div",{className:"bg-muted rounded-2xl rounded-tr-none p-4 max-w-[80%]",children:s.jsx("p",{className:"text-sm text-foreground",children:"Quel dosage me conseillez-vous pour débuter ?"})})}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-[#25D366] flex items-center justify-center flex-shrink-0",children:s.jsx("span",{className:"text-white font-bold text-sm",children:"N"})}),s.jsx("div",{className:"bg-[#25D366]/10 rounded-2xl rounded-tl-none p-4 max-w-[80%]",children:s.jsx("p",{className:"text-sm text-foreground",children:"Je vous recommande notre huile 500mg pour commencer. Vous pouvez prendre 3-4 gouttes le soir 🌿"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 pt-4 border-t border-border",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-3 h-3 bg-[#25D366] rounded-full"}),s.jsx("div",{className:"absolute inset-0 w-3 h-3 bg-[#25D366] rounded-full animate-ping"})]}),s.jsxs("span",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[s.jsx(Ri,{className:"w-4 h-4"}),"En ligne • Répond généralement en 1h"]})]})]})]})})]})})})})},zH="/assets/blog-section-home-COvJjpWw.jpg",nw="/assets/remboursement-mutuelle-cbd-BEx94MFe.jpg",JA="/assets/cbd-arthrose-animaux-F3L_aZ-o.jpg",ZA="/assets/dosage-cbd-0sVGTqf1.jpg",VH=[{title:"Le CBD, certaines mutuelles vous le rembourse !",excerpt:"Découvrez comment certaines mutuelles prennent en charge vos achats de CBD.",image:nw,slug:"cbd-mutuelle-remboursement"},{title:"Lutter contre l'arthrose chez le chien et le chat",excerpt:"Le CBD peut aider vos animaux à soulager les douleurs articulaires.",image:JA,slug:"cbd-arthrose-chien-chat"},{title:"L'important est le dosage de CBD",excerpt:"Apprenez à trouver le dosage idéal adapté à vos besoins.",image:ZA,slug:"dosage-cbd-guide"}],HH=()=>s.jsx("section",{className:"py-16 md:py-24 bg-background overflow-hidden",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 md:gap-12 items-center mb-12 md:mb-16",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"inline-flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full text-sm font-medium",children:"Blog & Conseils"}),s.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground",children:["Tout savoir sur le"," ",s.jsx("span",{className:"text-primary",children:"CBD"})]}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-xl",children:"Découvrez nos articles, guides et conseils pour comprendre le CBD et profiter pleinement de ses bienfaits."}),s.jsx(pe,{to:"/blog",children:s.jsxs(se,{size:"lg",className:"gap-2 group",children:["Voir tous les articles",s.jsx(kn,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})})]}),s.jsxs("div",{className:"relative hidden lg:block",children:[s.jsx("div",{className:"absolute -inset-4 bg-primary/10 rounded-3xl blur-2xl"}),s.jsx("img",{src:zH,alt:"Bien-être et lecture",className:"relative rounded-2xl shadow-2xl w-full h-80 object-cover"})]})]}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6 md:gap-8",children:VH.map((e,t)=>s.jsx(pe,{to:`/blog/${e.slug}`,className:"group",children:s.jsxs("article",{className:"h-full bg-card rounded-2xl overflow-hidden shadow-sm border border-border/50 hover:shadow-xl transition-all duration-300 hover:border-primary/30 hover:-translate-y-1",children:[s.jsxs("div",{className:"relative h-44 overflow-hidden",children:[s.jsx("img",{src:e.image,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-card/60 via-transparent to-transparent"})]}),s.jsxs("div",{className:"p-5 space-y-3",children:[s.jsx("h3",{className:"font-bold text-foreground group-hover:text-primary transition-colors line-clamp-2",children:e.title}),s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:e.excerpt}),s.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-primary font-medium",children:["Lire l'article",s.jsx(kn,{className:"w-3 h-3 group-hover:translate-x-1 transition-transform"})]})]})]})},t))})]})});var Jx="Collapsible",[WH,eR]=Yr(Jx),[GH,aw]=WH(Jx),tR=g.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:a,disabled:i,onOpenChange:o,...l}=e,[c,u]=fn({prop:n,defaultProp:a??!1,onChange:o,caller:Jx});return s.jsx(GH,{scope:r,disabled:i,contentId:cn(),open:c,onOpenToggle:g.useCallback(()=>u(d=>!d),[u]),children:s.jsx(ze.div,{"data-state":ow(c),"data-disabled":i?"":void 0,...l,ref:t})})});tR.displayName=Jx;var rR="CollapsibleTrigger",sR=g.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,a=aw(rR,r);return s.jsx(ze.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":ow(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:ke(e.onClick,a.onOpenToggle)})});sR.displayName=rR;var iw="CollapsibleContent",nR=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=aw(iw,e.__scopeCollapsible);return s.jsx(Xr,{present:r||a.open,children:({present:i})=>s.jsx(KH,{...n,ref:t,present:i})})});nR.displayName=iw;var KH=g.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:a,...i}=e,o=aw(iw,r),[l,c]=g.useState(n),u=g.useRef(null),d=pt(t,u),f=g.useRef(0),h=f.current,m=g.useRef(0),v=m.current,p=o.open||l,x=g.useRef(p),w=g.useRef(void 0);return g.useEffect(()=>{const y=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(y)},[]),fr(()=>{const y=u.current;if(y){w.current=w.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const b=y.getBoundingClientRect();f.current=b.height,m.current=b.width,x.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),c(n)}},[o.open,n]),s.jsx(ze.div,{"data-state":ow(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p,...i,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:p&&a})});function ow(e){return e?"open":"closed"}var YH=tR,XH=sR,QH=nR,ja="Accordion",JH=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[lw,ZH,eW]=yh(ja),[Zx]=Yr(ja,[eW,eR]),cw=eR(),aR=de.forwardRef((e,t)=>{const{type:r,...n}=e,a=n,i=n;return s.jsx(lw.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(nW,{...i,ref:t}):s.jsx(sW,{...a,ref:t})})});aR.displayName=ja;var[iR,tW]=Zx(ja),[oR,rW]=Zx(ja,{collapsible:!1}),sW=de.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},collapsible:i=!1,...o}=e,[l,c]=fn({prop:r,defaultProp:n??"",onChange:a,caller:ja});return s.jsx(iR,{scope:e.__scopeAccordion,value:de.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:de.useCallback(()=>i&&c(""),[i,c]),children:s.jsx(oR,{scope:e.__scopeAccordion,collapsible:i,children:s.jsx(lR,{...o,ref:t})})})}),nW=de.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...i}=e,[o,l]=fn({prop:r,defaultProp:n??[],onChange:a,caller:ja}),c=de.useCallback(d=>l((f=[])=>[...f,d]),[l]),u=de.useCallback(d=>l((f=[])=>f.filter(h=>h!==d)),[l]);return s.jsx(iR,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:s.jsx(oR,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(lR,{...i,ref:t})})})}),[aW,e0]=Zx(ja),lR=de.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:a,orientation:i="vertical",...o}=e,l=de.useRef(null),c=pt(l,t),u=ZH(r),f=ac(a)==="ltr",h=ke(e.onKeyDown,m=>{var S;if(!JH.includes(m.key))return;const v=m.target,p=u().filter(k=>{var D;return!((D=k.ref.current)!=null&&D.disabled)}),x=p.findIndex(k=>k.ref.current===v),w=p.length;if(x===-1)return;m.preventDefault();let y=x;const b=0,N=w-1,C=()=>{y=x+1,y>N&&(y=b)},_=()=>{y=x-1,y<b&&(y=N)};switch(m.key){case"Home":y=b;break;case"End":y=N;break;case"ArrowRight":i==="horizontal"&&(f?C():_());break;case"ArrowDown":i==="vertical"&&C();break;case"ArrowLeft":i==="horizontal"&&(f?_():C());break;case"ArrowUp":i==="vertical"&&_();break}const j=y%w;(S=p[j].ref.current)==null||S.focus()});return s.jsx(aW,{scope:r,disabled:n,direction:a,orientation:i,children:s.jsx(lw.Slot,{scope:r,children:s.jsx(ze.div,{...o,"data-orientation":i,ref:c,onKeyDown:n?void 0:h})})})}),Lp="AccordionItem",[iW,uw]=Zx(Lp),cR=de.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...a}=e,i=e0(Lp,r),o=tW(Lp,r),l=cw(r),c=cn(),u=n&&o.value.includes(n)||!1,d=i.disabled||e.disabled;return s.jsx(iW,{scope:r,open:u,disabled:d,triggerId:c,children:s.jsx(YH,{"data-orientation":i.orientation,"data-state":pR(u),...l,...a,ref:t,disabled:d,open:u,onOpenChange:f=>{f?o.onItemOpen(n):o.onItemClose(n)}})})});cR.displayName=Lp;var uR="AccordionHeader",dR=de.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=e0(ja,r),i=uw(uR,r);return s.jsx(ze.h3,{"data-orientation":a.orientation,"data-state":pR(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});dR.displayName=uR;var T1="AccordionTrigger",fR=de.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=e0(ja,r),i=uw(T1,r),o=rW(T1,r),l=cw(r);return s.jsx(lw.ItemSlot,{scope:r,children:s.jsx(XH,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...n,ref:t})})});fR.displayName=T1;var hR="AccordionContent",mR=de.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=e0(ja,r),i=uw(hR,r),o=cw(r);return s.jsx(QH,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});mR.displayName=hR;function pR(e){return e?"open":"closed"}var oW=aR,lW=cR,cW=dR,xR=fR,gR=mR;const ba=oW,Pn=g.forwardRef(({className:e,...t},r)=>s.jsx(lW,{ref:r,className:Pe("border-b",e),...t}));Pn.displayName="AccordionItem";const In=g.forwardRef(({className:e,children:t,...r},n)=>s.jsx(cW,{className:"flex",children:s.jsxs(xR,{ref:n,className:Pe("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,s.jsx(If,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));In.displayName=xR.displayName;const Fn=g.forwardRef(({className:e,children:t,...r},n)=>s.jsx(gR,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:s.jsx("div",{className:Pe("pb-4 pt-0",e),children:t})}));Fn.displayName=gR.displayName;const uW="/assets/faq-hero-Da6_QcLV.jpg",dW=[{question:"Qu'est-ce que le CBD ?",answer:"Le CBD (cannabidiol) est une molécule naturelle extraite du chanvre. Contrairement au THC, il n'a aucun effet psychotrope et est parfaitement légal en France."},{question:"Le CBD est-il légal en France ?",answer:"Oui, le CBD est légal en France à condition que les produits contiennent moins de 0,2% de THC et respectent les réglementations en vigueur."},{question:"Y a-t-il du THC dans les produits NŌTO ?",answer:"Non, nos produits ne contiennent pas de THC. Tous nos lots sont analysés par un laboratoire tiers en France pour garantir leur conformité."},{question:"Quel dosage de CBD dois-je utiliser ?",answer:"Nous recommandons une dose journalière de 50mg de CBD, à prendre en une fois ou en deux fois selon vos préférences."}],fW=()=>s.jsx("section",{className:"py-16 md:py-24 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-16 items-center max-w-7xl mx-auto",children:[s.jsxs("div",{className:"relative order-2 lg:order-1",children:[s.jsxs("div",{className:"relative rounded-2xl overflow-hidden shadow-2xl",children:[s.jsx("img",{src:uW,alt:"Feuilles de chanvre au soleil",className:"w-full h-[300px] md:h-[400px] object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-primary/40 to-transparent"})]}),s.jsx("div",{className:"absolute -bottom-4 -right-4 bg-primary text-primary-foreground px-6 py-3 rounded-xl shadow-lg",children:s.jsx("p",{className:"text-sm font-medium",children:"100% Légal en France"})})]}),s.jsxs("div",{className:"order-1 lg:order-2",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4",children:"FAQ"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Tout savoir sur le CBD"}),s.jsx("p",{className:"text-muted-foreground mb-8",children:"Retrouvez les réponses aux questions les plus fréquentes sur le CBD et nos produits."}),s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-3 mb-8",children:dW.map((e,t)=>s.jsxs(Pn,{value:`item-${t}`,className:"bg-card border border-border rounded-xl px-4 shadow-sm",children:[s.jsx(In,{className:"text-left font-semibold text-foreground hover:text-primary py-4 text-sm md:text-base",children:e.question}),s.jsx(Fn,{className:"pb-4 text-muted-foreground text-sm",children:e.answer})]},t))}),s.jsx(pe,{to:"/faq",children:s.jsxs(se,{className:"rounded-full px-6 group",children:["Voir toutes les questions",s.jsx(kn,{className:"w-4 h-4 ml-2 group-hover:translate-x-1 transition-transform"})]})})]})]})})});var vR={exports:{}},yR={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Pu=g;function hW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mW=typeof Object.is=="function"?Object.is:hW,pW=Pu.useState,xW=Pu.useEffect,gW=Pu.useLayoutEffect,vW=Pu.useDebugValue;function yW(e,t){var r=t(),n=pW({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return gW(function(){a.value=r,a.getSnapshot=t,Sg(a)&&i({inst:a})},[e,r,t]),xW(function(){return Sg(a)&&i({inst:a}),e(function(){Sg(a)&&i({inst:a})})},[e]),vW(r),r}function Sg(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!mW(e,r)}catch{return!0}}function bW(e,t){return t()}var wW=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?bW:yW;yR.useSyncExternalStore=Pu.useSyncExternalStore!==void 0?Pu.useSyncExternalStore:wW;vR.exports=yR;var jW=vR.exports;function NW(){return jW.useSyncExternalStore(_W,()=>!0,()=>!1)}function _W(){return()=>{}}var dw="Avatar",[CW]=Yr(dw),[SW,bR]=CW(dw),wR=g.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[a,i]=g.useState("idle");return s.jsx(SW,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:s.jsx(ze.span,{...n,ref:t})})});wR.displayName=dw;var jR="AvatarImage",NR=g.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:a=()=>{},...i}=e,o=bR(jR,r),l=EW(n,i),c=dr(u=>{a(u),o.onImageLoadingStatusChange(u)});return fr(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?s.jsx(ze.img,{...i,ref:t,src:n}):null});NR.displayName=jR;var _R="AvatarFallback",CR=g.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...a}=e,i=bR(_R,r),[o,l]=g.useState(n===void 0);return g.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(c)}},[n]),o&&i.imageLoadingStatus!=="loaded"?s.jsx(ze.span,{...a,ref:t}):null});CR.displayName=_R;function c_(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function EW(e,{referrerPolicy:t,crossOrigin:r}){const n=NW(),a=g.useRef(null),i=n?(a.current||(a.current=new window.Image),a.current):null,[o,l]=g.useState(()=>c_(i,e));return fr(()=>{l(c_(i,e))},[i,e]),fr(()=>{const c=f=>()=>{l(f)};if(!i)return;const u=c("loaded"),d=c("error");return i.addEventListener("load",u),i.addEventListener("error",d),t&&(i.referrerPolicy=t),typeof r=="string"&&(i.crossOrigin=r),()=>{i.removeEventListener("load",u),i.removeEventListener("error",d)}},[i,r,t]),o}var SR=wR,ER=NR,kR=CR;const fw=g.forwardRef(({className:e,...t},r)=>s.jsx(SR,{ref:r,className:Pe("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));fw.displayName=SR.displayName;const kW=g.forwardRef(({className:e,...t},r)=>s.jsx(ER,{ref:r,className:Pe("aspect-square h-full w-full",e),...t}));kW.displayName=ER.displayName;const hw=g.forwardRef(({className:e,...t},r)=>s.jsx(kR,{ref:r,className:Pe("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));hw.displayName=kR.displayName;const u_=({rating:e=5,size:t="sm"})=>{const r=t==="md"?"h-5 w-5":"h-4 w-4";return s.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((n,a)=>s.jsx("div",{className:`${r} ${a<e?"bg-[#00b67a]":"bg-muted"} flex items-center justify-center`,children:s.jsx(Nh,{className:`${t==="md"?"h-3 w-3":"h-2.5 w-2.5"} fill-white text-white`})},a))})},TW=()=>{const e=[{name:"Ka neliro",date:"Il y a 3 jours",rating:5,text:"Très bons produits découverts en pharmacie et devenus désormais indispensables. Douleurs ou moral en berne, les produits noto sont une aide rapide à mon bien être.",initial:"KN",verified:!0},{name:"Estelle Rhône",date:"15 nov. 2025",rating:5,text:"Cbd algos marque Nôto, d'excellente qualité, sous forme de tube de granules extrêmement pratique pour l'avoir toujours sur soi, prise rapide et efficace immédiatement sur les douleurs.",initial:"ER",verified:!0},{name:"Rebecca M.",date:"26 oct. 2025",rating:5,text:"J'ai une polyarthrite et de l'arthrose. Le seul 'médicament' qui agit vraiment rapidement et sans effets secondaires. Je le recommande vivement.",initial:"RM",verified:!0}];return s.jsx("section",{className:"py-20 bg-muted",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-4xl font-bold text-primary mb-2",children:"VOS AVIS SUR NŌTO"}),s.jsx("div",{className:"w-24 h-1 bg-primary mx-auto mb-6"}),s.jsxs("div",{className:"flex flex-col items-center gap-4 mb-8",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-4xl font-bold text-foreground",children:"4,7"}),s.jsxs("div",{className:"flex flex-col items-start",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Excellent"}),s.jsx(u_,{rating:5,size:"md"})]})]}),s.jsxs("p",{className:"text-muted-foreground",children:["Basé sur ",s.jsx("span",{className:"font-semibold text-foreground",children:"447 avis"})]}),s.jsxs("a",{href:"https://fr.trustpilot.com/review/notocbd.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[s.jsxs("svg",{viewBox:"0 0 126 31",className:"h-7",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M33.426 0H0v30.727h33.426V0z",fill:"#00B67A"}),s.jsx("path",{d:"M40.758 0h33.426v30.727H40.758V0z",fill:"#00B67A"}),s.jsx("path",{d:"M81.52 0h33.427v30.727H81.52V0z",fill:"#00B67A"}),s.jsx("path",{d:"M16.713 12.734l5.186-1.057 2.193-6.69-4.186 10.734-3.193 1.013z",fill:"#005128"}),s.jsx("path",{d:"M16.713 12.734L11.51 16.72l1.986 6.09 3.217-10.076zm-5.203 3.986l-1.986-6.09 7.189-5.206-5.203 11.296z",fill:"#DCDCE6"}),s.jsx("path",{d:"M16.713 12.734l5.186-1.057-5.203 5.043.017-3.986zm-5.203 3.986l1.986 6.09 3.2-5.033.017-1.057z",fill:"#FFF"}),s.jsx("path",{d:"M57.471 12.734l5.186-1.057 2.193-6.69-4.186 10.734-3.193 1.013z",fill:"#005128"}),s.jsx("path",{d:"M57.471 12.734l-5.203 3.986 1.986 6.09 3.217-10.076zm-5.203 3.986l-1.986-6.09 7.189-5.206-5.203 11.296z",fill:"#DCDCE6"}),s.jsx("path",{d:"M57.471 12.734l5.186-1.057-5.203 5.043.017-3.986zm-5.203 3.986l1.986 6.09 3.2-5.033.017-1.057z",fill:"#FFF"}),s.jsx("path",{d:"M98.234 12.734l5.185-1.057 2.193-6.69-4.185 10.734-3.193 1.013z",fill:"#005128"}),s.jsx("path",{d:"M98.234 12.734l-5.203 3.986 1.985 6.09 3.218-10.076zm-5.203 3.986l-1.986-6.09 7.189-5.206-5.203 11.296z",fill:"#DCDCE6"}),s.jsx("path",{d:"M98.234 12.734l5.185-1.057-5.202 5.043.017-3.986zm-5.203 3.986l1.985 6.09 3.201-5.033.017-1.057z",fill:"#FFF"})]}),s.jsx("span",{className:"text-lg font-semibold text-[#191919]",children:"Trustpilot"})]})]}),s.jsx("a",{href:"https://fr.trustpilot.com/review/notocbd.com",target:"_blank",rel:"noopener noreferrer",children:s.jsxs(se,{variant:"outline",className:"gap-2",children:[s.jsx(Al,{className:"h-4 w-4"}),"Écrire un avis"]})})]}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:e.map((t,r)=>s.jsxs(ve,{className:"p-6 space-y-4 bg-card hover:shadow-lg transition-shadow",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(fw,{className:"h-12 w-12",children:s.jsx(hw,{className:"bg-primary/10 text-primary font-medium",children:t.initial})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-foreground",children:t.name}),s.jsx("div",{className:"text-sm text-muted-foreground",children:t.date})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(u_,{rating:t.rating}),t.verified&&s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Ot,{className:"h-3 w-3 text-[#00b67a]"}),"Vérifié"]})]}),s.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:t.text})]},r))}),s.jsx("div",{className:"text-center mt-8",children:s.jsxs(pe,{to:"/temoignages",className:"inline-flex items-center gap-2 text-primary hover:underline font-medium",children:["Voir tous les avis (447)",s.jsx(Al,{className:"h-4 w-4"})]})})]})})})},lt=g.forwardRef(({className:e,type:t,...r},n)=>s.jsx("input",{type:t,className:Pe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));lt.displayName="Input";const it=()=>s.jsx("footer",{className:"bg-background border-t",children:s.jsxs("div",{className:"container mx-auto px-4 py-16",children:[s.jsxs("div",{className:"grid md:grid-cols-4 gap-8 mb-12",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-lg mb-4",children:"BESOIN D'AIDE ?"}),s.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[s.jsx("li",{children:s.jsx(pe,{to:"/contact",className:"hover:text-primary",children:"Contact"})}),s.jsx("li",{children:s.jsx(pe,{to:"/newsletter",className:"hover:text-primary",children:"Newsletter"})}),s.jsx("li",{children:s.jsx(pe,{to:"/faq",className:"hover:text-primary",children:"FAQ"})}),s.jsx("li",{children:s.jsx(pe,{to:"/livraison",className:"hover:text-primary",children:"Livraison"})}),s.jsx("li",{children:s.jsx(pe,{to:"/cgv",className:"hover:text-primary",children:"CGV"})})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-lg mb-4",children:"NŌTO"}),s.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[s.jsx("li",{children:s.jsx(pe,{to:"/notre-marque",className:"hover:text-primary",children:"Notre Marque"})}),s.jsx("li",{children:s.jsx(pe,{to:"/notre-cbd",className:"hover:text-primary",children:"Notre CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/faq",className:"hover:text-primary",children:"Tout savoir sur le CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/blog",className:"hover:text-primary",children:"Blog CBD"})}),s.jsx("li",{children:s.jsx("a",{href:"#",className:"hover:text-primary",children:"Programme de fidélité"})}),s.jsx("li",{children:s.jsx("a",{href:"#",className:"hover:text-primary",children:"Affiliation"})}),s.jsx("li",{children:s.jsx("a",{href:"#",className:"hover:text-primary",children:"CBD Pharmacie"})})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-lg mb-4",children:"NOS PRODUITS"}),s.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[s.jsx("li",{children:s.jsx(pe,{to:"/produits/capsules-cbd",className:"hover:text-primary",children:"Capsules CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/produits/huiles-cbd",className:"hover:text-primary",children:"Huiles CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/produits/granules-cbd",className:"hover:text-primary",children:"Granules CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/produits/gummies-cbd",className:"hover:text-primary",children:"Gummies CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/produits/sprays-cbd",className:"hover:text-primary",children:"Sprays CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/produits/shampoings-secs-cbd",className:"hover:text-primary",children:"Shampoings secs CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/analyses-cbd",className:"hover:text-primary",children:"Analyses CBD"})}),s.jsx("li",{children:s.jsx(pe,{to:"/produits",className:"hover:text-primary",children:"Tous nos produits"})})]})]}),s.jsxs("div",{className:"bg-primary text-primary-foreground rounded-2xl p-6",children:[s.jsx("h3",{className:"font-bold text-lg mb-4",children:"NEWSLETTER"}),s.jsx("p",{className:"text-sm mb-4",children:"Inscrivez-vous pour recevoir nos offres exclusives et bénéficiez de 10% de remise sur votre prochaine commande !"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(lt,{type:"email",placeholder:"Votre Email",className:"bg-background text-foreground border-none"}),s.jsx(lt,{type:"tel",placeholder:"Votre Téléphone",className:"bg-background text-foreground border-none"}),s.jsx(se,{className:"bg-primary-dark hover:bg-primary-dark/90 text-primary-foreground w-full",children:"S'INSCRIRE"})]})]})]}),s.jsxs("div",{className:"text-center space-y-6 pt-8 border-t",children:[s.jsx("div",{className:"flex justify-center items-center gap-4",children:s.jsx("img",{src:QA,alt:"CBD",className:"h-12 w-12 object-contain"})}),s.jsxs("div",{className:"flex justify-center gap-6",children:[s.jsx("a",{href:"#",className:"text-muted-foreground hover:text-primary",children:s.jsx(K8,{className:"h-6 w-6"})}),s.jsx("a",{href:"#",className:"text-muted-foreground hover:text-primary",children:s.jsx($8,{className:"h-6 w-6"})}),s.jsx("a",{href:"#",className:"text-muted-foreground hover:text-primary",children:s.jsx(fL,{className:"h-6 w-6"})})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"font-bold text-2xl text-primary mb-4",children:"VOS PROBLÉMATIQUES"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-3xl mx-auto",children:"Vous cherchez une solution adaptée à vos besoins ? Découvrez nos formules et composez votre routine bien-être personnalisée. 🌿✨"})]}),s.jsxs("div",{className:"text-xs text-muted-foreground pt-6 space-y-1",children:[s.jsxs("p",{children:["Site fait avec amour par"," ",s.jsx("a",{href:"https://textone.fr/",className:"hover:text-primary underline",target:"_blank",rel:"noreferrer",children:"Textone"})]}),s.jsxs("p",{children:["Maintenance sécurité par"," ",s.jsx("a",{href:"https://www.securitewp.com/",className:"hover:text-primary underline",target:"_blank",rel:"noreferrer nofollow",children:"SecuriteWP"})]})]})]})]})}),AW=()=>(g.useEffect(()=>{const e=document.querySelector("script[data-organization-jsonld]");e&&e.remove();const t={"@context":"https://schema.org","@type":"Organization",name:"NŌTO CBD",alternateName:"NOTO CBD",url:"https://www.notocbd.com",logo:"https://www.notocbd.com/favicon.png",description:"NŌTO CBD propose des produits CBD premium de qualité française : huiles CBD, gummies, granulés, capsules et cosmétiques. 100% légal, sans THC, fabriqué en France.",foundingDate:"2020",address:{"@type":"PostalAddress",addressCountry:"FR"},contactPoint:{"@type":"ContactPoint",contactType:"customer service",url:"https://www.notocbd.com/contact",availableLanguage:["French"]},sameAs:["https://fr.trustpilot.com/review/notocbd.com"],aggregateRating:{"@type":"AggregateRating",ratingValue:"4.7",reviewCount:"447",bestRating:"5",worstRating:"1"},brand:{"@type":"Brand",name:"NŌTO CBD",logo:"https://www.notocbd.com/favicon.png"},offers:{"@type":"AggregateOffer",priceCurrency:"EUR",availability:"https://schema.org/InStock",offerCount:"20+"},areaServed:{"@type":"Country",name:"France"},knowsAbout:["CBD","Cannabidiol","Huile CBD","Gummies CBD","Bien-être naturel","Compléments alimentaires"],slogan:"Votre bien-être, naturellement"},r=document.createElement("script");return r.type="application/ld+json",r.setAttribute("data-organization-jsonld","true"),r.textContent=JSON.stringify(t,null,0),document.head.appendChild(r),()=>{const n=document.querySelector("script[data-organization-jsonld]");n&&n.remove()}},[]),null),wm="https://www.notocbd.com",RW=()=>(g.useEffect(()=>{const e=document.querySelector("script[data-website-jsonld]");e&&e.remove();const t={"@context":"https://schema.org","@type":"WebSite",name:"NŌTO CBD",alternateName:["NOTO CBD","NŌTO"],url:wm,description:"Boutique en ligne de produits CBD premium fabriqués en France. Huiles, gummies, granules, capsules et cosmétiques CBD.",inLanguage:"fr-FR",potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:`${wm}/produits?q={search_term_string}`},"query-input":"required name=search_term_string"},publisher:{"@type":"Organization",name:"NŌTO CBD",url:wm,logo:{"@type":"ImageObject",url:`${wm}/favicon.png`}}},r=document.createElement("script");return r.type="application/ld+json",r.setAttribute("data-website-jsonld","true"),r.textContent=JSON.stringify(t),document.head.appendChild(r),()=>{r.remove()}},[]),null),zi="https://www.notocbd.com",DW=()=>(g.useEffect(()=>{const e=document.querySelector("script[data-localbusiness-jsonld]");e&&e.remove();const t={"@context":"https://schema.org","@type":"Store","@id":`${zi}/#store`,name:"NŌTO CBD",alternateName:"NOTO CBD",description:"Boutique en ligne de produits CBD premium fabriqués en France. Huiles CBD, gummies, granules, capsules et cosmétiques. Disponible en pharmacie.",url:zi,logo:`${zi}/favicon.png`,image:`${zi}/favicon.png`,telephone:"+33 7 67 77 87 85",email:"contact@notocbd.com",priceRange:"€€",currenciesAccepted:"EUR",paymentAccepted:"Carte bancaire, Visa, Mastercard",address:{"@type":"PostalAddress",addressCountry:"FR",addressRegion:"France"},geo:{"@type":"GeoCoordinates",addressCountry:"FR"},areaServed:{"@type":"Country",name:"France"},openingHoursSpecification:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],opens:"00:00",closes:"23:59"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.7",reviewCount:"447",bestRating:"5",worstRating:"1"},sameAs:["https://fr.trustpilot.com/review/notocbd.com"],hasOfferCatalog:{"@type":"OfferCatalog",name:"Produits CBD NŌTO",itemListElement:[{"@type":"OfferCatalog",name:"Huiles CBD",url:`${zi}/produits/huiles-cbd`},{"@type":"OfferCatalog",name:"Gummies CBD",url:`${zi}/produits/gummies`},{"@type":"OfferCatalog",name:"Granules CBD",url:`${zi}/produits/granules`},{"@type":"OfferCatalog",name:"Capsules CBD",url:`${zi}/produits/capsules`}]}},r=document.createElement("script");return r.type="application/ld+json",r.setAttribute("data-localbusiness-jsonld","true"),r.textContent=JSON.stringify(t),document.head.appendChild(r),()=>{r.remove()}},[]),null),Xm="https://www.notocbd.com",OW=`${Xm}/favicon.png`,It=({title:e,description:t,image:r=OW,url:n,type:a="website",publishedTime:i,modifiedTime:o})=>(g.useEffect(()=>{const l=n?`${Xm}${n}`:Xm,c=r.startsWith("http")?r:`${Xm}${r}`,u=(h,m,v=!1)=>{const p=v?`meta[name="${h}"]`:`meta[property="${h}"]`;let x=document.querySelector(p);x||(x=document.createElement("meta"),v?x.setAttribute("name",h):x.setAttribute("property",h),document.head.appendChild(x)),x.setAttribute("content",m)};let d=document.querySelector('link[rel="canonical"]');d||(d=document.createElement("link"),d.setAttribute("rel","canonical"),document.head.appendChild(d)),d.setAttribute("href",l);let f=document.querySelector('meta[name="robots"]');return f||(f=document.createElement("meta"),f.setAttribute("name","robots"),document.head.appendChild(f)),f.setAttribute("content","index, follow"),u("og:title",e),u("og:description",t),u("og:image",c),u("og:url",l),u("og:type",a),u("og:site_name","NŌTO CBD"),u("og:locale","fr_FR"),u("twitter:card","summary_large_image",!0),u("twitter:title",e,!0),u("twitter:description",t,!0),u("twitter:image",c,!0),u("twitter:site","@notocbd",!0),a==="article"&&(i&&u("article:published_time",i),o&&u("article:modified_time",o),u("article:author","NŌTO CBD")),a==="product"&&(u("product:brand","NŌTO CBD"),u("product:availability","in stock"),u("product:condition","new")),()=>{}},[e,t,r,n,a,i,o]),null),PW=()=>(g.useEffect(()=>{document.title="NŌTO CBD | Huiles, Gummies & Granules CBD France";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Découvrez les produits CBD NŌTO : huiles, gummies, granules et capsules. Fabrication française, disponible en pharmacie. Livraison rapide.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(AW,{}),s.jsx(RW,{}),s.jsx(DW,{}),s.jsx(It,{title:"NŌTO CBD | Huiles, Gummies & Granules CBD France",description:"Découvrez les produits CBD NŌTO : huiles, gummies, granules et capsules. Fabrication française, disponible en pharmacie. Livraison rapide.",url:"/",image:"/favicon.png"}),s.jsxs("main",{children:[s.jsx(hz,{}),s.jsx(mz,{}),s.jsx(FH,{}),s.jsx($H,{}),s.jsx(qH,{}),s.jsx(BH,{}),s.jsx(HH,{}),s.jsx(fW,{}),s.jsx(TW,{})]}),s.jsx(it,{})]})),IW=()=>{const e=Oi(),t=wa(),{data:r,isLoading:n}=PH(6),[a,i]=g.useState("");return g.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname),(async()=>{try{const c=document.referrer||null,u=navigator.userAgent||null,{error:d}=await be.rpc("log_404_error",{p_path:e.pathname,p_referrer:c,p_user_agent:u});d&&console.error("Error logging 404:",d)}catch(c){console.error("Failed to log 404:",c)}})(),document.title="Page non trouvée | NŌTO CBD";const l=(c,u)=>{let d=document.querySelector(`meta[name="${c}"]`);d||(d=document.createElement("meta"),d.setAttribute("name",c),document.head.appendChild(d)),d.setAttribute("content",u)};l("description","Cette page n'existe pas. Découvrez nos produits CBD de qualité : huiles, gummies, capsules et cosmétiques fabriqués en France."),l("robots","noindex, follow")},[e.pathname]),s.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[s.jsx(at,{}),s.jsxs("main",{className:"flex-1",children:[s.jsx("section",{className:"container mx-auto px-4 py-12 lg:py-20",children:s.jsxs("div",{className:"text-center max-w-2xl mx-auto",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("h1",{className:"text-8xl lg:text-9xl font-bold text-primary/20 mb-4",children:"404"}),s.jsx("h2",{className:"text-2xl lg:text-3xl font-bold text-foreground mb-4",children:"Oups ! Cette page n'existe pas"}),s.jsx("p",{className:"text-muted-foreground text-lg mb-6",children:"La page que vous recherchez a peut-être été déplacée, supprimée ou n'a jamais existé."})]}),s.jsx("form",{onSubmit:o=>{o.preventDefault(),a.trim()&&t(`/produits?search=${encodeURIComponent(a.trim())}`)},className:"max-w-md mx-auto mb-10",children:s.jsxs("div",{className:"relative",children:[s.jsx(ql,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),s.jsx(lt,{type:"text",placeholder:"Rechercher un produit...",value:a,onChange:o=>i(o.target.value),className:"pl-12 pr-24 h-14 rounded-full border-2 border-primary/20 focus:border-primary text-base"}),s.jsx(se,{type:"submit",size:"sm",className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full px-6",children:"Rechercher"})]})}),s.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 mb-12",children:[s.jsx(se,{asChild:!0,size:"lg",className:"rounded-full px-8",children:s.jsxs(pe,{to:"/",children:[s.jsx(Ul,{className:"w-5 h-5 mr-2"}),"Retour à l'accueil"]})}),s.jsx(se,{asChild:!0,variant:"outline",size:"lg",className:"rounded-full px-8",children:s.jsxs(pe,{to:"/produits",children:[s.jsx(ql,{className:"w-5 h-5 mr-2"}),"Voir tous les produits"]})})]}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-3 text-sm",children:[s.jsx(pe,{to:"/produits/huiles-cbd",className:"text-primary hover:underline",children:"Huiles CBD"}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx(pe,{to:"/produits/gummies-cbd",className:"text-primary hover:underline",children:"Gummies CBD"}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx(pe,{to:"/produits/capsules-cbd",className:"text-primary hover:underline",children:"Capsules CBD"}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx(pe,{to:"/faq",className:"text-primary hover:underline",children:"FAQ"}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx(pe,{to:"/contact",className:"text-primary hover:underline",children:"Contact"})]})]})}),s.jsx("section",{className:"bg-muted/30 py-12 lg:py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-2xl lg:text-3xl font-bold text-foreground mb-2",children:"Découvrez nos produits"}),s.jsx("p",{className:"text-muted-foreground",children:"Nos dernières nouveautés CBD de qualité premium"})]}),n?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:[...Array(3)].map((o,l)=>s.jsx("div",{className:"h-96 bg-muted animate-pulse rounded-lg"},l))}):r&&r.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:r.slice(0,3).map(o=>s.jsx(Kr,{product:o},o.id))}):null,s.jsx("div",{className:"text-center mt-10",children:s.jsx(se,{asChild:!0,variant:"outline",size:"lg",className:"rounded-full px-8",children:s.jsxs(pe,{to:"/produits",children:["Voir tous nos produits",s.jsx(Dn,{className:"w-4 h-4 ml-2 rotate-180"})]})})})]})})]}),s.jsx(it,{})]})};var t0="Dialog",[TR]=Yr(t0),[FW,Na]=TR(t0),AR=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,l=g.useRef(null),c=g.useRef(null),[u,d]=fn({prop:n,defaultProp:a??!1,onChange:i,caller:t0});return s.jsx(FW,{scope:t,triggerRef:l,contentRef:c,contentId:cn(),titleId:cn(),descriptionId:cn(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:o,children:r})};AR.displayName=t0;var RR="DialogTrigger",DR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Na(RR,r),i=pt(t,a.triggerRef);return s.jsx(ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":xw(a.open),...n,ref:i,onClick:ke(e.onClick,a.onOpenToggle)})});DR.displayName=RR;var mw="DialogPortal",[LW,OR]=TR(mw,{forceMount:void 0}),PR=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=Na(mw,t);return s.jsx(LW,{scope:t,forceMount:r,children:g.Children.map(n,o=>s.jsx(Xr,{present:r||i.open,children:s.jsx(bh,{asChild:!0,container:a,children:o})}))})};PR.displayName=mw;var Mp="DialogOverlay",IR=g.forwardRef((e,t)=>{const r=OR(Mp,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Na(Mp,e.__scopeDialog);return i.modal?s.jsx(Xr,{present:n||i.open,children:s.jsx(BW,{...a,ref:t})}):null});IR.displayName=Mp;var MW=Bl("DialogOverlay.RemoveScroll"),BW=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Na(Mp,r);return s.jsx(Gx,{as:MW,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(ze.div,{"data-state":xw(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Kl="DialogContent",FR=g.forwardRef((e,t)=>{const r=OR(Kl,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Na(Kl,e.__scopeDialog);return s.jsx(Xr,{present:n||i.open,children:i.modal?s.jsx(UW,{...a,ref:t}):s.jsx($W,{...a,ref:t})})});FR.displayName=Kl;var UW=g.forwardRef((e,t)=>{const r=Na(Kl,e.__scopeDialog),n=g.useRef(null),a=pt(t,r.contentRef,n);return g.useEffect(()=>{const i=n.current;if(i)return Bb(i)},[]),s.jsx(LR,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,i=>i.preventDefault())})}),$W=g.forwardRef((e,t)=>{const r=Na(Kl,e.__scopeDialog),n=g.useRef(!1),a=g.useRef(!1);return s.jsx(LR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=r.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),LR=g.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,l=Na(Kl,r),c=g.useRef(null),u=pt(t,c);return Fb(),s.jsxs(s.Fragment,{children:[s.jsx(Vx,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(Wu,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":xw(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(qW,{titleId:l.titleId}),s.jsx(VW,{contentRef:c,descriptionId:l.descriptionId})]})]})}),pw="DialogTitle",MR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Na(pw,r);return s.jsx(ze.h2,{id:a.titleId,...n,ref:t})});MR.displayName=pw;var BR="DialogDescription",UR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Na(BR,r);return s.jsx(ze.p,{id:a.descriptionId,...n,ref:t})});UR.displayName=BR;var $R="DialogClose",qR=g.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Na($R,r);return s.jsx(ze.button,{type:"button",...n,ref:t,onClick:ke(e.onClick,()=>a.onOpenChange(!1))})});qR.displayName=$R;function xw(e){return e?"open":"closed"}var zR="DialogTitleWarning",[kle,VR]=IF(zR,{contentName:Kl,titleName:pw,docsSlug:"dialog"}),qW=({titleId:e})=>{const t=VR(zR),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},zW="DialogDescriptionWarning",VW=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${VR(zW).contentName}}.`;return g.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},HR=AR,HW=DR,WR=PR,r0=IR,s0=FR,n0=MR,a0=UR,GR=qR;const Uo=HR,WW=WR,KR=g.forwardRef(({className:e,...t},r)=>s.jsx(r0,{ref:r,className:Pe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));KR.displayName=r0.displayName;const Ci=g.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(WW,{children:[s.jsx(KR,{}),s.jsxs(s0,{ref:n,className:Pe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,s.jsxs(GR,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(Tu,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ci.displayName=s0.displayName;const Si=({className:e,...t})=>s.jsx("div",{className:Pe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Si.displayName="DialogHeader";const Kf=({className:e,...t})=>s.jsx("div",{className:Pe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Kf.displayName="DialogFooter";const Ei=g.forwardRef(({className:e,...t},r)=>s.jsx(n0,{ref:r,className:Pe("text-lg font-semibold leading-none tracking-tight",e),...t}));Ei.displayName=n0.displayName;const Iu=g.forwardRef(({className:e,...t},r)=>s.jsx(a0,{ref:r,className:Pe("text-sm text-muted-foreground",e),...t}));Iu.displayName=a0.displayName;var GW="Label",YR=g.forwardRef((e,t)=>s.jsx(ze.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));YR.displayName=GW;var XR=YR;const KW=Gu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wt=g.forwardRef(({className:e,...t},r)=>s.jsx(XR,{ref:r,className:Pe(KW(),e),...t}));wt.displayName=XR.displayName;const Yf=g.forwardRef(({className:e,...t},r)=>s.jsx("textarea",{className:Pe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Yf.displayName="Textarea";function A1(e,[t,r]){return Math.min(r,Math.max(t,e))}function gw(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var YW=[" ","Enter","ArrowUp","ArrowDown"],XW=[" ","Enter"],Yl="Select",[i0,o0,QW]=yh(Yl),[od]=Yr(Yl,[QW,Zu]),l0=Zu(),[JW,Jo]=od(Yl),[ZW,eG]=od(Yl),QR=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:a,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:h,required:m,form:v}=e,p=l0(t),[x,w]=g.useState(null),[y,b]=g.useState(null),[N,C]=g.useState(!1),_=ac(u),[j,S]=fn({prop:n,defaultProp:a??!1,onChange:i,caller:Yl}),[k,D]=fn({prop:o,defaultProp:l,onChange:c,caller:Yl}),M=g.useRef(null),T=x?v||!!x.closest("form"):!0,[A,W]=g.useState(new Set),P=Array.from(A).map(V=>V.props.value).join(";");return s.jsx(pb,{...p,children:s.jsxs(JW,{required:m,scope:t,trigger:x,onTriggerChange:w,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:N,onValueNodeHasChildrenChange:C,contentId:cn(),value:k,onValueChange:D,open:j,onOpenChange:S,dir:_,triggerPointerDownPosRef:M,disabled:h,children:[s.jsx(i0.Provider,{scope:t,children:s.jsx(ZW,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(V=>{W(Z=>new Set(Z).add(V))},[]),onNativeOptionRemove:g.useCallback(V=>{W(Z=>{const Q=new Set(Z);return Q.delete(V),Q})},[]),children:r})}),T?s.jsxs(wD,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:k,onChange:V=>D(V.target.value),disabled:h,form:v,children:[k===void 0?s.jsx("option",{value:""}):null,Array.from(A)]},P):null]})})};QR.displayName=Yl;var JR="SelectTrigger",ZR=g.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...a}=e,i=l0(r),o=Jo(JR,r),l=o.disabled||n,c=pt(t,o.onTriggerChange),u=o0(r),d=g.useRef("touch"),[f,h,m]=ND(p=>{const x=u().filter(b=>!b.disabled),w=x.find(b=>b.value===o.value),y=_D(x,p,w);y!==void 0&&o.onValueChange(y.value)}),v=p=>{l||(o.onOpenChange(!0),m()),p&&(o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return s.jsx(xb,{asChild:!0,...i,children:s.jsx(ze.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":jD(o.value)?"":void 0,...a,ref:c,onClick:ke(a.onClick,p=>{p.currentTarget.focus(),d.current!=="mouse"&&v(p)}),onPointerDown:ke(a.onPointerDown,p=>{d.current=p.pointerType;const x=p.target;x.hasPointerCapture(p.pointerId)&&x.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(v(p),p.preventDefault())}),onKeyDown:ke(a.onKeyDown,p=>{const x=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&h(p.key),!(x&&p.key===" ")&&YW.includes(p.key)&&(v(),p.preventDefault())})})})});ZR.displayName=JR;var eD="SelectValue",tD=g.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,children:i,placeholder:o="",...l}=e,c=Jo(eD,r),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=pt(t,c.onValueNodeChange);return fr(()=>{u(d)},[u,d]),s.jsx(ze.span,{...l,ref:f,style:{pointerEvents:"none"},children:jD(c.value)?s.jsx(s.Fragment,{children:o}):i})});tD.displayName=eD;var tG="SelectIcon",rD=g.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...a}=e;return s.jsx(ze.span,{"aria-hidden":!0,...a,ref:t,children:n||"▼"})});rD.displayName=tG;var rG="SelectPortal",sD=e=>s.jsx(bh,{asChild:!0,...e});sD.displayName=rG;var Xl="SelectContent",nD=g.forwardRef((e,t)=>{const r=Jo(Xl,e.__scopeSelect),[n,a]=g.useState();if(fr(()=>{a(new DocumentFragment)},[]),!r.open){const i=n;return i?sc.createPortal(s.jsx(aD,{scope:e.__scopeSelect,children:s.jsx(i0.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),i):null}return s.jsx(iD,{...e,ref:t})});nD.displayName=Xl;var Kn=10,[aD,Zo]=od(Xl),sG="SelectContentImpl",nG=Bl("SelectContent.RemoveScroll"),iD=g.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:p,avoidCollisions:x,...w}=e,y=Jo(Xl,r),[b,N]=g.useState(null),[C,_]=g.useState(null),j=pt(t,J=>N(J)),[S,k]=g.useState(null),[D,M]=g.useState(null),T=o0(r),[A,W]=g.useState(!1),P=g.useRef(!1);g.useEffect(()=>{if(b)return Bb(b)},[b]),Fb();const V=g.useCallback(J=>{const[K,...ae]=T().map(F=>F.ref.current),[te]=ae.slice(-1),xe=document.activeElement;for(const F of J)if(F===xe||(F==null||F.scrollIntoView({block:"nearest"}),F===K&&C&&(C.scrollTop=0),F===te&&C&&(C.scrollTop=C.scrollHeight),F==null||F.focus(),document.activeElement!==xe))return},[T,C]),Z=g.useCallback(()=>V([S,b]),[V,S,b]);g.useEffect(()=>{A&&Z()},[A,Z]);const{onOpenChange:Q,triggerPointerDownPosRef:O}=y;g.useEffect(()=>{if(b){let J={x:0,y:0};const K=te=>{var xe,F;J={x:Math.abs(Math.round(te.pageX)-(((xe=O.current)==null?void 0:xe.x)??0)),y:Math.abs(Math.round(te.pageY)-(((F=O.current)==null?void 0:F.y)??0))}},ae=te=>{J.x<=10&&J.y<=10?te.preventDefault():b.contains(te.target)||Q(!1),document.removeEventListener("pointermove",K),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ae,{capture:!0})}}},[b,Q,O]),g.useEffect(()=>{const J=()=>Q(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[Q]);const[ne,he]=ND(J=>{const K=T().filter(xe=>!xe.disabled),ae=K.find(xe=>xe.ref.current===document.activeElement),te=_D(K,J,ae);te&&setTimeout(()=>te.ref.current.focus())}),I=g.useCallback((J,K,ae)=>{const te=!P.current&&!ae;(y.value!==void 0&&y.value===K||te)&&(k(J),te&&(P.current=!0))},[y.value]),Y=g.useCallback(()=>b==null?void 0:b.focus(),[b]),E=g.useCallback((J,K,ae)=>{const te=!P.current&&!ae;(y.value!==void 0&&y.value===K||te)&&M(J)},[y.value]),B=n==="popper"?R1:oD,ee=B===R1?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:v,hideWhenDetached:p,avoidCollisions:x}:{};return s.jsx(aD,{scope:r,content:b,viewport:C,onViewportChange:_,itemRefCallback:I,selectedItem:S,onItemLeave:Y,itemTextRefCallback:E,focusSelectedItem:Z,selectedItemText:D,position:n,isPositioned:A,searchRef:ne,children:s.jsx(Gx,{as:nG,allowPinchZoom:!0,children:s.jsx(Vx,{asChild:!0,trapped:y.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:ke(a,J=>{var K;(K=y.trigger)==null||K.focus({preventScroll:!0}),J.preventDefault()}),children:s.jsx(Wu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:s.jsx(B,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:J=>J.preventDefault(),...w,...ee,onPlaced:()=>W(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:ke(w.onKeyDown,J=>{const K=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!K&&J.key.length===1&&he(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let te=T().filter(xe=>!xe.disabled).map(xe=>xe.ref.current);if(["ArrowUp","End"].includes(J.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const xe=J.target,F=te.indexOf(xe);te=te.slice(F+1)}setTimeout(()=>V(te)),J.preventDefault()}})})})})})})});iD.displayName=sG;var aG="SelectItemAlignedPosition",oD=g.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...a}=e,i=Jo(Xl,r),o=Zo(Xl,r),[l,c]=g.useState(null),[u,d]=g.useState(null),f=pt(t,j=>d(j)),h=o0(r),m=g.useRef(!1),v=g.useRef(!0),{viewport:p,selectedItem:x,selectedItemText:w,focusSelectedItem:y}=o,b=g.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&x&&w){const j=i.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),D=w.getBoundingClientRect();if(i.dir!=="rtl"){const xe=D.left-S.left,F=k.left-xe,We=j.left-F,je=j.width+We,Oe=Math.max(je,S.width),Ne=window.innerWidth-Kn,ge=A1(F,[Kn,Math.max(Kn,Ne-Oe)]);l.style.minWidth=je+"px",l.style.left=ge+"px"}else{const xe=S.right-D.right,F=window.innerWidth-k.right-xe,We=window.innerWidth-j.right-F,je=j.width+We,Oe=Math.max(je,S.width),Ne=window.innerWidth-Kn,ge=A1(F,[Kn,Math.max(Kn,Ne-Oe)]);l.style.minWidth=je+"px",l.style.right=ge+"px"}const M=h(),T=window.innerHeight-Kn*2,A=p.scrollHeight,W=window.getComputedStyle(u),P=parseInt(W.borderTopWidth,10),V=parseInt(W.paddingTop,10),Z=parseInt(W.borderBottomWidth,10),Q=parseInt(W.paddingBottom,10),O=P+V+A+Q+Z,ne=Math.min(x.offsetHeight*5,O),he=window.getComputedStyle(p),I=parseInt(he.paddingTop,10),Y=parseInt(he.paddingBottom,10),E=j.top+j.height/2-Kn,B=T-E,ee=x.offsetHeight/2,J=x.offsetTop+ee,K=P+V+J,ae=O-K;if(K<=E){const xe=M.length>0&&x===M[M.length-1].ref.current;l.style.bottom="0px";const F=u.clientHeight-p.offsetTop-p.offsetHeight,We=Math.max(B,ee+(xe?Y:0)+F+Z),je=K+We;l.style.height=je+"px"}else{const xe=M.length>0&&x===M[0].ref.current;l.style.top="0px";const We=Math.max(E,P+p.offsetTop+(xe?I:0)+ee)+ae;l.style.height=We+"px",p.scrollTop=K-E+p.offsetTop}l.style.margin=`${Kn}px 0`,l.style.minHeight=ne+"px",l.style.maxHeight=T+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[h,i.trigger,i.valueNode,l,u,p,x,w,i.dir,n]);fr(()=>b(),[b]);const[N,C]=g.useState();fr(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const _=g.useCallback(j=>{j&&v.current===!0&&(b(),y==null||y(),v.current=!1)},[b,y]);return s.jsx(oG,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:_,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:s.jsx(ze.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});oD.displayName=aG;var iG="SelectPopperPosition",R1=g.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=Kn,...i}=e,o=l0(r);return s.jsx(gb,{...o,...i,ref:t,align:n,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});R1.displayName=iG;var[oG,vw]=od(Xl,{}),D1="SelectViewport",lD=g.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...a}=e,i=Zo(D1,r),o=vw(D1,r),l=pt(t,i.onViewportChange),c=g.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),s.jsx(i0.Slot,{scope:r,children:s.jsx(ze.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:ke(a.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const v=window.innerHeight-Kn*2,p=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),w=Math.max(p,x);if(w<v){const y=w+m,b=Math.min(v,y),N=y-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=N>0?N:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});lD.displayName=D1;var cD="SelectGroup",[lG,cG]=od(cD),uG=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=cn();return s.jsx(lG,{scope:r,id:a,children:s.jsx(ze.div,{role:"group","aria-labelledby":a,...n,ref:t})})});uG.displayName=cD;var uD="SelectLabel",dD=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=cG(uD,r);return s.jsx(ze.div,{id:a.id,...n,ref:t})});dD.displayName=uD;var Bp="SelectItem",[dG,fD]=od(Bp),hD=g.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:i,...o}=e,l=Jo(Bp,r),c=Zo(Bp,r),u=l.value===n,[d,f]=g.useState(i??""),[h,m]=g.useState(!1),v=pt(t,y=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,y,n,a)}),p=cn(),x=g.useRef("touch"),w=()=>{a||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(dG,{scope:r,value:n,disabled:a,textId:p,isSelected:u,onItemTextChange:g.useCallback(y=>{f(b=>b||((y==null?void 0:y.textContent)??"").trim())},[]),children:s.jsx(i0.ItemSlot,{scope:r,value:n,disabled:a,textValue:d,children:s.jsx(ze.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:v,onFocus:ke(o.onFocus,()=>m(!0)),onBlur:ke(o.onBlur,()=>m(!1)),onClick:ke(o.onClick,()=>{x.current!=="mouse"&&w()}),onPointerUp:ke(o.onPointerUp,()=>{x.current==="mouse"&&w()}),onPointerDown:ke(o.onPointerDown,y=>{x.current=y.pointerType}),onPointerMove:ke(o.onPointerMove,y=>{var b;x.current=y.pointerType,a?(b=c.onItemLeave)==null||b.call(c):x.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(o.onPointerLeave,y=>{var b;y.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:ke(o.onKeyDown,y=>{var N;((N=c.searchRef)==null?void 0:N.current)!==""&&y.key===" "||(XW.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});hD.displayName=Bp;var Md="SelectItemText",mD=g.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,...i}=e,o=Jo(Md,r),l=Zo(Md,r),c=fD(Md,r),u=eG(Md,r),[d,f]=g.useState(null),h=pt(t,w=>f(w),c.onItemTextChange,w=>{var y;return(y=l.itemTextRefCallback)==null?void 0:y.call(l,w,c.value,c.disabled)}),m=d==null?void 0:d.textContent,v=g.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:x}=u;return fr(()=>(p(v),()=>x(v)),[p,x,v]),s.jsxs(s.Fragment,{children:[s.jsx(ze.span,{id:c.textId,...i,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?sc.createPortal(i.children,o.valueNode):null]})});mD.displayName=Md;var pD="SelectItemIndicator",xD=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return fD(pD,r).isSelected?s.jsx(ze.span,{"aria-hidden":!0,...n,ref:t}):null});xD.displayName=pD;var O1="SelectScrollUpButton",gD=g.forwardRef((e,t)=>{const r=Zo(O1,e.__scopeSelect),n=vw(O1,e.__scopeSelect),[a,i]=g.useState(!1),o=pt(t,n.onScrollButtonChange);return fr(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?s.jsx(yD,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});gD.displayName=O1;var P1="SelectScrollDownButton",vD=g.forwardRef((e,t)=>{const r=Zo(P1,e.__scopeSelect),n=vw(P1,e.__scopeSelect),[a,i]=g.useState(!1),o=pt(t,n.onScrollButtonChange);return fr(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?s.jsx(yD,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});vD.displayName=P1;var yD=g.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=e,i=Zo("SelectScrollButton",r),o=g.useRef(null),l=o0(r),c=g.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),fr(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),s.jsx(ze.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:ke(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ke(a.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ke(a.onPointerLeave,()=>{c()})})}),fG="SelectSeparator",bD=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(ze.div,{"aria-hidden":!0,...n,ref:t})});bD.displayName=fG;var I1="SelectArrow",hG=g.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=l0(r),i=Jo(I1,r),o=Zo(I1,r);return i.open&&o.position==="popper"?s.jsx(vb,{...a,...n,ref:t}):null});hG.displayName=I1;var mG="SelectBubbleInput",wD=g.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const a=g.useRef(null),i=pt(n,a),o=gw(t);return g.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const f=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(f)}},[o,t]),s.jsx(ze.select,{...r,style:{...Wk,...r.style},ref:i,defaultValue:t})});wD.displayName=mG;function jD(e){return e===""||e===void 0}function ND(e){const t=dr(e),r=g.useRef(""),n=g.useRef(0),a=g.useCallback(o=>{const l=r.current+o;t(l),function c(u){r.current=u,window.clearTimeout(n.current),u!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=g.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,i]}function _D(e,t,r){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=pG(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==r));const c=o.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function pG(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var xG=QR,CD=ZR,gG=tD,vG=rD,yG=sD,SD=nD,bG=lD,ED=dD,kD=hD,wG=mD,jG=xD,TD=gD,AD=vD,RD=bD;const mi=xG,pi=gG,$a=g.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(CD,{ref:n,className:Pe("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,s.jsx(vG,{asChild:!0,children:s.jsx(If,{className:"h-4 w-4 opacity-50"})})]}));$a.displayName=CD.displayName;const DD=g.forwardRef(({className:e,...t},r)=>s.jsx(TD,{ref:r,className:Pe("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(P8,{className:"h-4 w-4"})}));DD.displayName=TD.displayName;const OD=g.forwardRef(({className:e,...t},r)=>s.jsx(AD,{ref:r,className:Pe("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(If,{className:"h-4 w-4"})}));OD.displayName=AD.displayName;const qa=g.forwardRef(({className:e,children:t,position:r="popper",...n},a)=>s.jsx(yG,{children:s.jsxs(SD,{ref:a,className:Pe("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[s.jsx(DD,{}),s.jsx(bG,{className:Pe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(OD,{})]})}));qa.displayName=SD.displayName;const NG=g.forwardRef(({className:e,...t},r)=>s.jsx(ED,{ref:r,className:Pe("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));NG.displayName=ED.displayName;const yt=g.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(kD,{ref:n,className:Pe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(jG,{children:s.jsx(tb,{className:"h-4 w-4"})})}),s.jsx(wG,{children:t})]}));yt.displayName=kD.displayName;const _G=g.forwardRef(({className:e,...t},r)=>s.jsx(RD,{ref:r,className:Pe("-mx-1 my-1 h-px bg-muted",e),...t}));_G.displayName=RD.displayName;const CG=({open:e,onOpenChange:t,product:r,onSuccess:n})=>{const[a,i]=g.useState({}),[o,l]=g.useState([]),[c,u]=g.useState(!1),[d,f]=g.useState(!1),[h,m]=g.useState(!1);g.useEffect(()=>{r&&(i({name:r.name,slug:r.slug,category:r.category,subcategory:r.subcategory,description:r.description,short_description:r.short_description,stock_status:r.stock_status,image_url:r.image_url,gallery_urls:r.gallery_urls||[]}),l([...r.variants]))},[r]);const v=async _=>{var S;const j=(S=_.target.files)==null?void 0:S[0];if(j){if(!j.type.startsWith("image/")){fe.error("Veuillez sélectionner une image");return}if(j.size>5*1024*1024){fe.error("L'image ne doit pas dépasser 5MB");return}try{u(!0);const k=j.name.split(".").pop(),M=`products/${`${(r==null?void 0:r.id)||"temp"}-${Date.now()}.${k}`}`,{error:T}=await be.storage.from("product-images").upload(M,j,{cacheControl:"3600",upsert:!0});if(T)throw T;const{data:{publicUrl:A}}=be.storage.from("product-images").getPublicUrl(M);i({...a,image_url:A}),fe.success("Image uploadée avec succès")}catch(k){console.error("Error uploading image:",k),fe.error("Erreur lors de l'upload de l'image")}finally{u(!1)}}},p=()=>{i({...a,image_url:null})},x=async _=>{const j=Array.from(_.target.files||[]);if(j.length===0)return;if(j.filter(D=>!D.type.startsWith("image/")).length>0){fe.error("Veuillez sélectionner uniquement des images");return}if(j.filter(D=>D.size>5*1024*1024).length>0){fe.error("Les images ne doivent pas dépasser 5MB");return}try{f(!0);const D=[];for(const T of j){const A=T.name.split(".").pop(),P=`products/${`${(r==null?void 0:r.id)||"temp"}-gallery-${Date.now()}-${Math.random().toString(36).substring(7)}.${A}`}`,{error:V}=await be.storage.from("product-images").upload(P,T,{cacheControl:"3600",upsert:!0});if(V)throw V;const{data:{publicUrl:Z}}=be.storage.from("product-images").getPublicUrl(P);D.push(Z)}const M=a.gallery_urls||[];i({...a,gallery_urls:[...M,...D]}),fe.success(`${D.length} image(s) ajoutée(s) à la galerie`)}catch(D){console.error("Error uploading gallery images:",D),fe.error("Erreur lors de l'upload des images")}finally{f(!1)}},w=_=>{const j=a.gallery_urls||[];i({...a,gallery_urls:j.filter((S,k)=>k!==_)})},y=()=>{const _={id:`temp-${Date.now()}`,name:"Nouvelle variante",price:0,original_price:null,quantity:1,stock_status:"instock",sort_order:o.length};l([...o,_])},b=(_,j,S)=>{const k=[...o];k[_]={...k[_],[j]:S},l(k)},N=_=>{l(o.filter((j,S)=>S!==_))},C=async()=>{if(r)try{m(!0);const{error:_}=await be.from("products").update({name:a.name,slug:a.slug,category:a.category,subcategory:a.subcategory,description:a.description,short_description:a.short_description,stock_status:a.stock_status,image_url:a.image_url,gallery_urls:a.gallery_urls||[]}).eq("id",r.id);if(_)throw _;const j=r.variants.map(D=>D.id),S=o.filter(D=>!D.id.startsWith("temp-")).map(D=>D.id),k=j.filter(D=>!S.includes(D));if(k.length>0){const{error:D}=await be.from("product_variants").delete().in("id",k);if(D)throw D}for(const D of o)if(D.id.startsWith("temp-")){const{error:M}=await be.from("product_variants").insert({product_id:r.id,name:D.name,price:D.price,original_price:D.original_price,quantity:D.quantity,stock_status:D.stock_status,sort_order:D.sort_order});if(M)throw M}else{const{error:M}=await be.from("product_variants").update({name:D.name,price:D.price,original_price:D.original_price,quantity:D.quantity,stock_status:D.stock_status,sort_order:D.sort_order}).eq("id",D.id);if(M)throw M}fe.success("Produit mis à jour avec succès"),n(),t(!1)}catch(_){console.error("Error saving product:",_),fe.error("Erreur lors de la sauvegarde")}finally{m(!1)}};return r?s.jsx(Uo,{open:e,onOpenChange:t,children:s.jsxs(Ci,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Si,{children:[s.jsx(Ei,{children:"Éditer le produit"}),s.jsx(Iu,{children:"Modifiez les informations du produit et ses variantes"})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(wt,{children:"Image principale"}),a.image_url?s.jsxs("div",{className:"relative mt-2",children:[s.jsx("img",{src:a.image_url,alt:"Product",className:"w-full h-48 object-cover rounded-lg"}),s.jsx(se,{variant:"destructive",size:"icon",className:"absolute top-2 right-2",onClick:p,children:s.jsx(Tu,{className:"h-4 w-4"})})]}):s.jsxs("div",{className:"mt-2",children:[s.jsx("label",{htmlFor:"image-upload",className:"cursor-pointer",children:s.jsxs("div",{className:"border-2 border-dashed rounded-lg p-8 text-center hover:border-primary transition-colors",children:[s.jsx(nc,{className:"mx-auto h-12 w-12 text-muted-foreground"}),s.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:c?"Upload en cours...":"Cliquez pour uploader une image"})]})}),s.jsx("input",{id:"image-upload",type:"file",accept:"image/*",className:"hidden",onChange:v,disabled:c})]})]}),s.jsxs("div",{children:[s.jsx(wt,{children:"Images secondaires (galerie)"}),s.jsxs("div",{className:"mt-2 space-y-4",children:[a.gallery_urls&&a.gallery_urls.length>0&&s.jsx("div",{className:"grid grid-cols-4 gap-4",children:a.gallery_urls.map((_,j)=>s.jsxs("div",{className:"relative group",children:[s.jsx("img",{src:_,alt:`Gallery ${j+1}`,className:"w-full h-24 object-cover rounded-lg"}),s.jsx(se,{variant:"destructive",size:"icon",className:"absolute top-1 right-1 h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>w(j),children:s.jsx(Tu,{className:"h-3 w-3"})})]},j))}),s.jsx("label",{htmlFor:"gallery-upload",className:"cursor-pointer block",children:s.jsxs("div",{className:"border-2 border-dashed rounded-lg p-6 text-center hover:border-primary transition-colors",children:[s.jsx($l,{className:"mx-auto h-8 w-8 text-muted-foreground"}),s.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:d?"Upload en cours...":"Ajouter des images à la galerie"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Vous pouvez sélectionner plusieurs images"})]})}),s.jsx("input",{id:"gallery-upload",type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:x,disabled:d})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"col-span-2",children:[s.jsx(wt,{htmlFor:"name",children:"Nom du produit"}),s.jsx(lt,{id:"name",value:a.name||"",onChange:_=>i({...a,name:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(wt,{htmlFor:"slug",children:"Slug"}),s.jsx(lt,{id:"slug",value:a.slug||"",onChange:_=>i({...a,slug:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(wt,{htmlFor:"category",children:"Catégorie"}),s.jsx(lt,{id:"category",value:a.category||"",onChange:_=>i({...a,category:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(wt,{htmlFor:"subcategory",children:"Sous-catégorie"}),s.jsx(lt,{id:"subcategory",value:a.subcategory||"",onChange:_=>i({...a,subcategory:_.target.value})})]}),s.jsxs("div",{children:[s.jsx(wt,{htmlFor:"stock_status",children:"Stock"}),s.jsxs(mi,{value:a.stock_status||"instock",onValueChange:_=>i({...a,stock_status:_}),children:[s.jsx($a,{children:s.jsx(pi,{})}),s.jsxs(qa,{children:[s.jsx(yt,{value:"instock",children:"En stock"}),s.jsx(yt,{value:"outofstock",children:"Rupture"})]})]})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(wt,{htmlFor:"short_description",children:"Description courte"}),s.jsx(Yf,{id:"short_description",value:a.short_description||"",onChange:_=>i({...a,short_description:_.target.value}),rows:2})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(wt,{htmlFor:"description",children:"Description"}),s.jsx(Yf,{id:"description",value:a.description||"",onChange:_=>i({...a,description:_.target.value}),rows:4})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between",children:[s.jsx(rt,{className:"text-lg",children:"Variantes"}),s.jsxs(se,{onClick:y,size:"sm",children:[s.jsx($l,{className:"h-4 w-4 mr-2"}),"Ajouter"]})]}),s.jsx(Ie,{className:"space-y-4",children:o.map((_,j)=>s.jsxs("div",{className:"flex gap-2 items-end border-b pb-4",children:[s.jsxs("div",{className:"flex-1 grid grid-cols-4 gap-2",children:[s.jsxs("div",{children:[s.jsx(wt,{className:"text-xs",children:"Nom"}),s.jsx(lt,{value:_.name,onChange:S=>b(j,"name",S.target.value)})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-xs",children:"Prix (€)"}),s.jsx(lt,{type:"number",step:"0.01",value:_.price,onChange:S=>b(j,"price",parseFloat(S.target.value))})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-xs",children:"Prix original (€)"}),s.jsx(lt,{type:"number",step:"0.01",value:_.original_price||"",onChange:S=>b(j,"original_price",S.target.value?parseFloat(S.target.value):null)})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-xs",children:"Quantité"}),s.jsx(lt,{type:"number",value:_.quantity,onChange:S=>b(j,"quantity",parseInt(S.target.value))})]})]}),s.jsx(se,{variant:"ghost",size:"icon",onClick:()=>N(j),children:s.jsx(Vl,{className:"h-4 w-4 text-destructive"})})]},_.id))})]})]}),s.jsxs(Kf,{children:[s.jsx(se,{variant:"outline",onClick:()=>t(!1),children:"Annuler"}),s.jsx(se,{onClick:C,disabled:h,children:h?"Enregistrement...":"Enregistrer"})]})]})}):null},Pi=g.forwardRef(({className:e,...t},r)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:r,className:Pe("w-full caption-bottom text-sm",e),...t})}));Pi.displayName="Table";const Ii=g.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:Pe("[&_tr]:border-b",e),...t}));Ii.displayName="TableHeader";const Fi=g.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:Pe("[&_tr:last-child]:border-0",e),...t}));Fi.displayName="TableBody";const SG=g.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:Pe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));SG.displayName="TableFooter";const nr=g.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:Pe("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));nr.displayName="TableRow";const nt=g.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:Pe("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));nt.displayName="TableHead";const Be=g.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:Pe("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Be.displayName="TableCell";const EG=g.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:Pe("mt-4 text-sm text-muted-foreground",e),...t}));EG.displayName="TableCaption";const PD="noto_admin_email";function ID(){const[e,t]=g.useState(null),[r,n]=g.useState(null),[a,i]=g.useState(!1),[o,l]=g.useState(!0),[c,u]=g.useState("connected"),[d,f]=g.useState(null),h=g.useCallback(async(v,p)=>{try{const{data:x,error:w}=await be.from("user_roles").select("role").eq("user_id",v).eq("role","admin").maybeSingle();if(w)console.error("Error checking admin role:",w),i(!1);else{const y=!!x;i(y),y&&p&&localStorage.setItem(PD,p)}}catch(x){console.error("Admin check failed:",x),i(!1)}l(!1)},[]),m=g.useCallback(async()=>{u("refreshing");try{const{data:v,error:p}=await be.auth.refreshSession();if(p){console.error("Session refresh failed:",p),u("expired");return}v.session?(n(v.session),t(v.session.user),u("connected"),f(new Date),console.log("Session refreshed successfully")):u("expired")}catch(v){console.error("Session refresh error:",v),u("expired")}},[]);return g.useEffect(()=>{if(!r)return;const v=async()=>{const x=r.expires_at;if(!x)return;const w=x*1e3,y=Date.now();w-y<5*60*1e3&&(console.log("Session expiring soon, refreshing..."),await m())};v();const p=setInterval(v,2*60*1e3);return()=>clearInterval(p)},[r,m]),g.useEffect(()=>{const{data:{subscription:v}}=be.auth.onAuthStateChange((p,x)=>{console.log("Auth state change:",p),n(x),t((x==null?void 0:x.user)??null),x!=null&&x.user?(u("connected"),f(new Date),setTimeout(()=>{h(x.user.id,x.user.email)},0)):(i(!1),u("expired"),l(!1))});return be.auth.getSession().then(({data:{session:p}})=>{n(p),t((p==null?void 0:p.user)??null),p!=null&&p.user?(u("connected"),f(new Date),h(p.user.id,p.user.email)):l(!1)}),()=>v.unsubscribe()},[h]),{user:e,isAdmin:a,loading:o,sessionStatus:c,refreshSession:m,lastRefresh:d}}function kG(){return localStorage.getItem(PD)}function TG(){const[e,t]=g.useState(null),[r,n]=g.useState(!1),[a,i]=g.useState(!1);return g.useEffect(()=>{if(window.matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0?(i(!0),!0):!1)return;const c=d=>{d.preventDefault(),t(d),n(!0)},u=()=>{t(null),n(!1),i(!0)};return window.addEventListener("beforeinstallprompt",c),window.addEventListener("appinstalled",u),()=>{window.removeEventListener("beforeinstallprompt",c),window.removeEventListener("appinstalled",u)}},[]),{isInstallable:r,isInstalled:a,promptInstall:async()=>{if(!e)return!1;try{await e.prompt();const{outcome:l}=await e.userChoice;return l==="accepted"?(t(null),n(!1),i(!0),!0):!1}catch(l){return console.error("Error prompting PWA install:",l),!1}}}}function AG(){const[e,t]=g.useState(!1),[r,n]=g.useState("default"),[a,i]=g.useState(0);g.useRef(null),g.useEffect(()=>{if(!("Notification"in window)){n("unsupported");return}n(Notification.permission),t(Notification.permission==="granted")},[]);const o=g.useCallback(async()=>{if(!("Notification"in window))return fe.error("Les notifications ne sont pas supportées par votre navigateur"),!1;try{const d=await Notification.requestPermission();return n(d),t(d==="granted"),d==="granted"?(fe.success("Notifications activées !"),new Notification("NŌTO Admin",{body:"Les notifications sont maintenant activées !",icon:"/pwa-192x192.png",badge:"/pwa-192x192.png"}),!0):(fe.error("Permission refusée pour les notifications"),!1)}catch(d){return console.error("Error requesting notification permission:",d),fe.error("Erreur lors de la demande de permission"),!1}},[]),l=g.useCallback(()=>{try{const d=new(window.AudioContext||window.webkitAudioContext),f=d.createOscillator(),h=d.createGain();f.connect(h),h.connect(d.destination),f.frequency.value=800,f.type="sine",h.gain.setValueAtTime(.3,d.currentTime),h.gain.exponentialRampToValueAtTime(.01,d.currentTime+.5),f.start(d.currentTime),f.stop(d.currentTime+.5)}catch(d){console.error("Error playing notification sound:",d)}},[]),c=g.useCallback(d=>{const f=[d.first_name,d.last_name].filter(Boolean).join(" ")||d.email,h=new Intl.NumberFormat("fr-FR",{style:"currency",currency:"EUR"}).format(d.total);if(fe.success(`Nouvelle commande #${d.reference}`,{description:`${f} - ${h}`,duration:1e4,action:{label:"Voir",onClick:()=>{window.location.href="/admin-commandes"}}}),l(),i(m=>m+1),e&&Notification.permission==="granted")try{const m=new Notification(`Nouvelle commande #${d.reference}`,{body:`${f}
${h}`,icon:"/pwa-192x192.png",badge:"/pwa-192x192.png",tag:`order-${d.id}`,requireInteraction:!0});m.onclick=()=>{window.focus(),window.location.href="/admin-commandes",m.close()}}catch(m){console.error("Error showing notification:",m)}},[e,l]);g.useEffect(()=>{console.log("Setting up realtime subscription for orders...");const d=be.channel("admin-orders-notifications").on("postgres_changes",{event:"INSERT",schema:"public",table:"orders"},f=>{console.log("New order received:",f);const h=f.new;(h.status==="paid"||h.status==="pending")&&c(h)}).on("postgres_changes",{event:"UPDATE",schema:"public",table:"orders"},f=>{console.log("Order updated:",f);const h=f.new;f.old.status!=="paid"&&h.status==="paid"&&c(h)}).subscribe(f=>{console.log("Realtime subscription status:",f)});return()=>{console.log("Cleaning up realtime subscription..."),be.removeChannel(d)}},[c]);const u=g.useCallback(()=>{i(0)},[]);return{notificationsEnabled:e,permissionStatus:r,requestPermission:o,newOrdersCount:a,clearNewOrdersCount:u}}const RG=HR,DG=HW,OG=WR,FD=g.forwardRef(({className:e,...t},r)=>s.jsx(r0,{className:Pe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));FD.displayName=r0.displayName;const PG=Gu("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),LD=g.forwardRef(({side:e="right",className:t,children:r,...n},a)=>s.jsxs(OG,{children:[s.jsx(FD,{}),s.jsxs(s0,{ref:a,className:Pe(PG({side:e}),t),...n,children:[r,s.jsxs(GR,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(Tu,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));LD.displayName=s0.displayName;const IG=g.forwardRef(({className:e,...t},r)=>s.jsx(n0,{ref:r,className:Pe("text-lg font-semibold text-foreground",e),...t}));IG.displayName=n0.displayName;const FG=g.forwardRef(({className:e,...t},r)=>s.jsx(a0,{ref:r,className:Pe("text-sm text-muted-foreground",e),...t}));FG.displayName=a0.displayName;const LG=[{href:"/admin",label:"Tableau de bord",icon:Y8},{href:"/admin-commandes",label:"Commandes",icon:ga},{href:"/admin-redemptions",label:"Commandes Fidélité",icon:eb},{href:"/admin-abandonnees",label:"Abandonnées",icon:zl},{href:"/admin-produits",label:"Produits",icon:hs},{href:"/admin-clients",label:"Clients",icon:hi},{href:"/admin-loyalty",label:"Points Fidélité",icon:Ut},{href:"/admin-subscribers",label:"Abonnés",icon:hi},{href:"/admin-emails",label:"Campagne Email",icon:xa},{href:"/admin-sms",label:"Contacts SMS",icon:Ff},{href:"/admin-api-logs",label:"Logs API",icon:p4},{href:"/admin-webhooks",label:"Webhooks",icon:Lv},{href:"/admin-404",label:"Monitoring 404",icon:Ax},{href:"/import-produits",label:"Import XML",icon:nc}];function Ur({children:e}){const{user:t,isAdmin:r,loading:n,sessionStatus:a,refreshSession:i,lastRefresh:o}=ID(),{isInstallable:l,isInstalled:c,promptInstall:u}=TG(),{notificationsEnabled:d,permissionStatus:f,requestPermission:h,newOrdersCount:m,clearNewOrdersCount:v}=AG(),p=Oi(),[x,w]=g.useState(!1),y=async()=>{await be.auth.signOut(),fe.success("Déconnexion réussie")},b=async()=>{fe.promise(i(),{loading:"Rafraîchissement de la session...",success:"Session rafraîchie !",error:"Erreur lors du rafraîchissement"})},N=()=>{if(!o)return"Jamais";const j=Date.now()-o.getTime(),S=Math.floor(j/6e4);return S<1?"À l'instant":S<60?`Il y a ${S} min`:`Il y a ${Math.floor(S/60)}h`},C=async()=>{await u()&&fe.success("Application installée avec succès !")};if(n)return s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsx(Wr,{className:"h-8 w-8 animate-spin text-primary"})});if(!t)return s.jsx(zt,{to:"/auth",replace:!0});if(!r)return s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:s.jsxs("div",{className:"text-center space-y-4 p-8",children:[s.jsx(nL,{className:"h-16 w-16 text-destructive mx-auto"}),s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Accès refusé"}),s.jsx("p",{className:"text-muted-foreground",children:"Vous n'avez pas les permissions pour accéder à cette page."}),s.jsx(se,{asChild:!0,children:s.jsx("a",{href:"/",children:"Retour à l'accueil"})})]})});const _=({onNavigate:j})=>{var S;return s.jsxs(s.Fragment,{children:[s.jsxs("nav",{className:"flex-1 p-3 md:p-4 space-y-1 overflow-y-auto",children:[LG.map(k=>{const D=p.pathname===k.href,M=k.href==="/admin-commandes",T=M&&m>0;return s.jsxs("a",{href:k.href,onClick:()=>{M&&v(),j==null||j()},className:Pe("flex items-center gap-3 px-3 py-3 md:py-2.5 rounded-lg text-sm font-medium transition-colors relative",D?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground active:bg-muted"),children:[s.jsx(k.icon,{className:"h-5 w-5 md:h-4 md:w-4 shrink-0"}),s.jsx("span",{className:"flex-1",children:k.label}),T&&s.jsx(Je,{variant:"destructive",className:"h-6 min-w-6 flex items-center justify-center text-xs animate-pulse",children:m}),s.jsx(Io,{className:"h-4 w-4 md:hidden text-muted-foreground"})]},k.href)}),c?s.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:s.jsxs("div",{className:"flex items-center gap-3 px-3 py-3 rounded-lg text-sm font-medium text-green-600 bg-green-50",children:[s.jsx(Ot,{className:"h-5 w-5"}),"App installée"]})}):l?s.jsxs("div",{className:"mt-4 pt-4 border-t border-border",children:[s.jsxs(se,{size:"lg",className:"w-full justify-center gap-3 h-14 bg-gradient-to-r from-primary to-primary/80 hover:from-primary/90 hover:to-primary/70 text-primary-foreground font-semibold shadow-lg hover:shadow-xl transition-all duration-300 animate-pulse hover:animate-none",onClick:C,children:[s.jsx(rb,{className:"h-6 w-6"}),s.jsx("span",{className:"text-base",children:"Installer l'application"})]}),s.jsx("p",{className:"text-xs text-muted-foreground text-center mt-2",children:"Accès rapide depuis votre écran d'accueil"})]}):null]}),s.jsxs("div",{className:"p-3 md:p-4 border-t border-border space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5 bg-background/50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[d?s.jsx(R8,{className:"h-4 w-4 text-green-500"}):s.jsx(A8,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:Pe("text-xs font-medium",d?"text-green-600":"text-muted-foreground"),children:d?"Notifications actives":"Notifications off"})]}),!d&&f!=="denied"&&s.jsxs(se,{variant:"ghost",size:"sm",className:"h-8 px-3 gap-2",onClick:h,children:[s.jsx(D8,{className:"h-4 w-4"}),s.jsx("span",{className:"md:hidden",children:"Activer"})]})]}),s.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5 bg-background/50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[a==="connected"?s.jsx(dL,{className:"h-4 w-4 text-green-500"}):a==="refreshing"?s.jsx(ln,{className:"h-4 w-4 text-yellow-500 animate-spin"}):s.jsx(uL,{className:"h-4 w-4 text-destructive"}),s.jsxs("span",{className:Pe("text-xs font-medium",a==="connected"&&"text-green-600",a==="refreshing"&&"text-yellow-600",a==="expired"&&"text-destructive"),children:[a==="connected"&&"Connecté",a==="refreshing"&&"Rafraîchissement...",a==="expired"&&"Session expirée"]})]}),s.jsxs(h9,{children:[s.jsx(m9,{asChild:!0,children:s.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:b,disabled:a==="refreshing",children:s.jsx(ln,{className:Pe("h-4 w-4",a==="refreshing"&&"animate-spin")})})}),s.jsxs(cT,{side:"top",children:[s.jsx("p",{children:"Rafraîchir la session"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Dernier: ",N()]})]})]})]}),s.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[s.jsx("div",{className:"h-10 w-10 md:h-8 md:w-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:s.jsx("span",{className:"text-sm md:text-xs font-bold text-primary",children:(S=t.email)==null?void 0:S.charAt(0).toUpperCase()})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:t.email}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Administrateur"})]})]}),s.jsxs(se,{variant:"ghost",size:"lg",className:"w-full justify-start text-muted-foreground hover:text-foreground h-12 md:h-9",onClick:y,children:[s.jsx(y4,{className:"h-5 w-5 md:h-4 md:w-4 mr-3 md:mr-2"}),"Déconnexion"]})]})]})};return s.jsxs("div",{className:"min-h-screen bg-background flex flex-col md:flex-row",children:[s.jsxs("header",{className:"md:hidden sticky top-0 z-50 bg-card border-b border-border px-4 py-3 flex items-center justify-between",children:[s.jsxs("a",{href:"/",className:"flex items-center gap-2 text-foreground",children:[s.jsx(Ul,{className:"h-5 w-5"}),s.jsx("span",{className:"font-bold text-lg",children:"NŌTO Admin"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[m>0&&s.jsx("a",{href:"/admin-commandes",onClick:()=>v(),children:s.jsxs(Je,{variant:"destructive",className:"h-8 px-3 gap-1.5 animate-pulse",children:[s.jsx(ga,{className:"h-4 w-4"}),m]})}),s.jsxs(RG,{open:x,onOpenChange:w,children:[s.jsx(DG,{asChild:!0,children:s.jsx(se,{variant:"ghost",size:"icon",className:"h-10 w-10",children:s.jsx(b4,{className:"h-6 w-6"})})}),s.jsxs(LD,{side:"right",className:"w-[300px] p-0 flex flex-col",children:[s.jsx("div",{className:"p-4 border-b border-border flex items-center justify-between",children:s.jsx("span",{className:"font-semibold text-lg",children:"Menu"})}),s.jsx(_,{onNavigate:()=>w(!1)})]})]})]})]}),s.jsxs("aside",{className:"hidden md:flex w-64 bg-card border-r border-border flex-col shrink-0 sticky top-0 h-screen",children:[s.jsx("div",{className:"p-6 border-b border-border",children:s.jsxs("a",{href:"/",className:"flex items-center gap-2 text-foreground hover:text-primary transition-colors",children:[s.jsx(Ul,{className:"h-5 w-5"}),s.jsx("span",{className:"font-bold text-lg",children:"NŌTO Admin"})]})}),s.jsx(_,{})]}),s.jsx("main",{className:"flex-1 overflow-auto",children:e})]})}const MG=()=>{const[e,t]=g.useState([]),[r,n]=g.useState(!0),[a,i]=g.useState({open:!1,productId:null,productName:""}),[o,l]=g.useState({open:!1,product:null}),c=async()=>{try{n(!0);const{data:d,error:f}=await be.from("products").select("*").order("name");if(f)throw f;const{data:h,error:m}=await be.from("product_variants").select("*").order("sort_order");if(m)throw m;const v=d.map(p=>({...p,variants:h.filter(x=>x.product_id===p.id)}));t(v)}catch(d){console.error("Error fetching products:",d),fe.error("Erreur lors du chargement des produits")}finally{n(!1)}};g.useEffect(()=>{c()},[]);const u=async()=>{if(a.productId)try{const{error:d}=await be.from("product_variants").delete().eq("product_id",a.productId);if(d)throw d;const{error:f}=await be.from("products").delete().eq("id",a.productId);if(f)throw f;fe.success("Produit supprimé avec succès"),c(),i({open:!1,productId:null,productName:""})}catch(d){console.error("Error deleting product:",d),fe.error("Erreur lors de la suppression du produit")}};return r?s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx(Wr,{className:"h-8 w-8 animate-spin text-primary"})}):s.jsx(Ur,{children:s.jsxs("div",{className:"min-h-screen bg-background py-8",children:[s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Administration Produits"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Gérez vos produits et leurs variantes"})]}),s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsx(rt,{children:"Liste des produits"}),s.jsxs(fa,{children:[e.length," produit",e.length>1?"s":""," au total"]})]}),s.jsx(Ie,{children:s.jsx("div",{className:"rounded-md border",children:s.jsxs(Pi,{children:[s.jsx(Ii,{children:s.jsxs(nr,{children:[s.jsx(nt,{children:"Image"}),s.jsx(nt,{children:"Nom"}),s.jsx(nt,{children:"Catégorie"}),s.jsx(nt,{children:"Variantes"}),s.jsx(nt,{children:"Stock"}),s.jsx(nt,{className:"text-right",children:"Actions"})]})}),s.jsx(Fi,{children:e.length===0?s.jsx(nr,{children:s.jsxs(Be,{colSpan:6,className:"text-center py-8",children:[s.jsx("p",{className:"text-muted-foreground",children:"Aucun produit trouvé"}),s.jsx(pe,{to:"/import-produits",className:"mt-2 inline-block",children:s.jsx(se,{variant:"link",children:"Importer des produits"})})]})}):e.map(d=>s.jsxs(nr,{children:[s.jsx(Be,{children:d.image_url?s.jsx("img",{src:d.image_url,alt:d.name,className:"h-12 w-12 object-cover rounded"}):s.jsx("div",{className:"h-12 w-12 bg-muted rounded flex items-center justify-center text-xs text-muted-foreground",children:"N/A"})}),s.jsx(Be,{className:"font-medium",children:d.name}),s.jsx(Be,{children:d.category}),s.jsx(Be,{children:s.jsxs("div",{className:"flex flex-wrap gap-1",children:[d.variants.map(f=>s.jsxs(Je,{variant:"secondary",className:"text-xs",children:[f.name,": ",f.price,"€"]},f.id)),d.variants.length===0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:"Aucune variante"})]})}),s.jsx(Be,{children:s.jsx(Je,{variant:d.stock_status==="instock"?"default":"destructive",children:d.stock_status==="instock"?"En stock":"Rupture"})}),s.jsx(Be,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(se,{variant:"ghost",size:"icon",title:"Voir",children:s.jsx(Us,{className:"h-4 w-4"})}),s.jsx(se,{variant:"ghost",size:"icon",title:"Éditer",onClick:()=>l({open:!0,product:d}),children:s.jsx(Z8,{className:"h-4 w-4"})}),s.jsx(se,{variant:"ghost",size:"icon",title:"Supprimer",onClick:()=>i({open:!0,productId:d.id,productName:d.name}),children:s.jsx(Vl,{className:"h-4 w-4 text-destructive"})})]})})]},d.id))})]})})})]})]}),s.jsx(Uo,{open:a.open,onOpenChange:d=>i({...a,open:d}),children:s.jsxs(Ci,{children:[s.jsxs(Si,{children:[s.jsx(Ei,{children:"Confirmer la suppression"}),s.jsxs(Iu,{children:['Êtes-vous sûr de vouloir supprimer le produit "',a.productName,'" ? Cette action est irréversible et supprimera également toutes les variantes associées.']})]}),s.jsxs(Kf,{children:[s.jsx(se,{variant:"outline",onClick:()=>i({open:!1,productId:null,productName:""}),children:"Annuler"}),s.jsx(se,{variant:"destructive",onClick:u,children:"Supprimer"})]})]})}),s.jsx(CG,{open:o.open,onOpenChange:d=>l({...o,open:d}),product:o.product,onSuccess:c})]})})};function Ks(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function $o(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function BG(e,t){const r=Ks(e);return isNaN(t)?$o(e,NaN):(r.setDate(r.getDate()+t),r)}const MD=6048e5,UG=864e5;let $G={};function c0(){return $G}function Xf(e,t){var l,c,u,d;const r=c0(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,a=Ks(e),i=a.getDay(),o=(i<n?7:0)+i-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function Up(e){return Xf(e,{weekStartsOn:1})}function BD(e){const t=Ks(e),r=t.getFullYear(),n=$o(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=Up(n),i=$o(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const o=Up(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function d_(e){const t=Ks(e);return t.setHours(0,0,0,0),t}function f_(e){const t=Ks(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function qG(e,t){const r=d_(e),n=d_(t),a=+r-f_(r),i=+n-f_(n);return Math.round((a-i)/UG)}function zG(e){const t=BD(e),r=$o(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Up(r)}function VG(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function HG(e){if(!VG(e)&&typeof e!="number")return!1;const t=Ks(e);return!isNaN(Number(t))}function WG(e){const t=Ks(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function GG(e){const t=Ks(e);return t.setDate(1),t.setHours(0,0,0,0),t}function KG(e){const t=Ks(e),r=$o(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const YG={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},XG=(e,t,r)=>{let n;const a=YG[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function su(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const QG={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},JG={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ZG={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},eK={date:su({formats:QG,defaultWidth:"full"}),time:su({formats:JG,defaultWidth:"full"}),dateTime:su({formats:ZG,defaultWidth:"full"})},tK={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rK=(e,t,r,n)=>tK[e];function Pa(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):o;a=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const sK={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nK={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},aK={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},iK={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},oK={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},lK={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},cK=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},uK={ordinalNumber:cK,era:Pa({values:sK,defaultWidth:"wide"}),quarter:Pa({values:nK,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pa({values:aK,defaultWidth:"wide"}),day:Pa({values:iK,defaultWidth:"wide"}),dayPeriod:Pa({values:oK,defaultWidth:"wide",formattingValues:lK,defaultFormattingWidth:"wide"})};function Ia(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?fK(l,f=>f.test(o)):dK(l,f=>f.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function dK(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function fK(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function UD(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;const l=t.slice(a.length);return{value:o,rest:l}}}const hK=/^(\d+)(th|st|nd|rd)?/i,mK=/\d+/i,pK={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},xK={any:[/^b/i,/^(a|c)/i]},gK={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vK={any:[/1/i,/2/i,/3/i,/4/i]},yK={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},bK={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},wK={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},jK={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},NK={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_K={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},CK={ordinalNumber:UD({matchPattern:hK,parsePattern:mK,valueCallback:e=>parseInt(e,10)}),era:Ia({matchPatterns:pK,defaultMatchWidth:"wide",parsePatterns:xK,defaultParseWidth:"any"}),quarter:Ia({matchPatterns:gK,defaultMatchWidth:"wide",parsePatterns:vK,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ia({matchPatterns:yK,defaultMatchWidth:"wide",parsePatterns:bK,defaultParseWidth:"any"}),day:Ia({matchPatterns:wK,defaultMatchWidth:"wide",parsePatterns:jK,defaultParseWidth:"any"}),dayPeriod:Ia({matchPatterns:NK,defaultMatchWidth:"any",parsePatterns:_K,defaultParseWidth:"any"})},SK={code:"en-US",formatDistance:XG,formatLong:eK,formatRelative:rK,localize:uK,match:CK,options:{weekStartsOn:0,firstWeekContainsDate:1}};function EK(e){const t=Ks(e);return qG(t,KG(t))+1}function kK(e){const t=Ks(e),r=+Up(t)-+zG(t);return Math.round(r/MD)+1}function $D(e,t){var d,f,h,m;const r=Ks(e),n=r.getFullYear(),a=c0(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(h=a.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,o=$o(e,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);const l=Xf(o,t),c=$o(e,0);c.setFullYear(n,0,i),c.setHours(0,0,0,0);const u=Xf(c,t);return r.getTime()>=l.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function TK(e,t){var l,c,u,d;const r=c0(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=$D(e,t),i=$o(e,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),Xf(i,t)}function AK(e,t){const r=Ks(e),n=+Xf(r,t)-+TK(r,t);return Math.round(n/MD)+1}function Bt(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Vi={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Bt(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Bt(r+1,2)},d(e,t){return Bt(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Bt(e.getHours()%12||12,t.length)},H(e,t){return Bt(e.getHours(),t.length)},m(e,t){return Bt(e.getMinutes(),t.length)},s(e,t){return Bt(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return Bt(a,t.length)}},Sc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},h_={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return Vi.y(e,t)},Y:function(e,t,r,n){const a=$D(e,n),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return Bt(o,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Bt(i,t.length)},R:function(e,t){const r=BD(e);return Bt(r,t.length)},u:function(e,t){const r=e.getFullYear();return Bt(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Bt(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Bt(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Vi.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Bt(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=AK(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):Bt(a,t.length)},I:function(e,t,r){const n=kK(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Bt(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Vi.d(e,t)},D:function(e,t,r){const n=EK(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Bt(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Bt(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Bt(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return Bt(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=Sc.noon:n===0?a=Sc.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=Sc.evening:n>=12?a=Sc.afternoon:n>=4?a=Sc.morning:a=Sc.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Vi.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Vi.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Bt(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Bt(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vi.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Vi.s(e,t)},S:function(e,t){return Vi.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return p_(n);case"XXXX":case"XX":return ll(n);case"XXXXX":case"XXX":default:return ll(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return p_(n);case"xxxx":case"xx":return ll(n);case"xxxxx":case"xxx":default:return ll(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+m_(n,":");case"OOOO":default:return"GMT"+ll(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+m_(n,":");case"zzzz":default:return"GMT"+ll(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Bt(n,t.length)},T:function(e,t,r){const n=e.getTime();return Bt(n,t.length)}};function m_(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return i===0?r+String(a):r+String(a)+t+Bt(i,2)}function p_(e,t){return e%60===0?(e>0?"-":"+")+Bt(Math.abs(e)/60,2):ll(e,t)}function ll(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Bt(Math.trunc(n/60),2),i=Bt(n%60,2);return r+a+t+i}const x_=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},qD=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},RK=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return x_(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",x_(n,t)).replace("{{time}}",qD(a,t))},DK={p:qD,P:RK},OK=/^D+$/,PK=/^Y+$/,IK=["D","DD","YY","YYYY"];function FK(e){return OK.test(e)}function LK(e){return PK.test(e)}function MK(e,t,r){const n=BK(e,t,r);if(console.warn(n),IK.includes(e))throw new RangeError(n)}function BK(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const UK=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$K=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qK=/^'([^]*?)'?$/,zK=/''/g,VK=/[a-zA-Z]/;function zs(e,t,r){var d,f,h,m,v,p,x,w;const n=c0(),a=(r==null?void 0:r.locale)??n.locale??SK,i=(r==null?void 0:r.firstWeekContainsDate)??((f=(d=r==null?void 0:r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((p=(v=r==null?void 0:r.locale)==null?void 0:v.options)==null?void 0:p.weekStartsOn)??n.weekStartsOn??((w=(x=n.locale)==null?void 0:x.options)==null?void 0:w.weekStartsOn)??0,l=Ks(e);if(!HG(l))throw new RangeError("Invalid time value");let c=t.match($K).map(y=>{const b=y[0];if(b==="p"||b==="P"){const N=DK[b];return N(y,a.formatLong)}return y}).join("").match(UK).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const b=y[0];if(b==="'")return{isToken:!1,value:HK(y)};if(h_[b])return{isToken:!0,value:y};if(b.match(VK))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return c.map(y=>{if(!y.isToken)return y.value;const b=y.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&LK(b)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&FK(b))&&MK(b,t,String(e));const N=h_[b[0]];return N(l,b,a.localize,u)}).join("")}function HK(e){const t=e.match(qK);return t?t[1].replace(zK,"'"):e}function WK(e,t){return BG(e,-7)}const GK={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},KK=(e,t,r)=>{let n;const a=GK[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",String(t)),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"dans "+n:"il y a "+n:n},YK={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},XK={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},QK={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},JK={date:su({formats:YK,defaultWidth:"full"}),time:su({formats:XK,defaultWidth:"full"}),dateTime:su({formats:QK,defaultWidth:"full"})},ZK={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},eY=(e,t,r,n)=>ZK[e],tY={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},rY={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},sY={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},nY={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},aY={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},iY=(e,t)=>{const r=Number(e),n=t==null?void 0:t.unit;if(r===0)return"0";const a=["year","week","hour","minute","second"];let i;return r===1?i=n&&a.includes(n)?"ère":"er":i="ème",r+i},oY=["MMM","MMMM"],lY={preprocessor:(e,t)=>e.getDate()===1||!t.some(n=>n.isToken&&oY.includes(n.value))?t:t.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:iY,era:Pa({values:tY,defaultWidth:"wide"}),quarter:Pa({values:rY,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Pa({values:sY,defaultWidth:"wide"}),day:Pa({values:nY,defaultWidth:"wide"}),dayPeriod:Pa({values:aY,defaultWidth:"wide"})},cY=/^(\d+)(ième|ère|ème|er|e)?/i,uY=/\d+/i,dY={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},fY={any:[/^av/i,/^ap/i]},hY={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},mY={any:[/1/i,/2/i,/3/i,/4/i]},pY={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},xY={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},gY={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},vY={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},yY={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},bY={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},wY={ordinalNumber:UD({matchPattern:cY,parsePattern:uY,valueCallback:e=>parseInt(e)}),era:Ia({matchPatterns:dY,defaultMatchWidth:"wide",parsePatterns:fY,defaultParseWidth:"any"}),quarter:Ia({matchPatterns:hY,defaultMatchWidth:"wide",parsePatterns:mY,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ia({matchPatterns:pY,defaultMatchWidth:"wide",parsePatterns:xY,defaultParseWidth:"any"}),day:Ia({matchPatterns:gY,defaultMatchWidth:"wide",parsePatterns:vY,defaultParseWidth:"any"}),dayPeriod:Ia({matchPatterns:yY,defaultMatchWidth:"any",parsePatterns:bY,defaultParseWidth:"any"})},ha={code:"fr",formatDistance:KK,formatLong:JK,formatRelative:eY,localize:lY,match:wY,options:{weekStartsOn:1,firstWeekContainsDate:4}};var jY="Separator",g_="horizontal",NY=["horizontal","vertical"],zD=g.forwardRef((e,t)=>{const{decorative:r,orientation:n=g_,...a}=e,i=_Y(n)?n:g_,l=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return s.jsx(ze.div,{"data-orientation":i,...l,...a,ref:t})});zD.displayName=jY;function _Y(e){return NY.includes(e)}var VD=zD;const us=g.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>s.jsx(VD,{ref:a,decorative:r,orientation:t,className:Pe("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));us.displayName=VD.displayName;var u0="Tabs",[CY]=Yr(u0,[nd]),HD=nd(),[SY,yw]=CY(u0),WD=g.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=ac(l),[f,h]=fn({prop:n,onChange:a,defaultProp:i??"",caller:u0});return s.jsx(SY,{scope:r,baseId:cn(),value:f,onValueChange:h,orientation:o,dir:d,activationMode:c,children:s.jsx(ze.div,{dir:d,"data-orientation":o,...u,ref:t})})});WD.displayName=u0;var GD="TabsList",KD=g.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...a}=e,i=yw(GD,r),o=HD(r);return s.jsx(Lb,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:s.jsx(ze.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});KD.displayName=GD;var YD="TabsTrigger",XD=g.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:a=!1,...i}=e,o=yw(YD,r),l=HD(r),c=ZD(o.baseId,n),u=eO(o.baseId,n),d=n===o.value;return s.jsx(Mb,{asChild:!0,...l,focusable:!a,active:d,children:s.jsx(ze.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:t,onMouseDown:ke(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:ke(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:ke(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!a&&f&&o.onValueChange(n)})})})});XD.displayName=YD;var QD="TabsContent",JD=g.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:a,children:i,...o}=e,l=yw(QD,r),c=ZD(l.baseId,n),u=eO(l.baseId,n),d=n===l.value,f=g.useRef(d);return g.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),s.jsx(Xr,{present:a||d,children:({present:h})=>s.jsx(ze.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&i})})});JD.displayName=QD;function ZD(e,t){return`${e}-trigger-${t}`}function eO(e,t){return`${e}-content-${t}`}var EY=WD,tO=KD,rO=XD,sO=JD;const bw=EY,d0=g.forwardRef(({className:e,...t},r)=>s.jsx(tO,{ref:r,className:Pe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));d0.displayName=tO.displayName;const To=g.forwardRef(({className:e,...t},r)=>s.jsx(rO,{ref:r,className:Pe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));To.displayName=rO.displayName;const Qf=g.forwardRef(({className:e,...t},r)=>s.jsx(sO,{ref:r,className:Pe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Qf.displayName=sO.displayName;const v_={pending:{label:"En attente",variant:"secondary"},paid:{label:"Payée",variant:"default"},awaiting:{label:"Validation en cours",variant:"outline"},failed:{label:"Échec",variant:"destructive"},shipped:{label:"Expédiée",variant:"default"},delivered:{label:"Livrée",variant:"default"},cancelled:{label:"Annulée",variant:"destructive"}},y_={pending:{label:"En attente",variant:"secondary"},processing:{label:"Payée",variant:"default"},shipped:{label:"Expédié",variant:"default"},completed:{label:"Terminé",variant:"default"},cancelled:{label:"Annulé",variant:"destructive"}},kY=()=>{var I,Y;const[e,t]=g.useState([]),[r,n]=g.useState([]),[a,i]=g.useState([]),[o,l]=g.useState([]),[c,u]=g.useState([]),[d,f]=g.useState(!0),[h,m]=g.useState(""),[v,p]=g.useState("all"),[x,w]=g.useState(null),[y,b]=g.useState(null),[N,C]=g.useState(!1),[_,j]=g.useState(!1),[S,k]=g.useState("all"),D=async()=>{try{f(!0);const[E,B]=await Promise.all([be.from("orders").select("*").order("created_at",{ascending:!1}),be.from("loyalty_redemptions").select("*").order("created_at",{ascending:!1})]);if(E.error)throw E.error;if(B.error)throw B.error;const ee=(E.data||[]).map(K=>({...K,items:Array.isArray(K.items)?K.items:JSON.parse(K.items||"[]"),delivery_option:K.delivery_option?typeof K.delivery_option=="string"?JSON.parse(K.delivery_option):K.delivery_option:null,loyalty_items:K.loyalty_items?Array.isArray(K.loyalty_items)?K.loyalty_items:JSON.parse(K.loyalty_items||"[]"):null,points_used:K.points_used||0})),J=(B.data||[]).map(K=>({...K,shipping_address:K.shipping_address}));t(ee),n(J),i(ee),l(J)}catch(E){console.error("Error fetching orders:",E),fe.error("Erreur lors du chargement des commandes")}finally{f(!1)}};g.useEffect(()=>{D()},[]),g.useEffect(()=>{let E=e.filter(te=>te.status!=="pending");if(v!=="all"&&(E=E.filter(te=>te.status===v)),h.trim()){const te=h.toLowerCase();E=E.filter(xe=>xe.reference.toLowerCase().includes(te)||xe.email.toLowerCase().includes(te)||xe.first_name&&xe.first_name.toLowerCase().includes(te)||xe.last_name&&xe.last_name.toLowerCase().includes(te))}i(E);let B=r;if(v!=="all"&&(B=B.filter(te=>te.status===v)),h.trim()){const te=h.toLowerCase();B=B.filter(xe=>{var F,We;return xe.email.toLowerCase().includes(te)||xe.product_name.toLowerCase().includes(te)||((F=xe.shipping_address)==null?void 0:F.first_name)&&xe.shipping_address.first_name.toLowerCase().includes(te)||((We=xe.shipping_address)==null?void 0:We.last_name)&&xe.shipping_address.last_name.toLowerCase().includes(te)})}l(B);const ee=E.map(te=>({type:"order",data:te,created_at:te.created_at||""})),K=B.filter(te=>{const xe=te.shipping_address;return!(xe!=null&&xe.linked_order)}).map(te=>({type:"loyalty",data:te,created_at:te.created_at||""})),ae=[...ee,...K].sort((te,xe)=>new Date(xe.created_at).getTime()-new Date(te.created_at).getTime());u(ae)},[e,r,v,h]);const M=async(E,B)=>{try{const{error:ee}=await be.from("orders").update({status:B,updated_at:new Date().toISOString()}).eq("id",E);if(ee)throw ee;fe.success("Statut mis à jour"),D(),(x==null?void 0:x.id)===E&&w({...x,status:B})}catch(ee){console.error("Error updating order status:",ee),fe.error("Erreur lors de la mise à jour du statut")}},T=async(E,B)=>{try{const ee={status:B};(B==="shipped"||B==="completed")&&(ee.processed_at=new Date().toISOString());const{error:J}=await be.from("loyalty_redemptions").update(ee).eq("id",E);if(J)throw J;fe.success("Statut mis à jour"),D(),(y==null?void 0:y.id)===E&&b({...y,status:B})}catch(ee){console.error("Error updating redemption status:",ee),fe.error("Erreur lors de la mise à jour du statut")}},A=E=>{const B=v_[E||"pending"]||v_.pending;return s.jsx(Je,{variant:B.variant,children:B.label})},W=E=>{const B=y_[E||"pending"]||y_.pending;return s.jsx(Je,{variant:B.variant,children:B.label})},P=E=>E?zs(new Date(E),"dd MMM yyyy HH:mm",{locale:ha}):"-",V=E=>{w(E),C(!0)},Z=E=>{b(E),j(!0)},Q=r.filter(E=>{const B=E.shipping_address;return!(B!=null&&B.linked_order)}),O=e.filter(E=>E.status!=="pending"),ne={total:O.length+Q.length,orders:O.length,loyalty:Q.length,pending:Q.filter(E=>E.status==="pending").length,paid:O.filter(E=>E.status==="paid").length,shipped:O.filter(E=>E.status==="shipped").length+Q.filter(E=>E.status==="shipped").length};if(d)return s.jsx("div",{className:"min-h-screen flex items-center justify-center",children:s.jsx(Wr,{className:"h-8 w-8 animate-spin text-primary"})});const he=()=>S==="loyalty"?s.jsxs(s.Fragment,{children:[s.jsx(yt,{value:"all",children:"Tous"}),s.jsx(yt,{value:"pending",children:"En attente"}),s.jsx(yt,{value:"processing",children:"En préparation"}),s.jsx(yt,{value:"shipped",children:"Expédié"}),s.jsx(yt,{value:"completed",children:"Terminé"}),s.jsx(yt,{value:"cancelled",children:"Annulé"})]}):s.jsxs(s.Fragment,{children:[s.jsx(yt,{value:"all",children:"Tous"}),s.jsx(yt,{value:"paid",children:"Payée"}),s.jsx(yt,{value:"shipped",children:"Expédiée"}),s.jsx(yt,{value:"delivered",children:"Livrée"}),s.jsx(yt,{value:"cancelled",children:"Annulée"}),s.jsx(yt,{value:"failed",children:"Échec"})]});return s.jsx(Ur,{children:s.jsxs("div",{className:"min-h-screen bg-background py-4 md:py-8",children:[s.jsxs("div",{className:"container mx-auto px-3 md:px-4",children:[s.jsxs("div",{className:"mb-4 md:mb-6 flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"Commandes"}),s.jsx("p",{className:"text-muted-foreground text-sm mt-1 hidden sm:block",children:"Visualisez et gérez toutes les commandes"})]}),s.jsxs(se,{variant:"outline",size:"sm",onClick:D,className:"self-start sm:self-auto",children:[s.jsx(ln,{className:"h-4 w-4 mr-2"}),"Actualiser"]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2 md:gap-4 mb-4 md:mb-6",children:[s.jsx(ve,{className:"p-3 md:p-0",children:s.jsxs(Ie,{className:"p-0 md:pt-6 md:px-6 md:pb-4",children:[s.jsx("div",{className:"text-xl md:text-2xl font-bold",children:ne.total}),s.jsx("p",{className:"text-[10px] md:text-xs text-muted-foreground",children:"Total"})]})}),s.jsx(ve,{className:"p-3 md:p-0",children:s.jsxs(Ie,{className:"p-0 md:pt-6 md:px-6 md:pb-4",children:[s.jsx("div",{className:"text-xl md:text-2xl font-bold",children:ne.orders}),s.jsx("p",{className:"text-[10px] md:text-xs text-muted-foreground",children:"Commandes €"})]})}),s.jsx(ve,{className:"p-3 md:p-0",children:s.jsxs(Ie,{className:"p-0 md:pt-6 md:px-6 md:pb-4",children:[s.jsx("div",{className:"text-xl md:text-2xl font-bold text-purple-600",children:ne.loyalty}),s.jsx("p",{className:"text-[10px] md:text-xs text-muted-foreground",children:"Fidélité"})]})}),s.jsx(ve,{className:"p-3 md:p-0",children:s.jsxs(Ie,{className:"p-0 md:pt-6 md:px-6 md:pb-4",children:[s.jsx("div",{className:"text-xl md:text-2xl font-bold text-yellow-600",children:ne.pending}),s.jsx("p",{className:"text-[10px] md:text-xs text-muted-foreground",children:"Attente"})]})}),s.jsx(ve,{className:"p-3 md:p-0 col-span-2 md:col-span-1",children:s.jsxs(Ie,{className:"p-0 md:pt-6 md:px-6 md:pb-4",children:[s.jsx("div",{className:"text-xl md:text-2xl font-bold text-blue-600",children:ne.shipped}),s.jsx("p",{className:"text-[10px] md:text-xs text-muted-foreground",children:"Expédiées"})]})})]}),s.jsx(bw,{value:S,onValueChange:E=>{k(E),p("all")},className:"mb-4",children:s.jsxs(d0,{className:"w-full md:w-auto",children:[s.jsxs(To,{value:"all",className:"flex-1 md:flex-none",children:[s.jsx(hs,{className:"h-4 w-4 mr-2"}),"Toutes (",ne.total,")"]}),s.jsxs(To,{value:"orders",className:"flex-1 md:flex-none",children:["Commandes € (",ne.orders,")"]}),s.jsxs(To,{value:"loyalty",className:"flex-1 md:flex-none",children:[s.jsx(Ut,{className:"h-4 w-4 mr-2"}),"Fidélité (",ne.loyalty,")"]})]})}),s.jsx(ve,{className:"mb-4 md:mb-6",children:s.jsx(Ie,{className:"p-3 md:pt-6 md:px-6",children:s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(ql,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(lt,{placeholder:"Rechercher...",value:h,onChange:E=>m(E.target.value),className:"pl-10 h-10"})]}),s.jsxs(mi,{value:v,onValueChange:p,children:[s.jsx($a,{className:"w-full sm:w-40 h-10",children:s.jsx(pi,{placeholder:"Statut"})}),s.jsx(qa,{children:he()})]})]})})}),s.jsxs("div",{className:"md:hidden space-y-3",children:[S==="all"&&c.map(E=>E.type==="order"?s.jsxs(ve,{className:"p-4 cursor-pointer active:bg-muted/50 transition-colors",onClick:()=>V(E.data),children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"font-mono font-semibold text-sm",children:E.data.reference}),A(E.data.status)]}),s.jsxs("p",{className:"font-medium text-sm truncate",children:[E.data.first_name," ",E.data.last_name]}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:E.data.email})]}),s.jsxs("div",{className:"text-right shrink-0",children:[s.jsxs("p",{className:"font-bold text-lg text-primary",children:[E.data.total.toFixed(2)," €"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:P(E.created_at)})]})]}),s.jsxs("div",{className:"mt-3 pt-3 border-t border-border flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(hs,{className:"h-3.5 w-3.5"}),E.data.items.length," article",E.data.items.length>1?"s":""]}),s.jsxs(se,{variant:"ghost",size:"sm",className:"h-8 px-3 text-primary",children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Voir"]})]})]},`order-${E.data.id}`):s.jsxs(ve,{className:"p-4 cursor-pointer active:bg-muted/50 transition-colors border-purple-200",onClick:()=>Z(E.data),children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Ut,{className:"h-4 w-4 text-purple-600"}),s.jsx("span",{className:"font-semibold text-sm text-purple-700",children:"Fidélité"}),W(E.data.status)]}),s.jsx("p",{className:"font-medium text-sm truncate",children:E.data.product_name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:E.data.email})]}),s.jsxs("div",{className:"text-right shrink-0",children:[s.jsxs("p",{className:"font-bold text-lg text-purple-600",children:[E.data.points_used.toLocaleString()," pts"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:P(E.created_at)})]})]}),s.jsxs("div",{className:"mt-3 pt-3 border-t border-border flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:["Valeur: ",Number(E.data.euro_value).toFixed(2),"€"]}),s.jsxs(se,{variant:"ghost",size:"sm",className:"h-8 px-3 text-purple-600",children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Voir"]})]})]},`loyalty-${E.data.id}`)),S==="orders"&&a.map(E=>s.jsxs(ve,{className:"p-4 cursor-pointer active:bg-muted/50 transition-colors",onClick:()=>V(E),children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"font-mono font-semibold text-sm",children:E.reference}),A(E.status)]}),s.jsxs("p",{className:"font-medium text-sm truncate",children:[E.first_name," ",E.last_name]}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:E.email})]}),s.jsxs("div",{className:"text-right shrink-0",children:[s.jsxs("p",{className:"font-bold text-lg text-primary",children:[E.total.toFixed(2)," €"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:P(E.created_at)})]})]}),s.jsxs("div",{className:"mt-3 pt-3 border-t border-border flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsx(hs,{className:"h-3.5 w-3.5"}),E.items.length," article",E.items.length>1?"s":""]}),s.jsxs(se,{variant:"ghost",size:"sm",className:"h-8 px-3 text-primary",children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Voir"]})]})]},`order-${E.id}`)),S==="loyalty"&&o.map(E=>s.jsxs(ve,{className:"p-4 cursor-pointer active:bg-muted/50 transition-colors border-purple-200",onClick:()=>Z(E),children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Ut,{className:"h-4 w-4 text-purple-600"}),s.jsx("span",{className:"font-semibold text-sm text-purple-700",children:"Fidélité"}),W(E.status)]}),s.jsx("p",{className:"font-medium text-sm truncate",children:E.product_name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:E.email})]}),s.jsxs("div",{className:"text-right shrink-0",children:[s.jsxs("p",{className:"font-bold text-lg text-purple-600",children:[E.points_used.toLocaleString()," pts"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:P(E.created_at)})]})]}),s.jsxs("div",{className:"mt-3 pt-3 border-t border-border flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:["Valeur: ",Number(E.euro_value).toFixed(2),"€"]}),s.jsxs(se,{variant:"ghost",size:"sm",className:"h-8 px-3 text-purple-600",children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Voir"]})]})]},`loyalty-${E.id}`)),(S==="all"&&c.length===0||S==="orders"&&a.length===0||S==="loyalty"&&o.length===0)&&s.jsxs(ve,{className:"p-8 text-center",children:[s.jsx(hs,{className:"h-12 w-12 mx-auto text-muted-foreground mb-2"}),s.jsx("p",{className:"text-muted-foreground",children:"Aucune commande trouvée"})]})]}),s.jsxs(ve,{className:"hidden md:block",children:[s.jsxs(tt,{className:"pb-3",children:[s.jsx(rt,{children:"Liste des commandes"}),s.jsxs(fa,{children:[S==="all"&&`${a.length+o.length} commandes au total`,S==="orders"&&`${a.length} commande${a.length>1?"s":""}`,S==="loyalty"&&`${o.length} échange${o.length>1?"s":""} fidélité`,v!=="all"&&" (filtrées)"]})]}),s.jsx(Ie,{children:s.jsx("div",{className:"rounded-md border overflow-x-auto",children:s.jsxs(Pi,{children:[s.jsx(Ii,{children:s.jsxs(nr,{children:[s.jsx(nt,{className:"min-w-[50px]",children:"Type"}),s.jsx(nt,{className:"min-w-[100px]",children:"Référence"}),s.jsx(nt,{className:"min-w-[180px]",children:"Client"}),s.jsx(nt,{className:"min-w-[140px]",children:"Date"}),s.jsx(nt,{className:"min-w-[80px]",children:"Total"}),s.jsx(nt,{className:"min-w-[100px]",children:"Statut"}),s.jsx(nt,{className:"text-right min-w-[100px]",children:"Actions"})]})}),s.jsxs(Fi,{children:[S==="all"&&c.map(E=>{var B,ee;return E.type==="order"?s.jsxs(nr,{className:`cursor-pointer hover:bg-muted/50 ${E.data.loyalty_items&&E.data.loyalty_items.length>0?"bg-gradient-to-r from-white to-purple-50/50":""}`,onClick:()=>V(E.data),children:[s.jsx(Be,{children:E.data.loyalty_items&&E.data.loyalty_items.length>0?s.jsxs("div",{className:"flex gap-1",children:[s.jsx(Je,{variant:"outline",className:"text-xs",children:"€"}),s.jsx(Je,{className:"bg-purple-100 text-purple-700 text-xs",children:s.jsx(Ut,{className:"h-3 w-3"})})]}):s.jsx(Je,{variant:"outline",className:"text-xs",children:"€"})}),s.jsx(Be,{className:"font-mono font-medium",children:E.data.reference}),s.jsx(Be,{children:s.jsxs("div",{children:[s.jsxs("div",{className:"font-medium",children:[E.data.first_name," ",E.data.last_name]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:E.data.email})]})}),s.jsx(Be,{className:"text-sm",children:P(E.created_at)}),s.jsx(Be,{className:"font-semibold",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("span",{children:[E.data.total.toFixed(2)," €"]}),E.data.points_used&&E.data.points_used>0&&s.jsxs("span",{className:"text-xs text-purple-600 font-normal",children:["+ ",E.data.points_used.toLocaleString()," pts"]})]})}),s.jsx(Be,{children:A(E.data.status)}),s.jsx(Be,{className:"text-right",children:s.jsxs(se,{variant:"ghost",size:"sm",onClick:J=>{J.stopPropagation(),V(E.data)},children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Détails"]})})]},`order-${E.data.id}`):s.jsxs(nr,{className:"cursor-pointer hover:bg-muted/50 bg-purple-50/50",onClick:()=>Z(E.data),children:[s.jsx(Be,{children:s.jsxs(Je,{className:"bg-purple-100 text-purple-700 text-xs",children:[s.jsx(Ut,{className:"h-3 w-3 mr-1"}),"Pts"]})}),s.jsx(Be,{className:"font-medium text-purple-700",children:"Fidélité"}),s.jsx(Be,{children:s.jsxs("div",{children:[s.jsxs("div",{className:"font-medium",children:[(B=E.data.shipping_address)==null?void 0:B.first_name," ",(ee=E.data.shipping_address)==null?void 0:ee.last_name]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:E.data.email})]})}),s.jsx(Be,{className:"text-sm",children:P(E.created_at)}),s.jsxs(Be,{className:"font-semibold text-purple-600",children:[E.data.points_used.toLocaleString()," pts"]}),s.jsx(Be,{children:W(E.data.status)}),s.jsx(Be,{className:"text-right",children:s.jsxs(se,{variant:"ghost",size:"sm",onClick:J=>{J.stopPropagation(),Z(E.data)},children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Détails"]})})]},`loyalty-${E.data.id}`)}),S==="orders"&&a.map(E=>s.jsxs(nr,{className:`cursor-pointer hover:bg-muted/50 ${E.loyalty_items&&E.loyalty_items.length>0?"bg-gradient-to-r from-white to-purple-50/50":""}`,onClick:()=>V(E),children:[s.jsx(Be,{children:E.loyalty_items&&E.loyalty_items.length>0?s.jsxs("div",{className:"flex gap-1",children:[s.jsx(Je,{variant:"outline",className:"text-xs",children:"€"}),s.jsx(Je,{className:"bg-purple-100 text-purple-700 text-xs",children:s.jsx(Ut,{className:"h-3 w-3"})})]}):s.jsx(Je,{variant:"outline",className:"text-xs",children:"€"})}),s.jsx(Be,{className:"font-mono font-medium",children:E.reference}),s.jsx(Be,{children:s.jsxs("div",{children:[s.jsxs("div",{className:"font-medium",children:[E.first_name," ",E.last_name]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:E.email})]})}),s.jsx(Be,{className:"text-sm",children:P(E.created_at)}),s.jsx(Be,{className:"font-semibold",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("span",{children:[E.total.toFixed(2)," €"]}),E.points_used&&E.points_used>0&&s.jsxs("span",{className:"text-xs text-purple-600 font-normal",children:["+ ",E.points_used.toLocaleString()," pts"]})]})}),s.jsx(Be,{children:A(E.status)}),s.jsx(Be,{className:"text-right",children:s.jsxs(se,{variant:"ghost",size:"sm",onClick:B=>{B.stopPropagation(),V(E)},children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Détails"]})})]},`order-${E.id}`)),S==="loyalty"&&o.map(E=>{var B,ee;return s.jsxs(nr,{className:"cursor-pointer hover:bg-muted/50 bg-purple-50/50",onClick:()=>Z(E),children:[s.jsx(Be,{children:s.jsxs(Je,{className:"bg-purple-100 text-purple-700 text-xs",children:[s.jsx(Ut,{className:"h-3 w-3 mr-1"}),"Pts"]})}),s.jsx(Be,{className:"font-medium text-purple-700",children:"Fidélité"}),s.jsx(Be,{children:s.jsxs("div",{children:[s.jsxs("div",{className:"font-medium",children:[(B=E.shipping_address)==null?void 0:B.first_name," ",(ee=E.shipping_address)==null?void 0:ee.last_name]}),s.jsx("div",{className:"text-xs text-muted-foreground",children:E.email})]})}),s.jsx(Be,{className:"text-sm",children:P(E.created_at)}),s.jsxs(Be,{className:"font-semibold text-purple-600",children:[E.points_used.toLocaleString()," pts"]}),s.jsx(Be,{children:W(E.status)}),s.jsx(Be,{className:"text-right",children:s.jsxs(se,{variant:"ghost",size:"sm",onClick:J=>{J.stopPropagation(),Z(E)},children:[s.jsx(Us,{className:"h-4 w-4 mr-1"}),"Détails"]})})]},`loyalty-${E.id}`)}),(S==="all"&&c.length===0||S==="orders"&&a.length===0||S==="loyalty"&&o.length===0)&&s.jsx(nr,{children:s.jsxs(Be,{colSpan:7,className:"text-center py-8",children:[s.jsx(hs,{className:"h-12 w-12 mx-auto text-muted-foreground mb-2"}),s.jsx("p",{className:"text-muted-foreground",children:"Aucune commande trouvée"})]})})]})]})})})]})]}),s.jsx(Uo,{open:N,onOpenChange:C,children:s.jsxs(Ci,{className:"max-w-2xl max-h-[90vh] overflow-y-auto p-4 md:p-6",children:[s.jsxs(Si,{className:"pb-2",children:[s.jsxs(Ei,{className:"flex items-center gap-2 text-lg",children:[s.jsx(hs,{className:"h-5 w-5"}),s.jsx("span",{className:"font-mono",children:x==null?void 0:x.reference})]}),s.jsxs(Iu,{className:"text-xs md:text-sm",children:["Créée le ",x&&P(x.created_at)]})]}),x&&s.jsxs("div",{className:"space-y-4 md:space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 p-3 md:p-4 bg-muted rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs md:text-sm text-muted-foreground",children:"Statut:"}),A(x.status)]}),s.jsxs(mi,{value:x.status||"pending",onValueChange:E=>M(x.id,E),children:[s.jsx($a,{className:"w-full sm:w-40 h-9",children:s.jsx(pi,{})}),s.jsxs(qa,{children:[s.jsx(yt,{value:"pending",children:"En attente"}),s.jsx(yt,{value:"paid",children:"Payée"}),s.jsx(yt,{value:"shipped",children:"Expédiée"}),s.jsx(yt,{value:"delivered",children:"Livrée"}),s.jsx(yt,{value:"cancelled",children:"Annulée"})]})]})]}),s.jsx(us,{}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-2 text-sm md:text-base",children:"Informations client"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Nom"}),s.jsxs("p",{className:"font-medium",children:[x.first_name," ",x.last_name]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Email"}),s.jsx("p",{className:"font-medium break-all text-xs md:text-sm",children:x.email})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:"Téléphone"}),s.jsx("a",{href:`tel:${x.phone}`,className:"font-medium text-primary block",children:x.phone||"-"})]})]})]}),s.jsx(us,{}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-2 text-sm md:text-base",children:"Adresse de livraison"}),s.jsxs("div",{className:"text-sm bg-muted/30 p-3 rounded-lg",children:[s.jsxs("p",{className:"font-medium",children:[x.first_name," ",x.last_name]}),s.jsx("p",{children:x.address}),s.jsxs("p",{className:"font-medium",children:[x.postal_code," ",x.city]}),s.jsx("p",{children:x.country}),x.additional_info&&s.jsxs("p",{className:"text-muted-foreground mt-2 text-xs border-t border-border pt-2",children:["📝 ",x.additional_info]})]})]}),s.jsx(us,{}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold mb-2 text-sm md:text-base",children:["Articles (",x.items.length,")"]}),s.jsx("div",{className:"space-y-2",children:x.items.map((E,B)=>s.jsxs("div",{className:"flex items-center gap-3 p-2 md:p-3 bg-muted/50 rounded-lg",children:[E.imageUrl&&s.jsx("img",{src:E.imageUrl,alt:E.productName,className:"h-10 w-10 md:h-12 md:w-12 object-cover rounded shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-sm truncate",children:E.productName}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[E.variantName," × ",E.quantity]})]}),s.jsxs("p",{className:"font-semibold text-sm shrink-0",children:[(E.price*E.quantity).toFixed(2)," €"]})]},B))})]}),x.loyalty_items&&x.loyalty_items.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(us,{}),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-semibold mb-2 text-sm md:text-base flex items-center gap-2",children:[s.jsx(Ut,{className:"h-4 w-4 text-purple-600"}),"Produits fidélité (",x.loyalty_items.length,")",s.jsxs(Je,{className:"bg-purple-100 text-purple-700 text-xs",children:[(I=x.points_used)==null?void 0:I.toLocaleString()," pts"]})]}),s.jsx("div",{className:"space-y-2",children:x.loyalty_items.map((E,B)=>s.jsxs("div",{className:"flex items-center gap-3 p-2 md:p-3 bg-purple-50 rounded-lg border border-purple-200",children:[s.jsx("div",{className:"h-10 w-10 md:h-12 md:w-12 bg-purple-100 rounded flex items-center justify-center shrink-0",children:s.jsx(Ut,{className:"h-5 w-5 text-purple-600"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-sm truncate",children:E.productName}),s.jsxs("p",{className:"text-xs text-purple-600",children:[(E.pointsCost*E.quantity).toLocaleString()," points × ",E.quantity]})]}),s.jsxs("div",{className:"text-right shrink-0",children:[s.jsx("p",{className:"font-semibold text-sm text-purple-600",children:"Gratuit"}),s.jsxs("p",{className:"text-xs text-muted-foreground line-through",children:[(E.euroValue*E.quantity).toFixed(2)," €"]})]})]},B))})]})]}),s.jsx(us,{}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Sous-total"}),s.jsxs("span",{children:[x.subtotal.toFixed(2)," €"]})]}),x.loyalty_items&&x.loyalty_items.length>0&&s.jsxs("div",{className:"flex justify-between text-purple-600",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ut,{className:"h-3 w-3"}),"Produits fidélité"]}),s.jsxs("span",{children:["-",x.loyalty_items.reduce((E,B)=>E+B.euroValue*B.quantity,0).toFixed(2)," €"]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("span",{className:"text-muted-foreground",children:["Livraison (",((Y=x.delivery_option)==null?void 0:Y.name)||"Standard",")"]}),s.jsxs("span",{children:[x.delivery_fee.toFixed(2)," €"]})]}),s.jsx(us,{}),s.jsxs("div",{className:"flex justify-between font-semibold text-base",children:[s.jsx("span",{children:"Total payé"}),s.jsxs("span",{children:[x.total.toFixed(2)," €"]})]})]}),(x.up2pay_transaction_id||x.up2pay_authorization)&&s.jsxs(s.Fragment,{children:[s.jsx(us,{}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-3",children:"Informations de paiement"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[x.up2pay_transaction_id&&s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Transaction ID:"}),s.jsx("p",{className:"font-mono",children:x.up2pay_transaction_id})]}),x.up2pay_authorization&&s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Autorisation:"}),s.jsx("p",{className:"font-mono",children:x.up2pay_authorization})]}),x.up2pay_card_type&&s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Type de carte:"}),s.jsx("p",{children:x.up2pay_card_type})]}),x.payment_date&&s.jsxs("div",{children:[s.jsx("span",{className:"text-muted-foreground",children:"Date de paiement:"}),s.jsx("p",{children:P(x.payment_date)})]})]})]})]})]})]})}),s.jsx(Uo,{open:_,onOpenChange:j,children:s.jsxs(Ci,{className:"max-w-lg max-h-[90vh] overflow-y-auto p-4 md:p-6",children:[s.jsxs(Si,{className:"pb-2",children:[s.jsxs(Ei,{className:"flex items-center gap-2 text-lg",children:[s.jsx(Ut,{className:"h-5 w-5 text-purple-600"}),s.jsx("span",{children:"Échange Fidélité"})]}),s.jsxs(Iu,{className:"text-xs md:text-sm",children:["Créé le ",y&&P(y.created_at)]})]}),y&&s.jsxs("div",{className:"space-y-4 md:space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 p-3 md:p-4 bg-purple-50 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs md:text-sm text-muted-foreground",children:"Statut:"}),W(y.status)]}),s.jsxs(mi,{value:y.status||"pending",onValueChange:E=>T(y.id,E),children:[s.jsx($a,{className:"w-full sm:w-40 h-9",children:s.jsx(pi,{})}),s.jsxs(qa,{children:[s.jsx(yt,{value:"pending",children:"En attente"}),s.jsx(yt,{value:"processing",children:"En préparation"}),s.jsx(yt,{value:"shipped",children:"Expédié"}),s.jsx(yt,{value:"completed",children:"Terminé"}),s.jsx(yt,{value:"cancelled",children:"Annulé"})]})]})]}),s.jsx(us,{}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-2 text-sm md:text-base",children:"Produit"}),s.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg",children:[s.jsx("p",{className:"font-medium",children:y.product_name}),y.variant_name&&s.jsx("p",{className:"text-sm text-muted-foreground",children:y.variant_name})]})]}),s.jsx(us,{}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-2 text-sm md:text-base",children:"Points utilisés"}),s.jsxs("div",{className:"flex justify-between items-center p-3 bg-purple-50 rounded-lg",children:[s.jsxs("span",{className:"text-purple-700 font-bold text-xl",children:[y.points_used.toLocaleString()," pts"]}),s.jsxs("span",{className:"text-muted-foreground",children:["Valeur: ",Number(y.euro_value).toFixed(2),"€"]})]})]}),s.jsx(us,{}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-2 text-sm md:text-base",children:"Client"}),s.jsx("p",{className:"text-sm",children:y.email})]}),y.shipping_address&&s.jsxs(s.Fragment,{children:[s.jsx(us,{}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-2 text-sm md:text-base",children:"Adresse de livraison"}),s.jsxs("div",{className:"text-sm bg-muted/30 p-3 rounded-lg",children:[s.jsxs("p",{className:"font-medium",children:[y.shipping_address.first_name," ",y.shipping_address.last_name]}),s.jsx("p",{children:y.shipping_address.address}),s.jsxs("p",{className:"font-medium",children:[y.shipping_address.postal_code," ",y.shipping_address.city]}),y.shipping_address.country&&s.jsx("p",{children:y.shipping_address.country}),y.shipping_address.phone&&s.jsx("a",{href:`tel:${y.shipping_address.phone}`,className:"text-primary",children:y.shipping_address.phone}),y.shipping_address.delivery_option&&s.jsxs("p",{className:"mt-2 text-xs font-medium text-primary border-t border-border pt-2",children:["🚚 ",y.shipping_address.delivery_option.name]})]})]})]})]})]})})]})})},TY=()=>{const[e,t]=g.useState(!1),[r,n]=g.useState(""),[a,i]=g.useState(""),o=async()=>{if(!r){fe.error("Veuillez entrer une adresse email");return}t(!0);try{const{data:c,error:u}=await be.functions.invoke("send-blackfriday-email",{body:{to:[r],isTest:!0}});if(u)throw u;fe.success(`Email de test envoyé à ${r}`)}catch(c){console.error("Error sending test email:",c),fe.error(`Erreur: ${c.message}`)}finally{t(!1)}},l=async()=>{const c=a.split(/[\n,;]/).map(u=>u.trim()).filter(u=>u);if(c.length===0){fe.error("Veuillez entrer au moins une adresse email");return}t(!0);try{const{data:u,error:d}=await be.functions.invoke("send-blackfriday-email",{body:{to:c,isTest:!1}});if(d)throw d;fe.success(`Emails envoyés à ${c.length} destinataire(s)`),i("")}catch(u){console.error("Error sending bulk emails:",u),fe.error(`Erreur: ${u.message}`)}finally{t(!1)}};return s.jsx(Ur,{children:s.jsx("div",{className:"min-h-screen bg-background py-8",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Campagne Email Black Friday"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Envoyez l'offre -50% à vos clients"})]}),s.jsxs("div",{className:"grid gap-6",children:[s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsxs(rt,{className:"flex items-center gap-2",children:[s.jsx(xa,{className:"h-5 w-5"}),"Aperçu de l'email"]}),s.jsx(fa,{children:"Email promotionnel Black Friday avec réduction de 50%"})]}),s.jsx(Ie,{children:s.jsx("div",{className:"bg-muted/50 p-4 rounded-lg border overflow-auto",children:s.jsxs("div",{className:"bg-black text-white p-6 rounded-md max-w-2xl mx-auto",children:[s.jsx("div",{className:"bg-gradient-to-br from-gray-900 to-black p-6 text-center rounded-t-lg",children:s.jsx("img",{src:"https://www.notocbd.com/wp-content/uploads/2020/07/Fichier-5@3x.png",alt:"NOTO CBD",className:"max-w-[200px] h-auto mx-auto"})}),s.jsxs("div",{className:"bg-gradient-to-br from-[#009575] to-[#006B52] p-8 text-center",children:[s.jsx("h2",{className:"text-2xl font-black mb-2 tracking-[4px] uppercase text-white",children:"🔥 BLACK FRIDAY 🔥"}),s.jsx("div",{className:"text-7xl font-black text-yellow-300 my-4",children:"-40%"}),s.jsx("div",{className:"text-2xl font-bold uppercase tracking-[2px] text-white",children:"Sur tout le site"})]}),s.jsxs("div",{className:"bg-white text-black p-6",children:[s.jsx("h3",{className:"text-2xl font-bold text-center mb-4 text-black",children:"Une occasion unique de découvrir le bien-être naturel"}),s.jsxs("p",{className:"text-base text-center mb-4 text-black leading-relaxed",children:["Chez ",s.jsx("strong",{children:"NŌTO"}),", nous avons une mission claire : apporter des solutions naturelles et efficaces aux millions de personnes qui souffrent de douleurs chroniques, de stress et de troubles du sommeil."]}),s.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg mb-4 space-y-3",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl font-black text-[#009575]",children:"12M"}),s.jsx("p",{className:"text-sm text-black font-medium",children:"de Français souffrent de douleurs chroniques"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl font-black text-[#009575]",children:"1/5"}),s.jsx("p",{className:"text-sm text-black font-medium",children:"personnes touchées par l'anxiété et le stress"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl font-black text-[#009575]",children:"1/3"}),s.jsx("p",{className:"text-sm text-black font-medium",children:"adultes déclarent mal dormir ou souffrir d'insomnie"})]})]}),s.jsxs("p",{className:"text-base text-center mb-4 text-black leading-relaxed",children:["Ces problèmes ne sont pas une fatalité. Nous avons conçu ",s.jsx("strong",{children:"NŌTO"})," pour aider concrètement ceux qui en ont besoin, avec des solutions sûres et accessibles, développées en Bretagne dans notre laboratoire familial."]}),s.jsxs("div",{className:"bg-gradient-to-r from-[#009575] to-[#006B52] text-white p-4 rounded-lg text-center mb-4",children:[s.jsx("p",{className:"font-bold text-sm mb-1",children:"🎁 Profitez de -40% sur tous nos produits"}),s.jsx("p",{className:"text-xs opacity-90",children:"Valable jusqu'au 1er décembre • Une fois par an seulement"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 my-6",children:[s.jsxs("a",{href:"https://www.notocbd.com/produits-cbd/",target:"_blank",rel:"noopener noreferrer",className:"bg-gray-100 rounded-lg overflow-hidden block",children:[s.jsx("img",{src:"https://www.notocbd.com/wp-content/uploads/2022/03/Pack-Fruits-rouges-scaled-1-1536x1113.jpg",alt:"Pack Fruits Rouges",className:"w-full h-48 object-cover"}),s.jsx("p",{className:"text-sm font-bold text-center p-2 text-black",children:"Huiles CBD Fruits Rouges"})]}),s.jsxs("a",{href:"https://www.notocbd.com/produits-cbd/",target:"_blank",rel:"noopener noreferrer",className:"bg-gray-100 rounded-lg overflow-hidden block",children:[s.jsx("img",{src:"https://www.notocbd.com/wp-content/uploads/2025/05/CBD-Citron-NOTO-10ml-1.jpg",alt:"Huile CBD Citron",className:"w-full h-48 object-cover"}),s.jsx("p",{className:"text-sm font-bold text-center p-2 text-black",children:"Huile CBD Citron 10ml"})]}),s.jsxs("a",{href:"https://www.notocbd.com/produits-cbd/",target:"_blank",rel:"noopener noreferrer",className:"bg-gray-100 rounded-lg overflow-hidden block",children:[s.jsx("img",{src:"https://www.notocbd.com/wp-content/uploads/2021/05/produit-cbd-gummies-1536x1113.jpg",alt:"Gummies CBD",className:"w-full h-48 object-cover"}),s.jsx("p",{className:"text-sm font-bold text-center p-2 text-black",children:"Gummies CBD Premium"})]}),s.jsxs("a",{href:"https://www.notocbd.com/produits-cbd/",target:"_blank",rel:"noopener noreferrer",className:"bg-gray-100 rounded-lg overflow-hidden block",children:[s.jsx("img",{src:"https://www.notocbd.com/wp-content/uploads/2023/11/NOTO-Gummies-Noel-3D-2048x2048.jpeg",alt:"Gummies Noël",className:"w-full h-48 object-cover"}),s.jsx("p",{className:"text-sm font-bold text-center p-2 text-black",children:"Gummies Édition Spéciale"})]}),s.jsxs("a",{href:"https://www.notocbd.com/produits-cbd/",target:"_blank",rel:"noopener noreferrer",className:"bg-gray-100 rounded-lg overflow-hidden block",children:[s.jsx("img",{src:"https://www.notocbd.com/wp-content/uploads/2022/08/To-exporty_0001_ALGOS1-1200x1200.png",alt:"Algos CBD",className:"w-full h-48 object-cover"}),s.jsx("p",{className:"text-sm font-bold text-center p-2 text-black",children:"Algos CBD Douleurs"})]}),s.jsxs("a",{href:"https://www.notocbd.com/produits-cbd/",target:"_blank",rel:"noopener noreferrer",className:"bg-gray-100 rounded-lg overflow-hidden block",children:[s.jsx("img",{src:"https://www.notocbd.com/wp-content/uploads/2022/09/Capsules-cbd-Stress-Melisse-1200x1200.png",alt:"Capsules CBD Stress",className:"w-full h-48 object-cover"}),s.jsx("p",{className:"text-sm font-bold text-center p-2 text-black",children:"Capsules CBD Stress & Mélisse"})]})]}),s.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg mb-4",children:[s.jsx("h4",{className:"text-base font-bold text-[#009575] text-center mb-3",children:"Notre engagement qualité"}),s.jsxs("div",{className:"grid grid-cols-4 gap-2",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-2xl mb-1",children:"🌱"}),s.jsx("p",{className:"text-sm font-bold text-black",children:"Sans THC"}),s.jsx("p",{className:"text-xs text-gray-700",children:"Testé & vérifié"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-2xl mb-1",children:"🇫🇷"}),s.jsx("p",{className:"text-sm font-bold text-black",children:"Made in France"}),s.jsx("p",{className:"text-xs text-gray-700",children:"Laboratoire breton"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-2xl mb-1",children:"🌿"}),s.jsx("p",{className:"text-sm font-bold text-black",children:"Vegan"}),s.jsx("p",{className:"text-xs text-gray-700",children:"Sans OGM"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-2xl mb-1",children:"✨"}),s.jsx("p",{className:"text-sm font-bold text-black",children:"Qualité premium"}),s.jsx("p",{className:"text-xs text-gray-700",children:"Traçabilité totale"})]})]})]}),s.jsxs("div",{className:"text-center my-6",children:[s.jsxs("a",{href:"https://www.notocbd.com/produits-cbd/",target:"_blank",rel:"noopener noreferrer",className:"inline-block bg-gradient-to-r from-[#009575] to-[#006B52] text-white px-12 py-5 rounded-full font-bold text-lg uppercase tracking-[2px] shadow-xl no-underline hover:shadow-2xl transition-shadow",children:[s.jsx("div",{children:"Découvrir nos produits"}),s.jsx("div",{className:"text-base normal-case tracking-normal mt-1",children:"✨ C'est par ici ✨"})]}),s.jsx("p",{className:"text-xs text-gray-600 mt-3",children:"Une qualité inégalée, développée en Bretagne 🇫🇷"})]})]}),s.jsxs("div",{className:"bg-gradient-to-r from-yellow-400 to-yellow-600 text-black p-4 text-center",children:[s.jsx("p",{className:"font-bold text-sm uppercase mb-1",children:"⏰ Derniers jours pour profiter de cette offre unique !"}),s.jsx("p",{className:"text-xs",children:"Valable jusqu'au 1er décembre minuit"}),s.jsx("p",{className:"text-xs font-semibold mt-1 text-yellow-900",children:"✨ Cette offre n'arrive qu'une fois par an"})]}),s.jsxs("div",{className:"bg-gray-900 p-6 text-center rounded-b-lg",children:[s.jsx("img",{src:"https://www.notocbd.com/wp-content/uploads/2020/07/Fichier-1@4x.png",alt:"NOTO",className:"max-w-[80px] h-auto mx-auto mb-4 opacity-70"}),s.jsx("p",{className:"text-gray-400 text-xs mb-2",children:"Une offre exceptionnelle qui n'arrive qu'une fois par an."}),s.jsx("p",{className:"text-[#009575] text-xs font-semibold mb-1",children:"www.notocbd.com"}),s.jsx("p",{className:"text-gray-400 text-xs",children:"Profitez-en jusqu'au 1er décembre"}),s.jsx("p",{className:"text-gray-500 text-[10px] mt-2",children:"Solutions naturelles développées en Bretagne | Sans THC | Vegan"})]})]})})})]}),s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsx(rt,{children:"Email de test"}),s.jsx(fa,{children:"Envoyez-vous un email de test pour vérifier le rendu"})]}),s.jsxs(Ie,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"test-email",children:"Email de test"}),s.jsx(lt,{id:"test-email",type:"email",placeholder:"votre@email.com",value:r,onChange:c=>n(c.target.value)})]}),s.jsx(se,{onClick:o,disabled:e,className:"w-full",children:e?s.jsxs(s.Fragment,{children:[s.jsx(Wr,{className:"mr-2 h-4 w-4 animate-spin"}),"Envoi en cours..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ku,{className:"mr-2 h-4 w-4"}),"Envoyer un test"]})})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsx(rt,{children:"Envoi groupé"}),s.jsx(fa,{children:"Envoyez l'email à plusieurs destinataires (un par ligne, ou séparés par virgules/points-virgules)"})]}),s.jsxs(Ie,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"email-list",children:"Liste d'emails"}),s.jsx(Yf,{id:"email-list",placeholder:`email1@example.com
email2@example.com
email3@example.com`,value:a,onChange:c=>i(c.target.value),rows:8})]}),s.jsx(se,{onClick:l,disabled:e,variant:"default",className:"w-full",children:e?s.jsxs(s.Fragment,{children:[s.jsx(Wr,{className:"mr-2 h-4 w-4 animate-spin"}),"Envoi en cours..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ku,{className:"mr-2 h-4 w-4"}),"Envoyer à tous"]})})]})]})]})]})})})};function AY(e,t){return g.useReducer((r,n)=>t[r][n]??r,e)}var ww="ScrollArea",[nO]=Yr(ww),[RY,Mn]=nO(ww),aO=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:i=600,...o}=e,[l,c]=g.useState(null),[u,d]=g.useState(null),[f,h]=g.useState(null),[m,v]=g.useState(null),[p,x]=g.useState(null),[w,y]=g.useState(0),[b,N]=g.useState(0),[C,_]=g.useState(!1),[j,S]=g.useState(!1),k=pt(t,M=>c(M)),D=ac(a);return s.jsx(RY,{scope:r,type:n,dir:D,scrollHideDelay:i,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:C,onScrollbarXEnabledChange:_,scrollbarY:p,onScrollbarYChange:x,scrollbarYEnabled:j,onScrollbarYEnabledChange:S,onCornerWidthChange:y,onCornerHeightChange:N,children:s.jsx(ze.div,{dir:D,...o,ref:k,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});aO.displayName=ww;var iO="ScrollAreaViewport",oO=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:a,...i}=e,o=Mn(iO,r),l=g.useRef(null),c=pt(t,l,o.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),s.jsx(ze.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});oO.displayName=iO;var Ka="ScrollAreaScrollbar",jw=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Mn(Ka,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=a,l=e.orientation==="horizontal";return g.useEffect(()=>(l?i(!0):o(!0),()=>{l?i(!1):o(!1)}),[l,i,o]),a.type==="hover"?s.jsx(DY,{...n,ref:t,forceMount:r}):a.type==="scroll"?s.jsx(OY,{...n,ref:t,forceMount:r}):a.type==="auto"?s.jsx(lO,{...n,ref:t,forceMount:r}):a.type==="always"?s.jsx(Nw,{...n,ref:t}):null});jw.displayName=Ka;var DY=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Mn(Ka,e.__scopeScrollArea),[i,o]=g.useState(!1);return g.useEffect(()=>{const l=a.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),o(!0)},d=()=>{c=window.setTimeout(()=>o(!1),a.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[a.scrollArea,a.scrollHideDelay]),s.jsx(Xr,{present:r||i,children:s.jsx(lO,{"data-state":i?"visible":"hidden",...n,ref:t})})}),OY=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=Mn(Ka,e.__scopeScrollArea),i=e.orientation==="horizontal",o=h0(()=>c("SCROLL_END"),100),[l,c]=AY("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return g.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,a.scrollHideDelay,c]),g.useEffect(()=>{const u=a.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const m=u[d];f!==m&&(c("SCROLL"),o()),f=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[a.viewport,i,c,o]),s.jsx(Xr,{present:r||l!=="hidden",children:s.jsx(Nw,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:ke(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:ke(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),lO=g.forwardRef((e,t)=>{const r=Mn(Ka,e.__scopeScrollArea),{forceMount:n,...a}=e,[i,o]=g.useState(!1),l=e.orientation==="horizontal",c=h0(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;o(l?u:d)}},10);return Fu(r.viewport,c),Fu(r.content,c),s.jsx(Xr,{present:n||i,children:s.jsx(Nw,{"data-state":i?"visible":"hidden",...a,ref:t})})}),Nw=g.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,a=Mn(Ka,e.__scopeScrollArea),i=g.useRef(null),o=g.useRef(0),[l,c]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=hO(l.viewport,l.content),d={...n,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function f(h,m){return BY(h,o.current,l,m)}return r==="horizontal"?s.jsx(PY,{...d,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const h=a.viewport.scrollLeft,m=b_(h,l,a.dir);i.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{a.viewport&&(a.viewport.scrollLeft=h)},onDragScroll:h=>{a.viewport&&(a.viewport.scrollLeft=f(h,a.dir))}}):r==="vertical"?s.jsx(IY,{...d,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const h=a.viewport.scrollTop,m=b_(h,l);i.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{a.viewport&&(a.viewport.scrollTop=h)},onDragScroll:h=>{a.viewport&&(a.viewport.scrollTop=f(h))}}):null}),PY=g.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,i=Mn(Ka,e.__scopeScrollArea),[o,l]=g.useState(),c=g.useRef(null),u=pt(t,c,i.onScrollbarXChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(uO,{"data-orientation":"horizontal",...a,ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":f0(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),pO(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:qp(o.paddingLeft),paddingEnd:qp(o.paddingRight)}})}})}),IY=g.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,i=Mn(Ka,e.__scopeScrollArea),[o,l]=g.useState(),c=g.useRef(null),u=pt(t,c,i.onScrollbarYChange);return g.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(uO,{"data-orientation":"vertical",...a,ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":f0(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const h=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),pO(h,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:qp(o.paddingTop),paddingEnd:qp(o.paddingBottom)}})}})}),[FY,cO]=nO(Ka),uO=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,m=Mn(Ka,r),[v,p]=g.useState(null),x=pt(t,k=>p(k)),w=g.useRef(null),y=g.useRef(""),b=m.viewport,N=n.content-n.viewport,C=dr(d),_=dr(c),j=h0(f,10);function S(k){if(w.current){const D=k.clientX-w.current.left,M=k.clientY-w.current.top;u({x:D,y:M})}}return g.useEffect(()=>{const k=D=>{const M=D.target;(v==null?void 0:v.contains(M))&&C(D,N)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[b,v,N,C]),g.useEffect(_,[n,_]),Fu(v,j),Fu(m.content,j),s.jsx(FY,{scope:r,scrollbar:v,hasThumb:a,onThumbChange:dr(i),onThumbPointerUp:dr(o),onThumbPositionChange:_,onThumbPointerDown:dr(l),children:s.jsx(ze.div,{...h,ref:x,style:{position:"absolute",...h.style},onPointerDown:ke(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),w.current=v.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),S(k))}),onPointerMove:ke(e.onPointerMove,S),onPointerUp:ke(e.onPointerUp,k=>{const D=k.target;D.hasPointerCapture(k.pointerId)&&D.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=y.current,m.viewport&&(m.viewport.style.scrollBehavior=""),w.current=null})})})}),$p="ScrollAreaThumb",dO=g.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=cO($p,e.__scopeScrollArea);return s.jsx(Xr,{present:r||a.hasThumb,children:s.jsx(LY,{ref:t,...n})})}),LY=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...a}=e,i=Mn($p,r),o=cO($p,r),{onThumbPositionChange:l}=o,c=pt(t,f=>o.onThumbChange(f)),u=g.useRef(void 0),d=h0(()=>{u.current&&(u.current(),u.current=void 0)},100);return g.useEffect(()=>{const f=i.viewport;if(f){const h=()=>{if(d(),!u.current){const m=UY(f,l);u.current=m,l()}};return l(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[i.viewport,d,l]),s.jsx(ze.div,{"data-state":o.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ke(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),v=f.clientX-m.left,p=f.clientY-m.top;o.onThumbPointerDown({x:v,y:p})}),onPointerUp:ke(e.onPointerUp,o.onThumbPointerUp)})});dO.displayName=$p;var _w="ScrollAreaCorner",fO=g.forwardRef((e,t)=>{const r=Mn(_w,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?s.jsx(MY,{...e,ref:t}):null});fO.displayName=_w;var MY=g.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,a=Mn(_w,r),[i,o]=g.useState(0),[l,c]=g.useState(0),u=!!(i&&l);return Fu(a.scrollbarX,()=>{var f;const d=((f=a.scrollbarX)==null?void 0:f.offsetHeight)||0;a.onCornerHeightChange(d),c(d)}),Fu(a.scrollbarY,()=>{var f;const d=((f=a.scrollbarY)==null?void 0:f.offsetWidth)||0;a.onCornerWidthChange(d),o(d)}),u?s.jsx(ze.div,{...n,ref:t,style:{width:i,height:l,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function qp(e){return e?parseInt(e,10):0}function hO(e,t){const r=e/t;return isNaN(r)?0:r}function f0(e){const t=hO(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function BY(e,t,r,n="ltr"){const a=f0(r),i=a/2,o=t||i,l=a-o,c=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-l,d=r.content-r.viewport,f=n==="ltr"?[0,d]:[d*-1,0];return mO([c,u],f)(e)}function b_(e,t,r="ltr"){const n=f0(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,o=t.content-t.viewport,l=i-n,c=r==="ltr"?[0,o]:[o*-1,0],u=A1(e,c);return mO([0,o],[0,l])(u)}function mO(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function pO(e,t){return e>0&&e<t}var UY=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function a(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,l=r.top!==i.top;(o||l)&&t(),r=i,n=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(n)};function h0(e,t){const r=dr(e),n=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(n.current),[]),g.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Fu(e,t){const r=dr(t);fr(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}var xO=aO,$Y=oO,qY=fO;const Ah=g.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(xO,{ref:n,className:Pe("relative overflow-hidden",e),...r,children:[s.jsx($Y,{className:"h-full w-full rounded-[inherit]",children:t}),s.jsx(gO,{}),s.jsx(qY,{})]}));Ah.displayName=xO.displayName;const gO=g.forwardRef(({className:e,orientation:t="vertical",...r},n)=>s.jsx(jw,{ref:n,orientation:t,className:Pe("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:s.jsx(dO,{className:"relative flex-1 rounded-full bg-border"})}));gO.displayName=jw.displayName;var Cw="Progress",Sw=100,[zY]=Yr(Cw),[VY,HY]=zY(Cw),vO=g.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:a,getValueLabel:i=WY,...o}=e;(a||a===0)&&!w_(a)&&console.error(GY(`${a}`,"Progress"));const l=w_(a)?a:Sw;n!==null&&!j_(n,l)&&console.error(KY(`${n}`,"Progress"));const c=j_(n,l)?n:null,u=zp(c)?i(c,l):void 0;return s.jsx(VY,{scope:r,value:c,max:l,children:s.jsx(ze.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":zp(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":wO(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});vO.displayName=Cw;var yO="ProgressIndicator",bO=g.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,a=HY(yO,r);return s.jsx(ze.div,{"data-state":wO(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});bO.displayName=yO;function WY(e,t){return`${Math.round(e/t*100)}%`}function wO(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function zp(e){return typeof e=="number"}function w_(e){return zp(e)&&!isNaN(e)&&e>0}function j_(e,t){return zp(e)&&!isNaN(e)&&e<=t&&e>=0}function GY(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Sw}\`.`}function KY(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${Sw} if no \`max\` prop is set)
  - \`null\` or \`undefined\` if the progress is indeterminate.

Defaulting to \`null\`.`}var jO=vO,YY=bO;const Ew=g.forwardRef(({className:e,value:t,...r},n)=>s.jsx(jO,{ref:n,className:Pe("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:s.jsx(YY,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ew.displayName=jO.displayName;function XY(){const[e,t]=g.useState(!1),[r,n]=g.useState(null),[a,i]=g.useState(""),[o,l]=g.useState(!1),[c,u]=g.useState([]),[d,f]=g.useState(!1),[h,m]=g.useState(!1),[v,p]=g.useState(!1),[x,w]=g.useState({sent:0,remaining:0,total:0}),[y,b]=g.useState(!1),[N,C]=g.useState({current:0,total:0}),[_,j]=g.useState(!1),[S,k]=g.useState("all"),[D,M]=g.useState(""),[T,A]=g.useState(null),[W,P]=g.useState([]);g.useEffect(()=>{h&&Q()},[h,S]),g.useEffect(()=>{Z(),V()},[]),g.useEffect(()=>{Z()},[S]);const V=async()=>{try{const{data:E}=await be.from("email_subscribers").select("list_name").not("list_name","is",null);if(E){const B=[...new Set(E.map(ee=>ee.list_name))].filter(Boolean);P(B)}}catch(E){console.error("Fetch lists error:",E)}},Z=async()=>{try{const E=be.from("email_subscribers").select("*",{count:"exact",head:!0});S&&S!=="all"&&E.eq("list_name",S);const{count:B}=await E,ee=be.from("email_subscribers").select("*",{count:"exact",head:!0}).not("last_email_sent_at","is",null);S&&S!=="all"&&ee.eq("list_name",S);const{count:J}=await ee;w({total:B||0,sent:J||0,remaining:(B||0)-(J||0)})}catch(E){console.error("Stats error:",E)}},Q=async()=>{f(!0);try{const E=be.from("email_subscribers").select("*").order("created_at",{ascending:!1});S&&S!=="all"&&E.eq("list_name",S);const{data:B,error:ee}=await E;if(ee)throw ee;u(B||[])}catch(E){console.error("Fetch error:",E),fe.error("Erreur lors de la récupération des abonnés")}finally{f(!1)}},O=async()=>{if(!T){fe.error("Veuillez sélectionner un fichier CSV");return}if(!D.trim()){fe.error("Veuillez entrer un nom pour la liste");return}t(!0),n(null);try{const B=(await T.text()).split(`
`),ee=B[0].split(",").map(Ne=>Ne.replace(/"/g,"").trim()),J=ee.findIndex(Ne=>Ne.toLowerCase().includes("mail")||Ne.toLowerCase()==="email"),K=ee.findIndex(Ne=>Ne.toLowerCase().includes("prénom")||Ne.toLowerCase().includes("prenom")||Ne.toLowerCase()==="votre prénom"),ae=ee.findIndex(Ne=>Ne.toLowerCase().includes("nom")&&!Ne.toLowerCase().includes("prénom")),te=ee.indexOf("display_name"),xe=ee.findIndex(Ne=>Ne.toLowerCase().includes("phone")||Ne.toLowerCase().includes("téléphone")||Ne.toLowerCase().includes("telephone")||Ne.toLowerCase().includes("tel")||Ne.toLowerCase().includes("mobile")||Ne.toLowerCase().includes("billing_phone"));if(J===-1){fe.error("Colonne email introuvable dans le CSV");return}const F=Ne=>{if(!Ne)return null;let ge=Ne.replace(/\D/g,"");return ge?(ge.startsWith("0")&&ge.length===10&&(ge="33"+ge.substring(1)),!ge.startsWith("33")&&ge.length===9&&(ge="33"+ge),"+"+ge):null};let We=0,je=0;const Oe=50;console.log("Headers found:",ee),console.log("Email column index:",J),console.log("First name index:",K),console.log("Last name index:",ae),console.log("Phone column index:",xe);for(let Ne=1;Ne<B.length;Ne+=Oe){const Me=B.slice(Ne,Ne+Oe).filter(re=>re.trim()).map(re=>{var ye,Te;const ce=((ye=re.match(/(".*?"|[^",]+)(?=\s*,|\s*$)/g))==null?void 0:ye.map(Ze=>Ze.replace(/^"|"$/g,"").trim()))||[];let _e=null;if(te>=0)_e=ce[te];else if(K>=0||ae>=0){const Ze=K>=0?ce[K]:"",ot=ae>=0?ce[ae]:"";_e=`${Ze} ${ot}`.trim()||null}const we=xe>=0?F(ce[xe]):null;return{email:(Te=ce[J])==null?void 0:Te.toLowerCase().trim(),display_name:_e,phone:we,list_name:D.trim(),source:`csv_import_${D.trim()}`}}).filter(re=>re.email&&re.email.includes("@")),{data:Xe,error:G}=await be.from("email_subscribers").upsert(Me,{onConflict:"email",ignoreDuplicates:!0}).select();G?(console.error("Batch error:",G),je+=Me.length):(We+=(Xe==null?void 0:Xe.length)||0,je+=Me.length-((Xe==null?void 0:Xe.length)||0))}n({total:B.length-1,imported:We,skipped:je}),fe.success(`Import terminé : ${We} emails importés dans la liste "${D}", ${je} ignorés`),A(null),M(""),V(),Z()}catch(E){console.error("Import error:",E),fe.error("Erreur lors de l'import du CSV")}finally{t(!1)}},ne=async()=>{if(!a||!a.includes("@")){fe.error("Veuillez entrer une adresse email valide");return}l(!0);try{const{error:E}=await be.functions.invoke("send-blackfriday-email",{body:{to:[a],isTest:!0}});if(E)throw E;fe.success(`Email de test envoyé à ${a}`),i("")}catch(E){console.error("Test email error:",E),fe.error("Erreur lors de l'envoi de l'email de test")}finally{l(!1)}},he=async()=>{const E=S&&S!=="all"?` de la liste "${S}"`:"";if(!confirm(`⚠️ Cela va réinitialiser le statut d'envoi de tous les abonnés${E}. Continuer ?`))return;j(!0);const B=fe.loading("Réinitialisation en cours...");try{const ee=be.from("email_subscribers").update({last_email_sent_at:null}).not("email","is",null);S&&S!=="all"&&ee.eq("list_name",S);const{error:J}=await ee;if(J)throw J;await Z(),h&&await Q(),fe.dismiss(B),fe.success("✅ Tous les statuts ont été réinitialisés")}catch(ee){console.error("Reset error:",ee),fe.dismiss(B),fe.error("Erreur lors de la réinitialisation")}finally{j(!1)}},I=async E=>{var J;const B=(J=E.target.files)==null?void 0:J[0];if(!B)return;p(!0);const ee=fe.loading("Synchronisation en cours...");try{const ae=(await B.text()).split(`
`),xe=ae[0].split(",").map(Ne=>Ne.trim().toLowerCase()).indexOf("to");if(xe===-1){fe.error("Colonne 'to' introuvable dans le CSV");return}const F=ae.slice(1).filter(Ne=>Ne.trim()).map(Ne=>{var Me;return(Me=Ne.split(",")[xe])==null?void 0:Me.trim().toLowerCase()}).filter(Ne=>Ne&&Ne.includes("@"));console.log(`Found ${F.length} emails in CSV`);const We=be.from("email_subscribers").update({last_email_sent_at:new Date().toISOString()}).in("email",F);S&&S!=="all"&&We.eq("list_name",S);const{data:je,error:Oe}=await We.select();if(Oe)throw Oe;await Z(),h&&await Q(),fe.dismiss(ee),fe.success(`✅ ${(je==null?void 0:je.length)||0} emails synchronisés avec Resend`)}catch(K){console.error("Sync error:",K),fe.dismiss(ee),fe.error("Erreur lors de la synchronisation")}finally{p(!1),E.target.value=""}},Y=async()=>{const E=S&&S!=="all"?` de la liste "${S}"`:"";if(!confirm(`⚠️ Envoyer l'email à ${x.remaining} abonnés restants${E} ?`))return;b(!0);const B=fe.loading("Envoi des emails en cours...");try{const ee=be.from("email_subscribers").select("id, email").is("last_email_sent_at",null);S&&S!=="all"&&ee.eq("list_name",S);const{data:J,error:K}=await ee;if(K)throw K;if(!J||J.length===0){fe.error("Aucun email restant à envoyer");return}C({current:0,total:J.length});let ae=0,te=0;for(let xe=0;xe<J.length;xe++){const F=J[xe];try{const{error:We}=await be.functions.invoke("send-blackfriday-email",{body:{to:[F.email],isTest:!1}});We?(console.error(`Error sending to ${F.email}:`,We),te++):(await be.from("email_subscribers").update({last_email_sent_at:new Date().toISOString()}).eq("email",F.email),ae++)}catch(We){console.error(`Exception for ${F.email}:`,We),te++}C({current:xe+1,total:J.length}),xe<J.length-1&&await new Promise(We=>setTimeout(We,500))}await Z(),h&&await Q(),fe.dismiss(B),fe.success(`✅ Envoi terminé : ${ae} réussis, ${te} échecs`)}catch(ee){console.error("Send error:",ee),fe.dismiss(B),fe.error("Erreur lors de l'envoi des emails")}finally{b(!1),C({current:0,total:0})}};return s.jsx(Ur,{children:s.jsx("div",{className:"min-h-screen bg-background p-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[s.jsxs("div",{className:"mb-2",children:[s.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Gestion des Abonnés"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Gérez vos listes d'abonnés email"})]}),s.jsxs(ve,{className:"p-6 space-y-4 bg-gradient-to-br from-primary/10 to-primary/5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(X8,{className:"w-5 h-5"}),s.jsx("h2",{className:"text-xl font-semibold",children:"Filtrer par liste"})]}),s.jsxs(mi,{value:S,onValueChange:k,children:[s.jsx($a,{children:s.jsx(pi,{placeholder:"Sélectionner une liste"})}),s.jsxs(qa,{children:[s.jsx(yt,{value:"all",children:"📊 Toutes les listes"}),W.map(E=>s.jsxs(yt,{value:E,children:["📋 ",E]},E))]})]})]}),s.jsxs(ve,{className:"p-6 space-y-4 border-2 border-primary/30",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nc,{className:"w-5 h-5 text-primary"}),s.jsx("h2",{className:"text-xl font-semibold",children:"Importer une nouvelle liste CSV"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Importez un fichier CSV avec vos abonnés. Les colonnes email, prénom, nom et téléphone seront détectées automatiquement. Les numéros seront formatés au format international (+33)."}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(wt,{htmlFor:"list-name",children:"Nom de la liste"}),s.jsx(lt,{id:"list-name",type:"text",value:D,onChange:E=>M(E.target.value),placeholder:"Ex: formulaires_contact, pharmacies, etc.",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(wt,{htmlFor:"csv-file",children:"Fichier CSV"}),s.jsx(lt,{id:"csv-file",type:"file",accept:".csv",onChange:E=>{var B;return A(((B=E.target.files)==null?void 0:B[0])||null)},className:"mt-1"})]}),s.jsx(se,{onClick:O,disabled:e||!T||!D,size:"lg",className:"w-full",children:e?"Import en cours...":"Importer dans une nouvelle liste"})]})]}),r&&s.jsxs(ve,{className:"p-6 bg-primary/5",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"Résultats de l'import"}),s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("p",{children:["✅ Importés : ",s.jsx("span",{className:"font-bold",children:r.imported})]}),s.jsxs("p",{children:["⏭️ Ignorés (doublons) : ",s.jsx("span",{className:"font-bold",children:r.skipped})]}),s.jsxs("p",{children:["📊 Total traité : ",s.jsx("span",{className:"font-bold",children:r.total})]})]})]}),s.jsxs(ve,{className:"p-6 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xa,{className:"w-5 h-5"}),s.jsx("h2",{className:"text-xl font-semibold",children:"Test d'envoi"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Envoyer un email de test à une adresse spécifique pour vérifier le contenu."}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(lt,{type:"email",value:a,onChange:E=>i(E.target.value),placeholder:"email@exemple.fr",className:"flex-1"}),s.jsx(se,{onClick:ne,disabled:o,size:"lg",children:o?"Envoi...":"Envoyer le test"})]})]}),s.jsxs(ve,{className:"p-6 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Us,{className:"w-5 h-5"}),s.jsx("h2",{className:"text-xl font-semibold",children:"Liste des abonnés"})]}),s.jsxs(se,{onClick:()=>m(!h),variant:"outline",children:[h?"Masquer":"Afficher"," (",c.length||"...",")"]})]}),h&&s.jsx("div",{className:"space-y-4",children:d?s.jsx("p",{className:"text-muted-foreground text-center py-4",children:"Chargement..."}):c.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-4",children:"Aucun abonné trouvé dans cette liste."}):s.jsx(Ah,{className:"h-[400px] rounded-md border",children:s.jsxs(Pi,{children:[s.jsx(Ii,{children:s.jsxs(nr,{children:[s.jsx(nt,{children:"Email"}),s.jsx(nt,{children:"Nom"}),s.jsx(nt,{children:"Téléphone"}),s.jsx(nt,{children:"Liste"}),s.jsx(nt,{children:"Date d'import"}),s.jsx(nt,{children:"Dernier email"})]})}),s.jsx(Fi,{children:c.map(E=>s.jsxs(nr,{children:[s.jsx(Be,{className:"font-medium",children:E.email}),s.jsx(Be,{children:E.display_name||"-"}),s.jsx(Be,{children:E.phone||"-"}),s.jsx(Be,{children:s.jsx("span",{className:"text-xs bg-primary/10 px-2 py-1 rounded",children:E.list_name||"non définie"})}),s.jsx(Be,{children:new Date(E.imported_at||E.created_at).toLocaleDateString("fr-FR")}),s.jsx(Be,{children:E.last_email_sent_at?new Date(E.last_email_sent_at).toLocaleDateString("fr-FR"):"Jamais"})]},E.id))})]})})})]}),s.jsxs(ve,{className:"p-6 space-y-4 border-2 border-orange-500/20 bg-orange-50/50",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ln,{className:"w-5 h-5 text-orange-600"}),s.jsx("h2",{className:"text-xl font-semibold",children:"⚠️ Réinitialisation & Synchronisation"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"p-4 bg-orange-100 rounded-lg border border-orange-200",children:[s.jsx("p",{className:"text-sm font-semibold text-orange-900 mb-2",children:"Étape 1 : Réinitialiser les statuts"}),s.jsx("p",{className:"text-sm text-orange-800 mb-3",children:S&&S!=="all"?`Réinitialiser les statuts pour la liste "${S}"`:"Réinitialiser les statuts pour toutes les listes"}),s.jsx(se,{onClick:he,disabled:_,variant:"destructive",size:"sm",className:"w-full",children:_?"Réinitialisation...":"Réinitialiser les statuts"})]}),s.jsxs("div",{className:"p-4 bg-primary/5 rounded-lg border border-primary/20",children:[s.jsx("p",{className:"text-sm font-semibold mb-2",children:"Étape 2 : Synchroniser avec Resend"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Uploadez le CSV exporté depuis Resend pour marquer uniquement les emails réellement envoyés."}),s.jsx("input",{type:"file",accept:".csv",onChange:I,disabled:v,className:"block w-full text-sm file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-primary file:text-primary-foreground hover:file:bg-primary/90"}),v&&s.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Synchronisation en cours..."})]})]})]}),s.jsxs(ve,{className:"p-6 space-y-4 bg-gradient-to-br from-primary/5 to-primary/10",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xa,{className:"w-5 h-5 text-primary"}),s.jsxs("h2",{className:"text-xl font-semibold",children:["Statistiques d'envoi",S&&S!=="all"&&s.jsxs("span",{className:"text-sm font-normal text-muted-foreground ml-2",children:["(Liste: ",S,")"]})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 p-4 bg-background rounded-lg",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-2xl font-bold text-primary",children:x.total}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Total abonnés"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-2xl font-bold text-green-600",children:x.sent}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Emails envoyés"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-2xl font-bold text-orange-600",children:x.remaining}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Restants"})]})]})]}),y&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Progression"}),s.jsxs("span",{children:[N.current," / ",N.total]})]}),s.jsx(Ew,{value:N.current/N.total*100}),s.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Envoi de 2 emails par seconde pour respecter les limites du serveur"})]}),s.jsxs(se,{onClick:Y,disabled:y||x.remaining===0,size:"lg",variant:"default",className:"w-full",children:[s.jsx(ku,{className:"w-4 h-4 mr-2"}),y?`Envoi en cours... (${N.current}/${N.total})`:`Envoyer aux ${x.remaining} restants`]})]})]})})})}function QY(){const[e,t]=g.useState(!1),[r,n]=g.useState(null),[a,i]=g.useState(null),[o,l]=g.useState([]),[c,u]=g.useState(!1),[d,f]=g.useState(!1),[h,m]=g.useState({total:0,withPhone:0});g.useEffect(()=>{v()},[]),g.useEffect(()=>{d&&p()},[d]);const v=async()=>{try{const{count:b}=await be.from("email_subscribers").select("*",{count:"exact",head:!0}),{count:N}=await be.from("email_subscribers").select("*",{count:"exact",head:!0}).not("phone","is",null);m({total:b||0,withPhone:N||0})}catch(b){console.error("Stats error:",b)}},p=async()=>{u(!0);try{const{data:b,error:N}=await be.from("email_subscribers").select("*").not("phone","is",null).order("created_at",{ascending:!1});if(N)throw N;l(b||[])}catch(b){console.error("Fetch error:",b),fe.error("Erreur lors de la récupération des contacts")}finally{u(!1)}},x=b=>{if(!b)return null;let N=b.replace(/\D/g,"");return N?(N.startsWith("0")&&N.length===10&&(N="33"+N.substring(1)),N.startsWith("33")&&N.length===11||(!N.startsWith("33")&&N.length===9&&(N="33"+N),N.length>=10)?"+"+N:null):null},w=async()=>{if(!a){fe.error("Veuillez sélectionner un fichier CSV");return}t(!0),n(null);try{const N=(await a.text()).split(`
`),C=N[0].split(",").map(A=>A.replace(/"/g,"").trim().toLowerCase());console.log("Headers found:",C);const _=C.findIndex(A=>A.includes("mail")||A==="email"||A==="user_email"),j=C.findIndex(A=>A.includes("phone")||A.includes("téléphone")||A.includes("telephone")||A.includes("tel")||A.includes("mobile")||A.includes("billing_phone")),S=C.findIndex(A=>A==="display_name"||A.includes("nom")||A.includes("name"));if(console.log("Email index:",_,"Phone index:",j,"Name index:",S),_===-1){fe.error("Colonne email introuvable dans le CSV"),t(!1);return}let k=0,D=0,M=0;const T=100;for(let A=1;A<N.length;A+=T){const P=N.slice(A,A+T).filter(Q=>Q.trim()).map(Q=>{var E,B;const O=((E=Q.match(/(".*?"|[^",]+)(?=\s*,|\s*$)/g))==null?void 0:E.map(ee=>ee.replace(/^"|"$/g,"").trim()))||[],ne=(B=O[_])==null?void 0:B.toLowerCase().trim(),he=j>=0?O[j]:null,I=x(he),Y=S>=0?O[S]:null;return I&&D++,k++,{email:ne,phone:I,display_name:Y,list_name:"sms_contacts",source:"csv_import_sms"}}).filter(Q=>Q.email&&Q.email.includes("@")),{data:V,error:Z}=await be.from("email_subscribers").upsert(P,{onConflict:"email",ignoreDuplicates:!1}).select();Z?console.error("Batch error:",Z):M+=(V==null?void 0:V.length)||0}n({total:k,withPhone:D,imported:M}),fe.success(`Import terminé : ${M} contacts mis à jour, ${D} avec téléphone`),i(null),v(),d&&p()}catch(b){console.error("Import error:",b),fe.error("Erreur lors de l'import du CSV")}finally{t(!1)}},y=()=>{if(o.length===0){fe.error("Aucun contact avec téléphone à exporter");return}const b=`telephone,email,nom
`+o.map(_=>`${_.phone},${_.email},${_.display_name||""}`).join(`
`),N=new Blob([b],{type:"text/csv;charset=utf-8;"}),C=document.createElement("a");C.href=URL.createObjectURL(N),C.download=`contacts_sms_${new Date().toISOString().split("T")[0]}.csv`,C.click(),fe.success(`${o.length} contacts exportés`)};return s.jsx(Ur,{children:s.jsx("div",{className:"min-h-screen bg-background p-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[s.jsxs("div",{className:"mb-2",children:[s.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Import Contacts SMS"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Gérez vos contacts avec numéros de téléphone"})]}),s.jsxs(ve,{className:"p-6 bg-gradient-to-br from-primary/10 to-primary/5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(hi,{className:"w-5 h-5 text-primary"}),s.jsx("h2",{className:"text-xl font-semibold",children:"Statistiques"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"text-center p-4 bg-background rounded-lg",children:[s.jsx("p",{className:"text-3xl font-bold text-primary",children:h.total}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Total contacts"})]}),s.jsxs("div",{className:"text-center p-4 bg-background rounded-lg",children:[s.jsx("p",{className:"text-3xl font-bold text-green-600",children:h.withPhone}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Avec téléphone"})]})]})]}),s.jsxs(ve,{className:"p-6 space-y-4 border-2 border-primary/30",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(nc,{className:"w-5 h-5 text-primary"}),s.jsx("h2",{className:"text-xl font-semibold",children:"Importer un CSV"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Importez un fichier CSV avec les colonnes email et téléphone (billing_phone, phone, mobile, etc.). Les numéros seront automatiquement formatés au format international (+33)."}),s.jsxs("div",{children:[s.jsx(wt,{htmlFor:"csv-file",children:"Fichier CSV"}),s.jsx(lt,{id:"csv-file",type:"file",accept:".csv",onChange:b=>{var N;return i(((N=b.target.files)==null?void 0:N[0])||null)},className:"mt-1"})]}),s.jsx(se,{onClick:w,disabled:e||!a,size:"lg",className:"w-full",children:e?"Import en cours...":"Importer et formater les numéros"}),r&&s.jsxs("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:[s.jsx("p",{className:"font-semibold text-green-800",children:"✅ Import terminé"}),s.jsxs("ul",{className:"text-sm text-green-700 mt-2",children:[s.jsxs("li",{children:["• ",r.total," lignes traitées"]}),s.jsxs("li",{children:["• ",r.withPhone," avec numéro de téléphone"]}),s.jsxs("li",{children:["• ",r.imported," contacts mis à jour"]})]})]})]}),s.jsxs(ve,{className:"p-6 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Us,{className:"w-5 h-5"}),s.jsx("h2",{className:"text-xl font-semibold",children:"Contacts avec téléphone"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(se,{onClick:()=>f(!d),variant:"outline",children:[d?"Masquer":"Afficher"," (",h.withPhone,")"]}),d&&o.length>0&&s.jsx(se,{onClick:y,variant:"secondary",children:"Exporter CSV"})]})]}),d&&s.jsx("div",{className:"space-y-4",children:c?s.jsx("p",{className:"text-muted-foreground text-center py-4",children:"Chargement..."}):o.length===0?s.jsx("p",{className:"text-muted-foreground text-center py-4",children:"Aucun contact avec numéro de téléphone."}):s.jsx(Ah,{className:"h-[400px] rounded-md border",children:s.jsxs(Pi,{children:[s.jsx(Ii,{children:s.jsxs(nr,{children:[s.jsx(nt,{children:"Téléphone"}),s.jsx(nt,{children:"Email"}),s.jsx(nt,{children:"Nom"})]})}),s.jsx(Fi,{children:o.map(b=>s.jsxs(nr,{children:[s.jsx(Be,{className:"font-mono font-medium",children:b.phone}),s.jsx(Be,{children:b.email}),s.jsx(Be,{children:b.display_name||"-"})]},b.id))})]})})})]})]})})})}const JY=e=>Vr({queryKey:["product",e],queryFn:async()=>{const{data:t,error:r}=await be.from("products").select(`
          *,
          product_variants (*)
        `).eq("slug",e).maybeSingle();if(r)throw r;return t},enabled:!!e}),ZY=e=>Vr({queryKey:["products-by-subcategory",e],queryFn:async()=>{if(!e)return[];const{data:t,error:r}=await be.from("products").select(`
          *,
          product_variants (*)
        `).eq("subcategory",e).order("created_at",{ascending:!1});if(r)throw r;return t},enabled:!!e}),eX=({products:e,currentSlug:t})=>{if(e.length<=1)return null;const r=n=>{const a=n.split(" "),i=a.findIndex(o=>o.toLowerCase()==="saveur");return i!==-1?a.slice(i+1).join(" "):a.slice(-2).join(" ")};return s.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>{const a=n.slug===t,i=r(n.name);return s.jsx(pe,{to:`/produit/${n.slug}`,className:`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 border-2 ${a?"bg-primary text-primary-foreground border-primary":"bg-background text-primary border-primary/30 hover:border-primary hover:bg-primary/5"}`,children:i},n.id)})})},tX=({products:e,currentSlug:t})=>{if(e.length<=1)return null;const r=n=>{const a=n.toLowerCase();return a.includes("cheveux clairs")?"Cheveux Clairs":a.includes("cheveux foncés")||a.includes("cheveux fonces")?"Cheveux Foncés":n.split(" ").slice(-2).join(" ")};return s.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(n=>{const a=n.slug===t,i=r(n.name);return s.jsx(pe,{to:`/produit/${n.slug}`,className:`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 border-2 ${a?"bg-primary text-primary-foreground border-primary":"bg-background text-primary border-primary/30 hover:border-primary hover:bg-primary/5"}`,children:i},n.id)})})},rX=({mainImage:e,galleryImages:t=[],productName:r})=>{const n=[e,...t.filter(c=>c!==e)],[a,i]=g.useState(0),o=()=>{i(c=>c===0?n.length-1:c-1)},l=()=>{i(c=>c===n.length-1?0:c+1)};return n.length<=1?s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:e,alt:r,className:"max-h-56 lg:max-h-72 w-auto object-contain"})}):s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("img",{src:n[a],alt:`${r} - Vue ${a+1}`,className:"max-h-56 lg:max-h-72 w-auto object-contain transition-opacity duration-300"})}),s.jsx("button",{onClick:o,className:"absolute left-0 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-primary/10 hover:bg-primary/20 flex items-center justify-center transition-colors","aria-label":"Image précédente",children:s.jsx(Fv,{className:"w-6 h-6 text-primary"})}),s.jsx("button",{onClick:l,className:"absolute right-0 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-primary/10 hover:bg-primary/20 flex items-center justify-center transition-colors","aria-label":"Image suivante",children:s.jsx(Io,{className:"w-6 h-6 text-primary"})}),s.jsx("div",{className:"flex justify-center gap-2",children:n.map((c,u)=>s.jsx("button",{onClick:()=>i(u),className:`w-3 h-3 rounded-full transition-all duration-200 ${u===a?"bg-primary scale-110":"bg-primary/30 hover:bg-primary/50"}`,"aria-label":`Voir image ${u+1}`},u))})]})},sX={"Capsules CBD":"capsules-cbd",Capsules:"capsules-cbd","Huiles CBD":"huiles-cbd","Huile CBD":"huiles-cbd",Huile:"huiles-cbd","Granules CBD":"granules-cbd",Granules:"granules-cbd","Gummies CBD":"gummies-cbd",Gummies:"gummies-cbd","Spray CBD":"sprays-cbd",Sprays:"sprays-cbd",Cosmétique:"shampoings-secs-cbd","Cosmétiques CBD":"shampoings-secs-cbd"},nX=e=>({"Capsules CBD":"Capsules CBD",Capsules:"Capsules CBD","Huiles CBD":"Huiles CBD","Huile CBD":"Huiles CBD",Huile:"Huiles CBD","Granules CBD":"Granules CBD",Granules:"Granules CBD","Gummies CBD":"Gummies CBD",Gummies:"Gummies CBD","Spray CBD":"Sprays CBD",Sprays:"Sprays CBD",Cosmétique:"Cosmétiques CBD","Cosmétiques CBD":"Cosmétiques CBD"})[e]||e,aX=({category:e,productName:t})=>{const r=sX[e]||"produits",n=nX(e);return s.jsx("nav",{"aria-label":"Fil d'Ariane",className:"mb-6",children:s.jsxs("ol",{className:"flex items-center flex-wrap gap-1 text-sm text-muted-foreground",children:[s.jsx("li",{className:"flex items-center",children:s.jsxs(pe,{to:"/",className:"hover:text-primary transition-colors flex items-center gap-1",children:[s.jsx(Ul,{className:"w-4 h-4"}),s.jsx("span",{className:"sr-only",children:"Accueil"})]})}),s.jsxs("li",{className:"flex items-center",children:[s.jsx(Io,{className:"w-4 h-4 mx-1"}),s.jsx(pe,{to:`/produits/${r}`,className:"hover:text-primary transition-colors",children:n})]}),s.jsxs("li",{className:"flex items-center",children:[s.jsx(Io,{className:"w-4 h-4 mx-1"}),s.jsx("span",{className:"text-foreground font-medium truncate max-w-[200px] lg:max-w-none",children:t})]})]})})},iX=({product:e})=>(g.useEffect(()=>{var p,x,w,y,b;const t=document.querySelector("script[data-product-jsonld]");if(t&&t.remove(),!e)return;const r=e.product_variants||[];let n=1/0,a=0;r.forEach(N=>{const C=N.price/(N.quantity||1);C<n&&(n=C),C>a&&(a=C)}),r.length===0&&(n=0,a=0),r.length===1&&(((x=(p=r[0])==null?void 0:p.name)==null?void 0:x.toLowerCase().includes("acheté"))||((y=(w=r[0])==null?void 0:w.name)==null?void 0:y.toLowerCase().includes("offert")))&&r[0]&&(n=r[0].price/2,a=r[0].price/2);const o=`https://www.notocbd.com/produit/${e.slug}`,l=(b=e.image_url)!=null&&b.startsWith("http")?e.image_url:`https://www.notocbd.com${e.image_url}`,c=e.stock_status==="instock"?"https://schema.org/InStock":"https://schema.org/OutOfStock",d=Math.abs(n-a)>.01&&r.length>1?{"@type":"AggregateOffer",lowPrice:n.toFixed(2),highPrice:a.toFixed(2),priceCurrency:"EUR",availability:c,offerCount:r.length,url:o}:{"@type":"Offer",price:n.toFixed(2),priceCurrency:"EUR",availability:c,url:o,seller:{"@type":"Organization",name:"NŌTO CBD"}},f=[];e.vegan&&f.push({"@type":"PropertyValue",name:"Vegan",value:"Oui"}),e.made_in_france&&f.push({"@type":"PropertyValue",name:"Fabriqué en France",value:"Oui"}),e.sugar_free&&f.push({"@type":"PropertyValue",name:"Sans sucre",value:"Oui"}),e.natural_aromas&&f.push({"@type":"PropertyValue",name:"Arômes naturels",value:"Oui"});let h="CBD Products";e.category&&(h={"huiles-cbd":"Huile CBD","gummies-cbd":"Gummies CBD","granules-cbd":"Granulés CBD","capsules-cbd":"Capsules CBD","sprays-cbd":"Sprays CBD",cosmetique:"Cosmétique CBD","shampoing-sec-cbd":"Shampoing Sec CBD"}[e.category]||e.category);const m={"@context":"https://schema.org","@type":"Product",name:e.name,description:e.short_description||e.description||`${e.name} - Produit CBD de qualité française par NŌTO`,image:l,url:o,sku:e.slug,brand:{"@type":"Brand",name:"NŌTO CBD"},manufacturer:{"@type":"Organization",name:"NŌTO",url:"https://www.notocbd.com"},category:h,offers:d,...f.length>0&&{additionalProperty:f}},v=document.createElement("script");return v.type="application/ld+json",v.setAttribute("data-product-jsonld","true"),v.textContent=JSON.stringify(m,null,0),document.head.appendChild(v),()=>{const N=document.querySelector("script[data-product-jsonld]");N&&N.remove()}},[e]),null),N_="https://www.notocbd.com",Vt=({items:e})=>(g.useEffect(()=>{const t=document.querySelector("script[data-breadcrumb-jsonld]");if(t&&t.remove(),!e||e.length===0)return;const n={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:N_},...e.map((i,o)=>({"@type":"ListItem",position:o+2,name:i.name,item:`${N_}${i.url}`}))]},a=document.createElement("script");return a.type="application/ld+json",a.setAttribute("data-breadcrumb-jsonld","true"),a.textContent=JSON.stringify(n,null,0),document.head.appendChild(a),()=>{const i=document.querySelector("script[data-breadcrumb-jsonld]");i&&i.remove()}},[e]),null),oX="https://www.notocbd.com",gn=({items:e,pageUrl:t})=>(g.useEffect(()=>{const r=document.querySelector("script[data-faq-jsonld]");r&&r.remove();const n=e.filter(o=>(o==null?void 0:o.question)&&(o==null?void 0:o.answer));if(n.length===0)return;const a={"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(o=>({"@type":"Question",name:o.question,acceptedAnswer:{"@type":"Answer",text:(o.answer||"").replace(/\n/g," ").trim()}})),...t&&{url:`${oX}${t}`}},i=document.createElement("script");return i.type="application/ld+json",i.setAttribute("data-faq-jsonld","true"),i.textContent=JSON.stringify(a),document.head.appendChild(i),()=>{i.remove()}},[e,t]),null);function __({className:e,...t}){return s.jsx("div",{className:Pe("animate-pulse rounded-md bg-muted",e),...t})}const lX=()=>{var y,b,N,C;const{slug:e}=Ux();wa();const{data:t,isLoading:r}=JY(e||""),{data:n=[]}=ZY(t==null?void 0:t.subcategory),{addItem:a}=sd(),{toast:i}=Yy(),[o,l]=g.useState(1),[c,u]=g.useState(0),d=[...(t==null?void 0:t.product_variants)||[]].sort((_,j)=>_.sort_order-j.sort_order),h=!(d.length===1&&(((b=(y=d[0])==null?void 0:y.name)==null?void 0:b.toLowerCase().includes("acheté"))||((C=(N=d[0])==null?void 0:N.name)==null?void 0:C.toLowerCase().includes("offert"))))&&d.length>=1;g.useEffect(()=>{window.scrollTo(0,0)},[e]),g.useEffect(()=>{if(!t)return;const _=`${t.name} | Acheter CBD NŌTO`;document.title=_.length>60?`${t.name} | NŌTO CBD`:_;const S=(T=>{let A=document.querySelector(`meta[name="${T}"]`);return A||(A=document.createElement("meta"),A.setAttribute("name",T),document.head.appendChild(A)),A})("description"),k=t.short_description||"Produit CBD NŌTO de qualité française",D=k.length>155?k.substring(0,155)+"...":k;S.setAttribute("content",D);let M=document.querySelector('link[rel="canonical"]');M||(M=document.createElement("link"),M.setAttribute("rel","canonical"),document.head.appendChild(M)),M.setAttribute("href",`https://www.notocbd.com/produit/${t.slug}`)},[t]);const m=_=>{const j=document.getElementById(_);j&&j.scrollIntoView({behavior:"smooth",block:"start"})};if(r)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx("main",{className:"container mx-auto px-4 py-8",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[s.jsx(__,{className:"h-96"}),s.jsx(__,{className:"h-96"})]})}),s.jsx(it,{})]});if(!t)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx("main",{className:"container mx-auto px-4 py-8",children:s.jsx("h1",{className:"text-2xl font-bold",children:"Produit non trouvé"})}),s.jsx(it,{})]});const v=[...t.product_variants||[]].sort((_,j)=>_.sort_order-j.sort_order),p=v[c]||v[0],x=()=>{if(!(!t||!p))if(h){const _=p.quantity;a({productId:t.id,productName:t.name,productSlug:e||"",imageUrl:t.image_url||"",variantId:p.id,variantName:p.name,quantity:1,price:p.price,packQuantity:1,productsPerPack:_,paymentType:"euro"}),i({title:"Produit ajouté au panier",description:`${p.name} de ${t.name} ajouté au panier`})}else a({productId:t.id,productName:t.name,productSlug:e||"",imageUrl:t.image_url||"",variantId:p.id,variantName:"1 acheté = 1 offert",quantity:o,price:p.price,packQuantity:1,productsPerPack:2,paymentType:"euro"}),i({title:"Produit ajouté au panier",description:`${o} pack${o>1?"s":""} de ${t.name} ajouté${o>1?"s":""} au panier`})},w=[{icon:ss,label:"VEGAN",show:t.vegan},{icon:Yu,label:"Marque Française",show:t.made_in_france},{icon:Ku,label:"Arômes Naturels",show:t.natural_aromas},{icon:Eu,label:"Sans Sucre Ajouté",show:t.sugar_free}].filter(_=>_.show);return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(iX,{product:t}),s.jsx(Vt,{items:[{name:"Produits",url:"/produits"},{name:t.category.split("-").map(_=>_.charAt(0).toUpperCase()+_.slice(1)).join(" "),url:`/produits/${t.category}`},{name:t.name,url:`/produit/${t.slug}`}]}),t.faq_content&&Array.isArray(t.faq_content)&&s.jsx(gn,{items:t.faq_content.map(_=>({question:_.question,answer:_.answer})),pageUrl:`/produit/${t.slug}`}),s.jsxs("main",{children:[s.jsxs("section",{className:"container mx-auto px-4 py-6 lg:py-12",children:[s.jsx(aX,{category:t.category,productName:t.name}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-16",children:[s.jsx("div",{className:"order-1 lg:order-2",children:s.jsxs(ve,{className:"p-5 lg:p-8 border-2 border-primary/20 shadow-xl",children:[s.jsx("div",{className:"text-center mb-6",children:s.jsx("span",{className:"text-2xl font-bold tracking-widest text-primary",children:"NŌTO"})}),s.jsx("div",{className:"mb-6",children:s.jsx(rX,{mainImage:t.image_url||"",galleryImages:t.gallery_urls||[],productName:t.name})}),h?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-3 gap-3 mb-6",children:v.map((_,j)=>{var M;const S=((M=v.find(T=>T.quantity===1))==null?void 0:M.price)||_.price,k=_.quantity>1?_.price/_.quantity:null,D=k?Math.round((1-k/S)*100):0;return s.jsxs("button",{onClick:()=>u(j),className:`p-4 rounded-xl border-2 transition-all duration-200 relative ${c===j?"border-primary bg-primary text-primary-foreground":"border-border hover:border-primary/50"}`,children:[D>0&&s.jsxs("span",{className:`absolute -top-2 -right-2 px-2 py-0.5 rounded-full text-xs font-bold ${c===j?"bg-primary-foreground text-primary":"bg-green-500 text-white"}`,children:["-",D,"%"]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:`font-semibold ${c===j?"text-primary-foreground":"text-foreground"}`,children:_.name}),s.jsxs("p",{className:`text-lg font-bold ${c===j?"text-primary-foreground":"text-primary"}`,children:[_.price.toFixed(2),"€"]}),k&&s.jsxs("p",{className:`text-xs mt-1 ${c===j?"text-primary-foreground/80":"text-muted-foreground"}`,children:["soit ",k.toFixed(2),"€/unité"]})]})]},_.id)})}),s.jsx(se,{className:"w-full h-14 text-lg font-semibold rounded-full",size:"lg",onClick:x,children:"Ajouter au panier"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"bg-primary rounded-2xl p-6 mb-6 shadow-lg",children:[s.jsx("p",{className:"text-primary-foreground text-center text-lg font-medium mb-2",children:"1 acheté = 1 offert"}),s.jsx("p",{className:"text-primary-foreground text-center text-3xl font-bold",children:v[0]?`${v[0].price.toFixed(2)}€`:""}),v[0]&&s.jsxs("p",{className:"text-primary-foreground/80 text-center text-sm mt-2",children:["soit ",(v[0].price/2).toFixed(2),"€/unité"]})]}),s.jsxs("div",{className:"flex items-center justify-center gap-4 mb-6",children:[s.jsx("button",{onClick:()=>l(Math.max(1,o-1)),className:"w-10 h-10 rounded-full border-2 border-primary/30 hover:border-primary hover:bg-primary/10 flex items-center justify-center transition-all duration-200 disabled:opacity-50",disabled:o<=1,children:s.jsx(Np,{className:"w-4 h-4 text-primary"})}),s.jsxs("div",{className:"flex flex-col items-center min-w-[80px]",children:[s.jsx("span",{className:"text-2xl font-bold text-primary",children:o}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["= ",o*2," produits"]})]}),s.jsx("button",{onClick:()=>l(o+1),className:"w-10 h-10 rounded-full border-2 border-primary/30 hover:border-primary hover:bg-primary/10 flex items-center justify-center transition-all duration-200",children:s.jsx($l,{className:"w-4 h-4 text-primary"})})]}),o>1&&v[0]&&s.jsx("div",{className:"text-center mb-4",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Total : ",s.jsxs("span",{className:"font-bold text-primary",children:[(v[0].price*o).toFixed(2),"€"]})]})}),s.jsx(se,{className:"w-full h-14 text-lg font-semibold rounded-full",size:"lg",onClick:x,children:"Ajouter au panier"})]})]})}),s.jsxs("div",{className:"order-2 lg:order-1",children:[t.subcategory&&s.jsx(Je,{variant:"outline",className:"mb-4 px-4 py-1.5 text-sm font-semibold border-primary text-primary bg-primary/5",children:t.subcategory}),s.jsx("h1",{className:"text-2xl lg:text-4xl xl:text-5xl font-bold text-primary leading-tight mb-4",children:t.name}),n.length>1&&s.jsx("div",{className:"mb-6",children:t.category.toLowerCase()==="cosmétique"?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Choisissez votre type de cheveux :"}),s.jsx(tX,{products:n,currentSlug:e||""})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Choisissez votre saveur :"}),s.jsx(eX,{products:n,currentSlug:e||""})]})}),s.jsxs("div",{className:"text-foreground leading-relaxed text-justify space-y-4 mb-8",children:[s.jsx("p",{children:t.short_description}),t.description&&t.description.split(`

`).map((_,j)=>s.jsx("p",{children:_},j))]}),s.jsx("div",{className:"grid grid-cols-2 lg:flex lg:flex-wrap items-center gap-6 lg:gap-12",children:w.map((_,j)=>s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx(_.icon,{className:"w-8 h-8 lg:w-10 lg:h-10 text-primary mb-2",strokeWidth:1.5}),s.jsx("span",{className:"text-xs lg:text-sm font-medium text-primary",children:_.label})]},j))})]})]})]}),s.jsx("section",{className:"container mx-auto px-4 mb-6 lg:mb-8",children:s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsx("button",{onClick:()=>m("ingredients"),className:"py-3 lg:py-4 px-2 lg:px-4 text-center font-bold text-xs lg:text-base bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:t.category.toLowerCase().includes("gummies")||t.category.toLowerCase().startsWith("capsules")||t.category.toLowerCase().includes("granules")?"PRINCIPES ACTIFS":t.category.toLowerCase()==="cosmétique"?"INGRÉDIENTS ACTIFS":"INGRÉDIENTS"}),s.jsx("button",{onClick:()=>m("conseils"),className:"py-3 lg:py-4 px-2 lg:px-4 text-center font-bold text-xs lg:text-base bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"CONSEILS"}),s.jsx("button",{onClick:()=>m("faq"),className:"py-3 lg:py-4 px-2 lg:px-4 text-center font-bold text-xs lg:text-base bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors",children:"FAQ"})]})}),s.jsxs("section",{id:"ingredients",className:"mb-12 scroll-mt-4",children:[s.jsx("div",{className:"bg-primary py-4 mb-8",children:s.jsx("h2",{className:"text-2xl lg:text-3xl font-bold text-primary-foreground text-center tracking-wide",children:t.category.toLowerCase().includes("gummies")||t.category.toLowerCase().startsWith("capsules")||t.category.toLowerCase().includes("granules")?"LES PRINCIPES ACTIFS":t.category.toLowerCase()==="cosmétique"?"NOS INGRÉDIENTS ACTIFS":"NOS INGRÉDIENTS"})}),s.jsx("div",{className:"container mx-auto px-4",children:t.category.toLowerCase().includes("gummies")?s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-8 mb-8",children:[t.gallery_urls&&t.gallery_urls[0]&&s.jsx("img",{src:t.gallery_urls[0],alt:"CBD Isolate",className:"w-48 h-auto"}),s.jsxs("p",{className:"text-foreground text-lg leading-relaxed",children:["Notre isolat de CBD, ",s.jsx("strong",{children:"Optima CBD XN®"})," de Spectrums Europe, est un ingrédient de qualité supérieure, avec une pureté proche de 100 %, extrait de chanvre cultivé selon des normes rigoureuses."]})]}),t.ingredients&&s.jsxs("p",{className:"text-center text-muted-foreground",children:[s.jsx("span",{className:"font-semibold",children:"Ingrédients :"})," ",t.ingredients]})]}):t.category.toLowerCase().startsWith("capsules")?s.jsxs("div",{className:"max-w-5xl mx-auto px-4",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-8 mb-16",children:[s.jsxs("div",{className:"lg:w-1/3 flex justify-center",children:[s.jsx("img",{src:"/products/ingredients/broad-spectrum-cbd.png",alt:"Broad Spectrum CBD",className:"w-48 h-48 object-contain"}),s.jsxs("p",{className:"text-center font-bold text-foreground mt-4 hidden lg:block absolute -bottom-8",children:["BROAD SPECTRUM",s.jsx("br",{}),"CBD"]})]}),s.jsxs("div",{className:"lg:w-2/3 flex items-stretch",children:[s.jsx("div",{className:"hidden lg:block w-1 bg-primary mr-8 self-stretch"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"lg:hidden text-center font-bold text-foreground mb-4",children:"BROAD SPECTRUM CBD"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Composé de plusieurs dizaines de phytocannabinoïdes comme le CBD, le CBG ou le CBN ainsi que de terpènes permettant un effet d'entourage, cet extrait de chanvre à spectre large (Broad Spectrum CBD) est l'ingrédient le plus important lorsqu'il s'agit de CBD. Il respecte la règlementation car il ne contient pas de THC."})]})]})]}),s.jsxs("div",{className:"flex flex-col-reverse lg:flex-row items-center gap-8 mb-16",children:[s.jsxs("div",{className:"lg:w-2/3 flex items-stretch",children:[s.jsxs("div",{className:"flex-1 lg:text-left",children:[s.jsx("p",{className:"lg:hidden text-center font-bold text-foreground mb-4",children:t.slug==="capsules-sommeil-valeriane"?"VALÉRIANE":t.slug==="capsules-articulations-curcuma"?"CURCUMA":"MÉLISSE"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.slug==="capsules-sommeil-valeriane"?`Réputée en Europe pour ses propriétés relaxantes et bénéfiques sur le sommeil, la valériane est à l'origine une plante sauvage très bien tolérée par l'organisme. Elle est utilisée depuis l'Antiquité déjà pour ses propriétés et en tire même son nom: Valeriana vient du latin valere, qui signifie "être en bonne santé".`:t.slug==="capsules-articulations-curcuma"?`Originaire d'Inde, le curcuma est une plante herbacée également appelée "safran des Indes". Grâce à son action antioxydante, le curcuma peut également avoir un effet protecteur cardiovasculaire.`:`La mélisse est très utilisée en phytothérapie pour son action sur le stress et l'anxiété. Surnommée le "piment des abeilles", cette plante appartient à la même famille que la menthe avec une odeur caractéristique rappelant celle du citron.`})]}),s.jsx("div",{className:"hidden lg:block w-1 bg-primary ml-8 self-stretch"})]}),s.jsxs("div",{className:"lg:w-1/3 flex justify-center",children:[s.jsx("img",{src:t.slug==="capsules-sommeil-valeriane"?"/products/ingredients/valeriane.png":t.slug==="capsules-articulations-curcuma"?"/products/ingredients/curcuma.png":"/products/ingredients/melisse.png",alt:t.slug==="capsules-sommeil-valeriane"?"Valériane":t.slug==="capsules-articulations-curcuma"?"Curcuma":"Mélisse",className:"w-48 h-48 object-contain"}),s.jsx("p",{className:"text-center font-bold text-foreground mt-4 hidden lg:block absolute -bottom-8",children:t.slug==="capsules-sommeil-valeriane"?"VALÉRIANE":t.slug==="capsules-articulations-curcuma"?"CURCUMA":"MÉLISSE"})]})]}),t.ingredients&&s.jsxs("p",{className:"text-muted-foreground max-w-4xl mx-auto",children:[s.jsx("span",{className:"font-bold",children:"Ingrédients:"})," ",t.ingredients]})]}):t.category.toLowerCase()==="cosmétique"?s.jsxs("div",{className:"max-w-5xl mx-auto px-4",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-8 mb-16",children:[s.jsxs("div",{className:"lg:w-1/3 flex flex-col items-center justify-center",children:[s.jsx("img",{src:"/products/ingredients/cbd-isolate.png",alt:"CBD Isolate",className:"w-48 h-48 object-contain"}),s.jsx("p",{className:"text-center font-bold text-foreground mt-4",children:"CBD ISOLATE"})]}),s.jsxs("div",{className:"lg:w-2/3 flex items-stretch",children:[s.jsx("div",{className:"hidden lg:block w-1 bg-primary mr-8 self-stretch"}),s.jsx("div",{className:"flex-1",children:s.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["Notre isolat de CBD, ",s.jsx("strong",{children:"Optima CBD XB®"})," de Spectrums Europe, est un ingrédient cosmétique naturel, conforme au référentiel ISO 16128, avec une pureté proche de 100 %. Cliniquement prouvé pour ses propriétés apaisantes et séborréductrices, il est extrait de chanvre cultivé selon des normes rigoureuses, vous offrant ainsi une qualité exceptionnelle pour sublimer votre peau et révéler son éclat naturel."]})})]})]}),s.jsxs("div",{className:"flex flex-col-reverse lg:flex-row items-center gap-8 mb-16",children:[s.jsxs("div",{className:"lg:w-2/3 flex items-stretch",children:[s.jsx("div",{className:"flex-1 lg:text-left",children:s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"La poudre de riz s'obtient à partir de grains de riz moulus. Il s'agit d'une poudre d'origine naturelle qui permet d'adoucir la peau en légèreté et absorber l'excès de sébum. Une alliée parfaite pour le Cannabidiol !"})}),s.jsx("div",{className:"hidden lg:block w-1 bg-primary ml-8 self-stretch"})]}),s.jsxs("div",{className:"lg:w-1/3 flex flex-col items-center justify-center",children:[s.jsx("img",{src:"/products/ingredients/poudre-de-riz.png",alt:"Poudre de Riz",className:"w-48 h-48 object-contain"}),s.jsx("p",{className:"text-center font-bold text-foreground mt-4",children:"POUDRE DE RIZ"})]})]}),s.jsxs("div",{className:"mt-12",children:[s.jsx("div",{className:"bg-primary py-3 mb-8",children:s.jsx("h3",{className:"text-xl lg:text-2xl font-bold text-primary-foreground text-center tracking-wide",children:"ÉTUDE D'EFFICACITÉ"})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 text-center max-w-4xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("p",{className:"text-4xl font-bold text-foreground mb-2",children:"95%"}),s.jsx("div",{className:"flex gap-1 mb-2",children:[...Array(10)].map((_,j)=>s.jsx("div",{className:`w-3 h-3 rounded-full ${j<10?"bg-primary":"bg-muted"}`},j))}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"constatent l'absorption de l'excès de sébum"})]}),s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("p",{className:"text-4xl font-bold text-foreground mb-2",children:"90%"}),s.jsx("div",{className:"flex gap-1 mb-2",children:[...Array(10)].map((_,j)=>s.jsx("div",{className:`w-3 h-3 rounded-full ${j<9?"bg-primary":"bg-muted"}`},j))}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ont un effet de propreté immédiat"})]}),s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("p",{className:"text-4xl font-bold text-foreground mb-2",children:"81%"}),s.jsx("div",{className:"flex gap-1 mb-2",children:[...Array(10)].map((_,j)=>s.jsx("div",{className:`w-3 h-3 rounded-full ${j<8?"bg-primary":"bg-muted"}`},j))}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"ont les cheveux purifiés"})]})]}),s.jsx("p",{className:"text-xs text-center text-muted-foreground mt-4",children:"Tests d'usage réalisés sur 22 participantes pendant 28 jours"})]})]}):t.category.toLowerCase().includes("granules")?s.jsxs("div",{className:"max-w-5xl mx-auto px-4",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-8 mb-16",children:[s.jsx("div",{className:"lg:w-1/3 flex justify-center",children:s.jsx("img",{src:"/products/ingredients/cbd-isolate.png",alt:"CBD Isolate",className:"w-48 h-48 object-contain"})}),s.jsxs("div",{className:"lg:w-2/3 flex items-stretch",children:[s.jsx("div",{className:"hidden lg:block w-1 bg-primary mr-8 self-stretch"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"lg:hidden text-center font-bold text-foreground mb-4",children:"CBD ISOLATE"}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["Notre isolat de CBD, ",s.jsx("strong",{children:"Optima CBD XN®"})," de Spectrums Europe, est un ingrédient de qualité supérieure, avec une pureté proche de 100 %, extrait de chanvre cultivé selon des normes rigoureuses."]})]})]})]}),s.jsxs("div",{className:"flex flex-col-reverse lg:flex-row items-center gap-8 mb-16",children:[s.jsxs("div",{className:"lg:w-2/3 flex items-stretch",children:[s.jsxs("div",{className:"flex-1 lg:text-left",children:[s.jsx("p",{className:"lg:hidden text-center font-bold text-foreground mb-4",children:t.slug==="granules-morphee"?"CBN ISOLATE":"CBG ISOLATE"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.slug==="granules-morphee"?"Pur à près de 100%, notre isolat de CBN (cannabinol) est la forme la plus pure du CBN. Il est fabriqué à partir de chanvre cultivé selon les normes les plus élevées possibles, sans pesticides ni additifs chimiques.":"L'isolat de CBG (cannabigérol) est la forme la plus pure du CBG, la molécule isolée avec une concentration de plus de 99%. L'isolat de CBG que nous utilisons est fabriqué à partir de chanvre cultivé selon les normes les plus élevées possibles."})]}),s.jsx("div",{className:"hidden lg:block w-1 bg-primary ml-8 self-stretch"})]}),s.jsx("div",{className:"lg:w-1/3 flex justify-center",children:s.jsx("img",{src:t.slug==="granules-morphee"?"/products/ingredients/cbn-isolate.png":"/products/ingredients/cbg-isolate.png",alt:t.slug==="granules-morphee"?"CBN Isolate":"CBG Isolate",className:"w-48 h-48 object-contain"})})]}),t.ingredients&&s.jsxs("p",{className:"text-muted-foreground max-w-4xl mx-auto text-center",children:[s.jsx("span",{className:"font-bold",children:"Ingrédients:"})," ",t.ingredients]})]}):s.jsxs(s.Fragment,{children:[t.gallery_urls&&t.gallery_urls[0]&&s.jsx("div",{className:"flex justify-center mb-8",children:s.jsx("img",{src:t.gallery_urls[0],alt:"Ingrédients CBD",className:"max-w-full lg:max-w-3xl h-auto"})}),t.ingredients&&s.jsxs("p",{className:"text-center text-muted-foreground max-w-4xl mx-auto",children:[s.jsx("span",{className:"font-semibold",children:"Ingrédients :"})," ",t.ingredients]})]})})]}),s.jsxs("section",{id:"conseils",className:"mb-12 scroll-mt-4",children:[s.jsx("div",{className:"bg-primary py-4 mb-8",children:s.jsx("h2",{className:"text-2xl lg:text-3xl font-bold text-primary-foreground text-center tracking-wide",children:"CONSEILS"})}),s.jsx("div",{className:"container mx-auto px-4",children:t.category.toLowerCase()==="cosmétique"?s.jsx("div",{className:"max-w-4xl mx-auto",children:s.jsx("img",{src:"/products/conseils-shampoing-sec.png",alt:"Conseils d'utilisation shampoing sec",className:"w-full h-auto"})}):t.category.toLowerCase().startsWith("capsules")||t.category.toLowerCase().includes("granules")?s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 max-w-5xl mx-auto",children:[s.jsx("div",{className:"flex justify-center lg:justify-start",children:s.jsx("img",{src:t.category.toLowerCase().includes("granules")?"/products/conseils-granules.png":"/products/conseils-capsules.png",alt:t.category.toLowerCase().includes("granules")?"Conseils Granules":"Conseils Capsules",className:"w-full h-auto object-cover"})}),s.jsxs("div",{className:"bg-primary p-8 text-primary-foreground flex flex-col justify-center items-center text-center",children:[t.category.toLowerCase().includes("granules")?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-2xl lg:text-3xl font-bold mb-2",children:"5 GRANULES 1 À 4X /JOUR"}),s.jsx("p",{className:"text-xl lg:text-2xl font-bold mb-6",children:"50MG DE CBD"})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-2xl lg:text-3xl font-bold mb-2",children:"2 CAPSULES/JOUR"}),s.jsx("p",{className:"text-xl lg:text-2xl font-bold mb-6",children:"50MG DE CBD"})]}),s.jsx("p",{className:"text-sm lg:text-base leading-relaxed max-w-sm",children:t.usage_instructions||"Vous pouvez prendre vos capsules à tout moment dans la journée, en une fois ou en plusieurs fois à votre convenance."})]})]}):s.jsxs("div",{className:`grid gap-8 items-center max-w-5xl mx-auto ${t.gallery_urls&&t.gallery_urls[1]?"grid-cols-1 lg:grid-cols-2":"grid-cols-1 max-w-xl"}`,children:[t.gallery_urls&&t.gallery_urls[1]&&s.jsx("div",{className:"flex justify-center lg:justify-end",children:s.jsx("img",{src:t.gallery_urls[1],alt:t.category.toLowerCase().includes("gummies")?"Conseils Gummies":"Pipette CBD",className:"max-h-96 w-auto"})}),s.jsx("div",{className:"bg-primary rounded-lg p-8 text-primary-foreground text-center",children:t.category.toLowerCase().includes("gummies")?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-2xl lg:text-3xl font-bold mb-4",children:"2 GUMMIES PAR JOUR"}),s.jsx("p",{className:"text-2xl lg:text-3xl font-bold mb-6",children:"40MG DE CBD"}),s.jsx("p",{className:"text-sm lg:text-base leading-relaxed",children:t.usage_instructions||"Vous pouvez prendre vos gummies à tout moment dans la journée, en une fois ou en plusieurs fois à votre convenance."})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-2xl lg:text-3xl font-bold mb-2",children:"1 PIPETTE PAR JOUR"}),s.jsx("p",{className:"text-xl lg:text-2xl mb-4",children:"~ 20 GOUTTES"}),s.jsx("p",{className:"text-2xl lg:text-3xl font-bold mb-6",children:"50 MG DE CBD"}),s.jsx("p",{className:"text-sm lg:text-base leading-relaxed",children:"Vous pouvez prendre votre pipette en une fois ou diviser en plusieurs fois la prise de votre huile de CBD sur la journée, le matin et le soir par exemple."})]})})]})})]}),s.jsxs("section",{id:"faq",className:"mb-16 scroll-mt-4",children:[s.jsx("div",{className:"bg-primary py-4 mb-8",children:s.jsx("h2",{className:"text-2xl lg:text-3xl font-bold text-primary-foreground text-center tracking-wide",children:"FAQ : TOUT SAVOIR SUR CE PRODUIT"})}),s.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:t.faq_content&&Array.isArray(t.faq_content)&&(()=>{const _=t.faq_content,j=_[0];if(!!j&&typeof j=="object"&&"question"in j&&"answer"in j){const D=_;return s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-2",children:D.map((M,T)=>s.jsxs(Pn,{value:`flat-${T}`,className:"border border-border rounded-lg px-4 data-[state=open]:bg-secondary/30",children:[s.jsx(In,{className:"text-left font-medium hover:no-underline py-4 text-foreground",children:M.question}),s.jsx(Fn,{className:"text-muted-foreground pb-4",children:M.answer})]},T))})}const k=_;return s.jsx("div",{className:"space-y-8",children:k.map((D,M)=>s.jsxs("div",{children:[D.category&&s.jsx("h3",{className:"text-xl font-bold text-primary mb-4 uppercase tracking-wider",children:D.category}),D.questions&&Array.isArray(D.questions)&&s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-2",children:D.questions.map((T,A)=>s.jsxs(Pn,{value:`${M}-${A}`,className:"border border-border rounded-lg px-4 data-[state=open]:bg-secondary/30",children:[s.jsx(In,{className:"text-left font-medium hover:no-underline py-4 text-foreground",children:T.question}),s.jsx(Fn,{className:"text-muted-foreground pb-4",children:T.answer})]},A))})]},M))})})()})]})]}),s.jsx(it,{})]})},C_=[{name:"Stress",slugs:["spray-stress","capsules-stress-melisse","granules-olympe"],icon:Eu},{name:"Sommeil",slugs:["spray-sommeil","capsules-sommeil-valeriane","granules-morphee"],icon:ef},{name:"Douleurs & Articulation",slugs:["capsules-articulations-curcuma","granules-algos"],icon:g4}],cX=()=>{const[e,t]=g.useState(null),[r,n]=g.useState(null),[a,i]=g.useState("default"),{data:o}=XA(),{data:l,isLoading:c}=sw(r?null:e),u=["Tous",...(o==null?void 0:o.map(h=>h.name))||[]],d=g.useMemo(()=>{if(!l)return[];if(!r)return l;const h=C_.find(m=>m.name===r);return h?l.filter(m=>h.slugs.includes(m.slug)):l},[l,r]),f=g.useMemo(()=>d?a==="default"?d:[...d].sort((h,m)=>{const v=w=>{const y=w.product_variants||[];return y.length===0?0:Math.min(...y.map(b=>b.price))},p=v(h),x=v(m);return a==="price-asc"?p-x:x-p}):[],[d,a]);return c?s.jsx("section",{id:"tous-les-produits",className:"py-20 bg-gradient-to-b from-background to-muted/30",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4",children:"Notre gamme complète"}),s.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:"Tous nos produits"}),s.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Découvrez notre sélection de produits CBD de haute qualité"})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-w-7xl mx-auto",children:[...Array(8)].map((h,m)=>s.jsx("div",{className:"h-[420px] bg-muted animate-pulse rounded-xl"},m))})]})}):s.jsx("section",{id:"tous-les-produits",className:"py-20 bg-gradient-to-b from-background to-muted/30",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4",children:"Notre gamme complète"}),s.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:"Tous nos produits"}),s.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Découvrez notre sélection de produits CBD de haute qualité, fabriqués en France avec des ingrédients naturels"})]}),s.jsxs("div",{className:"max-w-5xl mx-auto mb-12",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("div",{className:"flex items-center justify-center gap-2 mb-4",children:s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Par problématique"})}),s.jsx("div",{className:"flex flex-wrap justify-center gap-3",children:C_.map(h=>{const m=r===h.name,v=h.icon;return s.jsxs(se,{variant:m?"default":"outline",onClick:()=>{m?n(null):(n(h.name),t(null))},className:`
                      px-6 py-2 rounded-full transition-all duration-300 flex items-center gap-2
                      ${m?"bg-primary text-primary-foreground shadow-lg shadow-primary/25 scale-105":"hover:bg-primary/10 hover:border-primary/50"}
                    `,children:[s.jsx(v,{className:"w-4 h-4"}),h.name]},h.name)})})]}),s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4",children:[s.jsx(V8,{className:"w-5 h-5 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Par type de produit"})]}),s.jsx("div",{className:"flex flex-wrap justify-center gap-3",children:u.map(h=>{const m=!r&&(e===h||!e&&h==="Tous");return s.jsx(se,{variant:m?"default":"outline",onClick:()=>{t(h==="Tous"?null:h),n(null)},className:`
                    px-6 py-2 rounded-full transition-all duration-300
                    ${m?"bg-primary text-primary-foreground shadow-lg shadow-primary/25 scale-105":"hover:bg-primary/10 hover:border-primary/50"}
                  `,children:h},h)})})]}),s.jsxs("div",{className:"flex items-center justify-between max-w-7xl mx-auto mb-8",children:[s.jsxs("p",{className:"text-muted-foreground",children:[s.jsx("span",{className:"font-semibold text-foreground",children:(d==null?void 0:d.length)||0})," produit",((d==null?void 0:d.length)||0)>1?"s":""," trouvé",((d==null?void 0:d.length)||0)>1?"s":""]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-muted-foreground hidden sm:inline",children:"Trier par :"}),s.jsxs("div",{className:"flex items-center gap-1 bg-muted/50 rounded-full p-1",children:[s.jsx("button",{onClick:()=>i("default"),className:`px-3 py-1.5 rounded-full text-sm font-medium transition-all ${a==="default"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:s.jsx(x4,{className:"w-4 h-4"})}),s.jsxs("button",{onClick:()=>i("price-asc"),className:`px-3 py-1.5 rounded-full text-sm font-medium transition-all flex items-center gap-1 ${a==="price-asc"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:[s.jsx(T8,{className:"w-4 h-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Prix"})]}),s.jsxs("button",{onClick:()=>i("price-desc"),className:`px-3 py-1.5 rounded-full text-sm font-medium transition-all flex items-center gap-1 ${a==="price-desc"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,children:[s.jsx(k8,{className:"w-4 h-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Prix"})]})]})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 max-w-7xl mx-auto",children:f&&f.length>0?f.map((h,m)=>s.jsx("div",{className:"animate-fade-in",style:{animationDelay:`${m*50}ms`},children:s.jsx(Kr,{product:h})},h.id)):s.jsxs("div",{className:"col-span-full text-center py-16",children:[s.jsx("div",{className:"w-20 h-20 bg-muted rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(G8,{className:"w-8 h-8 text-muted-foreground"})}),s.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:"Aucun produit trouvé"}),s.jsx("p",{className:"text-muted-foreground",children:"Essayez une autre catégorie pour découvrir nos produits"})]})})]})})},uX=()=>(g.useEffect(()=>{document.title="Produits CBD | Huiles, Gummies & Capsules NŌTO";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Gamme complète de produits CBD NŌTO : huiles sublinguales, gummies, granules, capsules et cosmétiques. Fabrication française, qualité pharmacie.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Produits CBD | Huiles, Gummies & Capsules NŌTO",description:"Gamme complète de produits CBD NŌTO : huiles sublinguales, gummies, granules, capsules et cosmétiques. Fabrication française, qualité pharmacie.",url:"/produits",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Produits",url:"/produits"}]}),s.jsx("main",{className:"pt-4",children:s.jsx(cX,{})}),s.jsx(it,{})]})),oa=({categoryName:e})=>{const{data:t,isLoading:r}=sw(e);return r?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:[...Array(8)].map((n,a)=>s.jsx("div",{className:"h-[420px] bg-muted animate-pulse rounded-2xl"},a))}):!t||t.length===0?s.jsx("div",{className:"text-center py-16",children:s.jsx("p",{className:"text-muted-foreground text-lg",children:"Aucun produit trouvé dans cette catégorie."})}):s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(n=>s.jsx(Kr,{product:n},n.id))})},Li=({categoryName:e})=>s.jsx("nav",{"aria-label":"Fil d'Ariane",className:"mb-6",children:s.jsxs("ol",{className:"flex items-center flex-wrap gap-1 text-sm text-muted-foreground",children:[s.jsx("li",{className:"flex items-center",children:s.jsxs(pe,{to:"/",className:"hover:text-primary transition-colors flex items-center gap-1",children:[s.jsx(Ul,{className:"w-4 h-4"}),s.jsx("span",{className:"sr-only",children:"Accueil"})]})}),s.jsxs("li",{className:"flex items-center",children:[s.jsx(Io,{className:"w-4 h-4 mx-1"}),s.jsx("span",{className:"text-foreground font-medium",children:e})]})]})}),Hi={"capsules-cbd":{title:"Capsules CBD Sommeil & Stress | NŌTO France",description:"Capsules CBD NŌTO pour sommeil, stress et articulations. Formules naturelles à base de valériane, mélisse et curcuma. Fabrication française.",categoryName:"Capsules CBD"},"huiles-cbd":{title:"Huiles CBD 5% 10% 20% | NŌTO France",description:"Huiles CBD sublinguales NŌTO : 5%, 10% et 20%. Broad spectrum, saveurs citron, fruits rouges et menthe. Qualité pharmacie française.",categoryName:"Huiles CBD"},"granules-cbd":{title:"Granules CBD Homéopathiques | NŌTO France",description:"Granules CBD NŌTO pour dosage précis : Algos (douleurs), Morphée (sommeil), Olympe (stress). Format pratique, absorption rapide.",categoryName:"Granules CBD"},"gummies-cbd":{title:"Gummies CBD Vegan Sans Sucre | NŌTO France",description:"Gummies CBD NŌTO délicieux et efficaces. Vegan, sans sucre ajouté, 20mg CBD par gummy. Façon gourmande de consommer le CBD.",categoryName:"Gummies CBD"},"sprays-cbd":{title:"Sprays CBD Sommeil & Relaxation | NŌTO",description:"Sprays CBD NŌTO pour sommeil et relaxation. CBD associé à mélatonine ou ashwagandha. Application pratique, effet rapide.",categoryName:"Spray CBD"},"shampoings-secs-cbd":{title:"Shampoing Sec CBD Cheveux | NŌTO France",description:"Shampoings secs au CBD NŌTO pour cheveux clairs et foncés. Formule naturelle à la poudre de riz, fraîcheur instantanée.",categoryName:"Cosmétiques CBD"}},dX={"capsules-cbd":"Capsules CBD","huiles-cbd":"Huiles CBD","granules-cbd":"Granules CBD","gummies-cbd":"Gummies CBD","sprays-cbd":"Sprays CBD","shampoings-secs-cbd":"Shampoings Secs CBD"},fX=()=>{const{category:e}=Ux();g.useEffect(()=>{if(e&&Hi[e]){document.title=Hi[e].title;const n=document.querySelector('meta[name="description"]');n&&n.setAttribute("content",Hi[e].description)}},[e]);const t=e?dX[e]||e:"",r=e&&Hi[e]?Hi[e].categoryName:"";return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),e&&Hi[e]&&s.jsxs(s.Fragment,{children:[s.jsx(It,{title:Hi[e].title,description:Hi[e].description,url:`/produits/${e}`,image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Produits",url:"/produits"},{name:t,url:`/produits/${e}`}]})]}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:t}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-8",children:t}),s.jsx(oa,{categoryName:r})]})}),s.jsx(it,{})]})},hX=()=>{const e=wa(),{items:t,updateQuantity:r,removeItem:n,getTotalItems:a,getEuroItems:i,getLoyaltyItems:o,getEuroTotal:l,getPointsTotal:c,getLoyaltyValue:u,hasLoyaltyItems:d,hasEuroItems:f}=sd(),[h,m]=g.useState(null),[v,p]=g.useState(null);g.useEffect(()=>{document.title="Panier CBD | Votre Commande NŌTO";const j=document.querySelector('meta[name="description"]');j&&j.setAttribute("content","Votre panier NŌTO : finalisez votre commande de produits CBD. Livraison rapide France et Europe, paiement sécurisé.")},[]),g.useEffect(()=>{(async()=>{var k;const{data:{session:S}}=await be.auth.getSession();if((k=S==null?void 0:S.user)!=null&&k.email){p(S.user.email);const{data:D}=await be.from("loyalty_points").select("points").eq("email",S.user.email).maybeSingle();D&&m(D.points)}})()},[]);const x=i(),w=o(),y=l(),b=c(),N=u(),C=h!==null&&h>=b,_=()=>{if(d()&&!v){fe.error("Vous devez être connecté pour utiliser vos points fidélité"),e("/auth");return}if(d()&&!C){fe.error("Vous n'avez pas assez de points fidélité");return}e("/commander")};return t.length===0?s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx("main",{className:"container mx-auto px-4 py-16",children:s.jsxs("div",{className:"text-center",children:[s.jsx(zl,{className:"h-16 w-16 mx-auto text-muted-foreground mb-4"}),s.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Votre panier est vide"}),s.jsx("p",{className:"text-muted-foreground mb-8",children:"Découvrez nos produits CBD de qualité"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx(se,{asChild:!0,children:s.jsx(pe,{to:"/",children:"Voir les produits"})}),s.jsx(se,{variant:"outline",asChild:!0,children:s.jsxs(pe,{to:"/boutique-fidelite",children:[s.jsx(Ut,{className:"h-4 w-4 mr-2"}),"Boutique Fidélité"]})})]})]})}),s.jsx(it,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsxs("main",{className:"container mx-auto px-4 py-8",children:[s.jsx("div",{className:"bg-green-50 border border-green-200 rounded-xl p-4 mb-8 text-center",children:s.jsxs("p",{className:"text-green-800 font-medium",children:["🚚 ",s.jsx("strong",{children:"Livraison offerte en point relais"})," dès 70€ d'achats",y>0&&y<70&&s.jsxs("span",{className:"block text-sm mt-1 font-normal",children:["Plus que ",s.jsxs("strong",{children:[(70-y).toFixed(2),"€"]})," pour en profiter !"]}),y>=70&&s.jsx("span",{className:"block text-sm mt-1 font-normal text-green-600",children:"✓ Vous y êtes ! Livraison offerte en point relais"})]})}),s.jsxs("h1",{className:"text-3xl font-bold mb-8",children:["Panier (",a()," article",a()>1?"s":"",")"]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[x.length>0&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[s.jsx(zl,{className:"h-5 w-5"}),"Achats (",x.length," produit",x.length>1?"s":"",")"]}),x.map(j=>s.jsx(ve,{className:"p-4",children:s.jsxs("div",{className:"flex gap-4",children:[s.jsx(pe,{to:`/produit/${j.productSlug}`,children:s.jsx("img",{src:j.imageUrl,alt:j.productName,className:"w-24 h-24 object-cover rounded"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx(pe,{to:`/produit/${j.productSlug}`,children:s.jsx("h3",{className:"font-semibold hover:text-primary transition-colors",children:j.productName})}),s.jsx("p",{className:"text-sm text-muted-foreground",children:j.productsPerPack?`${j.variantName} • ${j.quantity} pack${j.quantity>1?"s":""} (${j.quantity*j.productsPerPack} produit${j.quantity*j.productsPerPack>1?"s":""})`:`${j.variantName}`}),s.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(se,{variant:"outline",size:"icon",onClick:()=>r(j.productId,j.variantId,j.quantity-1,"euro"),children:s.jsx(Np,{className:"h-4 w-4"})}),s.jsx("span",{className:"w-12 text-center",children:j.quantity}),s.jsx(se,{variant:"outline",size:"icon",onClick:()=>r(j.productId,j.variantId,j.quantity+1,"euro"),children:s.jsx($l,{className:"h-4 w-4"})})]}),s.jsx(se,{variant:"ghost",size:"icon",onClick:()=>n(j.productId,j.variantId,"euro"),children:s.jsx(Vl,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"font-bold",children:[(j.price*j.quantity).toFixed(2),"€"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:j.productsPerPack?`${(j.price/j.productsPerPack).toFixed(2)}€ / unité`:`${j.price.toFixed(2)}€`})]})]})},`${j.productId}-${j.variantId}`))]}),w.length>0&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[s.jsx(Ut,{className:"h-5 w-5 text-violet-600"}),"Produits fidélité (",w.length," produit",w.length>1?"s":"",")",s.jsx(Je,{className:"bg-violet-600",children:"Points"})]}),w.map(j=>s.jsx(ve,{className:"p-4 border-violet-200 bg-violet-50/50",children:s.jsxs("div",{className:"flex gap-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:j.imageUrl,alt:j.productName,className:"w-24 h-24 object-cover rounded"}),s.jsx(Je,{className:"absolute -top-2 -right-2 bg-violet-600",children:s.jsx(Ut,{className:"h-3 w-3"})})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold",children:j.productName}),s.jsxs("p",{className:"text-sm text-violet-600 font-medium",children:[((j.pointsCost||0)*j.quantity).toLocaleString()," points"]}),s.jsxs("div",{className:"flex items-center gap-4 mt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(se,{variant:"outline",size:"icon",onClick:()=>r(j.productId,j.variantId,j.quantity-1,"points"),children:s.jsx(Np,{className:"h-4 w-4"})}),s.jsx("span",{className:"w-12 text-center",children:j.quantity}),s.jsx(se,{variant:"outline",size:"icon",onClick:()=>r(j.productId,j.variantId,j.quantity+1,"points"),children:s.jsx($l,{className:"h-4 w-4"})})]}),s.jsx(se,{variant:"ghost",size:"icon",onClick:()=>n(j.productId,j.variantId,"points"),children:s.jsx(Vl,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"font-bold text-violet-600",children:"Gratuit"}),s.jsxs("p",{className:"text-sm text-muted-foreground line-through",children:[(j.price*j.quantity).toFixed(2),"€"]})]})]})},`${j.productId}-${j.variantId}`)),v&&s.jsxs("div",{className:"bg-violet-100 rounded-lg p-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"text-violet-800",children:"Vos points disponibles :"}),s.jsxs("span",{className:"font-bold text-violet-800",children:[(h==null?void 0:h.toLocaleString())||0," points"]})]}),s.jsxs("div",{className:"flex justify-between items-center mt-2",children:[s.jsx("span",{className:"text-violet-800",children:"Points nécessaires :"}),s.jsxs("span",{className:`font-bold ${C?"text-green-600":"text-red-600"}`,children:[b.toLocaleString()," points"]})]}),!C&&s.jsx("p",{className:"text-red-600 text-sm mt-2",children:"⚠️ Vous n'avez pas assez de points. Retirez des produits fidélité ou gagnez plus de points."})]})]}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx(se,{variant:"outline",asChild:!0,children:s.jsx(pe,{to:"/",children:"Continuer mes achats"})}),s.jsx(se,{variant:"outline",asChild:!0,children:s.jsxs(pe,{to:"/boutique-fidelite",children:[s.jsx(Ut,{className:"h-4 w-4 mr-2"}),"Boutique Fidélité"]})})]})]}),s.jsx("div",{className:"lg:col-span-1",children:s.jsxs(ve,{className:"p-6 sticky top-24",children:[s.jsx("h2",{className:"text-xl font-bold mb-4",children:"Résumé"}),s.jsxs("div",{className:"space-y-3 mb-4",children:[f()&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Sous-total achats"}),s.jsxs("span",{children:[y.toFixed(2),"€"]})]}),d()&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between text-violet-600",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ut,{className:"h-4 w-4"}),"Produits fidélité"]}),s.jsxs("span",{children:["-",N.toFixed(2),"€"]})]}),s.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[s.jsx("span",{children:"Points utilisés"}),s.jsxs("span",{children:[b.toLocaleString()," pts"]})]})]}),s.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[s.jsx("span",{children:"Livraison"}),s.jsx("span",{children:"Calculée à la prochaine étape"})]})]}),y>0&&y<70&&s.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3 mb-4",children:s.jsxs("p",{className:"text-sm text-amber-800",children:["🚚 Plus que ",s.jsxs("strong",{children:[(70-y).toFixed(2),"€"]})," d'achats pour la livraison offerte en point relais !"]})}),y>=70&&s.jsx("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 mb-4",children:s.jsx("p",{className:"text-sm text-green-800",children:"✅ Livraison offerte en point relais !"})}),s.jsx(us,{className:"my-4"}),s.jsxs("div",{className:"flex justify-between font-bold text-lg mb-6",children:[s.jsx("span",{children:"Total à payer"}),s.jsxs("span",{children:[y.toFixed(2),"€"]})]}),s.jsx(se,{className:"w-full",size:"lg",onClick:_,disabled:d()&&!C,children:y>0?"Passer la commande":"Confirmer ma commande"}),d()&&!v&&s.jsx("p",{className:"text-sm text-amber-600 mt-2 text-center",children:"Connectez-vous pour utiliser vos points fidélité"})]})})]})]}),s.jsx(it,{})]})};var Rh=e=>e.type==="checkbox",gl=e=>e instanceof Date,Cs=e=>e==null;const NO=e=>typeof e=="object";var vr=e=>!Cs(e)&&!Array.isArray(e)&&NO(e)&&!gl(e),_O=e=>vr(e)&&e.target?Rh(e.target)?e.target.checked:e.target.value:e,mX=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,CO=(e,t)=>e.has(mX(t)),pX=e=>{const t=e.constructor&&e.constructor.prototype;return vr(t)&&t.hasOwnProperty("isPrototypeOf")},kw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Dr(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(kw&&(e instanceof Blob||n))&&(r||vr(e)))if(t=r?[]:{},!r&&!pX(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=Dr(e[a]));else return e;return t}var m0=e=>/^\w*$/.test(e),pr=e=>e===void 0,Tw=e=>Array.isArray(e)?e.filter(Boolean):[],Aw=e=>Tw(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Le=(e,t,r)=>{if(!t||!vr(e))return r;const n=(m0(t)?[t]:Aw(t)).reduce((a,i)=>Cs(a)?a:a[i],e);return pr(n)||n===e?pr(e[t])?r:e[t]:n},Zs=e=>typeof e=="boolean",Mt=(e,t,r)=>{let n=-1;const a=m0(t)?[t]:Aw(t),i=a.length,o=i-1;for(;++n<i;){const l=a[n];let c=r;if(n!==o){const u=e[l];c=vr(u)||Array.isArray(u)?u:isNaN(+a[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const Vp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ra={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ti={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Rw=de.createContext(null);Rw.displayName="HookFormContext";const p0=()=>de.useContext(Rw),xX=e=>{const{children:t,...r}=e;return de.createElement(Rw.Provider,{value:r},t)};var SO=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==ra.all&&(t._proxyFormState[o]=!n||ra.all),r&&(r[o]=!0),e[o]}});return a};const Dw=typeof window<"u"?de.useLayoutEffect:de.useEffect;function gX(e){const t=p0(),{control:r=t.control,disabled:n,name:a,exact:i}=e||{},[o,l]=de.useState(r._formState),c=de.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Dw(()=>r._subscribe({name:a,formState:c.current,exact:i,callback:u=>{!n&&l({...r._formState,...u})}}),[a,n,i]),de.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),de.useMemo(()=>SO(o,r,c.current,!1),[o,r])}var La=e=>typeof e=="string",EO=(e,t,r,n,a)=>La(e)?(n&&t.watch.add(e),Le(r,e,a)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),Le(r,i))):(n&&(t.watchAll=!0),r),F1=e=>Cs(e)||!NO(e);function li(e,t,r=new WeakSet){if(F1(e)||F1(t))return e===t;if(gl(e)&&gl(t))return e.getTime()===t.getTime();const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const i of n){const o=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const l=t[i];if(gl(o)&&gl(l)||vr(o)&&vr(l)||Array.isArray(o)&&Array.isArray(l)?!li(o,l,r):o!==l)return!1}}return!0}function vX(e){const t=p0(),{control:r=t.control,name:n,defaultValue:a,disabled:i,exact:o,compute:l}=e||{},c=de.useRef(a),u=de.useRef(l),d=de.useRef(void 0);u.current=l;const f=de.useMemo(()=>r._getWatch(n,c.current),[r,n]),[h,m]=de.useState(u.current?u.current(f):f);return Dw(()=>r._subscribe({name:n,formState:{values:!0},exact:o,callback:v=>{if(!i){const p=EO(n,r._names,v.values||r._formValues,!1,c.current);if(u.current){const x=u.current(p);li(x,d.current)||(m(x),d.current=x)}else m(p)}}}),[r,i,n,o]),de.useEffect(()=>r._removeUnmounted()),h}function yX(e){const t=p0(),{name:r,disabled:n,control:a=t.control,shouldUnregister:i,defaultValue:o}=e,l=CO(a._names.array,r),c=de.useMemo(()=>Le(a._formValues,r,Le(a._defaultValues,r,o)),[a,r,o]),u=vX({control:a,name:r,defaultValue:c,exact:!0}),d=gX({control:a,name:r,exact:!0}),f=de.useRef(e),h=de.useRef(a.register(r,{...e.rules,value:u,...Zs(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const m=de.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Le(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!Le(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Le(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Le(d.validatingFields,r)},error:{enumerable:!0,get:()=>Le(d.errors,r)}}),[d,r]),v=de.useCallback(y=>h.current.onChange({target:{value:_O(y),name:r},type:Vp.CHANGE}),[r]),p=de.useCallback(()=>h.current.onBlur({target:{value:Le(a._formValues,r),name:r},type:Vp.BLUR}),[r,a._formValues]),x=de.useCallback(y=>{const b=Le(a._fields,r);b&&y&&(b._f.ref={focus:()=>y.focus&&y.focus(),select:()=>y.select&&y.select(),setCustomValidity:N=>y.setCustomValidity(N),reportValidity:()=>y.reportValidity()})},[a._fields,r]),w=de.useMemo(()=>({name:r,value:u,...Zs(n)||d.disabled?{disabled:d.disabled||n}:{},onChange:v,onBlur:p,ref:x}),[r,n,d.disabled,v,p,x,u]);return de.useEffect(()=>{const y=a._options.shouldUnregister||i;a.register(r,{...f.current.rules,...Zs(f.current.disabled)?{disabled:f.current.disabled}:{}});const b=(N,C)=>{const _=Le(a._fields,N);_&&_._f&&(_._f.mount=C)};if(b(r,!0),y){const N=Dr(Le(a._options.defaultValues,r));Mt(a._defaultValues,r,N),pr(Le(a._formValues,r))&&Mt(a._formValues,r,N)}return!l&&a.register(r),()=>{(l?y&&!a._state.action:y)?a.unregister(r):b(r,!1)}},[r,a,l,i]),de.useEffect(()=>{a._setDisabledField({disabled:n,name:r})},[n,r,a]),de.useMemo(()=>({field:w,formState:d,fieldState:m}),[w,d,m])}const bX=e=>e.render(yX(e));var kO=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},of=e=>Array.isArray(e)?e:[e],S_=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}},Ls=e=>vr(e)&&!Object.keys(e).length,Ow=e=>e.type==="file",sa=e=>typeof e=="function",Hp=e=>{if(!kw)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},TO=e=>e.type==="select-multiple",Pw=e=>e.type==="radio",wX=e=>Pw(e)||Rh(e),Eg=e=>Hp(e)&&e.isConnected;function jX(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=pr(e)?n++:e[t[n++]];return e}function NX(e){for(const t in e)if(e.hasOwnProperty(t)&&!pr(e[t]))return!1;return!0}function br(e,t){const r=Array.isArray(t)?t:m0(t)?[t]:Aw(t),n=r.length===1?e:jX(e,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(vr(n)&&Ls(n)||Array.isArray(n)&&NX(n))&&br(e,r.slice(0,-1)),e}var AO=e=>{for(const t in e)if(sa(e[t]))return!0;return!1};function Wp(e,t={}){const r=Array.isArray(e);if(vr(e)||r)for(const n in e)Array.isArray(e[n])||vr(e[n])&&!AO(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Wp(e[n],t[n])):Cs(e[n])||(t[n]=!0);return t}function RO(e,t,r){const n=Array.isArray(e);if(vr(e)||n)for(const a in e)Array.isArray(e[a])||vr(e[a])&&!AO(e[a])?pr(t)||F1(r[a])?r[a]=Array.isArray(e[a])?Wp(e[a],[]):{...Wp(e[a])}:RO(e[a],Cs(t)?{}:t[a],r[a]):r[a]=!li(e[a],t[a]);return r}var kd=(e,t)=>RO(e,t,Wp(t));const E_={value:!1,isValid:!1},k_={value:!0,isValid:!0};var DO=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!pr(e[0].attributes.value)?pr(e[0].value)||e[0].value===""?k_:{value:e[0].value,isValid:!0}:k_:E_}return E_},OO=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>pr(e)?e:t?e===""?NaN:e&&+e:r&&La(e)?new Date(e):n?n(e):e;const T_={isValid:!1,value:null};var PO=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,T_):T_;function A_(e){const t=e.ref;return Ow(t)?t.files:Pw(t)?PO(e.refs).value:TO(t)?[...t.selectedOptions].map(({value:r})=>r):Rh(t)?DO(e.refs).value:OO(pr(t.value)?e.ref.value:t.value,e)}var _X=(e,t,r,n)=>{const a={};for(const i of e){const o=Le(t,i);o&&Mt(a,i,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}},Gp=e=>e instanceof RegExp,Td=e=>pr(e)?e:Gp(e)?e.source:vr(e)?Gp(e.value)?e.value.source:e.value:e,R_=e=>({isOnSubmit:!e||e===ra.onSubmit,isOnBlur:e===ra.onBlur,isOnChange:e===ra.onChange,isOnAll:e===ra.all,isOnTouch:e===ra.onTouched});const D_="AsyncFunction";var CX=e=>!!e&&!!e.validate&&!!(sa(e.validate)&&e.validate.constructor.name===D_||vr(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===D_)),SX=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),O_=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const lf=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const i=Le(e,a);if(i){const{_f:o,...l}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(lf(l,t))break}else if(vr(l)&&lf(l,t))break}}};function P_(e,t,r){const n=Le(e,r);if(n||m0(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=Le(t,i),l=Le(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(l&&l.type)return{name:i,error:l};if(l&&l.root&&l.root.type)return{name:`${i}.root`,error:l.root};a.pop()}return{name:r}}var EX=(e,t,r,n)=>{r(e);const{name:a,...i}=e;return Ls(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||ra.all))},kX=(e,t,r)=>!e||!t||e===t||of(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),TX=(e,t,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:(r?n.isOnChange:a.isOnChange)?e:!0,AX=(e,t)=>!Tw(Le(e,t)).length&&br(e,t),RX=(e,t,r)=>{const n=of(Le(e,r));return Mt(n,"root",t[r]),Mt(e,r,n),e},Qm=e=>La(e);function I_(e,t,r="validate"){if(Qm(e)||Array.isArray(e)&&e.every(Qm)||Zs(e)&&!e)return{type:r,message:Qm(e)?e:"",ref:t}}var Ec=e=>vr(e)&&!Gp(e)?e:{value:e,message:""},F_=async(e,t,r,n,a,i)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:d,min:f,max:h,pattern:m,validate:v,name:p,valueAsNumber:x,mount:w}=e._f,y=Le(r,p);if(!w||t.has(p))return{};const b=l?l[0]:o,N=T=>{a&&b.reportValidity&&(b.setCustomValidity(Zs(T)?"":T||""),b.reportValidity())},C={},_=Pw(o),j=Rh(o),S=_||j,k=(x||Ow(o))&&pr(o.value)&&pr(y)||Hp(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,D=kO.bind(null,p,n,C),M=(T,A,W,P=ti.maxLength,V=ti.minLength)=>{const Z=T?A:W;C[p]={type:T?P:V,message:Z,ref:o,...D(T?P:V,Z)}};if(i?!Array.isArray(y)||!y.length:c&&(!S&&(k||Cs(y))||Zs(y)&&!y||j&&!DO(l).isValid||_&&!PO(l).isValid)){const{value:T,message:A}=Qm(c)?{value:!!c,message:c}:Ec(c);if(T&&(C[p]={type:ti.required,message:A,ref:b,...D(ti.required,A)},!n))return N(A),C}if(!k&&(!Cs(f)||!Cs(h))){let T,A;const W=Ec(h),P=Ec(f);if(!Cs(y)&&!isNaN(y)){const V=o.valueAsNumber||y&&+y;Cs(W.value)||(T=V>W.value),Cs(P.value)||(A=V<P.value)}else{const V=o.valueAsDate||new Date(y),Z=ne=>new Date(new Date().toDateString()+" "+ne),Q=o.type=="time",O=o.type=="week";La(W.value)&&y&&(T=Q?Z(y)>Z(W.value):O?y>W.value:V>new Date(W.value)),La(P.value)&&y&&(A=Q?Z(y)<Z(P.value):O?y<P.value:V<new Date(P.value))}if((T||A)&&(M(!!T,W.message,P.message,ti.max,ti.min),!n))return N(C[p].message),C}if((u||d)&&!k&&(La(y)||i&&Array.isArray(y))){const T=Ec(u),A=Ec(d),W=!Cs(T.value)&&y.length>+T.value,P=!Cs(A.value)&&y.length<+A.value;if((W||P)&&(M(W,T.message,A.message),!n))return N(C[p].message),C}if(m&&!k&&La(y)){const{value:T,message:A}=Ec(m);if(Gp(T)&&!y.match(T)&&(C[p]={type:ti.pattern,message:A,ref:o,...D(ti.pattern,A)},!n))return N(A),C}if(v){if(sa(v)){const T=await v(y,r),A=I_(T,b);if(A&&(C[p]={...A,...D(ti.validate,A.message)},!n))return N(A.message),C}else if(vr(v)){let T={};for(const A in v){if(!Ls(T)&&!n)break;const W=I_(await v[A](y,r),b,A);W&&(T={...W,...D(A,W.message)},N(W.message),n&&(C[p]=T))}if(!Ls(T)&&(C[p]={ref:b,...T},!n))return C}}return N(!0),C};const DX={mode:ra.onSubmit,reValidateMode:ra.onChange,shouldFocusError:!0};function OX(e={}){let t={...DX,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:sa(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},a=vr(t.defaultValues)||vr(t.values)?Dr(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Dr(a),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const h={array:S_(),state:S_()},m=t.criteriaMode===ra.all,v=G=>re=>{clearTimeout(u),u=setTimeout(G,re)},p=async G=>{if(!t.disabled&&(d.isValid||f.isValid||G)){const re=t.resolver?Ls((await j()).errors):await k(n,!0);re!==r.isValid&&h.state.next({isValid:re})}},x=(G,re)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((G||Array.from(l.mount)).forEach(ce=>{ce&&(re?Mt(r.validatingFields,ce,re):br(r.validatingFields,ce))}),h.state.next({validatingFields:r.validatingFields,isValidating:!Ls(r.validatingFields)}))},w=(G,re=[],ce,_e,we=!0,ye=!0)=>{if(_e&&ce&&!t.disabled){if(o.action=!0,ye&&Array.isArray(Le(n,G))){const Te=ce(Le(n,G),_e.argA,_e.argB);we&&Mt(n,G,Te)}if(ye&&Array.isArray(Le(r.errors,G))){const Te=ce(Le(r.errors,G),_e.argA,_e.argB);we&&Mt(r.errors,G,Te),AX(r.errors,G)}if((d.touchedFields||f.touchedFields)&&ye&&Array.isArray(Le(r.touchedFields,G))){const Te=ce(Le(r.touchedFields,G),_e.argA,_e.argB);we&&Mt(r.touchedFields,G,Te)}(d.dirtyFields||f.dirtyFields)&&(r.dirtyFields=kd(a,i)),h.state.next({name:G,isDirty:M(G,re),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Mt(i,G,re)},y=(G,re)=>{Mt(r.errors,G,re),h.state.next({errors:r.errors})},b=G=>{r.errors=G,h.state.next({errors:r.errors,isValid:!1})},N=(G,re,ce,_e)=>{const we=Le(n,G);if(we){const ye=Le(i,G,pr(ce)?Le(a,G):ce);pr(ye)||_e&&_e.defaultChecked||re?Mt(i,G,re?ye:A_(we._f)):W(G,ye),o.mount&&p()}},C=(G,re,ce,_e,we)=>{let ye=!1,Te=!1;const Ze={name:G};if(!t.disabled){if(!ce||_e){(d.isDirty||f.isDirty)&&(Te=r.isDirty,r.isDirty=Ze.isDirty=M(),ye=Te!==Ze.isDirty);const ot=li(Le(a,G),re);Te=!!Le(r.dirtyFields,G),ot?br(r.dirtyFields,G):Mt(r.dirtyFields,G,!0),Ze.dirtyFields=r.dirtyFields,ye=ye||(d.dirtyFields||f.dirtyFields)&&Te!==!ot}if(ce){const ot=Le(r.touchedFields,G);ot||(Mt(r.touchedFields,G,ce),Ze.touchedFields=r.touchedFields,ye=ye||(d.touchedFields||f.touchedFields)&&ot!==ce)}ye&&we&&h.state.next(Ze)}return ye?Ze:{}},_=(G,re,ce,_e)=>{const we=Le(r.errors,G),ye=(d.isValid||f.isValid)&&Zs(re)&&r.isValid!==re;if(t.delayError&&ce?(c=v(()=>y(G,ce)),c(t.delayError)):(clearTimeout(u),c=null,ce?Mt(r.errors,G,ce):br(r.errors,G)),(ce?!li(we,ce):we)||!Ls(_e)||ye){const Te={..._e,...ye&&Zs(re)?{isValid:re}:{},errors:r.errors,name:G};r={...r,...Te},h.state.next(Te)}},j=async G=>{x(G,!0);const re=await t.resolver(i,t.context,_X(G||l.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return x(G),re},S=async G=>{const{errors:re}=await j(G);if(G)for(const ce of G){const _e=Le(re,ce);_e?Mt(r.errors,ce,_e):br(r.errors,ce)}else r.errors=re;return re},k=async(G,re,ce={valid:!0})=>{for(const _e in G){const we=G[_e];if(we){const{_f:ye,...Te}=we;if(ye){const Ze=l.array.has(ye.name),ot=we._f&&CX(we._f);ot&&d.validatingFields&&x([_e],!0);const qt=await F_(we,l.disabled,i,m,t.shouldUseNativeValidation&&!re,Ze);if(ot&&d.validatingFields&&x([_e]),qt[ye.name]&&(ce.valid=!1,re))break;!re&&(Le(qt,ye.name)?Ze?RX(r.errors,qt,ye.name):Mt(r.errors,ye.name,qt[ye.name]):br(r.errors,ye.name))}!Ls(Te)&&await k(Te,re,ce)}}return ce.valid},D=()=>{for(const G of l.unMount){const re=Le(n,G);re&&(re._f.refs?re._f.refs.every(ce=>!Eg(ce)):!Eg(re._f.ref))&&J(G)}l.unMount=new Set},M=(G,re)=>!t.disabled&&(G&&re&&Mt(i,G,re),!li(ne(),a)),T=(G,re,ce)=>EO(G,l,{...o.mount?i:pr(re)?a:La(G)?{[G]:re}:re},ce,re),A=G=>Tw(Le(o.mount?i:a,G,t.shouldUnregister?Le(a,G,[]):[])),W=(G,re,ce={})=>{const _e=Le(n,G);let we=re;if(_e){const ye=_e._f;ye&&(!ye.disabled&&Mt(i,G,OO(re,ye)),we=Hp(ye.ref)&&Cs(re)?"":re,TO(ye.ref)?[...ye.ref.options].forEach(Te=>Te.selected=we.includes(Te.value)):ye.refs?Rh(ye.ref)?ye.refs.forEach(Te=>{(!Te.defaultChecked||!Te.disabled)&&(Array.isArray(we)?Te.checked=!!we.find(Ze=>Ze===Te.value):Te.checked=we===Te.value||!!we)}):ye.refs.forEach(Te=>Te.checked=Te.value===we):Ow(ye.ref)?ye.ref.value="":(ye.ref.value=we,ye.ref.type||h.state.next({name:G,values:Dr(i)})))}(ce.shouldDirty||ce.shouldTouch)&&C(G,we,ce.shouldTouch,ce.shouldDirty,!0),ce.shouldValidate&&O(G)},P=(G,re,ce)=>{for(const _e in re){if(!re.hasOwnProperty(_e))return;const we=re[_e],ye=G+"."+_e,Te=Le(n,ye);(l.array.has(G)||vr(we)||Te&&!Te._f)&&!gl(we)?P(ye,we,ce):W(ye,we,ce)}},V=(G,re,ce={})=>{const _e=Le(n,G),we=l.array.has(G),ye=Dr(re);Mt(i,G,ye),we?(h.array.next({name:G,values:Dr(i)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&ce.shouldDirty&&h.state.next({name:G,dirtyFields:kd(a,i),isDirty:M(G,ye)})):_e&&!_e._f&&!Cs(ye)?P(G,ye,ce):W(G,ye,ce),O_(G,l)&&h.state.next({...r,name:G}),h.state.next({name:o.mount?G:void 0,values:Dr(i)})},Z=async G=>{o.mount=!0;const re=G.target;let ce=re.name,_e=!0;const we=Le(n,ce),ye=ot=>{_e=Number.isNaN(ot)||gl(ot)&&isNaN(ot.getTime())||li(ot,Le(i,ce,ot))},Te=R_(t.mode),Ze=R_(t.reValidateMode);if(we){let ot,qt;const st=re.type?A_(we._f):_O(G),Et=G.type===Vp.BLUR||G.type===Vp.FOCUS_OUT,Ar=!SX(we._f)&&!t.resolver&&!Le(r.errors,ce)&&!we._f.deps||TX(Et,Le(r.touchedFields,ce),r.isSubmitted,Ze,Te),_t=O_(ce,l,Et);Mt(i,ce,st),Et?(we._f.onBlur&&we._f.onBlur(G),c&&c(0)):we._f.onChange&&we._f.onChange(G);const or=C(ce,st,Et),Qa=!Ls(or)||_t;if(!Et&&h.state.next({name:ce,type:G.type,values:Dr(i)}),Ar)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?Et&&p():Et||p()),Qa&&h.state.next({name:ce,..._t?{}:or});if(!Et&&_t&&h.state.next({...r}),t.resolver){const{errors:$n}=await j([ce]);if(ye(st),_e){const dd=P_(r.errors,n,ce),tl=P_($n,n,dd.name||ce);ot=tl.error,ce=tl.name,qt=Ls($n)}}else x([ce],!0),ot=(await F_(we,l.disabled,i,m,t.shouldUseNativeValidation))[ce],x([ce]),ye(st),_e&&(ot?qt=!1:(d.isValid||f.isValid)&&(qt=await k(n,!0)));_e&&(we._f.deps&&O(we._f.deps),_(ce,qt,ot,or))}},Q=(G,re)=>{if(Le(r.errors,re)&&G.focus)return G.focus(),1},O=async(G,re={})=>{let ce,_e;const we=of(G);if(t.resolver){const ye=await S(pr(G)?G:we);ce=Ls(ye),_e=G?!we.some(Te=>Le(ye,Te)):ce}else G?(_e=(await Promise.all(we.map(async ye=>{const Te=Le(n,ye);return await k(Te&&Te._f?{[ye]:Te}:Te)}))).every(Boolean),!(!_e&&!r.isValid)&&p()):_e=ce=await k(n);return h.state.next({...!La(G)||(d.isValid||f.isValid)&&ce!==r.isValid?{}:{name:G},...t.resolver||!G?{isValid:ce}:{},errors:r.errors}),re.shouldFocus&&!_e&&lf(n,Q,G?we:l.mount),_e},ne=G=>{const re={...o.mount?i:a};return pr(G)?re:La(G)?Le(re,G):G.map(ce=>Le(re,ce))},he=(G,re)=>({invalid:!!Le((re||r).errors,G),isDirty:!!Le((re||r).dirtyFields,G),error:Le((re||r).errors,G),isValidating:!!Le(r.validatingFields,G),isTouched:!!Le((re||r).touchedFields,G)}),I=G=>{G&&of(G).forEach(re=>br(r.errors,re)),h.state.next({errors:G?r.errors:{}})},Y=(G,re,ce)=>{const _e=(Le(n,G,{_f:{}})._f||{}).ref,we=Le(r.errors,G)||{},{ref:ye,message:Te,type:Ze,...ot}=we;Mt(r.errors,G,{...ot,...re,ref:_e}),h.state.next({name:G,errors:r.errors,isValid:!1}),ce&&ce.shouldFocus&&_e&&_e.focus&&_e.focus()},E=(G,re)=>sa(G)?h.state.subscribe({next:ce=>"values"in ce&&G(T(void 0,re),ce)}):T(G,re,!0),B=G=>h.state.subscribe({next:re=>{kX(G.name,re.name,G.exact)&&EX(re,G.formState||d,ge,G.reRenderRoot)&&G.callback({values:{...i},...r,...re,defaultValues:a})}}).unsubscribe,ee=G=>(o.mount=!0,f={...f,...G.formState},B({...G,formState:f})),J=(G,re={})=>{for(const ce of G?of(G):l.mount)l.mount.delete(ce),l.array.delete(ce),re.keepValue||(br(n,ce),br(i,ce)),!re.keepError&&br(r.errors,ce),!re.keepDirty&&br(r.dirtyFields,ce),!re.keepTouched&&br(r.touchedFields,ce),!re.keepIsValidating&&br(r.validatingFields,ce),!t.shouldUnregister&&!re.keepDefaultValue&&br(a,ce);h.state.next({values:Dr(i)}),h.state.next({...r,...re.keepDirty?{isDirty:M()}:{}}),!re.keepIsValid&&p()},K=({disabled:G,name:re})=>{(Zs(G)&&o.mount||G||l.disabled.has(re))&&(G?l.disabled.add(re):l.disabled.delete(re))},ae=(G,re={})=>{let ce=Le(n,G);const _e=Zs(re.disabled)||Zs(t.disabled);return Mt(n,G,{...ce||{},_f:{...ce&&ce._f?ce._f:{ref:{name:G}},name:G,mount:!0,...re}}),l.mount.add(G),ce?K({disabled:Zs(re.disabled)?re.disabled:t.disabled,name:G}):N(G,!0,re.value),{..._e?{disabled:re.disabled||t.disabled}:{},...t.progressive?{required:!!re.required,min:Td(re.min),max:Td(re.max),minLength:Td(re.minLength),maxLength:Td(re.maxLength),pattern:Td(re.pattern)}:{},name:G,onChange:Z,onBlur:Z,ref:we=>{if(we){ae(G,re),ce=Le(n,G);const ye=pr(we.value)&&we.querySelectorAll&&we.querySelectorAll("input,select,textarea")[0]||we,Te=wX(ye),Ze=ce._f.refs||[];if(Te?Ze.find(ot=>ot===ye):ye===ce._f.ref)return;Mt(n,G,{_f:{...ce._f,...Te?{refs:[...Ze.filter(Eg),ye,...Array.isArray(Le(a,G))?[{}]:[]],ref:{type:ye.type,name:G}}:{ref:ye}}}),N(G,!1,void 0,ye)}else ce=Le(n,G,{}),ce._f&&(ce._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(CO(l.array,G)&&o.action)&&l.unMount.add(G)}}},te=()=>t.shouldFocusError&&lf(n,Q,l.mount),xe=G=>{Zs(G)&&(h.state.next({disabled:G}),lf(n,(re,ce)=>{const _e=Le(n,ce);_e&&(re.disabled=_e._f.disabled||G,Array.isArray(_e._f.refs)&&_e._f.refs.forEach(we=>{we.disabled=_e._f.disabled||G}))},0,!1))},F=(G,re)=>async ce=>{let _e;ce&&(ce.preventDefault&&ce.preventDefault(),ce.persist&&ce.persist());let we=Dr(i);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:ye,values:Te}=await j();r.errors=ye,we=Dr(Te)}else await k(n);if(l.disabled.size)for(const ye of l.disabled)br(we,ye);if(br(r.errors,"root"),Ls(r.errors)){h.state.next({errors:{}});try{await G(we,ce)}catch(ye){_e=ye}}else re&&await re({...r.errors},ce),te(),setTimeout(te);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ls(r.errors)&&!_e,submitCount:r.submitCount+1,errors:r.errors}),_e)throw _e},We=(G,re={})=>{Le(n,G)&&(pr(re.defaultValue)?V(G,Dr(Le(a,G))):(V(G,re.defaultValue),Mt(a,G,Dr(re.defaultValue))),re.keepTouched||br(r.touchedFields,G),re.keepDirty||(br(r.dirtyFields,G),r.isDirty=re.defaultValue?M(G,Dr(Le(a,G))):M()),re.keepError||(br(r.errors,G),d.isValid&&p()),h.state.next({...r}))},je=(G,re={})=>{const ce=G?Dr(G):a,_e=Dr(ce),we=Ls(G),ye=we?a:_e;if(re.keepDefaultValues||(a=ce),!re.keepValues){if(re.keepDirtyValues){const Te=new Set([...l.mount,...Object.keys(kd(a,i))]);for(const Ze of Array.from(Te))Le(r.dirtyFields,Ze)?Mt(ye,Ze,Le(i,Ze)):V(Ze,Le(ye,Ze))}else{if(kw&&pr(G))for(const Te of l.mount){const Ze=Le(n,Te);if(Ze&&Ze._f){const ot=Array.isArray(Ze._f.refs)?Ze._f.refs[0]:Ze._f.ref;if(Hp(ot)){const qt=ot.closest("form");if(qt){qt.reset();break}}}}if(re.keepFieldsRef)for(const Te of l.mount)V(Te,Le(ye,Te));else n={}}i=t.shouldUnregister?re.keepDefaultValues?Dr(a):{}:Dr(ye),h.array.next({values:{...ye}}),h.state.next({values:{...ye}})}l={mount:re.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!re.keepIsValid||!!re.keepDirtyValues,o.watch=!!t.shouldUnregister,h.state.next({submitCount:re.keepSubmitCount?r.submitCount:0,isDirty:we?!1:re.keepDirty?r.isDirty:!!(re.keepDefaultValues&&!li(G,a)),isSubmitted:re.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:we?{}:re.keepDirtyValues?re.keepDefaultValues&&i?kd(a,i):r.dirtyFields:re.keepDefaultValues&&G?kd(a,G):re.keepDirty?r.dirtyFields:{},touchedFields:re.keepTouched?r.touchedFields:{},errors:re.keepErrors?r.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Oe=(G,re)=>je(sa(G)?G(i):G,re),Ne=(G,re={})=>{const ce=Le(n,G),_e=ce&&ce._f;if(_e){const we=_e.refs?_e.refs[0]:_e.ref;we.focus&&(we.focus(),re.shouldSelect&&sa(we.select)&&we.select())}},ge=G=>{r={...r,...G}},Xe={control:{register:ae,unregister:J,getFieldState:he,handleSubmit:F,setError:Y,_subscribe:B,_runSchema:j,_focusError:te,_getWatch:T,_getDirty:M,_setValid:p,_setFieldArray:w,_setDisabledField:K,_setErrors:b,_getFieldArray:A,_reset:je,_resetDefaultValues:()=>sa(t.defaultValues)&&t.defaultValues().then(G=>{Oe(G,t.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:D,_disableForm:xe,_subjects:h,_proxyFormState:d,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(G){o=G},get _defaultValues(){return a},get _names(){return l},set _names(G){l=G},get _formState(){return r},get _options(){return t},set _options(G){t={...t,...G}}},subscribe:ee,trigger:O,register:ae,handleSubmit:F,watch:E,setValue:V,getValues:ne,reset:Oe,resetField:We,clearErrors:I,unregister:J,setError:Y,setFocus:Ne,getFieldState:he};return{...Xe,formControl:Xe}}function Iw(e={}){const t=de.useRef(void 0),r=de.useRef(void 0),[n,a]=de.useState({isDirty:!1,isValidating:!1,isLoading:sa(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:sa(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!sa(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...l}=OX(e);t.current={...l,formState:n}}const i=t.current.control;return i._options=e,Dw(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(l=>({...l,isReady:!0})),i._formState.isReady=!0,o},[i]),de.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),de.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),de.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),de.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),de.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),de.useEffect(()=>{e.values&&!li(e.values,r.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),r.current=e.values,a(o=>({...o}))):i._resetDefaultValues()},[i,e.values]),de.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=SO(n,i),t.current}const L_=(e,t,r)=>{if(e&&"reportValidity"in e){const n=Le(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},IO=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?L_(n.ref,r,e):n.refs&&n.refs.forEach(a=>L_(a,r,e))}},PX=(e,t)=>{t.shouldUseNativeValidation&&IO(e,t);const r={};for(const n in e){const a=Le(t.fields,n),i=Object.assign(e[n]||{},{ref:a&&a.ref});if(IX(t.names||Object.keys(e),n)){const o=Object.assign({},Le(r,n));Mt(o,"root",i),Mt(r,n,o)}else Mt(r,n,i)}return r},IX=(e,t)=>e.some(r=>r.startsWith(t+"."));var FX=function(e,t){for(var r={};e.length;){var n=e[0],a=n.code,i=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var l=n.unionErrors[0].errors[0];r[o]={message:l.message,type:l.code}}else r[o]={message:i,type:a};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var c=r[o].types,u=c&&c[n.code];r[o]=kO(o,t,r,a,u?[].concat(u,n.message):n.message)}e.shift()}return r},Fw=function(e,t,r){return r===void 0&&(r={}),function(n,a,i){try{return Promise.resolve(function(o,l){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(u){return i.shouldUseNativeValidation&&IO({},i),{errors:{},values:r.raw?n:u}})}catch(u){return l(u)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(o))return{values:{},errors:PX(FX(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},Pt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function r(a){throw new Error}e.assertNever=r,e.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(l=>typeof a[a[l]]!="number"),o={};for(const l of i)o[l]=a[l];return e.objectValues(o)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},e.find=(a,i)=>{for(const o of a)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Pt||(Pt={}));var M_;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(M_||(M_={}));const Ge=Pt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qi=e=>{switch(typeof e){case"undefined":return Ge.undefined;case"string":return Ge.string;case"number":return Number.isNaN(e)?Ge.nan:Ge.number;case"boolean":return Ge.boolean;case"function":return Ge.function;case"bigint":return Ge.bigint;case"symbol":return Ge.symbol;case"object":return Array.isArray(e)?Ge.array:e===null?Ge.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ge.promise:typeof Map<"u"&&e instanceof Map?Ge.map:typeof Set<"u"&&e instanceof Set?Ge.set:typeof Date<"u"&&e instanceof Date?Ge.date:Ge.object;default:return Ge.unknown}},Re=Pt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ki extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(i){return i.message},n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let l=n,c=0;for(;c<o.path.length;){const u=o.path[c];c===o.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(r(o))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return a(this),n}static assert(t){if(!(t instanceof ki))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];r[i]=r[i]||[],r[i].push(t(a))}else n.push(t(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}ki.create=e=>new ki(e);const L1=(e,t)=>{let r;switch(e.code){case Re.invalid_type:e.received===Ge.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Re.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Pt.jsonStringifyReplacer)}`;break;case Re.unrecognized_keys:r=`Unrecognized key(s) in object: ${Pt.joinValues(e.keys,", ")}`;break;case Re.invalid_union:r="Invalid input";break;case Re.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Pt.joinValues(e.options)}`;break;case Re.invalid_enum_value:r=`Invalid enum value. Expected ${Pt.joinValues(e.options)}, received '${e.received}'`;break;case Re.invalid_arguments:r="Invalid function arguments";break;case Re.invalid_return_type:r="Invalid function return type";break;case Re.invalid_date:r="Invalid date";break;case Re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Pt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Re.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Re.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Re.custom:r="Invalid input";break;case Re.invalid_intersection_types:r="Intersection results could not be merged";break;case Re.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Re.not_finite:r="Number must be finite";break;default:r=t.defaultError,Pt.assertNever(e)}return{message:r}};let LX=L1;function MX(){return LX}const BX=e=>{const{data:t,path:r,errorMaps:n,issueData:a}=e,i=[...r,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let l="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)l=u(o,{data:t,defaultError:l}).message;return{...a,path:i,message:l}};function qe(e,t){const r=MX(),n=BX({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===L1?void 0:L1].filter(a=>!!a)});e.common.issues.push(n)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const a of r){if(a.status==="aborted")return ht;a.status==="dirty"&&t.dirty(),n.push(a.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const a of r){const i=await a.key,o=await a.value;n.push({key:i,value:o})}return hn.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const a of r){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return ht;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const ht=Object.freeze({status:"aborted"}),Bd=e=>({status:"dirty",value:e}),Bn=e=>({status:"valid",value:e}),B_=e=>e.status==="aborted",U_=e=>e.status==="dirty",Lu=e=>e.status==="valid",Kp=e=>typeof Promise<"u"&&e instanceof Promise;var Ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ke||(Ke={}));class qo{constructor(t,r,n,a){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const $_=(e,t)=>{if(Lu(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new ki(e.common.issues);return this._error=r,this._error}}};function jt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:a}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(o,l)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??l.defaultError}:typeof l.data>"u"?{message:c??n??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:c??r??l.defaultError}},description:a}}class Dt{get description(){return this._def.description}_getType(t){return Qi(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Qi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:Qi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Kp(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qi(t)},a=this._parseSync({data:t,path:n.path,parent:n});return $_(n,a)}"~validate"(t){var n,a;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qi(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:r});return Lu(i)?{value:i.value}:{issues:r.common.issues}}catch(i){(a=(n=i==null?void 0:i.message)==null?void 0:n.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(i=>Lu(i)?{value:i.value}:{issues:r.common.issues})}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qi(t)},a=this._parse({data:t,path:n.path,parent:n}),i=await(Kp(a)?a:Promise.resolve(a));return $_(n,i)}refine(t,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,i)=>{const o=t(a),l=()=>i.addIssue({code:Re.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,a)=>t(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(t){return new Bu({schema:this,typeName:mt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ao.create(this,this._def)}nullable(){return Uu.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return za.create(this)}promise(){return Jp.create(this,this._def)}or(t){return Xp.create([this,t],this._def)}and(t){return Qp.create(this,t,this._def)}transform(t){return new Bu({...jt(this._def),schema:this,typeName:mt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new U1({...jt(this._def),innerType:this,defaultValue:r,typeName:mt.ZodDefault})}brand(){return new lQ({typeName:mt.ZodBranded,type:this,...jt(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new $1({...jt(this._def),innerType:this,catchValue:r,typeName:mt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Lw.create(this,t)}readonly(){return q1.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const UX=/^c[^\s-]{8,}$/i,$X=/^[0-9a-z]+$/,qX=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zX=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,VX=/^[a-z0-9_-]{21}$/i,HX=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,WX=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,GX=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,KX="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let kg;const YX=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,XX=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,QX=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,JX=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ZX=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eQ=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,FO="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",tQ=new RegExp(`^${FO}$`);function LO(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function rQ(e){return new RegExp(`^${LO(e)}$`)}function sQ(e){let t=`${FO}T${LO(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function nQ(e,t){return!!((t==="v4"||!t)&&YX.test(e)||(t==="v6"||!t)&&QX.test(e))}function aQ(e,t){if(!HX.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function iQ(e,t){return!!((t==="v4"||!t)&&XX.test(e)||(t==="v6"||!t)&&JX.test(e))}class xo extends Dt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ge.string){const i=this._getOrReturnCtx(t);return qe(i,{code:Re.invalid_type,expected:Ge.string,received:i.parsedType}),ht}const n=new hn;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,l=t.data.length<i.value;(o||l)&&(a=this._getOrReturnCtx(t,a),o?qe(a,{code:Re.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&qe(a,{code:Re.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")GX.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"email",code:Re.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")kg||(kg=new RegExp(KX,"u")),kg.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"emoji",code:Re.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")zX.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"uuid",code:Re.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")VX.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"nanoid",code:Re.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")UX.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"cuid",code:Re.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")$X.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"cuid2",code:Re.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")qX.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"ulid",code:Re.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),qe(a,{validation:"url",code:Re.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"regex",code:Re.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?sQ(i).test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?tQ.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?rQ(i).test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?WX.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"duration",code:Re.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?nQ(t.data,i.version)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"ip",code:Re.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?aQ(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"jwt",code:Re.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?iQ(t.data,i.version)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"cidr",code:Re.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?ZX.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"base64",code:Re.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?eQ.test(t.data)||(a=this._getOrReturnCtx(t,a),qe(a,{validation:"base64url",code:Re.invalid_string,message:i.message}),n.dirty()):Pt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(a=>t.test(a),{validation:r,code:Re.invalid_string,...Ke.errToObj(n)})}_addCheck(t){return new xo({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ke.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Ke.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ke.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ke.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ke.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ke.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ke.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ke.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ke.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ke.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ke.errToObj(r)})}nonempty(t){return this.min(1,Ke.errToObj(t))}trim(){return new xo({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new xo({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new xo({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}xo.create=e=>new xo({checks:[],typeName:mt.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...jt(e)});function oQ(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n,i=Number.parseInt(e.toFixed(a).replace(".","")),o=Number.parseInt(t.toFixed(a).replace(".",""));return i%o/10**a}class Jf extends Dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ge.number){const i=this._getOrReturnCtx(t);return qe(i,{code:Re.invalid_type,expected:Ge.number,received:i.parsedType}),ht}let n;const a=new hn;for(const i of this._def.checks)i.kind==="int"?Pt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),qe(n,{code:Re.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),qe(n,{code:Re.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),qe(n,{code:Re.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?oQ(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),qe(n,{code:Re.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),qe(n,{code:Re.not_finite,message:i.message}),a.dirty()):Pt.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ke.toString(r))}setLimit(t,r,n,a){return new Jf({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ke.toString(a)}]})}_addCheck(t){return new Jf({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ke.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Pt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Jf.create=e=>new Jf({checks:[],typeName:mt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...jt(e)});class Zf extends Dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ge.bigint)return this._getInvalidInput(t);let n;const a=new hn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),qe(n,{code:Re.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),qe(n,{code:Re.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),qe(n,{code:Re.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Pt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return qe(r,{code:Re.invalid_type,expected:Ge.bigint,received:r.parsedType}),ht}gte(t,r){return this.setLimit("min",t,!0,Ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ke.toString(r))}setLimit(t,r,n,a){return new Zf({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ke.toString(a)}]})}_addCheck(t){return new Zf({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Zf.create=e=>new Zf({checks:[],typeName:mt.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...jt(e)});class M1 extends Dt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ge.boolean){const n=this._getOrReturnCtx(t);return qe(n,{code:Re.invalid_type,expected:Ge.boolean,received:n.parsedType}),ht}return Bn(t.data)}}M1.create=e=>new M1({typeName:mt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...jt(e)});class Yp extends Dt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ge.date){const i=this._getOrReturnCtx(t);return qe(i,{code:Re.invalid_type,expected:Ge.date,received:i.parsedType}),ht}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return qe(i,{code:Re.invalid_date}),ht}const n=new hn;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),qe(a,{code:Re.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Pt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yp({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ke.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ke.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Yp.create=e=>new Yp({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:mt.ZodDate,...jt(e)});class q_ extends Dt{_parse(t){if(this._getType(t)!==Ge.symbol){const n=this._getOrReturnCtx(t);return qe(n,{code:Re.invalid_type,expected:Ge.symbol,received:n.parsedType}),ht}return Bn(t.data)}}q_.create=e=>new q_({typeName:mt.ZodSymbol,...jt(e)});class z_ extends Dt{_parse(t){if(this._getType(t)!==Ge.undefined){const n=this._getOrReturnCtx(t);return qe(n,{code:Re.invalid_type,expected:Ge.undefined,received:n.parsedType}),ht}return Bn(t.data)}}z_.create=e=>new z_({typeName:mt.ZodUndefined,...jt(e)});class V_ extends Dt{_parse(t){if(this._getType(t)!==Ge.null){const n=this._getOrReturnCtx(t);return qe(n,{code:Re.invalid_type,expected:Ge.null,received:n.parsedType}),ht}return Bn(t.data)}}V_.create=e=>new V_({typeName:mt.ZodNull,...jt(e)});class H_ extends Dt{constructor(){super(...arguments),this._any=!0}_parse(t){return Bn(t.data)}}H_.create=e=>new H_({typeName:mt.ZodAny,...jt(e)});class W_ extends Dt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Bn(t.data)}}W_.create=e=>new W_({typeName:mt.ZodUnknown,...jt(e)});class zo extends Dt{_parse(t){const r=this._getOrReturnCtx(t);return qe(r,{code:Re.invalid_type,expected:Ge.never,received:r.parsedType}),ht}}zo.create=e=>new zo({typeName:mt.ZodNever,...jt(e)});class G_ extends Dt{_parse(t){if(this._getType(t)!==Ge.undefined){const n=this._getOrReturnCtx(t);return qe(n,{code:Re.invalid_type,expected:Ge.void,received:n.parsedType}),ht}return Bn(t.data)}}G_.create=e=>new G_({typeName:mt.ZodVoid,...jt(e)});class za extends Dt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),a=this._def;if(r.parsedType!==Ge.array)return qe(r,{code:Re.invalid_type,expected:Ge.array,received:r.parsedType}),ht;if(a.exactLength!==null){const o=r.data.length>a.exactLength.value,l=r.data.length<a.exactLength.value;(o||l)&&(qe(r,{code:o?Re.too_big:Re.too_small,minimum:l?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(qe(r,{code:Re.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(qe(r,{code:Re.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,l)=>a.type._parseAsync(new qo(r,o,r.path,l)))).then(o=>hn.mergeArray(n,o));const i=[...r.data].map((o,l)=>a.type._parseSync(new qo(r,o,r.path,l)));return hn.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new za({...this._def,minLength:{value:t,message:Ke.toString(r)}})}max(t,r){return new za({...this._def,maxLength:{value:t,message:Ke.toString(r)}})}length(t,r){return new za({...this._def,exactLength:{value:t,message:Ke.toString(r)}})}nonempty(t){return this.min(1,t)}}za.create=(e,t)=>new za({type:e,minLength:null,maxLength:null,exactLength:null,typeName:mt.ZodArray,...jt(t)});function Dc(e){if(e instanceof _r){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Ao.create(Dc(n))}return new _r({...e._def,shape:()=>t})}else return e instanceof za?new za({...e._def,type:Dc(e.element)}):e instanceof Ao?Ao.create(Dc(e.unwrap())):e instanceof Uu?Uu.create(Dc(e.unwrap())):e instanceof Ql?Ql.create(e.items.map(t=>Dc(t))):e}class _r extends Dt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Pt.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==Ge.object){const u=this._getOrReturnCtx(t);return qe(u,{code:Re.invalid_type,expected:Ge.object,received:u.parsedType}),ht}const{status:n,ctx:a}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof zo&&this._def.unknownKeys==="strip"))for(const u in a.data)o.includes(u)||l.push(u);const c=[];for(const u of o){const d=i[u],f=a.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new qo(a,f,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof zo){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of l)c.push({key:{status:"valid",value:d},value:{status:"valid",value:a.data[d]}});else if(u==="strict")l.length>0&&(qe(a,{code:Re.unrecognized_keys,keys:l}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of l){const f=a.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new qo(a,f,a.path,d)),alwaysSet:d in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of c){const f=await d.key,h=await d.value;u.push({key:f,value:h,alwaysSet:d.alwaysSet})}return u}).then(u=>hn.mergeObjectSync(n,u)):hn.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Ke.errToObj,new _r({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,o;const a=((o=(i=this._def).errorMap)==null?void 0:o.call(i,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:Ke.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new _r({...this._def,unknownKeys:"strip"})}passthrough(){return new _r({...this._def,unknownKeys:"passthrough"})}extend(t){return new _r({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _r({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:mt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new _r({...this._def,catchall:t})}pick(t){const r={};for(const n of Pt.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new _r({...this._def,shape:()=>r})}omit(t){const r={};for(const n of Pt.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new _r({...this._def,shape:()=>r})}deepPartial(){return Dc(this)}partial(t){const r={};for(const n of Pt.objectKeys(this.shape)){const a=this.shape[n];t&&!t[n]?r[n]=a:r[n]=a.optional()}return new _r({...this._def,shape:()=>r})}required(t){const r={};for(const n of Pt.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ao;)i=i._def.innerType;r[n]=i}return new _r({...this._def,shape:()=>r})}keyof(){return MO(Pt.objectKeys(this.shape))}}_r.create=(e,t)=>new _r({shape:()=>e,unknownKeys:"strip",catchall:zo.create(),typeName:mt.ZodObject,...jt(t)});_r.strictCreate=(e,t)=>new _r({shape:()=>e,unknownKeys:"strict",catchall:zo.create(),typeName:mt.ZodObject,...jt(t)});_r.lazycreate=(e,t)=>new _r({shape:e,unknownKeys:"strip",catchall:zo.create(),typeName:mt.ZodObject,...jt(t)});class Xp extends Dt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function a(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const o=i.map(l=>new ki(l.ctx.common.issues));return qe(r,{code:Re.invalid_union,unionErrors:o}),ht}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const c of n){const u={...r,common:{...r.common,issues:[]},parent:null},d=c._parseSync({data:r.data,path:r.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const l=o.map(c=>new ki(c));return qe(r,{code:Re.invalid_union,unionErrors:l}),ht}}get options(){return this._def.options}}Xp.create=(e,t)=>new Xp({options:e,typeName:mt.ZodUnion,...jt(t)});function B1(e,t){const r=Qi(e),n=Qi(t);if(e===t)return{valid:!0,data:e};if(r===Ge.object&&n===Ge.object){const a=Pt.objectKeys(t),i=Pt.objectKeys(e).filter(l=>a.indexOf(l)!==-1),o={...e,...t};for(const l of i){const c=B1(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(r===Ge.array&&n===Ge.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const o=e[i],l=t[i],c=B1(o,l);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return r===Ge.date&&n===Ge.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Qp extends Dt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=(i,o)=>{if(B_(i)||B_(o))return ht;const l=B1(i.value,o.value);return l.valid?((U_(i)||U_(o))&&r.dirty(),{status:r.value,value:l.data}):(qe(n,{code:Re.invalid_intersection_types}),ht)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Qp.create=(e,t,r)=>new Qp({left:e,right:t,typeName:mt.ZodIntersection,...jt(r)});class Ql extends Dt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.array)return qe(n,{code:Re.invalid_type,expected:Ge.array,received:n.parsedType}),ht;if(n.data.length<this._def.items.length)return qe(n,{code:Re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ht;!this._def.rest&&n.data.length>this._def.items.length&&(qe(n,{code:Re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new qo(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>hn.mergeArray(r,o)):hn.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new Ql({...this._def,rest:t})}}Ql.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ql({items:e,typeName:mt.ZodTuple,rest:null,...jt(t)})};class K_ extends Dt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.map)return qe(n,{code:Re.invalid_type,expected:Ge.map,received:n.parsedType}),ht;const a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([l,c],u)=>({key:a._parse(new qo(n,l,n.path,[u,"key"])),value:i._parse(new qo(n,c,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return ht;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of o){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return ht;(u.status==="dirty"||d.status==="dirty")&&r.dirty(),l.set(u.value,d.value)}return{status:r.value,value:l}}}}K_.create=(e,t,r)=>new K_({valueType:t,keyType:e,typeName:mt.ZodMap,...jt(r)});class eh extends Dt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ge.set)return qe(n,{code:Re.invalid_type,expected:Ge.set,received:n.parsedType}),ht;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(qe(n,{code:Re.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(qe(n,{code:Re.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const i=this._def.valueType;function o(c){const u=new Set;for(const d of c){if(d.status==="aborted")return ht;d.status==="dirty"&&r.dirty(),u.add(d.value)}return{status:r.value,value:u}}const l=[...n.data.values()].map((c,u)=>i._parse(new qo(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,r){return new eh({...this._def,minSize:{value:t,message:Ke.toString(r)}})}max(t,r){return new eh({...this._def,maxSize:{value:t,message:Ke.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}eh.create=(e,t)=>new eh({valueType:e,minSize:null,maxSize:null,typeName:mt.ZodSet,...jt(t)});class Y_ extends Dt{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Y_.create=(e,t)=>new Y_({getter:e,typeName:mt.ZodLazy,...jt(t)});class X_ extends Dt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return qe(r,{received:r.data,code:Re.invalid_literal,expected:this._def.value}),ht}return{status:"valid",value:t.data}}get value(){return this._def.value}}X_.create=(e,t)=>new X_({value:e,typeName:mt.ZodLiteral,...jt(t)});function MO(e,t){return new Mu({values:e,typeName:mt.ZodEnum,...jt(t)})}class Mu extends Dt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return qe(r,{expected:Pt.joinValues(n),received:r.parsedType,code:Re.invalid_type}),ht}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return qe(r,{received:r.data,code:Re.invalid_enum_value,options:n}),ht}return Bn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Mu.create(t,{...this._def,...r})}exclude(t,r=this._def){return Mu.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Mu.create=MO;class Q_ extends Dt{_parse(t){const r=Pt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ge.string&&n.parsedType!==Ge.number){const a=Pt.objectValues(r);return qe(n,{expected:Pt.joinValues(a),received:n.parsedType,code:Re.invalid_type}),ht}if(this._cache||(this._cache=new Set(Pt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Pt.objectValues(r);return qe(n,{received:n.data,code:Re.invalid_enum_value,options:a}),ht}return Bn(t.data)}get enum(){return this._def.values}}Q_.create=(e,t)=>new Q_({values:e,typeName:mt.ZodNativeEnum,...jt(t)});class Jp extends Dt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ge.promise&&r.common.async===!1)return qe(r,{code:Re.invalid_type,expected:Ge.promise,received:r.parsedType}),ht;const n=r.parsedType===Ge.promise?r.data:Promise.resolve(r.data);return Bn(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Jp.create=(e,t)=>new Jp({type:e,typeName:mt.ZodPromise,...jt(t)});class Bu extends Dt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===mt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:o=>{qe(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async l=>{if(r.value==="aborted")return ht;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?ht:c.status==="dirty"||r.value==="dirty"?Bd(c.value):c});{if(r.value==="aborted")return ht;const l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?ht:l.status==="dirty"||r.value==="dirty"?Bd(l.value):l}}if(a.type==="refinement"){const o=l=>{const c=a.refinement(l,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?ht:(l.status==="dirty"&&r.dirty(),o(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?ht:(l.status==="dirty"&&r.dirty(),o(l.value).then(()=>({status:r.value,value:l.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Lu(o))return ht;const l=a.transform(o.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Lu(o)?Promise.resolve(a.transform(o.value,i)).then(l=>({status:r.value,value:l})):ht);Pt.assertNever(a)}}Bu.create=(e,t,r)=>new Bu({schema:e,typeName:mt.ZodEffects,effect:t,...jt(r)});Bu.createWithPreprocess=(e,t,r)=>new Bu({schema:t,effect:{type:"preprocess",transform:e},typeName:mt.ZodEffects,...jt(r)});class Ao extends Dt{_parse(t){return this._getType(t)===Ge.undefined?Bn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ao.create=(e,t)=>new Ao({innerType:e,typeName:mt.ZodOptional,...jt(t)});class Uu extends Dt{_parse(t){return this._getType(t)===Ge.null?Bn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Uu.create=(e,t)=>new Uu({innerType:e,typeName:mt.ZodNullable,...jt(t)});class U1 extends Dt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Ge.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}U1.create=(e,t)=>new U1({innerType:e,typeName:mt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...jt(t)});class $1 extends Dt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Kp(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ki(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ki(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}$1.create=(e,t)=>new $1({innerType:e,typeName:mt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...jt(t)});class J_ extends Dt{_parse(t){if(this._getType(t)!==Ge.nan){const n=this._getOrReturnCtx(t);return qe(n,{code:Re.invalid_type,expected:Ge.nan,received:n.parsedType}),ht}return{status:"valid",value:t.data}}}J_.create=e=>new J_({typeName:mt.ZodNaN,...jt(e)});class lQ extends Dt{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Lw extends Dt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?ht:i.status==="dirty"?(r.dirty(),Bd(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?ht:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(t,r){return new Lw({in:t,out:r,typeName:mt.ZodPipeline})}}class q1 extends Dt{_parse(t){const r=this._def.innerType._parse(t),n=a=>(Lu(a)&&(a.value=Object.freeze(a.value)),a);return Kp(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}q1.create=(e,t)=>new q1({innerType:e,typeName:mt.ZodReadonly,...jt(t)});var mt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(mt||(mt={}));const $r=xo.create,cQ=M1.create;zo.create;za.create;const Mw=_r.create;Xp.create;Qp.create;Ql.create;Mu.create;Jp.create;Ao.create;Uu.create;const Bw=xX,BO=g.createContext({}),Or=({...e})=>s.jsx(BO.Provider,{value:{name:e.name},children:s.jsx(bX,{...e})}),x0=()=>{const e=g.useContext(BO),t=g.useContext(UO),{getFieldState:r,formState:n}=p0(),a=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},UO=g.createContext({}),Cr=g.forwardRef(({className:e,...t},r)=>{const n=g.useId();return s.jsx(UO.Provider,{value:{id:n},children:s.jsx("div",{ref:r,className:Pe("space-y-2",e),...t})})});Cr.displayName="FormItem";const Sr=g.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:a}=x0();return s.jsx(wt,{ref:r,className:Pe(n&&"text-destructive",e),htmlFor:a,...t})});Sr.displayName="FormLabel";const Er=g.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:a,formMessageId:i}=x0();return s.jsx($k,{ref:t,id:n,"aria-describedby":r?`${a} ${i}`:`${a}`,"aria-invalid":!!r,...e})});Er.displayName="FormControl";const uQ=g.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=x0();return s.jsx("p",{ref:r,id:n,className:Pe("text-sm text-muted-foreground",e),...t})});uQ.displayName="FormDescription";const kr=g.forwardRef(({className:e,children:t,...r},n)=>{const{error:a,formMessageId:i}=x0(),o=a?String(a==null?void 0:a.message):t;return o?s.jsx("p",{ref:n,id:i,className:Pe("text-sm font-medium text-destructive",e),...r,children:o}):null});kr.displayName="FormMessage";var Uw="Radio",[dQ,$O]=Yr(Uw),[fQ,hQ]=dQ(Uw),qO=g.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:a=!1,required:i,disabled:o,value:l="on",onCheck:c,form:u,...d}=e,[f,h]=g.useState(null),m=pt(t,x=>h(x)),v=g.useRef(!1),p=f?u||!!f.closest("form"):!0;return s.jsxs(fQ,{scope:r,checked:a,disabled:o,children:[s.jsx(ze.button,{type:"button",role:"radio","aria-checked":a,"data-state":WO(a),"data-disabled":o?"":void 0,disabled:o,value:l,...d,ref:m,onClick:ke(e.onClick,x=>{a||c==null||c(),p&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})}),p&&s.jsx(HO,{control:f,bubbles:!v.current,name:n,value:l,checked:a,required:i,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});qO.displayName=Uw;var zO="RadioIndicator",VO=g.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...a}=e,i=hQ(zO,r);return s.jsx(Xr,{present:n||i.checked,children:s.jsx(ze.span,{"data-state":WO(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t})})});VO.displayName=zO;var mQ="RadioBubbleInput",HO=g.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...a},i)=>{const o=g.useRef(null),l=pt(o,i),c=gw(r),u=fb(t);return g.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==r&&m){const v=new Event("click",{bubbles:n});m.call(d,r),d.dispatchEvent(v)}},[c,r,n]),s.jsx(ze.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});HO.displayName=mQ;function WO(e){return e?"checked":"unchecked"}var pQ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],g0="RadioGroup",[xQ]=Yr(g0,[nd,$O]),GO=nd(),KO=$O(),[gQ,vQ]=xQ(g0),YO=g.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:a,value:i,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...h}=e,m=GO(r),v=ac(u),[p,x]=fn({prop:i,defaultProp:a??null,onChange:f,caller:g0});return s.jsx(gQ,{scope:r,name:n,required:o,disabled:l,value:p,onValueChange:x,children:s.jsx(Lb,{asChild:!0,...m,orientation:c,dir:v,loop:d,children:s.jsx(ze.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:v,...h,ref:t})})})});YO.displayName=g0;var XO="RadioGroupItem",QO=g.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...a}=e,i=vQ(XO,r),o=i.disabled||n,l=GO(r),c=KO(r),u=g.useRef(null),d=pt(t,u),f=i.value===a.value,h=g.useRef(!1);return g.useEffect(()=>{const m=p=>{pQ.includes(p.key)&&(h.current=!0)},v=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",v)}},[]),s.jsx(Mb,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx(qO,{disabled:o,required:i.required,checked:f,...c,...a,name:i.name,ref:d,onCheck:()=>i.onValueChange(a.value),onKeyDown:ke(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:ke(a.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});QO.displayName=XO;var yQ="RadioGroupIndicator",JO=g.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,a=KO(r);return s.jsx(VO,{...a,...n,ref:t})});JO.displayName=yQ;var ZO=YO,eP=QO,bQ=JO;const tP=g.forwardRef(({className:e,...t},r)=>s.jsx(ZO,{className:Pe("grid gap-2",e),...t,ref:r}));tP.displayName=ZO.displayName;const rP=g.forwardRef(({className:e,...t},r)=>s.jsx(eP,{ref:r,className:Pe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(bQ,{className:"flex items-center justify-center",children:s.jsx(v4,{className:"h-2.5 w-2.5 fill-current text-current"})})}));rP.displayName=eP.displayName;const wQ={france:[{id:"mondial_relay",name:"Mondial Relay",description:"Point de retrait",price:4.95,delay:"3-5 jours"},{id:"colissimo",name:"Colissimo",description:"À domicile",price:6,delay:"2-3 jours"},{id:"dhl",name:"DHL",description:"À domicile",price:11,delay:"24-48h"}],outremer:[{id:"colissimo_signature",name:"Colissimo contre signature",description:"À domicile",price:13,delay:"5-10 jours"}],belgique_luxembourg:[{id:"mondial_relay",name:"Mondial Relay",description:"Point de retrait",price:4.95,delay:"3-5 jours"},{id:"colissimo_signature",name:"Colissimo contre signature",description:"À domicile sous 3 jours",price:7.5,delay:"3 jours"},{id:"dhl",name:"DHL",description:"À domicile",price:12.5,delay:"2-3 jours"}],europe:[{id:"dhl",name:"DHL",description:"À domicile",price:12.5,delay:"3-5 jours"}],usa_canada:[{id:"dhl",name:"DHL",description:"À domicile (TVA 0%)",price:18,delay:"5-7 jours"}]},jm=[{value:"FR",label:"France Métropolitaine",zone:"france"},{value:"MC",label:"Monaco",zone:"france"},{value:"GP",label:"Guadeloupe",zone:"outremer"},{value:"MQ",label:"Martinique",zone:"outremer"},{value:"GF",label:"Guyane française",zone:"outremer"},{value:"RE",label:"La Réunion",zone:"outremer"},{value:"YT",label:"Mayotte",zone:"outremer"},{value:"NC",label:"Nouvelle-Calédonie",zone:"outremer"},{value:"PF",label:"Polynésie française",zone:"outremer"},{value:"BE",label:"Belgique",zone:"belgique_luxembourg"},{value:"LU",label:"Luxembourg",zone:"belgique_luxembourg"},{value:"DE",label:"Allemagne",zone:"europe"},{value:"AT",label:"Autriche",zone:"europe"},{value:"BG",label:"Bulgarie",zone:"europe"},{value:"CY",label:"Chypre",zone:"europe"},{value:"HR",label:"Croatie",zone:"europe"},{value:"DK",label:"Danemark",zone:"europe"},{value:"ES",label:"Espagne",zone:"europe"},{value:"EE",label:"Estonie",zone:"europe"},{value:"FI",label:"Finlande",zone:"europe"},{value:"GR",label:"Grèce",zone:"europe"},{value:"HU",label:"Hongrie",zone:"europe"},{value:"IE",label:"Irlande",zone:"europe"},{value:"IT",label:"Italie",zone:"europe"},{value:"IS",label:"Islande",zone:"europe"},{value:"LV",label:"Lettonie",zone:"europe"},{value:"LT",label:"Lituanie",zone:"europe"},{value:"MT",label:"Malte",zone:"europe"},{value:"NO",label:"Norvège",zone:"europe"},{value:"NL",label:"Pays-Bas",zone:"europe"},{value:"PL",label:"Pologne",zone:"europe"},{value:"PT",label:"Portugal",zone:"europe"},{value:"CZ",label:"République tchèque",zone:"europe"},{value:"RO",label:"Roumanie",zone:"europe"},{value:"GB",label:"Royaume-Uni",zone:"europe"},{value:"SK",label:"Slovaquie",zone:"europe"},{value:"SI",label:"Slovénie",zone:"europe"},{value:"SE",label:"Suède",zone:"europe"},{value:"CH",label:"Suisse",zone:"europe"},{value:"US",label:"États-Unis",zone:"usa_canada"},{value:"CA",label:"Canada",zone:"usa_canada"}],jQ=Mw({firstName:$r().min(2,"Le prénom doit contenir au moins 2 caractères").max(50),lastName:$r().min(2,"Le nom doit contenir au moins 2 caractères").max(50),email:$r().email("Email invalide").max(100),phone:$r().min(10,"Numéro de téléphone invalide").max(20),address:$r().min(5,"Adresse invalide").max(200),city:$r().min(2,"Ville invalide").max(100),postalCode:$r().min(4,"Code postal invalide").max(10),country:$r().min(2,"Pays requis"),additionalInfo:$r().max(500).optional()}),NQ=()=>{const e=wa(),{items:t,getEuroItems:r,getLoyaltyItems:n,getEuroTotal:a,getPointsTotal:i,getLoyaltyValue:o,hasLoyaltyItems:l,hasEuroItems:c,clearLoyaltyItems:u}=sd(),[d,f]=g.useState(!1),[h,m]=g.useState("FR"),[v,p]=g.useState(""),x=g.useRef(null),[w,y]=g.useState(null),[b,N]=g.useState(""),[C,_]=g.useState(null),[j,S]=g.useState(null),[k,D]=g.useState(!1),M=Iw({resolver:Fw(jQ),defaultValues:{firstName:"",lastName:"",email:"",phone:"",address:"",city:"",postalCode:"",country:"FR",additionalInfo:""}});g.useEffect(()=>{(async()=>{var te;const{data:{session:ae}}=await be.auth.getSession();if((te=ae==null?void 0:ae.user)!=null&&te.email){S(ae.user.email),M.setValue("email",ae.user.email);const{data:xe}=await be.from("loyalty_points").select("points").eq("email",ae.user.email).maybeSingle();xe&&_(xe.points);const{data:F}=await be.from("profiles").select("first_name, last_name").eq("user_id",ae.user.id).maybeSingle();F&&(F.first_name&&M.setValue("firstName",F.first_name),F.last_name&&M.setValue("lastName",F.last_name))}})()},[]);const A=(K=>{const ae=jm.find(te=>te.value===K);return(ae==null?void 0:ae.zone)||"france"})(h),W=wQ[A];g.useEffect(()=>{W.length>0&&p(W[0].id)},[h]);const P=W.find(K=>K.id===v),V=r(),Z=n(),Q=a(),O=i(),ne=o(),he=v==="mondial_relay"&&Q>=70&&Q>0,I=(P==null?void 0:P.price)||0,Y=he?0:I,E=Q+Y,B=C!==null&&C>=O;if(t.length===0&&!k)return s.jsxs(s.Fragment,{children:[s.jsx(at,{}),s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsxs("div",{className:"text-center",children:[s.jsx(zl,{className:"h-16 w-16 mx-auto text-muted-foreground mb-4"}),s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Votre panier est vide"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Ajoutez des produits pour continuer"}),s.jsx(se,{onClick:()=>e("/"),children:"Retour à la boutique"})]})}),s.jsx(it,{})]});if(k)return s.jsxs(s.Fragment,{children:[s.jsx(at,{}),s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsxs("div",{className:"text-center max-w-lg mx-auto px-4",children:[s.jsx("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6",children:s.jsx(aa,{className:"h-10 w-10 text-green-600"})}),s.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Commande confirmée !"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Votre commande fidélité a été enregistrée. Nous vous contacterons bientôt pour la livraison."}),s.jsxs("p",{className:"text-lg font-medium text-primary mb-8",children:[O.toLocaleString()," points ont été déduits de votre compte."]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx(se,{onClick:()=>e("/"),children:"Retour à la boutique"}),s.jsx(se,{variant:"outline",onClick:()=>e("/mon-compte"),children:"Mon compte"})]})]})}),s.jsx(it,{})]});g.useEffect(()=>{w&&x.current&&x.current.submit()},[w]);const ee=async K=>{var ae;if(!Z.length||!j)return!0;try{const te=jm.find(Me=>Me.value===K.country),xe=Z.map(Me=>({email:j,product_name:`${Me.productName}${Me.quantity>1?` (x${Me.quantity})`:""}`,product_slug:Me.productSlug,points_used:(Me.pointsCost||0)*Me.quantity,euro_value:Me.price*Me.quantity,variant_name:Me.quantity>1?`Quantité: ${Me.quantity}`:null,status:"pending",shipping_address:{first_name:K.firstName,last_name:K.lastName,address:K.address,city:K.city,postal_code:K.postalCode,country:(te==null?void 0:te.label)||"France",country_code:K.country,phone:K.phone,additional_info:K.additionalInfo,delivery_option:{id:P==null?void 0:P.id,name:P==null?void 0:P.name,description:P==null?void 0:P.description,delay:P==null?void 0:P.delay,price:Y},delivery_fee:Y}})),{data:F,error:We}=await be.from("loyalty_redemptions").insert(xe).select("id");if(We)throw We;const je=`NOTO-${new Date().toISOString().slice(0,10).replace(/-/g,"")}-L${Math.random().toString(36).substring(2,7).toUpperCase()}`;if(F&&F.length>0){const Me=F.map(Xe=>Xe.id);be.functions.invoke("shippingbo-push-loyalty-order",{body:{redemption_ids:Me,reference:je}}).catch(Xe=>console.error("Failed to push loyalty order to Shippingbo:",Xe))}const Oe=(C||0)-O,{error:Ne}=await be.from("loyalty_points").update({points:Oe,updated_at:new Date().toISOString()}).eq("email",j);if(Ne)throw Ne;const ge=Z.map(Me=>`${Me.productName}${Me.quantity>1?` (x${Me.quantity})`:""}`).join(", ");return be.functions.invoke("send-loyalty-confirmation",{body:{email:j,firstName:K.firstName,lastName:K.lastName,productName:ge,productSlug:((ae=Z[0])==null?void 0:ae.productSlug)||"",pointsUsed:O,euroValue:ne,address:K.address,city:K.city,postalCode:K.postalCode,country:(te==null?void 0:te.label)||"France",deliveryOption:(P==null?void 0:P.name)||"",deliveryFee:Y,phone:K.phone,cartItems:Z.map(Me=>({name:Me.productName,quantity:Me.quantity,points:(Me.pointsCost||0)*Me.quantity,value:Me.price*Me.quantity}))}}),!0}catch(te){return console.error("Error processing loyalty items:",te),!1}},J=async K=>{if(!v){fe.error("Veuillez sélectionner un mode de livraison");return}if(l()&&!B){fe.error("Vous n'avez pas assez de points fidélité");return}f(!0);try{if(!c()&&l()){await ee(K)?(u(),D(!0),fe.success("Commande fidélité confirmée !")):fe.error("Erreur lors du traitement de la commande"),f(!1);return}const ae=jm.find(F=>F.value===K.country),{data:te,error:xe}=await be.functions.invoke("up2pay-create-payment",{body:{email:K.email,firstName:K.firstName,lastName:K.lastName,phone:K.phone,address:K.address,city:K.city,postalCode:K.postalCode,country:(ae==null?void 0:ae.label)||K.country,countryCode:K.country,additionalInfo:K.additionalInfo,items:V.map(F=>({productId:F.productId,productName:F.productName,variantId:F.variantId,variantName:F.variantName,price:F.price,quantity:F.quantity,imageUrl:F.imageUrl})),subtotal:Q,deliveryFee:Y,deliveryOption:P,total:E,siteUrl:window.location.origin,isTestMode:!1,loyaltyItems:Z.length>0?Z.map(F=>({productId:F.productId,productName:F.productName,productSlug:F.productSlug,pointsCost:F.pointsCost,euroValue:F.price,quantity:F.quantity})):null,pointsUsed:O,userEmail:j}});if(xe){console.error("Payment creation error:",xe),fe.error("Erreur lors de la création du paiement"),f(!1);return}if(!(te!=null&&te.success)){fe.error((te==null?void 0:te.error)||"Erreur lors de la création du paiement"),f(!1);return}console.log("Payment created:",te.orderReference),N(te.up2payUrl),y(te.params)}catch(ae){console.error("Checkout error:",ae),fe.error("Erreur lors du paiement"),f(!1)}};return s.jsxs(s.Fragment,{children:[s.jsx(at,{}),s.jsx("div",{className:"min-h-screen bg-background py-12",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-8",children:"Finaliser ma commande"}),s.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[s.jsx("div",{className:"lg:col-span-2 space-y-6",children:s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2",children:[s.jsx(Rx,{className:"h-5 w-5"}),"Informations de livraison"]})}),s.jsx(Ie,{children:s.jsx(Bw,{...M,children:s.jsxs("form",{onSubmit:M.handleSubmit(J),className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsx(Or,{control:M.control,name:"firstName",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Prénom *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"Jean",...K})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:M.control,name:"lastName",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Nom *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"Dupont",...K})}),s.jsx(kr,{})]})})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsx(Or,{control:M.control,name:"email",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Email *"}),s.jsx(Er,{children:s.jsx(lt,{type:"email",placeholder:"jean.dupont@email.com",...K})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:M.control,name:"phone",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Téléphone *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"0612345678",...K})}),s.jsx(kr,{})]})})]}),s.jsx(Or,{control:M.control,name:"country",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Pays *"}),s.jsxs(mi,{value:K.value,onValueChange:ae=>{K.onChange(ae),m(ae)},children:[s.jsx(Er,{children:s.jsx($a,{children:s.jsx(pi,{placeholder:"Sélectionnez votre pays"})})}),s.jsx(qa,{children:jm.map(ae=>s.jsx(yt,{value:ae.value,children:ae.label},ae.value))})]}),s.jsx(kr,{})]})}),s.jsx(Or,{control:M.control,name:"address",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Adresse *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"123 rue de la République",...K})}),s.jsx(kr,{})]})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsx(Or,{control:M.control,name:"city",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Ville *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"Paris",...K})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:M.control,name:"postalCode",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Code postal *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"75001",...K})}),s.jsx(kr,{})]})})]}),s.jsx(Or,{control:M.control,name:"additionalInfo",render:({field:K})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Informations complémentaires"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"Code d'accès, étage, etc.",...K})}),s.jsx(kr,{})]})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(hs,{className:"h-5 w-5 text-primary"}),s.jsx("h3",{className:"font-semibold text-lg",children:"Mode de livraison"})]}),s.jsx(tP,{value:v,onValueChange:p,className:"space-y-3",children:W.map(K=>{const ae=K.id==="mondial_relay"&&Q>=70&&Q>0;return ae||K.price,s.jsxs("div",{className:`flex items-center space-x-3 border rounded-lg p-4 cursor-pointer transition-colors ${v===K.id?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>p(K.id),children:[s.jsx(rP,{value:K.id,id:K.id}),s.jsx(wt,{htmlFor:K.id,className:"flex-1 cursor-pointer",children:s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsxs("p",{className:"font-medium",children:[K.name,K.id==="mondial_relay"&&Q<70&&s.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:"(Offert dès 70€ d'achats)"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:K.description}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Délai: ",K.delay]})]}),s.jsx("div",{className:"text-right",children:ae?s.jsxs("div",{children:[s.jsx("span",{className:"font-semibold text-green-600",children:"Offert"}),s.jsxs("span",{className:"text-sm text-muted-foreground line-through ml-2",children:[K.price.toFixed(2)," €"]})]}):s.jsxs("span",{className:"font-semibold text-primary",children:[K.price.toFixed(2)," €"]})})]})})]},K.id)})})]}),s.jsx(se,{type:"submit",className:"w-full",size:"lg",disabled:d||!v||l()&&!B,children:d?s.jsxs(s.Fragment,{children:[s.jsx(Wr,{className:"mr-2 h-5 w-5 animate-spin"}),c()?"Redirection vers le paiement...":"Traitement en cours..."]}):s.jsxs(s.Fragment,{children:[s.jsx(B8,{className:"mr-2 h-5 w-5"}),c()?`Payer ${E.toFixed(2)} €`:"Confirmer ma commande"]})})]})})})]})}),s.jsx("div",{className:"lg:col-span-1",children:s.jsxs(ve,{className:"sticky top-4",children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2",children:[s.jsx(zl,{className:"h-5 w-5"}),"Récapitulatif"]})}),s.jsxs(Ie,{className:"space-y-4",children:[V.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Achats"}),V.map(K=>s.jsxs("div",{className:"flex gap-3",children:[s.jsx("img",{src:K.imageUrl,alt:K.productName,className:"w-16 h-16 object-cover rounded-md"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-sm truncate",children:K.productName}),s.jsx("p",{className:"text-sm text-muted-foreground",children:K.variantName}),s.jsxs("p",{className:"text-sm",children:["Quantité: ",K.quantity]})]}),s.jsx("div",{className:"text-right",children:s.jsxs("p",{className:"font-medium",children:[(K.price*K.quantity).toFixed(2)," €"]})})]},`${K.productId}-${K.variantId}`))]}),Z.length>0&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{className:"text-sm font-medium text-violet-600 flex items-center gap-1",children:[s.jsx(Ut,{className:"h-4 w-4"}),"Produits fidélité"]}),Z.map(K=>s.jsxs("div",{className:"flex gap-3 bg-violet-50 rounded-lg p-2",children:[s.jsx("img",{src:K.imageUrl,alt:K.productName,className:"w-12 h-12 object-cover rounded-md"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"font-medium text-sm truncate",children:K.productName}),s.jsxs("p",{className:"text-sm text-violet-600",children:[((K.pointsCost||0)*K.quantity).toLocaleString()," pts"]})]}),s.jsx("div",{className:"text-right",children:s.jsx(Je,{className:"bg-violet-600",children:"Gratuit"})})]},`${K.productId}-${K.variantId}`)),s.jsxs("div",{className:"bg-violet-100 rounded-lg p-3 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-violet-800",children:"Vos points :"}),s.jsx("span",{className:"font-bold text-violet-800",children:(C==null?void 0:C.toLocaleString())||0})]}),s.jsxs("div",{className:"flex justify-between mt-1",children:[s.jsx("span",{className:"text-violet-800",children:"Requis :"}),s.jsx("span",{className:`font-bold ${B?"text-green-600":"text-red-600"}`,children:O.toLocaleString()})]})]})]}),s.jsx(us,{}),s.jsxs("div",{className:"space-y-2",children:[V.length>0&&s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Sous-total achats"}),s.jsxs("span",{children:[Q.toFixed(2)," €"]})]}),Z.length>0&&s.jsxs("div",{className:"flex justify-between text-sm text-violet-600",children:[s.jsx("span",{children:"Produits fidélité"}),s.jsxs("span",{children:["-",ne.toFixed(2)," €"]})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{children:["Livraison (",(P==null?void 0:P.name)||"-",")"]}),he?s.jsx("span",{className:"text-green-600 font-medium",children:"Offert"}):s.jsxs("span",{children:[Y.toFixed(2)," €"]})]}),s.jsx(us,{}),s.jsxs("div",{className:"flex justify-between font-bold text-lg",children:[s.jsx("span",{children:"Total à payer"}),s.jsxs("span",{children:[E.toFixed(2)," €"]})]})]}),!he&&Q>0&&Q<70&&s.jsx("div",{className:"bg-amber-50 border border-amber-200 p-3 rounded-md text-sm",children:s.jsxs("p",{className:"text-amber-800",children:["🚚 Plus que ",s.jsxs("strong",{children:[(70-Q).toFixed(2),"€"]})," pour la livraison offerte en point relais"]})}),!c()&&l()&&s.jsx("div",{className:"bg-violet-50 border border-violet-200 p-3 rounded-md text-sm",children:s.jsx("p",{className:"text-violet-800",children:"📦 Les frais de port s'appliquent pour les commandes 100% points fidélité"})}),he&&s.jsx("div",{className:"bg-green-50 border border-green-200 p-3 rounded-md text-sm",children:s.jsx("p",{className:"text-green-800",children:"✅ Livraison offerte en point relais !"})}),s.jsx("div",{className:"bg-muted p-3 rounded-md text-sm",children:s.jsx("p",{className:"text-muted-foreground",children:"🔒 Paiement sécurisé"})}),s.jsx("div",{className:"bg-primary/5 p-3 rounded-md text-sm",children:s.jsx("p",{className:"text-muted-foreground",children:"📦 Commande avant 11h = expédiée le jour même"})})]})]})})]})]})}),s.jsx(it,{}),w&&s.jsx("form",{ref:x,method:"POST",action:b,style:{display:"none"},children:Object.entries(w).map(([K,ae])=>s.jsx("input",{type:"hidden",name:K,value:ae},K))})]})},_Q="/assets/faq-hero-Da6_QcLV.jpg",Z_=[{question:"Qu'est-ce que le CBD ?",answer:`Le cannabidiol, communément appelé CBD, est l'une des quelques 110 molécules de la plante de chanvre qui font partie de la famille des phytocannabinoïdes. Les plus connues sont donc le CBD, mais aussi le CBG ou encore le THC, la substance psychotrope que nous n'utilisons pas dans nos produits.

Dans notre cas, le CBD est tiré de la variété de cannabis sativa L, enregistrée auprès de l'Union Européenne et contenant moins de 0,2 % de THC, conformément à la législation en vigueur.`},{question:"Comment fonctionne le CBD ?",answer:"Notre corps contient également des cannabinoïdes naturels, qui font partie du système endocannabinoïde. Ce dernier est constitué d'un réseau de deux principaux récepteurs : les récepteurs CB1 qui se trouvent dans le cerveau et le système nerveux et les récepteurs CB2 dans le système immunitaire et l'intestin."},{question:"Que signifie CBD à spectre large/Broad Spectrum ?",answer:"Le terme CBD à large spectre signifie que le produit contient une plus large gamme de cannabinoïdes que l'isolat de CBD. Les plus présents sont le CBDV, le CBG et le CBC. En plus des cannabinoïdes, un produit CBD à large spectre contiendra ce que nous appelons des terpènes et des flavonoïdes, extraits de la plante de chanvre, qui donnent le goût et la saveur et permettent ce que nous appelons l'effet entourage, aidant les cannabinoïdes à travailler en synergie.",cta:{text:"Venez découvrir nos huiles Broad Spectrum",link:"/produits"}},{question:"Quel dosage de CBD dois-je utiliser ?",answer:"Nous recommandons une dose journalière de 50mg de CBD. À prendre en une fois ou en deux fois."},{question:"Le CBD est-il légal en France ?",answer:`Oui, le CBD est légal car il n'est pas considéré comme un produit stupéfiant. La Mission Interministérielle de Lutte contre les Drogues et les Conduites Addictives a précisé qu'il doit, pour être commercialisé et utilisé, répondre à plusieurs conditions cumulatives : la variété de chanvre dont la molécule est issue doit être approuvée par les autorités et figurée sur une liste exhaustive inscrite dans l'article 2 de l'arrêté du 22 août 1990; la plante doit avoir une teneur en THC inférieure à 0,2 %; on ne peut utiliser ni ses fleurs ni ses feuilles et, dernière condition, il ne doit y avoir aucune trace de THC dans le produit fini.

On peut donc affirmer qu'en France, le CBD n'est pas considéré comme une drogue et qu'il est parfaitement légal d'acheter et de consommer des produits qui en contiennent tant qu'ils respectent les réglementations françaises. Le THC, quant à lui, est strictement interdit à la vente, classifié comme un produit stupéfiant.`},{question:"Quelle est la différence entre le cannabis, la marijuana et le chanvre ?",answer:`Le terme cannabis est le mot générique qui qualifie le genre botanique, regroupant de nombreuses variétés.

La différence principale entre la marijuana et le chanvre réside dans le fait que ce dernier contient une quantité négligeable et légalement permise de THC. Ce n'est que si la teneur en THC d'un plant reste sous un certain seuil, 0.2 %, qu'il peut être légalement classifié en chanvre. Au-dessus, nous parlerons de marijuana.

En France on retrouve le chanvre dans l'industrie textile, la construction, les cosmétiques ou encore l'alimentaire. On parle alors de chanvre industriel, celui duquel nous extrayons le CBD.`},{question:"Y a-t-il du THC dans les produits NŌTO ?",answer:"Non, nos produits ne contiennent pas de THC. Nous nous en assurons en faisant analyser tous nos lots de produits par un laboratoire tiers en France."},{question:'Le CBD peut-il faire "planer" ?',answer:`Contrairement au THC et à ses dérivés, le CBD ne vous fera pas "planer" car cette molécule n'a aucun effet psychotrope et ne crée aucune dépendance contrairement au THC.`},{question:"Quels sont les effets secondaires du CBD ?",answer:"Le CBD est une molécule qui ne produit aucun effet psychoactif, ce qui signifie que votre système nerveux, votre perception, votre humeur ne seront pas impactés. Il n'y a aucune inquiétude particulière à avoir. Il n'est pas non plus possible de faire une overdose de CBD.",cta:{text:"Découvrez la gamme de produits NŌTO",link:"/produits"}}],CQ=()=>(g.useEffect(()=>{document.title="FAQ CBD | Questions Fréquentes Cannabidiol";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","FAQ CBD complète : qu'est-ce que le CBD, légalité en France, dosage recommandé, différences THC. Toutes les réponses par NŌTO.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"FAQ CBD | Questions Fréquentes Cannabidiol",description:"FAQ CBD complète : qu'est-ce que le CBD, légalité en France, dosage recommandé, différences THC. Toutes les réponses par NŌTO.",url:"/faq",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"FAQ",url:"/faq"}]}),s.jsx(gn,{items:Z_.map(e=>({question:e.question,answer:e.answer})),pageUrl:"/faq"}),s.jsxs("main",{children:[s.jsxs("section",{className:"relative h-[300px] md:h-[400px] overflow-hidden",children:[s.jsx("img",{src:_Q,alt:"Feuilles de chanvre au soleil",className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/30 to-transparent"}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/90 text-primary-foreground rounded-full text-sm font-medium mb-4",children:"FAQ"}),s.jsx("h1",{className:"text-3xl md:text-5xl lg:text-6xl font-bold text-white drop-shadow-lg",children:"TOUT SAVOIR SUR LE CBD"})]})})]}),s.jsx("section",{className:"py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4 max-w-4xl",children:s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-4",children:Z_.map((e,t)=>s.jsxs(Pn,{value:`item-${t}`,className:"bg-card border border-border rounded-xl px-6 shadow-sm hover:shadow-md transition-shadow",children:[s.jsx(In,{className:"text-left text-lg font-semibold text-foreground hover:text-primary py-6",children:e.question}),s.jsxs(Fn,{className:"pb-6",children:[s.jsx("div",{className:"text-muted-foreground leading-relaxed whitespace-pre-line",children:e.answer}),e.cta&&s.jsx(pe,{to:e.cta.link,className:"inline-block mt-4",children:s.jsx(se,{variant:"outline",className:"border-primary text-primary hover:bg-primary hover:text-primary-foreground",children:e.cta.text})})]})]},t))})})}),s.jsx("section",{className:"py-16 bg-primary",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-primary-foreground mb-4",children:"Des questions supplémentaires ?"}),s.jsx("p",{className:"text-primary-foreground/80 mb-8 max-w-xl mx-auto",children:"Notre équipe est à votre disposition pour répondre à toutes vos interrogations sur le CBD et nos produits."}),s.jsx(pe,{to:"/produits",children:s.jsx(se,{size:"lg",variant:"secondary",className:"rounded-full px-8",children:"Découvrir nos produits"})})]})})]}),s.jsx(it,{})]})),SQ=()=>(g.useEffect(()=>{document.title="CGV | Conditions Générales de Vente NŌTO";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","CGV NŌTO CBD : commandes, paiement sécurisé, livraison, droit de rétractation 14 jours, garanties légales. Toutes les conditions de vente.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"CGV | Conditions Générales de Vente NŌTO",description:"CGV NŌTO CBD : commandes, paiement sécurisé, livraison, droit de rétractation 14 jours, garanties légales. Toutes les conditions de vente.",url:"/cgv",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"CGV",url:"/cgv"}]}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-12",children:"CONDITIONS GÉNÉRALES DE VENTE (B2C)"}),s.jsxs("div",{className:"prose prose-lg max-w-none space-y-8 text-foreground",children:[s.jsx("p",{className:"text-muted-foreground",children:"Sont indiquées aux présentes et sur le Site les informations listées à l'article L. 221-5 du Code de la consommation, communiquées au Client et dont il prend connaissance préalablement à la passation de sa commande."}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"APPLICATION"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les présentes Conditions Générales de Vente s'appliquent aux ventes réalisées par l'intermédiaire du site www.notocbd.com (le « Site ») et sont conclues entre :"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground",children:[s.jsx("li",{children:"L'éditeur et exploitant du Site, La société OZEN, Société par actions simplifiée immatriculée au RCS de Créteil sous le n° 887 875 276, dont le siège social est situé 65 Bis Quai Winston Churchill, la Varenne Saint-Hilaire, 94210 Saint-Maur-Des-Fossés (ci-après le « Vendeur»), contact@notocbd.com et"}),s.jsx("li",{children:"Tout acheteur consommateur, défini comme une personne physique agissant à des fins qui n'entrent pas dans le cadre de son activité commerciale, industrielle, artisanale, libérale ou agricole (ci-après le « Client») et ayant la capacité requise pour contracter et acquérir les produits proposés sur le Site."})]}),s.jsx("p",{className:"text-muted-foreground mt-4",children:"Ces Conditions Générales de Vente pouvant faire l'objet de modifications ultérieures, la version applicable à l'achat du Client est celle en vigueur sur le Site à la date de passation de la commande."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"PRODUITS"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les produits commercialisés sur le Site sont des gélules et des liquides sublinguaux (y compris des huiles) composés de phytocannabinoïdes (CBD). Les produits pourront être mis à jour à tout moment et les présentes s'appliqueront à tout nouveau type de produit mis en vente."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le Client est invité à prendre connaissance de la réglementation applicable sur son territoire concernant ces produits. Au regard du droit français, le Vendeur déclare que les produits répondent aux conditions de l'article R5132-86 du Code de la santé publique et de l'arrêté du 22 août 1990 portant application de l'article qui précède : les matières premières sont issues des fibres et graines des variétés végétales autorisées et leur teneur en THC est inférieure à 0,2%. Les matières premières et les Produits finis ont fait l'objet de plusieurs procédures de tests dans des laboratoires de premier plan permettant d'assurer l'absence de THC détectable."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les produits sont décrits et présentés sur le Site avec la plus grande exactitude possible. Le Client est tenu de prendre connaissance des informations disponibles avant toute passation de commande, en particulier des caractéristiques essentielles des produits et des éventuelles réserves et mises en garde formulées sur la fiche produit (par exemple sur l'âge minimal recommandé pour la consommation d'un produit ou les contre-indications d'usage avec des traitements en cours)."}),s.jsx("p",{className:"text-muted-foreground",children:"Les produits vendus ne sont pas destinés à un usage médical et notamment afin de diagnostiquer, traiter, soigner ou à titre préventif. Les produits n'ont pas vocation à se substituer à un traitement médical prescrit par un médecin traitant. Le Client est invité à vérifier les éventuelles intolérances ou allergies aux produits ou leurs composants, avant toute commande. Dans le doute, il est recommandé au Client d'interroger son médecin traitant."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"PRIX"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le prix des produits est indiqué sur le Site, exprimé en euros € et en livres sterling £, TTC. Ces prix sont fermes et restent en vigueur tant que les produits sont affichés sur le Site."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le Vendeur se réserve la possibilité de modifier ces prix à tout moment. Le prix applicable est celui en vigueur au moment de la commande."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le prix affiché ne comprend pas les coûts d'expédition, de transport et de livraison, qui sont calculés en supplément et indiqués au Client préalablement à sa passation de commande. Des droits de douane ou autres taxes locales ou droits d'importation ou taxes d'état sont susceptibles d'être exigibles. Ils sont à la charge et relèvent de la seule responsabilité du Client."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les frais de télécommunication inhérents à l'accès au Site restent à la charge exclusive du Client."}),s.jsx("p",{className:"text-muted-foreground",children:"En cas de versement d'un acompte, cette somme ne pourra en aucun cas être qualifiée d'arrhes."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"COMMANDE"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Afin de passer commande, le Client doit respecter les étapes suivantes lors de sa visite sur le Site :"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground mb-4",children:[s.jsx("li",{children:"Suivre les instructions du Site et en particulier, les instructions nécessaires à l'ouverture d'un compte client ;"}),s.jsx("li",{children:"Remplir le formulaire de commande. En cas d'inactivité prolongée lors de la connexion, il est possible que la sélection ne soit plus garantie. Le Client est alors invité à reprendre sa sélection depuis le début ;"}),s.jsx("li",{children:"Vérifier les éléments de la commande et le cas échéant, identifier et corriger les erreurs ;"}),s.jsx("li",{children:"Valider la commande et le prix ;"}),s.jsx("li",{children:"Suivre les instructions du serveur de paiement en ligne pour effectuer le règlement."})]}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Toute commande par le Client vaut acceptation sans restriction ni réserve des présentes Conditions Générales de Vente qui doivent être lues par le Client, puis acceptées en cochant la case prévue à cet effet avant sa commande en ligne."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"La vente n'est définitive qu'après l'envoi au Client de la confirmation de l'acceptation de la commande par le Vendeur par courrier électronique et après encaissement de l'intégralité du prix. Toute commande passée dans ces conditions constitue la formation d'un contrat conclu à distance entre le Client et le Vendeur."}),s.jsx("p",{className:"text-muted-foreground",children:"Le Vendeur se réserve le droit de refuser la commande d'un même produit en quantité importante, si elle est anormale, passée de mauvaise foi ou pour tout autre motif légitime, et en particulier, lorsqu'il existe un litige avec le Client concernant le paiement d'une commande antérieure."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"PAIEMENT"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le prix est payable comptant, en totalité, au jour de la passation de la commande par le Client, via l'un des modes de paiement mis à sa disposition par le Vendeur et listés sur le Site, selon le choix du Client, à savoir paiement par Carte bleue, PayPal, ou tout service de tiers qui sera proposé. Ces services tiers nécessitent d'accepter les conditions d'utilisation qui leurs sont propres."}),s.jsx("p",{className:"text-muted-foreground",children:"Le Vendeur se réserve le droit de suspendre toute gestion de commande et toute livraison en cas de refus d'autorisation de paiement par carte bancaire de la part des établissements financiers ou en cas de non-paiement."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"CONFIRMATION DE COMMANDE"}),s.jsx("p",{className:"text-muted-foreground",children:"Le Vendeur fournit au Client, sur support durable, dans un délai raisonnable, après la conclusion du contrat et au plus tard au moment de la livraison du bien, la confirmation de la commande."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"PREUVE DE LA TRANSACTION"}),s.jsx("p",{className:"text-muted-foreground",children:"Les registres informatisés, conservés dans les systèmes informatiques du Vendeur dans des conditions raisonnables de sécurité, seront considérés comme les preuves des communications, des commandes et des paiements intervenus entre les parties. L'archivage des commandes et des factures est effectué sur un support fiable et durable pouvant être produit à titre de preuve."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"LIVRAISON"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les produits sont livrés à l'adresse indiquée par le Client lors de sa commande par les services sélectionnés par le Client. Le Vendeur recourt aux services Colissimo de La Poste, Mondial Relay et d'UPS pour les commandes internationales."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Tout colis renvoyé au Vendeur à cause d'une adresse de livraison erronée ou incomplète sera réexpédié aux frais du Client. Le montant des Frais de Livraison dépend du montant de la commande et du mode de livraison choisi par le Client. Ce montant est indiqué avant validation de sa commande."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le Client peut suivre l'état d'avancement du traitement de la Commande dans l'espace réservé à cet effet sur le Site."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Sauf en cas de force majeure ou lors des périodes de fermeture de la boutique en ligne annoncée sur la page d'accueil du Site, les délais d'expédition seront, dans la limite des stocks disponibles, ceux indiqués au Client. Le Vendeur fera ses meilleurs efforts pour respecter ce délai."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"En cas d'indisponibilité du produit commandé, l'acheteur en sera informé au plus tôt et aura la possibilité d'annuler sa commande. L'acheteur aura alors le choix de demander soit le remboursement des sommes versées, soit l'échange du produit."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les Délais de livraison indiqués sur le Site s'entendent en jours ouvrés et correspondent aux délais moyens de préparation et d'acheminement de la commande sur le territoire indiqué. En cas de retard, le Vendeur informera le Client par courrier électronique."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Conformément à l'article L216-2 du Code de la consommation, en cas de manquement à son obligation de livraison à l'expiration du délai de livraison indiqué ou, à défaut, au plus tard trente jours après la commande, le Client peut résoudre sa commande, par lettre recommandée avec demande d'avis de réception ou par un écrit sur un autre support durable, si, après avoir enjoint, selon les mêmes modalités, le Vendeur d'effectuer la livraison dans un délai supplémentaire raisonnable, ce dernier ne s'est pas exécuté dans ce délai."}),s.jsx("p",{className:"text-muted-foreground",children:"En cas de résolution de la commande, le Vendeur remboursera le Client des sommes versées, au plus tard dans les quatorze jours qui suivent la date de dénonciation de la commande, à l'exclusion de toute indemnisation supplémentaire."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"RÉCEPTION"}),s.jsx("p",{className:"text-muted-foreground",children:"Si au moment de la livraison, l'emballage d'origine est abîmé, déchiré, ouvert, le Client doit vérifier l'état des articles. S'ils ont été endommagés, le Client doit impérativement refuser le colis et noter une réserve sur le bordereau de livraison (colis refusé car ouvert ou endommagé)."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"TRANSFERT DE PROPRIÉTÉ ET DES RISQUES"}),s.jsx("p",{className:"text-muted-foreground",children:"Le transfert de propriété des produits est réalisé après complet paiement du prix par le Client. Le risque de perte ou d'endommagement des produits est transféré au Client au moment où ce dernier ou un tiers désigné par lui, et autre que le transporteur proposé par le Vendeur, prend physiquement possession des produits."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"DROIT DE RÉTRACTATION"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Conformément à l'article L221-18 du code de la consommation, le Client dispose d'un délai de quatorze jours pour exercer son droit de rétractation, à compter du jour de la réception du produit, sans pénalité ni frais, à l'exception des frais de retour qui restent à la charge du Client."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Toutefois, il est rappelé que conformément à l'article L 221-18 précité, le droit de rétractation ne peut être exercé pour les contrats de fourniture de biens susceptibles de se détériorer ou de se périmer rapidement et de fourniture de biens qui ont été descellés après la livraison et qui ne peuvent être renvoyés pour des raisons d'hygiène ou de protection de la santé. Compte-tenu de ces dispositions, aucun droit de rétractation ne sera accepté pour les Produits vendus répondant à ces caractéristiques, en particulier les produits dont l'emballage d'origine aura été descellé."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Ce droit peut être exercé en ligne, à l'aide du formulaire de rétractation disponible sur le Site. Le Vendeur communiquera, sans délai, au Client un accusé de réception de la rétractation sur un support durable. Le Client peut également procéder par toute autre déclaration, dénuée d'ambiguïté, exprimant sa volonté de se rétracter."}),s.jsx("p",{className:"text-muted-foreground",children:"Les retours sont à effectuer dans leur état d'origine et complets permettant leur remise sur le marché à l'état neuf, accompagnés, si possible, de la facture d'achat. Le Vendeur remboursera alors le Client de la totalité des sommes versées, y compris les frais de livraison, au plus tard dans les quatorze jours à compter de la date à laquelle il est informé de la décision du Client de se rétracter."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"GARANTIES LÉGALES"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les produits vendus sur le Site bénéficient de plein droit :"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground mb-4",children:[s.jsx("li",{children:"De la garantie légale de conformité, pour les produits apparemment défectueux, abîmés ou endommagés ou ne correspondant pas à la commande,"}),s.jsx("li",{children:"De la garantie légale contre les vices cachés provenant d'un défaut de matière, de conception ou de fabrication affectant les produits livrés et les rendant impropres à l'utilisation."})]}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Dans le cadre de la garantie légale de conformité, le Client consommateur :"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground mb-4",children:[s.jsx("li",{children:"Bénéficie d'un délai de deux ans à compter de la délivrance du bien pour agir à l'encontre du vendeur ;"}),s.jsx("li",{children:"Peut choisir entre la réparation ou le remplacement du produit commandé, sous réserve des conditions de coût prévues par l'article L217-9 du Code de la consommation ;"}),s.jsx("li",{children:"Est dispensé de rapporter la preuve de l'existence du défaut de conformité du produit durant les 24 mois suivant la délivrance du produit."}),s.jsx("li",{children:"La garantie légale de conformité s'applique indépendamment de la garantie commerciale pouvant éventuellement couvrir le produit."}),s.jsx("li",{children:"Le client peut décider de mettre en œuvre la garantie contre les défauts cachés conformément à l'article 1641 du Code Civil ; dans ce cas, il peut choisir entre la résolution de la vente ou une réduction du prix de vente conformément à 1644 du Code Civil."})]}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les frais d'envoi de produits effectivement non conformes ou défectueux seront remboursés sur la base du tarif facturé et les frais de retour seront remboursés sur présentation des justificatifs, dans un délai de quatorze (14) jours suivant la constatation par le Vendeur du défaut de conformité ou du vice caché."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"La garantie du Vendeur est, en tout état de cause, limitée au remplacement ou au remboursement des produits non conformes ou affectés d'un vice."}),s.jsx("p",{className:"text-muted-foreground",children:"La responsabilité du Vendeur ne saurait être engagée en cas de mauvaise utilisation, d'utilisation à des fins professionnelles, ou négligence de la part du Client, comme en cas de force majeure."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"FORCE MAJEURE"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Sont considérés comme cas de force majeure les évènements définis à l'article 1218 du code civil et les cas habituellement reconnus comme tels par la jurisprudence française."}),s.jsx("p",{className:"text-muted-foreground",children:"Les obligations incombant à chacune des parties reprendront leur cours dès que l'événement constitutif de cas de force majeure aura cessé. Si le cas de force majeure dure plus de quinze (15) jours ou s'il rend la commande définitivement impossible, celle-ci sera résiliée sur demande de la partie la plus diligente, sans indemnité quelconque."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"PROPRIÉTÉ INTELLECTUELLE"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le contenu du Site, incluant les illustrations, images, photographies et textes reproduits, est la propriété du Vendeur. Toute reproduction ou représentation totale ou partielle du Site et de son contenu est strictement interdite et susceptible de constituer un délit de contrefaçon."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"NOTO est une marque de l'Union européenne enregistrée dans les classes 3, 5, 25, 30 et 32 qui ne peut être reproduite dans l'autorisation du Vendeur."}),s.jsx("p",{className:"text-muted-foreground",children:"Les autres marques et droits d'auteur qui peuvent être reproduits sur le Site sont la propriété de leurs titulaires respectifs."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"LOI APPLICABLE, ATTRIBUTION DE JURIDICTION"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les présentes conditions sont soumises à la loi française."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Tous les litiges auxquels les ventes conclues en application des présentes pourraient donner lieu, seront soumis aux tribunaux compétents dans les conditions de droit commun."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Elles sont rédigées en langue française. Dans le cas où elles seraient traduites en une ou plusieurs langues, seul le texte français ferait foi en cas de litige."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"En cas de litige ou de réclamation, le Client s'adressera en priorité au Vendeur pour obtenir une solution amiable."}),s.jsx("p",{className:"text-muted-foreground",children:"Le Client consommateur est informé qu'il peut recourir à une médiation conventionnelle, notamment auprès de la Commission de la médiation de la consommation ou auprès des instances de médiation sectorielles existantes, ou à tout mode alternatif de règlement des différends en cas de contestation. Le Client consommateur peut accéder aux noms, coordonnées et sites internet des médiateurs référencés sur le site www.mediation-conso.fr."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"ANNEXE I - DISPOSITIONS RELATIVES AUX GARANTIES LÉGALES"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Article L217-4 du Code de la consommation"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le vendeur livre un bien conforme au contrat et répond des défauts de conformité existant lors de la délivrance. Il répond également des défauts de conformité résultant de l'emballage, des instructions de montage ou de l'installation lorsque celle-ci a été mise à sa charge par le contrat ou a été réalisée sous sa responsabilité."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Article L217-5 du Code de la consommation"}),s.jsx("p",{className:"text-muted-foreground mb-2",children:"Le bien est conforme au contrat :"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground mb-4",children:[s.jsx("li",{children:"S'il est propre à l'usage habituellement attendu d'un bien semblable et, le cas échéant : s'il correspond à la description donnée par le vendeur et possède les qualités que celui-ci a présentées à l'acheteur sous forme d'échantillon ou de modèle ; s'il présente les qualités qu'un acheteur peut légitimement attendre eu égard aux déclarations publiques faites par le vendeur, par le producteur ou par son représentant, notamment dans la publicité ou l'étiquetage ;"}),s.jsx("li",{children:"Ou s'il présente les caractéristiques définies d'un commun accord par les parties ou est propre à tout usage spécial recherché par l'acheteur, porté à la connaissance du vendeur et que ce dernier a accepté."})]}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Article L217-12 du Code de la consommation"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"L'action résultant du défaut de conformité se prescrit par deux ans à compter de la délivrance du bien."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Article L217-16 du Code de la consommation"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Lorsque l'acheteur demande au vendeur, pendant le cours de la garantie commerciale qui lui a été consentie lors de l'acquisition ou de la réparation d'un bien meuble, une remise en état couverte par la garantie, toute période d'immobilisation d'au moins sept jours vient s'ajouter à la durée de la garantie qui restait à courir. Cette période court à compter de la demande d'intervention de l'acheteur ou de la mise à disposition pour réparation du bien en cause, si cette mise à disposition est postérieure à la demande d'intervention."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Article 1641 du Code civil"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le vendeur est tenu de la garantie à raison des défauts cachés de la chose vendue qui la rendent impropre à l'usage auquel on la destine, ou qui diminuent tellement cet usage que l'acheteur ne l'aurait pas acquise, ou n'en aurait donné qu'un moindre prix, s'il les avait connus."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Article 1648 alinéa 1er du Code civil"}),s.jsx("p",{className:"text-muted-foreground",children:"L'action résultant des vices rédhibitoires doit être intentée par l'acquéreur dans un délai de deux ans à compter de la découverte du vice."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"ANNEXE II – DONNÉES PERSONNELLES"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"La présente annexe précise la politique du Site en matière de collecte et traitement de données personnelles."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les termes « données personnelles » se réfèrent à toute information permettant d'identifier directement ou indirectement une personne physique."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les termes « responsable du traitement » désignent la personne morale qui détermine les finalités et moyens du traitement des données à caractère personnel collectées, en l'occurrence la société OZEN, Société par actions simplifiée immatriculée au RCS de Créteil sous le n° 887 875 276, dont le siège social est situé 65 Bis Quai Winston Churchill la Varenne Saint-Hilaire 94210 Saint-Maur-Des-Fossés (le « Vendeur »)."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Collecte des données personnelles"}),s.jsx("p",{className:"text-muted-foreground mb-2",children:"Les données à caractère personnel sont collectées dans les conditions suivantes :"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground mb-4",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Ouverture de compte:"})," lors de la création du compte du client, ses nom, prénom, adresse électronique, coordonnées postales, moyens de contact."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Connexion:"})," lors de la connexion du client au Site, celui-ci enregistre, notamment, ses nom, prénom, données de connexion, d'utilisation et ses données relatives au paiement."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Commande:"})," informations transactionnelles nécessaires pour traiter la commande (adresse email, numéro de téléphone)."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Communication:"})," lors d'une adhésion éventuelle à un programme de fidélité ou à une lettre d'information, les moyens de contact."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Paiement:"})," dans le cadre du paiement des produits et prestations proposés sur le Site, celui-ci enregistre des données financières relatives au compte bancaire ou à la carte de crédit du client, par l'intermédiaire du partenaire financier proposant la solution de paiement."]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Cookies:"})," les cookies sont utilisés, dans le cadre de l'utilisation du Site. Le client a la possibilité de désactiver les cookies à partir des paramètres de son navigateur."]})]}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Utilisation des données personnelles"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les données personnelles recueillies auprès des clients font l'objet d'un traitement informatique réalisé par le vendeur. Elles sont enregistrées dans son fichier clients et sont indispensables au traitement de sa commande. Ces informations et données personnelles sont également conservées à des fins de sécurité, afin de respecter les obligations légales et réglementaires."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les données demandées au Client sont nécessaires au traitement de sa commande et à l'établissement des factures. Ces données peuvent être communiquées aux éventuels partenaires du Vendeur chargés de l'exécution, du traitement, de la gestion et du paiement des commandes."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le renseignement des données personnelles collectées aux fins de vente à distance est obligatoire pour la confirmation, et la validation de la commande du client ainsi que son suivi et son expédition ; en leur absence, la commande du client ne pourra être traitée."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Les données peuvent également servir à l'envoi d'informations commerciales et publicitaires, en fonction des préférences du Client, s'il opte pour ce choix."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le traitement des informations communiquées par l'intermédiaire du Site répond aux exigences légales en matière de protection des données personnelles, le système d'information utilisé assurant la protection de ces données."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Base légale du traitement"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"La base légale de collecte et de traitement est l'exécution du contrat conclu avec le client pour l'exécution des services par le Vendeur ainsi que son intérêt légitime à assurer la meilleure qualité de ses prestations et en améliorer le fonctionnement et la sécurité."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Conservation des données"}),s.jsx("p",{className:"text-muted-foreground mb-2",children:"Les données à caractère personnel sont conservées aussi longtemps que nécessaire pour l'exécution des commandes et des garanties éventuellement applicables et tout autre service demandé par le client, par exemple l'abonnement à une newsletter."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Au-delà, les données sont conservées ou archivées pour la durée légale, ou recommandée, spécifique aux données en cause, par exemple : Dispositions spécifiques propres aux pièces comptables ou fiscales (factures …). Conservation des données 3 ans à compter de la dernière sollicitation concernant les coordonnées d'un prospect."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Partage des données personnelles avec des tiers"}),s.jsx("p",{className:"text-muted-foreground mb-2",children:"Les données personnelles peuvent être partagées avec des tiers, sans que l'autorisation du Client soit nécessaire, dans les cas suivants :"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-muted-foreground mb-4",children:[s.jsx("li",{children:"Quand le Client utilise les services de paiement, pour la mise en œuvre de ces services, le Site est en relation avec des sociétés bancaires et financières tierces avec lesquelles elle a passé des contrats ;"}),s.jsx("li",{children:"Quand le Site recourt à des prestataires pour fournir des services d'exécution, du traitement, de la gestion des commandes."})]}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Ces prestataires disposent d'un accès limité aux données du Client, dans le cadre de l'exécution de ces prestations, et ont une obligation de les utiliser en conformité avec les dispositions de la réglementation applicable en matière protection des données à caractère personnel."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"En dehors des cas énoncés ci-dessus, le Vendeur s'interdit de vendre, louer, céder ou donner accès à des tiers aux données sans consentement préalable du Client, à moins d'y être contraint en raison d'un motif légitime."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Transfert de données personnelles"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Tout transfert des données hors de l'Union Européenne devra faire l'objet d'un consentement du Client."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Sécurité et confidentialité"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le Site met en œuvre des mesures en matière de sécurité pour protéger les données personnelles contre les altérations, destructions et accès non autorisés. Toutefois, il est à signaler qu'internet n'est pas un environnement complètement sécurisé et le Site ne peut pas garantir la sécurité de la transmission ou du stockage des informations sur internet."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"L'accès aux données personnelles sera strictement limité aux employés du responsable de traitement, habilités à les traiter en raison de leurs fonctions."}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Mise en œuvre des droits des clients"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Le Client dispose, conformément aux réglementations nationales et européennes en vigueur, y compris la loi 78-17 du 6 janvier 1978 modifiée, d'un droit d'accès permanent, de modification, de rectification, d'opposition et de limitation du traitement s'agissant des informations le concernant."}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Ce droit peut être exercé en s'adressant à l'adresse ci-dessus par courrier ou email."}),s.jsx("p",{className:"text-muted-foreground",children:"Le Client dispose du droit d'introduire une réclamation auprès de la Commission Nationale de l'Informatique et des Libertés (CNIL), notamment sur son site internet www.cnil.fr."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"ANNEXE III – FORMULAIRE DE RÉTRACTATION"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Il est rappelé que conformément à l'article L 221-18 du Code de la consommation, le droit de rétractation ne peut être exercé pour les contrats de fourniture de biens susceptibles de se détériorer ou de se périmer rapidement et de fourniture de biens qui ont été descellés après la livraison et qui ne peuvent être renvoyés pour des raisons d'hygiène ou de protection de la santé. Compte-tenu de ces dispositions, aucun droit de rétractation ne sera accepté pour les Produits vendus répondant à ces caractéristiques."}),s.jsxs("div",{className:"bg-muted/50 p-6 rounded-lg",children:[s.jsxs("p",{className:"text-muted-foreground mb-4",children:[s.jsx("strong",{children:"À l'attention de :"}),s.jsx("br",{}),"OZEN, Société par actions simplifiée immatriculée au RCS de Créteil sous le n° 887 875 276, dont le siège social est situé 65 Bis Quai Winston Churchill la Varenne Saint-Hilaire 94210 Saint-Maur-Des-Fossés"]}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Je notifie par la présente la rétractation du contrat portant sur la commande ci-dessous :"}),s.jsxs("ul",{className:"list-none space-y-2 text-muted-foreground",children:[s.jsx("li",{children:"– Commande du : _______________"}),s.jsx("li",{children:"– Numéro de la commande : _______________"}),s.jsx("li",{children:"– Nom du Client : _______________"}),s.jsx("li",{children:"– Adresse du Client : _______________"})]})]})]})]})]})}),s.jsx(it,{})]})),EQ=()=>(g.useEffect(()=>{document.title="Livraison CBD France & Europe | NŌTO";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Livraison CBD NŌTO en 2-5 jours. Mondial Relay 4,95€, Colissimo, DHL Express. France métropolitaine, Belgique, Luxembourg et Europe.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Livraison CBD France & Europe | NŌTO",description:"Livraison CBD NŌTO en 2-5 jours. Mondial Relay 4,95€, Colissimo, DHL Express. France métropolitaine, Belgique, Luxembourg et Europe.",url:"/livraison",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Livraison",url:"/livraison"}]}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-12",children:"Livraison"}),s.jsxs("div",{className:"space-y-12",children:[s.jsxs("section",{className:"bg-primary/5 rounded-2xl p-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Ri,{className:"w-8 h-8 text-primary"}),s.jsx("h2",{className:"text-2xl font-bold text-primary",children:"Quel est le délai de livraison ?"})]}),s.jsxs("p",{className:"text-muted-foreground text-lg",children:["Tous nos produits (Ashwagandha, Mélatonine, CBD et autres) arrivent avec votre colis sous ",s.jsx("strong",{children:"2 à 5 jours ouvrables"})," (à l'exception du dimanche et des jours fériés) à compter du jour d'expédition de votre commande (valable pour la France métropolitaine)."]})]}),s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Yu,{className:"w-8 h-8 text-primary"}),s.jsx("h2",{className:"text-2xl font-bold text-primary",children:"Pays où nous livrons"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Allemagne, Autriche, Belgique, Bulgarie, Chypre, Croatie, Danemark, Espagne, Estonie, Finlande, France Métropolitaine / DROM-COM, Grèce, Hongrie, Irlande, Italie, Islande, Lettonie, Lituanie, Luxembourg, Malte, Monaco, Norvège, Pays-Bas, Pologne, Portugal, République tchèque, Roumanie, Royaume-Uni, Slovaquie, Slovénie, Suède, Suisse"})]}),s.jsxs("section",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx(Rx,{className:"w-8 h-8 text-primary"}),s.jsx("h2",{className:"text-2xl font-bold text-primary",children:"Modes de livraison"})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"bg-muted/30 rounded-xl p-6",children:[s.jsx("h3",{className:"font-bold text-lg mb-4 text-foreground",children:"🇫🇷 France Métropolitaine"}),s.jsxs("ul",{className:"space-y-3 text-muted-foreground",children:[s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"Mondial Relay"})," - Point de retrait"]}),s.jsx("span",{className:"font-semibold text-primary",children:"4,95€"})]}),s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"Colissimo"})," - À domicile"]}),s.jsx("span",{className:"font-semibold text-primary",children:"6€"})]}),s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"DHL"})," - À domicile"]}),s.jsx("span",{className:"font-semibold text-primary",children:"11€"})]})]})]}),s.jsxs("div",{className:"bg-muted/30 rounded-xl p-6",children:[s.jsx("h3",{className:"font-bold text-lg mb-4 text-foreground",children:"🌴 Outre Mer"}),s.jsx("ul",{className:"space-y-3 text-muted-foreground",children:s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"Colissimo contre signature"})," - À domicile"]}),s.jsx("span",{className:"font-semibold text-primary",children:"13€"})]})})]}),s.jsxs("div",{className:"bg-muted/30 rounded-xl p-6",children:[s.jsx("h3",{className:"font-bold text-lg mb-4 text-foreground",children:"🇧🇪 Belgique / Luxembourg"}),s.jsxs("ul",{className:"space-y-3 text-muted-foreground",children:[s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"Mondial Relay"})," - Point de retrait"]}),s.jsx("span",{className:"font-semibold text-primary",children:"4,95€"})]}),s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"Colissimo contre signature"})," - À domicile"]}),s.jsx("span",{className:"font-semibold text-primary",children:"7,50€"})]}),s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"DHL"})," - À domicile"]}),s.jsx("span",{className:"font-semibold text-primary",children:"12,50€"})]})]})]}),s.jsxs("div",{className:"bg-muted/30 rounded-xl p-6",children:[s.jsx("h3",{className:"font-bold text-lg mb-4 text-foreground",children:"🇪🇺 Europe (Hors BE/LU)"}),s.jsx("ul",{className:"space-y-3 text-muted-foreground",children:s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"DHL"})," - À domicile"]}),s.jsx("span",{className:"font-semibold text-primary",children:"12,50€"})]})})]}),s.jsxs("div",{className:"bg-muted/30 rounded-xl p-6 md:col-span-2",children:[s.jsxs("h3",{className:"font-bold text-lg mb-4 text-foreground",children:["🇺🇸 USA / 🇨🇦 Canada ",s.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:"(TVA 0%)"})]}),s.jsx("ul",{className:"space-y-3 text-muted-foreground",children:s.jsxs("li",{className:"flex justify-between",children:[s.jsxs("span",{children:[s.jsx("strong",{children:"DHL"})," - À domicile"]}),s.jsx("span",{className:"font-semibold text-primary",children:"18€"})]})})]})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"Livraison rapide et sécurisée de vos produits NŌTO"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Lorsqu'une commande de produits bien-être à base de CBD est passée, la rapidité de livraison est un critère essentiel. Rien de plus frustrant que d'attendre trop longtemps sa commande. Chez NŌTO, nous mettons tout en œuvre pour expédier vos produits dans les meilleurs délais."}),s.jsxs("p",{className:"text-muted-foreground",children:[s.jsx("strong",{children:"Toutes les commandes passées avant 11h sont expédiées le jour même"})," grâce à nos partenaires logistiques de confiance. En fonction du transporteur, votre commande vous parviendra sous 48h à 72h en moyenne, partout en France métropolitaine."]})]}),s.jsxs("section",{className:"bg-primary/5 rounded-2xl p-8",children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"Nos sprays et solutions CBD livrés rapidement"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Nos produits sont conçus pour une efficacité optimale, en associant le CBD à d'autres actifs naturels comme la mélatonine ou l'ashwagandha, pour favoriser le sommeil et la relaxation."}),s.jsxs("ul",{className:"space-y-4 text-muted-foreground",children:[s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(hs,{className:"w-5 h-5 text-primary mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("strong",{children:"Spray sommeil au CBD et mélatonine :"})," Idéal pour un endormissement rapide et un sommeil réparateur."]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(hs,{className:"w-5 h-5 text-primary mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("strong",{children:"Spray anti-stress au CBD et ashwagandha :"})," Aide à réduire le stress et à favoriser la détente."]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(hs,{className:"w-5 h-5 text-primary mt-1 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("strong",{children:"Formules en granules à base de phytocannabinoïdes :"})," Une alternative pratique et efficace pour un dosage précis."]})]})]}),s.jsx("p",{className:"text-muted-foreground mt-6",children:"Nos solutions sont développées avec des ingrédients de qualité et des formulations innovantes, garantissant une biodisponibilité optimale et un effet rapide. Profitez d'une livraison express en 24h à 48h pour commencer à ressentir leurs bienfaits sans attendre."})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"Livraison express avec suivi de commande"}),s.jsxs("p",{className:"text-muted-foreground mb-4",children:["Nous comprenons l'importance d'une expédition rapide et fiable. C'est pourquoi nous travaillons avec des transporteurs de confiance pour vous assurer une livraison en toute sérénité. ",s.jsx("strong",{children:"Toutes les commandes passées avant 11h sont préparées et expédiées le jour même."})]}),s.jsxs("ul",{className:"space-y-2 text-muted-foreground",children:[s.jsx("li",{children:"• Livraison à domicile ou en point relais"}),s.jsx("li",{children:"• Suivi en temps réel grâce à un lien de tracking envoyé par email dès l'expédition"}),s.jsx("li",{children:"• Paiement sécurisé et service client disponible pour toute question"})]})]}),s.jsxs("section",{children:[s.jsx("h2",{className:"text-2xl font-bold text-primary mb-4",children:"Délais de livraison : ce qu'il faut savoir"}),s.jsx("p",{className:"text-muted-foreground",children:"Bien que nous garantissions une expédition rapide, certains aléas indépendants de notre volonté peuvent occasionner des retards (grèves, conditions climatiques, etc.). Si votre commande met plus de temps que prévu à arriver, n'hésitez pas à consulter le suivi de votre colis ou à nous contacter pour toute assistance."})]}),s.jsxs("section",{className:"bg-primary text-primary-foreground rounded-2xl p-8",children:[s.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Pourquoi choisir NŌTO pour vos produits à base de CBD ?"}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(aa,{className:"w-6 h-6 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("strong",{children:"Fabrication française"}),s.jsx("p",{className:"text-sm opacity-90",children:"Nos produits sont développés et fabriqués en Bretagne, avec une traçabilité totale."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(aa,{className:"w-6 h-6 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("strong",{children:"Qualité premium"}),s.jsx("p",{className:"text-sm opacity-90",children:"Des ingrédients naturels et des formulations testées pour une efficacité prouvée."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(aa,{className:"w-6 h-6 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("strong",{children:"Expédition rapide"}),s.jsx("p",{className:"text-sm opacity-90",children:"Vos produits sont expédiés sous 24h à 72h."})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(aa,{className:"w-6 h-6 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("strong",{children:"Service client réactif"}),s.jsx("p",{className:"text-sm opacity-90",children:"Une équipe à votre écoute pour vous accompagner."})]})]})]}),s.jsx("p",{className:"mt-6 text-center text-lg",children:"Profitez dès maintenant de la livraison rapide et sécurisée de vos produits NŌTO et améliorez votre bien-être avec des solutions naturelles et efficaces."})]})]})]})}),s.jsx(it,{})]})),kQ="/assets/analyses-hero-CEdZmVzk.jpg",TQ=[{id:"huile-citron",productName:"30ML Huile CBD NŌTO Citron Frais",category:"Huiles CBD",description:"Un équilibre parfait en bouche de son huile sublinguale, combinant la complexité du CBD à large spectre à un mélange unique, vegan et sans gluten permettant de profiter pleinement des propriétés relaxantes du CBD.",certificateUrl:"/certificates/certificat-huile-citron.png",certificateId:"HU-CI-2107"},{id:"huile-menthe",productName:"30ML Huile CBD NŌTO Menthe Poivrée",category:"Huiles CBD",description:"Un équilibre parfait en bouche de son huile sublinguale, combinant la complexité du CBD à large spectre à un mélange unique, vegan et sans gluten permettant de profiter pleinement des propriétés relaxantes du CBD.",certificateUrl:"/certificates/certificat-huile-menthe.png",certificateId:"HU-ME-2107"},{id:"huile-fruits-rouges",productName:"30ML Huile CBD NŌTO Fruits Rouges",category:"Huiles CBD",description:"Un équilibre parfait en bouche de son huile sublinguale, combinant la complexité du CBD à large spectre à un mélange unique, vegan et sans gluten permettant de profiter pleinement des propriétés relaxantes du CBD.",certificateUrl:"/certificates/certificat-huile-fruits-rouges.png"},{id:"gummies",productName:"Sachet Gummies CBD NŌTO 700G",category:"Gummies CBD",description:"Les Gummies CBD NŌTO, c'est l'assurance d'un CBD de qualité dans un gummy vegan et sans gluten, pour un moment de détente bien mérité.",certificateUrl:"/certificates/certificat-gummies.png"}],AQ=()=>{const[e,t]=g.useState("");g.useEffect(()=>{document.title="Analyses CBD | Certificats Laboratoire NŌTO";const i=document.querySelector('meta[name="description"]');i&&i.setAttribute("content","Certificats d'analyse (COA) produits CBD NŌTO. Analyses laboratoire indépendant, 0% THC garanti, dosages conformes. Transparence totale.")},[]);const r=TQ.filter(i=>i.productName.toLowerCase().includes(e.toLowerCase())||i.category.toLowerCase().includes(e.toLowerCase())),n=r.reduce((i,o)=>(i[o.category]||(i[o.category]=[]),i[o.category].push(o),i),{}),a=(i,o)=>{const l=document.createElement("a");l.href=i,l.download=`certificat-${o.replace(/\s+/g,"-").toLowerCase()}.png`,l.target="_blank",document.body.appendChild(l),l.click(),document.body.removeChild(l)};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Analyses CBD | Certificats Laboratoire NŌTO",description:"Certificats d'analyse (COA) produits CBD NŌTO. Analyses laboratoire indépendant, 0% THC garanti, dosages conformes. Transparence totale.",url:"/analyses-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Analyses CBD",url:"/analyses-cbd"}]}),s.jsxs("main",{children:[s.jsxs("section",{className:"relative h-[300px] md:h-[400px] overflow-hidden",children:[s.jsx("img",{src:kQ,alt:"Analyses CBD NŌTO",className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-black/50 flex items-center justify-center",children:s.jsx("div",{className:"text-center text-white px-4",children:s.jsx("h1",{className:"text-3xl md:text-5xl font-bold mb-4",children:"BULLETIN D'ANALYSES CBD EN LABORATOIRE"})})})]}),s.jsx("section",{className:"py-12 bg-background",children:s.jsxs("div",{className:"container mx-auto px-4 max-w-4xl text-center",children:[s.jsx("p",{className:"text-lg text-muted-foreground mb-6",children:"Un certificat d'analyse, ou COA, permet de s'assurer que les produits sont conformes aux spécifications et indique la quantité de phytocannabinoïdes, comme le CBD ou le CBG."}),s.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:"Les COA permettent de garantir la qualité du produit et de répondre aux attentes du consommateur sur le produit qu'il achète tout en lui garantissant la quantité de CBD inscrite sur le label."}),s.jsx("p",{className:"text-primary font-semibold text-lg",children:"C'est l'une des raisons pour lesquelles NŌTO est un leader du secteur en termes de qualité, de sécurité et de cohérence de ses produits CBD."})]})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:[s.jsxs("div",{className:"text-center p-6",children:[s.jsx(q8,{className:"w-12 h-12 text-primary mx-auto mb-4"}),s.jsx("h3",{className:"font-semibold mb-2",children:"Transparence Totale"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accès libre à tous nos certificats d'analyse"})]}),s.jsxs("div",{className:"text-center p-6",children:[s.jsx(On,{className:"w-12 h-12 text-primary mx-auto mb-4"}),s.jsx("h3",{className:"font-semibold mb-2",children:"Laboratoires Indépendants"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Analyses réalisées par des laboratoires certifiés"})]}),s.jsxs("div",{className:"text-center p-6",children:[s.jsx(eb,{className:"w-12 h-12 text-primary mx-auto mb-4"}),s.jsx("h3",{className:"font-semibold mb-2",children:"Qualité Garantie"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"0% THC et dosages conformes au label"})]})]})})}),s.jsx("section",{className:"py-12 bg-background",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center text-primary mb-8",children:"RECHERCHEZ VOTRE CERTIFICAT D'ANALYSE"}),s.jsx("div",{className:"max-w-md mx-auto mb-12",children:s.jsxs("div",{className:"relative",children:[s.jsx(ql,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),s.jsx(lt,{type:"text",placeholder:"Rechercher un produit...",value:e,onChange:i=>t(i.target.value),className:"pl-10"})]})}),s.jsx("div",{className:"space-y-12",children:Object.entries(n).map(([i,o])=>s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-bold mb-6 text-primary",children:i}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:o.map(l=>s.jsxs(ve,{className:"overflow-hidden hover:shadow-lg transition-shadow",children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-lg",children:l.productName})}),s.jsxs(Ie,{className:"space-y-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:l.description}),l.certificateId&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Certificat CBD ",l.certificateId]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(se,{variant:"outline",size:"sm",className:"flex-1",onClick:()=>window.open(l.certificateUrl,"_blank"),children:"Voir le certificat"}),s.jsxs(se,{size:"sm",className:"flex-1",onClick:()=>a(l.certificateUrl,l.productName),children:[s.jsx(rb,{className:"w-4 h-4 mr-2"}),"Télécharger"]})]})]})]},l.id))})]},i))}),r.length===0&&s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-muted-foreground",children:"Aucun certificat trouvé pour cette recherche."})})]})})]}),s.jsx(it,{})]})},RQ="/assets/notre-cbd-qualite-CFagTaak.png",DQ="/assets/notre-cbd-home-Ce2wi-GB.jpg",eC="/assets/spectrums-europe-logo-CzDiNAOh.png",OQ="/assets/icon-no-ogm-C7fo7y2Q.png",PQ="/assets/icon-no-thc-S8HAaof_.png",IQ=()=>(g.useEffect(()=>{document.title="Notre CBD | Qualité & Traçabilité Spectrums";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","CBD NŌTO de qualité supérieure : traçabilité totale, partenariat Spectrums Europe, culture Colorado, extraction sans THC. Certifié EFSA.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Notre CBD | Qualité & Traçabilité Spectrums",description:"CBD NŌTO de qualité supérieure : traçabilité totale, partenariat Spectrums Europe, culture Colorado, extraction sans THC. Certifié EFSA.",url:"/notre-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Notre CBD",url:"/notre-cbd"}]}),s.jsxs("main",{children:[s.jsxs("section",{className:"relative h-[400px] md:h-[500px] overflow-hidden",children:[s.jsx("img",{src:RQ,alt:"Feuilles de chanvre de qualité",className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/40 to-transparent"}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsxs("div",{className:"text-center max-w-4xl px-4",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/90 text-primary-foreground rounded-full text-sm font-medium mb-4",children:"Qualité & Traçabilité"}),s.jsx("h1",{className:"text-3xl md:text-5xl lg:text-6xl font-bold text-white drop-shadow-lg mb-6",children:"NOTRE CANNABIDIOL"}),s.jsx("p",{className:"text-white/90 text-lg md:text-xl max-w-3xl mx-auto",children:"Notre engagement est de fournir un CBD de qualité inégalée. Cela se traduit par un partenariat avec un fournisseur d'excellence, fournissant une traçabilité totale de la graine jusqu'au produit fini."})]})})]}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 max-w-4xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("img",{src:PQ,alt:"Sans THC",className:"w-16 h-16 mb-3"}),s.jsx("span",{className:"font-semibold text-foreground",children:"SANS THC"})]}),s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("img",{src:OQ,alt:"Sans OGM",className:"w-16 h-16 mb-3"}),s.jsx("span",{className:"font-semibold text-foreground",children:"SANS OGM"})]}),s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("img",{src:eC,alt:"Spectrums Europe Quality",className:"w-16 h-16 mb-3 object-contain"}),s.jsx("span",{className:"font-semibold text-foreground",children:"QUALITÉ SPECTRUMS EUROPE"})]}),s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx(ss,{className:"w-16 h-16 mb-3 text-primary",strokeWidth:1}),s.jsx("span",{className:"font-semibold text-foreground",children:"VEGAN"})]})]})})}),s.jsx("section",{className:"py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center max-w-6xl mx-auto",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"rounded-2xl overflow-hidden shadow-2xl",children:s.jsx("img",{src:DQ,alt:"Culture de chanvre au Colorado",className:"w-full h-[300px] md:h-[400px] object-cover"})}),s.jsx("div",{className:"absolute -bottom-4 -right-4 bg-primary text-primary-foreground px-6 py-3 rounded-xl shadow-lg",children:s.jsx("p",{className:"text-sm font-medium",children:"Colorado, USA"})})]}),s.jsxs("div",{children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4",children:"Origine"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-6",children:"Culture de notre chanvre"}),s.jsxs("div",{className:"space-y-4 text-muted-foreground leading-relaxed",children:[s.jsxs("p",{children:["Notre cannabidiol (CBD) provient tout droit de l'État des USA connu comme étant le berceau du CBD : ",s.jsx("strong",{className:"text-foreground",children:"le Colorado"}),"."]}),s.jsxs("p",{children:["Afin de fournir le CBD le plus qualitatif possible, nous avons fait le choix de travailler avec la société ",s.jsx("strong",{className:"text-foreground",children:"Spectrums Europe"}),", société reconnue depuis plus de 5 ans comme étant le fournisseur de référence de cet ingrédient avec des valeurs qui résonnent : qualité et transparence."]})]})]})]})})}),s.jsx("section",{className:"py-16 md:py-24 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center max-w-6xl mx-auto",children:[s.jsxs("div",{className:"order-2 lg:order-1",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4",children:"Excellence"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-6",children:"Qualité de notre CBD"}),s.jsxs("div",{className:"space-y-4 text-muted-foreground leading-relaxed",children:[s.jsx("p",{children:"Notre engagement envers nos consommateurs est de leur fournir un CBD de qualité inégalée, car tous les ingrédients riches en CBD ne sont pas de la même qualité."}),s.jsxs("p",{children:["Outre une culture propre, cela passe par un ",s.jsx("strong",{className:"text-foreground",children:"contrôle strict du processus de fabrication"}),". Spectrums Europe nous garantit les normes les plus élevées, respectant les bonnes pratiques de fabrication de l'extraction jusqu'à la purification de l'ingrédient ainsi qu'à son conditionnement."]}),s.jsxs("p",{children:["Garantir la sécurité de notre CBD est également primordial dans notre démarche qualité, c'est pour cela que Spectrums Europe a réalisé des ",s.jsx("strong",{className:"text-foreground",children:"études toxicologiques"})," afin de répondre aux exigences européennes de l'EFSA."]}),s.jsxs("p",{children:["Tous nos lots d'ingrédients subissent également un ",s.jsx("strong",{className:"text-foreground",children:"contrôle analytique strict"})," pour garantir la pureté de l'ingrédient."]})]})]}),s.jsx("div",{className:"order-1 lg:order-2 flex justify-center",children:s.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-xl",children:[s.jsx("img",{src:eC,alt:"Spectrums Europe",className:"w-48 h-48 object-contain mx-auto"}),s.jsx("p",{className:"text-center text-sm text-muted-foreground mt-4",children:"Partenaire qualité certifié"})]})})]})})}),s.jsx("section",{className:"py-16 md:py-24",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"max-w-4xl mx-auto text-center mb-12",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4",children:"Processus"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Extraction & Purification"})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-8 max-w-5xl mx-auto",children:[s.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-lg hover:shadow-xl transition-shadow",children:[s.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center mb-6",children:s.jsx(Ku,{className:"w-8 h-8 text-primary"})}),s.jsx("h3",{className:"text-xl font-bold text-foreground mb-4",children:"UN CBD PROPRE"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Nous utilisons un procédé d'extraction par solvant afin d'extraire le principe actif de la plante. Ce solvant est ensuite totalement retiré grâce à un processus d'évaporation afin de respecter les réglementations alimentaires et cosmétiques."})]}),s.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-lg hover:shadow-xl transition-shadow",children:[s.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center mb-6",children:s.jsx(jh,{className:"w-8 h-8 text-primary"})}),s.jsx("h3",{className:"text-xl font-bold text-foreground mb-4",children:"UNE EXTRACTION LENTE ET CIBLÉE"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Tout au long du processus de purification, nous pouvons cibler les molécules actives que nous souhaitons retirer sans impacter le spectre de la plante, il s'agit du procédé de chromatographie. C'est à cette étape que se passe notamment la remédiation du THC et de ses dérivés."}),s.jsx("p",{className:"text-muted-foreground leading-relaxed mt-4",children:"Certaines autres impuretés sont retirées à ce stade, notamment la chlorophylle et les cires indésirables."})]})]})]})}),s.jsx("section",{className:"py-16 bg-primary",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-primary-foreground mb-4",children:"Découvrez nos produits CBD de qualité"}),s.jsx("p",{className:"text-primary-foreground/80 mb-8 max-w-xl mx-auto",children:"Profitez de notre gamme complète de produits CBD, fabriqués avec le plus grand soin et les meilleurs ingrédients."}),s.jsx(pe,{to:"/produits",children:s.jsxs(se,{size:"lg",variant:"secondary",className:"rounded-full px-8 group",children:["Voir nos produits",s.jsx(kn,{className:"w-4 h-4 ml-2 group-hover:translate-x-1 transition-transform"})]})})]})})]}),s.jsx(it,{})]})),FQ="/assets/marque-hero-BEX-e2hv.jpg",LQ="/assets/marque-produits-Dew3j6EN.jpg",MQ="/assets/marque-engagements-Xdpog6x-.jpg",BQ=()=>(g.useEffect(()=>{document.title="Notre Marque CBD Française | Histoire NŌTO";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","NŌTO, marque française de CBD fondée par Quentin Chauve. Solutions naturelles contre douleurs, stress et sommeil. Fabriqué en Bretagne.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Notre Marque CBD Française | Histoire NŌTO",description:"NŌTO, marque française de CBD fondée par Quentin Chauve. Solutions naturelles contre douleurs, stress et sommeil. Fabriqué en Bretagne.",url:"/notre-marque",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Notre Marque",url:"/notre-marque"}]}),s.jsxs("section",{className:"relative h-[70vh] min-h-[500px] overflow-hidden",children:[s.jsx("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-cover",children:s.jsx("source",{src:"/videos/hero-nature.mp4",type:"video/mp4"})}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/60 via-black/40 to-black/70"}),s.jsxs("div",{className:"relative z-10 container mx-auto px-4 h-full flex flex-col justify-center items-center text-center",children:[s.jsx("h1",{className:"text-4xl md:text-6xl font-bold text-white mb-6 tracking-tight",children:"NOTRE HISTOIRE"}),s.jsx("p",{className:"text-xl md:text-2xl text-white/90 max-w-3xl",children:"Des Solutions Naturelles pour Votre Bien-Être"})]})]}),s.jsx("section",{className:"py-16 md:py-24 bg-background",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-20 items-center max-w-7xl mx-auto",children:[s.jsx("div",{className:"relative",children:s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:FQ,alt:"Goutte d'huile CBD naturelle",className:"w-full h-[400px] md:h-[500px] object-cover rounded-2xl shadow-2xl"}),s.jsx("div",{className:"absolute -bottom-4 -right-4 w-32 h-32 bg-primary/20 rounded-full blur-3xl"})]})}),s.jsxs("div",{children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-6",children:"Notre fondateur"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-6",children:"Une marque née de l'expérience"}),s.jsxs("div",{className:"space-y-4 text-muted-foreground leading-relaxed",children:[s.jsxs("p",{children:["Je suis ",s.jsx("strong",{className:"text-foreground",children:"Quentin Chauve"}),", fondateur de NŌTO, une marque née de ma propre expérience avec la douleur, le stress et les troubles du sommeil. Constatant que les solutions classiques n'offraient pas toujours des résultats durables et souvent avec des effets secondaires indésirables, j'ai décidé de créer une alternative 100% naturelle."]}),s.jsx("p",{children:"Chez NŌTO, nous croyons en la puissance des plantes et des ingrédients issus de la nature pour améliorer la qualité de vie. Nos produits sont conçus pour ceux qui recherchent des solutions efficaces et sûres pour retrouver leur bien-être sans dépendre de traitements chimiques."}),s.jsx("p",{children:"Que vous soyez confronté à des douleurs chroniques, au stress quotidien ou à des nuits agitées, nos produits sont là pour vous aider à prendre soin de votre corps et de votre esprit, de manière respectueuse et durable."})]})]})]})})}),s.jsx("section",{className:"py-16 md:py-24 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-20 items-center max-w-7xl mx-auto",children:[s.jsxs("div",{className:"order-2 lg:order-1",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-6",children:"Nos produits"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-6",children:"Une Expertise Naturelle, Pensée pour Vous"}),s.jsxs("div",{className:"space-y-4 text-muted-foreground leading-relaxed",children:[s.jsx("p",{children:"Chez NŌTO, nous nous engageons à vous offrir des produits qui répondent véritablement à vos besoins. En tant que fondateur, je me suis entouré des meilleurs experts et nous avons sélectionné des ingrédients naturels de qualité supérieure, dont l'efficacité a été prouvée dans le traitement de la douleur, du stress et des troubles du sommeil."}),s.jsxs("p",{children:["Chaque formulation est pensée pour apporter un soulagement réel, tout en respectant votre corps et son équilibre naturel. Nous avons créé des solutions simples, mais puissantes, basées sur des plantes comme le ",s.jsx("strong",{className:"text-foreground",children:"cannabidiol (CBD)"}),", l'",s.jsx("strong",{className:"text-foreground",children:"ashwagandha"}),", et d'autres actifs naturels qui ont fait leurs preuves."]}),s.jsx("p",{children:"En choisissant NŌTO, vous optez pour un produit qui vous soutient au quotidien, en toute confiance. Nos solutions sont non seulement naturelles, mais aussi soigneusement testées pour vous garantir une efficacité optimale."})]}),s.jsx(pe,{to:"/produits",className:"inline-block mt-8",children:s.jsxs(se,{className:"rounded-full px-6 group",children:["Découvrir nos produits",s.jsx(kn,{className:"w-4 h-4 ml-2 group-hover:translate-x-1 transition-transform"})]})})]}),s.jsx("div",{className:"relative order-1 lg:order-2",children:s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:LQ,alt:"Huiles et produits NŌTO CBD",className:"w-full h-[400px] md:h-[500px] object-cover rounded-2xl shadow-2xl"}),s.jsx("div",{className:"absolute -top-4 -left-4 w-32 h-32 bg-primary/20 rounded-full blur-3xl"})]})})]})})}),s.jsx("section",{className:"py-16 md:py-24 bg-background",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsx("span",{className:"inline-block px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-6",children:"Nos valeurs"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Des Engagements Clairs pour Votre Santé"})]}),s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-20 items-center max-w-7xl mx-auto",children:[s.jsx("div",{className:"relative",children:s.jsx("img",{src:MQ,alt:"Goutte d'huile CBD pure",className:"w-full h-[400px] md:h-[500px] object-cover rounded-2xl shadow-2xl"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"space-y-4 text-muted-foreground leading-relaxed mb-8",children:[s.jsx("p",{children:"Chez NŌTO, nous allons au-delà de la simple fabrication de produits. Nous nous engageons à offrir des solutions transparentes, de haute qualité, et surtout respectueuses de votre santé."}),s.jsx("p",{children:"Nous croyons fermement que chaque individu mérite un produit qui soit aussi pur et sûr que possible. C'est pourquoi nous avons mis en place des processus stricts pour garantir la traçabilité de chaque ingrédient, depuis sa source jusqu'à sa transformation dans nos laboratoires."}),s.jsx("p",{children:"Nos produits sont fabriqués selon des normes de qualité rigoureuses, testés et approuvés par des experts afin d'assurer une efficacité maximale et une sécurité optimale."})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3 p-4 bg-muted/50 rounded-xl",children:[s.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(On,{className:"w-5 h-5 text-primary"})}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Qualité certifiée"})]}),s.jsxs("div",{className:"flex items-center gap-3 p-4 bg-muted/50 rounded-xl",children:[s.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(ss,{className:"w-5 h-5 text-primary"})}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:"100% Naturel"})]}),s.jsxs("div",{className:"flex items-center gap-3 p-4 bg-muted/50 rounded-xl",children:[s.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(Eu,{className:"w-5 h-5 text-primary"})}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Traçabilité totale"})]}),s.jsxs("div",{className:"flex items-center gap-3 p-4 bg-muted/50 rounded-xl",children:[s.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(hi,{className:"w-5 h-5 text-primary"})}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:"L'humain au cœur"})]})]})]})]})]})}),s.jsx("section",{className:"py-16 md:py-20 bg-primary",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-primary-foreground mb-4",children:"Choisir NŌTO, c'est faire confiance"}),s.jsx("p",{className:"text-primary-foreground/90 max-w-2xl mx-auto mb-8",children:"Une marque qui place l'humain au cœur de ses préoccupations. Nous sommes là pour vous accompagner dans votre quête de bien-être avec des solutions naturelles qui vous ressemblent."}),s.jsx(pe,{to:"/produits",children:s.jsxs(se,{variant:"secondary",size:"lg",className:"rounded-full px-8",children:["Découvrir nos produits",s.jsx(kn,{className:"w-4 h-4 ml-2"})]})})]})}),s.jsx(it,{})]})),UQ=Mw({firstName:$r().min(2,"Le prénom doit contenir au moins 2 caractères").max(50),lastName:$r().min(2,"Le nom doit contenir au moins 2 caractères").max(50),email:$r().email("Email invalide").max(100),phone:$r().min(10,"Numéro de téléphone invalide").max(20),subject:$r().min(5,"Le sujet doit contenir au moins 5 caractères").max(100),message:$r().min(20,"Le message doit contenir au moins 20 caractères").max(1e3)}),$Q=()=>{const[e,t]=g.useState(!1),r="33744976885",n=encodeURIComponent("Bonjour, j'ai une question concernant vos produits CBD."),a=`https://wa.me/${r}?text=${n}`,i=Iw({resolver:Fw(UQ),defaultValues:{firstName:"",lastName:"",email:"",phone:"",subject:"",message:""}});g.useEffect(()=>{document.title="Contact CBD | Assistance & Support NŌTO";const l=document.querySelector('meta[name="description"]');l&&l.setAttribute("content","Contactez NŌTO CBD : support WhatsApp instantané, formulaire de contact et informations. Réponse rapide garantie du lundi au vendredi.")},[]);const o=async l=>{t(!0);try{await new Promise(c=>setTimeout(c,1500)),fe.success("Message envoyé avec succès ! Nous vous répondrons rapidement."),i.reset()}catch{fe.error("Erreur lors de l'envoi du message. Veuillez réessayer.")}finally{t(!1)}};return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Contact CBD | Assistance & Support NŌTO",description:"Contactez NŌTO CBD : support WhatsApp instantané, formulaire de contact et informations. Réponse rapide garantie du lundi au vendredi.",url:"/contact",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Contact",url:"/contact"}]}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-4",children:"Contactez-nous"}),s.jsx("p",{className:"text-center text-muted-foreground mb-12 max-w-2xl mx-auto",children:"Une question sur nos produits CBD ? Notre équipe est à votre écoute pour vous accompagner."}),s.jsx("div",{className:"max-w-4xl mx-auto mb-12",children:s.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"block",children:s.jsx(ve,{className:"bg-[#25D366] text-white border-none hover:bg-[#20BD5A] transition-all hover:scale-[1.02] cursor-pointer overflow-hidden",children:s.jsx(Ie,{className:"p-6 md:p-8",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-6",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("div",{className:"w-20 h-20 md:w-24 md:h-24 bg-white/20 rounded-full flex items-center justify-center",children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:"w-10 h-10 md:w-12 md:h-12 fill-white",children:s.jsx("path",{d:"M16.002 0C7.165 0 .001 7.163.001 16c0 2.825.736 5.572 2.137 7.996L.004 32l8.217-2.156A15.932 15.932 0 0016.002 32C24.838 32 32 24.837 32 16S24.838 0 16.002 0zm0 29.091c-2.617 0-5.18-.708-7.41-2.048l-.531-.316-5.503 1.444 1.471-5.371-.346-.55A13.009 13.009 0 012.91 16c0-7.218 5.873-13.091 13.092-13.091S29.091 8.782 29.091 16 23.22 29.091 16.002 29.091zm7.173-9.808c-.393-.197-2.329-1.149-2.69-1.28-.361-.131-.624-.197-.886.197-.262.393-1.017 1.28-1.247 1.543-.23.262-.459.295-.852.098-.393-.197-1.66-.612-3.161-1.951-1.169-1.042-1.958-2.33-2.188-2.723-.23-.393-.025-.606.173-.802.178-.176.393-.459.59-.689.197-.23.262-.393.393-.656.131-.262.066-.492-.033-.689-.098-.197-.886-2.134-1.214-2.921-.32-.767-.645-.663-.886-.676-.23-.011-.492-.014-.755-.014-.262 0-.689.098-1.05.492-.361.393-1.378 1.346-1.378 3.282s1.411 3.807 1.608 4.07c.197.262 2.778 4.241 6.731 5.948.94.406 1.674.649 2.247.83.944.3 1.803.258 2.482.157.757-.113 2.329-.952 2.658-1.871.328-.919.328-1.707.23-1.871-.098-.164-.361-.262-.755-.459z"})})})}),s.jsxs("div",{className:"flex-1 text-center md:text-left",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-2",children:"Support WhatsApp Instantané"}),s.jsx("p",{className:"text-white/90 text-lg mb-2",children:"Réponse rapide garantie • Du lundi au vendredi, 9h-18h"}),s.jsx("p",{className:"text-white/80",children:"Cliquez ici pour démarrer une conversation avec notre équipe"})]}),s.jsx("div",{className:"flex-shrink-0",children:s.jsxs("div",{className:"bg-white text-[#25D366] font-bold px-6 py-3 rounded-full flex items-center gap-2",children:[s.jsx(jp,{className:"w-5 h-5"}),"Discuter maintenant"]})})]})})})})}),s.jsxs("div",{className:"grid lg:grid-cols-3 gap-8 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"lg:col-span-1 space-y-6",children:[s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2 text-lg",children:[s.jsx(xa,{className:"w-5 h-5 text-primary"}),"Email"]})}),s.jsx(Ie,{children:s.jsx("a",{href:"mailto:contact@notocbd.com",className:"text-muted-foreground hover:text-primary transition-colors",children:"contact@notocbd.com"})})]}),s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2 text-lg",children:[s.jsx(Ff,{className:"w-5 h-5 text-primary"}),"Téléphone / WhatsApp"]})}),s.jsx(Ie,{children:s.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary transition-colors",children:"+33 7 44 97 68 85"})})]}),s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2 text-lg",children:[s.jsx(Yu,{className:"w-5 h-5 text-primary"}),"Adresse"]})}),s.jsx(Ie,{children:s.jsxs("p",{className:"text-muted-foreground",children:["OZEN SAS",s.jsx("br",{}),"Quai Winston Churchill",s.jsx("br",{}),"La Varenne Saint-Hilaire",s.jsx("br",{}),"94210 Saint-Maur-Des-Fossés",s.jsx("br",{}),"France"]})})]}),s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2 text-lg",children:[s.jsx(Ri,{className:"w-5 h-5 text-primary"}),"Horaires"]})}),s.jsx(Ie,{children:s.jsxs("p",{className:"text-muted-foreground",children:["Lundi - Vendredi : 9h - 18h",s.jsx("br",{}),"Samedi - Dimanche : Fermé"]})})]})]}),s.jsx("div",{className:"lg:col-span-2",children:s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2",children:[s.jsx(ku,{className:"w-5 h-5 text-primary"}),"Envoyez-nous un message"]})}),s.jsx(Ie,{children:s.jsx(Bw,{...i,children:s.jsxs("form",{onSubmit:i.handleSubmit(o),className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsx(Or,{control:i.control,name:"firstName",render:({field:l})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Prénom *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"Jean",...l})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:i.control,name:"lastName",render:({field:l})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Nom *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"Dupont",...l})}),s.jsx(kr,{})]})})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsx(Or,{control:i.control,name:"email",render:({field:l})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Email *"}),s.jsx(Er,{children:s.jsx(lt,{type:"email",placeholder:"jean.dupont@email.com",...l})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:i.control,name:"phone",render:({field:l})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Téléphone *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"0612345678",...l})}),s.jsx(kr,{})]})})]}),s.jsx(Or,{control:i.control,name:"subject",render:({field:l})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Sujet *"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"Question sur un produit",...l})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:i.control,name:"message",render:({field:l})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Message *"}),s.jsx(Er,{children:s.jsx(Yf,{placeholder:"Décrivez votre demande en détail...",className:"min-h-[150px] resize-none",...l})}),s.jsx(kr,{})]})}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[s.jsxs(se,{type:"submit",className:"flex-1",size:"lg",disabled:e,children:[s.jsx(ku,{className:"mr-2 h-5 w-5"}),e?"Envoi en cours...":"Envoyer le message"]}),s.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:s.jsxs(se,{type:"button",variant:"outline",className:"w-full border-[#25D366] text-[#25D366] hover:bg-[#25D366] hover:text-white",size:"lg",children:[s.jsx(jp,{className:"mr-2 h-5 w-5"}),"Ou via WhatsApp"]})})]})]})})})]})})]})]})}),s.jsx(it,{})]})};var v0="Checkbox",[qQ]=Yr(v0),[zQ,$w]=qQ(v0);function VQ(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:a,disabled:i,form:o,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,m]=fn({prop:r,defaultProp:a??!1,onChange:c,caller:v0}),[v,p]=g.useState(null),[x,w]=g.useState(null),y=g.useRef(!1),b=v?!!o||!!v.closest("form"):!0,N={checked:h,disabled:i,setChecked:m,control:v,setControl:p,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ro(a)?!1:a,isFormControl:b,bubbleInput:x,setBubbleInput:w};return s.jsx(zQ,{scope:t,...N,children:HQ(f)?f(N):n})}var sP="CheckboxTrigger",nP=g.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},a)=>{const{control:i,value:o,disabled:l,checked:c,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:v}=$w(sP,e),p=pt(a,d),x=g.useRef(c);return g.useEffect(()=>{const w=i==null?void 0:i.form;if(w){const y=()=>f(x.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[i,f]),s.jsx(ze.button,{type:"button",role:"checkbox","aria-checked":Ro(c)?"mixed":c,"aria-required":u,"data-state":cP(c),"data-disabled":l?"":void 0,disabled:l,value:o,...n,ref:p,onKeyDown:ke(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:ke(r,w=>{f(y=>Ro(y)?!0:!y),v&&m&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});nP.displayName=sP;var qw=g.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:i,required:o,disabled:l,value:c,onCheckedChange:u,form:d,...f}=e;return s.jsx(VQ,{__scopeCheckbox:r,checked:a,defaultChecked:i,disabled:l,required:o,onCheckedChange:u,name:n,form:d,value:c,internal_do_not_use_render:({isFormControl:h})=>s.jsxs(s.Fragment,{children:[s.jsx(nP,{...f,ref:t,__scopeCheckbox:r}),h&&s.jsx(lP,{__scopeCheckbox:r})]})})});qw.displayName=v0;var aP="CheckboxIndicator",iP=g.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,i=$w(aP,r);return s.jsx(Xr,{present:n||Ro(i.checked)||i.checked===!0,children:s.jsx(ze.span,{"data-state":cP(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});iP.displayName=aP;var oP="CheckboxBubbleInput",lP=g.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:o,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:m}=$w(oP,e),v=pt(r,m),p=gw(i),x=fb(n);g.useEffect(()=>{const y=h;if(!y)return;const b=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(b,"checked").set,_=!a.current;if(p!==i&&C){const j=new Event("click",{bubbles:_});y.indeterminate=Ro(i),C.call(y,Ro(i)?!1:i),y.dispatchEvent(j)}},[h,p,i,a]);const w=g.useRef(Ro(i)?!1:i);return s.jsx(ze.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??w.current,required:l,disabled:c,name:u,value:d,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});lP.displayName=oP;function HQ(e){return typeof e=="function"}function Ro(e){return e==="indeterminate"}function cP(e){return Ro(e)?"indeterminate":e?"checked":"unchecked"}const uP=g.forwardRef(({className:e,...t},r)=>s.jsx(qw,{ref:r,className:Pe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(iP,{className:Pe("flex items-center justify-center text-current"),children:s.jsx(tb,{className:"h-4 w-4"})})}));uP.displayName=qw.displayName;const WQ=Mw({email:$r().trim().min(1,"L'email est requis").email("Email invalide").max(255,"Email trop long"),phone:$r().trim().min(1,"Le numéro de téléphone est requis").regex(/^[\d\s+()-]{10,20}$/,"Numéro de téléphone invalide"),displayName:$r().trim().max(100,"Nom trop long").optional(),acceptTerms:cQ().refine(e=>e===!0,{message:"Vous devez accepter les conditions"})}),GQ=()=>{g.useEffect(()=>{document.title="Newsletter CBD | Offres Exclusives NŌTO";const c=document.querySelector('meta[name="description"]');c&&c.setAttribute("content","Inscrivez-vous à la newsletter NŌTO : offres exclusives CBD, conseils bien-être et nouveautés en avant-première. Rejoignez notre communauté.")},[]);const{toast:e}=Yy(),[t,r]=g.useState(!1),[n,a]=g.useState(!1),i=Iw({resolver:Fw(WQ),defaultValues:{email:"",phone:"",displayName:"",acceptTerms:!1}}),o=async c=>{r(!0);try{const{error:u}=await be.from("email_subscribers").insert({email:c.email,phone:c.phone,display_name:c.displayName||null,source:"newsletter_page",list_name:"newsletter"});if(u)if(u.code==="23505")e({title:"Déjà inscrit",description:"Cette adresse email est déjà inscrite à notre newsletter.",variant:"destructive"});else throw u;else a(!0),e({title:"Inscription réussie !",description:"Bienvenue dans la communauté NŌTO. Vous recevrez bientôt nos actualités."})}catch(u){console.error("Newsletter subscription error:",u),e({title:"Erreur",description:"Une erreur est survenue. Veuillez réessayer.",variant:"destructive"})}finally{r(!1)}},l=[{icon:Ut,title:"Offres exclusives",description:"Accédez en avant-première à nos promotions et réductions"},{icon:ss,title:"Conseils bien-être",description:"Recevez nos guides et astuces pour profiter du CBD"},{icon:Fo,title:"Nouveautés",description:"Soyez les premiers informés de nos nouveaux produits"}];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Newsletter CBD | Offres Exclusives NŌTO",description:"Inscrivez-vous à la newsletter NŌTO : offres exclusives CBD, conseils bien-être et nouveautés en avant-première. Rejoignez notre communauté.",url:"/newsletter",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Newsletter",url:"/newsletter"}]}),s.jsxs("main",{className:"pt-20",children:[s.jsxs("section",{className:"relative py-16 md:py-24 bg-gradient-to-br from-primary/10 via-background to-accent/10 overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 opacity-30",children:[s.jsx("div",{className:"absolute top-20 left-10 w-72 h-72 bg-primary/20 rounded-full blur-3xl"}),s.jsx("div",{className:"absolute bottom-20 right-10 w-96 h-96 bg-accent/20 rounded-full blur-3xl"})]}),s.jsx("div",{className:"container mx-auto px-4 relative z-10",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center space-y-6",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/20 text-primary px-4 py-2 rounded-full text-sm font-medium",children:[s.jsx(xa,{className:"w-4 h-4"}),"Newsletter NŌTO"]}),s.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-foreground",children:["Rejoignez la communauté",s.jsx("br",{}),s.jsx("span",{className:"text-primary",children:"bien-être NŌTO"})]}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto",children:"Inscrivez-vous à notre newsletter et recevez en exclusivité nos conseils, offres spéciales et les dernières actualités sur le CBD."})]})})]}),s.jsx("section",{className:"py-12 md:py-16 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:l.map((c,u)=>s.jsxs("div",{className:"bg-card rounded-2xl p-6 text-center shadow-sm border border-border/50 hover:shadow-md transition-shadow",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(c.icon,{className:"w-6 h-6 text-primary"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:c.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:c.description})]},u))})})}),s.jsx("section",{className:"py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"max-w-xl mx-auto",children:n?s.jsxs("div",{className:"bg-card rounded-3xl p-8 md:p-12 shadow-xl border border-border/50 text-center space-y-6",children:[s.jsx("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto",children:s.jsx(Ot,{className:"w-10 h-10 text-green-600"})}),s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"Merci pour votre inscription !"}),s.jsx("p",{className:"text-muted-foreground",children:"Vous faites maintenant partie de la communauté NŌTO. Vous recevrez très bientôt notre première newsletter avec des offres exclusives."}),s.jsx(se,{onClick:()=>a(!1),variant:"outline",className:"mt-4",children:"S'inscrire avec une autre adresse"})]}):s.jsxs("div",{className:"bg-card rounded-3xl p-8 md:p-12 shadow-xl border border-border/50",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-2",children:"Inscrivez-vous maintenant"}),s.jsx("p",{className:"text-muted-foreground",children:"Remplissez le formulaire ci-dessous pour recevoir nos actualités"})]}),s.jsx(Bw,{...i,children:s.jsxs("form",{onSubmit:i.handleSubmit(o),className:"space-y-6",children:[s.jsx(Or,{control:i.control,name:"displayName",render:({field:c})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Prénom (optionnel)"}),s.jsx(Er,{children:s.jsx(lt,{placeholder:"Votre prénom",...c,className:"h-12"})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:i.control,name:"email",render:({field:c})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Email *"}),s.jsx(Er,{children:s.jsxs("div",{className:"relative",children:[s.jsx(xa,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),s.jsx(lt,{type:"email",placeholder:"votre@email.com",...c,className:"h-12 pl-10"})]})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:i.control,name:"phone",render:({field:c})=>s.jsxs(Cr,{children:[s.jsx(Sr,{children:"Téléphone *"}),s.jsx(Er,{children:s.jsxs("div",{className:"relative",children:[s.jsx(Ff,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),s.jsx(lt,{type:"tel",placeholder:"06 12 34 56 78",...c,className:"h-12 pl-10"})]})}),s.jsx(kr,{})]})}),s.jsx(Or,{control:i.control,name:"acceptTerms",render:({field:c})=>s.jsxs(Cr,{className:"flex flex-row items-start space-x-3 space-y-0",children:[s.jsx(Er,{children:s.jsx(uP,{checked:c.value,onCheckedChange:c.onChange})}),s.jsxs("div",{className:"space-y-1 leading-none",children:[s.jsx(Sr,{className:"text-sm font-normal text-muted-foreground cursor-pointer",children:"J'accepte de recevoir les newsletters et offres promotionnelles de NŌTO. Je peux me désinscrire à tout moment."}),s.jsx(kr,{})]})]})}),s.jsx(se,{type:"submit",size:"lg",className:"w-full h-14 text-lg",disabled:t,children:t?"Inscription en cours...":"S'inscrire à la newsletter"}),s.jsxs("p",{className:"text-xs text-center text-muted-foreground",children:["En vous inscrivant, vous acceptez notre"," ",s.jsx("a",{href:"/cgv",className:"underline hover:text-primary",children:"politique de confidentialité"}),"."]})]})})]})})})})]}),s.jsx(it,{})]})},KQ="/assets/terpenes-cbd-DKCJkEh5.jpg",YQ=[{id:1,title:"Le CBD, certaines mutuelles vous le rembourse !",excerpt:"Découvrez comment certaines mutuelles prennent en charge vos achats de CBD et les démarches à suivre pour en bénéficier.",image:nw,slug:"cbd-mutuelle-remboursement"},{id:2,title:"Lutter contre l'arthrose chez le chien et le chat",excerpt:"Le CBD peut aider vos animaux de compagnie à soulager les douleurs liées à l'arthrose. Voici comment l'utiliser.",image:JA,slug:"cbd-arthrose-chien-chat"},{id:3,title:"L'important est le dosage de CBD",excerpt:"Apprenez à trouver le dosage idéal de CBD adapté à vos besoins pour une efficacité optimale.",image:ZA,slug:"dosage-cbd-guide"},{id:4,title:"On vous dit tout sur les terpènes !",excerpt:"Les terpènes jouent un rôle essentiel dans l'effet d'entourage du CBD. Découvrez leurs bienfaits.",image:KQ,slug:"terpenes-cbd-guide"}],XQ=()=>(g.useEffect(()=>{document.title="Blog CBD | Guides & Conseils Cannabidiol NŌTO";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Blog CBD NŌTO : guides dosage, bienfaits terpènes, remboursement mutuelle et conseils d'utilisation. Informez-vous sur le cannabidiol.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Blog CBD | Guides & Conseils Cannabidiol NŌTO",description:"Blog CBD NŌTO : guides dosage, bienfaits terpènes, remboursement mutuelle et conseils d'utilisation. Informez-vous sur le cannabidiol.",url:"/blog",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Blog",url:"/blog"}]}),s.jsxs("main",{className:"pt-20",children:[s.jsxs("section",{className:"relative py-16 md:py-24 bg-gradient-to-br from-primary/10 via-background to-accent/10 overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 opacity-30",children:[s.jsx("div",{className:"absolute top-20 left-10 w-72 h-72 bg-primary/20 rounded-full blur-3xl"}),s.jsx("div",{className:"absolute bottom-20 right-10 w-96 h-96 bg-accent/20 rounded-full blur-3xl"})]}),s.jsx("div",{className:"container mx-auto px-4 relative z-10",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center space-y-6",children:[s.jsx("span",{className:"inline-block text-primary font-semibold tracking-wider uppercase text-sm",children:"Blog"}),s.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-foreground",children:["Tout savoir sur le"," ",s.jsx("span",{className:"text-primary",children:"CBD"})]}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto",children:"Découvrez nos articles, guides et conseils pour tout comprendre sur le CBD et ses bienfaits pour votre bien-être."})]})})]}),s.jsx("section",{className:"py-8 md:py-12 bg-muted/50",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx(pe,{to:"/faq",children:s.jsx("div",{className:"max-w-4xl mx-auto bg-card rounded-2xl p-6 md:p-8 shadow-sm border border-border/50 hover:shadow-md transition-all duration-300 hover:border-primary/30 group cursor-pointer",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-4 md:gap-6",children:[s.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center flex-shrink-0 group-hover:bg-primary/20 transition-colors",children:s.jsx(F8,{className:"w-8 h-8 text-primary"})}),s.jsxs("div",{className:"flex-1 text-center md:text-left",children:[s.jsx("h2",{className:"text-xl md:text-2xl font-bold text-foreground mb-1",children:"Les questions les plus posées"}),s.jsx("p",{className:"text-muted-foreground",children:"Retrouvez toutes les réponses à vos questions sur le CBD dans notre FAQ complète."})]}),s.jsxs(se,{variant:"outline",className:"gap-2 group-hover:bg-primary group-hover:text-primary-foreground transition-colors",children:["Notre FAQ",s.jsx(kn,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]})})})})}),s.jsx("section",{className:"py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("div",{className:"grid md:grid-cols-2 gap-6 md:gap-8",children:YQ.map(e=>s.jsx(pe,{to:`/blog/${e.slug}`,className:"group",children:s.jsxs("article",{className:"h-full bg-card rounded-2xl overflow-hidden shadow-sm border border-border/50 hover:shadow-xl transition-all duration-300 hover:border-primary/30",children:[s.jsxs("div",{className:"relative h-48 md:h-56 overflow-hidden",children:[s.jsx("img",{src:e.image,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-card/80 via-transparent to-transparent"})]}),s.jsxs("div",{className:"p-6 space-y-3",children:[s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground group-hover:text-primary transition-colors line-clamp-2",children:e.title}),s.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed line-clamp-2",children:e.excerpt}),s.jsxs(se,{variant:"ghost",className:"gap-2 px-0 text-primary hover:text-primary hover:bg-transparent group/btn",children:["En savoir plus",s.jsx(kn,{className:"w-4 h-4 group-hover/btn:translate-x-1 transition-transform"})]})]})]})},e.id))}),s.jsx("div",{className:"mt-16 text-center",children:s.jsx("div",{className:"inline-block bg-muted/50 rounded-full px-6 py-3",children:s.jsx("p",{className:"text-muted-foreground text-sm",children:"Plus d'articles à venir prochainement..."})})})]})})}),s.jsx("section",{className:"py-16 md:py-20 bg-primary/5",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-2xl mx-auto text-center space-y-6",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"Restez informé"}),s.jsx("p",{className:"text-muted-foreground",children:"Inscrivez-vous à notre newsletter pour recevoir nos derniers articles et conseils sur le CBD directement dans votre boîte mail."}),s.jsx(pe,{to:"/newsletter",children:s.jsxs(se,{size:"lg",className:"gap-2",children:["S'inscrire à la newsletter",s.jsx(kn,{className:"w-4 h-4"})]})})]})})})]}),s.jsx(it,{})]})),QQ=()=>{g.useEffect(()=>{document.title="CBD Remboursé par Mutuelle | Nostrum Care";const r=document.querySelector('meta[name="description"]');r&&r.setAttribute("content","Mutuelle remboursement CBD : jusqu'à 175€/an avec Nostrum Care. Huiles, gummies et capsules CBD pris en charge. Démarches et conditions.")},[]);const e=["Les produits CBD: les huiles de CBD, capsules CBD ou gummies CBD","La contraception féminine et masculine, les anneaux et patchs contraceptifs","Les culottes menstruelles","Les médicaments homéopathiques","Les huiles essentielles","Les compléments alimentaires","Les probiotiques","Les vaccins","Les produits de sevrage tabagiques"],t=["Compléments alimentaires (Huiles sublinguales CBD, gummies CBD, granules CBD, capsules CBD)","Cosmétiques (Shampoings Secs au CBD)"];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"CBD Remboursé par Mutuelle | Nostrum Care",description:"Mutuelle remboursement CBD : jusqu'à 175€/an avec Nostrum Care. Huiles, gummies et capsules CBD pris en charge. Démarches et conditions.",url:"/blog/remboursement-mutuelle-cbd",type:"article",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Blog",url:"/blog"},{name:"Remboursement Mutuelle CBD",url:"/blog/remboursement-mutuelle-cbd"}]}),s.jsxs("main",{className:"pt-20",children:[s.jsxs("section",{className:"relative h-[50vh] md:h-[60vh] overflow-hidden",children:[s.jsx("img",{src:nw,alt:"Remboursement mutuelle CBD NŌTO x Nostrum Care",className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background via-background/50 to-transparent"}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-6 md:p-12",children:s.jsx("div",{className:"container mx-auto",children:s.jsxs("div",{className:"max-w-4xl",children:[s.jsxs(pe,{to:"/blog",className:"inline-flex items-center gap-2 text-primary hover:underline mb-4",children:[s.jsx(Dn,{className:"w-4 h-4"}),"Retour au blog"]}),s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground",children:"Le CBD, certaines mutuelles vous le rembourse !"})]})})})]}),s.jsx("article",{className:"py-12 md:py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto prose prose-lg dark:prose-invert",children:[s.jsxs("section",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Les dépenses liées au CBD sont-elles remboursées par la Sécurité sociale ?"}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Malgré les nombreuses vertus qu'on lui prête, le CBD que l'on retrouve en vente libre n'est pas reconnu comme un médicament. Il s'agit dans la plupart des cas d'un produit classé en complément alimentaire, notamment avec des huiles CBD ou des gummies CBD. Dès lors, un médecin ne peut pas prescrire par ordonnance du CBD. Les dépenses liées à la consommation de CBD ne sont donc pas remboursées par la Sécurité sociale."})]}),s.jsxs("section",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Ma mutuelle peut-elle me rembourser mes dépenses liées aux produits CBD ?"}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed mb-6",children:["Toutes les mutuelles ne proposent pas ce service. Nous avons trouvé l'une des seules mutuelles du marché proposant ce service avec ",s.jsx("strong",{className:"text-primary",children:"Nostrum Care"}),"."]}),s.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:"C'est une mutuelle accessible et moderne, qui propose des garanties enfin adaptées aux besoins des personnes qu'elle protège. Aucune garantie n'existait pour assurer le remboursement des frais liés au CBD auparavant."}),s.jsxs("div",{className:"bg-primary/10 border border-primary/20 rounded-2xl p-6 md:p-8 my-8",children:[s.jsx("h3",{className:"text-xl font-bold text-foreground mb-4",children:"Garantie bien-être Nostrum Care"}),s.jsxs("p",{className:"text-muted-foreground mb-4",children:[`Nostrum Care propose une garantie bien-être avec un forfait "produits bien-être" incluant le remboursement des produits ci-dessous jusqu'à `,s.jsx("strong",{className:"text-primary",children:"175€/an"})," :"]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 italic",children:"Les médicaments et produits bien-être prescrits ou non et non remboursés par la sécurité sociale :"}),s.jsx("ul",{className:"space-y-2",children:e.map((r,n)=>s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-foreground text-sm",children:r})]},n))})]})]}),s.jsxs("section",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Comment se faire rembourser ?"}),s.jsxs("div",{className:"bg-muted/50 rounded-2xl p-6 md:p-8",children:[s.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:"Pour vous faire rembourser vos produits CBD de chez NŌTO, rien de plus simple :"}),s.jsxs("ol",{className:"space-y-4",children:[s.jsxs("li",{className:"flex items-start gap-4",children:[s.jsx("span",{className:"w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold flex-shrink-0",children:"1"}),s.jsx("span",{className:"text-foreground pt-1",children:"Depuis l'application Nostrum Care, effectuez une demande de remboursement"})]}),s.jsxs("li",{className:"flex items-start gap-4",children:[s.jsx("span",{className:"w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold flex-shrink-0",children:"2"}),s.jsx("span",{className:"text-foreground pt-1",children:"Photographiez votre facture ou ticket de caisse"})]}),s.jsxs("li",{className:"flex items-start gap-4",children:[s.jsx("span",{className:"w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold flex-shrink-0",children:"3"}),s.jsx("span",{className:"text-foreground pt-1",children:"Renseignez le montant de votre dépense"})]}),s.jsxs("li",{className:"flex items-start gap-4",children:[s.jsx("span",{className:"w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold flex-shrink-0",children:"4"}),s.jsxs("span",{className:"text-foreground pt-1",children:["Vous serez remboursés en ",s.jsx("strong",{className:"text-primary",children:"48h"})," !"]})]})]})]})]}),s.jsxs("section",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Quel type de produits CBD rembourse Nostrum Care ?"}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed mb-6",children:["Nostrum Care rembourse les produits NŌTO à base de CBD ci-dessous jusqu'à un montant de ",s.jsx("strong",{className:"text-primary",children:"175€/an"}),"."]}),s.jsx("ul",{className:"space-y-3",children:t.map((r,n)=>s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-foreground",children:r})]},n))})]}),s.jsxs("section",{className:"bg-card border border-border rounded-2xl p-6 md:p-8 text-center",children:[s.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:"Nostrum Care est une mutuelle qui fait le pari de la simplicité. Finie la paperasse ! Place à une mutuelle accessible et efficace ! Souscrivez à une mutuelle santé qui rembourse vite et bien les dépenses liées au CBD."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx("a",{href:"https://eu1.hubs.ly/H0666TZ0",target:"_blank",rel:"noopener noreferrer",children:s.jsxs(se,{size:"lg",className:"gap-2 w-full sm:w-auto",children:["Découvrir Nostrum Care",s.jsx(Al,{className:"w-4 h-4"})]})}),s.jsx(pe,{to:"/produits",children:s.jsx(se,{size:"lg",variant:"outline",className:"w-full sm:w-auto",children:"Découvrir la gamme NŌTO"})})]})]})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Continuez votre lecture"}),s.jsx(pe,{to:"/blog",children:s.jsxs(se,{variant:"outline",className:"gap-2",children:[s.jsx(Dn,{className:"w-4 h-4"}),"Retour au blog"]})})]})})})]}),s.jsx(it,{})]})},JQ="/assets/arthrose-chien-chat-hero-g8m5E200.png",ZQ=[{number:1,title:"Contrôle du poids",icon:rL,content:"La surcharge pondérale augmente le stress sur les articulations. Une perte de poids permet de réduire les signes cliniques de l'ostéoarthrose et d'améliorer la mobilité (Rychel, 2010). Une alimentation adaptée joue un rôle crucial dans ce processus (Balzer et Loth, 2015). Un régime hypocalorique peut être recommandé, avec une distribution de la ration en plusieurs repas pour favoriser la satiété de l'animal. Les friandises devraient être évitées.",reference:"Blanchard, 2015"},{number:2,title:"Exercice modéré",icon:W8,content:"Une activité physique régulière et mesurée aide à maintenir la mobilité articulaire et la musculature de l'animal. Des promenades quotidiennes, adaptées au rythme et à la durée de l'animal, sont recommandées. Des petits exercices ou des phases de jeu peuvent également stimuler leur activité.",reference:null},{number:3,title:"Agents thérapeutiques",icon:eL,content:"Certains aliments complémentaires riches en chondroprotecteurs sont utilisés pour protéger le cartilage, comme la glucosamine, la chondroïtine sulfate, le méthylsulfonylméthane (MSM), le collagène et l'acide hyaluronique. Les acides gras oméga-3 EPA et DHA, présents dans certains poissons et algues, sont également bénéfiques pour les articulations souffrant d'arthrose. Les antioxydants comme la vitamine E et la superoxyde dismutase (SOD) aident à lutter contre le stress oxydatif au niveau des articulations (Fernandez, 2008). Des plantes réputées pour leur action bénéfique en cas d'arthrose, telles que le cassis, la prêle, la reine des prés, le curcuma et l'harpagophytum, peuvent également être utilisées (Anderson, 2018). Une supplémentation quotidienne pendant 1 à 3 mois est recommandée.",reference:null},{number:4,title:"Traitements antidouleur",icon:aL,content:"En complément des mesures mentionnées ci-dessus, des traitements médicamenteux peuvent être mis en place pour soulager les douleurs liées à l'arthrose. Les anti-inflammatoires non stéroïdiens (AINS) ou certains opioïdes, tels que le tramadol par voie orale, sont couramment utilisés.",reference:null},{number:5,title:"Le CBD",icon:ss,content:"Le cannabidiol (CBD) est une molécule de plus en plus étudiée et utilisée dans le cadre de traitement contre l'arthrose chez les animaux. Elle a notamment été étudiée pour ses effets thérapeutiques chez les animaux souffrant d'ostéoarthrose (Gamble, 2018).",reference:"Gamble, 2018",highlight:!0},{number:6,title:"Physiothérapie",icon:p4,content:"La physiothérapie vise à améliorer la santé physique et la motricité à l'aide de moyens physiques. Elle peut inclure des traitements par la chaleur, le froid, des exercices de mouvement, le massage, la balnéothérapie, l'électrostimulation, les ultrasons et la thérapie laser (Noblet, 2013).",reference:"Noblet, 2013"}],eJ=()=>(g.useEffect(()=>{document.title="CBD Arthrose Chien Chat | Soulager Douleurs";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","CBD pour arthrose chien et chat : traitements naturels, effet du cannabidiol sur les douleurs articulaires animaux. Conseils vétérinaires.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"CBD Arthrose Chien Chat | Soulager Douleurs",description:"CBD pour arthrose chien et chat : traitements naturels, effet du cannabidiol sur les douleurs articulaires animaux. Conseils vétérinaires.",url:"/blog/cbd-arthrose-animaux",type:"article",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Blog",url:"/blog"},{name:"CBD Arthrose Animaux",url:"/blog/cbd-arthrose-animaux"}]}),s.jsxs("main",{className:"pt-20",children:[s.jsxs("section",{className:"relative h-[50vh] md:h-[60vh] overflow-hidden",children:[s.jsx("img",{src:JQ,alt:"Chien et chat - Lutter contre l'arthrose",className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background via-background/50 to-transparent"}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-6 md:p-12",children:s.jsx("div",{className:"container mx-auto",children:s.jsxs("div",{className:"max-w-4xl",children:[s.jsxs(pe,{to:"/blog",className:"inline-flex items-center gap-2 text-primary hover:underline mb-4",children:[s.jsx(Dn,{className:"w-4 h-4"}),"Retour au blog"]}),s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground",children:"Lutter contre l'arthrose chez le chien et le chat"})]})})})]}),s.jsx("article",{className:"py-12 md:py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsxs("section",{className:"mb-12",children:[s.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-6",children:"Les traitements de l'arthrose chez le chien et le chat visent à ralentir la progression de cette maladie, améliorant ainsi la mobilité, la tolérance à l'exercice et la qualité de vie des animaux de compagnie (Allgeyer, 2016)."}),s.jsx("div",{className:"bg-amber-500/10 border border-amber-500/20 rounded-2xl p-6",children:s.jsx("p",{className:"text-foreground font-medium",children:"⚠️ Il est essentiel de prendre en charge l'arthrose précocement, car elle est évolutive et irréversible."})}),s.jsx("p",{className:"text-muted-foreground leading-relaxed mt-6",children:"Cette approche repose sur une approche multimodale afin de rompre le cercle vicieux de l'arthrose. Les animaux atteints d'arthrose ont une activité physique limitée en raison de la douleur lors des déplacements, ce qui contribue à la détérioration des articulations."})]}),s.jsxs("section",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-8",children:"Les fondements des traitements de l'arthrose"}),s.jsx("div",{className:"space-y-6",children:ZQ.map(e=>s.jsx("div",{className:`rounded-2xl p-6 md:p-8 border ${e.highlight?"bg-primary/10 border-primary/30":"bg-card border-border/50"}`,children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:`w-12 h-12 rounded-xl flex items-center justify-center flex-shrink-0 ${e.highlight?"bg-primary text-primary-foreground":"bg-muted text-foreground"}`,children:s.jsx(e.icon,{className:"w-6 h-6"})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("span",{className:`text-sm font-bold px-2 py-1 rounded ${e.highlight?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"}`,children:e.number}),s.jsx("h3",{className:"text-lg md:text-xl font-bold text-foreground",children:e.title})]}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.content}),e.reference&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-3 italic",children:["Référence : ",e.reference]})]})]})},e.number))})]}),s.jsx("section",{className:"mb-12",children:s.jsx("div",{className:"bg-muted/50 rounded-2xl p-6 md:p-8",children:s.jsxs("p",{className:"text-foreground leading-relaxed",children:["En suivant ces piliers de traitement, il est possible d'améliorer le confort et la qualité de vie des animaux atteints d'arthrose. Cependant, il est toujours préférable de",s.jsx("strong",{className:"text-primary",children:" consulter un vétérinaire"})," pour obtenir un plan de traitement personnalisé pour chaque animal."]})})}),s.jsxs("section",{className:"bg-card border border-border rounded-2xl p-6 md:p-8 text-center",children:[s.jsx("h3",{className:"text-xl font-bold text-foreground mb-4",children:"Découvrez nos produits CBD"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Le CBD peut aider à soulager les douleurs articulaires de vos animaux de compagnie. Découvrez notre gamme de produits de qualité."}),s.jsx(pe,{to:"/produits",children:s.jsx(se,{size:"lg",children:"Voir nos produits"})})]})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Continuez votre lecture"}),s.jsx(pe,{to:"/blog",children:s.jsxs(se,{variant:"outline",className:"gap-2",children:[s.jsx(Dn,{className:"w-4 h-4"}),"Retour au blog"]})})]})})})]}),s.jsx(it,{})]})),tJ="/assets/dosage-cbd-hero-BAb6Q3wf.png",tC=[{product:"Huile 5%",drops:"20 gouttes",mg:"50 mg"},{product:"Huile 10%",drops:"10 gouttes",mg:"50 mg"},{product:"Huile 20%",drops:"5 gouttes",mg:"50 mg"},{product:"Gummies (20mg)",drops:"2 à 3 gummies",mg:"40-60 mg"}],rJ=()=>(g.useEffect(()=>{document.title="Dosage CBD | Guide Complet Huiles & Gummies";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Guide dosage CBD : 50mg/jour recommandé. Équivalences huiles 5%, 10%, 20% et gummies. Conseils pour trouver votre dosage idéal.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Dosage CBD | Guide Complet Huiles & Gummies",description:"Guide dosage CBD : 50mg/jour recommandé. Équivalences huiles 5%, 10%, 20% et gummies. Conseils pour trouver votre dosage idéal.",url:"/blog/dosage-cbd",type:"article",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Blog",url:"/blog"},{name:"Dosage CBD",url:"/blog/dosage-cbd"}]}),s.jsxs("main",{className:"pt-20",children:[s.jsxs("section",{className:"relative h-[50vh] md:h-[60vh] overflow-hidden",children:[s.jsx("img",{src:tJ,alt:"Dosage de CBD - Pipette et huile",className:"absolute inset-0 w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background via-background/50 to-transparent"}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-6 md:p-12",children:s.jsx("div",{className:"container mx-auto",children:s.jsxs("div",{className:"max-w-4xl",children:[s.jsxs(pe,{to:"/blog",className:"inline-flex items-center gap-2 text-primary hover:underline mb-4",children:[s.jsx(Dn,{className:"w-4 h-4"}),"Retour au blog"]}),s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground",children:"L'important est le dosage de CBD"})]})})})]}),s.jsx("article",{className:"py-12 md:py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsxs("section",{className:"mb-12",children:[s.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-6",children:"Actuellement, sur le marché, il existe beaucoup de produits à base de CBD. On les trouve sous diverses formes, mais les consommateurs ont toujours un peu de mal à comprendre leur composition et surtout le dosage adéquat."}),s.jsx("div",{className:"bg-blue-500/10 border border-blue-500/20 rounded-2xl p-6",children:s.jsxs("p",{className:"text-foreground",children:["💡 Les produits qui présentent une ",s.jsx("strong",{children:"concentration plus faible de CBD"})," peuvent être préférables pour les personnes ayant besoin de la présence d'autres cannabinoïdes, la proportion de cannabinoïdes mineurs diminuant avec une concentration plus élevée de CBD."]})}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed mt-6",children:["Les produits NŌTO contiennent entre ",s.jsx("strong",{className:"text-primary",children:"5% et 20% de CBD"})," en fonction du produit choisi."]})]}),s.jsxs("section",{className:"mb-12",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center",children:s.jsx(Ku,{className:"w-6 h-6 text-primary"})}),s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"Quel est le bon dosage de CBD ?"})]}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed mb-6",children:["Nous conseillons ",s.jsx("strong",{className:"text-primary",children:"50 mg de CBD par jour"}),". Pour nos huiles sublinguales et gummies, voici les équivalences :"]}),s.jsxs("div",{className:"bg-card rounded-2xl border border-border/50 overflow-hidden mb-6",children:[s.jsxs("div",{className:"grid grid-cols-3 bg-muted/50 p-4 font-semibold text-foreground text-sm",children:[s.jsx("span",{children:"Produit"}),s.jsx("span",{className:"text-center",children:"Dosage journalier"}),s.jsx("span",{className:"text-right",children:"Équivalent CBD"})]}),tC.map((e,t)=>s.jsxs("div",{className:`grid grid-cols-3 p-4 text-sm ${t!==tC.length-1?"border-b border-border/50":""}`,children:[s.jsx("span",{className:"font-medium text-foreground",children:e.product}),s.jsx("span",{className:"text-center text-muted-foreground",children:e.drops}),s.jsx("span",{className:"text-right text-primary font-semibold",children:e.mg})]},t))]}),s.jsx("div",{className:"bg-muted/30 rounded-xl p-4 text-sm text-muted-foreground",children:s.jsxs("p",{children:["ℹ️ Il est possible de combiner huiles et gummies mais en restant dans les dosages indiqués.",s.jsx("strong",{className:"text-foreground",children:" Le pourcentage de CBD dans le produit importe peu. Ce qui prime est la quantité de CBD prise de manière journalière."})]})})]}),s.jsx("section",{className:"mb-12",children:s.jsxs("div",{className:"bg-card border border-border/50 rounded-2xl p-6 md:p-8",children:[s.jsx("h3",{className:"text-lg font-bold text-foreground mb-4",children:"La proportionnalité des dosages"}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["Il est à noter que certaines marques proposent des pourcentages différents de CBD dans leurs produits, notamment leurs huiles sublinguales. Elles mettent en avant un certain nombre de gouttes à prendre par jour. Mais conseiller ",s.jsx("strong",{children:"20 gouttes d'une huile 5%"}),",",s.jsx("strong",{children:" 10 gouttes d'une huile 10%"})," et ",s.jsx("strong",{children:"5 gouttes d'une huile à 20%"})," reviendra exactement au même en termes d'effets par proportionnalité et procurera la même quantité de CBD ingérée, soit environ ",s.jsx("span",{className:"text-primary font-semibold",children:"50mg"}),"."]})]})}),s.jsxs("section",{className:"mb-12",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center",children:s.jsx(jh,{className:"w-6 h-6 text-primary"})}),s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"L'importance des composants du CBD"})]}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed mb-6",children:["Des études ont prouvé que les effets du CBD sont liés à certains de ses composants. On parle de ",s.jsx("strong",{className:"text-primary",children:"« l'effet entourage »"})," des terpènes. Ces derniers interagissent avec le CBD. Mais l'accroissement des effets du CBD peut également être dû aux composants des produits à base de CBD."]}),s.jsx("div",{className:"bg-primary/10 border border-primary/30 rounded-2xl p-6 md:p-8 mb-6",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Fo,{className:"w-8 h-8 text-primary flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-bold text-foreground mb-2",children:"Pour un effet maximum"}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["Nous conseillons une huile à ",s.jsx("strong",{children:"spectre complet"})," avec d'autres cannabinoïdes. Les produits NŌTO contiennent un extrait de chanvre à spectre large (Broad Spectrum) avec notamment en plus du CBD des molécules comme du ",s.jsx("strong",{className:"text-primary",children:"CBG"})," ou du ",s.jsx("strong",{className:"text-primary",children:"CBN"})," ainsi que des ",s.jsx("strong",{className:"text-primary",children:"terpènes"})," et non une molécule isolée de CBD."]})]})]})}),s.jsx("p",{className:"text-sm text-muted-foreground italic",children:"Celui que nous utilisons est 100% naturel et fabriqué à partir de chanvre cultivé selon les normes en vigueur."})]}),s.jsxs("section",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-6",children:"Conclusion"}),s.jsxs("div",{className:"bg-muted/50 rounded-2xl p-6 md:p-8 space-y-4",children:[s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Ces explications sont sûrement très techniques aux yeux des utilisateurs de CBD."}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-foreground",children:["Le plus important n'est pas le ",s.jsx("strong",{children:"pourcentage de CBD"})," dans le produit"]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-foreground",children:["Ce qui compte c'est le ",s.jsx("strong",{children:"dosage selon votre situation"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"w-5 h-5 text-primary flex-shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-foreground",children:["La ",s.jsx("strong",{children:"composition du produit"})," et les cannabinoïdes mineurs sont essentiels"]})]})]})]})]}),s.jsxs("section",{className:"bg-card border border-border rounded-2xl p-6 md:p-8 text-center",children:[s.jsx("h3",{className:"text-xl font-bold text-foreground mb-4",children:"Découvrez nos huiles CBD Broad Spectrum"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Nos huiles contiennent un extrait de chanvre à spectre large avec CBD, CBG, CBN et terpènes pour un effet entourage optimal."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx(pe,{to:"/produits/huiles-cbd",children:s.jsx(se,{size:"lg",children:"Voir nos huiles CBD"})}),s.jsx(pe,{to:"/produits",children:s.jsx(se,{size:"lg",variant:"outline",children:"Tous nos produits"})})]})]})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Continuez votre lecture"}),s.jsx(pe,{to:"/blog",children:s.jsxs(se,{variant:"outline",className:"gap-2",children:[s.jsx(Dn,{className:"w-4 h-4"}),"Retour au blog"]})})]})})})]}),s.jsx(it,{})]})),sJ="/assets/terpenes-hero-C8HWnSpC.png",nJ=[{name:"Myrcène",icon:ss,description:"Le terpène le plus prédominant dans le chanvre, considéré comme l'un des dix terpènes primaires.",aroma:"Notes musquées, assimilées à l'odeur du clou de girofle",benefits:["Douleurs","Inflammations","Stress"],color:"bg-green-500/10 text-green-600 border-green-500/20"},{name:"Limonène",icon:L8,description:"Aux arômes d'agrumes, très prisé par les parfumeurs pour son odeur agréable.",aroma:"Saveur citronnée extrêmement plaisante",benefits:["Stress","Dépression","Perte de poids"],color:"bg-amber-500/10 text-amber-600 border-amber-500/20"},{name:"Béta-caryophyllène",icon:cL,description:"Réputé pour ses nombreuses propriétés thérapeutiques et son goût rappelant les saveurs boisées.",aroma:"Saveurs boisées et épicées",benefits:["Anti-inflammatoire","Antiviral","Anxiolytique","Antispasmodique"],color:"bg-orange-500/10 text-orange-600 border-orange-500/20"}],aJ=()=>(g.useEffect(()=>{document.title="Terpènes CBD | Effet Entourage Expliqué";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Terpènes et CBD : myrcène, limonène, caryophyllène. L'effet entourage décuplant les bienfaits du cannabidiol. Guide complet des terpènes.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Terpènes CBD | Effet Entourage Expliqué",description:"Terpènes et CBD : myrcène, limonène, caryophyllène. L'effet entourage décuplant les bienfaits du cannabidiol. Guide complet des terpènes.",url:"/blog/terpenes-cbd",type:"article",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Blog",url:"/blog"},{name:"Terpènes CBD",url:"/blog/terpenes-cbd"}]}),s.jsxs("main",{className:"pt-20",children:[s.jsxs("section",{className:"relative h-[50vh] md:h-[60vh] overflow-hidden bg-black",children:[s.jsx("img",{src:sJ,alt:"Feuille de chanvre - Terpènes",className:"absolute inset-0 w-full h-full object-cover opacity-80"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background via-background/30 to-transparent"}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-6 md:p-12",children:s.jsx("div",{className:"container mx-auto",children:s.jsxs("div",{className:"max-w-4xl",children:[s.jsxs(pe,{to:"/blog",className:"inline-flex items-center gap-2 text-primary hover:underline mb-4",children:[s.jsx(Dn,{className:"w-4 h-4"}),"Retour au blog"]}),s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-foreground",children:"On vous dit tout sur les terpènes !"})]})})})]}),s.jsx("article",{className:"py-12 md:py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsx("section",{className:"mb-12",children:s.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed italic",children:"Les terpènes… Un mot bien mystérieux et inconnu pour la plupart des gens et pourtant, ils sont omniprésents dans notre environnement et ce, bien avant notre arrivée sur terre."})}),s.jsxs("section",{className:"mb-12",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center",children:s.jsx(jh,{className:"w-6 h-6 text-primary"})}),s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"Que sont les terpènes ?"})]}),s.jsxs("div",{className:"bg-primary/5 border border-primary/20 rounded-2xl p-6 md:p-8 mb-6",children:[s.jsx("p",{className:"text-foreground font-medium mb-4",children:"📚 Définition"}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["Les terpènes sont des ",s.jsx("strong",{className:"text-foreground",children:"molécules aux propriétés odoriférantes"}),", produits par de nombreux végétaux, dont le chanvre. On recense plus de ",s.jsx("strong",{className:"text-primary",children:"120 terpènes"})," dans le chanvre biologique. Les deux principaux sont le ",s.jsx("strong",{children:"myrcène"})," et le ",s.jsx("strong",{children:"limonène"}),"."]})]}),s.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:"C'est grâce à eux que les plantes ont leurs odeurs et leurs goûts spécifiques, mais outre ce côté olfactif et gustatif, ils possèdent aussi de nombreux bienfaits. Ils sont créés et secrétés par les mêmes glandes qui produisent le CBD et le THC."}),s.jsx("div",{className:"bg-muted/30 rounded-xl p-5 text-sm",children:s.jsxs("p",{className:"text-muted-foreground",children:["🌿 ",s.jsx("strong",{className:"text-foreground",children:"Rôle naturel :"})," Les terpènes assurent la défense des plantes face aux insectes prédateurs mais attirent aussi les insectes qui permettent la pollinisation et donc, leur reproduction."]})})]}),s.jsxs("section",{className:"mb-12",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center",children:s.jsx(Fo,{className:"w-6 h-6 text-primary"})}),s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground",children:"Les effets des terpènes sur le CBD"})]}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed mb-6",children:["Les terpènes aident le CBD à se fixer non seulement sur les ",s.jsx("strong",{className:"text-foreground",children:"récepteurs CB1"}),", présents dans le système nerveux, mais aussi sur d'autres récepteurs du corps, dont les",s.jsx("strong",{className:"text-foreground",children:" CB2"})," que l'on retrouve principalement dans le système immunitaire."]}),s.jsxs("div",{className:"bg-gradient-to-br from-primary/10 via-primary/5 to-accent/10 border border-primary/20 rounded-2xl p-6 md:p-8 mb-6",children:[s.jsxs("h3",{className:"text-xl font-bold text-foreground mb-4 flex items-center gap-2",children:[s.jsx(Fo,{className:"w-5 h-5 text-primary"}),"L'Effet Entourage"]}),s.jsxs("p",{className:"text-muted-foreground leading-relaxed mb-4",children:["Les terpènes permettent au CBD d'être absorbé plus rapidement dans la circulation sanguine. Ce phénomène est appelé ",s.jsx("strong",{className:"text-primary",children:"l'effet Entourage"}),"."]}),s.jsx("p",{className:"text-foreground font-medium",children:"La synergie de tous les terpènes produit un impact plus fort que n'importe quel composé utilisé isolément."})]}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Chaque terpène a un rôle bien spécifique. Le limonène atténue les effets de la dépression et est également utilisé pour la perte de poids, le soulagement du stress et a une saveur citronnée extrêmement plaisante. D'autres terpènes ont des vertus anti-inflammatoires, agissent sur le mental, développent la mémoire et la concentration."})]}),s.jsxs("section",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-8 text-center",children:"Les terpènes les plus prédominants dans le chanvre"}),s.jsx("div",{className:"space-y-6",children:nJ.map((e,t)=>s.jsx("div",{className:`rounded-2xl p-6 md:p-8 border ${e.color}`,children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"w-14 h-14 rounded-xl bg-background/80 flex items-center justify-center flex-shrink-0",children:s.jsx(e.icon,{className:"w-7 h-7"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"text-xl font-bold text-foreground mb-2",children:e.name}),s.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:e.description}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-semibold text-foreground uppercase tracking-wide mb-2",children:"Arôme"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e.aroma})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-semibold text-foreground uppercase tracking-wide mb-2",children:"Bienfaits"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:e.benefits.map((r,n)=>s.jsx("span",{className:"text-xs px-2 py-1 bg-background/80 rounded-full text-foreground",children:r},n))})]})]})]})]})},t))})]}),s.jsxs("section",{className:"mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-6",children:"Conclusion"}),s.jsxs("div",{className:"bg-muted/50 rounded-2xl p-6 md:p-8",children:[s.jsxs("p",{className:"text-muted-foreground leading-relaxed mb-4",children:["Les terpènes contribuent à ce que nous appelons ",s.jsx("strong",{className:"text-primary",children:"l'effet d'entraînement"}),", aidant les cannabinoïdes à travailler en synergie et ainsi, décupler les effets du CBD."]}),s.jsx("p",{className:"text-foreground font-medium",children:"🌿 Vous retrouvez dans les huiles NŌTO les terpènes les plus efficaces pour cette synergie."})]})]}),s.jsxs("section",{className:"bg-card border border-border rounded-2xl p-6 md:p-8 text-center",children:[s.jsx("h3",{className:"text-xl font-bold text-foreground mb-4",children:"Découvrez nos huiles CBD riches en terpènes"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Nos huiles Broad Spectrum contiennent tous les terpènes naturels du chanvre pour un effet entourage optimal."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx(pe,{to:"/produits/huiles-cbd",children:s.jsx(se,{size:"lg",children:"Voir nos huiles CBD"})}),s.jsx(pe,{to:"/blog/dosage-cbd-guide",children:s.jsx(se,{size:"lg",variant:"outline",children:"Guide du dosage CBD"})})]})]})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Continuez votre lecture"}),s.jsx(pe,{to:"/blog",children:s.jsxs(se,{variant:"outline",className:"gap-2",children:[s.jsx(Dn,{className:"w-4 h-4"}),"Retour au blog"]})})]})})})]}),s.jsx(it,{})]})),rC=({rating:e=5,size:t="sm"})=>{const r=t==="lg"?"h-7 w-7":t==="md"?"h-5 w-5":"h-4 w-4",n=t==="lg"?"h-4 w-4":t==="md"?"h-3 w-3":"h-2.5 w-2.5";return s.jsx("div",{className:"flex gap-0.5",children:[...Array(5)].map((a,i)=>s.jsx("div",{className:`${r} ${i<e?"bg-[#00b67a]":"bg-muted"} flex items-center justify-center`,children:s.jsx(Nh,{className:`${n} fill-white text-white`})},i))})},iJ=()=>{g.useEffect(()=>{document.title="Avis Clients CBD | Témoignages Trustpilot NŌTO";const r=document.querySelector('meta[name="description"]');r&&r.setAttribute("content","Avis clients NŌTO CBD : note 4.7/5 sur Trustpilot, 447 avis vérifiés. Témoignages sur huiles, gummies et granules CBD. Découvrez leur expérience.")},[]);const e={total:447,average:4.7,distribution:[{stars:5,percentage:85},{stars:4,percentage:8},{stars:3,percentage:3},{stars:2,percentage:2},{stars:1,percentage:2}]},t=[{name:"GAELLE CREATIONS",location:"FR",reviewCount:1,date:"26 nov. 2025",rating:5,title:"Agréablement surprise !!",text:"Agréablement surprise !!! Un accueil vraiment top, du personnel agréable, et des produits conformes à mes attentes !!!! Je suis encore en phase de test (plusieurs produits pour trouver mon équilibre), mais ce que j'ai actuellement GRANULES ALGOS je recommande vivement !!! Je recommande vivement NOTO !! Et surtout si vous avez des doutes ou besoin de conseils, n'hésitez surtout pas !! Une équipe est là pour vous répondre, vous orienter et vous conseiller !!! Pour un avis 'constructif' sur ALGOS, en tant malade (PR & SPA) sans aucun traitement, ni bio thérapie, je tiens et (re)vie grâce à mon CBD !! Les granules c'est juste super !! Pratique, discret, sans sucre, sans goût particulier, le must !!! Lancez vous !! Vous ne le regretterez pas !!!",purchaseDate:"17 novembre 2025",type:"Avis spontané",initial:"GC",verified:!1,redirected:!0},{name:"Francis et Francine COLONNA",location:"FR",reviewCount:4,date:"17 nov. 2025",rating:5,title:"RAS Ce produit a calmé mes douleurs",text:"RAS Ce produit a calmé mes douleurs",purchaseDate:"28 octobre 2025",initial:"FE",verified:!0},{name:"cliente",location:"MC",reviewCount:4,date:"16 nov. 2025",rating:5,title:"Ravis de découvrir NOTO",text:"Ravis de découvrir NOTO par le biais de ma pharmacie. Les produits sont de grande qualité et très efficaces pour mes douleurs articulaires.",initial:"CL",verified:!1,redirected:!0},{name:"Ka neliro",location:"FR",reviewCount:1,date:"Il y a 3 jours",rating:5,title:"Très bons produits découverts en pharmacie",text:"Très bons produits découverts en pharmacie et devenus désormais indispensables. Douleurs ou moral en berne, les produits noto sont une aide rapide à mon bien être.",initial:"KN",verified:!0},{name:"Estelle Rhône",location:"FR",reviewCount:2,date:"15 nov. 2025",rating:5,title:"Cbd algos marque Nôto, d'excellente qualité",text:"Cbd algos marque Nôto, d'excellente qualité, sous forme de tube de granules extrêmement pratique pour l'avoir toujours sur soi, prise rapide et efficace immédiatement sur les douleurs. Beaucoup de choix de produits adaptés à chaque besoin.",initial:"ER",verified:!0},{name:"REBOUD Marie Eva",location:"FR",reviewCount:4,date:"26 oct. 2025",rating:5,title:"J'ai une polyarthrite rhumatoïde et de...",text:"J'ai une polyarthrite rhumatoïde et de l'arthrose. Les gummies sont le seul 'médicament' qui me soulage vraiment rapidement et longtemps, et sans effets secondaires. J'ai quasiment arrêté l'Acupan. Mais je n'en prends que ponctuellement si j'en ai trop fait et que la douleur est vraiment forte.",purchaseDate:"16 octobre 2025",initial:"RM",verified:!0},{name:"Laurence",location:"FR",reviewCount:15,date:"18 oct. 2025",rating:5,title:"Parfait",text:"Parfait, maman l'utilise pour soulager ses épaules",purchaseDate:"7 octobre 2025",initial:"LA",verified:!0},{name:"Sylvie Desespringalle",location:"FR",reviewCount:1,date:"16 oct. 2025",rating:5,title:"bon produit de qualité constante",text:"bon produit de qualité constante, bonne efficacité, bon goût et bon service commercial (commande traitées et expédiées rapidement)",purchaseDate:"21 octobre 2025",initial:"SD",verified:!0},{name:"Marie-Christine",location:"FR",reviewCount:3,date:"14 oct. 2025",rating:5,title:"Huile CBD excellente",text:"J'utilise l'huile CBD depuis plusieurs mois maintenant et je suis très satisfaite des résultats. Elle m'aide à mieux dormir et à réduire mon stress quotidien.",initial:"MC",verified:!0},{name:"Philippe D.",location:"FR",reviewCount:2,date:"12 oct. 2025",rating:5,title:"Service client au top",text:"Commande reçue rapidement et bien emballée. Le service client a été très réactif pour répondre à mes questions. Je recommande !",initial:"PD",verified:!0},{name:"Nathalie B.",location:"FR",reviewCount:1,date:"10 oct. 2025",rating:4,title:"Bons produits",text:"Les produits sont de bonne qualité. J'aurais aimé avoir plus de choix de saveurs pour les gummies, mais globalement très satisfaite.",initial:"NB",verified:!0},{name:"Jean-Marc",location:"FR",reviewCount:5,date:"8 oct. 2025",rating:5,title:"Granules efficaces",text:"Les granules Algos sont vraiment efficaces pour mes douleurs chroniques. Je les ai découverts en pharmacie et je ne peux plus m'en passer.",initial:"JM",verified:!0}];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Avis Clients CBD | Témoignages Trustpilot NŌTO",description:"Avis clients NŌTO CBD : note 4.7/5 sur Trustpilot, 447 avis vérifiés. Témoignages sur huiles, gummies et granules CBD. Découvrez leur expérience.",url:"/temoignages",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Avis Clients",url:"/temoignages"}]}),s.jsxs("main",{children:[s.jsx("section",{className:"bg-gradient-to-b from-muted to-background py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-primary mb-4",children:"Avis Clients NŌTO"}),s.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:"Découvrez ce que nos clients pensent de nos produits CBD"}),s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("span",{className:"text-6xl font-bold text-foreground",children:e.average}),s.jsxs("div",{className:"flex flex-col items-start",children:[s.jsx("span",{className:"text-lg font-semibold text-foreground",children:"Excellent"}),s.jsx(rC,{rating:5,size:"lg"})]})]}),s.jsxs("p",{className:"text-muted-foreground",children:["Basé sur ",s.jsxs("span",{className:"font-semibold text-foreground",children:[e.total," avis"]})]}),s.jsxs("a",{href:"https://fr.trustpilot.com/review/notocbd.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[s.jsxs("svg",{viewBox:"0 0 126 31",className:"h-8",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M33.426 0H0v30.727h33.426V0z",fill:"#00B67A"}),s.jsx("path",{d:"M40.758 0h33.426v30.727H40.758V0z",fill:"#00B67A"}),s.jsx("path",{d:"M81.52 0h33.427v30.727H81.52V0z",fill:"#00B67A"}),s.jsx("path",{d:"M16.713 12.734l5.186-1.057 2.193-6.69-4.186 10.734-3.193 1.013z",fill:"#005128"}),s.jsx("path",{d:"M16.713 12.734L11.51 16.72l1.986 6.09 3.217-10.076zm-5.203 3.986l-1.986-6.09 7.189-5.206-5.203 11.296z",fill:"#DCDCE6"}),s.jsx("path",{d:"M16.713 12.734l5.186-1.057-5.203 5.043.017-3.986zm-5.203 3.986l1.986 6.09 3.2-5.033.017-1.057z",fill:"#FFF"}),s.jsx("path",{d:"M57.471 12.734l5.186-1.057 2.193-6.69-4.186 10.734-3.193 1.013z",fill:"#005128"}),s.jsx("path",{d:"M57.471 12.734l-5.203 3.986 1.986 6.09 3.217-10.076zm-5.203 3.986l-1.986-6.09 7.189-5.206-5.203 11.296z",fill:"#DCDCE6"}),s.jsx("path",{d:"M57.471 12.734l5.186-1.057-5.203 5.043.017-3.986zm-5.203 3.986l1.986 6.09 3.2-5.033.017-1.057z",fill:"#FFF"}),s.jsx("path",{d:"M98.234 12.734l5.185-1.057 2.193-6.69-4.185 10.734-3.193 1.013z",fill:"#005128"}),s.jsx("path",{d:"M98.234 12.734l-5.203 3.986 1.985 6.09 3.218-10.076zm-5.203 3.986l-1.986-6.09 7.189-5.206-5.203 11.296z",fill:"#DCDCE6"}),s.jsx("path",{d:"M98.234 12.734l5.185-1.057-5.202 5.043.017-3.986zm-5.203 3.986l1.985 6.09 3.201-5.033.017-1.057z",fill:"#FFF"})]}),s.jsx("span",{className:"text-xl font-semibold text-[#191919]",children:"Trustpilot"})]})]})]})})}),s.jsx("section",{className:"py-12",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"max-w-6xl mx-auto",children:s.jsxs("div",{className:"grid lg:grid-cols-[300px_1fr] gap-8",children:[s.jsxs("aside",{className:"space-y-6",children:[s.jsxs(ve,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"flex items-center justify-center w-10 h-10 bg-[#00b67a] rounded",children:s.jsx(Nh,{className:"h-5 w-5 fill-white text-white"})}),s.jsx("span",{className:"text-2xl font-bold",children:e.average})]}),s.jsx("h3",{className:"font-semibold mb-2",children:"Tous les avis"}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Total : ",e.total," • ",s.jsx("a",{href:"https://fr.trustpilot.com/review/notocbd.com",target:"_blank",rel:"noopener noreferrer",className:"text-[#00b67a] hover:underline",children:"Écrire un avis"})]}),s.jsx("div",{className:"space-y-2",children:e.distribution.map(r=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-sm w-16",children:[r.stars," étoile",r.stars>1?"s":""]}),s.jsx(Ew,{value:r.percentage,className:"flex-1 h-2"}),s.jsxs("span",{className:"text-sm text-muted-foreground w-10 text-right",children:[r.percentage," %"]})]},r.stars))})]}),s.jsx(ve,{className:"p-6",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(jp,{className:"h-5 w-5 text-muted-foreground mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"A répondu à 75 % de ses avis négatifs"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Répond généralement dans un délai de 2 semaines"})]})]})}),s.jsx("a",{href:"https://fr.trustpilot.com/review/notocbd.com",target:"_blank",rel:"noopener noreferrer",children:s.jsxs(se,{className:"w-full bg-[#00b67a] hover:bg-[#00a06a] text-white gap-2",children:[s.jsx(Al,{className:"h-4 w-4"}),"Écrire un avis sur Trustpilot"]})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h2",{className:"text-2xl font-bold mb-6",children:["Tous les avis (",e.total,")"]}),t.map((r,n)=>s.jsxs(ve,{className:"p-6",children:[s.jsxs("div",{className:"flex items-start justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(fw,{className:"h-12 w-12",children:s.jsx(hw,{className:"bg-primary/10 text-primary font-medium",children:r.initial})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-foreground",children:r.name}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[r.location," • ",r.reviewCount," avis"]})]})]}),s.jsx("span",{className:"text-sm text-muted-foreground",children:r.date})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(rC,{rating:r.rating}),r.verified&&s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Ot,{className:"h-3 w-3 text-[#00b67a]"}),"Vérifié"]}),r.redirected&&s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Al,{className:"h-3 w-3"}),"Redirigé"]})]}),r.title&&s.jsx("h4",{className:"font-semibold text-foreground mb-2",children:r.title}),s.jsx("p",{className:"text-foreground leading-relaxed mb-4",children:r.text}),(r.purchaseDate||r.type)&&s.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[r.purchaseDate&&s.jsx("span",{className:"text-xs bg-muted px-2 py-1 rounded",children:r.purchaseDate}),r.type&&s.jsx("span",{className:"text-xs bg-muted px-2 py-1 rounded",children:r.type})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[s.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground transition-colors",children:[s.jsx(oL,{className:"h-4 w-4"}),"Utile"]}),s.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground transition-colors",children:[s.jsx(sL,{className:"h-4 w-4"}),"Partager"]}),s.jsx("button",{className:"flex items-center gap-1 hover:text-foreground transition-colors",children:s.jsx(H8,{className:"h-4 w-4"})})]})]},n)),s.jsx("div",{className:"text-center pt-6",children:s.jsx("a",{href:"https://fr.trustpilot.com/review/notocbd.com",target:"_blank",rel:"noopener noreferrer",children:s.jsxs(se,{variant:"outline",size:"lg",className:"gap-2",children:["Voir tous les avis sur Trustpilot",s.jsx(Al,{className:"h-4 w-4"})]})})})]})]})})})})]}),s.jsx(it,{})]})},oJ=()=>{const[e]=$x(),{clearCart:t}=sd(),[r,n]=g.useState(!0),[a,i]=g.useState(null),o=e.get("R")||e.get("Ref")||"",l=e.get("M")||e.get("Mt")||"",c=e.get("A")||e.get("Auto")||"",u=e.get("E")||e.get("Erreur")||"00000",d=e.get("S")||e.get("Trans")||"",f=e.get("C")||e.get("Carte")||"",h=e.get("Y")||e.get("Pays")||"",m=l?(parseInt(l)/100).toFixed(2):"";return g.useEffect(()=>{(async()=>{if(!o){console.log("No reference found, skipping order update"),n(!1);return}try{console.log("Updating order status for reference:",o);const{data:p,error:x}=await be.functions.invoke("update-order-status",{body:{reference:o,errorCode:u,authorization:c,transactionId:d,cardType:f,country:h}});x?(console.error("Error updating order status:",x),i("Erreur lors de la mise à jour de la commande")):console.log("Order status updated successfully:",p)}catch(p){console.error("Failed to update order status:",p),i("Erreur lors de la mise à jour de la commande")}finally{n(!1)}})(),t()},[o,u,c,d,f,h,t]),s.jsxs(s.Fragment,{children:[s.jsx(at,{}),s.jsx("div",{className:"min-h-screen bg-background py-12",children:s.jsx("div",{className:"container mx-auto px-4 max-w-2xl",children:s.jsx(ve,{className:"border-green-200 bg-green-50/50",children:s.jsx(Ie,{className:"pt-8 pb-8",children:s.jsxs("div",{className:"text-center space-y-6",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center",children:r?s.jsx(Wr,{className:"w-12 h-12 text-green-600 animate-spin"}):s.jsx(aa,{className:"w-12 h-12 text-green-600"})})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-3xl font-bold text-green-800",children:r?"Confirmation en cours...":"Paiement confirmé !"}),s.jsx("p",{className:"text-muted-foreground",children:r?"Veuillez patienter pendant que nous confirmons votre commande.":"Votre commande a été validée avec succès."}),a&&s.jsxs("p",{className:"text-orange-600 text-sm",children:[a," - Votre paiement a bien été reçu."]})]}),o&&!r&&s.jsxs("div",{className:"bg-background rounded-lg p-6 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 text-primary",children:[s.jsx(hs,{className:"w-5 h-5"}),s.jsx("span",{className:"font-semibold",children:"Détails de la commande"})]}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Référence :"}),s.jsx("span",{className:"font-mono font-semibold",children:o})]}),m&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Montant :"}),s.jsxs("span",{className:"font-semibold",children:[m," €"]})]}),c&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"N° autorisation :"}),s.jsx("span",{className:"font-mono",children:c})]})]})]}),!r&&s.jsxs("div",{className:"space-y-3 pt-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Un email de confirmation vous sera envoyé à l'adresse indiquée lors de la commande."}),s.jsx(se,{asChild:!0,className:"w-full sm:w-auto",children:s.jsxs(pe,{to:"/",children:["Retour à la boutique",s.jsx(kn,{className:"ml-2 w-4 h-4"})]})})]})]})})})})}),s.jsx(it,{})]})},lJ={"00001":"La connexion au centre d'autorisation a échoué","00003":"Erreur Paybox","00004":"Numéro de porteur ou cryptogramme visuel invalide","00006":"Accès refusé ou site/rang/identifiant incorrect","00008":"Date de fin de validité incorrecte","00009":"Erreur de création d'un abonnement","00010":"Devise inconnue","00011":"Montant incorrect","00015":"Paiement déjà effectué","00016":"Abonné déjà existant","00021":"Carte non autorisée","00029":"Carte non conforme","00030":"Temps d'attente supérieur à 15 minutes","00033":"Code pays de l'adresse IP du navigateur non autorisé","00040":"Opération sans authentification 3DSecure","00101":"Carte refusée","00102":"Contacter l'émetteur de carte","00103":"Commerçant invalide","00104":"Conserver la carte","00105":"Ne pas honorer","00107":"Conserver la carte","00108":"Appeler l'émetteur de carte","00112":"Transaction invalide","00114":"Carte non gérée","00115":"Émetteur de carte inconnu","00117":"Annulation client","00119":"Répétition de l'opération","00120":"Réponse erronée","00124":"Mise à jour de fichier non supportée","00125":"Enregistrement non trouvé","00126":"Doublon d'enregistrement","00128":"Format de données invalide","00131":"Identifiant émetteur inconnu","00134":"Suspicion de fraude","00138":"Nombre d'essais PIN dépassé","00141":"Carte perdue","00143":"Carte volée","00151":"Provision insuffisante","00154":"Date de validité dépassée","00155":"Mauvais code PIN","00156":"Carte absente du fichier","00157":"Transaction non autorisée","00158":"Transaction interdite","00159":"Suspicion de fraude","00160":"Commerçant doit contacter acquéreur","00161":"Montant retrait dépassé","00163":"Règles de sécurité non respectées","00168":"Réponse non disponible","00175":"Nombre d'essais PIN dépassé","00176":"Client déjà en opposition","00189":"Échec de l'authentification","00190":"Arrêt momentané du système","00191":"Émetteur de carte inaccessible","00194":"Demande dupliquée","00196":"Mauvais fonctionnement","00197":"Délai dépassé"},cJ=()=>{const[e]=$x(),t=e.get("R")||e.get("Ref")||"",r=e.get("E")||e.get("Erreur")||"",n=lJ[r]||"Une erreur est survenue lors du paiement.";return s.jsxs(s.Fragment,{children:[s.jsx(at,{}),s.jsx("div",{className:"min-h-screen bg-background py-12",children:s.jsx("div",{className:"container mx-auto px-4 max-w-2xl",children:s.jsx(ve,{className:"border-red-200 bg-red-50/50",children:s.jsx(Ie,{className:"pt-8 pb-8",children:s.jsxs("div",{className:"text-center space-y-6",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"w-20 h-20 bg-red-100 rounded-full flex items-center justify-center",children:s.jsx(Su,{className:"w-12 h-12 text-red-600"})})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-3xl font-bold text-red-800",children:"Paiement refusé"}),s.jsx("p",{className:"text-muted-foreground",children:n})]}),s.jsxs("div",{className:"bg-background rounded-lg p-6 space-y-3",children:[t&&s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Référence :"}),s.jsx("span",{className:"font-mono",children:t})]}),r&&s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Code erreur :"}),s.jsx("span",{className:"font-mono text-red-600",children:r})]})]}),s.jsxs("div",{className:"space-y-3 pt-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Votre compte n'a pas été débité. Vous pouvez réessayer le paiement ou choisir un autre moyen de paiement."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[s.jsx(se,{asChild:!0,children:s.jsxs(pe,{to:"/commander",children:[s.jsx(ln,{className:"mr-2 w-4 h-4"}),"Réessayer le paiement"]})}),s.jsx(se,{variant:"outline",asChild:!0,children:s.jsxs(pe,{to:"/panier",children:[s.jsx(Dn,{className:"mr-2 w-4 h-4"}),"Retour au panier"]})})]})]})]})})})})}),s.jsx(it,{})]})},uJ=()=>s.jsxs(s.Fragment,{children:[s.jsx(at,{}),s.jsx("div",{className:"min-h-screen bg-background py-12",children:s.jsx("div",{className:"container mx-auto px-4 max-w-2xl",children:s.jsx(ve,{className:"border-amber-200 bg-amber-50/50",children:s.jsx(Ie,{className:"pt-8 pb-8",children:s.jsxs("div",{className:"text-center space-y-6",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"w-20 h-20 bg-amber-100 rounded-full flex items-center justify-center",children:s.jsx(Su,{className:"w-12 h-12 text-amber-600"})})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-3xl font-bold text-amber-800",children:"Paiement annulé"}),s.jsx("p",{className:"text-muted-foreground",children:"Vous avez annulé le paiement. Votre commande n'a pas été finalisée."})]}),s.jsx("div",{className:"bg-background rounded-lg p-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:"Votre panier a été conservé. Vous pouvez reprendre votre commande à tout moment."})}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center pt-4",children:[s.jsx(se,{asChild:!0,children:s.jsxs(pe,{to:"/panier",children:[s.jsx(ga,{className:"mr-2 w-4 h-4"}),"Retour au panier"]})}),s.jsx(se,{variant:"outline",asChild:!0,children:s.jsxs(pe,{to:"/",children:[s.jsx(Dn,{className:"mr-2 w-4 h-4"}),"Continuer mes achats"]})})]})]})})})})}),s.jsx(it,{})]}),dJ=()=>{const[e]=$x(),t=e.get("R")||e.get("Ref")||"";return s.jsxs(s.Fragment,{children:[s.jsx(at,{}),s.jsx("div",{className:"min-h-screen bg-background py-12",children:s.jsx("div",{className:"container mx-auto px-4 max-w-2xl",children:s.jsx(ve,{className:"border-blue-200 bg-blue-50/50",children:s.jsx(Ie,{className:"pt-8 pb-8",children:s.jsxs("div",{className:"text-center space-y-6",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"w-20 h-20 bg-blue-100 rounded-full flex items-center justify-center",children:s.jsx(Ri,{className:"w-12 h-12 text-blue-600"})})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-3xl font-bold text-blue-800",children:"Paiement en attente"}),s.jsx("p",{className:"text-muted-foreground",children:"Votre paiement est en cours de validation par notre partenaire bancaire."})]}),t&&s.jsx("div",{className:"bg-background rounded-lg p-6 space-y-3",children:s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"Référence de commande :"}),s.jsx("span",{className:"font-mono font-semibold",children:t})]})}),s.jsxs("div",{className:"bg-background rounded-lg p-6 space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-blue-700",children:[s.jsx(xa,{className:"w-5 h-5"}),s.jsx("span",{className:"font-medium",children:"Que se passe-t-il ensuite ?"})]}),s.jsxs("ul",{className:"text-sm text-muted-foreground space-y-2 text-left",children:[s.jsx("li",{children:"• Vous recevrez un email de confirmation dès que le paiement sera validé."}),s.jsx("li",{children:"• Ce processus peut prendre quelques minutes à quelques heures."}),s.jsx("li",{children:"• Si vous ne recevez pas de confirmation sous 24h, contactez-nous."})]})]}),s.jsx("div",{className:"pt-4",children:s.jsx(se,{asChild:!0,children:s.jsxs(pe,{to:"/",children:[s.jsx(Ul,{className:"mr-2 w-4 h-4"}),"Retour à l'accueil"]})})})]})})})})}),s.jsx(it,{})]})};var fJ=Object.defineProperty,hJ=Object.defineProperties,mJ=Object.getOwnPropertyDescriptors,Zp=Object.getOwnPropertySymbols,dP=Object.prototype.hasOwnProperty,fP=Object.prototype.propertyIsEnumerable,sC=(e,t,r)=>t in e?fJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pJ=(e,t)=>{for(var r in t||(t={}))dP.call(t,r)&&sC(e,r,t[r]);if(Zp)for(var r of Zp(t))fP.call(t,r)&&sC(e,r,t[r]);return e},xJ=(e,t)=>hJ(e,mJ(t)),gJ=(e,t)=>{var r={};for(var n in e)dP.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zp)for(var n of Zp(e))t.indexOf(n)<0&&fP.call(e,n)&&(r[n]=e[n]);return r};function vJ(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function yJ(e){let t=g.useRef();return g.useEffect(()=>{t.current=e}),t.current}var bJ=18,hP=40,wJ=`${hP}px`,jJ=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function NJ({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState(!1),d=g.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&a&&o,[a,o,r]),f=g.useCallback(()=>{let h=e.current,m=t.current;if(!h||!m||c||r==="none")return;let v=h,p=v.getBoundingClientRect().left+v.offsetWidth,x=v.getBoundingClientRect().top+v.offsetHeight/2,w=p-bJ,y=x;document.querySelectorAll(jJ).length===0&&document.elementFromPoint(w,y)===h||(i(!0),u(!0))},[e,t,c,r]);return g.useEffect(()=>{let h=e.current;if(!h||r==="none")return;function m(){let p=window.innerWidth-h.getBoundingClientRect().right;l(p>=hP)}m();let v=setInterval(m,1e3);return()=>{clearInterval(v)}},[e,r]),g.useEffect(()=>{let h=n||document.activeElement===t.current;if(r==="none"||!h)return;let m=setTimeout(f,0),v=setTimeout(f,2e3),p=setTimeout(f,5e3),x=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(v),clearTimeout(p),clearTimeout(x)}},[t,n,r,f]),{hasPWMBadge:a,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:wJ}}var mP=g.createContext({}),pP=g.forwardRef((e,t)=>{var r=e,{value:n,onChange:a,maxLength:i,textAlign:o="left",pattern:l,placeholder:c,inputMode:u="numeric",onComplete:d,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:h,containerClassName:m,noScriptCSSFallback:v=_J,render:p,children:x}=r,w=gJ(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),y,b,N,C,_;let[j,S]=g.useState(typeof w.defaultValue=="string"?w.defaultValue:""),k=n??j,D=yJ(k),M=g.useCallback(je=>{a==null||a(je),S(je)},[a]),T=g.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),A=g.useRef(null),W=g.useRef(null),P=g.useRef({value:k,onChange:M,isIOS:typeof window<"u"&&((b=(y=window==null?void 0:window.CSS)==null?void 0:y.supports)==null?void 0:b.call(y,"-webkit-touch-callout","none"))}),V=g.useRef({prev:[(N=A.current)==null?void 0:N.selectionStart,(C=A.current)==null?void 0:C.selectionEnd,(_=A.current)==null?void 0:_.selectionDirection]});g.useImperativeHandle(t,()=>A.current,[]),g.useEffect(()=>{let je=A.current,Oe=W.current;if(!je||!Oe)return;P.current.value!==je.value&&P.current.onChange(je.value),V.current.prev=[je.selectionStart,je.selectionEnd,je.selectionDirection];function Ne(){if(document.activeElement!==je){I(null),E(null);return}let Xe=je.selectionStart,G=je.selectionEnd,re=je.selectionDirection,ce=je.maxLength,_e=je.value,we=V.current.prev,ye=-1,Te=-1,Ze;if(_e.length!==0&&Xe!==null&&G!==null){let Et=Xe===G,Ar=Xe===_e.length&&_e.length<ce;if(Et&&!Ar){let _t=Xe;if(_t===0)ye=0,Te=1,Ze="forward";else if(_t===ce)ye=_t-1,Te=_t,Ze="backward";else if(ce>1&&_e.length>1){let or=0;if(we[0]!==null&&we[1]!==null){Ze=_t<we[1]?"backward":"forward";let Qa=we[0]===we[1]&&we[0]<ce;Ze==="backward"&&!Qa&&(or=-1)}ye=or+_t,Te=or+_t+1}}ye!==-1&&Te!==-1&&ye!==Te&&A.current.setSelectionRange(ye,Te,Ze)}let ot=ye!==-1?ye:Xe,qt=Te!==-1?Te:G,st=Ze??re;I(ot),E(qt),V.current.prev=[ot,qt,st]}if(document.addEventListener("selectionchange",Ne,{capture:!0}),Ne(),document.activeElement===je&&ne(!0),!document.getElementById("input-otp-style")){let Xe=document.createElement("style");if(Xe.id="input-otp-style",document.head.appendChild(Xe),Xe.sheet){let G="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ad(Xe.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ad(Xe.sheet,`[data-input-otp]:autofill { ${G} }`),Ad(Xe.sheet,`[data-input-otp]:-webkit-autofill { ${G} }`),Ad(Xe.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ad(Xe.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ge=()=>{Oe&&Oe.style.setProperty("--root-height",`${je.clientHeight}px`)};ge();let Me=new ResizeObserver(ge);return Me.observe(je),()=>{document.removeEventListener("selectionchange",Ne,{capture:!0}),Me.disconnect()}},[]);let[Z,Q]=g.useState(!1),[O,ne]=g.useState(!1),[he,I]=g.useState(null),[Y,E]=g.useState(null);g.useEffect(()=>{vJ(()=>{var je,Oe,Ne,ge;(je=A.current)==null||je.dispatchEvent(new Event("input"));let Me=(Oe=A.current)==null?void 0:Oe.selectionStart,Xe=(Ne=A.current)==null?void 0:Ne.selectionEnd,G=(ge=A.current)==null?void 0:ge.selectionDirection;Me!==null&&Xe!==null&&(I(Me),E(Xe),V.current.prev=[Me,Xe,G])})},[k,O]),g.useEffect(()=>{D!==void 0&&k!==D&&D.length<i&&k.length===i&&(d==null||d(k))},[i,d,D,k]);let B=NJ({containerRef:W,inputRef:A,pushPasswordManagerStrategy:f,isFocused:O}),ee=g.useCallback(je=>{let Oe=je.currentTarget.value.slice(0,i);if(Oe.length>0&&T&&!T.test(Oe)){je.preventDefault();return}typeof D=="string"&&Oe.length<D.length&&document.dispatchEvent(new Event("selectionchange")),M(Oe)},[i,M,D,T]),J=g.useCallback(()=>{var je;if(A.current){let Oe=Math.min(A.current.value.length,i-1),Ne=A.current.value.length;(je=A.current)==null||je.setSelectionRange(Oe,Ne),I(Oe),E(Ne)}ne(!0)},[i]),K=g.useCallback(je=>{var Oe,Ne;let ge=A.current;if(!h&&(!P.current.isIOS||!je.clipboardData||!ge))return;let Me=je.clipboardData.getData("text/plain"),Xe=h?h(Me):Me;je.preventDefault();let G=(Oe=A.current)==null?void 0:Oe.selectionStart,re=(Ne=A.current)==null?void 0:Ne.selectionEnd,ce=(G!==re?k.slice(0,G)+Xe+k.slice(re):k.slice(0,G)+Xe+k.slice(G)).slice(0,i);if(ce.length>0&&T&&!T.test(ce))return;ge.value=ce,M(ce);let _e=Math.min(ce.length,i-1),we=ce.length;ge.setSelectionRange(_e,we),I(_e),E(we)},[i,M,T,k]),ae=g.useMemo(()=>({position:"relative",cursor:w.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[w.disabled]),te=g.useMemo(()=>({position:"absolute",inset:0,width:B.willPushPWMBadge?`calc(100% + ${B.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:B.willPushPWMBadge?`inset(0 ${B.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:o,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[B.PWM_BADGE_SPACE_WIDTH,B.willPushPWMBadge,o]),xe=g.useMemo(()=>g.createElement("input",xJ(pJ({autoComplete:w.autoComplete||"one-time-code"},w),{"data-input-otp":!0,"data-input-otp-placeholder-shown":k.length===0||void 0,"data-input-otp-mss":he,"data-input-otp-mse":Y,inputMode:u,pattern:T==null?void 0:T.source,"aria-placeholder":c,style:te,maxLength:i,value:k,ref:A,onPaste:je=>{var Oe;K(je),(Oe=w.onPaste)==null||Oe.call(w,je)},onChange:ee,onMouseOver:je=>{var Oe;Q(!0),(Oe=w.onMouseOver)==null||Oe.call(w,je)},onMouseLeave:je=>{var Oe;Q(!1),(Oe=w.onMouseLeave)==null||Oe.call(w,je)},onFocus:je=>{var Oe;J(),(Oe=w.onFocus)==null||Oe.call(w,je)},onBlur:je=>{var Oe;ne(!1),(Oe=w.onBlur)==null||Oe.call(w,je)}})),[ee,J,K,u,te,i,Y,he,w,T==null?void 0:T.source,k]),F=g.useMemo(()=>({slots:Array.from({length:i}).map((je,Oe)=>{var Ne;let ge=O&&he!==null&&Y!==null&&(he===Y&&Oe===he||Oe>=he&&Oe<Y),Me=k[Oe]!==void 0?k[Oe]:null,Xe=k[0]!==void 0?null:(Ne=c==null?void 0:c[Oe])!=null?Ne:null;return{char:Me,placeholderChar:Xe,isActive:ge,hasFakeCaret:ge&&Me===null}}),isFocused:O,isHovering:!w.disabled&&Z}),[O,Z,i,Y,he,w.disabled,k]),We=g.useMemo(()=>p?p(F):g.createElement(mP.Provider,{value:F},x),[x,F,p]);return g.createElement(g.Fragment,null,v!==null&&g.createElement("noscript",null,g.createElement("style",null,v)),g.createElement("div",{ref:W,"data-input-otp-container":!0,style:ae,className:m},We,g.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},xe)))});pP.displayName="Input";function Ad(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var _J=`
[data-input-otp] {
  --nojs-bg: white !important;
  --nojs-fg: black !important;

  background-color: var(--nojs-bg) !important;
  color: var(--nojs-fg) !important;
  caret-color: var(--nojs-fg) !important;
  letter-spacing: .25em !important;
  text-align: center !important;
  border: 1px solid var(--nojs-fg) !important;
  border-radius: 4px !important;
  width: 100% !important;
}
@media (prefers-color-scheme: dark) {
  [data-input-otp] {
    --nojs-bg: black !important;
    --nojs-fg: white !important;
  }
}`;const xP=g.forwardRef(({className:e,containerClassName:t,...r},n)=>s.jsx(pP,{ref:n,containerClassName:Pe("flex items-center gap-2 has-[:disabled]:opacity-50",t),className:Pe("disabled:cursor-not-allowed",e),...r}));xP.displayName="InputOTP";const gP=g.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Pe("flex items-center",e),...t}));gP.displayName="InputOTPGroup";const cl=g.forwardRef(({index:e,className:t,...r},n)=>{const a=g.useContext(mP),{char:i,hasFakeCaret:o,isActive:l}=a.slots[e];return s.jsxs("div",{ref:n,className:Pe("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 ring-2 ring-ring ring-offset-background",t),...r,children:[i,o&&s.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:s.jsx("div",{className:"animate-caret-blink h-4 w-px bg-foreground duration-1000"})})]})});cl.displayName="InputOTPSlot";const CJ=g.forwardRef(({...e},t)=>s.jsx("div",{ref:t,role:"separator",...e,children:s.jsx(U8,{})}));CJ.displayName="InputOTPSeparator";const SJ="/assets/product-oils-real-SoGLRAuJ.jpg",EJ=()=>{g.useEffect(()=>{document.title="Connexion | Mon Compte NŌTO CBD";const _=document.querySelector('meta[name="description"]');_&&_.setAttribute("content","Connectez-vous à votre compte NŌTO : suivi commandes, points fidélité et offres exclusives. Connexion sécurisée par email ou Google.")},[]);const[e]=$x(),t=e.get("quick")==="admin",r=kG(),[n,a]=g.useState(t&&r?r:""),[i,o]=g.useState(""),[l,c]=g.useState(!1),[u,d]=g.useState(!1),[f,h]=g.useState("email"),[m,v]=g.useState(t&&!!r),p=wa(),x=async _=>{const{data:j}=await be.from("user_roles").select("role").eq("user_id",_).eq("role","admin").maybeSingle();p(j?"/admin":"/mon-compte")};g.useEffect(()=>{const{data:{subscription:_}}=be.auth.onAuthStateChange((j,S)=>{S!=null&&S.user&&setTimeout(()=>{x(S.user.id)},0)});return be.auth.getSession().then(({data:{session:j}})=>{j!=null&&j.user&&x(j.user.id)}),()=>_.unsubscribe()},[p]);const w=async _=>{_.preventDefault(),c(!0);try{const j=await be.functions.invoke("send-otp",{body:{email:n}});if(j.error){fe.error(j.error.message||"Erreur lors de l'envoi du code");return}h("otp"),fe.success("Code envoyé par email !")}catch{fe.error("Une erreur est survenue")}finally{c(!1)}},y=async()=>{if(i.length===6){c(!0);try{const _=await be.functions.invoke("verify-otp",{body:{email:n,code:i}});if(_.error){fe.error(_.error.message||"Erreur lors de la vérification");return}const j=_.data;if(!j.valid){fe.error(j.error||"Code invalide ou expiré"),o("");return}if(j.verificationToken){const{error:S}=await be.auth.verifyOtp({token_hash:j.verificationToken,type:j.verificationType||"magiclink"});if(S){console.error("Verify OTP error:",S),fe.error("Erreur lors de la connexion");return}fe.success("Connexion réussie !")}}catch{fe.error("Une erreur est survenue")}finally{c(!1)}}},b=async()=>{c(!0);try{const _=await be.functions.invoke("send-otp",{body:{email:n}});if(_.error){fe.error(_.error.message||"Erreur lors de l'envoi");return}fe.success("Nouveau code envoyé !"),o("")}catch{fe.error("Une erreur est survenue")}finally{c(!1)}},N=async()=>{d(!0);try{const{error:_}=await be.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${window.location.origin}/mon-compte`}});_&&fe.error(_.message)}catch{fe.error("Une erreur est survenue")}finally{d(!1)}};g.useEffect(()=>{i.length===6&&f==="otp"&&y()},[i]),g.useEffect(()=>{if(m&&n&&f==="email"){v(!1);const _=setTimeout(()=>{w({preventDefault:()=>{}})},500);return()=>clearTimeout(_)}},[m,n,f]);const C=[{icon:Ut,text:"Gagnez des points fidélité"},{icon:Rx,text:"Suivez vos commandes"},{icon:On,text:"Connexion 100% sécurisée"}];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx("main",{className:"container mx-auto px-4 py-8 md:py-12",children:s.jsx("div",{className:"max-w-5xl mx-auto",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-12 items-center",children:[s.jsx("div",{className:"hidden lg:block",children:s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 to-primary/10 rounded-3xl -rotate-3"}),s.jsxs("div",{className:"relative bg-card rounded-3xl p-8 shadow-lg border",children:[s.jsx("img",{src:SJ,alt:"NŌTO CBD Oil",className:"w-full max-w-xs mx-auto mb-8 drop-shadow-lg"}),s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:"Bienvenue chez NŌTO"}),s.jsx("p",{className:"text-muted-foreground",children:"Accédez à votre espace personnel pour profiter de tous vos avantages."})]}),s.jsx("div",{className:"mt-8 space-y-4",children:C.map((_,j)=>s.jsxs("div",{className:"flex items-center gap-3 p-3 bg-background/50 rounded-xl",children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:s.jsx(_.icon,{className:"w-5 h-5 text-primary"})}),s.jsx("span",{className:"text-sm font-medium",children:_.text})]},j))})]})]})}),s.jsx("div",{className:"w-full max-w-md mx-auto lg:mx-0",children:f==="otp"?s.jsxs("div",{className:"bg-card rounded-2xl p-6 md:p-8 shadow-lg border",children:[s.jsxs(se,{variant:"ghost",size:"sm",onClick:()=>{h("email"),o("")},className:"mb-6",children:[s.jsx(Dn,{className:"h-4 w-4 mr-2"}),"Retour"]}),s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center mx-auto",children:s.jsx(xa,{className:"h-8 w-8 text-primary"})}),s.jsx("h1",{className:"text-2xl md:text-3xl font-bold",children:"Entrez votre code"}),s.jsxs("p",{className:"text-muted-foreground text-sm md:text-base",children:["Nous avons envoyé un code à 6 chiffres à"," ",s.jsx("span",{className:"font-medium text-foreground block mt-1",children:n})]})]}),s.jsx("div",{className:"flex justify-center py-6",children:s.jsx(xP,{maxLength:6,value:i,onChange:_=>o(_),disabled:l,children:s.jsxs(gP,{children:[s.jsx(cl,{index:0}),s.jsx(cl,{index:1}),s.jsx(cl,{index:2}),s.jsx(cl,{index:3}),s.jsx(cl,{index:4}),s.jsx(cl,{index:5})]})})}),l&&s.jsxs("div",{className:"flex items-center justify-center gap-2 text-muted-foreground mb-4",children:[s.jsx(Wr,{className:"h-4 w-4 animate-spin"}),"Vérification..."]}),s.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"Le code expire dans 10 minutes"}),s.jsx("div",{className:"text-center mt-4",children:s.jsx(se,{variant:"link",onClick:b,disabled:l,className:"text-primary",children:"Renvoyer le code"})})]}):s.jsxs("div",{className:"bg-card rounded-2xl p-6 md:p-8 shadow-lg border",children:[s.jsx("div",{className:"lg:hidden mb-6 flex items-center justify-center gap-4 text-xs text-muted-foreground",children:C.map((_,j)=>s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(_.icon,{className:"w-3.5 h-3.5 text-primary"}),s.jsx("span",{children:_.text})]},j))}),s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-2xl md:text-3xl font-bold",children:t?"Reconnexion rapide":"Connexion"}),s.jsx("p",{className:"text-muted-foreground mt-2",children:t?"Votre session a expiré, reconnectez-vous rapidement":"Connectez-vous à votre compte NŌTO"}),t&&r&&s.jsxs("div",{className:"mt-3 flex items-center justify-center gap-2 text-primary text-sm",children:[s.jsx(Dx,{className:"h-4 w-4"}),s.jsx("span",{children:"Envoi automatique du code..."})]})]}),s.jsx("div",{className:"space-y-3",children:s.jsx(se,{type:"button",variant:"outline",className:"w-full flex items-center justify-center gap-3 h-12 hover:bg-accent transition-colors",onClick:N,disabled:u,children:u?s.jsx(Wr,{className:"h-5 w-5 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",children:[s.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),s.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),s.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),s.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),"Continuer avec Google"]})})}),s.jsxs("div",{className:"relative my-6",children:[s.jsx(us,{}),s.jsx("span",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-card px-4 text-sm text-muted-foreground",children:"ou par email"})]}),s.jsxs("form",{onSubmit:w,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"email",children:"Adresse email"}),s.jsx(lt,{id:"email",type:"email",value:n,onChange:_=>a(_.target.value),required:!0,placeholder:"votre@email.com",className:"h-12"})]}),s.jsx(se,{type:"submit",className:"w-full h-12",disabled:l,children:l?s.jsx(Wr,{className:"h-4 w-4 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{className:"h-4 w-4 mr-2"}),"Recevoir un code de connexion"]})})]}),s.jsxs("p",{className:"text-center text-xs text-muted-foreground mt-6 leading-relaxed",children:["Pas de mot de passe nécessaire.",s.jsx("br",{}),"Un code à 6 chiffres vous sera envoyé par email."]})]})})]})})}),s.jsx(it,{})]})},kJ=()=>{const[e,t]=g.useState(""),[r,n]=g.useState(""),[a,i]=g.useState(!1),o=wa();g.useEffect(()=>{document.title="Admin Login | NŌTO CBD"},[]),g.useEffect(()=>{(async()=>{const{data:{session:u}}=await be.auth.getSession();if(u!=null&&u.user){const{data:d}=await be.from("user_roles").select("role").eq("user_id",u.user.id).eq("role","admin").maybeSingle();d&&o("/admin")}})()},[o]);const l=async c=>{c.preventDefault(),i(!0);try{const{data:u,error:d}=await be.auth.signInWithPassword({email:e,password:r});if(d){console.error("Login error:",d),fe.error("Email ou mot de passe incorrect");return}if(u.user){const{data:f}=await be.from("user_roles").select("role").eq("user_id",u.user.id).eq("role","admin").maybeSingle();f?(localStorage.setItem("noto_admin_email",e),fe.success("Connexion réussie !"),o("/admin")):(fe.error("Accès non autorisé"),await be.auth.signOut())}}catch(u){console.error("Login error:",u),fe.error("Une erreur est survenue")}finally{i(!1)}};return s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 flex items-center justify-center p-4",children:s.jsxs("div",{className:"w-full max-w-md",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-4xl font-bold text-white tracking-wider",children:"NŌTO"}),s.jsx("p",{className:"text-slate-400 mt-2",children:"Administration"})]}),s.jsxs("div",{className:"bg-white/10 backdrop-blur-lg rounded-2xl p-8 shadow-2xl border border-white/10",children:[s.jsx("div",{className:"flex items-center justify-center gap-3 mb-6",children:s.jsx("div",{className:"w-12 h-12 bg-primary/20 rounded-full flex items-center justify-center",children:s.jsx(On,{className:"h-6 w-6 text-primary"})})}),s.jsx("h2",{className:"text-xl font-semibold text-white text-center mb-6",children:"Connexion Admin"}),s.jsxs("form",{onSubmit:l,className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"email",className:"text-slate-300",children:"Email"}),s.jsx(lt,{id:"email",type:"email",value:e,onChange:c=>t(c.target.value),required:!0,placeholder:"admin@noto-cbd.fr",className:"h-12 bg-white/5 border-white/10 text-white placeholder:text-slate-500 focus:border-primary"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"password",className:"text-slate-300",children:"Mot de passe"}),s.jsx(lt,{id:"password",type:"password",value:r,onChange:c=>n(c.target.value),required:!0,placeholder:"••••••••••••",className:"h-12 bg-white/5 border-white/10 text-white placeholder:text-slate-500 focus:border-primary"})]}),s.jsx(se,{type:"submit",className:"w-full h-12 bg-primary hover:bg-primary/90",disabled:a,children:a?s.jsx(Wr,{className:"h-5 w-5 animate-spin"}):s.jsxs(s.Fragment,{children:[s.jsx(Q8,{className:"h-4 w-4 mr-2"}),"Se connecter"]})})]}),s.jsx("p",{className:"text-center text-slate-500 text-xs mt-6",children:"Accès réservé aux administrateurs"})]}),s.jsxs("p",{className:"text-center text-slate-600 text-sm mt-6",children:["© ",new Date().getFullYear()," NŌTO CBD"]})]})})},TJ=()=>{g.useEffect(()=>{document.title="Mon Compte | Commandes & Fidélité NŌTO";const S=document.querySelector('meta[name="description"]');S&&S.setAttribute("content","Gérez votre compte NŌTO : suivi commandes CBD, points fidélité, informations personnelles. Accédez à votre historique d'achats.")},[]);const[e,t]=g.useState(null),[r,n]=g.useState(null),[a,i]=g.useState([]),[o,l]=g.useState(null),[c,u]=g.useState(!0),[d,f]=g.useState(!1),[h,m]=g.useState(""),[v,p]=g.useState(""),x=wa();g.useEffect(()=>{const{data:{subscription:S}}=be.auth.onAuthStateChange((k,D)=>{D!=null&&D.user?t(D.user):x("/auth")});return be.auth.getSession().then(({data:{session:k}})=>{k!=null&&k.user?t(k.user):x("/auth")}),()=>S.unsubscribe()},[x]),g.useEffect(()=>{e&&(w(),y(),b())},[e]);const w=async()=>{if(!e)return;const{data:S,error:k}=await be.from("profiles").select("*").eq("user_id",e.id).maybeSingle();if(k){console.error("Error fetching profile:",k);return}S&&(n(S),m(S.first_name||""),p(S.last_name||"")),u(!1)},y=async()=>{if(!(e!=null&&e.email))return;const{data:S,error:k}=await be.from("orders").select("*").eq("email",e.email).order("created_at",{ascending:!1});if(k){console.error("Error fetching orders:",k);return}if(S){const D=S.map(M=>({...M,items:M.items||[]}));i(D)}},b=async()=>{if(!(e!=null&&e.email))return;const{data:S,error:k}=await be.from("loyalty_points").select("points").eq("email",e.email.toLowerCase()).maybeSingle();if(k){console.error("Error fetching loyalty points:",k);return}S&&l(S.points)},N=async S=>{if(S.preventDefault(),!e)return;f(!0);const{error:k}=await be.from("profiles").update({first_name:h,last_name:v}).eq("user_id",e.id);if(f(!1),k){fe.error("Erreur lors de la sauvegarde");return}fe.success("Profil mis à jour !"),w()},C=async()=>{await be.auth.signOut(),x("/"),fe.success("Déconnexion réussie")},_=S=>{switch(S){case"paid":return s.jsx(Je,{className:"bg-green-500",children:"Payée"});case"pending":return s.jsx(Je,{variant:"secondary",children:"En attente"});case"awaiting":return s.jsx(Je,{className:"bg-yellow-500",children:"En cours"});case"failed":return s.jsx(Je,{variant:"destructive",children:"Échouée"});default:return s.jsx(Je,{variant:"secondary",children:S})}},j=S=>new Date(S).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"});return c?s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx("main",{className:"container mx-auto px-4 py-12 flex justify-center",children:s.jsx(Wr,{className:"h-8 w-8 animate-spin text-primary"})}),s.jsx(it,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx("main",{className:"container mx-auto px-4 py-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsx("h1",{className:"text-3xl font-bold",children:"Mon compte"}),s.jsxs(se,{variant:"outline",onClick:C,children:[s.jsx(y4,{className:"h-4 w-4 mr-2"}),"Déconnexion"]})]}),o!==null&&s.jsx(ve,{className:"mb-6 bg-gradient-to-r from-primary/10 to-primary/5 border-primary/20",children:s.jsx(Ie,{className:"py-6",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-3 bg-primary/20 rounded-full",children:s.jsx(Ut,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Mes points de fidélité"}),s.jsxs("p",{className:"text-2xl font-bold text-primary",children:[o.toLocaleString()," points"]})]})]}),s.jsx(se,{asChild:!0,children:s.jsx(pe,{to:"/boutique-fidelite",children:"Utiliser mes points"})})]})})}),s.jsxs(bw,{defaultValue:"orders",className:"space-y-6",children:[s.jsxs(d0,{className:"grid w-full grid-cols-2",children:[s.jsxs(To,{value:"orders",className:"flex items-center gap-2",children:[s.jsx(hs,{className:"h-4 w-4"}),"Mes commandes"]}),s.jsxs(To,{value:"profile",className:"flex items-center gap-2",children:[s.jsx(N4,{className:"h-4 w-4"}),"Mon profil"]})]}),s.jsx(Qf,{value:"orders",className:"space-y-4",children:a.length===0?s.jsx(ve,{children:s.jsxs(Ie,{className:"py-12 text-center",children:[s.jsx(hs,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),s.jsx("p",{className:"text-muted-foreground",children:"Vous n'avez pas encore de commandes"}),s.jsx(se,{className:"mt-4",onClick:()=>x("/produits"),children:"Découvrir nos produits"})]})}):a.map(S=>s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(rt,{className:"text-lg",children:["Commande #",S.reference]}),_(S.status)]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:j(S.created_at)})]}),s.jsx(Ie,{children:s.jsxs("div",{className:"space-y-3",children:[S.items.map((k,D)=>s.jsxs("div",{className:"flex justify-between items-center py-2 border-b last:border-0",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:k.name}),k.variant&&s.jsx("p",{className:"text-sm text-muted-foreground",children:k.variant}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Quantité : ",k.quantity]})]}),s.jsxs("p",{className:"font-medium",children:[(k.price*k.quantity).toFixed(2)," €"]})]},D)),s.jsxs("div",{className:"flex justify-between items-center pt-3 border-t font-bold",children:[s.jsx("span",{children:"Total"}),s.jsxs("span",{children:[Number(S.total).toFixed(2)," €"]})]})]})})]},S.id))}),s.jsx(Qf,{value:"profile",children:s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsx(rt,{children:"Informations personnelles"})}),s.jsx(Ie,{children:s.jsxs("form",{onSubmit:N,className:"space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"email",children:"Email"}),s.jsx(lt,{id:"email",type:"email",value:(r==null?void 0:r.email)||"",disabled:!0,className:"bg-muted"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"firstName",children:"Prénom"}),s.jsx(lt,{id:"firstName",type:"text",value:h,onChange:S=>m(S.target.value),placeholder:"Votre prénom"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"lastName",children:"Nom"}),s.jsx(lt,{id:"lastName",type:"text",value:v,onChange:S=>p(S.target.value),placeholder:"Votre nom"})]})]}),s.jsx(se,{type:"submit",disabled:d,children:d?s.jsx(Wr,{className:"h-4 w-4 animate-spin"}):"Enregistrer"})]})})]})})]})]})}),s.jsx(it,{})]})};/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var vP=1252,AJ=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],zw={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Vw=function(e){AJ.indexOf(e)!=-1&&(vP=zw[0]=e)};function RJ(){Vw(1252)}var la=function(e){Vw(e)};function yP(){la(1200),RJ()}function nC(e){for(var t=[],r=0,n=e.length;r<n;++r)t[r]=e.charCodeAt(r);return t}function DJ(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}function bP(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var Ud=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return t==255&&r==254?DJ(e.slice(2)):t==254&&r==255?bP(e.slice(2)):t==65279?e.slice(1):e},Nm=function(t){return String.fromCharCode(t)},aC=function(t){return String.fromCharCode(t)},th,go="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function iC(e){for(var t="",r=0,n=0,a=0,i=0,o=0,l=0,c=0,u=0;u<e.length;)r=e.charCodeAt(u++),i=r>>2,n=e.charCodeAt(u++),o=(r&3)<<4|n>>4,a=e.charCodeAt(u++),l=(n&15)<<2|a>>6,c=a&63,isNaN(n)?l=c=64:isNaN(a)&&(c=64),t+=go.charAt(i)+go.charAt(o)+go.charAt(l)+go.charAt(c);return t}function mn(e){var t="",r=0,n=0,a=0,i=0,o=0,l=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var u=0;u<e.length;)i=go.indexOf(e.charAt(u++)),o=go.indexOf(e.charAt(u++)),r=i<<2|o>>4,t+=String.fromCharCode(r),l=go.indexOf(e.charAt(u++)),n=(o&15)<<4|l>>2,l!==64&&(t+=String.fromCharCode(n)),c=go.indexOf(e.charAt(u++)),a=(l&3)<<6|c,c!==64&&(t+=String.fromCharCode(a));return t}var St=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),cc=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function Vo(e){return St?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function oC(e){return St?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var na=function(t){return St?cc(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function uc(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function Hw(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Hw(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var to=St?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:cc(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var n=new Uint8Array(r),a=0;for(t=0,r=0;t<e.length;r+=a,++t)if(a=e[t].length,e[t]instanceof Uint8Array)n.set(e[t],r);else{if(typeof e[t]=="string")throw"wtf";n.set(new Uint8Array(e[t]),r)}return n}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function OJ(e){for(var t=[],r=0,n=e.length+250,a=Vo(e.length+255),i=0;i<e.length;++i){var o=e.charCodeAt(i);if(o<128)a[r++]=o;else if(o<2048)a[r++]=192|o>>6&31,a[r++]=128|o&63;else if(o>=55296&&o<57344){o=(o&1023)+64;var l=e.charCodeAt(++i)&1023;a[r++]=240|o>>8&7,a[r++]=128|o>>2&63,a[r++]=128|l>>6&15|(o&3)<<4,a[r++]=128|l&63}else a[r++]=224|o>>12&15,a[r++]=128|o>>6&63,a[r++]=128|o&63;r>n&&(t.push(a.slice(0,r)),r=0,a=Vo(65535),n=65530)}return t.push(a.slice(0,r)),to(t)}var As=/\u0000/g,$d=/[\u0001-\u0006]/g;function nu(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function ca(e,t){var r=""+e;return r.length>=t?r:ur("0",t-r.length)+r}function Ww(e,t){var r=""+e;return r.length>=t?r:ur(" ",t-r.length)+r}function ex(e,t){var r=""+e;return r.length>=t?r:r+ur(" ",t-r.length)}function PJ(e,t){var r=""+Math.round(e);return r.length>=t?r:ur("0",t-r.length)+r}function IJ(e,t){var r=""+e;return r.length>=t?r:ur("0",t-r.length)+r}var lC=Math.pow(2,32);function kc(e,t){if(e>lC||e<-lC)return PJ(e,t);var r=Math.round(e);return IJ(r,t)}function tx(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var cC=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Tg=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function FJ(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var gt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},uC={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},LJ={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function rx(e,t,r){for(var n=e<0?-1:1,a=e*n,i=0,o=1,l=0,c=1,u=0,d=0,f=Math.floor(a);u<t&&(f=Math.floor(a),l=f*o+i,d=f*u+c,!(a-f<5e-8));)a=1/(a-f),i=o,o=l,c=u,u=d;if(d>t&&(u>t?(d=c,l=i):(d=u,l=o)),!r)return[0,n*l,d];var h=Math.floor(n*l/d);return[h,n*l-h*d,d]}function vl(e,t,r){if(e>2958465||e<0)return null;var n=e|0,a=Math.floor(86400*(e-n)),i=0,o=[],l={D:n,T:a,u:86400*(e-n)-a,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(l.u)<1e-6&&(l.u=0),t&&t.date1904&&(n+=1462),l.u>.9999&&(l.u=0,++a==86400&&(l.T=a=0,++n,++l.D)),n===60)o=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)o=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var c=new Date(1900,0,1);c.setDate(c.getDate()+n-1),o=[c.getFullYear(),c.getMonth()+1,c.getDate()],i=c.getDay(),n<60&&(i=(i+6)%7),r&&(i=zJ(c,o))}return l.y=o[0],l.m=o[1],l.d=o[2],l.S=a%60,a=Math.floor(a/60),l.M=a%60,a=Math.floor(a/60),l.H=a,l.q=i,l}var wP=new Date(1899,11,31,0,0,0),MJ=wP.getTime(),BJ=new Date(1900,2,1,0,0,0);function jP(e,t){var r=e.getTime();return t?r-=1461*24*60*60*1e3:e>=BJ&&(r+=24*60*60*1e3),(r-(MJ+(e.getTimezoneOffset()-wP.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Gw(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function UJ(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function $J(e){var t=e<0?12:11,r=Gw(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function qJ(e){var t=Gw(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function rh(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=$J(e):t===10?r=e.toFixed(10).substr(0,12):r=qJ(e),Gw(UJ(r.toUpperCase()))}function Jl(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):rh(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return Ln(14,jP(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function zJ(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function VJ(e,t,r,n){var a="",i=0,o=0,l=r.y,c,u=0;switch(e){case 98:l=r.y+543;case 121:switch(t.length){case 1:case 2:c=l%100,u=2;break;default:c=l%1e4,u=4;break}break;case 109:switch(t.length){case 1:case 2:c=r.m,u=t.length;break;case 3:return Tg[r.m-1][1];case 5:return Tg[r.m-1][0];default:return Tg[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=r.d,u=t.length;break;case 3:return cC[r.q][0];default:return cC[r.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(r.H+11)%12,u=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=r.H,u=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=r.M,u=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?ca(r.S,t.length):(n>=2?o=n===3?1e3:100:o=n===1?10:1,i=Math.round(o*(r.S+r.u)),i>=60*o&&(i=0),t==="s"?i===0?"0":""+i/o:(a=ca(i,2+n),t==="ss"?a.substr(0,2):"."+a.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":c=r.D*24+r.H;break;case"[m]":case"[mm]":c=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":c=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}u=t.length===3?1:2;break;case 101:c=l,u=1;break}var d=u>0?ca(c,u):"";return d}function vo(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,n=e.substr(0,r);r!=e.length;r+=t)n+=(n.length>0?",":"")+e.substr(r,t);return n}var NP=/%/g;function HJ(e,t,r){var n=t.replace(NP,""),a=t.length-n.length;return xi(e,n,r*Math.pow(10,2*a))+ur("%",a)}function WJ(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return xi(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function _P(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+_P(e,-t);var a=e.indexOf(".");a===-1&&(a=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%a;if(i<0&&(i+=a),r=(t/Math.pow(10,i)).toPrecision(n+1+(a+i)%a),r.indexOf("e")===-1){var o=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+i):r+="E+"+(o-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,a)+"."+r.substr(2+a),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,c,u,d){return c+u+d.substr(0,(a+i)%a)+"."+d.substr(i)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var CP=/# (\?+)( ?)\/( ?)(\d+)/;function GJ(e,t,r){var n=parseInt(e[4],10),a=Math.round(t*n),i=Math.floor(a/n),o=a-i*n,l=n;return r+(i===0?"":""+i)+" "+(o===0?ur(" ",e[1].length+1+e[4].length):Ww(o,e[1].length)+e[2]+"/"+e[3]+ca(l,e[4].length))}function KJ(e,t,r){return r+(t===0?"":""+t)+ur(" ",e[1].length+2+e[4].length)}var SP=/^#*0*\.([0#]+)/,EP=/\).*[0#]/,kP=/\(###\) ###\\?-####/;function Ss(e){for(var t="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function dC(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function fC(e,t){var r=e-Math.floor(e),n=Math.pow(10,t);return t<(""+Math.round(r*n)).length?0:Math.round(r*n)}function YJ(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function XJ(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function yn(e,t,r){if(e.charCodeAt(0)===40&&!t.match(EP)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?yn("n",n,r):"("+yn("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return WJ(e,t,r);if(t.indexOf("%")!==-1)return HJ(e,t,r);if(t.indexOf("E")!==-1)return _P(t,r);if(t.charCodeAt(0)===36)return"$"+yn(e,t.substr(t.charAt(1)==" "?2:1),r);var a,i,o,l,c=Math.abs(r),u=r<0?"-":"";if(t.match(/^00+$/))return u+kc(c,t.length);if(t.match(/^[#?]+$/))return a=kc(r,0),a==="0"&&(a=""),a.length>t.length?a:Ss(t.substr(0,t.length-a.length))+a;if(i=t.match(CP))return GJ(i,c,u);if(t.match(/^#+0+$/))return u+kc(c,t.length-t.indexOf("0"));if(i=t.match(SP))return a=dC(r,i[1].length).replace(/^([^\.]+)$/,"$1."+Ss(i[1])).replace(/\.$/,"."+Ss(i[1])).replace(/\.(\d*)$/,function(v,p){return"."+p+ur("0",Ss(i[1]).length-p.length)}),t.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return u+dC(c,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return u+vo(kc(c,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+yn(e,t,-r):vo(""+(Math.floor(r)+YJ(r,i[1].length)))+"."+ca(fC(r,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return yn(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return a=nu(yn(e,t.replace(/[\\-]/g,""),r)),o=0,nu(nu(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return o<a.length?a.charAt(o++):v==="0"?"0":""}));if(t.match(kP))return a=yn(e,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var d="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(i[4].length,7),l=rx(c,Math.pow(10,o)-1,!1),a=""+u,d=xi("n",i[1],l[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),a+=d+i[2]+"/"+i[3],d=ex(l[2],o),d.length<i[4].length&&(d=Ss(i[4].substr(i[4].length-d.length))+d),a+=d,a;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(i[1].length,i[4].length),7),l=rx(c,Math.pow(10,o)-1,!0),u+(l[0]||(l[1]?"":"0"))+" "+(l[1]?Ww(l[1],o)+i[2]+"/"+i[3]+ex(l[2],o):ur(" ",2*o+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return a=kc(r,0),t.length<=a.length?a:Ss(t.substr(0,t.length-a.length))+a;if(i=t.match(/^([#0?]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),o=a.indexOf(".");var f=t.indexOf(".")-o,h=t.length-a.length-f;return Ss(t.substr(0,f)+a+t.substr(t.length-h))}if(i=t.match(/^00,000\.([#0]*0)$/))return o=fC(r,i[1].length),r<0?"-"+yn(e,t,-r):vo(XJ(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?ca(0,3-v.length):"")+v})+"."+ca(o,i[1].length);switch(t){case"###,##0.00":return yn(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var m=vo(kc(c,0));return m!=="0"?u+m:"";case"###,###.00":return yn(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return yn(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function QJ(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return xi(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function JJ(e,t,r){var n=t.replace(NP,""),a=t.length-n.length;return xi(e,n,r*Math.pow(10,2*a))+ur("%",a)}function TP(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+TP(e,-t);var a=e.indexOf(".");a===-1&&(a=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%a;if(i<0&&(i+=a),r=(t/Math.pow(10,i)).toPrecision(n+1+(a+i)%a),!r.match(/[Ee]/)){var o=Math.floor(Math.log(t)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+i):r+="E+"+(o-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,c,u,d){return c+u+d.substr(0,(a+i)%a)+"."+d.substr(i)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function ka(e,t,r){if(e.charCodeAt(0)===40&&!t.match(EP)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ka("n",n,r):"("+ka("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return QJ(e,t,r);if(t.indexOf("%")!==-1)return JJ(e,t,r);if(t.indexOf("E")!==-1)return TP(t,r);if(t.charCodeAt(0)===36)return"$"+ka(e,t.substr(t.charAt(1)==" "?2:1),r);var a,i,o,l,c=Math.abs(r),u=r<0?"-":"";if(t.match(/^00+$/))return u+ca(c,t.length);if(t.match(/^[#?]+$/))return a=""+r,r===0&&(a=""),a.length>t.length?a:Ss(t.substr(0,t.length-a.length))+a;if(i=t.match(CP))return KJ(i,c,u);if(t.match(/^#+0+$/))return u+ca(c,t.length-t.indexOf("0"));if(i=t.match(SP))return a=(""+r).replace(/^([^\.]+)$/,"$1."+Ss(i[1])).replace(/\.$/,"."+Ss(i[1])),a=a.replace(/\.(\d*)$/,function(v,p){return"."+p+ur("0",Ss(i[1]).length-p.length)}),t.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return u+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return u+vo(""+c);if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ka(e,t,-r):vo(""+r)+"."+ur("0",i[1].length);if(i=t.match(/^#,#*,#0/))return ka(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return a=nu(ka(e,t.replace(/[\\-]/g,""),r)),o=0,nu(nu(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return o<a.length?a.charAt(o++):v==="0"?"0":""}));if(t.match(kP))return a=ka(e,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var d="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(i[4].length,7),l=rx(c,Math.pow(10,o)-1,!1),a=""+u,d=xi("n",i[1],l[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),a+=d+i[2]+"/"+i[3],d=ex(l[2],o),d.length<i[4].length&&(d=Ss(i[4].substr(i[4].length-d.length))+d),a+=d,a;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return o=Math.min(Math.max(i[1].length,i[4].length),7),l=rx(c,Math.pow(10,o)-1,!0),u+(l[0]||(l[1]?"":"0"))+" "+(l[1]?Ww(l[1],o)+i[2]+"/"+i[3]+ex(l[2],o):ur(" ",2*o+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return a=""+r,t.length<=a.length?a:Ss(t.substr(0,t.length-a.length))+a;if(i=t.match(/^([#0]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),o=a.indexOf(".");var f=t.indexOf(".")-o,h=t.length-a.length-f;return Ss(t.substr(0,f)+a+t.substr(t.length-h))}if(i=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+ka(e,t,-r):vo(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?ca(0,3-v.length):"")+v})+"."+ca(0,i[1].length);switch(t){case"###,###":case"##,###":case"#,###":var m=vo(""+c);return m!=="0"?u+m:"";default:if(t.match(/\.[0#?]*$/))return ka(e,t.slice(0,t.lastIndexOf(".")),r)+Ss(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function xi(e,t,r){return(r|0)===r?ka(e,t,r):yn(e,t,r)}function ZJ(e){for(var t=[],r=!1,n=0,a=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:t[t.length]=e.substr(a,n-a),a=n+1}if(t[t.length]=e.substr(a),r===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var AP=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function ld(e){for(var t=0,r="",n="";t<e.length;)switch(r=e.charAt(t)){case"G":tx(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(n=r;e.charAt(t++)!=="]"&&t<e.length;)n+=e.charAt(t);if(n.match(AP))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-1||r=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function eZ(e,t,r,n){for(var a=[],i="",o=0,l="",c="t",u,d,f,h="H";o<e.length;)switch(l=e.charAt(o)){case"G":if(!tx(e,o))throw new Error("unrecognized character "+l+" in "+e);a[a.length]={t:"G",v:"General"},o+=7;break;case'"':for(i="";(f=e.charCodeAt(++o))!==34&&o<e.length;)i+=String.fromCharCode(f);a[a.length]={t:"t",v:i},++o;break;case"\\":var m=e.charAt(++o),v=m==="("||m===")"?m:"t";a[a.length]={t:v,v:m},++o;break;case"_":a[a.length]={t:"t",v:" "},o+=2;break;case"@":a[a.length]={t:"T",v:t},++o;break;case"B":case"b":if(e.charAt(o+1)==="1"||e.charAt(o+1)==="2"){if(u==null&&(u=vl(t,r,e.charAt(o+1)==="2"),u==null))return"";a[a.length]={t:"X",v:e.substr(o,2)},c=l,o+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":l=l.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||u==null&&(u=vl(t,r),u==null))return"";for(i=l;++o<e.length&&e.charAt(o).toLowerCase()===l;)i+=l;l==="m"&&c.toLowerCase()==="h"&&(l="M"),l==="h"&&(l=h),a[a.length]={t:l,v:i},c=l;break;case"A":case"a":case"上":var p={t:l,v:l};if(u==null&&(u=vl(t,r)),e.substr(o,3).toUpperCase()==="A/P"?(u!=null&&(p.v=u.H>=12?"P":"A"),p.t="T",h="h",o+=3):e.substr(o,5).toUpperCase()==="AM/PM"?(u!=null&&(p.v=u.H>=12?"PM":"AM"),p.t="T",o+=5,h="h"):e.substr(o,5).toUpperCase()==="上午/下午"?(u!=null&&(p.v=u.H>=12?"下午":"上午"),p.t="T",o+=5,h="h"):(p.t="t",++o),u==null&&p.t==="T")return"";a[a.length]=p,c=l;break;case"[":for(i=l;e.charAt(o++)!=="]"&&o<e.length;)i+=e.charAt(o);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(AP)){if(u==null&&(u=vl(t,r),u==null))return"";a[a.length]={t:"Z",v:i.toLowerCase()},c=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",ld(e)||(a[a.length]={t:"t",v:i}));break;case".":if(u!=null){for(i=l;++o<e.length&&(l=e.charAt(o))==="0";)i+=l;a[a.length]={t:"s",v:i};break}case"0":case"#":for(i=l;++o<e.length&&"0#?.,E+-%".indexOf(l=e.charAt(o))>-1;)i+=l;a[a.length]={t:"n",v:i};break;case"?":for(i=l;e.charAt(++o)===l;)i+=l;a[a.length]={t:l,v:i},c=l;break;case"*":++o,(e.charAt(o)==" "||e.charAt(o)=="*")&&++o;break;case"(":case")":a[a.length]={t:n===1?"t":l,v:l},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=l;o<e.length&&"0123456789".indexOf(e.charAt(++o))>-1;)i+=e.charAt(o);a[a.length]={t:"D",v:i};break;case" ":a[a.length]={t:l,v:l},++o;break;case"$":a[a.length]={t:"t",v:"$"},++o;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(l)===-1)throw new Error("unrecognized character "+l+" in "+e);a[a.length]={t:"t",v:l},++o;break}var x=0,w=0,y;for(o=a.length-1,c="t";o>=0;--o)switch(a[o].t){case"h":case"H":a[o].t=h,c="h",x<1&&(x=1);break;case"s":(y=a[o].v.match(/\.0+$/))&&(w=Math.max(w,y[0].length-1)),x<3&&(x=3);case"d":case"y":case"M":case"e":c=a[o].t;break;case"m":c==="s"&&(a[o].t="M",x<2&&(x=2));break;case"X":break;case"Z":x<1&&a[o].v.match(/[Hh]/)&&(x=1),x<2&&a[o].v.match(/[Mm]/)&&(x=2),x<3&&a[o].v.match(/[Ss]/)&&(x=3)}switch(x){case 0:break;case 1:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M),u.M>=60&&(u.M=0,++u.H);break;case 2:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M);break}var b="",N;for(o=0;o<a.length;++o)switch(a[o].t){case"t":case"T":case" ":case"D":break;case"X":a[o].v="",a[o].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":a[o].v=VJ(a[o].t.charCodeAt(0),a[o].v,u,w),a[o].t="t";break;case"n":case"?":for(N=o+1;a[N]!=null&&((l=a[N].t)==="?"||l==="D"||(l===" "||l==="t")&&a[N+1]!=null&&(a[N+1].t==="?"||a[N+1].t==="t"&&a[N+1].v==="/")||a[o].t==="("&&(l===" "||l==="n"||l===")")||l==="t"&&(a[N].v==="/"||a[N].v===" "&&a[N+1]!=null&&a[N+1].t=="?"));)a[o].v+=a[N].v,a[N]={v:"",t:";"},++N;b+=a[o].v,o=N-1;break;case"G":a[o].t="t",a[o].v=Jl(t,r);break}var C="",_,j;if(b.length>0){b.charCodeAt(0)==40?(_=t<0&&b.charCodeAt(0)===45?-t:t,j=xi("n",b,_)):(_=t<0&&n>1?-t:t,j=xi("n",b,_),_<0&&a[0]&&a[0].t=="t"&&(j=j.substr(1),a[0].v="-"+a[0].v)),N=j.length-1;var S=a.length;for(o=0;o<a.length;++o)if(a[o]!=null&&a[o].t!="t"&&a[o].v.indexOf(".")>-1){S=o;break}var k=a.length;if(S===a.length&&j.indexOf("E")===-1){for(o=a.length-1;o>=0;--o)a[o]==null||"n?".indexOf(a[o].t)===-1||(N>=a[o].v.length-1?(N-=a[o].v.length,a[o].v=j.substr(N+1,a[o].v.length)):N<0?a[o].v="":(a[o].v=j.substr(0,N+1),N=-1),a[o].t="t",k=o);N>=0&&k<a.length&&(a[k].v=j.substr(0,N+1)+a[k].v)}else if(S!==a.length&&j.indexOf("E")===-1){for(N=j.indexOf(".")-1,o=S;o>=0;--o)if(!(a[o]==null||"n?".indexOf(a[o].t)===-1)){for(d=a[o].v.indexOf(".")>-1&&o===S?a[o].v.indexOf(".")-1:a[o].v.length-1,C=a[o].v.substr(d+1);d>=0;--d)N>=0&&(a[o].v.charAt(d)==="0"||a[o].v.charAt(d)==="#")&&(C=j.charAt(N--)+C);a[o].v=C,a[o].t="t",k=o}for(N>=0&&k<a.length&&(a[k].v=j.substr(0,N+1)+a[k].v),N=j.indexOf(".")+1,o=S;o<a.length;++o)if(!(a[o]==null||"n?(".indexOf(a[o].t)===-1&&o!==S)){for(d=a[o].v.indexOf(".")>-1&&o===S?a[o].v.indexOf(".")+1:0,C=a[o].v.substr(0,d);d<a[o].v.length;++d)N<j.length&&(C+=j.charAt(N++));a[o].v=C,a[o].t="t",k=o}}}for(o=0;o<a.length;++o)a[o]!=null&&"n?".indexOf(a[o].t)>-1&&(_=n>1&&t<0&&o>0&&a[o-1].v==="-"?-t:t,a[o].v=xi(a[o].t,a[o].v,_),a[o].t="t");var D="";for(o=0;o!==a.length;++o)a[o]!=null&&(D+=a[o].v);return D}var hC=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function mC(e,t){if(t==null)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function tZ(e,t){var r=ZJ(e),n=r.length,a=r[n-1].indexOf("@");if(n<4&&a>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof t!="number")return[4,r.length===4||a>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=a>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=a>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=a>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=t>0?r[0]:t<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var o=r[0].match(hC),l=r[1].match(hC);return mC(t,o)?[n,r[0]]:mC(t,l)?[n,r[1]]:[n,r[o!=null&&l!=null?2:1]]}return[n,i]}function Ln(e,t,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:gt)[e],n==null&&(n=r.table&&r.table[uC[e]]||gt[uC[e]]),n==null&&(n=LJ[e]||"General");break}if(tx(n,0))return Jl(t,r);t instanceof Date&&(t=jP(t,r.date1904));var a=tZ(n,t);if(tx(a[1]))return Jl(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return eZ(a[1],t,r,a[0])}function Dl(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(gt[r]==null){t<0&&(t=r);continue}if(gt[r]==e){t=r;break}}t<0&&(t=391)}return gt[t]=e,t}function RP(){gt=FJ()}var rZ={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},DP=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function sZ(e){var t=typeof e=="number"?gt[e]:e;return t=t.replace(DP,"(\\d+)"),new RegExp("^"+t+"$")}function nZ(e,t,r){var n=-1,a=-1,i=-1,o=-1,l=-1,c=-1;(t.match(DP)||[]).forEach(function(f,h){var m=parseInt(r[h+1],10);switch(f.toLowerCase().charAt(0)){case"y":n=m;break;case"d":i=m;break;case"h":o=m;break;case"s":c=m;break;case"m":o>=0?l=m:a=m;break}}),c>=0&&l==-1&&a>=0&&(l=a,a=-1);var u=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(a>=1?a:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);u.length==7&&(u="0"+u),u.length==8&&(u="20"+u);var d=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return o==-1&&l==-1&&c==-1?u:n==-1&&a==-1&&i==-1?d:u+"T"+d}var aZ=function(){var e={};e.version="1.2.0";function t(){for(var j=0,S=new Array(256),k=0;k!=256;++k)j=k,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,j=j&1?-306674912^j>>>1:j>>>1,S[k]=j;return typeof Int32Array<"u"?new Int32Array(S):S}var r=t();function n(j){var S=0,k=0,D=0,M=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(D=0;D!=256;++D)M[D]=j[D];for(D=0;D!=256;++D)for(k=j[D],S=256+D;S<4096;S+=256)k=M[S]=k>>>8^j[k&255];var T=[];for(D=1;D!=16;++D)T[D-1]=typeof Int32Array<"u"?M.subarray(D*256,D*256+256):M.slice(D*256,D*256+256);return T}var a=n(r),i=a[0],o=a[1],l=a[2],c=a[3],u=a[4],d=a[5],f=a[6],h=a[7],m=a[8],v=a[9],p=a[10],x=a[11],w=a[12],y=a[13],b=a[14];function N(j,S){for(var k=S^-1,D=0,M=j.length;D<M;)k=k>>>8^r[(k^j.charCodeAt(D++))&255];return~k}function C(j,S){for(var k=S^-1,D=j.length-15,M=0;M<D;)k=b[j[M++]^k&255]^y[j[M++]^k>>8&255]^w[j[M++]^k>>16&255]^x[j[M++]^k>>>24]^p[j[M++]]^v[j[M++]]^m[j[M++]]^h[j[M++]]^f[j[M++]]^d[j[M++]]^u[j[M++]]^c[j[M++]]^l[j[M++]]^o[j[M++]]^i[j[M++]]^r[j[M++]];for(D+=15;M<D;)k=k>>>8^r[(k^j[M++])&255];return~k}function _(j,S){for(var k=S^-1,D=0,M=j.length,T=0,A=0;D<M;)T=j.charCodeAt(D++),T<128?k=k>>>8^r[(k^T)&255]:T<2048?(k=k>>>8^r[(k^(192|T>>6&31))&255],k=k>>>8^r[(k^(128|T&63))&255]):T>=55296&&T<57344?(T=(T&1023)+64,A=j.charCodeAt(D++)&1023,k=k>>>8^r[(k^(240|T>>8&7))&255],k=k>>>8^r[(k^(128|T>>2&63))&255],k=k>>>8^r[(k^(128|A>>6&15|(T&3)<<4))&255],k=k>>>8^r[(k^(128|A&63))&255]):(k=k>>>8^r[(k^(224|T>>12&15))&255],k=k>>>8^r[(k^(128|T>>6&63))&255],k=k>>>8^r[(k^(128|T&63))&255]);return~k}return e.table=r,e.bstr=N,e.buf=C,e.str=_,e}(),kt=function(){var t={};t.version="1.2.1";function r(R,q){for(var L=R.split("/"),U=q.split("/"),z=0,H=0,oe=Math.min(L.length,U.length);z<oe;++z){if(H=L[z].length-U[z].length)return H;if(L[z]!=U[z])return L[z]<U[z]?-1:1}return L.length-U.length}function n(R){if(R.charAt(R.length-1)=="/")return R.slice(0,-1).indexOf("/")===-1?R:n(R.slice(0,-1));var q=R.lastIndexOf("/");return q===-1?R:R.slice(0,q+1)}function a(R){if(R.charAt(R.length-1)=="/")return a(R.slice(0,-1));var q=R.lastIndexOf("/");return q===-1?R:R.slice(q+1)}function i(R,q){typeof q=="string"&&(q=new Date(q));var L=q.getHours();L=L<<6|q.getMinutes(),L=L<<5|q.getSeconds()>>>1,R.write_shift(2,L);var U=q.getFullYear()-1980;U=U<<4|q.getMonth()+1,U=U<<5|q.getDate(),R.write_shift(2,U)}function o(R){var q=R.read_shift(2)&65535,L=R.read_shift(2)&65535,U=new Date,z=L&31;L>>>=5;var H=L&15;L>>>=4,U.setMilliseconds(0),U.setFullYear(L+1980),U.setMonth(H-1),U.setDate(z);var oe=q&31;q>>>=5;var me=q&63;return q>>>=6,U.setHours(q),U.setMinutes(me),U.setSeconds(oe<<1),U}function l(R){Jr(R,0);for(var q={},L=0;R.l<=R.length-4;){var U=R.read_shift(2),z=R.read_shift(2),H=R.l+z,oe={};switch(U){case 21589:L=R.read_shift(1),L&1&&(oe.mtime=R.read_shift(4)),z>5&&(L&2&&(oe.atime=R.read_shift(4)),L&4&&(oe.ctime=R.read_shift(4))),oe.mtime&&(oe.mt=new Date(oe.mtime*1e3));break}R.l=H,q[U]=oe}return q}var c;function u(){return c||(c={})}function d(R,q){if(R[0]==80&&R[1]==75)return hd(R,q);if((R[0]|32)==109&&(R[1]|32)==105)return Qs(R,q);if(R.length<512)throw new Error("CFB file size "+R.length+" < 512");var L=3,U=512,z=0,H=0,oe=0,me=0,ie=0,le=[],ue=R.slice(0,512);Jr(ue,0);var Se=f(ue);switch(L=Se[0],L){case 3:U=512;break;case 4:U=4096;break;case 0:if(Se[1]==0)return hd(R,q);default:throw new Error("Major Version: Expected 3 or 4 saw "+L)}U!==512&&(ue=R.slice(0,U),Jr(ue,28));var Fe=R.slice(0,U);h(ue,L);var Ve=ue.read_shift(4,"i");if(L===3&&Ve!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ve);ue.l+=4,oe=ue.read_shift(4,"i"),ue.l+=4,ue.chk("00100000","Mini Stream Cutoff Size: "),me=ue.read_shift(4,"i"),z=ue.read_shift(4,"i"),ie=ue.read_shift(4,"i"),H=ue.read_shift(4,"i");for(var De=-1,Ue=0;Ue<109&&(De=ue.read_shift(4,"i"),!(De<0));++Ue)le[Ue]=De;var xt=m(R,U);x(ie,H,xt,U,le);var er=y(xt,oe,le,U);er[oe].name="!Directory",z>0&&me!==A&&(er[me].name="!MiniFAT"),er[le[0]].name="!FAT",er.fat_addrs=le,er.ssz=U;var tr={},ns=[],pd=[],xd=[];b(oe,er,xt,ns,z,tr,pd,me),v(pd,xd,ns),ns.shift();var gd={FileIndex:pd,FullPaths:xd};return q&&q.raw&&(gd.raw={header:Fe,sectors:xt}),gd}function f(R){if(R[R.l]==80&&R[R.l+1]==75)return[0,0];R.chk(W,"Header Signature: "),R.l+=16;var q=R.read_shift(2,"u");return[R.read_shift(2,"u"),q]}function h(R,q){var L=9;switch(R.l+=2,L=R.read_shift(2)){case 9:if(q!=3)throw new Error("Sector Shift: Expected 9 saw "+L);break;case 12:if(q!=4)throw new Error("Sector Shift: Expected 12 saw "+L);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+L)}R.chk("0600","Mini Sector Shift: "),R.chk("000000000000","Reserved: ")}function m(R,q){for(var L=Math.ceil(R.length/q)-1,U=[],z=1;z<L;++z)U[z-1]=R.slice(z*q,(z+1)*q);return U[L-1]=R.slice(L*q),U}function v(R,q,L){for(var U=0,z=0,H=0,oe=0,me=0,ie=L.length,le=[],ue=[];U<ie;++U)le[U]=ue[U]=U,q[U]=L[U];for(;me<ue.length;++me)U=ue[me],z=R[U].L,H=R[U].R,oe=R[U].C,le[U]===U&&(z!==-1&&le[z]!==z&&(le[U]=le[z]),H!==-1&&le[H]!==H&&(le[U]=le[H])),oe!==-1&&(le[oe]=U),z!==-1&&U!=le[U]&&(le[z]=le[U],ue.lastIndexOf(z)<me&&ue.push(z)),H!==-1&&U!=le[U]&&(le[H]=le[U],ue.lastIndexOf(H)<me&&ue.push(H));for(U=1;U<ie;++U)le[U]===U&&(H!==-1&&le[H]!==H?le[U]=le[H]:z!==-1&&le[z]!==z&&(le[U]=le[z]));for(U=1;U<ie;++U)if(R[U].type!==0){if(me=U,me!=le[me])do me=le[me],q[U]=q[me]+"/"+q[U];while(me!==0&&le[me]!==-1&&me!=le[me]);le[U]=-1}for(q[0]+="/",U=1;U<ie;++U)R[U].type!==2&&(q[U]+="/")}function p(R,q,L){for(var U=R.start,z=R.size,H=[],oe=U;L&&z>0&&oe>=0;)H.push(q.slice(oe*T,oe*T+T)),z-=T,oe=fl(L,oe*4);return H.length===0?Pr(0):to(H).slice(0,R.size)}function x(R,q,L,U,z){var H=A;if(R===A){if(q!==0)throw new Error("DIFAT chain shorter than expected")}else if(R!==-1){var oe=L[R],me=(U>>>2)-1;if(!oe)return;for(var ie=0;ie<me&&(H=fl(oe,ie*4))!==A;++ie)z.push(H);x(fl(oe,U-4),q-1,L,U,z)}}function w(R,q,L,U,z){var H=[],oe=[];z||(z=[]);var me=U-1,ie=0,le=0;for(ie=q;ie>=0;){z[ie]=!0,H[H.length]=ie,oe.push(R[ie]);var ue=L[Math.floor(ie*4/U)];if(le=ie*4&me,U<4+le)throw new Error("FAT boundary crossed: "+ie+" 4 "+U);if(!R[ue])break;ie=fl(R[ue],le)}return{nodes:H,data:_C([oe])}}function y(R,q,L,U){var z=R.length,H=[],oe=[],me=[],ie=[],le=U-1,ue=0,Se=0,Fe=0,Ve=0;for(ue=0;ue<z;++ue)if(me=[],Fe=ue+q,Fe>=z&&(Fe-=z),!oe[Fe]){ie=[];var De=[];for(Se=Fe;Se>=0;){De[Se]=!0,oe[Se]=!0,me[me.length]=Se,ie.push(R[Se]);var Ue=L[Math.floor(Se*4/U)];if(Ve=Se*4&le,U<4+Ve)throw new Error("FAT boundary crossed: "+Se+" 4 "+U);if(!R[Ue]||(Se=fl(R[Ue],Ve),De[Se]))break}H[Fe]={nodes:me,data:_C([ie])}}return H}function b(R,q,L,U,z,H,oe,me){for(var ie=0,le=U.length?2:0,ue=q[R].data,Se=0,Fe=0,Ve;Se<ue.length;Se+=128){var De=ue.slice(Se,Se+128);Jr(De,64),Fe=De.read_shift(2),Ve=Jw(De,0,Fe-le),U.push(Ve);var Ue={name:Ve,type:De.read_shift(1),color:De.read_shift(1),L:De.read_shift(4,"i"),R:De.read_shift(4,"i"),C:De.read_shift(4,"i"),clsid:De.read_shift(16),state:De.read_shift(4,"i"),start:0,size:0},xt=De.read_shift(2)+De.read_shift(2)+De.read_shift(2)+De.read_shift(2);xt!==0&&(Ue.ct=N(De,De.l-8));var er=De.read_shift(2)+De.read_shift(2)+De.read_shift(2)+De.read_shift(2);er!==0&&(Ue.mt=N(De,De.l-8)),Ue.start=De.read_shift(4,"i"),Ue.size=De.read_shift(4,"i"),Ue.size<0&&Ue.start<0&&(Ue.size=Ue.type=0,Ue.start=A,Ue.name=""),Ue.type===5?(ie=Ue.start,z>0&&ie!==A&&(q[ie].name="!StreamData")):Ue.size>=4096?(Ue.storage="fat",q[Ue.start]===void 0&&(q[Ue.start]=w(L,Ue.start,q.fat_addrs,q.ssz)),q[Ue.start].name=Ue.name,Ue.content=q[Ue.start].data.slice(0,Ue.size)):(Ue.storage="minifat",Ue.size<0?Ue.size=0:ie!==A&&Ue.start!==A&&q[ie]&&(Ue.content=p(Ue,q[ie].data,(q[me]||{}).data))),Ue.content&&Jr(Ue.content,0),H[Ve]=Ue,oe.push(Ue)}}function N(R,q){return new Date((tn(R,q+4)/1e7*Math.pow(2,32)+tn(R,q)/1e7-11644473600)*1e3)}function C(R,q){return u(),d(c.readFileSync(R),q)}function _(R,q){var L=q&&q.type;switch(L||St&&Buffer.isBuffer(R)&&(L="buffer"),L||"base64"){case"file":return C(R,q);case"base64":return d(na(mn(R)),q);case"binary":return d(na(R),q)}return d(R,q)}function j(R,q){var L=q||{},U=L.root||"Root Entry";if(R.FullPaths||(R.FullPaths=[]),R.FileIndex||(R.FileIndex=[]),R.FullPaths.length!==R.FileIndex.length)throw new Error("inconsistent CFB structure");R.FullPaths.length===0&&(R.FullPaths[0]=U+"/",R.FileIndex[0]={name:U,type:5}),L.CLSID&&(R.FileIndex[0].clsid=L.CLSID),S(R)}function S(R){var q="Sh33tJ5";if(!kt.find(R,"/"+q)){var L=Pr(4);L[0]=55,L[1]=L[3]=50,L[2]=54,R.FileIndex.push({name:q,type:2,content:L,size:4,L:69,R:69,C:69}),R.FullPaths.push(R.FullPaths[0]+q),k(R)}}function k(R,q){j(R);for(var L=!1,U=!1,z=R.FullPaths.length-1;z>=0;--z){var H=R.FileIndex[z];switch(H.type){case 0:U?L=!0:(R.FileIndex.pop(),R.FullPaths.pop());break;case 1:case 2:case 5:U=!0,isNaN(H.R*H.L*H.C)&&(L=!0),H.R>-1&&H.L>-1&&H.R==H.L&&(L=!0);break;default:L=!0;break}}if(!(!L&&!q)){var oe=new Date(1987,1,19),me=0,ie=Object.create?Object.create(null):{},le=[];for(z=0;z<R.FullPaths.length;++z)ie[R.FullPaths[z]]=!0,R.FileIndex[z].type!==0&&le.push([R.FullPaths[z],R.FileIndex[z]]);for(z=0;z<le.length;++z){var ue=n(le[z][0]);U=ie[ue],U||(le.push([ue,{name:a(ue).replace("/",""),type:1,clsid:V,ct:oe,mt:oe,content:null}]),ie[ue]=!0)}for(le.sort(function(Ve,De){return r(Ve[0],De[0])}),R.FullPaths=[],R.FileIndex=[],z=0;z<le.length;++z)R.FullPaths[z]=le[z][0],R.FileIndex[z]=le[z][1];for(z=0;z<le.length;++z){var Se=R.FileIndex[z],Fe=R.FullPaths[z];if(Se.name=a(Fe).replace("/",""),Se.L=Se.R=Se.C=-(Se.color=1),Se.size=Se.content?Se.content.length:0,Se.start=0,Se.clsid=Se.clsid||V,z===0)Se.C=le.length>1?1:-1,Se.size=0,Se.type=5;else if(Fe.slice(-1)=="/"){for(me=z+1;me<le.length&&n(R.FullPaths[me])!=Fe;++me);for(Se.C=me>=le.length?-1:me,me=z+1;me<le.length&&n(R.FullPaths[me])!=n(Fe);++me);Se.R=me>=le.length?-1:me,Se.type=1}else n(R.FullPaths[z+1]||"")==n(Fe)&&(Se.R=z+1),Se.type=2}}}function D(R,q){var L=q||{};if(L.fileType=="mad")return _a(R,L);switch(k(R),L.fileType){case"zip":return md(R,L)}var U=function(Ve){for(var De=0,Ue=0,xt=0;xt<Ve.FileIndex.length;++xt){var er=Ve.FileIndex[xt];if(er.content){var tr=er.content.length;tr>0&&(tr<4096?De+=tr+63>>6:Ue+=tr+511>>9)}}for(var ns=Ve.FullPaths.length+3>>2,pd=De+7>>3,xd=De+127>>7,gd=pd+Ue+ns+xd,rl=gd+127>>7,C0=rl<=109?0:Math.ceil((rl-109)/127);gd+rl+C0+127>>7>rl;)C0=++rl<=109?0:Math.ceil((rl-109)/127);var Za=[1,C0,rl,xd,ns,Ue,De,0];return Ve.FileIndex[0].size=De<<6,Za[7]=(Ve.FileIndex[0].start=Za[0]+Za[1]+Za[2]+Za[3]+Za[4]+Za[5])+(Za[6]+7>>3),Za}(R),z=Pr(U[7]<<9),H=0,oe=0;{for(H=0;H<8;++H)z.write_shift(1,P[H]);for(H=0;H<8;++H)z.write_shift(2,0);for(z.write_shift(2,62),z.write_shift(2,3),z.write_shift(2,65534),z.write_shift(2,9),z.write_shift(2,6),H=0;H<3;++H)z.write_shift(2,0);for(z.write_shift(4,0),z.write_shift(4,U[2]),z.write_shift(4,U[0]+U[1]+U[2]+U[3]-1),z.write_shift(4,0),z.write_shift(4,4096),z.write_shift(4,U[3]?U[0]+U[1]+U[2]-1:A),z.write_shift(4,U[3]),z.write_shift(-4,U[1]?U[0]-1:A),z.write_shift(4,U[1]),H=0;H<109;++H)z.write_shift(-4,H<U[2]?U[1]+H:-1)}if(U[1])for(oe=0;oe<U[1];++oe){for(;H<236+oe*127;++H)z.write_shift(-4,H<U[2]?U[1]+H:-1);z.write_shift(-4,oe===U[1]-1?A:oe+1)}var me=function(Ve){for(oe+=Ve;H<oe-1;++H)z.write_shift(-4,H+1);Ve&&(++H,z.write_shift(-4,A))};for(oe=H=0,oe+=U[1];H<oe;++H)z.write_shift(-4,Z.DIFSECT);for(oe+=U[2];H<oe;++H)z.write_shift(-4,Z.FATSECT);me(U[3]),me(U[4]);for(var ie=0,le=0,ue=R.FileIndex[0];ie<R.FileIndex.length;++ie)ue=R.FileIndex[ie],ue.content&&(le=ue.content.length,!(le<4096)&&(ue.start=oe,me(le+511>>9)));for(me(U[6]+7>>3);z.l&511;)z.write_shift(-4,Z.ENDOFCHAIN);for(oe=H=0,ie=0;ie<R.FileIndex.length;++ie)ue=R.FileIndex[ie],ue.content&&(le=ue.content.length,!(!le||le>=4096)&&(ue.start=oe,me(le+63>>6)));for(;z.l&511;)z.write_shift(-4,Z.ENDOFCHAIN);for(H=0;H<U[4]<<2;++H){var Se=R.FullPaths[H];if(!Se||Se.length===0){for(ie=0;ie<17;++ie)z.write_shift(4,0);for(ie=0;ie<3;++ie)z.write_shift(4,-1);for(ie=0;ie<12;++ie)z.write_shift(4,0);continue}ue=R.FileIndex[H],H===0&&(ue.start=ue.size?ue.start-1:A);var Fe=H===0&&L.root||ue.name;if(le=2*(Fe.length+1),z.write_shift(64,Fe,"utf16le"),z.write_shift(2,le),z.write_shift(1,ue.type),z.write_shift(1,ue.color),z.write_shift(-4,ue.L),z.write_shift(-4,ue.R),z.write_shift(-4,ue.C),ue.clsid)z.write_shift(16,ue.clsid,"hex");else for(ie=0;ie<4;++ie)z.write_shift(4,0);z.write_shift(4,ue.state||0),z.write_shift(4,0),z.write_shift(4,0),z.write_shift(4,0),z.write_shift(4,0),z.write_shift(4,ue.start),z.write_shift(4,ue.size),z.write_shift(4,0)}for(H=1;H<R.FileIndex.length;++H)if(ue=R.FileIndex[H],ue.size>=4096)if(z.l=ue.start+1<<9,St&&Buffer.isBuffer(ue.content))ue.content.copy(z,z.l,0,ue.size),z.l+=ue.size+511&-512;else{for(ie=0;ie<ue.size;++ie)z.write_shift(1,ue.content[ie]);for(;ie&511;++ie)z.write_shift(1,0)}for(H=1;H<R.FileIndex.length;++H)if(ue=R.FileIndex[H],ue.size>0&&ue.size<4096)if(St&&Buffer.isBuffer(ue.content))ue.content.copy(z,z.l,0,ue.size),z.l+=ue.size+63&-64;else{for(ie=0;ie<ue.size;++ie)z.write_shift(1,ue.content[ie]);for(;ie&63;++ie)z.write_shift(1,0)}if(St)z.l=z.length;else for(;z.l<z.length;)z.write_shift(1,0);return z}function M(R,q){var L=R.FullPaths.map(function(ie){return ie.toUpperCase()}),U=L.map(function(ie){var le=ie.split("/");return le[le.length-(ie.slice(-1)=="/"?2:1)]}),z=!1;q.charCodeAt(0)===47?(z=!0,q=L[0].slice(0,-1)+q):z=q.indexOf("/")!==-1;var H=q.toUpperCase(),oe=z===!0?L.indexOf(H):U.indexOf(H);if(oe!==-1)return R.FileIndex[oe];var me=!H.match($d);for(H=H.replace(As,""),me&&(H=H.replace($d,"!")),oe=0;oe<L.length;++oe)if((me?L[oe].replace($d,"!"):L[oe]).replace(As,"")==H||(me?U[oe].replace($d,"!"):U[oe]).replace(As,"")==H)return R.FileIndex[oe];return null}var T=64,A=-2,W="d0cf11e0a1b11ae1",P=[208,207,17,224,161,177,26,225],V="00000000000000000000000000000000",Z={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:A,FREESECT:-1,HEADER_SIGNATURE:W,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:V,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function Q(R,q,L){u();var U=D(R,L);c.writeFileSync(q,U)}function O(R){for(var q=new Array(R.length),L=0;L<R.length;++L)q[L]=String.fromCharCode(R[L]);return q.join("")}function ne(R,q){var L=D(R,q);switch(q&&q.type||"buffer"){case"file":return u(),c.writeFileSync(q.filename,L),L;case"binary":return typeof L=="string"?L:O(L);case"base64":return iC(typeof L=="string"?L:O(L));case"buffer":if(St)return Buffer.isBuffer(L)?L:cc(L);case"array":return typeof L=="string"?na(L):L}return L}var he;function I(R){try{var q=R.InflateRaw,L=new q;if(L._processChunk(new Uint8Array([3,0]),L._finishFlushFlag),L.bytesRead)he=R;else throw new Error("zlib does not expose bytesRead")}catch(U){console.error("cannot use native zlib: "+(U.message||U))}}function Y(R,q){if(!he)return tl(R,q);var L=he.InflateRaw,U=new L,z=U._processChunk(R.slice(R.l),U._finishFlushFlag);return R.l+=U.bytesRead,z}function E(R){return he?he.deflateRawSync(R):st(R)}var B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ee=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],J=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function K(R){var q=(R<<1|R<<11)&139536|(R<<5|R<<15)&558144;return(q>>16|q>>8|q)&255}for(var ae=typeof Uint8Array<"u",te=ae?new Uint8Array(256):[],xe=0;xe<256;++xe)te[xe]=K(xe);function F(R,q){var L=te[R&255];return q<=8?L>>>8-q:(L=L<<8|te[R>>8&255],q<=16?L>>>16-q:(L=L<<8|te[R>>16&255],L>>>24-q))}function We(R,q){var L=q&7,U=q>>>3;return(R[U]|(L<=6?0:R[U+1]<<8))>>>L&3}function je(R,q){var L=q&7,U=q>>>3;return(R[U]|(L<=5?0:R[U+1]<<8))>>>L&7}function Oe(R,q){var L=q&7,U=q>>>3;return(R[U]|(L<=4?0:R[U+1]<<8))>>>L&15}function Ne(R,q){var L=q&7,U=q>>>3;return(R[U]|(L<=3?0:R[U+1]<<8))>>>L&31}function ge(R,q){var L=q&7,U=q>>>3;return(R[U]|(L<=1?0:R[U+1]<<8))>>>L&127}function Me(R,q,L){var U=q&7,z=q>>>3,H=(1<<L)-1,oe=R[z]>>>U;return L<8-U||(oe|=R[z+1]<<8-U,L<16-U)||(oe|=R[z+2]<<16-U,L<24-U)||(oe|=R[z+3]<<24-U),oe&H}function Xe(R,q,L){var U=q&7,z=q>>>3;return U<=5?R[z]|=(L&7)<<U:(R[z]|=L<<U&255,R[z+1]=(L&7)>>8-U),q+3}function G(R,q,L){var U=q&7,z=q>>>3;return L=(L&1)<<U,R[z]|=L,q+1}function re(R,q,L){var U=q&7,z=q>>>3;return L<<=U,R[z]|=L&255,L>>>=8,R[z+1]=L,q+8}function ce(R,q,L){var U=q&7,z=q>>>3;return L<<=U,R[z]|=L&255,L>>>=8,R[z+1]=L&255,R[z+2]=L>>>8,q+16}function _e(R,q){var L=R.length,U=2*L>q?2*L:q+5,z=0;if(L>=q)return R;if(St){var H=oC(U);if(R.copy)R.copy(H);else for(;z<R.length;++z)H[z]=R[z];return H}else if(ae){var oe=new Uint8Array(U);if(oe.set)oe.set(R);else for(;z<L;++z)oe[z]=R[z];return oe}return R.length=U,R}function we(R){for(var q=new Array(R),L=0;L<R;++L)q[L]=0;return q}function ye(R,q,L){var U=1,z=0,H=0,oe=0,me=0,ie=R.length,le=ae?new Uint16Array(32):we(32);for(H=0;H<32;++H)le[H]=0;for(H=ie;H<L;++H)R[H]=0;ie=R.length;var ue=ae?new Uint16Array(ie):we(ie);for(H=0;H<ie;++H)le[z=R[H]]++,U<z&&(U=z),ue[H]=0;for(le[0]=0,H=1;H<=U;++H)le[H+16]=me=me+le[H-1]<<1;for(H=0;H<ie;++H)me=R[H],me!=0&&(ue[H]=le[me+16]++);var Se=0;for(H=0;H<ie;++H)if(Se=R[H],Se!=0)for(me=F(ue[H],U)>>U-Se,oe=(1<<U+4-Se)-1;oe>=0;--oe)q[me|oe<<Se]=Se&15|H<<4;return U}var Te=ae?new Uint16Array(512):we(512),Ze=ae?new Uint16Array(32):we(32);if(!ae){for(var ot=0;ot<512;++ot)Te[ot]=0;for(ot=0;ot<32;++ot)Ze[ot]=0}(function(){for(var R=[],q=0;q<32;q++)R.push(5);ye(R,Ze,32);var L=[];for(q=0;q<=143;q++)L.push(8);for(;q<=255;q++)L.push(9);for(;q<=279;q++)L.push(7);for(;q<=287;q++)L.push(8);ye(L,Te,288)})();var qt=function(){for(var q=ae?new Uint8Array(32768):[],L=0,U=0;L<J.length-1;++L)for(;U<J[L+1];++U)q[U]=L;for(;U<32768;++U)q[U]=29;var z=ae?new Uint8Array(259):[];for(L=0,U=0;L<ee.length-1;++L)for(;U<ee[L+1];++U)z[U]=L;function H(me,ie){for(var le=0;le<me.length;){var ue=Math.min(65535,me.length-le),Se=le+ue==me.length;for(ie.write_shift(1,+Se),ie.write_shift(2,ue),ie.write_shift(2,~ue&65535);ue-- >0;)ie[ie.l++]=me[le++]}return ie.l}function oe(me,ie){for(var le=0,ue=0,Se=ae?new Uint16Array(32768):[];ue<me.length;){var Fe=Math.min(65535,me.length-ue);if(Fe<10){for(le=Xe(ie,le,+(ue+Fe==me.length)),le&7&&(le+=8-(le&7)),ie.l=le/8|0,ie.write_shift(2,Fe),ie.write_shift(2,~Fe&65535);Fe-- >0;)ie[ie.l++]=me[ue++];le=ie.l*8;continue}le=Xe(ie,le,+(ue+Fe==me.length)+2);for(var Ve=0;Fe-- >0;){var De=me[ue];Ve=(Ve<<5^De)&32767;var Ue=-1,xt=0;if((Ue=Se[Ve])&&(Ue|=ue&-32768,Ue>ue&&(Ue-=32768),Ue<ue))for(;me[Ue+xt]==me[ue+xt]&&xt<250;)++xt;if(xt>2){De=z[xt],De<=22?le=re(ie,le,te[De+1]>>1)-1:(re(ie,le,3),le+=5,re(ie,le,te[De-23]>>5),le+=3);var er=De<8?0:De-4>>2;er>0&&(ce(ie,le,xt-ee[De]),le+=er),De=q[ue-Ue],le=re(ie,le,te[De]>>3),le-=3;var tr=De<4?0:De-2>>1;tr>0&&(ce(ie,le,ue-Ue-J[De]),le+=tr);for(var ns=0;ns<xt;++ns)Se[Ve]=ue&32767,Ve=(Ve<<5^me[ue])&32767,++ue;Fe-=xt-1}else De<=143?De=De+48:le=G(ie,le,1),le=re(ie,le,te[De]),Se[Ve]=ue&32767,++ue}le=re(ie,le,0)-1}return ie.l=(le+7)/8|0,ie.l}return function(ie,le){return ie.length<8?H(ie,le):oe(ie,le)}}();function st(R){var q=Pr(50+Math.floor(R.length*1.1)),L=qt(R,q);return q.slice(0,L)}var Et=ae?new Uint16Array(32768):we(32768),Ar=ae?new Uint16Array(32768):we(32768),_t=ae?new Uint16Array(128):we(128),or=1,Qa=1;function $n(R,q){var L=Ne(R,q)+257;q+=5;var U=Ne(R,q)+1;q+=5;var z=Oe(R,q)+4;q+=4;for(var H=0,oe=ae?new Uint8Array(19):we(19),me=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ie=1,le=ae?new Uint8Array(8):we(8),ue=ae?new Uint8Array(8):we(8),Se=oe.length,Fe=0;Fe<z;++Fe)oe[B[Fe]]=H=je(R,q),ie<H&&(ie=H),le[H]++,q+=3;var Ve=0;for(le[0]=0,Fe=1;Fe<=ie;++Fe)ue[Fe]=Ve=Ve+le[Fe-1]<<1;for(Fe=0;Fe<Se;++Fe)(Ve=oe[Fe])!=0&&(me[Fe]=ue[Ve]++);var De=0;for(Fe=0;Fe<Se;++Fe)if(De=oe[Fe],De!=0){Ve=te[me[Fe]]>>8-De;for(var Ue=(1<<7-De)-1;Ue>=0;--Ue)_t[Ve|Ue<<De]=De&7|Fe<<3}var xt=[];for(ie=1;xt.length<L+U;)switch(Ve=_t[ge(R,q)],q+=Ve&7,Ve>>>=3){case 16:for(H=3+We(R,q),q+=2,Ve=xt[xt.length-1];H-- >0;)xt.push(Ve);break;case 17:for(H=3+je(R,q),q+=3;H-- >0;)xt.push(0);break;case 18:for(H=11+ge(R,q),q+=7;H-- >0;)xt.push(0);break;default:xt.push(Ve),ie<Ve&&(ie=Ve);break}var er=xt.slice(0,L),tr=xt.slice(L);for(Fe=L;Fe<286;++Fe)er[Fe]=0;for(Fe=U;Fe<30;++Fe)tr[Fe]=0;return or=ye(er,Et,286),Qa=ye(tr,Ar,30),q}function dd(R,q){if(R[0]==3&&!(R[1]&3))return[Vo(q),2];for(var L=0,U=0,z=oC(q||1<<18),H=0,oe=z.length>>>0,me=0,ie=0;!(U&1);){if(U=je(R,L),L+=3,U>>>1)U>>1==1?(me=9,ie=5):(L=$n(R,L),me=or,ie=Qa);else{L&7&&(L+=8-(L&7));var le=R[L>>>3]|R[(L>>>3)+1]<<8;if(L+=32,le>0)for(!q&&oe<H+le&&(z=_e(z,H+le),oe=z.length);le-- >0;)z[H++]=R[L>>>3],L+=8;continue}for(;;){!q&&oe<H+32767&&(z=_e(z,H+32767),oe=z.length);var ue=Me(R,L,me),Se=U>>>1==1?Te[ue]:Et[ue];if(L+=Se&15,Se>>>=4,!(Se>>>8&255))z[H++]=Se;else{if(Se==256)break;Se-=257;var Fe=Se<8?0:Se-4>>2;Fe>5&&(Fe=0);var Ve=H+ee[Se];Fe>0&&(Ve+=Me(R,L,Fe),L+=Fe),ue=Me(R,L,ie),Se=U>>>1==1?Ze[ue]:Ar[ue],L+=Se&15,Se>>>=4;var De=Se<4?0:Se-2>>1,Ue=J[Se];for(De>0&&(Ue+=Me(R,L,De),L+=De),!q&&oe<Ve&&(z=_e(z,Ve+100),oe=z.length);H<Ve;)z[H]=z[H-Ue],++H}}}return q?[z,L+7>>>3]:[z.slice(0,H),L+7>>>3]}function tl(R,q){var L=R.slice(R.l||0),U=dd(L,q);return R.l+=U[1],U[0]}function fd(R,q){if(R)typeof console<"u"&&console.error(q);else throw new Error(q)}function hd(R,q){var L=R;Jr(L,0);var U=[],z=[],H={FileIndex:U,FullPaths:z};j(H,{root:q.root});for(var oe=L.length-4;(L[oe]!=80||L[oe+1]!=75||L[oe+2]!=5||L[oe+3]!=6)&&oe>=0;)--oe;L.l=oe+4,L.l+=4;var me=L.read_shift(2);L.l+=6;var ie=L.read_shift(4);for(L.l=ie,oe=0;oe<me;++oe){L.l+=20;var le=L.read_shift(4),ue=L.read_shift(4),Se=L.read_shift(2),Fe=L.read_shift(2),Ve=L.read_shift(2);L.l+=8;var De=L.read_shift(4),Ue=l(L.slice(L.l+Se,L.l+Se+Fe));L.l+=Se+Fe+Ve;var xt=L.l;L.l=De+4,N0(L,le,ue,H,Ue),L.l=xt}return H}function N0(R,q,L,U,z){R.l+=2;var H=R.read_shift(2),oe=R.read_shift(2),me=o(R);if(H&8257)throw new Error("Unsupported ZIP encryption");for(var ie=R.read_shift(4),le=R.read_shift(4),ue=R.read_shift(4),Se=R.read_shift(2),Fe=R.read_shift(2),Ve="",De=0;De<Se;++De)Ve+=String.fromCharCode(R[R.l++]);if(Fe){var Ue=l(R.slice(R.l,R.l+Fe));(Ue[21589]||{}).mt&&(me=Ue[21589].mt),((z||{})[21589]||{}).mt&&(me=z[21589].mt)}R.l+=Fe;var xt=R.slice(R.l,R.l+le);switch(oe){case 8:xt=Y(R,ue);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+oe)}var er=!1;H&8&&(ie=R.read_shift(4),ie==134695760&&(ie=R.read_shift(4),er=!0),le=R.read_shift(4),ue=R.read_shift(4)),le!=q&&fd(er,"Bad compressed size: "+q+" != "+le),ue!=L&&fd(er,"Bad uncompressed size: "+L+" != "+ue),bs(U,Ve,xt,{unsafe:!0,mt:me})}function md(R,q){var L=q||{},U=[],z=[],H=Pr(1),oe=L.compression?8:0,me=0,ie=0,le=0,ue=0,Se=0,Fe=R.FullPaths[0],Ve=Fe,De=R.FileIndex[0],Ue=[],xt=0;for(ie=1;ie<R.FullPaths.length;++ie)if(Ve=R.FullPaths[ie].slice(Fe.length),De=R.FileIndex[ie],!(!De.size||!De.content||Ve=="Sh33tJ5")){var er=ue,tr=Pr(Ve.length);for(le=0;le<Ve.length;++le)tr.write_shift(1,Ve.charCodeAt(le)&127);tr=tr.slice(0,tr.l),Ue[Se]=aZ.buf(De.content,0);var ns=De.content;oe==8&&(ns=E(ns)),H=Pr(30),H.write_shift(4,67324752),H.write_shift(2,20),H.write_shift(2,me),H.write_shift(2,oe),De.mt?i(H,De.mt):H.write_shift(4,0),H.write_shift(-4,Ue[Se]),H.write_shift(4,ns.length),H.write_shift(4,De.content.length),H.write_shift(2,tr.length),H.write_shift(2,0),ue+=H.length,U.push(H),ue+=tr.length,U.push(tr),ue+=ns.length,U.push(ns),H=Pr(46),H.write_shift(4,33639248),H.write_shift(2,0),H.write_shift(2,20),H.write_shift(2,me),H.write_shift(2,oe),H.write_shift(4,0),H.write_shift(-4,Ue[Se]),H.write_shift(4,ns.length),H.write_shift(4,De.content.length),H.write_shift(2,tr.length),H.write_shift(2,0),H.write_shift(2,0),H.write_shift(2,0),H.write_shift(2,0),H.write_shift(4,0),H.write_shift(4,er),xt+=H.l,z.push(H),xt+=tr.length,z.push(tr),++Se}return H=Pr(22),H.write_shift(4,101010256),H.write_shift(2,0),H.write_shift(2,0),H.write_shift(2,Se),H.write_shift(2,Se),H.write_shift(4,xt),H.write_shift(4,ue),H.write_shift(2,0),to([to(U),to(z),H])}var Ys={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function _0(R,q){if(R.ctype)return R.ctype;var L=R.name||"",U=L.match(/\.([^\.]+)$/);return U&&Ys[U[1]]||q&&(U=(L=q).match(/[\.\\]([^\.\\])+$/),U&&Ys[U[1]])?Ys[U[1]]:"application/octet-stream"}function dt(R){for(var q=iC(R),L=[],U=0;U<q.length;U+=76)L.push(q.slice(U,U+76));return L.join(`\r
`)+`\r
`}function Ft(R){var q=R.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(le){var ue=le.charCodeAt(0).toString(16).toUpperCase();return"="+(ue.length==1?"0"+ue:ue)});q=q.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),q.charAt(0)==`
`&&(q="=0D"+q.slice(1)),q=q.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var L=[],U=q.split(`\r
`),z=0;z<U.length;++z){var H=U[z];if(H.length==0){L.push("");continue}for(var oe=0;oe<H.length;){var me=76,ie=H.slice(oe,oe+me);ie.charAt(me-1)=="="?me--:ie.charAt(me-2)=="="?me-=2:ie.charAt(me-3)=="="&&(me-=3),ie=H.slice(oe,oe+me),oe+=me,oe<H.length&&(ie+="="),L.push(ie)}}return L.join(`\r
`)}function Ht(R){for(var q=[],L=0;L<R.length;++L){for(var U=R[L];L<=R.length&&U.charAt(U.length-1)=="=";)U=U.slice(0,U.length-1)+R[++L];q.push(U)}for(var z=0;z<q.length;++z)q[z]=q[z].replace(/[=][0-9A-Fa-f]{2}/g,function(H){return String.fromCharCode(parseInt(H.slice(1),16))});return na(q.join(`\r
`))}function Xs(R,q,L){for(var U="",z="",H="",oe,me=0;me<10;++me){var ie=q[me];if(!ie||ie.match(/^\s*$/))break;var le=ie.match(/^(.*?):\s*([^\s].*)$/);if(le)switch(le[1].toLowerCase()){case"content-location":U=le[2].trim();break;case"content-type":H=le[2].trim();break;case"content-transfer-encoding":z=le[2].trim();break}}switch(++me,z.toLowerCase()){case"base64":oe=na(mn(q.slice(me).join("")));break;case"quoted-printable":oe=Ht(q.slice(me));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+z)}var ue=bs(R,U.slice(L.length),oe,{unsafe:!0});H&&(ue.ctype=H)}function Qs(R,q){if(O(R.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var L=q&&q.root||"",U=(St&&Buffer.isBuffer(R)?R.toString("binary"):O(R)).split(`\r
`),z=0,H="";for(z=0;z<U.length;++z)if(H=U[z],!!/^Content-Location:/i.test(H)&&(H=H.slice(H.indexOf("file")),L||(L=H.slice(0,H.lastIndexOf("/")+1)),H.slice(0,L.length)!=L))for(;L.length>0&&(L=L.slice(0,L.length-1),L=L.slice(0,L.lastIndexOf("/")+1),H.slice(0,L.length)!=L););var oe=(U[1]||"").match(/boundary="(.*?)"/);if(!oe)throw new Error("MAD cannot find boundary");var me="--"+(oe[1]||""),ie=[],le=[],ue={FileIndex:ie,FullPaths:le};j(ue);var Se,Fe=0;for(z=0;z<U.length;++z){var Ve=U[z];Ve!==me&&Ve!==me+"--"||(Fe++&&Xs(ue,U.slice(Se,z),L),Se=z)}return ue}function _a(R,q){var L=q||{},U=L.boundary||"SheetJS";U="------="+U;for(var z=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+U.slice(2)+'"',"","",""],H=R.FullPaths[0],oe=H,me=R.FileIndex[0],ie=1;ie<R.FullPaths.length;++ie)if(oe=R.FullPaths[ie].slice(H.length),me=R.FileIndex[ie],!(!me.size||!me.content||oe=="Sh33tJ5")){oe=oe.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(xt){return"_x"+xt.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(xt){return"_u"+xt.charCodeAt(0).toString(16)+"_"});for(var le=me.content,ue=St&&Buffer.isBuffer(le)?le.toString("binary"):O(le),Se=0,Fe=Math.min(1024,ue.length),Ve=0,De=0;De<=Fe;++De)(Ve=ue.charCodeAt(De))>=32&&Ve<128&&++Se;var Ue=Se>=Fe*4/5;z.push(U),z.push("Content-Location: "+(L.root||"file:///C:/SheetJS/")+oe),z.push("Content-Transfer-Encoding: "+(Ue?"quoted-printable":"base64")),z.push("Content-Type: "+_0(me,oe)),z.push(""),z.push(Ue?Ft(ue):dt(ue))}return z.push(U+`--\r
`),z.join(`\r
`)}function Ja(R){var q={};return j(q,R),q}function bs(R,q,L,U){var z=U&&U.unsafe;z||j(R);var H=!z&&kt.find(R,q);if(!H){var oe=R.FullPaths[0];q.slice(0,oe.length)==oe?oe=q:(oe.slice(-1)!="/"&&(oe+="/"),oe=(oe+q).replace("//","/")),H={name:a(q),type:2},R.FileIndex.push(H),R.FullPaths.push(oe),z||kt.utils.cfb_gc(R)}return H.content=L,H.size=L?L.length:0,U&&(U.CLSID&&(H.clsid=U.CLSID),U.mt&&(H.mt=U.mt),U.ct&&(H.ct=U.ct)),H}function Ca(R,q){j(R);var L=kt.find(R,q);if(L){for(var U=0;U<R.FileIndex.length;++U)if(R.FileIndex[U]==L)return R.FileIndex.splice(U,1),R.FullPaths.splice(U,1),!0}return!1}function t5(R,q,L){j(R);var U=kt.find(R,q);if(U){for(var z=0;z<R.FileIndex.length;++z)if(R.FileIndex[z]==U)return R.FileIndex[z].name=a(L),R.FullPaths[z]=L,!0}return!1}function r5(R){k(R,!0)}return t.find=M,t.read=_,t.parse=d,t.write=ne,t.writeFile=Q,t.utils={cfb_new:Ja,cfb_add:bs,cfb_del:Ca,cfb_mov:t5,cfb_gc:r5,ReadShift:cf,CheckField:e6,prep_blob:Jr,bconcat:to,use_zlib:I,_deflateRaw:st,_inflateRaw:tl,consts:Z},t}();function iZ(e){if(typeof Deno<"u")return Deno.readFileSync(e);if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var t=File(e);t.open("r"),t.encoding="binary";var r=t.read();return t.close(),r}catch(n){if(!n.message||!n.message.match(/onstruct/))throw n}throw new Error("Cannot access file "+e)}function Wa(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;++n)Object.prototype.hasOwnProperty.call(e,t[n])&&r.push(t[n]);return r}function Kw(e){for(var t=[],r=Wa(e),n=0;n!==r.length;++n)t[e[r[n]]]=r[n];return t}var sx=new Date(1899,11,30,0,0,0);function Rs(e,t){var r=e.getTime(),n=sx.getTime()+(e.getTimezoneOffset()-sx.getTimezoneOffset())*6e4;return(r-n)/(24*60*60*1e3)}var OP=new Date,oZ=sx.getTime()+(OP.getTimezoneOffset()-sx.getTimezoneOffset())*6e4,pC=OP.getTimezoneOffset();function y0(e){var t=new Date;return t.setTime(e*24*60*60*1e3+oZ),t.getTimezoneOffset()!==pC&&t.setTime(t.getTime()+(t.getTimezoneOffset()-pC)*6e4),t}function lZ(e){var t=0,r=0,n=!1,a=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!a)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var i=1;i!=a.length;++i)if(a[i]){switch(r=1,i>3&&(n=!0),a[i].slice(a[i].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+a[i].slice(a[i].length-1));case"D":r*=24;case"H":r*=60;case"M":if(n)r*=60;else throw new Error("Unsupported ISO Duration Field: M")}t+=r*parseInt(a[i],10)}return t}var xC=new Date("2017-02-19T19:06:09.000Z"),PP=isNaN(xC.getFullYear())?new Date("2/19/17"):xC,cZ=PP.getFullYear()==2017;function Gr(e,t){var r=new Date(e);if(cZ)return t>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):t<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(e instanceof Date)return e;if(PP.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return e.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var a=e.match(/\d+/g)||["2017","2","19","0","0","0"],i=new Date(+a[0],+a[1]-1,+a[2],+a[3]||0,+a[4]||0,+a[5]||0);return e.indexOf("Z")>-1&&(i=new Date(i.getTime()-i.getTimezoneOffset()*60*1e3)),i}function Zl(e,t){if(St&&Buffer.isBuffer(e)){if(t){if(e[0]==255&&e[1]==254)return zd(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return zd(bP(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(e[0]==255&&e[1]==254)return zd(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return zd(new TextDecoder("utf-16be").decode(e.slice(2)))}var r={"€":"€","‚":"‚",ƒ:"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰",Š:"Š","‹":"‹",Œ:"Œ",Ž:"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™",š:"š","›":"›",œ:"œ",ž:"ž",Ÿ:"Ÿ"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(i){return r[i]||i})}catch{}for(var n=[],a=0;a!=e.length;++a)n.push(String.fromCharCode(e[a]));return n.join("")}function es(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=es(e[r]));return t}function ur(e,t){for(var r="";r.length<t;)r+=e;return r}function ma(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,n=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return!isNaN(t=Number(n))||(n=n.replace(/[(](.*)[)]/,function(a,i){return r=-r,i}),!isNaN(t=Number(n)))?t/r:t}var uZ=["january","february","march","april","may","june","july","august","september","october","november","december"];function $u(e){var t=new Date(e),r=new Date(NaN),n=t.getYear(),a=t.getMonth(),i=t.getDate();if(isNaN(i))return r;var o=e.toLowerCase();if(o.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(o=o.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),o.length>3&&uZ.indexOf(o)==-1)return r}else if(o.match(/[a-z]/))return r;return n<0||n>8099?r:(a>0||i>1)&&n!=101?t:e.match(/[^-0-9:,\/\\]/)?r:t}var dZ=function(){var e="abacaba".split(/(:?b)/i).length==5;return function(r,n,a){if(e||typeof n=="string")return r.split(n);for(var i=r.split(n),o=[i[0]],l=1;l<i.length;++l)o.push(a),o.push(i[l]);return o}}();function IP(e){return e?e.content&&e.type?Zl(e.content,!0):e.data?Ud(e.data):e.asNodeBuffer&&St?Ud(e.asNodeBuffer().toString("binary")):e.asBinary?Ud(e.asBinary()):e._data&&e._data.getContent?Ud(Zl(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function FP(e){if(!e)return null;if(e.data)return nC(e.data);if(e.asNodeBuffer&&St)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return typeof t=="string"?nC(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function fZ(e){return e&&e.name.slice(-4)===".bin"?FP(e):IP(e)}function bn(e,t){for(var r=e.FullPaths||Wa(e.files),n=t.toLowerCase().replace(/[\/]/g,"\\"),a=n.replace(/\\/g,"/"),i=0;i<r.length;++i){var o=r[i].replace(/^Root Entry[\/]/,"").toLowerCase();if(n==o||a==o)return e.files?e.files[r[i]]:e.FileIndex[i]}return null}function Yw(e,t){var r=bn(e,t);if(r==null)throw new Error("Cannot find file "+t+" in zip");return r}function wr(e,t,r){if(!r)return fZ(Yw(e,t));if(!t)return null;try{return wr(e,t)}catch{return null}}function nn(e,t,r){if(!r)return IP(Yw(e,t));if(!t)return null;try{return nn(e,t)}catch{return null}}function hZ(e,t,r){return FP(Yw(e,t))}function gC(e){for(var t=e.FullPaths||Wa(e.files),r=[],n=0;n<t.length;++n)t[n].slice(-1)!="/"&&r.push(t[n].replace(/^Root Entry[\/]/,""));return r.sort()}function mZ(e,t,r){if(e.FullPaths){if(typeof r=="string"){var n;return St?n=cc(r):n=OJ(r),kt.utils.cfb_add(e,t,n)}kt.utils.cfb_add(e,t,r)}else e.file(t,r)}function LP(e,t){switch(t.type){case"base64":return kt.read(e,{type:"base64"});case"binary":return kt.read(e,{type:"binary"});case"buffer":case"array":return kt.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}function qd(e,t){if(e.charAt(0)=="/")return e.slice(1);var r=t.split("/");t.slice(-1)!="/"&&r.pop();for(var n=e.split("/");n.length!==0;){var a=n.shift();a===".."?r.pop():a!=="."&&r.push(a)}return r.join("/")}var MP=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
`,pZ=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,vC=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg,xZ=/<[^>]*>/g,ys=MP.match(vC)?vC:xZ,gZ=/<\w*:/,vZ=/<(\/?)\w+:/;function ut(e,t,r){for(var n={},a=0,i=0;a!==e.length&&!((i=e.charCodeAt(a))===32||i===10||i===13);++a);if(t||(n[0]=e.slice(0,a)),a===e.length)return n;var o=e.match(pZ),l=0,c="",u=0,d="",f="",h=1;if(o)for(u=0;u!=o.length;++u){for(f=o[u],i=0;i!=f.length&&f.charCodeAt(i)!==61;++i);for(d=f.slice(0,i).trim();f.charCodeAt(i+1)==32;)++i;for(h=(a=f.charCodeAt(i+1))==34||a==39?1:0,c=f.slice(i+1+h,f.length-h),l=0;l!=d.length&&d.charCodeAt(l)!==58;++l);if(l===d.length)d.indexOf("_")>0&&(d=d.slice(0,d.indexOf("_"))),n[d]=c,n[d.toLowerCase()]=c;else{var m=(l===5&&d.slice(0,5)==="xmlns"?"xmlns":"")+d.slice(l+1);if(n[m]&&d.slice(l-3,l)=="ext")continue;n[m]=c,n[m.toLowerCase()]=c}}return n}function Ya(e){return e.replace(vZ,"<$1")}var BP={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},yZ=Kw(BP),Rt=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/ig,t=/_x([\da-fA-F]{4})_/ig;return function r(n){var a=n+"",i=a.indexOf("<![CDATA[");if(i==-1)return a.replace(e,function(l,c){return BP[l]||String.fromCharCode(parseInt(c,l.indexOf("x")>-1?16:10))||l}).replace(t,function(l,c){return String.fromCharCode(parseInt(c,16))});var o=a.indexOf("]]>");return r(a.slice(0,i))+a.slice(i+9,o)+r(a.slice(o+3))}}(),bZ=/[&<>'"]/g,wZ=/[\u0000-\u001f]/g;function Xw(e){var t=e+"";return t.replace(bZ,function(r){return yZ[r]}).replace(/\n/g,"<br/>").replace(wZ,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}var yC=function(){var e=/&#(\d+);/g;function t(r,n){return String.fromCharCode(parseInt(n,10))}return function(n){return n.replace(e,t)}}();function Jt(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function Ag(e){for(var t="",r=0,n=0,a=0,i=0,o=0,l=0;r<e.length;){if(n=e.charCodeAt(r++),n<128){t+=String.fromCharCode(n);continue}if(a=e.charCodeAt(r++),n>191&&n<224){o=(n&31)<<6,o|=a&63,t+=String.fromCharCode(o);continue}if(i=e.charCodeAt(r++),n<240){t+=String.fromCharCode((n&15)<<12|(a&63)<<6|i&63);continue}o=e.charCodeAt(r++),l=((n&7)<<18|(a&63)<<12|(i&63)<<6|o&63)-65536,t+=String.fromCharCode(55296+(l>>>10&1023)),t+=String.fromCharCode(56320+(l&1023))}return t}function bC(e){var t=Vo(2*e.length),r,n,a=1,i=0,o=0,l;for(n=0;n<e.length;n+=a)a=1,(l=e.charCodeAt(n))<128?r=l:l<224?(r=(l&31)*64+(e.charCodeAt(n+1)&63),a=2):l<240?(r=(l&15)*4096+(e.charCodeAt(n+1)&63)*64+(e.charCodeAt(n+2)&63),a=3):(a=4,r=(l&7)*262144+(e.charCodeAt(n+1)&63)*4096+(e.charCodeAt(n+2)&63)*64+(e.charCodeAt(n+3)&63),r-=65536,o=55296+(r>>>10&1023),r=56320+(r&1023)),o!==0&&(t[i++]=o&255,t[i++]=o>>>8,o=0),t[i++]=r%256,t[i++]=r>>>8;return t.slice(0,i).toString("ucs2")}function wC(e){return cc(e,"binary").toString("utf8")}var _m="foo bar baz☃🍣",Kt=St&&(wC(_m)==Ag(_m)&&wC||bC(_m)==Ag(_m)&&bC)||Ag,zd=St?function(e){return cc(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,a=0;r<e.length;)switch(n=e.charCodeAt(r++),!0){case n<128:t.push(String.fromCharCode(n));break;case n<2048:t.push(String.fromCharCode(192+(n>>6))),t.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,a=e.charCodeAt(r++)-56320+(n<<10),t.push(String.fromCharCode(240+(a>>18&7))),t.push(String.fromCharCode(144+(a>>12&63))),t.push(String.fromCharCode(128+(a>>6&63))),t.push(String.fromCharCode(128+(a&63)));break;default:t.push(String.fromCharCode(224+(n>>12))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(n&63)))}return t.join("")},sh=function(){var e={};return function(r,n){var a=r+"|"+(n||"");return e[a]?e[a]:e[a]=new RegExp("<(?:\\w+:)?"+r+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+r+">",n||"")}}(),UP=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
`).replace(/<[^>]*>/g,""),a=0;a<e.length;++a)n=n.replace(e[a][0],e[a][1]);return n}}(),jZ=function(){var e={};return function(r){return e[r]!==void 0?e[r]:e[r]=new RegExp("<(?:vt:)?"+r+">([\\s\\S]*?)</(?:vt:)?"+r+">","g")}}(),NZ=/<\/?(?:vt:)?variant>/g,_Z=/<(?:vt:)([^>]*)>([\s\S]*)</;function jC(e,t){var r=ut(e),n=e.match(jZ(r.baseType))||[],a=[];if(n.length!=r.size){if(t.WTF)throw new Error("unexpected vector length "+n.length+" != "+r.size);return a}return n.forEach(function(i){var o=i.replace(NZ,"").match(_Z);o&&a.push({v:Kt(o[2]),t:o[1]})}),a}var CZ=/(^\s|\s$|\n)/;function SZ(e){return Wa(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function EZ(e,t,r){return"<"+e+(r!=null?SZ(r):"")+(t!=null?(t.match(CZ)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function Qw(e){if(St&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e=="string")return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return Kt(uc(Hw(e)));throw new Error("Bad input format: expected Buffer or string")}var nh=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/mg,kZ={CT:"http://schemas.openxmlformats.org/package/2006/content-types"},TZ=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];function AZ(e,t){for(var r=1-2*(e[t+7]>>>7),n=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),a=e[t+6]&15,i=5;i>=0;--i)a=a*256+e[t+i];return n==2047?a==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,a+=Math.pow(2,52)),r*Math.pow(2,n-52)*a)}function RZ(e,t,r){var n=(t<0||1/t==-1/0?1:0)<<7,a=0,i=0,o=n?-t:t;isFinite(o)?o==0?a=i=0:(a=Math.floor(Math.log(o)/Math.LN2),i=o*Math.pow(2,52-a),a<=-1023&&(!isFinite(i)||i<Math.pow(2,52))?a=-1022:(i-=Math.pow(2,52),a+=1023)):(a=2047,i=isNaN(t)?26985:0);for(var l=0;l<=5;++l,i/=256)e[r+l]=i&255;e[r+6]=(a&15)<<4|i&15,e[r+7]=a>>4|n}var NC=function(e){for(var t=[],r=10240,n=0;n<e[0].length;++n)if(e[0][n])for(var a=0,i=e[0][n].length;a<i;a+=r)t.push.apply(t,e[0][n].slice(a,a+r));return t},_C=St?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:cc(t)})):NC(e)}:NC,CC=function(e,t,r){for(var n=[],a=t;a<r;a+=2)n.push(String.fromCharCode(di(e,a)));return n.join("").replace(As,"")},Jw=St?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(As,""):CC(e,t,r)}:CC,SC=function(e,t,r){for(var n=[],a=t;a<t+r;++a)n.push(("0"+e[a].toString(16)).slice(-2));return n.join("")},$P=St?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):SC(e,t,r)}:SC,EC=function(e,t,r){for(var n=[],a=t;a<r;a++)n.push(String.fromCharCode(Oc(e,a)));return n.join("")},Dh=St?function(t,r,n){return Buffer.isBuffer(t)?t.toString("utf8",r,n):EC(t,r,n)}:EC,qP=function(e,t){var r=tn(e,t);return r>0?Dh(e,t+4,t+4+r-1):""},zP=qP,VP=function(e,t){var r=tn(e,t);return r>0?Dh(e,t+4,t+4+r-1):""},HP=VP,WP=function(e,t){var r=2*tn(e,t);return r>0?Dh(e,t+4,t+4+r-1):""},GP=WP,KP=function(t,r){var n=tn(t,r);return n>0?Jw(t,r+4,r+4+n):""},YP=KP,XP=function(e,t){var r=tn(e,t);return r>0?Dh(e,t+4,t+4+r):""},QP=XP,JP=function(e,t){return AZ(e,t)},nx=JP,ZP=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};St&&(zP=function(t,r){if(!Buffer.isBuffer(t))return qP(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},HP=function(t,r){if(!Buffer.isBuffer(t))return VP(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},GP=function(t,r){if(!Buffer.isBuffer(t))return WP(t,r);var n=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n-1)},YP=function(t,r){if(!Buffer.isBuffer(t))return KP(t,r);var n=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n)},QP=function(t,r){if(!Buffer.isBuffer(t))return XP(t,r);var n=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+n)},nx=function(t,r){return Buffer.isBuffer(t)?t.readDoubleLE(r):JP(t,r)},ZP=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var Oc=function(e,t){return e[t]},di=function(e,t){return e[t+1]*256+e[t]},DZ=function(e,t){var r=e[t+1]*256+e[t];return r<32768?r:(65535-r+1)*-1},tn=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},fl=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},OZ=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function cf(e,t){var r="",n,a,i=[],o,l,c,u;switch(t){case"dbcs":if(u=this.l,St&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(c=0;c<e;++c)r+=String.fromCharCode(di(this,u)),u+=2;e*=2;break;case"utf8":r=Dh(this,this.l,this.l+e);break;case"utf16le":e*=2,r=Jw(this,this.l,this.l+e);break;case"wstr":return cf.call(this,e,"dbcs");case"lpstr-ansi":r=zP(this,this.l),e=4+tn(this,this.l);break;case"lpstr-cp":r=HP(this,this.l),e=4+tn(this,this.l);break;case"lpwstr":r=GP(this,this.l),e=4+2*tn(this,this.l);break;case"lpp4":e=4+tn(this,this.l),r=YP(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+tn(this,this.l),r=QP(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,r="";(o=Oc(this,this.l+e++))!==0;)i.push(Nm(o));r=i.join("");break;case"_wstr":for(e=0,r="";(o=di(this,this.l+e))!==0;)i.push(Nm(o)),e+=2;e+=2,r=i.join("");break;case"dbcs-cont":for(r="",u=this.l,c=0;c<e;++c){if(this.lens&&this.lens.indexOf(u)!==-1)return o=Oc(this,u),this.l=u+1,l=cf.call(this,e-c,o?"dbcs-cont":"sbcs-cont"),i.join("")+l;i.push(Nm(di(this,u))),u+=2}r=i.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(r="",u=this.l,c=0;c!=e;++c){if(this.lens&&this.lens.indexOf(u)!==-1)return o=Oc(this,u),this.l=u+1,l=cf.call(this,e-c,o?"dbcs-cont":"sbcs-cont"),i.join("")+l;i.push(Nm(Oc(this,u))),u+=1}r=i.join("");break;default:switch(e){case 1:return n=Oc(this,this.l),this.l++,n;case 2:return n=(t==="i"?DZ:di)(this,this.l),this.l+=2,n;case 4:case-4:return t==="i"||!(this[this.l+3]&128)?(n=(e>0?fl:OZ)(this,this.l),this.l+=4,n):(a=tn(this,this.l),this.l+=4,a);case 8:case-8:if(t==="f")return e==8?a=nx(this,this.l):a=nx([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,a;e=8;case 16:r=$P(this,this.l,e);break}}return this.l+=e,r}var PZ=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255},IZ=function(e,t,r){e[r]=t&255,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},FZ=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255};function LZ(e,t,r){var n=0,a=0;if(r==="dbcs"){for(a=0;a!=t.length;++a)FZ(this,t.charCodeAt(a),this.l+2*a);n=2*t.length}else if(r==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),a=0;a!=t.length;++a)this[this.l+a]=t.charCodeAt(a)&255;n=t.length}else if(r==="hex"){for(;a<e;++a)this[this.l++]=parseInt(t.slice(2*a,2*a+2),16)||0;return this}else if(r==="utf16le"){var i=Math.min(this.l+e,this.length);for(a=0;a<Math.min(t.length,e);++a){var o=t.charCodeAt(a);this[this.l++]=o&255,this[this.l++]=o>>8}for(;this.l<i;)this[this.l++]=0;return this}else switch(e){case 1:n=1,this[this.l]=t&255;break;case 2:n=2,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255;break;case 3:n=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:n=4,PZ(this,t,this.l);break;case 8:if(n=8,r==="f"){RZ(this,t,this.l);break}case 16:break;case-4:n=4,IZ(this,t,this.l);break}return this.l+=n,this}function e6(e,t){var r=$P(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function Jr(e,t){e.l=t,e.read_shift=cf,e.chk=e6,e.write_shift=LZ}function vs(e,t){e.l+=t}function Pr(e){var t=Vo(e);return Jr(t,0),t}function Mi(e,t,r){if(e){var n,a,i;Jr(e,e.l||0);for(var o=e.length,l=0,c=0;e.l<o;){l=e.read_shift(1),l&128&&(l=(l&127)+((e.read_shift(1)&127)<<7));var u=ux[l]||ux[65535];for(n=e.read_shift(1),i=n&127,a=1;a<4&&n&128;++a)i+=((n=e.read_shift(1))&127)<<7*a;c=e.l+i;var d=u.f&&u.f(e,i,r);if(e.l=c,t(d,u,l))return}}}function z1(){var e=[],t=St?256:2048,r=function(u){var d=Pr(u);return Jr(d,0),d},n=r(t),a=function(){n&&(n.length>n.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&e.push(n),n=null)},i=function(u){return n&&u<n.length-n.l?n:(a(),n=r(Math.max(u+1,t)))},o=function(){return a(),to(e)},l=function(u){a(),n=u,n.l==null&&(n.l=n.length),i(t)};return{next:i,push:l,end:o,_bufs:e}}function uf(e,t,r){var n=es(e);if(t.s?(n.cRel&&(n.c+=t.s.c),n.rRel&&(n.r+=t.s.r)):(n.cRel&&(n.c+=t.c),n.rRel&&(n.r+=t.r)),!r||r.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function kC(e,t,r){var n=es(e);return n.s=uf(n.s,t.s,r),n.e=uf(n.e,t.s,r),n}function df(e,t){if(e.cRel&&e.c<0)for(e=es(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=es(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=ft(e);return!e.cRel&&e.cRel!=null&&(r=UZ(r)),!e.rRel&&e.rRel!=null&&(r=MZ(r)),r}function Rg(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+Mr(e.s.c)+":"+(e.e.cRel?"":"$")+Mr(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+ts(e.s.r)+":"+(e.e.rRel?"":"$")+ts(e.e.r):df(e.s,t.biff)+":"+df(e.e,t.biff)}function Zw(e){return parseInt(BZ(e),10)-1}function ts(e){return""+(e+1)}function MZ(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function BZ(e){return e.replace(/\$(\d+)$/,"$1")}function ej(e){for(var t=$Z(e),r=0,n=0;n!==t.length;++n)r=26*r+t.charCodeAt(n)-64;return r-1}function Mr(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function UZ(e){return e.replace(/^([A-Z])/,"$$$1")}function $Z(e){return e.replace(/^\$([A-Z])/,"$1")}function qZ(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function ks(e){for(var t=0,r=0,n=0;n<e.length;++n){var a=e.charCodeAt(n);a>=48&&a<=57?t=10*t+(a-48):a>=65&&a<=90&&(r=26*r+(a-64))}return{c:r-1,r:t-1}}function ft(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function cd(e){var t=e.indexOf(":");return t==-1?{s:ks(e),e:ks(e)}:{s:ks(e.slice(0,t)),e:ks(e.slice(t+1))}}function Tt(e,t){return typeof t>"u"||typeof t=="number"?Tt(e.s,e.e):(typeof e!="string"&&(e=ft(e)),typeof t!="string"&&(t=ft(t)),e==t?e:e+":"+t)}function hr(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,n=0,a=0,i=e.length;for(r=0;n<i&&!((a=e.charCodeAt(n)-64)<1||a>26);++n)r=26*r+a;for(t.s.c=--r,r=0;n<i&&!((a=e.charCodeAt(n)-48)<0||a>9);++n)r=10*r+a;if(t.s.r=--r,n===i||a!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++n,r=0;n!=i&&!((a=e.charCodeAt(n)-64)<1||a>26);++n)r=26*r+a;for(t.e.c=--r,r=0;n!=i&&!((a=e.charCodeAt(n)-48)<0||a>9);++n)r=10*r+a;return t.e.r=--r,t}function TC(e,t){var r=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=Ln(e.z,r?Rs(t):t)}catch{}try{return e.w=Ln((e.XF||{}).numFmtId||(r?14:0),r?Rs(t):t)}catch{return""+t}}function Ti(e,t,r){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),e.t=="e"?hc[e.v]||e.v:t==null?TC(e,e.v):TC(e,t))}function el(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",n={};return n[r]=e,{SheetNames:[r],Sheets:n}}function t6(e,t,r){var n=r||{},a=e?Array.isArray(e):n.dense,i=e||(a?[]:{}),o=0,l=0;if(i&&n.origin!=null){if(typeof n.origin=="number")o=n.origin;else{var c=typeof n.origin=="string"?ks(n.origin):n.origin;o=c.r,l=c.c}i["!ref"]||(i["!ref"]="A1:A1")}var u={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var d=hr(i["!ref"]);u.s.c=d.s.c,u.s.r=d.s.r,u.e.c=Math.max(u.e.c,d.e.c),u.e.r=Math.max(u.e.r,d.e.r),o==-1&&(u.e.r=o=d.e.r+1)}for(var f=0;f!=t.length;++f)if(t[f]){if(!Array.isArray(t[f]))throw new Error("aoa_to_sheet expects an array of arrays");for(var h=0;h!=t[f].length;++h)if(!(typeof t[f][h]>"u")){var m={v:t[f][h]},v=o+f,p=l+h;if(u.s.r>v&&(u.s.r=v),u.s.c>p&&(u.s.c=p),u.e.r<v&&(u.e.r=v),u.e.c<p&&(u.e.c=p),t[f][h]&&typeof t[f][h]=="object"&&!Array.isArray(t[f][h])&&!(t[f][h]instanceof Date))m=t[f][h];else if(Array.isArray(m.v)&&(m.f=t[f][h][1],m.v=m.v[0]),m.v===null)if(m.f)m.t="n";else if(n.nullError)m.t="e",m.v=0;else if(n.sheetStubs)m.t="z";else continue;else typeof m.v=="number"?m.t="n":typeof m.v=="boolean"?m.t="b":m.v instanceof Date?(m.z=n.dateNF||gt[14],n.cellDates?(m.t="d",m.w=Ln(m.z,Rs(m.v))):(m.t="n",m.v=Rs(m.v),m.w=Ln(m.z,m.v))):m.t="s";if(a)i[v]||(i[v]=[]),i[v][p]&&i[v][p].z&&(m.z=i[v][p].z),i[v][p]=m;else{var x=ft({c:p,r:v});i[x]&&i[x].z&&(m.z=i[x].z),i[x]=m}}}return u.s.c<1e7&&(i["!ref"]=Tt(u)),i}function ud(e,t){return t6(null,e,t)}function zZ(e){return e.read_shift(4,"i")}function xs(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function VZ(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function tj(e,t){var r=e.l,n=e.read_shift(1),a=xs(e),i=[],o={t:a,h:a};if(n&1){for(var l=e.read_shift(4),c=0;c!=l;++c)i.push(VZ(e));o.r=i}else o.r=[{ich:0,ifnt:0}];return e.l=r+t,o}var HZ=tj;function Un(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function dc(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}var WZ=xs;function rj(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}var GZ=xs,V1=rj;function sj(e){var t=e.slice(e.l,e.l+4),r=t[0]&1,n=t[0]&2;e.l+=4;var a=n===0?nx([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):fl(t,0)>>2;return r?a/100:a}function r6(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}var fc=r6;function ms(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function KZ(e){var t={},r=e.read_shift(1),n=r>>>1,a=e.read_shift(1),i=e.read_shift(2,"i"),o=e.read_shift(1),l=e.read_shift(1),c=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=a;var u=Ol[a];u&&(t.rgb=ih(u));break;case 2:t.rgb=ih([o,l,c]);break;case 3:t.theme=a;break}return i!=0&&(t.tint=i>0?i/32767:i/32768),t}function YZ(e){var t=e.read_shift(1);e.l++;var r={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return r}function s6(e,t){var r={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"},n=e.read_shift(4);switch(n){case 0:return"";case 4294967295:case 4294967294:return r[e.read_shift(4)]||""}if(n>400)throw new Error("Unsupported Clipboard: "+n.toString(16));return e.l-=4,e.read_shift(0,t==1?"lpstr":"lpwstr")}function XZ(e){return s6(e,1)}function QZ(e){return s6(e,2)}var nj=2,Bs=3,Cm=11,AC=12,ax=19,Sm=64,JZ=65,ZZ=71,eee=4108,tee=4126,qr=80,n6=81,ree=[qr,n6],see={1:{n:"CodePage",t:nj},2:{n:"Category",t:qr},3:{n:"PresentationFormat",t:qr},4:{n:"ByteCount",t:Bs},5:{n:"LineCount",t:Bs},6:{n:"ParagraphCount",t:Bs},7:{n:"SlideCount",t:Bs},8:{n:"NoteCount",t:Bs},9:{n:"HiddenCount",t:Bs},10:{n:"MultimediaClipCount",t:Bs},11:{n:"ScaleCrop",t:Cm},12:{n:"HeadingPairs",t:eee},13:{n:"TitlesOfParts",t:tee},14:{n:"Manager",t:qr},15:{n:"Company",t:qr},16:{n:"LinksUpToDate",t:Cm},17:{n:"CharacterCount",t:Bs},19:{n:"SharedDoc",t:Cm},22:{n:"HyperlinksChanged",t:Cm},23:{n:"AppVersion",t:Bs,p:"version"},24:{n:"DigSig",t:JZ},26:{n:"ContentType",t:qr},27:{n:"ContentStatus",t:qr},28:{n:"Language",t:qr},29:{n:"Version",t:qr},255:{},2147483648:{n:"Locale",t:ax},2147483651:{n:"Behavior",t:ax},1919054434:{}},nee={1:{n:"CodePage",t:nj},2:{n:"Title",t:qr},3:{n:"Subject",t:qr},4:{n:"Author",t:qr},5:{n:"Keywords",t:qr},6:{n:"Comments",t:qr},7:{n:"Template",t:qr},8:{n:"LastAuthor",t:qr},9:{n:"RevNumber",t:qr},10:{n:"EditTime",t:Sm},11:{n:"LastPrinted",t:Sm},12:{n:"CreatedDate",t:Sm},13:{n:"ModifiedDate",t:Sm},14:{n:"PageCount",t:Bs},15:{n:"WordCount",t:Bs},16:{n:"CharCount",t:Bs},17:{n:"Thumbnail",t:ZZ},18:{n:"Application",t:qr},19:{n:"DocSecurity",t:Bs},255:{},2147483648:{n:"Locale",t:ax},2147483651:{n:"Behavior",t:ax},1919054434:{}},RC={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},aee=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function iee(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var oee=iee([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Ol=es(oee),hc={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},a6={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},DC={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};function lee(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function cee(e){var t=lee();if(!e||!e.match)return t;var r={};if((e.match(ys)||[]).forEach(function(n){var a=ut(n);switch(a[0].replace(gZ,"<")){case"<?xml":break;case"<Types":t.xmlns=a["xmlns"+(a[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":r[a.Extension]=a.ContentType;break;case"<Override":t[DC[a.ContentType]]!==void 0&&t[DC[a.ContentType]].push(a.PartName);break}}),t.xmlns!==kZ.CT)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=r,delete t.calcchains,t}var Wc={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function H1(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function ff(e,t){var r={"!id":{}};if(!e)return r;t.charAt(0)!=="/"&&(t="/"+t);var n={};return(e.match(ys)||[]).forEach(function(a){var i=ut(a);if(i[0]==="<Relationship"){var o={};o.Type=i.Type,o.Target=i.Target,o.Id=i.Id,i.TargetMode&&(o.TargetMode=i.TargetMode);var l=i.TargetMode==="External"?i.Target:qd(i.Target,t);r[l]=o,n[i.Id]=o}}),r["!id"]=n,r}var uee="application/vnd.oasis.opendocument.spreadsheet";function dee(e,t){for(var r=Qw(e),n,a;n=nh.exec(r);)switch(n[3]){case"manifest":break;case"file-entry":if(a=ut(n[0],!1),a.path=="/"&&a.type!==uee)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw n}}var hf=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],fee=function(){for(var e=new Array(hf.length),t=0;t<hf.length;++t){var r=hf[t],n="(?:"+r[0].slice(0,r[0].indexOf(":"))+":)"+r[0].slice(r[0].indexOf(":")+1);e[t]=new RegExp("<"+n+"[^>]*>([\\s\\S]*?)</"+n+">")}return e}();function i6(e){var t={};e=Kt(e);for(var r=0;r<hf.length;++r){var n=hf[r],a=e.match(fee[r]);a!=null&&a.length>0&&(t[n[1]]=Rt(a[1])),n[2]==="date"&&t[n[1]]&&(t[n[1]]=Gr(t[n[1]]))}return t}var hee=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function o6(e,t,r,n){var a=[];if(typeof e=="string")a=jC(e,n);else for(var i=0;i<e.length;++i)a=a.concat(e[i].map(function(d){return{v:d}}));var o=typeof t=="string"?jC(t,n).map(function(d){return d.v}):t,l=0,c=0;if(o.length>0)for(var u=0;u!==a.length;u+=2){switch(c=+a[u+1].v,a[u].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":r.Worksheets=c,r.SheetNames=o.slice(l,l+c);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":r.NamedRanges=c,r.DefinedNames=o.slice(l,l+c);break;case"Charts":case"Diagramme":r.Chartsheets=c,r.ChartNames=o.slice(l,l+c);break}l+=c}}function mee(e,t,r){var n={};return t||(t={}),e=Kt(e),hee.forEach(function(a){var i=(e.match(sh(a[0]))||[])[1];switch(a[2]){case"string":i&&(t[a[1]]=Rt(i));break;case"bool":t[a[1]]=i==="true";break;case"raw":var o=e.match(new RegExp("<"+a[0]+"[^>]*>([\\s\\S]*?)</"+a[0]+">"));o&&o.length>0&&(n[a[1]]=o[1]);break}}),n.HeadingPairs&&n.TitlesOfParts&&o6(n.HeadingPairs,n.TitlesOfParts,t,r),t}var pee=/<[^>]+>[^<]*/g;function xee(e,t){var r={},n="",a=e.match(pee);if(a)for(var i=0;i!=a.length;++i){var o=a[i],l=ut(o);switch(l[0]){case"<?xml":break;case"<Properties":break;case"<property":n=Rt(l.name);break;case"</property>":n=null;break;default:if(o.indexOf("<vt:")===0){var c=o.split(">"),u=c[0].slice(4),d=c[1];switch(u){case"lpstr":case"bstr":case"lpwstr":r[n]=Rt(d);break;case"bool":r[n]=Jt(d);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":r[n]=parseInt(d,10);break;case"r4":case"r8":case"decimal":r[n]=parseFloat(d);break;case"filetime":case"date":r[n]=Gr(d);break;case"cy":case"error":r[n]=Rt(d);break;default:if(u.slice(-1)=="/")break;t.WTF&&typeof console<"u"&&console.warn("Unexpected",o,u,c)}}else if(o.slice(0,2)!=="</"){if(t.WTF)throw new Error(o)}}}return r}var gee={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"},Dg;function vee(e,t,r){Dg||(Dg=Kw(gee)),t=Dg[t]||t,e[t]=r}function aj(e){var t=e.read_shift(4),r=e.read_shift(4);return new Date((r/1e7*Math.pow(2,32)+t/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function l6(e,t,r){var n=e.l,a=e.read_shift(0,"lpstr-cp");if(r)for(;e.l-n&3;)++e.l;return a}function c6(e,t,r){var n=e.read_shift(0,"lpwstr");return n}function u6(e,t,r){return t===31?c6(e):l6(e,t,r)}function W1(e,t,r){return u6(e,t,r===!1?0:4)}function yee(e,t){if(!t)throw new Error("VtUnalignedString must have positive length");return u6(e,t,0)}function bee(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n){var a=e.l;r[n]=e.read_shift(0,"lpwstr").replace(As,""),e.l-a&2&&(e.l+=2)}return r}function wee(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n)r[n]=e.read_shift(0,"lpstr-cp").replace(As,"");return r}function jee(e){var t=e.l,r=ix(e,n6);e[e.l]==0&&e[e.l+1]==0&&e.l-t&2&&(e.l+=2);var n=ix(e,Bs);return[r,n]}function Nee(e){for(var t=e.read_shift(4),r=[],n=0;n<t/2;++n)r.push(jee(e));return r}function OC(e,t){for(var r=e.read_shift(4),n={},a=0;a!=r;++a){var i=e.read_shift(4),o=e.read_shift(4);n[i]=e.read_shift(o,t===1200?"utf16le":"utf8").replace(As,"").replace($d,"!"),t===1200&&o%2&&(e.l+=2)}return e.l&3&&(e.l=e.l>>3<<2),n}function d6(e){var t=e.read_shift(4),r=e.slice(e.l,e.l+t);return e.l+=t,(t&3)>0&&(e.l+=4-(t&3)&3),r}function _ee(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}function ix(e,t,r){var n=e.read_shift(2),a,i=r||{};if(e.l+=2,t!==AC&&n!==t&&ree.indexOf(t)===-1&&!((t&65534)==4126&&(n&65534)==4126))throw new Error("Expected type "+t+" saw "+n);switch(t===AC?n:t){case 2:return a=e.read_shift(2,"i"),i.raw||(e.l+=2),a;case 3:return a=e.read_shift(4,"i"),a;case 11:return e.read_shift(4)!==0;case 19:return a=e.read_shift(4),a;case 30:return l6(e,n,4).replace(As,"");case 31:return c6(e);case 64:return aj(e);case 65:return d6(e);case 71:return _ee(e);case 80:return W1(e,n,!i.raw).replace(As,"");case 81:return yee(e,n).replace(As,"");case 4108:return Nee(e);case 4126:case 4127:return n==4127?bee(e):wee(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+n)}}function PC(e,t){var r=e.l,n=e.read_shift(4),a=e.read_shift(4),i=[],o=0,l=0,c=-1,u={};for(o=0;o!=a;++o){var d=e.read_shift(4),f=e.read_shift(4);i[o]=[d,f+r]}i.sort(function(y,b){return y[1]-b[1]});var h={};for(o=0;o!=a;++o){if(e.l!==i[o][1]){var m=!0;if(o>0&&t)switch(t[i[o-1][0]].t){case 2:e.l+2===i[o][1]&&(e.l+=2,m=!1);break;case 80:e.l<=i[o][1]&&(e.l=i[o][1],m=!1);break;case 4108:e.l<=i[o][1]&&(e.l=i[o][1],m=!1);break}if((!t||o==0)&&e.l<=i[o][1]&&(m=!1,e.l=i[o][1]),m)throw new Error("Read Error: Expected address "+i[o][1]+" at "+e.l+" :"+o)}if(t){var v=t[i[o][0]];if(h[v.n]=ix(e,v.t,{raw:!0}),v.p==="version"&&(h[v.n]=String(h[v.n]>>16)+"."+("0000"+String(h[v.n]&65535)).slice(-4)),v.n=="CodePage")switch(h[v.n]){case 0:h[v.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:la(l=h[v.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+h[v.n])}}else if(i[o][0]===1){if(l=h.CodePage=ix(e,nj),la(l),c!==-1){var p=e.l;e.l=i[c][1],u=OC(e,l),e.l=p}}else if(i[o][0]===0){if(l===0){c=o,e.l=i[o+1][1];continue}u=OC(e,l)}else{var x=u[i[o][0]],w;switch(e[e.l]){case 65:e.l+=4,w=d6(e);break;case 30:e.l+=4,w=W1(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4,w=W1(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,w=e.read_shift(4,"i");break;case 19:e.l+=4,w=e.read_shift(4);break;case 5:e.l+=4,w=e.read_shift(8,"f");break;case 11:e.l+=4,w=mr(e,4);break;case 64:e.l+=4,w=Gr(aj(e));break;default:throw new Error("unparsed value: "+e[e.l])}h[x]=w}}return e.l=r+n,h}function IC(e,t,r){var n=e.content;if(!n)return{};Jr(n,0);var a,i,o,l,c=0;n.chk("feff","Byte Order: "),n.read_shift(2);var u=n.read_shift(4),d=n.read_shift(16);if(d!==kt.utils.consts.HEADER_CLSID&&d!==r)throw new Error("Bad PropertySet CLSID "+d);if(a=n.read_shift(4),a!==1&&a!==2)throw new Error("Unrecognized #Sets: "+a);if(i=n.read_shift(16),l=n.read_shift(4),a===1&&l!==n.l)throw new Error("Length mismatch: "+l+" !== "+n.l);a===2&&(o=n.read_shift(16),c=n.read_shift(4));var f=PC(n,t),h={SystemIdentifier:u};for(var m in f)h[m]=f[m];if(h.FMTID=i,a===1)return h;if(c-n.l==2&&(n.l+=2),n.l!==c)throw new Error("Length mismatch 2: "+n.l+" !== "+c);var v;try{v=PC(n,null)}catch{}for(m in v)h[m]=v[m];return h.FMTID=[i,o],h}function Wi(e,t){return e.read_shift(t),null}function Cee(e,t,r){for(var n=[],a=e.l+t;e.l<a;)n.push(r(e,a-e.l));if(a!==e.l)throw new Error("Slurp error");return n}function mr(e,t){return e.read_shift(t)===1}function jr(e){return e.read_shift(2,"u")}function f6(e,t){return Cee(e,t,jr)}function See(e){var t=e.read_shift(1),r=e.read_shift(1);return r===1?t:t===1}function Oh(e,t,r){var n=e.read_shift(r&&r.biff>=12?2:1),a="sbcs-cont";if(r&&r.biff>=8,!r||r.biff==8){var i=e.read_shift(1);i&&(a="dbcs-cont")}else r.biff==12&&(a="wstr");r.biff>=2&&r.biff<=5&&(a="cpstr");var o=n?e.read_shift(n,a):"";return o}function Eee(e){var t=e.read_shift(2),r=e.read_shift(1),n=r&4,a=r&8,i=1+(r&1),o=0,l,c={};a&&(o=e.read_shift(2)),n&&(l=e.read_shift(4));var u=i==2?"dbcs-cont":"sbcs-cont",d=t===0?"":e.read_shift(t,u);return a&&(e.l+=4*o),n&&(e.l+=l),c.t=d,a||(c.raw="<t>"+c.t+"</t>",c.r=c.t),c}function ec(e,t,r){var n;if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}var a=e.read_shift(1);return a===0?n=e.read_shift(t,"sbcs-cont"):n=e.read_shift(t,"dbcs-cont"),n}function Ph(e,t,r){var n=e.read_shift(r&&r.biff==2?1:2);return n===0?(e.l++,""):ec(e,n,r)}function mc(e,t,r){if(r.biff>5)return Ph(e,t,r);var n=e.read_shift(1);return n===0?(e.l++,""):e.read_shift(n,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function kee(e){var t=e.read_shift(1);e.l++;var r=e.read_shift(2);return e.l+=2,[t,r]}function Tee(e){var t=e.read_shift(4),r=e.l,n=!1;t>24&&(e.l+=t-24,e.read_shift(16)==="795881f43b1d7f48af2c825dc4852763"&&(n=!0),e.l=r);var a=e.read_shift((n?t-24:t)>>1,"utf16le").replace(As,"");return n&&(e.l+=24),a}function Aee(e){for(var t=e.read_shift(2),r="";t-- >0;)r+="../";var n=e.read_shift(0,"lpstr-ansi");if(e.l+=2,e.read_shift(2)!=57005)throw new Error("Bad FileMoniker");var a=e.read_shift(4);if(a===0)return r+n.replace(/\\/g,"/");var i=e.read_shift(4);if(e.read_shift(2)!=3)throw new Error("Bad FileMoniker");var o=e.read_shift(i>>1,"utf16le").replace(As,"");return r+o}function Ree(e,t){var r=e.read_shift(16);switch(r){case"e0c9ea79f9bace118c8200aa004ba90b":return Tee(e);case"0303000000000000c000000000000046":return Aee(e);default:throw new Error("Unsupported Moniker "+r)}}function Em(e){var t=e.read_shift(4),r=t>0?e.read_shift(t,"utf16le").replace(As,""):"";return r}function Dee(e,t){var r=e.l+t,n=e.read_shift(4);if(n!==2)throw new Error("Unrecognized streamVersion: "+n);var a=e.read_shift(2);e.l+=2;var i,o,l,c,u="",d,f;a&16&&(i=Em(e,r-e.l)),a&128&&(o=Em(e,r-e.l)),(a&257)===257&&(l=Em(e,r-e.l)),(a&257)===1&&(c=Ree(e,r-e.l)),a&8&&(u=Em(e,r-e.l)),a&32&&(d=e.read_shift(16)),a&64&&(f=aj(e)),e.l=r;var h=o||l||c||"";h&&u&&(h+="#"+u),h||(h="#"+u),a&2&&h.charAt(0)=="/"&&h.charAt(1)!="/"&&(h="file://"+h);var m={Target:h};return d&&(m.guid=d),f&&(m.time=f),i&&(m.Tooltip=i),m}function h6(e){var t=e.read_shift(1),r=e.read_shift(1),n=e.read_shift(1),a=e.read_shift(1);return[t,r,n,a]}function m6(e,t){var r=h6(e);return r[3]=0,r}function Xa(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return{r:t,c:r,ixfe:n}}function Oee(e){var t=e.read_shift(2),r=e.read_shift(2);return e.l+=8,{type:t,flags:r}}function Pee(e,t,r){return t===0?"":mc(e,t,r)}function Iee(e,t,r){var n=r.biff>8?4:2,a=e.read_shift(n),i=e.read_shift(n,"i"),o=e.read_shift(n,"i");return[a,i,o]}function p6(e){var t=e.read_shift(2),r=sj(e);return[t,r]}function Fee(e,t,r){e.l+=4,t-=4;var n=e.l+t,a=Oh(e,t,r),i=e.read_shift(2);if(n-=e.l,i!==n)throw new Error("Malformed AddinUdf: padding = "+n+" != "+i);return e.l+=i,a}function b0(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),a=e.read_shift(2);return{s:{c:n,r:t},e:{c:a,r}}}function x6(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(1),a=e.read_shift(1);return{s:{c:n,r:t},e:{c:a,r}}}var Lee=x6;function g6(e){e.l+=4;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return e.l+=12,[r,t,n]}function Mee(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t}function Bee(e){var t={};return e.l+=4,e.cf=e.read_shift(2),t}function os(e){e.l+=2,e.l+=e.read_shift(2)}var Uee={0:os,4:os,5:os,6:os,7:Bee,8:os,9:os,10:os,11:os,12:os,13:Mee,14:os,15:os,16:os,17:os,18:os,19:os,20:os,21:g6};function $ee(e,t){for(var r=e.l+t,n=[];e.l<r;){var a=e.read_shift(2);e.l-=2;try{n.push(Uee[a](e,r-e.l))}catch{return e.l=r,n}}return e.l!=r&&(e.l=r),n}function km(e,t){var r={BIFFVer:0,dt:0};switch(r.BIFFVer=e.read_shift(2),t-=2,t>=2&&(r.dt=e.read_shift(2),e.l-=2),r.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(t>6)throw new Error("Unexpected BIFF Ver "+r.BIFFVer)}return e.read_shift(t),r}function qee(e,t){return t===0||e.read_shift(2),1200}function zee(e,t,r){if(r.enc)return e.l+=t,"";var n=e.l,a=mc(e,0,r);return e.read_shift(t+n-e.l),a}function Vee(e,t,r){var n=r&&r.biff==8||t==2?e.read_shift(2):(e.l+=t,0);return{fDialog:n&16,fBelow:n&64,fRight:n&128}}function Hee(e,t,r){var n=e.read_shift(4),a=e.read_shift(1)&3,i=e.read_shift(1);switch(i){case 0:i="Worksheet";break;case 1:i="Macrosheet";break;case 2:i="Chartsheet";break;case 6:i="VBAModule";break}var o=Oh(e,0,r);return o.length===0&&(o="Sheet1"),{pos:n,hs:a,dt:i,name:o}}function Wee(e,t){for(var r=e.l+t,n=e.read_shift(4),a=e.read_shift(4),i=[],o=0;o!=a&&e.l<r;++o)i.push(Eee(e));return i.Count=n,i.Unique=a,i}function Gee(e,t){var r={};return r.dsst=e.read_shift(2),e.l+=t-2,r}function Kee(e){var t={};t.r=e.read_shift(2),t.c=e.read_shift(2),t.cnt=e.read_shift(2)-t.c;var r=e.read_shift(2);e.l+=4;var n=e.read_shift(1);return e.l+=3,n&7&&(t.level=n&7),n&32&&(t.hidden=!0),n&64&&(t.hpt=r/20),t}function Yee(e){var t=Oee(e);if(t.type!=2211)throw new Error("Invalid Future Record "+t.type);var r=e.read_shift(4);return r!==0}function Xee(e){return e.read_shift(2),e.read_shift(4)}function FC(e,t,r){var n=0;r&&r.biff==2||(n=e.read_shift(2));var a=e.read_shift(2);r&&r.biff==2&&(n=1-(a>>15),a&=32767);var i={Unsynced:n&1,DyZero:(n&2)>>1,ExAsc:(n&4)>>2,ExDsc:(n&8)>>3};return[i,a]}function Qee(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2),o=e.read_shift(2),l=e.read_shift(2),c=e.read_shift(2),u=e.read_shift(2);return{Pos:[t,r],Dim:[n,a],Flags:i,CurTab:o,FirstTab:l,Selected:c,TabRatio:u}}function Jee(e,t,r){if(r&&r.biff>=2&&r.biff<5)return{};var n=e.read_shift(2);return{RTL:n&64}}function Zee(){}function ete(e,t,r){var n={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(r&&r.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10;break}return n.name=Oh(e,0,r),n}function tte(e){var t=Xa(e);return t.isst=e.read_shift(4),t}function rte(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=e.l+t,a=Xa(e);r.biff==2&&e.l++;var i=Ph(e,n-e.l,r);return a.val=i,a}function ste(e,t,r){var n=e.read_shift(2),a=mc(e,0,r);return[n,a]}var nte=mc;function LC(e,t,r){var n=e.l+t,a=r.biff==8||!r.biff?4:2,i=e.read_shift(a),o=e.read_shift(a),l=e.read_shift(2),c=e.read_shift(2);return e.l=n,{s:{r:i,c:l},e:{r:o,c}}}function ate(e){var t=e.read_shift(2),r=e.read_shift(2),n=p6(e);return{r:t,c:r,ixfe:n[0],rknum:n[1]}}function ite(e,t){for(var r=e.l+t-2,n=e.read_shift(2),a=e.read_shift(2),i=[];e.l<r;)i.push(p6(e));if(e.l!==r)throw new Error("MulRK read error");var o=e.read_shift(2);if(i.length!=o-a+1)throw new Error("MulRK length mismatch");return{r:n,c:a,C:o,rkrec:i}}function ote(e,t){for(var r=e.l+t-2,n=e.read_shift(2),a=e.read_shift(2),i=[];e.l<r;)i.push(e.read_shift(2));if(e.l!==r)throw new Error("MulBlank read error");var o=e.read_shift(2);if(i.length!=o-a+1)throw new Error("MulBlank length mismatch");return{r:n,c:a,C:o,ixfe:i}}function lte(e,t,r,n){var a={},i=e.read_shift(4),o=e.read_shift(4),l=e.read_shift(4),c=e.read_shift(2);return a.patternType=aee[l>>26],n.cellStyles&&(a.alc=i&7,a.fWrap=i>>3&1,a.alcV=i>>4&7,a.fJustLast=i>>7&1,a.trot=i>>8&255,a.cIndent=i>>16&15,a.fShrinkToFit=i>>20&1,a.iReadOrder=i>>22&2,a.fAtrNum=i>>26&1,a.fAtrFnt=i>>27&1,a.fAtrAlc=i>>28&1,a.fAtrBdr=i>>29&1,a.fAtrPat=i>>30&1,a.fAtrProt=i>>31&1,a.dgLeft=o&15,a.dgRight=o>>4&15,a.dgTop=o>>8&15,a.dgBottom=o>>12&15,a.icvLeft=o>>16&127,a.icvRight=o>>23&127,a.grbitDiag=o>>30&3,a.icvTop=l&127,a.icvBottom=l>>7&127,a.icvDiag=l>>14&127,a.dgDiag=l>>21&15,a.icvFore=c&127,a.icvBack=c>>7&127,a.fsxButton=c>>14&1),a}function cte(e,t,r){var n={};return n.ifnt=e.read_shift(2),n.numFmtId=e.read_shift(2),n.flags=e.read_shift(2),n.fStyle=n.flags>>2&1,t-=6,n.data=lte(e,t,n.fStyle,r),n}function ute(e){e.l+=4;var t=[e.read_shift(2),e.read_shift(2)];if(t[0]!==0&&t[0]--,t[1]!==0&&t[1]--,t[0]>7||t[1]>7)throw new Error("Bad Gutters: "+t.join("|"));return t}function MC(e,t,r){var n=Xa(e);(r.biff==2||t==9)&&++e.l;var a=See(e);return n.val=a,n.t=a===!0||a===!1?"b":"e",n}function dte(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=Xa(e),a=ms(e);return n.val=a,n}var BC=Pee;function fte(e,t,r){var n=e.l+t,a=e.read_shift(2),i=e.read_shift(2);if(r.sbcch=i,i==1025||i==14849)return[i,a];if(i<1||i>255)throw new Error("Unexpected SupBook type: "+i);for(var o=ec(e,i),l=[];n>e.l;)l.push(Ph(e));return[i,a,o,l]}function UC(e,t,r){var n=e.read_shift(2),a,i={fBuiltIn:n&1,fWantAdvise:n>>>1&1,fWantPict:n>>>2&1,fOle:n>>>3&1,fOleLink:n>>>4&1,cf:n>>>5&1023,fIcon:n>>>15&1};return r.sbcch===14849&&(a=Fee(e,t-2,r)),i.body=a||e.read_shift(t-2),typeof a=="string"&&(i.Name=a),i}var hte=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function $C(e,t,r){var n=e.l+t,a=e.read_shift(2),i=e.read_shift(1),o=e.read_shift(1),l=e.read_shift(r&&r.biff==2?1:2),c=0;(!r||r.biff>=5)&&(r.biff!=5&&(e.l+=2),c=e.read_shift(2),r.biff==5&&(e.l+=2),e.l+=4);var u=ec(e,o,r);a&32&&(u=hte[u.charCodeAt(0)]);var d=n-e.l;r&&r.biff==2&&--d;var f=n==e.l||l===0||!(d>0)?[]:Kne(e,d,r,l);return{chKey:i,Name:u,itab:c,rgce:f}}function v6(e,t,r){if(r.biff<8)return mte(e,t,r);for(var n=[],a=e.l+t,i=e.read_shift(r.biff>8?4:2);i--!==0;)n.push(Iee(e,r.biff>8?12:6,r));if(e.l!=a)throw new Error("Bad ExternSheet: "+e.l+" != "+a);return n}function mte(e,t,r){e[e.l+1]==3&&e[e.l]++;var n=Oh(e,t,r);return n.charCodeAt(0)==3?n.slice(1):n}function pte(e,t,r){if(r.biff<8){e.l+=t;return}var n=e.read_shift(2),a=e.read_shift(2),i=ec(e,n,r),o=ec(e,a,r);return[i,o]}function xte(e,t,r){var n=x6(e);e.l++;var a=e.read_shift(1);return t-=8,[Yne(e,t,r),a,n]}function qC(e,t,r){var n=Lee(e);switch(r.biff){case 2:e.l++,t-=7;break;case 3:case 4:e.l+=2,t-=8;break;default:e.l+=6,t-=12}return[n,Wne(e,t,r)]}function gte(e){var t=e.read_shift(4)!==0,r=e.read_shift(4)!==0,n=e.read_shift(4);return[t,r,n]}function vte(e,t,r){if(!(r.biff<8)){var n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2),o=e.read_shift(2),l=mc(e,0,r);return r.biff<8&&e.read_shift(1),[{r:n,c:a},l,o,i]}}function yte(e,t,r){return vte(e,t,r)}function bte(e,t){for(var r=[],n=e.read_shift(2);n--;)r.push(b0(e));return r}function wte(e,t,r){if(r&&r.biff<8)return Nte(e,t,r);var n=g6(e),a=$ee(e,t-22,n[1]);return{cmo:n,ft:a}}var jte={8:function(e,t){var r=e.l+t;e.l+=10;var n=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var a=e.read_shift(1);return e.l+=a,e.l=r,{fmt:n}}};function Nte(e,t,r){e.l+=4;var n=e.read_shift(2),a=e.read_shift(2),i=e.read_shift(2);e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=6,t-=36;var o=[];return o.push((jte[n]||vs)(e,t,r)),{cmo:[a,n,i],ft:o}}function _te(e,t,r){var n=e.l,a="";try{e.l+=4;var i=(r.lastobj||{cmo:[0,0]}).cmo[1],o;[0,5,7,11,12,14].indexOf(i)==-1?e.l+=6:o=kee(e,6,r);var l=e.read_shift(2);e.read_shift(2),jr(e,2);var c=e.read_shift(2);e.l+=c;for(var u=1;u<e.lens.length-1;++u){if(e.l-n!=e.lens[u])throw new Error("TxO: bad continue record");var d=e[e.l],f=ec(e,e.lens[u+1]-e.lens[u]-1);if(a+=f,a.length>=(d?l:2*l))break}if(a.length!==l&&a.length!==l*2)throw new Error("cchText: "+l+" != "+a.length);return e.l=n+t,{t:a}}catch{return e.l=n+t,{t:a}}}function Cte(e,t){var r=b0(e);e.l+=16;var n=Dee(e,t-24);return[r,n]}function Ste(e,t){e.read_shift(2);var r=b0(e),n=e.read_shift((t-10)/2,"dbcs-cont");return n=n.replace(As,""),[r,n]}function Ete(e){var t=[0,0],r;return r=e.read_shift(2),t[0]=RC[r]||r,r=e.read_shift(2),t[1]=RC[r]||r,t}function kte(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(m6(e));return r}function Tte(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(m6(e));return r}function Ate(e){e.l+=2;var t={cxfs:0,crc:0};return t.cxfs=e.read_shift(2),t.crc=e.read_shift(4),t}function y6(e,t,r){if(!r.cellStyles)return vs(e,t);var n=r&&r.biff>=12?4:2,a=e.read_shift(n),i=e.read_shift(n),o=e.read_shift(n),l=e.read_shift(n),c=e.read_shift(2);n==2&&(e.l+=2);var u={s:a,e:i,w:o,ixfe:l,flags:c};return(r.biff>=5||!r.biff)&&(u.level=c>>8&7),u}function Rte(e,t){var r={};return t<32||(e.l+=16,r.header=ms(e),r.footer=ms(e),e.l+=2),r}function Dte(e,t,r){var n={area:!1};if(r.biff!=5)return e.l+=t,n;var a=e.read_shift(1);return e.l+=3,a&16&&(n.area=!0),n}var Ote=Xa,Pte=f6,Ite=Ph;function Fte(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),a={fmt:t,env:r,len:n,data:e.slice(e.l,e.l+n)};return e.l+=n,a}function Lte(e,t,r){r.biffguess&&r.biff==5&&(r.biff=2);var n=Xa(e);++e.l;var a=mc(e,t-7,r);return n.t="str",n.val=a,n}function Mte(e){var t=Xa(e);++e.l;var r=ms(e);return t.t="n",t.val=r,t}function Bte(e){var t=Xa(e);++e.l;var r=e.read_shift(2);return t.t="n",t.val=r,t}function Ute(e){var t=e.read_shift(1);return t===0?(e.l++,""):e.read_shift(t,"sbcs-cont")}function $te(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}function qte(e,t,r){var n=e.l+t,a=Xa(e),i=e.read_shift(2),o=ec(e,i,r);return e.l=n,a.t="str",a.val=o,a}var zte=[2,3,48,49,131,139,140,245],zC=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=Kw({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(l,c){var u=[],d=Vo(1);switch(c.type){case"base64":d=na(mn(l));break;case"binary":d=na(l);break;case"buffer":case"array":d=l;break}Jr(d,0);var f=d.read_shift(1),h=!!(f&136),m=!1,v=!1;switch(f){case 2:break;case 3:break;case 48:m=!0,h=!0;break;case 49:m=!0,h=!0;break;case 131:break;case 139:break;case 140:v=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+f.toString(16))}var p=0,x=521;f==2&&(p=d.read_shift(2)),d.l+=3,f!=2&&(p=d.read_shift(4)),p>1048576&&(p=1e6),f!=2&&(x=d.read_shift(2));var w=d.read_shift(2),y=c.codepage||1252;f!=2&&(d.l+=16,d.read_shift(1),d[d.l]!==0&&(y=e[d[d.l]]),d.l+=1,d.l+=2),v&&(d.l+=36);for(var b=[],N={},C=Math.min(d.length,f==2?521:x-10-(m?264:0)),_=v?32:11;d.l<C&&d[d.l]!=13;)switch(N={},N.name=th.utils.decode(y,d.slice(d.l,d.l+_)).replace(/[\u0000\r\n].*$/g,""),d.l+=_,N.type=String.fromCharCode(d.read_shift(1)),f!=2&&!v&&(N.offset=d.read_shift(4)),N.len=d.read_shift(1),f==2&&(N.offset=d.read_shift(2)),N.dec=d.read_shift(1),N.name.length&&b.push(N),f!=2&&(d.l+=v?13:14),N.type){case"B":(!m||N.len!=8)&&c.WTF&&console.log("Skipping "+N.name+":"+N.type);break;case"G":case"P":c.WTF&&console.log("Skipping "+N.name+":"+N.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+N.type)}if(d[d.l]!==13&&(d.l=x-1),d.read_shift(1)!==13)throw new Error("DBF Terminator not found "+d.l+" "+d[d.l]);d.l=x;var j=0,S=0;for(u[0]=[],S=0;S!=b.length;++S)u[0][S]=b[S].name;for(;p-- >0;){if(d[d.l]===42){d.l+=w;continue}for(++d.l,u[++j]=[],S=0,S=0;S!=b.length;++S){var k=d.slice(d.l,d.l+b[S].len);d.l+=b[S].len,Jr(k,0);var D=th.utils.decode(y,k);switch(b[S].type){case"C":D.trim().length&&(u[j][S]=D.replace(/\s+$/,""));break;case"D":D.length===8?u[j][S]=new Date(+D.slice(0,4),+D.slice(4,6)-1,+D.slice(6,8)):u[j][S]=D;break;case"F":u[j][S]=parseFloat(D.trim());break;case"+":case"I":u[j][S]=v?k.read_shift(-4,"i")^2147483648:k.read_shift(4,"i");break;case"L":switch(D.trim().toUpperCase()){case"Y":case"T":u[j][S]=!0;break;case"N":case"F":u[j][S]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+D+"|")}break;case"M":if(!h)throw new Error("DBF Unexpected MEMO for type "+f.toString(16));u[j][S]="##MEMO##"+(v?parseInt(D.trim(),10):k.read_shift(4));break;case"N":D=D.replace(/\u0000/g,"").trim(),D&&D!="."&&(u[j][S]=+D||0);break;case"@":u[j][S]=new Date(k.read_shift(-8,"f")-621356832e5);break;case"T":u[j][S]=new Date((k.read_shift(4)-2440588)*864e5+k.read_shift(4));break;case"Y":u[j][S]=k.read_shift(4,"i")/1e4+k.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":u[j][S]=-k.read_shift(-8,"f");break;case"B":if(m&&b[S].len==8){u[j][S]=k.read_shift(8,"f");break}case"G":case"P":k.l+=b[S].len;break;case"0":if(b[S].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+b[S].type)}}}if(f!=2&&d.l<d.length&&d[d.l++]!=26)throw new Error("DBF EOF Marker missing "+(d.l-1)+" of "+d.length+" "+d[d.l-1].toString(16));return c&&c.sheetRows&&(u=u.slice(0,c.sheetRows)),c.DBF=b,u}function n(l,c){var u=c||{};u.dateNF||(u.dateNF="yyyymmdd");var d=ud(r(l,u),u);return d["!cols"]=u.DBF.map(function(f){return{wch:f.len,DBF:f}}),delete u.DBF,d}function a(l,c){try{return el(n(l,c),c)}catch(u){if(c&&c.WTF)throw u}return{SheetNames:[],Sheets:{}}}var i={B:8,C:250,L:1,D:8,"?":0,"":0};function o(l,c){var u=c||{};if(+u.codepage>=0&&la(+u.codepage),u.type=="string")throw new Error("Cannot write DBF to JS string");var d=z1(),f=Z1(l,{header:1,raw:!0,cellDates:!0}),h=f[0],m=f.slice(1),v=l["!cols"]||[],p=0,x=0,w=0,y=1;for(p=0;p<h.length;++p){if(((v[p]||{}).DBF||{}).name){h[p]=v[p].DBF.name,++w;continue}if(h[p]!=null){if(++w,typeof h[p]=="number"&&(h[p]=h[p].toString(10)),typeof h[p]!="string")throw new Error("DBF Invalid column name "+h[p]+" |"+typeof h[p]+"|");if(h.indexOf(h[p])!==p){for(x=0;x<1024;++x)if(h.indexOf(h[p]+"_"+x)==-1){h[p]+="_"+x;break}}}}var b=hr(l["!ref"]),N=[],C=[],_=[];for(p=0;p<=b.e.c-b.s.c;++p){var j="",S="",k=0,D=[];for(x=0;x<m.length;++x)m[x][p]!=null&&D.push(m[x][p]);if(D.length==0||h[p]==null){N[p]="?";continue}for(x=0;x<D.length;++x){switch(typeof D[x]){case"number":S="B";break;case"string":S="C";break;case"boolean":S="L";break;case"object":S=D[x]instanceof Date?"D":"C";break;default:S="C"}k=Math.max(k,String(D[x]).length),j=j&&j!=S?"C":S}k>250&&(k=250),S=((v[p]||{}).DBF||{}).type,S=="C"&&v[p].DBF.len>k&&(k=v[p].DBF.len),j=="B"&&S=="N"&&(j="N",_[p]=v[p].DBF.dec,k=v[p].DBF.len),C[p]=j=="C"||S=="N"?k:i[j]||0,y+=C[p],N[p]=j}var M=d.next(32);for(M.write_shift(4,318902576),M.write_shift(4,m.length),M.write_shift(2,296+32*w),M.write_shift(2,y),p=0;p<4;++p)M.write_shift(4,0);for(M.write_shift(4,0|(+t[vP]||3)<<8),p=0,x=0;p<h.length;++p)if(h[p]!=null){var T=d.next(32),A=(h[p].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);T.write_shift(1,A,"sbcs"),T.write_shift(1,N[p]=="?"?"C":N[p],"sbcs"),T.write_shift(4,x),T.write_shift(1,C[p]||i[N[p]]||0),T.write_shift(1,_[p]||0),T.write_shift(1,2),T.write_shift(4,0),T.write_shift(1,0),T.write_shift(4,0),T.write_shift(4,0),x+=C[p]||i[N[p]]||0}var W=d.next(264);for(W.write_shift(4,13),p=0;p<65;++p)W.write_shift(4,0);for(p=0;p<m.length;++p){var P=d.next(y);for(P.write_shift(1,0),x=0;x<h.length;++x)if(h[x]!=null)switch(N[x]){case"L":P.write_shift(1,m[p][x]==null?63:m[p][x]?84:70);break;case"B":P.write_shift(8,m[p][x]||0,"f");break;case"N":var V="0";for(typeof m[p][x]=="number"&&(V=m[p][x].toFixed(_[x]||0)),w=0;w<C[x]-V.length;++w)P.write_shift(1,32);P.write_shift(1,V,"sbcs");break;case"D":m[p][x]?(P.write_shift(4,("0000"+m[p][x].getFullYear()).slice(-4),"sbcs"),P.write_shift(2,("00"+(m[p][x].getMonth()+1)).slice(-2),"sbcs"),P.write_shift(2,("00"+m[p][x].getDate()).slice(-2),"sbcs")):P.write_shift(8,"00000000","sbcs");break;case"C":var Z=String(m[p][x]!=null?m[p][x]:"").slice(0,C[x]);for(P.write_shift(1,Z,"sbcs"),w=0;w<C[x]-Z.length;++w)P.write_shift(1,32);break}}return d.next(1).write_shift(1,26),d.end()}return{to_workbook:a,to_sheet:n,from_sheet:o}}(),Vte=function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+Wa(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(h,m){var v=e[m];return typeof v=="number"?aC(v):v},n=function(h,m,v){var p=m.charCodeAt(0)-32<<4|v.charCodeAt(0)-48;return p==59?h:aC(p)};e["|"]=254;function a(h,m){switch(m.type){case"base64":return i(mn(h),m);case"binary":return i(h,m);case"buffer":return i(St&&Buffer.isBuffer(h)?h.toString("binary"):uc(h),m);case"array":return i(Zl(h),m)}throw new Error("Unrecognized type "+m.type)}function i(h,m){var v=h.split(/[\n\r]+/),p=-1,x=-1,w=0,y=0,b=[],N=[],C=null,_={},j=[],S=[],k=[],D=0,M;for(+m.codepage>=0&&la(+m.codepage);w!==v.length;++w){D=0;var T=v[w].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(t,r),A=T.replace(/;;/g,"\0").split(";").map(function(B){return B.replace(/\u0000/g,";")}),W=A[0],P;if(T.length>0)switch(W){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":A[1].charAt(0)=="P"&&N.push(T.slice(3).replace(/;;/g,";"));break;case"C":var V=!1,Z=!1,Q=!1,O=!1,ne=-1,he=-1;for(y=1;y<A.length;++y)switch(A[y].charAt(0)){case"A":break;case"X":x=parseInt(A[y].slice(1))-1,Z=!0;break;case"Y":for(p=parseInt(A[y].slice(1))-1,Z||(x=0),M=b.length;M<=p;++M)b[M]=[];break;case"K":P=A[y].slice(1),P.charAt(0)==='"'?P=P.slice(1,P.length-1):P==="TRUE"?P=!0:P==="FALSE"?P=!1:isNaN(ma(P))?isNaN($u(P).getDate())||(P=Gr(P)):(P=ma(P),C!==null&&ld(C)&&(P=y0(P))),V=!0;break;case"E":O=!0;var I=au(A[y].slice(1),{r:p,c:x});b[p][x]=[b[p][x],I];break;case"S":Q=!0,b[p][x]=[b[p][x],"S5S"];break;case"G":break;case"R":ne=parseInt(A[y].slice(1))-1;break;case"C":he=parseInt(A[y].slice(1))-1;break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+T)}if(V&&(b[p][x]&&b[p][x].length==2?b[p][x][0]=P:b[p][x]=P,C=null),Q){if(O)throw new Error("SYLK shared formula cannot have own formula");var Y=ne>-1&&b[ne][he];if(!Y||!Y[1])throw new Error("SYLK shared formula cannot find base");b[p][x][1]=T6(Y[1],{r:p-ne,c:x-he})}break;case"F":var E=0;for(y=1;y<A.length;++y)switch(A[y].charAt(0)){case"X":x=parseInt(A[y].slice(1))-1,++E;break;case"Y":for(p=parseInt(A[y].slice(1))-1,M=b.length;M<=p;++M)b[M]=[];break;case"M":D=parseInt(A[y].slice(1))/20;break;case"F":break;case"G":break;case"P":C=N[parseInt(A[y].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(k=A[y].slice(1).split(" "),M=parseInt(k[0],10);M<=parseInt(k[1],10);++M)D=parseInt(k[2],10),S[M-1]=D===0?{hidden:!0}:{wch:D},qu(S[M-1]);break;case"C":x=parseInt(A[y].slice(1))-1,S[x]||(S[x]={});break;case"R":p=parseInt(A[y].slice(1))-1,j[p]||(j[p]={}),D>0?(j[p].hpt=D,j[p].hpx=oh(D)):D===0&&(j[p].hidden=!0);break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+T)}E<1&&(C=null);break;default:if(m&&m.WTF)throw new Error("SYLK bad record "+T)}}return j.length>0&&(_["!rows"]=j),S.length>0&&(_["!cols"]=S),m&&m.sheetRows&&(b=b.slice(0,m.sheetRows)),[b,_]}function o(h,m){var v=a(h,m),p=v[0],x=v[1],w=ud(p,m);return Wa(x).forEach(function(y){w[y]=x[y]}),w}function l(h,m){return el(o(h,m),m)}function c(h,m,v,p){var x="C;Y"+(v+1)+";X"+(p+1)+";K";switch(h.t){case"n":x+=h.v||0,h.f&&!h.F&&(x+=";E"+Ase(h.f,{r:v,c:p}));break;case"b":x+=h.v?"TRUE":"FALSE";break;case"e":x+=h.w||h.v;break;case"d":x+='"'+(h.w||h.v)+'"';break;case"s":x+='"'+h.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return x}function u(h,m){m.forEach(function(v,p){var x="F;W"+(p+1)+" "+(p+1)+" ";v.hidden?x+="0":(typeof v.width=="number"&&!v.wpx&&(v.wpx=lx(v.width)),typeof v.wpx=="number"&&!v.wch&&(v.wch=cx(v.wpx)),typeof v.wch=="number"&&(x+=Math.round(v.wch))),x.charAt(x.length-1)!=" "&&h.push(x)})}function d(h,m){m.forEach(function(v,p){var x="F;";v.hidden?x+="M0;":v.hpt?x+="M"+20*v.hpt+";":v.hpx&&(x+="M"+20*S6(v.hpx)+";"),x.length>2&&h.push(x+"R"+(p+1))})}function f(h,m){var v=["ID;PWXL;N;E"],p=[],x=hr(h["!ref"]),w,y=Array.isArray(h),b=`\r
`;v.push("P;PGeneral"),v.push("F;P0;DG0G8;M255"),h["!cols"]&&u(v,h["!cols"]),h["!rows"]&&d(v,h["!rows"]),v.push("B;Y"+(x.e.r-x.s.r+1)+";X"+(x.e.c-x.s.c+1)+";D"+[x.s.c,x.s.r,x.e.c,x.e.r].join(" "));for(var N=x.s.r;N<=x.e.r;++N)for(var C=x.s.c;C<=x.e.c;++C){var _=ft({r:N,c:C});w=y?(h[N]||[])[C]:h[_],!(!w||w.v==null&&(!w.f||w.F))&&p.push(c(w,h,N,C))}return v.join(b)+b+p.join(b)+b+"E"+b}return{to_workbook:l,to_sheet:o,from_sheet:f}}(),Hte=function(){function e(i,o){switch(o.type){case"base64":return t(mn(i),o);case"binary":return t(i,o);case"buffer":return t(St&&Buffer.isBuffer(i)?i.toString("binary"):uc(i),o);case"array":return t(Zl(i),o)}throw new Error("Unrecognized type "+o.type)}function t(i,o){for(var l=i.split(`
`),c=-1,u=-1,d=0,f=[];d!==l.length;++d){if(l[d].trim()==="BOT"){f[++c]=[],u=0;continue}if(!(c<0)){var h=l[d].trim().split(","),m=h[0],v=h[1];++d;for(var p=l[d]||"";(p.match(/["]/g)||[]).length&1&&d<l.length-1;)p+=`
`+l[++d];switch(p=p.trim(),+m){case-1:if(p==="BOT"){f[++c]=[],u=0;continue}else if(p!=="EOD")throw new Error("Unrecognized DIF special command "+p);break;case 0:p==="TRUE"?f[c][u]=!0:p==="FALSE"?f[c][u]=!1:isNaN(ma(v))?isNaN($u(v).getDate())?f[c][u]=v:f[c][u]=Gr(v):f[c][u]=ma(v),++u;break;case 1:p=p.slice(1,p.length-1),p=p.replace(/""/g,'"'),p&&p.match(/^=".*"$/)&&(p=p.slice(2,-1)),f[c][u++]=p!==""?p:null;break}if(p==="EOD")break}}return o&&o.sheetRows&&(f=f.slice(0,o.sheetRows)),f}function r(i,o){return ud(e(i,o),o)}function n(i,o){return el(r(i,o),o)}var a=function(){var i=function(c,u,d,f,h){c.push(u),c.push(d+","+f),c.push('"'+h.replace(/"/g,'""')+'"')},o=function(c,u,d,f){c.push(u+","+d),c.push(u==1?'"'+f.replace(/"/g,'""')+'"':f)};return function(c){var u=[],d=hr(c["!ref"]),f,h=Array.isArray(c);i(u,"TABLE",0,1,"sheetjs"),i(u,"VECTORS",0,d.e.r-d.s.r+1,""),i(u,"TUPLES",0,d.e.c-d.s.c+1,""),i(u,"DATA",0,0,"");for(var m=d.s.r;m<=d.e.r;++m){o(u,-1,0,"BOT");for(var v=d.s.c;v<=d.e.c;++v){var p=ft({r:m,c:v});if(f=h?(c[m]||[])[v]:c[p],!f){o(u,1,0,"");continue}switch(f.t){case"n":var x=f.w;!x&&f.v!=null&&(x=f.v),x==null?f.f&&!f.F?o(u,1,0,"="+f.f):o(u,1,0,""):o(u,0,x,"V");break;case"b":o(u,0,f.v?1:0,f.v?"TRUE":"FALSE");break;case"s":o(u,1,0,isNaN(f.v)?f.v:'="'+f.v+'"');break;case"d":f.w||(f.w=Ln(f.z||gt[14],Rs(Gr(f.v)))),o(u,0,f.w,"V");break;default:o(u,1,0,"")}}}o(u,-1,0,"EOD");var w=`\r
`,y=u.join(w);return y}}();return{to_workbook:n,to_sheet:r,from_sheet:a}}(),Wte=function(){function e(f){return f.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
`)}function t(f){return f.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function r(f,h){for(var m=f.split(`
`),v=-1,p=-1,x=0,w=[];x!==m.length;++x){var y=m[x].trim().split(":");if(y[0]==="cell"){var b=ks(y[1]);if(w.length<=b.r)for(v=w.length;v<=b.r;++v)w[v]||(w[v]=[]);switch(v=b.r,p=b.c,y[2]){case"t":w[v][p]=e(y[3]);break;case"v":w[v][p]=+y[3];break;case"vtf":var N=y[y.length-1];case"vtc":switch(y[3]){case"nl":w[v][p]=!!+y[4];break;default:w[v][p]=+y[4];break}y[2]=="vtf"&&(w[v][p]=[w[v][p],N])}}}return h&&h.sheetRows&&(w=w.slice(0,h.sheetRows)),w}function n(f,h){return ud(r(f,h),h)}function a(f,h){return el(n(f,h),h)}var i=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
`),o=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
`)+`
`,l=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
`),c="--SocialCalcSpreadsheetControlSave--";function u(f){if(!f||!f["!ref"])return"";for(var h=[],m=[],v,p="",x=cd(f["!ref"]),w=Array.isArray(f),y=x.s.r;y<=x.e.r;++y)for(var b=x.s.c;b<=x.e.c;++b)if(p=ft({r:y,c:b}),v=w?(f[y]||[])[b]:f[p],!(!v||v.v==null||v.t==="z")){switch(m=["cell",p,"t"],v.t){case"s":case"str":m.push(t(v.v));break;case"n":v.f?(m[2]="vtf",m[3]="n",m[4]=v.v,m[5]=t(v.f)):(m[2]="v",m[3]=v.v);break;case"b":m[2]="vt"+(v.f?"f":"c"),m[3]="nl",m[4]=v.v?"1":"0",m[5]=t(v.f||(v.v?"TRUE":"FALSE"));break;case"d":var N=Rs(Gr(v.v));m[2]="vtc",m[3]="nd",m[4]=""+N,m[5]=v.w||Ln(v.z||gt[14],N);break;case"e":continue}h.push(m.join(":"))}return h.push("sheet:c:"+(x.e.c-x.s.c+1)+":r:"+(x.e.r-x.s.r+1)+":tvf:1"),h.push("valueformat:1:text-wiki"),h.join(`
`)}function d(f){return[i,o,l,o,u(f),c].join(`
`)}return{to_workbook:a,to_sheet:n,from_sheet:d}}(),ah=function(){function e(d,f,h,m,v){v.raw?f[h][m]=d:d===""||(d==="TRUE"?f[h][m]=!0:d==="FALSE"?f[h][m]=!1:isNaN(ma(d))?isNaN($u(d).getDate())?f[h][m]=d:f[h][m]=Gr(d):f[h][m]=ma(d))}function t(d,f){var h=f||{},m=[];if(!d||d.length===0)return m;for(var v=d.split(/[\r\n]/),p=v.length-1;p>=0&&v[p].length===0;)--p;for(var x=10,w=0,y=0;y<=p;++y)w=v[y].indexOf(" "),w==-1?w=v[y].length:w++,x=Math.max(x,w);for(y=0;y<=p;++y){m[y]=[];var b=0;for(e(v[y].slice(0,x).trim(),m,y,b,h),b=1;b<=(v[y].length-x)/10+1;++b)e(v[y].slice(x+(b-1)*10,x+b*10).trim(),m,y,b,h)}return h.sheetRows&&(m=m.slice(0,h.sheetRows)),m}var r={44:",",9:"	",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function a(d){for(var f={},h=!1,m=0,v=0;m<d.length;++m)(v=d.charCodeAt(m))==34?h=!h:!h&&v in r&&(f[v]=(f[v]||0)+1);v=[];for(m in f)Object.prototype.hasOwnProperty.call(f,m)&&v.push([f[m],m]);if(!v.length){f=n;for(m in f)Object.prototype.hasOwnProperty.call(f,m)&&v.push([f[m],m])}return v.sort(function(p,x){return p[0]-x[0]||n[p[1]]-n[x[1]]}),r[v.pop()[1]]||44}function i(d,f){var h=f||{},m="",v=h.dense?[]:{},p={s:{c:0,r:0},e:{c:0,r:0}};d.slice(0,4)=="sep="?d.charCodeAt(5)==13&&d.charCodeAt(6)==10?(m=d.charAt(4),d=d.slice(7)):d.charCodeAt(5)==13||d.charCodeAt(5)==10?(m=d.charAt(4),d=d.slice(6)):m=a(d.slice(0,1024)):h&&h.FS?m=h.FS:m=a(d.slice(0,1024));var x=0,w=0,y=0,b=0,N=0,C=m.charCodeAt(0),_=!1,j=0,S=d.charCodeAt(0);d=d.replace(/\r\n/mg,`
`);var k=h.dateNF!=null?sZ(h.dateNF):null;function D(){var M=d.slice(b,N),T={};if(M.charAt(0)=='"'&&M.charAt(M.length-1)=='"'&&(M=M.slice(1,-1).replace(/""/g,'"')),M.length===0)T.t="z";else if(h.raw)T.t="s",T.v=M;else if(M.trim().length===0)T.t="s",T.v=M;else if(M.charCodeAt(0)==61)M.charCodeAt(1)==34&&M.charCodeAt(M.length-1)==34?(T.t="s",T.v=M.slice(2,-1).replace(/""/g,'"')):Dse(M)?(T.t="n",T.f=M.slice(1)):(T.t="s",T.v=M);else if(M=="TRUE")T.t="b",T.v=!0;else if(M=="FALSE")T.t="b",T.v=!1;else if(!isNaN(y=ma(M)))T.t="n",h.cellText!==!1&&(T.w=M),T.v=y;else if(!isNaN($u(M).getDate())||k&&M.match(k)){T.z=h.dateNF||gt[14];var A=0;k&&M.match(k)&&(M=nZ(M,h.dateNF,M.match(k)||[]),A=1),h.cellDates?(T.t="d",T.v=Gr(M,A)):(T.t="n",T.v=Rs(Gr(M,A))),h.cellText!==!1&&(T.w=Ln(T.z,T.v instanceof Date?Rs(T.v):T.v)),h.cellNF||delete T.z}else T.t="s",T.v=M;if(T.t=="z"||(h.dense?(v[x]||(v[x]=[]),v[x][w]=T):v[ft({c:w,r:x})]=T),b=N+1,S=d.charCodeAt(b),p.e.c<w&&(p.e.c=w),p.e.r<x&&(p.e.r=x),j==C)++w;else if(w=0,++x,h.sheetRows&&h.sheetRows<=x)return!0}e:for(;N<d.length;++N)switch(j=d.charCodeAt(N)){case 34:S===34&&(_=!_);break;case C:case 10:case 13:if(!_&&D())break e;break}return N-b>0&&D(),v["!ref"]=Tt(p),v}function o(d,f){return!(f&&f.PRN)||f.FS||d.slice(0,4)=="sep="||d.indexOf("	")>=0||d.indexOf(",")>=0||d.indexOf(";")>=0?i(d,f):ud(t(d,f),f)}function l(d,f){var h="",m=f.type=="string"?[0,0,0,0]:hj(d,f);switch(f.type){case"base64":h=mn(d);break;case"binary":h=d;break;case"buffer":f.codepage==65001?h=d.toString("utf8"):f.codepage&&typeof th<"u"||(h=St&&Buffer.isBuffer(d)?d.toString("binary"):uc(d));break;case"array":h=Zl(d);break;case"string":h=d;break;default:throw new Error("Unrecognized type "+f.type)}return m[0]==239&&m[1]==187&&m[2]==191?h=Kt(h.slice(3)):f.type!="string"&&f.type!="buffer"&&f.codepage==65001?h=Kt(h):f.type=="binary"&&typeof th<"u",h.slice(0,19)=="socialcalc:version:"?Wte.to_sheet(f.type=="string"?h:Kt(h),f):o(h,f)}function c(d,f){return el(l(d,f),f)}function u(d){for(var f=[],h=hr(d["!ref"]),m,v=Array.isArray(d),p=h.s.r;p<=h.e.r;++p){for(var x=[],w=h.s.c;w<=h.e.c;++w){var y=ft({r:p,c:w});if(m=v?(d[p]||[])[w]:d[y],!m||m.v==null){x.push("          ");continue}for(var b=(m.w||(Ti(m),m.w)||"").slice(0,10);b.length<10;)b+=" ";x.push(b+(w===0?" ":""))}f.push(x.join(""))}return f.join(`
`)}return{to_workbook:c,to_sheet:l,from_sheet:u}}();function Gte(e,t){var r=t||{},n=!!r.WTF;r.WTF=!0;try{var a=Vte.to_workbook(e,r);return r.WTF=n,a}catch(i){if(r.WTF=n,!i.message.match(/SYLK bad record ID/)&&n)throw i;return ah.to_workbook(e,t)}}var mf=function(){function e(I,Y,E){if(I){Jr(I,I.l||0);for(var B=E.Enum||ne;I.l<I.length;){var ee=I.read_shift(2),J=B[ee]||B[65535],K=I.read_shift(2),ae=I.l+K,te=J.f&&J.f(I,K,E);if(I.l=ae,Y(te,J,ee))return}}}function t(I,Y){switch(Y.type){case"base64":return r(na(mn(I)),Y);case"binary":return r(na(I),Y);case"buffer":case"array":return r(I,Y)}throw"Unsupported type "+Y.type}function r(I,Y){if(!I)return I;var E=Y||{},B=E.dense?[]:{},ee="Sheet1",J="",K=0,ae={},te=[],xe=[],F={s:{r:0,c:0},e:{r:0,c:0}},We=E.sheetRows||0;if(I[2]==0&&(I[3]==8||I[3]==9)&&I.length>=16&&I[14]==5&&I[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(I[2]==2)E.Enum=ne,e(I,function(ge,Me,Xe){switch(Xe){case 0:E.vers=ge,ge>=4096&&(E.qpro=!0);break;case 6:F=ge;break;case 204:ge&&(J=ge);break;case 222:J=ge;break;case 15:case 51:E.qpro||(ge[1].v=ge[1].v.slice(1));case 13:case 14:case 16:Xe==14&&(ge[2]&112)==112&&(ge[2]&15)>1&&(ge[2]&15)<15&&(ge[1].z=E.dateNF||gt[14],E.cellDates&&(ge[1].t="d",ge[1].v=y0(ge[1].v))),E.qpro&&ge[3]>K&&(B["!ref"]=Tt(F),ae[ee]=B,te.push(ee),B=E.dense?[]:{},F={s:{r:0,c:0},e:{r:0,c:0}},K=ge[3],ee=J||"Sheet"+(K+1),J="");var G=E.dense?(B[ge[0].r]||[])[ge[0].c]:B[ft(ge[0])];if(G){G.t=ge[1].t,G.v=ge[1].v,ge[1].z!=null&&(G.z=ge[1].z),ge[1].f!=null&&(G.f=ge[1].f);break}E.dense?(B[ge[0].r]||(B[ge[0].r]=[]),B[ge[0].r][ge[0].c]=ge[1]):B[ft(ge[0])]=ge[1];break}},E);else if(I[2]==26||I[2]==14)E.Enum=he,I[2]==14&&(E.qpro=!0,I.l=0),e(I,function(ge,Me,Xe){switch(Xe){case 204:ee=ge;break;case 22:ge[1].v=ge[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(ge[3]>K&&(B["!ref"]=Tt(F),ae[ee]=B,te.push(ee),B=E.dense?[]:{},F={s:{r:0,c:0},e:{r:0,c:0}},K=ge[3],ee="Sheet"+(K+1)),We>0&&ge[0].r>=We)break;E.dense?(B[ge[0].r]||(B[ge[0].r]=[]),B[ge[0].r][ge[0].c]=ge[1]):B[ft(ge[0])]=ge[1],F.e.c<ge[0].c&&(F.e.c=ge[0].c),F.e.r<ge[0].r&&(F.e.r=ge[0].r);break;case 27:ge[14e3]&&(xe[ge[14e3][0]]=ge[14e3][1]);break;case 1537:xe[ge[0]]=ge[1],ge[0]==K&&(ee=ge[1]);break}},E);else throw new Error("Unrecognized LOTUS BOF "+I[2]);if(B["!ref"]=Tt(F),ae[J||ee]=B,te.push(J||ee),!xe.length)return{SheetNames:te,Sheets:ae};for(var je={},Oe=[],Ne=0;Ne<xe.length;++Ne)ae[te[Ne]]?(Oe.push(xe[Ne]||te[Ne]),je[xe[Ne]]=ae[xe[Ne]]||ae[te[Ne]]):(Oe.push(xe[Ne]),je[xe[Ne]]={"!ref":"A1"});return{SheetNames:Oe,Sheets:je}}function n(I,Y){var E=Y||{};if(+E.codepage>=0&&la(+E.codepage),E.type=="string")throw new Error("Cannot write WK1 to JS string");var B=z1(),ee=hr(I["!ref"]),J=Array.isArray(I),K=[];Hn(B,0,i(1030)),Hn(B,6,c(ee));for(var ae=Math.min(ee.e.r,8191),te=ee.s.r;te<=ae;++te)for(var xe=ts(te),F=ee.s.c;F<=ee.e.c;++F){te===ee.s.r&&(K[F]=Mr(F));var We=K[F]+xe,je=J?(I[te]||[])[F]:I[We];if(!(!je||je.t=="z"))if(je.t=="n")(je.v|0)==je.v&&je.v>=-32768&&je.v<=32767?Hn(B,13,m(te,F,je.v)):Hn(B,14,p(te,F,je.v));else{var Oe=Ti(je);Hn(B,15,f(te,F,Oe.slice(0,239)))}}return Hn(B,1),B.end()}function a(I,Y){var E=Y||{};if(+E.codepage>=0&&la(+E.codepage),E.type=="string")throw new Error("Cannot write WK3 to JS string");var B=z1();Hn(B,0,o(I));for(var ee=0,J=0;ee<I.SheetNames.length;++ee)(I.Sheets[I.SheetNames[ee]]||{})["!ref"]&&Hn(B,27,O(I.SheetNames[ee],J++));var K=0;for(ee=0;ee<I.SheetNames.length;++ee){var ae=I.Sheets[I.SheetNames[ee]];if(!(!ae||!ae["!ref"])){for(var te=hr(ae["!ref"]),xe=Array.isArray(ae),F=[],We=Math.min(te.e.r,8191),je=te.s.r;je<=We;++je)for(var Oe=ts(je),Ne=te.s.c;Ne<=te.e.c;++Ne){je===te.s.r&&(F[Ne]=Mr(Ne));var ge=F[Ne]+Oe,Me=xe?(ae[je]||[])[Ne]:ae[ge];if(!(!Me||Me.t=="z"))if(Me.t=="n")Hn(B,23,D(je,Ne,K,Me.v));else{var Xe=Ti(Me);Hn(B,22,j(je,Ne,K,Xe.slice(0,239)))}}++K}}return Hn(B,1),B.end()}function i(I){var Y=Pr(2);return Y.write_shift(2,I),Y}function o(I){var Y=Pr(26);Y.write_shift(2,4096),Y.write_shift(2,4),Y.write_shift(4,0);for(var E=0,B=0,ee=0,J=0;J<I.SheetNames.length;++J){var K=I.SheetNames[J],ae=I.Sheets[K];if(!(!ae||!ae["!ref"])){++ee;var te=cd(ae["!ref"]);E<te.e.r&&(E=te.e.r),B<te.e.c&&(B=te.e.c)}}return E>8191&&(E=8191),Y.write_shift(2,E),Y.write_shift(1,ee),Y.write_shift(1,B),Y.write_shift(2,0),Y.write_shift(2,0),Y.write_shift(1,1),Y.write_shift(1,2),Y.write_shift(4,0),Y.write_shift(4,0),Y}function l(I,Y,E){var B={s:{c:0,r:0},e:{c:0,r:0}};return Y==8&&E.qpro?(B.s.c=I.read_shift(1),I.l++,B.s.r=I.read_shift(2),B.e.c=I.read_shift(1),I.l++,B.e.r=I.read_shift(2),B):(B.s.c=I.read_shift(2),B.s.r=I.read_shift(2),Y==12&&E.qpro&&(I.l+=2),B.e.c=I.read_shift(2),B.e.r=I.read_shift(2),Y==12&&E.qpro&&(I.l+=2),B.s.c==65535&&(B.s.c=B.e.c=B.s.r=B.e.r=0),B)}function c(I){var Y=Pr(8);return Y.write_shift(2,I.s.c),Y.write_shift(2,I.s.r),Y.write_shift(2,I.e.c),Y.write_shift(2,I.e.r),Y}function u(I,Y,E){var B=[{c:0,r:0},{t:"n",v:0},0,0];return E.qpro&&E.vers!=20768?(B[0].c=I.read_shift(1),B[3]=I.read_shift(1),B[0].r=I.read_shift(2),I.l+=2):(B[2]=I.read_shift(1),B[0].c=I.read_shift(2),B[0].r=I.read_shift(2)),B}function d(I,Y,E){var B=I.l+Y,ee=u(I,Y,E);if(ee[1].t="s",E.vers==20768){I.l++;var J=I.read_shift(1);return ee[1].v=I.read_shift(J,"utf8"),ee}return E.qpro&&I.l++,ee[1].v=I.read_shift(B-I.l,"cstr"),ee}function f(I,Y,E){var B=Pr(7+E.length);B.write_shift(1,255),B.write_shift(2,Y),B.write_shift(2,I),B.write_shift(1,39);for(var ee=0;ee<B.length;++ee){var J=E.charCodeAt(ee);B.write_shift(1,J>=128?95:J)}return B.write_shift(1,0),B}function h(I,Y,E){var B=u(I,Y,E);return B[1].v=I.read_shift(2,"i"),B}function m(I,Y,E){var B=Pr(7);return B.write_shift(1,255),B.write_shift(2,Y),B.write_shift(2,I),B.write_shift(2,E,"i"),B}function v(I,Y,E){var B=u(I,Y,E);return B[1].v=I.read_shift(8,"f"),B}function p(I,Y,E){var B=Pr(13);return B.write_shift(1,255),B.write_shift(2,Y),B.write_shift(2,I),B.write_shift(8,E,"f"),B}function x(I,Y,E){var B=I.l+Y,ee=u(I,Y,E);if(ee[1].v=I.read_shift(8,"f"),E.qpro)I.l=B;else{var J=I.read_shift(2);N(I.slice(I.l,I.l+J),ee),I.l+=J}return ee}function w(I,Y,E){var B=Y&32768;return Y&=-32769,Y=(B?I:0)+(Y>=8192?Y-16384:Y),(B?"":"$")+(E?Mr(Y):ts(Y))}var y={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},b=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function N(I,Y){Jr(I,0);for(var E=[],B=0,ee="",J="",K="",ae="";I.l<I.length;){var te=I[I.l++];switch(te){case 0:E.push(I.read_shift(8,"f"));break;case 1:J=w(Y[0].c,I.read_shift(2),!0),ee=w(Y[0].r,I.read_shift(2),!1),E.push(J+ee);break;case 2:{var xe=w(Y[0].c,I.read_shift(2),!0),F=w(Y[0].r,I.read_shift(2),!1);J=w(Y[0].c,I.read_shift(2),!0),ee=w(Y[0].r,I.read_shift(2),!1),E.push(xe+F+":"+J+ee)}break;case 3:if(I.l<I.length){console.error("WK1 premature formula end");return}break;case 4:E.push("("+E.pop()+")");break;case 5:E.push(I.read_shift(2));break;case 6:{for(var We="";te=I[I.l++];)We+=String.fromCharCode(te);E.push('"'+We.replace(/"/g,'""')+'"')}break;case 8:E.push("-"+E.pop());break;case 23:E.push("+"+E.pop());break;case 22:E.push("NOT("+E.pop()+")");break;case 20:case 21:ae=E.pop(),K=E.pop(),E.push(["AND","OR"][te-20]+"("+K+","+ae+")");break;default:if(te<32&&b[te])ae=E.pop(),K=E.pop(),E.push(K+b[te]+ae);else if(y[te]){if(B=y[te][1],B==69&&(B=I[I.l++]),B>E.length){console.error("WK1 bad formula parse 0x"+te.toString(16)+":|"+E.join("|")+"|");return}var je=E.slice(-B);E.length-=B,E.push(y[te][0]+"("+je.join(",")+")")}else return te<=7?console.error("WK1 invalid opcode "+te.toString(16)):te<=24?console.error("WK1 unsupported op "+te.toString(16)):te<=30?console.error("WK1 invalid opcode "+te.toString(16)):te<=115?console.error("WK1 unsupported function opcode "+te.toString(16)):console.error("WK1 unrecognized opcode "+te.toString(16))}}E.length==1?Y[1].f=""+E[0]:console.error("WK1 bad formula parse |"+E.join("|")+"|")}function C(I){var Y=[{c:0,r:0},{t:"n",v:0},0];return Y[0].r=I.read_shift(2),Y[3]=I[I.l++],Y[0].c=I[I.l++],Y}function _(I,Y){var E=C(I);return E[1].t="s",E[1].v=I.read_shift(Y-4,"cstr"),E}function j(I,Y,E,B){var ee=Pr(6+B.length);ee.write_shift(2,I),ee.write_shift(1,E),ee.write_shift(1,Y),ee.write_shift(1,39);for(var J=0;J<B.length;++J){var K=B.charCodeAt(J);ee.write_shift(1,K>=128?95:K)}return ee.write_shift(1,0),ee}function S(I,Y){var E=C(I);E[1].v=I.read_shift(2);var B=E[1].v>>1;if(E[1].v&1)switch(B&7){case 0:B=(B>>3)*5e3;break;case 1:B=(B>>3)*500;break;case 2:B=(B>>3)/20;break;case 3:B=(B>>3)/200;break;case 4:B=(B>>3)/2e3;break;case 5:B=(B>>3)/2e4;break;case 6:B=(B>>3)/16;break;case 7:B=(B>>3)/64;break}return E[1].v=B,E}function k(I,Y){var E=C(I),B=I.read_shift(4),ee=I.read_shift(4),J=I.read_shift(2);if(J==65535)return B===0&&ee===3221225472?(E[1].t="e",E[1].v=15):B===0&&ee===3489660928?(E[1].t="e",E[1].v=42):E[1].v=0,E;var K=J&32768;return J=(J&32767)-16446,E[1].v=(1-K*2)*(ee*Math.pow(2,J+32)+B*Math.pow(2,J)),E}function D(I,Y,E,B){var ee=Pr(14);if(ee.write_shift(2,I),ee.write_shift(1,E),ee.write_shift(1,Y),B==0)return ee.write_shift(4,0),ee.write_shift(4,0),ee.write_shift(2,65535),ee;var J=0,K=0,ae=0,te=0;return B<0&&(J=1,B=-B),K=Math.log2(B)|0,B/=Math.pow(2,K-31),te=B>>>0,te&2147483648||(B/=2,++K,te=B>>>0),B-=te,te|=2147483648,te>>>=0,B*=Math.pow(2,32),ae=B>>>0,ee.write_shift(4,ae),ee.write_shift(4,te),K+=16383+(J?32768:0),ee.write_shift(2,K),ee}function M(I,Y){var E=k(I);return I.l+=Y-14,E}function T(I,Y){var E=C(I),B=I.read_shift(4);return E[1].v=B>>6,E}function A(I,Y){var E=C(I),B=I.read_shift(8,"f");return E[1].v=B,E}function W(I,Y){var E=A(I);return I.l+=Y-10,E}function P(I,Y){return I[I.l+Y-1]==0?I.read_shift(Y,"cstr"):""}function V(I,Y){var E=I[I.l++];E>Y-1&&(E=Y-1);for(var B="";B.length<E;)B+=String.fromCharCode(I[I.l++]);return B}function Z(I,Y,E){if(!(!E.qpro||Y<21)){var B=I.read_shift(1);I.l+=17,I.l+=1,I.l+=2;var ee=I.read_shift(Y-21,"cstr");return[B,ee]}}function Q(I,Y){for(var E={},B=I.l+Y;I.l<B;){var ee=I.read_shift(2);if(ee==14e3){for(E[ee]=[0,""],E[ee][0]=I.read_shift(2);I[I.l];)E[ee][1]+=String.fromCharCode(I[I.l]),I.l++;I.l++}}return E}function O(I,Y){var E=Pr(5+I.length);E.write_shift(2,14e3),E.write_shift(2,Y);for(var B=0;B<I.length;++B){var ee=I.charCodeAt(B);E[E.l++]=ee>127?95:ee}return E[E.l++]=0,E}var ne={0:{n:"BOF",f:jr},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:l},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:h},14:{n:"NUMBER",f:v},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:x},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:d},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:P},222:{n:"SHEETNAMELP",f:V},65535:{n:""}},he={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:_},23:{n:"NUMBER17",f:k},24:{n:"NUMBER18",f:S},25:{n:"FORMULA19",f:M},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:Q},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:T},38:{n:"??"},39:{n:"NUMBER27",f:A},40:{n:"FORMULA28",f:W},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:P},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:Z},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:n,book_to_wk3:a,to_workbook:t}}();function Kte(e){var t={},r=e.match(ys),n=0,a=!1;if(r)for(;n!=r.length;++n){var i=ut(r[n]);switch(i[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!i.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if(i.val=="1")break;t.cp=zw[parseInt(i.val,10)];break;case"<outline":if(!i.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=i.val;break;case"<sz":t.sz=i.val;break;case"<strike":if(!i.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!i.val)break;switch(i.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting";break}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if(i.val=="0")break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if(i.val=="0")break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":i.rgb&&(t.color=i.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=i.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=i.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":break;case"<scheme":break;case"<scheme>":case"<scheme/>":case"</scheme>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(i[0].charCodeAt(1)!==47&&!a)throw new Error("Unrecognized rich format "+i[0])}}return t}var Yte=function(){var e=sh("t"),t=sh("rPr");function r(i){var o=i.match(e);if(!o)return{t:"s",v:""};var l={t:"s",v:Rt(o[1])},c=i.match(t);return c&&(l.s=Kte(c[1])),l}var n=/<(?:\w+:)?r>/g,a=/<\/(?:\w+:)?r>/;return function(o){return o.replace(n,"").split(a).map(r).filter(function(l){return l.v})}}(),Xte=function(){var t=/(\r\n|\n)/g;function r(a,i,o){var l=[];a.u&&l.push("text-decoration: underline;"),a.uval&&l.push("text-underline-style:"+a.uval+";"),a.sz&&l.push("font-size:"+a.sz+"pt;"),a.outline&&l.push("text-effect: outline;"),a.shadow&&l.push("text-shadow: auto;"),i.push('<span style="'+l.join("")+'">'),a.b&&(i.push("<b>"),o.push("</b>")),a.i&&(i.push("<i>"),o.push("</i>")),a.strike&&(i.push("<s>"),o.push("</s>"));var c=a.valign||"";return c=="superscript"||c=="super"?c="sup":c=="subscript"&&(c="sub"),c!=""&&(i.push("<"+c+">"),o.push("</"+c+">")),o.push("</span>"),a}function n(a){var i=[[],a.v,[]];return a.v?(a.s&&r(a.s,i[0],i[2]),i[0].join("")+i[1].replace(t,"<br/>")+i[2].join("")):""}return function(i){return i.map(n).join("")}}(),Qte=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,Jte=/<(?:\w+:)?r>/,Zte=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function ij(e,t){var r=t?t.cellHTML:!0,n={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(n.t=Rt(Kt(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),n.r=Kt(e),r&&(n.h=Xw(n.t))):e.match(Jte)&&(n.r=Kt(e),n.t=Rt(Kt((e.replace(Zte,"").match(Qte)||[]).join("").replace(ys,""))),r&&(n.h=Xte(Yte(n.r)))),n):{t:""}}var ere=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,tre=/<(?:\w+:)?(?:si|sstItem)>/g,rre=/<\/(?:\w+:)?(?:si|sstItem)>/;function sre(e,t){var r=[],n="";if(!e)return r;var a=e.match(ere);if(a){n=a[2].replace(tre,"").split(rre);for(var i=0;i!=n.length;++i){var o=ij(n[i].trim(),t);o!=null&&(r[r.length]=o)}a=ut(a[1]),r.Count=a.count,r.Unique=a.uniqueCount}return r}function nre(e){return[e.read_shift(4),e.read_shift(4)]}function are(e,t){var r=[],n=!1;return Mi(e,function(i,o,l){switch(l){case 159:r.Count=i[0],r.Unique=i[1];break;case 19:r.push(i);break;case 160:return!0;case 35:n=!0;break;case 36:n=!1;break;default:if(o.T,!n||t.WTF)throw new Error("Unexpected record 0x"+l.toString(16))}}),r}function b6(e){for(var t=[],r=e.split(""),n=0;n<r.length;++n)t[n]=r[n].charCodeAt(0);return t}function gi(e,t){var r={};return r.Major=e.read_shift(2),r.Minor=e.read_shift(2),t>=4&&(e.l+=t-4),r}function ire(e){var t={};return t.id=e.read_shift(0,"lpp4"),t.R=gi(e,4),t.U=gi(e,4),t.W=gi(e,4),t}function ore(e){for(var t=e.read_shift(4),r=e.l+t-4,n={},a=e.read_shift(4),i=[];a-- >0;)i.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(n.name=e.read_shift(0,"lpp4"),n.comps=i,e.l!=r)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+r);return n}function lre(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(ore(e));return t}function cre(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(e.read_shift(0,"lpp4"));return t}function ure(e){var t={};return e.read_shift(4),e.l+=4,t.id=e.read_shift(0,"lpp4"),t.name=e.read_shift(0,"lpp4"),t.R=gi(e,4),t.U=gi(e,4),t.W=gi(e,4),t}function dre(e){var t=ure(e);if(t.ename=e.read_shift(0,"8lpp4"),t.blksz=e.read_shift(4),t.cmode=e.read_shift(4),e.read_shift(4)!=4)throw new Error("Bad !Primary record");return t}function w6(e,t){var r=e.l+t,n={};n.Flags=e.read_shift(4)&63,e.l+=4,n.AlgID=e.read_shift(4);var a=!1;switch(n.AlgID){case 26126:case 26127:case 26128:a=n.Flags==36;break;case 26625:a=n.Flags==4;break;case 0:a=n.Flags==16||n.Flags==4||n.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+n.AlgID}if(!a)throw new Error("Encryption Flags/AlgID mismatch");return n.AlgIDHash=e.read_shift(4),n.KeySize=e.read_shift(4),n.ProviderType=e.read_shift(4),e.l+=8,n.CSPName=e.read_shift(r-e.l>>1,"utf16le"),e.l=r,n}function j6(e,t){var r={},n=e.l+t;return e.l+=4,r.Salt=e.slice(e.l,e.l+16),e.l+=16,r.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),r.VerifierHash=e.slice(e.l,n),e.l=n,r}function fre(e){var t=gi(e);switch(t.Minor){case 2:return[t.Minor,hre(e)];case 3:return[t.Minor,mre()];case 4:return[t.Minor,pre(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}function hre(e){var t=e.read_shift(4);if((t&63)!=36)throw new Error("EncryptionInfo mismatch");var r=e.read_shift(4),n=w6(e,r),a=j6(e,e.length-e.l);return{t:"Std",h:n,v:a}}function mre(){throw new Error("File is password-protected: ECMA-376 Extensible")}function pre(e){var t=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var r=e.read_shift(e.length-e.l,"utf8"),n={};return r.replace(ys,function(i){var o=ut(i);switch(Ya(o[0])){case"<?xml":break;case"<encryption":case"</encryption>":break;case"<keyData":t.forEach(function(l){n[l]=o[l]});break;case"<dataIntegrity":n.encryptedHmacKey=o.encryptedHmacKey,n.encryptedHmacValue=o.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":n.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":n.uri=o.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":n.encs.push(o);break;default:throw o[0]}}),n}function xre(e,t){var r={},n=r.EncryptionVersionInfo=gi(e,4);if(t-=4,n.Minor!=2)throw new Error("unrecognized minor version code: "+n.Minor);if(n.Major>4||n.Major<2)throw new Error("unrecognized major version code: "+n.Major);r.Flags=e.read_shift(4),t-=4;var a=e.read_shift(4);return t-=4,r.EncryptionHeader=w6(e,a),t-=a,r.EncryptionVerifier=j6(e,t),r}function gre(e){var t={},r=t.EncryptionVersionInfo=gi(e,4);if(r.Major!=1||r.Minor!=1)throw"unrecognized version code "+r.Major+" : "+r.Minor;return t.Salt=e.read_shift(16),t.EncryptedVerifier=e.read_shift(16),t.EncryptedVerifierHash=e.read_shift(16),t}function vre(e){var t=0,r,n=b6(e),a=n.length+1,i,o,l,c,u;for(r=Vo(a),r[0]=n.length,i=1;i!=a;++i)r[i]=n[i-1];for(i=a-1;i>=0;--i)o=r[i],l=t&16384?1:0,c=t<<1&32767,u=l|c,t=u^o;return t^52811}var N6=function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],t=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],r=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],n=function(o){return(o/2|o*128)&255},a=function(o,l){return n(o^l)},i=function(o){for(var l=t[o.length-1],c=104,u=o.length-1;u>=0;--u)for(var d=o[u],f=0;f!=7;++f)d&64&&(l^=r[c]),d*=2,--c;return l};return function(o){for(var l=b6(o),c=i(l),u=l.length,d=Vo(16),f=0;f!=16;++f)d[f]=0;var h,m,v;for((u&1)===1&&(h=c>>8,d[u]=a(e[0],h),--u,h=c&255,m=l[l.length-1],d[u]=a(m,h));u>0;)--u,h=c>>8,d[u]=a(l[u],h),--u,h=c&255,d[u]=a(l[u],h);for(u=15,v=15-l.length;v>0;)h=c>>8,d[u]=a(e[v],h),--u,--v,h=c&255,d[u]=a(l[u],h),--u,--v;return d}}(),yre=function(e,t,r,n,a){a||(a=t),n||(n=N6(e));var i,o;for(i=0;i!=t.length;++i)o=t[i],o^=n[r],o=(o>>5|o<<3)&255,a[i]=o,++r;return[a,r,n]},bre=function(e){var t=0,r=N6(e);return function(n){var a=yre("",n,t,r);return t=a[1],a[0]}};function wre(e,t,r,n){var a={key:jr(e),verificationBytes:jr(e)};return r.password&&(a.verifier=vre(r.password)),n.valid=a.verificationBytes===a.verifier,n.valid&&(n.insitu=bre(r.password)),a}function jre(e,t,r){var n=r||{};return n.Info=e.read_shift(2),e.l-=2,n.Info===1?n.Data=gre(e):n.Data=xre(e,t),n}function Nre(e,t,r){var n={Type:r.biff>=8?e.read_shift(2):0};return n.Type?jre(e,t-2,n):wre(e,r.biff>=8?t:t-2,r,n),n}var _re=function(){function e(a,i){switch(i.type){case"base64":return t(mn(a),i);case"binary":return t(a,i);case"buffer":return t(St&&Buffer.isBuffer(a)?a.toString("binary"):uc(a),i);case"array":return t(Zl(a),i)}throw new Error("Unrecognized type "+i.type)}function t(a,i){var o=i||{},l=o.dense?[]:{},c=a.match(/\\trowd.*?\\row\b/g);if(!c.length)throw new Error("RTF missing table");var u={s:{c:0,r:0},e:{c:0,r:c.length-1}};return c.forEach(function(d,f){Array.isArray(l)&&(l[f]=[]);for(var h=/\\\w+\b/g,m=0,v,p=-1;v=h.exec(d);){switch(v[0]){case"\\cell":var x=d.slice(m,h.lastIndex-v[0].length);if(x[0]==" "&&(x=x.slice(1)),++p,x.length){var w={v:x,t:"s"};Array.isArray(l)?l[f][p]=w:l[ft({r:f,c:p})]=w}break}m=h.lastIndex}p>u.e.c&&(u.e.c=p)}),l["!ref"]=Tt(u),l}function r(a,i){return el(e(a,i),i)}function n(a){for(var i=["{\\rtf1\\ansi"],o=hr(a["!ref"]),l,c=Array.isArray(a),u=o.s.r;u<=o.e.r;++u){i.push("\\trowd\\trautofit1");for(var d=o.s.c;d<=o.e.c;++d)i.push("\\cellx"+(d+1));for(i.push("\\pard\\intbl"),d=o.s.c;d<=o.e.c;++d){var f=ft({r:u,c:d});l=c?(a[u]||[])[d]:a[f],!(!l||l.v==null&&(!l.f||l.F))&&(i.push(" "+(l.w||(Ti(l),l.w))),i.push("\\cell"))}i.push("\\pard\\intbl\\row")}return i.join("")+"}"}return{to_workbook:r,to_sheet:e,from_sheet:n}}();function Cre(e){var t=e.slice(e[0]==="#"?1:0).slice(0,6);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function ih(e){for(var t=0,r=1;t!=3;++t)r=r*256+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}function Sre(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.max(t,r,n),i=Math.min(t,r,n),o=a-i;if(o===0)return[0,0,t];var l=0,c=0,u=a+i;switch(c=o/(u>1?2-u:u),a){case t:l=((r-n)/o+6)%6;break;case r:l=(n-t)/o+2;break;case n:l=(t-r)/o+4;break}return[l/6,c,u/2]}function Ere(e){var t=e[0],r=e[1],n=e[2],a=r*2*(n<.5?n:1-n),i=n-a/2,o=[i,i,i],l=6*t,c;if(r!==0)switch(l|0){case 0:case 6:c=a*l,o[0]+=a,o[1]+=c;break;case 1:c=a*(2-l),o[0]+=c,o[1]+=a;break;case 2:c=a*(l-2),o[1]+=a,o[2]+=c;break;case 3:c=a*(4-l),o[1]+=c,o[2]+=a;break;case 4:c=a*(l-4),o[2]+=a,o[0]+=c;break;case 5:c=a*(6-l),o[2]+=c,o[0]+=a;break}for(var u=0;u!=3;++u)o[u]=Math.round(o[u]*255);return o}function ox(e,t){if(t===0)return e;var r=Sre(Cre(e));return t<0?r[2]=r[2]*(1+t):r[2]=1-(1-r[2])*(1-t),ih(Ere(r))}var _6=6,kre=15,Tre=1,Es=_6;function lx(e){return Math.floor((e+Math.round(128/Es)/256)*Es)}function cx(e){return Math.floor((e-5)/Es*100+.5)/100}function G1(e){return Math.round((e*Es+5)/Es*256)/256}function Og(e){return G1(cx(lx(e)))}function oj(e){var t=Math.abs(e-Og(e)),r=Es;if(t>.005)for(Es=Tre;Es<kre;++Es)Math.abs(e-Og(e))<=t&&(t=Math.abs(e-Og(e)),r=Es);Es=r}function qu(e){e.width?(e.wpx=lx(e.width),e.wch=cx(e.wpx),e.MDW=Es):e.wpx?(e.wch=cx(e.wpx),e.width=G1(e.wch),e.MDW=Es):typeof e.wch=="number"&&(e.width=G1(e.wch),e.wpx=lx(e.width),e.MDW=Es),e.customWidth&&delete e.customWidth}var Are=96,C6=Are;function S6(e){return e*96/C6}function oh(e){return e*C6/96}var Rre={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};function Dre(e,t,r,n){t.Borders=[];var a={},i=!1;(e[0].match(ys)||[]).forEach(function(o){var l=ut(o);switch(Ya(l[0])){case"<borders":case"<borders>":case"</borders>":break;case"<border":case"<border>":case"<border/>":a={},l.diagonalUp&&(a.diagonalUp=Jt(l.diagonalUp)),l.diagonalDown&&(a.diagonalDown=Jt(l.diagonalDown)),t.Borders.push(a);break;case"</border>":break;case"<left/>":break;case"<left":case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":case"<bottom>":break;case"</bottom>":break;case"<diagonal":case"<diagonal>":case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":case"<horizontal>":case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":case"<vertical>":case"<vertical/>":break;case"</vertical>":break;case"<start":case"<start>":case"<start/>":break;case"</start>":break;case"<end":case"<end>":case"<end/>":break;case"</end>":break;case"<color":case"<color>":break;case"<color/>":case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in borders")}})}function Ore(e,t,r,n){t.Fills=[];var a={},i=!1;(e[0].match(ys)||[]).forEach(function(o){var l=ut(o);switch(Ya(l[0])){case"<fills":case"<fills>":case"</fills>":break;case"<fill>":case"<fill":case"<fill/>":a={},t.Fills.push(a);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":case"</gradientFill>":t.Fills.push(a),a={};break;case"<patternFill":case"<patternFill>":l.patternType&&(a.patternType=l.patternType);break;case"<patternFill/>":case"</patternFill>":break;case"<bgColor":a.bgColor||(a.bgColor={}),l.indexed&&(a.bgColor.indexed=parseInt(l.indexed,10)),l.theme&&(a.bgColor.theme=parseInt(l.theme,10)),l.tint&&(a.bgColor.tint=parseFloat(l.tint)),l.rgb&&(a.bgColor.rgb=l.rgb.slice(-6));break;case"<bgColor/>":case"</bgColor>":break;case"<fgColor":a.fgColor||(a.fgColor={}),l.theme&&(a.fgColor.theme=parseInt(l.theme,10)),l.tint&&(a.fgColor.tint=parseFloat(l.tint)),l.rgb!=null&&(a.fgColor.rgb=l.rgb.slice(-6));break;case"<fgColor/>":case"</fgColor>":break;case"<stop":case"<stop/>":break;case"</stop>":break;case"<color":case"<color/>":break;case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in fills")}})}function Pre(e,t,r,n){t.Fonts=[];var a={},i=!1;(e[0].match(ys)||[]).forEach(function(o){var l=ut(o);switch(Ya(l[0])){case"<fonts":case"<fonts>":case"</fonts>":break;case"<font":case"<font>":break;case"</font>":case"<font/>":t.Fonts.push(a),a={};break;case"<name":l.val&&(a.name=Kt(l.val));break;case"<name/>":case"</name>":break;case"<b":a.bold=l.val?Jt(l.val):1;break;case"<b/>":a.bold=1;break;case"<i":a.italic=l.val?Jt(l.val):1;break;case"<i/>":a.italic=1;break;case"<u":switch(l.val){case"none":a.underline=0;break;case"single":a.underline=1;break;case"double":a.underline=2;break;case"singleAccounting":a.underline=33;break;case"doubleAccounting":a.underline=34;break}break;case"<u/>":a.underline=1;break;case"<strike":a.strike=l.val?Jt(l.val):1;break;case"<strike/>":a.strike=1;break;case"<outline":a.outline=l.val?Jt(l.val):1;break;case"<outline/>":a.outline=1;break;case"<shadow":a.shadow=l.val?Jt(l.val):1;break;case"<shadow/>":a.shadow=1;break;case"<condense":a.condense=l.val?Jt(l.val):1;break;case"<condense/>":a.condense=1;break;case"<extend":a.extend=l.val?Jt(l.val):1;break;case"<extend/>":a.extend=1;break;case"<sz":l.val&&(a.sz=+l.val);break;case"<sz/>":case"</sz>":break;case"<vertAlign":l.val&&(a.vertAlign=l.val);break;case"<vertAlign/>":case"</vertAlign>":break;case"<family":l.val&&(a.family=parseInt(l.val,10));break;case"<family/>":case"</family>":break;case"<scheme":l.val&&(a.scheme=l.val);break;case"<scheme/>":case"</scheme>":break;case"<charset":if(l.val=="1")break;l.codepage=zw[parseInt(l.val,10)];break;case"<color":if(a.color||(a.color={}),l.auto&&(a.color.auto=Jt(l.auto)),l.rgb)a.color.rgb=l.rgb.slice(-6);else if(l.indexed){a.color.index=parseInt(l.indexed,10);var c=Ol[a.color.index];a.color.index==81&&(c=Ol[1]),c||(c=Ol[1]),a.color.rgb=c[0].toString(16)+c[1].toString(16)+c[2].toString(16)}else l.theme&&(a.color.theme=parseInt(l.theme,10),l.tint&&(a.color.tint=parseFloat(l.tint)),l.theme&&r.themeElements&&r.themeElements.clrScheme&&(a.color.rgb=ox(r.themeElements.clrScheme[a.color.theme].rgb,a.color.tint||0)));break;case"<color/>":case"</color>":break;case"<AlternateContent":i=!0;break;case"</AlternateContent>":i=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+l[0]+" in fonts")}})}function Ire(e,t,r){t.NumberFmt=[];for(var n=Wa(gt),a=0;a<n.length;++a)t.NumberFmt[n[a]]=gt[n[a]];var i=e[0].match(ys);if(i)for(a=0;a<i.length;++a){var o=ut(i[a]);switch(Ya(o[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":break;case"<numFmt":{var l=Rt(Kt(o.formatCode)),c=parseInt(o.numFmtId,10);if(t.NumberFmt[c]=l,c>0){if(c>392){for(c=392;c>60&&t.NumberFmt[c]!=null;--c);t.NumberFmt[c]=l}Dl(l,c)}}break;case"</numFmt>":break;default:if(r.WTF)throw new Error("unrecognized "+o[0]+" in numFmts")}}}var Tm=["numFmtId","fillId","fontId","borderId","xfId"],Am=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function Fre(e,t,r){t.CellXf=[];var n,a=!1;(e[0].match(ys)||[]).forEach(function(i){var o=ut(i),l=0;switch(Ya(o[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":break;case"<xf":case"<xf/>":for(n=o,delete n[0],l=0;l<Tm.length;++l)n[Tm[l]]&&(n[Tm[l]]=parseInt(n[Tm[l]],10));for(l=0;l<Am.length;++l)n[Am[l]]&&(n[Am[l]]=Jt(n[Am[l]]));if(t.NumberFmt&&n.numFmtId>392){for(l=392;l>60;--l)if(t.NumberFmt[n.numFmtId]==t.NumberFmt[l]){n.numFmtId=l;break}}t.CellXf.push(n);break;case"</xf>":break;case"<alignment":case"<alignment/>":var c={};o.vertical&&(c.vertical=o.vertical),o.horizontal&&(c.horizontal=o.horizontal),o.textRotation!=null&&(c.textRotation=o.textRotation),o.indent&&(c.indent=o.indent),o.wrapText&&(c.wrapText=Jt(o.wrapText)),n.alignment=c;break;case"</alignment>":break;case"<protection":break;case"</protection>":case"<protection/>":break;case"<AlternateContent":a=!0;break;case"</AlternateContent>":a=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;default:if(r&&r.WTF&&!a)throw new Error("unrecognized "+o[0]+" in cellXfs")}})}var Lre=function(){var t=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,r=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,n=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,a=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,i=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(l,c,u){var d={};if(!l)return d;l=l.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var f;return(f=l.match(t))&&Ire(f,d,u),(f=l.match(a))&&Pre(f,d,c,u),(f=l.match(n))&&Ore(f,d,c,u),(f=l.match(i))&&Dre(f,d,c,u),(f=l.match(r))&&Fre(f,d,u),d}}();function Mre(e,t){var r=e.read_shift(2),n=xs(e);return[r,n]}function Bre(e,t,r){var n={};n.sz=e.read_shift(2)/20;var a=YZ(e);a.fItalic&&(n.italic=1),a.fCondense&&(n.condense=1),a.fExtend&&(n.extend=1),a.fShadow&&(n.shadow=1),a.fOutline&&(n.outline=1),a.fStrikeout&&(n.strike=1);var i=e.read_shift(2);switch(i===700&&(n.bold=1),e.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript";break}var o=e.read_shift(1);o!=0&&(n.underline=o);var l=e.read_shift(1);l>0&&(n.family=l);var c=e.read_shift(1);switch(c>0&&(n.charset=c),e.l++,n.color=KZ(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=xs(e),n}var Ure=vs;function $re(e,t){var r=e.l+t,n=e.read_shift(2),a=e.read_shift(2);return e.l=r,{ixfe:n,numFmtId:a}}var qre=vs;function zre(e,t,r){var n={};n.NumberFmt=[];for(var a in gt)n.NumberFmt[a]=gt[a];n.CellXf=[],n.Fonts=[];var i=[],o=!1;return Mi(e,function(c,u,d){switch(d){case 44:n.NumberFmt[c[0]]=c[1],Dl(c[1],c[0]);break;case 43:n.Fonts.push(c),c.color.theme!=null&&t&&t.themeElements&&t.themeElements.clrScheme&&(c.color.rgb=ox(t.themeElements.clrScheme[c.color.theme].rgb,c.color.tint||0));break;case 1025:break;case 45:break;case 46:break;case 47:i[i.length-1]==617&&n.CellXf.push(c);break;case 48:case 507:case 572:case 475:break;case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 35:o=!0;break;case 36:o=!1;break;case 37:i.push(d),o=!0;break;case 38:i.pop(),o=!1;break;default:if(u.T>0)i.push(d);else if(u.T<0)i.pop();else if(!o||r.WTF&&i[i.length-1]!=37)throw new Error("Unexpected record 0x"+d.toString(16))}}),n}var Vre=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function Hre(e,t,r){t.themeElements.clrScheme=[];var n={};(e[0].match(ys)||[]).forEach(function(a){var i=ut(a);switch(i[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":n.rgb=i.val;break;case"<a:sysClr":n.rgb=i.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>":i[0].charAt(1)==="/"?(t.themeElements.clrScheme[Vre.indexOf(i[0])]=n,n={}):n.name=i[0].slice(3,i[0].length-1);break;default:if(r&&r.WTF)throw new Error("Unrecognized "+i[0]+" in clrScheme")}})}function Wre(){}function Gre(){}var Kre=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,Yre=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,Xre=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/;function Qre(e,t,r){t.themeElements={};var n;[["clrScheme",Kre,Hre],["fontScheme",Yre,Wre],["fmtScheme",Xre,Gre]].forEach(function(a){if(!(n=e.match(a[1])))throw new Error(a[0]+" not found in themeElements");a[2](n,t,r)})}var Jre=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function E6(e,t){(!e||e.length===0)&&(e=Zre());var r,n={};if(!(r=e.match(Jre)))throw new Error("themeElements not found in theme");return Qre(r[0],n,t),n.raw=e,n}function Zre(e,t){var r=[MP];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}function ese(e,t,r){var n=e.l+t,a=e.read_shift(4);if(a!==124226){if(!r.cellStyles){e.l=n;return}var i=e.slice(e.l);e.l=n;var o;try{o=LP(i,{type:"array"})}catch{return}var l=nn(o,"theme/theme/theme1.xml",!0);if(l)return E6(l,r)}}function tse(e){return e.read_shift(4)}function rse(e){var t={};switch(t.xclrType=e.read_shift(2),t.nTintShade=e.read_shift(2),t.xclrType){case 0:e.l+=4;break;case 1:t.xclrValue=sse(e,4);break;case 2:t.xclrValue=h6(e);break;case 3:t.xclrValue=tse(e);break;case 4:e.l+=4;break}return e.l+=8,t}function sse(e,t){return vs(e,t)}function nse(e,t){return vs(e,t)}function ase(e){var t=e.read_shift(2),r=e.read_shift(2)-4,n=[t];switch(t){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:n[1]=rse(e);break;case 6:n[1]=nse(e,r);break;case 14:case 15:n[1]=e.read_shift(r===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+t+" "+r)}return n}function ise(e,t){var r=e.l+t;e.l+=2;var n=e.read_shift(2);e.l+=2;for(var a=e.read_shift(2),i=[];a-- >0;)i.push(ase(e,r-e.l));return{ixfe:n,ext:i}}function ose(e,t){t.forEach(function(r){switch(r[0]){}})}function lse(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:xs(e)}}function cse(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function use(e){return e.l+=4,e.read_shift(4)!=0}function dse(e,t,r){var n={Types:[],Cell:[],Value:[]},a=r||{},i=[],o=!1,l=2;return Mi(e,function(c,u,d){switch(d){case 335:n.Types.push({name:c.name});break;case 51:c.forEach(function(f){l==1?n.Cell.push({type:n.Types[f[0]-1].name,index:f[1]}):l==0&&n.Value.push({type:n.Types[f[0]-1].name,index:f[1]})});break;case 337:l=c?1:0;break;case 338:l=2;break;case 35:i.push(d),o=!0;break;case 36:i.pop(),o=!1;break;default:if(!u.T){if(!o||a.WTF&&i[i.length-1]!=35)throw new Error("Unexpected record 0x"+d.toString(16))}}}),n}function fse(e,t,r){var n={Types:[],Cell:[],Value:[]};if(!e)return n;var a=!1,i=2,o;return e.replace(ys,function(l){var c=ut(l);switch(Ya(c[0])){case"<?xml":break;case"<metadata":case"</metadata>":break;case"<metadataTypes":case"</metadataTypes>":break;case"<metadataType":n.Types.push({name:c.name});break;case"</metadataType>":break;case"<futureMetadata":for(var u=0;u<n.Types.length;++u)n.Types[u].name==c.name&&(o=n.Types[u]);break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":i==1?n.Cell.push({type:n.Types[c.t-1].name,index:+c.v}):i==0&&n.Value.push({type:n.Types[c.t-1].name,index:+c.v});break;case"</rc>":break;case"<cellMetadata":i=1;break;case"</cellMetadata>":i=2;break;case"<valueMetadata":i=0;break;case"</valueMetadata>":i=2;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":a=!0;break;case"</ext>":a=!1;break;case"<rvb":if(!o)break;o.offsets||(o.offsets=[]),o.offsets.push(+c.i);break;default:if(!a&&r.WTF)throw new Error("unrecognized "+c[0]+" in metadata")}return l}),n}function hse(e){var t=[];if(!e)return t;var r=1;return(e.match(ys)||[]).forEach(function(n){var a=ut(n);switch(a[0]){case"<?xml":break;case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete a[0],a.i?r=a.i:a.i=r,t.push(a);break}}),t}function mse(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=ft(r);var n=e.read_shift(1);return n&2&&(t.l="1"),n&8&&(t.a="1"),t}function pse(e,t,r){var n=[];return Mi(e,function(i,o,l){switch(l){case 63:n.push(i);break;default:if(!o.T)throw new Error("Unexpected record 0x"+l.toString(16))}}),n}function xse(e,t,r,n){if(!e)return e;var a=n||{},i=!1;Mi(e,function(l,c,u){switch(u){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:i=!0;break;case 36:i=!1;break;default:if(!c.T){if(!i||a.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}},a)}function gse(e,t){if(!e)return"??";var r=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][r].Target}function VC(e,t,r,n){var a=Array.isArray(e),i;t.forEach(function(o){var l=ks(o.ref);if(a?(e[l.r]||(e[l.r]=[]),i=e[l.r][l.c]):i=e[o.ref],!i){i={t:"z"},a?e[l.r][l.c]=i:e[o.ref]=i;var c=hr(e["!ref"]||"BDWGO1000001:A1");c.s.r>l.r&&(c.s.r=l.r),c.e.r<l.r&&(c.e.r=l.r),c.s.c>l.c&&(c.s.c=l.c),c.e.c<l.c&&(c.e.c=l.c);var u=Tt(c);u!==e["!ref"]&&(e["!ref"]=u)}i.c||(i.c=[]);var d={a:o.author,t:o.t,r:o.r,T:r};o.h&&(d.h=o.h);for(var f=i.c.length-1;f>=0;--f){if(!r&&i.c[f].T)return;r&&!i.c[f].T&&i.c.splice(f,1)}if(r&&n){for(f=0;f<n.length;++f)if(d.a==n[f].id){d.a=n[f].name||d.a;break}}i.c.push(d)})}function vse(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var r=[],n=[],a=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);a&&a[1]&&a[1].split(/<\/\w*:?author>/).forEach(function(o){if(!(o===""||o.trim()==="")){var l=o.match(/<(?:\w+:)?author[^>]*>(.*)/);l&&r.push(l[1])}});var i=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return i&&i[1]&&i[1].split(/<\/\w*:?comment>/).forEach(function(o){if(!(o===""||o.trim()==="")){var l=o.match(/<(?:\w+:)?comment[^>]*>/);if(l){var c=ut(l[0]),u={author:c.authorId&&r[c.authorId]||"sheetjsghost",ref:c.ref,guid:c.guid},d=ks(c.ref);if(!(t.sheetRows&&t.sheetRows<=d.r)){var f=o.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),h=!!f&&!!f[1]&&ij(f[1])||{r:"",t:"",h:""};u.r=h.r,h.r=="<t></t>"&&(h.t=h.h=""),u.t=(h.t||"").replace(/\r\n/g,`
`).replace(/\r/g,`
`),t.cellHTML&&(u.h=h.h),n.push(u)}}}}),n}function yse(e,t){var r=[],n=!1,a={},i=0;return e.replace(ys,function(l,c){var u=ut(l);switch(Ya(u[0])){case"<?xml":break;case"<ThreadedComments":break;case"</ThreadedComments>":break;case"<threadedComment":a={author:u.personId,guid:u.id,ref:u.ref,T:1};break;case"</threadedComment>":a.t!=null&&r.push(a);break;case"<text>":case"<text":i=c+l.length;break;case"</text>":a.t=e.slice(i,c).replace(/\r\n/g,`
`).replace(/\r/g,`
`);break;case"<mentions":case"<mentions>":n=!0;break;case"</mentions>":n=!1;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+u[0]+" in threaded comments")}return l}),r}function bse(e,t){var r=[],n=!1;return e.replace(ys,function(i){var o=ut(i);switch(Ya(o[0])){case"<?xml":break;case"<personList":break;case"</personList>":break;case"<person":r.push({name:o.displayname,id:o.id});break;case"</person>":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+o[0]+" in threaded comments")}return i}),r}function wse(e){var t={};t.iauthor=e.read_shift(4);var r=fc(e);return t.rfx=r.s,t.ref=ft(r.s),e.l+=16,t}var jse=xs;function Nse(e,t){var r=[],n=[],a={},i=!1;return Mi(e,function(l,c,u){switch(u){case 632:n.push(l);break;case 635:a=l;break;case 637:a.t=l.t,a.h=l.h,a.r=l.r;break;case 636:if(a.author=n[a.iauthor],delete a.iauthor,t.sheetRows&&a.rfx&&t.sheetRows<=a.rfx.r)break;a.t||(a.t=""),delete a.rfx,r.push(a);break;case 3072:break;case 35:i=!0;break;case 36:i=!1;break;case 37:break;case 38:break;default:if(!c.T){if(!i||t.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}}),r}var _se="application/vnd.ms-office.vbaProject";function Cse(e){var t=kt.utils.cfb_new({root:"R"});return e.FullPaths.forEach(function(r,n){if(!(r.slice(-1)==="/"||!r.match(/_VBA_PROJECT_CUR/))){var a=r.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");kt.utils.cfb_add(t,a,e.FileIndex[n].content)}}),kt.write(t)}function Sse(){return{"!type":"dialog"}}function Ese(){return{"!type":"dialog"}}function kse(){return{"!type":"macro"}}function Tse(){return{"!type":"macro"}}var au=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(n,a,i,o){var l=!1,c=!1;i.length==0?c=!0:i.charAt(0)=="["&&(c=!0,i=i.slice(1,-1)),o.length==0?l=!0:o.charAt(0)=="["&&(l=!0,o=o.slice(1,-1));var u=i.length>0?parseInt(i,10)|0:0,d=o.length>0?parseInt(o,10)|0:0;return l?d+=t.c:--d,c?u+=t.r:--u,a+(l?"":"$")+Mr(d)+(c?"":"$")+ts(u)}return function(a,i){return t=i,a.replace(e,r)}}(),k6=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,Ase=function(){return function(t,r){return t.replace(k6,function(n,a,i,o,l,c){var u=ej(o)-(i?0:r.c),d=Zw(c)-(l?0:r.r),f=d==0?"":l?d+1:"["+d+"]",h=u==0?"":i?u+1:"["+u+"]";return a+"R"+f+"C"+h})}}();function T6(e,t){return e.replace(k6,function(r,n,a,i,o,l){return n+(a=="$"?a+i:Mr(ej(i)+t.c))+(o=="$"?o+l:ts(Zw(l)+t.r))})}function Rse(e,t,r){var n=cd(t),a=n.s,i=ks(r),o={r:i.r-a.r,c:i.c-a.c};return T6(e,o)}function Dse(e){return e.length!=1}function HC(e){return e.replace(/_xlfn\./g,"")}function yr(e){e.l+=1}function Ho(e,t){var r=e.read_shift(2);return[r&16383,r>>14&1,r>>15&1]}function A6(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return R6(e);r.biff==12&&(n=4)}var a=e.read_shift(n),i=e.read_shift(n),o=Ho(e),l=Ho(e);return{s:{r:a,c:o[0],cRel:o[1],rRel:o[2]},e:{r:i,c:l[0],cRel:l[1],rRel:l[2]}}}function R6(e){var t=Ho(e),r=Ho(e),n=e.read_shift(1),a=e.read_shift(1);return{s:{r:t[0],c:n,cRel:t[1],rRel:t[2]},e:{r:r[0],c:a,cRel:r[1],rRel:r[2]}}}function Ose(e,t,r){if(r.biff<8)return R6(e);var n=e.read_shift(r.biff==12?4:2),a=e.read_shift(r.biff==12?4:2),i=Ho(e),o=Ho(e);return{s:{r:n,c:i[0],cRel:i[1],rRel:i[2]},e:{r:a,c:o[0],cRel:o[1],rRel:o[2]}}}function D6(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return Pse(e);var n=e.read_shift(r&&r.biff==12?4:2),a=Ho(e);return{r:n,c:a[0],cRel:a[1],rRel:a[2]}}function Pse(e){var t=Ho(e),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function Ise(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}function Fse(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return Lse(e);var a=e.read_shift(n>=12?4:2),i=e.read_shift(2),o=(i&16384)>>14,l=(i&32768)>>15;if(i&=16383,l==1)for(;a>524287;)a-=1048576;if(o==1)for(;i>8191;)i=i-16384;return{r:a,c:i,cRel:o,rRel:l}}function Lse(e){var t=e.read_shift(2),r=e.read_shift(1),n=(t&32768)>>15,a=(t&16384)>>14;return t&=16383,n==1&&t>=8192&&(t=t-16384),a==1&&r>=128&&(r=r-256),{r:t,c:r,cRel:a,rRel:n}}function Mse(e,t,r){var n=(e[e.l++]&96)>>5,a=A6(e,r.biff>=2&&r.biff<=5?6:8,r);return[n,a]}function Bse(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2,"i"),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12;break}var o=A6(e,i,r);return[n,a,o]}function Use(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[n]}function $se(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12;break}return e.l+=i,[n,a]}function qse(e,t,r){var n=(e[e.l++]&96)>>5,a=Ose(e,t-1,r);return[n,a]}function zse(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r.biff==2?6:r.biff==12?14:7,[n]}function WC(e){var t=e[e.l+1]&1,r=1;return e.l+=4,[t,r]}function Vse(e,t,r){e.l+=2;for(var n=e.read_shift(r&&r.biff==2?1:2),a=[],i=0;i<=n;++i)a.push(e.read_shift(r&&r.biff==2?1:2));return a}function Hse(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function Wse(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function Gse(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function Kse(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=r&&r.biff==2?3:4,[n]}function O6(e){var t=e.read_shift(1),r=e.read_shift(1);return[t,r]}function Yse(e){return e.read_shift(2),O6(e)}function Xse(e){return e.read_shift(2),O6(e)}function Qse(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=D6(e,0,r);return[n,a]}function Jse(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=Fse(e,0,r);return[n,a]}function Zse(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=e.read_shift(2);r&&r.biff==5&&(e.l+=12);var i=D6(e,0,r);return[n,a,i]}function ene(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var a=e.read_shift(r&&r.biff<=3?1:2);return[tae[a],F6[a],n]}function tne(e,t,r){var n=e[e.l++],a=e.read_shift(1),i=r&&r.biff<=3?[n==88?-1:0,e.read_shift(1)]:rne(e);return[a,(i[0]===0?F6:eae)[i[1]]]}function rne(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function sne(e,t,r){e.l+=r&&r.biff==2?3:4}function nne(e,t,r){if(e.l++,r&&r.biff==12)return[e.read_shift(4,"i"),0];var n=e.read_shift(2),a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function ane(e){return e.l++,hc[e.read_shift(1)]}function ine(e){return e.l++,e.read_shift(2)}function one(e){return e.l++,e.read_shift(1)!==0}function lne(e){return e.l++,ms(e)}function cne(e,t,r){return e.l++,Oh(e,t-1,r)}function une(e,t){var r=[e.read_shift(1)];if(t==12)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2;break}switch(r[0]){case 4:r[1]=mr(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:r[1]=hc[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:r[1]=ms(e);break;case 2:r[1]=mc(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function dne(e,t,r){for(var n=e.read_shift(r.biff==12?4:2),a=[],i=0;i!=n;++i)a.push((r.biff==12?fc:b0)(e));return a}function fne(e,t,r){var n=0,a=0;r.biff==12?(n=e.read_shift(4),a=e.read_shift(4)):(a=1+e.read_shift(1),n=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--n,--a==0&&(a=256));for(var i=0,o=[];i!=n&&(o[i]=[]);++i)for(var l=0;l!=a;++l)o[i][l]=une(e,r.biff);return o}function hne(e,t,r){var n=e.read_shift(1)>>>5&3,a=!r||r.biff>=8?4:2,i=e.read_shift(a);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[n,0,i]}function mne(e,t,r){if(r.biff==5)return pne(e);var n=e.read_shift(1)>>>5&3,a=e.read_shift(2),i=e.read_shift(4);return[n,a,i]}function pne(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[t,r,n]}function xne(e,t,r){var n=e.read_shift(1)>>>5&3;e.l+=r&&r.biff==2?3:4;var a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function gne(e,t,r){var n=e.read_shift(1)>>>5&3,a=e.read_shift(r&&r.biff==2?1:2);return[n,a]}function vne(e,t,r){var n=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,r.biff==12&&(e.l+=2),[n]}function yne(e,t,r){var n=(e[e.l++]&96)>>5,a=e.read_shift(2),i=4;if(r)switch(r.biff){case 5:i=15;break;case 12:i=6;break}return e.l+=i,[n,a]}var bne=vs,wne=vs,jne=vs;function Ih(e,t,r){return e.l+=2,[Ise(e)]}function lj(e){return e.l+=6,[]}var Nne=Ih,_ne=lj,Cne=lj,Sne=Ih;function P6(e){return e.l+=2,[jr(e),e.read_shift(2)&1]}var Ene=Ih,kne=P6,Tne=lj,Ane=Ih,Rne=Ih,Dne=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function One(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),a=e.read_shift(2),i=e.read_shift(2),o=Dne[r>>2&31];return{ixti:t,coltype:r&3,rt:o,idx:n,c:a,C:i}}function Pne(e){return e.l+=2,[e.read_shift(4)]}function Ine(e,t,r){return e.l+=5,e.l+=2,e.l+=r.biff==2?1:4,["PTGSHEET"]}function Fne(e,t,r){return e.l+=r.biff==2?4:5,["PTGENDSHEET"]}function Lne(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function Mne(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function Bne(e){return e.l+=4,[0,0]}var GC={1:{n:"PtgExp",f:nne},2:{n:"PtgTbl",f:jne},3:{n:"PtgAdd",f:yr},4:{n:"PtgSub",f:yr},5:{n:"PtgMul",f:yr},6:{n:"PtgDiv",f:yr},7:{n:"PtgPower",f:yr},8:{n:"PtgConcat",f:yr},9:{n:"PtgLt",f:yr},10:{n:"PtgLe",f:yr},11:{n:"PtgEq",f:yr},12:{n:"PtgGe",f:yr},13:{n:"PtgGt",f:yr},14:{n:"PtgNe",f:yr},15:{n:"PtgIsect",f:yr},16:{n:"PtgUnion",f:yr},17:{n:"PtgRange",f:yr},18:{n:"PtgUplus",f:yr},19:{n:"PtgUminus",f:yr},20:{n:"PtgPercent",f:yr},21:{n:"PtgParen",f:yr},22:{n:"PtgMissArg",f:yr},23:{n:"PtgStr",f:cne},26:{n:"PtgSheet",f:Ine},27:{n:"PtgEndSheet",f:Fne},28:{n:"PtgErr",f:ane},29:{n:"PtgBool",f:one},30:{n:"PtgInt",f:ine},31:{n:"PtgNum",f:lne},32:{n:"PtgArray",f:zse},33:{n:"PtgFunc",f:ene},34:{n:"PtgFuncVar",f:tne},35:{n:"PtgName",f:hne},36:{n:"PtgRef",f:Qse},37:{n:"PtgArea",f:Mse},38:{n:"PtgMemArea",f:xne},39:{n:"PtgMemErr",f:bne},40:{n:"PtgMemNoMem",f:wne},41:{n:"PtgMemFunc",f:gne},42:{n:"PtgRefErr",f:vne},43:{n:"PtgAreaErr",f:Use},44:{n:"PtgRefN",f:Jse},45:{n:"PtgAreaN",f:qse},46:{n:"PtgMemAreaN",f:Lne},47:{n:"PtgMemNoMemN",f:Mne},57:{n:"PtgNameX",f:mne},58:{n:"PtgRef3d",f:Zse},59:{n:"PtgArea3d",f:Bse},60:{n:"PtgRefErr3d",f:yne},61:{n:"PtgAreaErr3d",f:$se},255:{}},Une={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},$ne={1:{n:"PtgElfLel",f:P6},2:{n:"PtgElfRw",f:Ane},3:{n:"PtgElfCol",f:Nne},6:{n:"PtgElfRwV",f:Rne},7:{n:"PtgElfColV",f:Sne},10:{n:"PtgElfRadical",f:Ene},11:{n:"PtgElfRadicalS",f:Tne},13:{n:"PtgElfColS",f:_ne},15:{n:"PtgElfColSV",f:Cne},16:{n:"PtgElfRadicalLel",f:kne},25:{n:"PtgList",f:One},29:{n:"PtgSxName",f:Pne},255:{}},qne={0:{n:"PtgAttrNoop",f:Bne},1:{n:"PtgAttrSemi",f:Kse},2:{n:"PtgAttrIf",f:Wse},4:{n:"PtgAttrChoose",f:Vse},8:{n:"PtgAttrGoto",f:Hse},16:{n:"PtgAttrSum",f:sne},32:{n:"PtgAttrBaxcel",f:WC},33:{n:"PtgAttrBaxcel",f:WC},64:{n:"PtgAttrSpace",f:Yse},65:{n:"PtgAttrSpaceSemi",f:Xse},128:{n:"PtgAttrIfError",f:Gse},255:{}};function Fh(e,t,r,n){if(n.biff<8)return vs(e,t);for(var a=e.l+t,i=[],o=0;o!==r.length;++o)switch(r[o][0]){case"PtgArray":r[o][1]=fne(e,0,n),i.push(r[o][1]);break;case"PtgMemArea":r[o][2]=dne(e,r[o][1],n),i.push(r[o][2]);break;case"PtgExp":n&&n.biff==12&&(r[o][1][1]=e.read_shift(4),i.push(r[o][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[o][0]}return t=a-e.l,t!==0&&i.push(vs(e,t)),i}function Lh(e,t,r){for(var n=e.l+t,a,i,o=[];n!=e.l;)t=n-e.l,i=e[e.l],a=GC[i]||GC[Une[i]],(i===24||i===25)&&(a=(i===24?$ne:qne)[e[e.l+1]]),!a||!a.f?vs(e,t):o.push([a.n,a.f(e,t,r)]);return o}function zne(e){for(var t=[],r=0;r<e.length;++r){for(var n=e[r],a=[],i=0;i<n.length;++i){var o=n[i];if(o)switch(o[0]){case 2:a.push('"'+o[1].replace(/"/g,'""')+'"');break;default:a.push(o[1])}else a.push("")}t.push(a.join(","))}return t.join(";")}var Vne={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function Hne(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function I6(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!n)return"SH33TJSERR1";var a="";if(r.biff>8)switch(e[n[0]][0]){case 357:return a=n[1]==-1?"#REF":e.SheetNames[n[1]],n[1]==n[2]?a:a+":"+e.SheetNames[n[2]];case 358:return r.SID!=null?e.SheetNames[r.SID]:"SH33TJSSAME"+e[n[0]][0];case 355:default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return a=n[1]==-1?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?a:a+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(i){return i.Name}).join(";;");default:return e[n[0]][0][3]?(a=n[1]==-1?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?a:a+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function KC(e,t,r){var n=I6(e,t,r);return n=="#REF"?n:Hne(n,r)}function ds(e,t,r,n,a){var i=a&&a.biff||8,o={s:{c:0,r:0}},l=[],c,u,d,f=0,h=0,m,v="";if(!e[0]||!e[0][0])return"";for(var p=-1,x="",w=0,y=e[0].length;w<y;++w){var b=e[0][w];switch(b[0]){case"PtgUminus":l.push("-"+l.pop());break;case"PtgUplus":l.push("+"+l.pop());break;case"PtgPercent":l.push(l.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(c=l.pop(),u=l.pop(),p>=0){switch(e[0][p][1][0]){case 0:x=ur(" ",e[0][p][1][1]);break;case 1:x=ur("\r",e[0][p][1][1]);break;default:if(x="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][p][1][0])}u=u+x,p=-1}l.push(u+Vne[b[0]]+c);break;case"PtgIsect":c=l.pop(),u=l.pop(),l.push(u+" "+c);break;case"PtgUnion":c=l.pop(),u=l.pop(),l.push(u+","+c);break;case"PtgRange":c=l.pop(),u=l.pop(),l.push(u+":"+c);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":d=uf(b[1][1],o,a),l.push(df(d,i));break;case"PtgRefN":d=r?uf(b[1][1],r,a):b[1][1],l.push(df(d,i));break;case"PtgRef3d":f=b[1][1],d=uf(b[1][2],o,a),v=KC(n,f,a),l.push(v+"!"+df(d,i));break;case"PtgFunc":case"PtgFuncVar":var N=b[1][0],C=b[1][1];N||(N=0),N&=127;var _=N==0?[]:l.slice(-N);l.length-=N,C==="User"&&(C=_.shift()),l.push(C+"("+_.join(",")+")");break;case"PtgBool":l.push(b[1]?"TRUE":"FALSE");break;case"PtgInt":l.push(b[1]);break;case"PtgNum":l.push(String(b[1]));break;case"PtgStr":l.push('"'+b[1].replace(/"/g,'""')+'"');break;case"PtgErr":l.push(b[1]);break;case"PtgAreaN":m=kC(b[1][1],r?{s:r}:o,a),l.push(Rg(m,a));break;case"PtgArea":m=kC(b[1][1],o,a),l.push(Rg(m,a));break;case"PtgArea3d":f=b[1][1],m=b[1][2],v=KC(n,f,a),l.push(v+"!"+Rg(m,a));break;case"PtgAttrSum":l.push("SUM("+l.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":h=b[1][2];var j=(n.names||[])[h-1]||(n[0]||[])[h],S=j?j.Name:"SH33TJSNAME"+String(h);S&&S.slice(0,6)=="_xlfn."&&!a.xlfn&&(S=S.slice(6)),l.push(S);break;case"PtgNameX":var k=b[1][1];h=b[1][2];var D;if(a.biff<=5)k<0&&(k=-k),n[k]&&(D=n[k][h]);else{var M="";if(((n[k]||[])[0]||[])[0]==14849||(((n[k]||[])[0]||[])[0]==1025?n[k][h]&&n[k][h].itab>0&&(M=n.SheetNames[n[k][h].itab-1]+"!"):M=n.SheetNames[h-1]+"!"),n[k]&&n[k][h])M+=n[k][h].Name;else if(n[0]&&n[0][h])M+=n[0][h].Name;else{var T=(I6(n,k,a)||"").split(";;");T[h-1]?M=T[h-1]:M+="SH33TJSERRX"}l.push(M);break}D||(D={Name:"SH33TJSERRY"}),l.push(D.Name);break;case"PtgParen":var A="(",W=")";if(p>=0){switch(x="",e[0][p][1][0]){case 2:A=ur(" ",e[0][p][1][1])+A;break;case 3:A=ur("\r",e[0][p][1][1])+A;break;case 4:W=ur(" ",e[0][p][1][1])+W;break;case 5:W=ur("\r",e[0][p][1][1])+W;break;default:if(a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][p][1][0])}p=-1}l.push(A+l.pop()+W);break;case"PtgRefErr":l.push("#REF!");break;case"PtgRefErr3d":l.push("#REF!");break;case"PtgExp":d={c:b[1][1],r:b[1][0]};var P={c:r.c,r:r.r};if(n.sharedf[ft(d)]){var V=n.sharedf[ft(d)];l.push(ds(V,o,P,n,a))}else{var Z=!1;for(c=0;c!=n.arrayf.length;++c)if(u=n.arrayf[c],!(d.c<u[0].s.c||d.c>u[0].e.c)&&!(d.r<u[0].s.r||d.r>u[0].e.r)){l.push(ds(u[1],o,P,n,a)),Z=!0;break}Z||l.push(b[1])}break;case"PtgArray":l.push("{"+zne(b[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":p=w;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":l.push("");break;case"PtgAreaErr":l.push("#REF!");break;case"PtgAreaErr3d":l.push("#REF!");break;case"PtgList":l.push("Table"+b[1].idx+"[#"+b[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(b));default:throw new Error("Unrecognized Formula Token: "+String(b))}var Q=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(a.biff!=3&&p>=0&&Q.indexOf(e[0][w][0])==-1){b=e[0][p];var O=!0;switch(b[1][0]){case 4:O=!1;case 0:x=ur(" ",b[1][1]);break;case 5:O=!1;case 1:x=ur("\r",b[1][1]);break;default:if(x="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+b[1][0])}l.push((O?x:"")+l.pop()+(O?"":x)),p=-1}}if(l.length>1&&a.WTF)throw new Error("bad formula stack");return l[0]}function Wne(e,t,r){var n=e.l+t,a=r.biff==2?1:2,i,o=e.read_shift(a);if(o==65535)return[[],vs(e,t-2)];var l=Lh(e,o,r);return t!==o+a&&(i=Fh(e,t-o-a,l,r)),e.l=n,[l,i]}function Gne(e,t,r){var n=e.l+t,a=r.biff==2?1:2,i,o=e.read_shift(a);if(o==65535)return[[],vs(e,t-2)];var l=Lh(e,o,r);return t!==o+a&&(i=Fh(e,t-o-a,l,r)),e.l=n,[l,i]}function Kne(e,t,r,n){var a=e.l+t,i=Lh(e,n,r),o;return a!==e.l&&(o=Fh(e,a-e.l,i,r)),[i,o]}function Yne(e,t,r){var n=e.l+t,a,i=e.read_shift(2),o=Lh(e,i,r);return i==65535?[[],vs(e,t-2)]:(t!==i+2&&(a=Fh(e,n-i-2,o,r)),[o,a])}function Xne(e){var t;if(di(e,e.l+6)!==65535)return[ms(e),"n"];switch(e[e.l]){case 0:return e.l+=8,["String","s"];case 1:return t=e[e.l+2]===1,e.l+=8,[t,"b"];case 2:return t=e[e.l+2],e.l+=8,[t,"e"];case 3:return e.l+=8,["","s"]}return[]}function Pg(e,t,r){var n=e.l+t,a=Xa(e);r.biff==2&&++e.l;var i=Xne(e),o=e.read_shift(1);r.biff!=2&&(e.read_shift(1),r.biff>=5&&e.read_shift(4));var l=Gne(e,n-e.l,r);return{cell:a,val:i[0],formula:l,shared:o>>3&1,tt:i[1]}}function w0(e,t,r){var n=e.read_shift(4),a=Lh(e,n,r),i=e.read_shift(4),o=i>0?Fh(e,i,a,r):null;return[a,o]}var Qne=w0,j0=w0,Jne=w0,Zne=w0,eae={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},F6={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},tae={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function YC(e){return e.slice(0,3)=="of:"&&(e=e.slice(3)),e.charCodeAt(0)==61&&(e=e.slice(1),e.charCodeAt(0)==61&&(e=e.slice(1))),e=e.replace(/COM\.MICROSOFT\./g,""),e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(t,r){return r.replace(/\./g,"")}),e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1"),e.replace(/[;~]/g,",").replace(/\|/g,";")}function Ig(e){var t=e.split(":"),r=t[0].split(".")[0];return[r,t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}var pf={},iu={};function xf(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];t=="xlml"&&(r=[1,1,1,1,.5,.5]),e.left==null&&(e.left=r[0]),e.right==null&&(e.right=r[1]),e.top==null&&(e.top=r[2]),e.bottom==null&&(e.bottom=r[3]),e.header==null&&(e.header=r[4]),e.footer==null&&(e.footer=r[5])}}function L6(e,t,r,n,a,i){try{n.cellNF&&(e.z=gt[t])}catch(l){if(n.WTF)throw l}if(!(e.t==="z"&&!n.cellStyles)){if(e.t==="d"&&typeof e.v=="string"&&(e.v=Gr(e.v)),(!n||n.cellText!==!1)&&e.t!=="z")try{if(gt[t]==null&&Dl(rZ[t]||"General",t),e.t==="e")e.w=e.w||hc[e.v];else if(t===0)if(e.t==="n")(e.v|0)===e.v?e.w=e.v.toString(10):e.w=rh(e.v);else if(e.t==="d"){var o=Rs(e.v);(o|0)===o?e.w=o.toString(10):e.w=rh(o)}else{if(e.v===void 0)return"";e.w=Jl(e.v,iu)}else e.t==="d"?e.w=Ln(t,Rs(e.v),iu):e.w=Ln(t,e.v,iu)}catch(l){if(n.WTF)throw l}if(n.cellStyles&&r!=null)try{e.s=i.Fills[r],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=ox(a.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),n.WTF&&(e.s.fgColor.raw_rgb=a.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=ox(a.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),n.WTF&&(e.s.bgColor.raw_rgb=a.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(l){if(n.WTF&&i.Fills)throw l}}}function rae(e,t){var r=hr(t);r.s.r<=r.e.r&&r.s.c<=r.e.c&&r.s.r>=0&&r.s.c>=0&&(e["!ref"]=Tt(r))}var sae=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,nae=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,aae=/<(?:\w:)?hyperlink [^>]*>/mg,iae=/"(\w*:\w*)"/,oae=/<(?:\w:)?col\b[^>]*[\/]?>/g,lae=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,cae=/<(?:\w:)?pageMargins[^>]*\/>/g,M6=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,uae=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,dae=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function fae(e,t,r,n,a,i,o){if(!e)return e;n||(n={"!id":{}});var l=t.dense?[]:{},c={s:{r:2e6,c:2e6},e:{r:0,c:0}},u="",d="",f=e.match(nae);f?(u=e.slice(0,f.index),d=e.slice(f.index+f[0].length)):u=d=e;var h=u.match(M6);h?cj(h[0],l,a,r):(h=u.match(uae))&&hae(h[0],h[1]||"",l,a,r);var m=(u.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(m>0){var v=u.slice(m,m+50).match(iae);v&&rae(l,v[1])}var p=u.match(dae);p&&p[1]&&yae(p[1],a);var x=[];if(t.cellStyles){var w=u.match(oae);w&&xae(x,w)}f&&bae(f[1],l,t,c,i,o);var y=d.match(lae);y&&(l["!autofilter"]=gae(y[0]));var b=[],N=d.match(sae);if(N)for(m=0;m!=N.length;++m)b[m]=hr(N[m].slice(N[m].indexOf('"')+1));var C=d.match(aae);C&&mae(l,C,n);var _=d.match(cae);if(_&&(l["!margins"]=pae(ut(_[0]))),!l["!ref"]&&c.e.c>=c.s.c&&c.e.r>=c.s.r&&(l["!ref"]=Tt(c)),t.sheetRows>0&&l["!ref"]){var j=hr(l["!ref"]);t.sheetRows<=+j.e.r&&(j.e.r=t.sheetRows-1,j.e.r>c.e.r&&(j.e.r=c.e.r),j.e.r<j.s.r&&(j.s.r=j.e.r),j.e.c>c.e.c&&(j.e.c=c.e.c),j.e.c<j.s.c&&(j.s.c=j.e.c),l["!fullref"]=l["!ref"],l["!ref"]=Tt(j))}return x.length>0&&(l["!cols"]=x),b.length>0&&(l["!merges"]=b),l}function cj(e,t,r,n){var a=ut(e);r.Sheets[n]||(r.Sheets[n]={}),a.codeName&&(r.Sheets[n].CodeName=Rt(Kt(a.codeName)))}function hae(e,t,r,n,a){cj(e.slice(0,e.indexOf(">")),r,n,a)}function mae(e,t,r){for(var n=Array.isArray(e),a=0;a!=t.length;++a){var i=ut(Kt(t[a]),!0);if(!i.ref)return;var o=((r||{})["!id"]||[])[i.id];o?(i.Target=o.Target,i.location&&(i.Target+="#"+Rt(i.location))):(i.Target="#"+Rt(i.location),o={Target:i.Target,TargetMode:"Internal"}),i.Rel=o,i.tooltip&&(i.Tooltip=i.tooltip,delete i.tooltip);for(var l=hr(i.ref),c=l.s.r;c<=l.e.r;++c)for(var u=l.s.c;u<=l.e.c;++u){var d=ft({c:u,r:c});n?(e[c]||(e[c]=[]),e[c][u]||(e[c][u]={t:"z",v:void 0}),e[c][u].l=i):(e[d]||(e[d]={t:"z",v:void 0}),e[d].l=i)}}}function pae(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(r){e[r]&&(t[r]=parseFloat(e[r]))}),t}function xae(e,t){for(var r=!1,n=0;n!=t.length;++n){var a=ut(t[n],!0);a.hidden&&(a.hidden=Jt(a.hidden));var i=parseInt(a.min,10)-1,o=parseInt(a.max,10)-1;for(a.outlineLevel&&(a.level=+a.outlineLevel||0),delete a.min,delete a.max,a.width=+a.width,!r&&a.width&&(r=!0,oj(a.width)),qu(a);i<=o;)e[i++]=es(a)}}function gae(e){var t={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return t}var vae=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function yae(e,t){t.Views||(t.Views=[{}]),(e.match(vae)||[]).forEach(function(r,n){var a=ut(r);t.Views[n]||(t.Views[n]={}),+a.zoomScale&&(t.Views[n].zoom=+a.zoomScale),Jt(a.rightToLeft)&&(t.Views[n].RTL=!0)})}var bae=function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,r=/r=["']([^"']*)["']/,n=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,a=/ref=["']([^"']*)["']/,i=sh("v"),o=sh("f");return function(c,u,d,f,h,m){for(var v=0,p="",x=[],w=[],y=0,b=0,N=0,C="",_,j,S=0,k=0,D,M,T=0,A=0,W=Array.isArray(m.CellXf),P,V=[],Z=[],Q=Array.isArray(u),O=[],ne={},he=!1,I=!!d.sheetStubs,Y=c.split(t),E=0,B=Y.length;E!=B;++E){p=Y[E].trim();var ee=p.length;if(ee!==0){var J=0;e:for(v=0;v<ee;++v)switch(p[v]){case">":if(p[v-1]!="/"){++v;break e}if(d&&d.cellStyles){if(j=ut(p.slice(J,v),!0),S=j.r!=null?parseInt(j.r,10):S+1,k=-1,d.sheetRows&&d.sheetRows<S)continue;ne={},he=!1,j.ht&&(he=!0,ne.hpt=parseFloat(j.ht),ne.hpx=oh(ne.hpt)),j.hidden=="1"&&(he=!0,ne.hidden=!0),j.outlineLevel!=null&&(he=!0,ne.level=+j.outlineLevel),he&&(O[S-1]=ne)}break;case"<":J=v;break}if(J>=v)break;if(j=ut(p.slice(J,v),!0),S=j.r!=null?parseInt(j.r,10):S+1,k=-1,!(d.sheetRows&&d.sheetRows<S)){f.s.r>S-1&&(f.s.r=S-1),f.e.r<S-1&&(f.e.r=S-1),d&&d.cellStyles&&(ne={},he=!1,j.ht&&(he=!0,ne.hpt=parseFloat(j.ht),ne.hpx=oh(ne.hpt)),j.hidden=="1"&&(he=!0,ne.hidden=!0),j.outlineLevel!=null&&(he=!0,ne.level=+j.outlineLevel),he&&(O[S-1]=ne)),x=p.slice(v).split(e);for(var K=0;K!=x.length&&x[K].trim().charAt(0)=="<";++K);for(x=x.slice(K),v=0;v!=x.length;++v)if(p=x[v].trim(),p.length!==0){if(w=p.match(r),y=v,b=0,N=0,p="<c "+(p.slice(0,1)=="<"?">":"")+p,w!=null&&w.length===2){for(y=0,C=w[1],b=0;b!=C.length&&!((N=C.charCodeAt(b)-64)<1||N>26);++b)y=26*y+N;--y,k=y}else++k;for(b=0;b!=p.length&&p.charCodeAt(b)!==62;++b);if(++b,j=ut(p.slice(0,b),!0),j.r||(j.r=ft({r:S-1,c:k})),C=p.slice(b),_={t:""},(w=C.match(i))!=null&&w[1]!==""&&(_.v=Rt(w[1])),d.cellFormula){if((w=C.match(o))!=null&&w[1]!==""){if(_.f=Rt(Kt(w[1])).replace(/\r\n/g,`
`),d.xlfn||(_.f=HC(_.f)),w[0].indexOf('t="array"')>-1)_.F=(C.match(a)||[])[1],_.F.indexOf(":")>-1&&V.push([hr(_.F),_.F]);else if(w[0].indexOf('t="shared"')>-1){M=ut(w[0]);var ae=Rt(Kt(w[1]));d.xlfn||(ae=HC(ae)),Z[parseInt(M.si,10)]=[M,ae,j.r]}}else(w=C.match(/<f[^>]*\/>/))&&(M=ut(w[0]),Z[M.si]&&(_.f=Rse(Z[M.si][1],Z[M.si][2],j.r)));var te=ks(j.r);for(b=0;b<V.length;++b)te.r>=V[b][0].s.r&&te.r<=V[b][0].e.r&&te.c>=V[b][0].s.c&&te.c<=V[b][0].e.c&&(_.F=V[b][1])}if(j.t==null&&_.v===void 0)if(_.f||_.F)_.v=0,_.t="n";else if(I)_.t="z";else continue;else _.t=j.t||"n";switch(f.s.c>k&&(f.s.c=k),f.e.c<k&&(f.e.c=k),_.t){case"n":if(_.v==""||_.v==null){if(!I)continue;_.t="z"}else _.v=parseFloat(_.v);break;case"s":if(typeof _.v>"u"){if(!I)continue;_.t="z"}else D=pf[parseInt(_.v,10)],_.v=D.t,_.r=D.r,d.cellHTML&&(_.h=D.h);break;case"str":_.t="s",_.v=_.v!=null?Kt(_.v):"",d.cellHTML&&(_.h=Xw(_.v));break;case"inlineStr":w=C.match(n),_.t="s",w!=null&&(D=ij(w[1]))?(_.v=D.t,d.cellHTML&&(_.h=D.h)):_.v="";break;case"b":_.v=Jt(_.v);break;case"d":d.cellDates?_.v=Gr(_.v,1):(_.v=Rs(Gr(_.v,1)),_.t="n");break;case"e":(!d||d.cellText!==!1)&&(_.w=_.v),_.v=a6[_.v];break}if(T=A=0,P=null,W&&j.s!==void 0&&(P=m.CellXf[j.s],P!=null&&(P.numFmtId!=null&&(T=P.numFmtId),d.cellStyles&&P.fillId!=null&&(A=P.fillId))),L6(_,T,A,d,h,m),d.cellDates&&W&&_.t=="n"&&ld(gt[T])&&(_.t="d",_.v=y0(_.v)),j.cm&&d.xlmeta){var xe=(d.xlmeta.Cell||[])[+j.cm-1];xe&&xe.type=="XLDAPR"&&(_.D=!0)}if(Q){var F=ks(j.r);u[F.r]||(u[F.r]=[]),u[F.r][F.c]=_}else u[j.r]=_}}}}O.length>0&&(u["!rows"]=O)}}();function wae(e,t){var r={},n=e.l+t;r.r=e.read_shift(4),e.l+=4;var a=e.read_shift(2);e.l+=1;var i=e.read_shift(1);return e.l=n,i&7&&(r.level=i&7),i&16&&(r.hidden=!0),i&32&&(r.hpt=a/20),r}var jae=fc;function Nae(){}function _ae(e,t){var r={},n=e[e.l];return++e.l,r.above=!(n&64),r.left=!(n&128),e.l+=18,r.name=WZ(e),r}function Cae(e){var t=Un(e);return[t]}function Sae(e){var t=dc(e);return[t]}function Eae(e){var t=Un(e),r=e.read_shift(1);return[t,r,"b"]}function kae(e){var t=dc(e),r=e.read_shift(1);return[t,r,"b"]}function Tae(e){var t=Un(e),r=e.read_shift(1);return[t,r,"e"]}function Aae(e){var t=dc(e),r=e.read_shift(1);return[t,r,"e"]}function Rae(e){var t=Un(e),r=e.read_shift(4);return[t,r,"s"]}function Dae(e){var t=dc(e),r=e.read_shift(4);return[t,r,"s"]}function Oae(e){var t=Un(e),r=ms(e);return[t,r,"n"]}function B6(e){var t=dc(e),r=ms(e);return[t,r,"n"]}function Pae(e){var t=Un(e),r=sj(e);return[t,r,"n"]}function Iae(e){var t=dc(e),r=sj(e);return[t,r,"n"]}function Fae(e){var t=Un(e),r=tj(e);return[t,r,"is"]}function Lae(e){var t=Un(e),r=xs(e);return[t,r,"str"]}function Mae(e){var t=dc(e),r=xs(e);return[t,r,"str"]}function Bae(e,t,r){var n=e.l+t,a=Un(e);a.r=r["!row"];var i=e.read_shift(1),o=[a,i,"b"];if(r.cellFormula){e.l+=2;var l=j0(e,n-e.l,r);o[3]=ds(l,null,a,r.supbooks,r)}else e.l=n;return o}function Uae(e,t,r){var n=e.l+t,a=Un(e);a.r=r["!row"];var i=e.read_shift(1),o=[a,i,"e"];if(r.cellFormula){e.l+=2;var l=j0(e,n-e.l,r);o[3]=ds(l,null,a,r.supbooks,r)}else e.l=n;return o}function $ae(e,t,r){var n=e.l+t,a=Un(e);a.r=r["!row"];var i=ms(e),o=[a,i,"n"];if(r.cellFormula){e.l+=2;var l=j0(e,n-e.l,r);o[3]=ds(l,null,a,r.supbooks,r)}else e.l=n;return o}function qae(e,t,r){var n=e.l+t,a=Un(e);a.r=r["!row"];var i=xs(e),o=[a,i,"str"];if(r.cellFormula){e.l+=2;var l=j0(e,n-e.l,r);o[3]=ds(l,null,a,r.supbooks,r)}else e.l=n;return o}var zae=fc;function Vae(e,t){var r=e.l+t,n=fc(e),a=rj(e),i=xs(e),o=xs(e),l=xs(e);e.l=r;var c={rfx:n,relId:a,loc:i,display:l};return o&&(c.Tooltip=o),c}function Hae(){}function Wae(e,t,r){var n=e.l+t,a=r6(e),i=e.read_shift(1),o=[a];if(o[2]=i,r.cellFormula){var l=Qne(e,n-e.l,r);o[1]=l}else e.l=n;return o}function Gae(e,t,r){var n=e.l+t,a=fc(e),i=[a];if(r.cellFormula){var o=Zne(e,n-e.l,r);i[1]=o,e.l=n}else e.l=n;return i}var Kae=["left","right","top","bottom","header","footer"];function Yae(e){var t={};return Kae.forEach(function(r){t[r]=ms(e)}),t}function Xae(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function Qae(){}function Jae(){}function Zae(e,t,r,n,a,i,o){if(!e)return e;var l=t||{};n||(n={"!id":{}});var c=l.dense?[]:{},u,d={s:{r:2e6,c:2e6},e:{r:0,c:0}},f=!1,h=!1,m,v,p,x,w,y,b,N,C,_=[];l.biff=12,l["!row"]=0;var j=0,S=!1,k=[],D={},M=l.supbooks||a.supbooks||[[]];if(M.sharedf=D,M.arrayf=k,M.SheetNames=a.SheetNames||a.Sheets.map(function(Q){return Q.name}),!l.supbooks&&(l.supbooks=M,a.Names))for(var T=0;T<a.Names.length;++T)M[0][T+1]=a.Names[T];var A=[],W=[],P=!1;ux[16]={n:"BrtShortReal",f:B6};var V;if(Mi(e,function(O,ne,he){if(!h)switch(he){case 148:u=O;break;case 0:m=O,l.sheetRows&&l.sheetRows<=m.r&&(h=!0),N=ts(x=m.r),l["!row"]=m.r,(O.hidden||O.hpt||O.level!=null)&&(O.hpt&&(O.hpx=oh(O.hpt)),W[O.r]=O);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(v={t:O[2]},O[2]){case"n":v.v=O[1];break;case"s":b=pf[O[1]],v.v=b.t,v.r=b.r;break;case"b":v.v=!!O[1];break;case"e":v.v=O[1],l.cellText!==!1&&(v.w=hc[v.v]);break;case"str":v.t="s",v.v=O[1];break;case"is":v.t="s",v.v=O[1].t;break}if((p=o.CellXf[O[0].iStyleRef])&&L6(v,p.numFmtId,null,l,i,o),w=O[0].c==-1?w+1:O[0].c,l.dense?(c[x]||(c[x]=[]),c[x][w]=v):c[Mr(w)+N]=v,l.cellFormula){for(S=!1,j=0;j<k.length;++j){var I=k[j];m.r>=I[0].s.r&&m.r<=I[0].e.r&&w>=I[0].s.c&&w<=I[0].e.c&&(v.F=Tt(I[0]),S=!0)}!S&&O.length>3&&(v.f=O[3])}if(d.s.r>m.r&&(d.s.r=m.r),d.s.c>w&&(d.s.c=w),d.e.r<m.r&&(d.e.r=m.r),d.e.c<w&&(d.e.c=w),l.cellDates&&p&&v.t=="n"&&ld(gt[p.numFmtId])){var Y=vl(v.v);Y&&(v.t="d",v.v=new Date(Y.y,Y.m-1,Y.d,Y.H,Y.M,Y.S,Y.u))}V&&(V.type=="XLDAPR"&&(v.D=!0),V=void 0);break;case 1:case 12:if(!l.sheetStubs||f)break;v={t:"z",v:void 0},w=O[0].c==-1?w+1:O[0].c,l.dense?(c[x]||(c[x]=[]),c[x][w]=v):c[Mr(w)+N]=v,d.s.r>m.r&&(d.s.r=m.r),d.s.c>w&&(d.s.c=w),d.e.r<m.r&&(d.e.r=m.r),d.e.c<w&&(d.e.c=w),V&&(V.type=="XLDAPR"&&(v.D=!0),V=void 0);break;case 176:_.push(O);break;case 49:V=((l.xlmeta||{}).Cell||[])[O-1];break;case 494:var E=n["!id"][O.relId];for(E?(O.Target=E.Target,O.loc&&(O.Target+="#"+O.loc),O.Rel=E):O.relId==""&&(O.Target="#"+O.loc),x=O.rfx.s.r;x<=O.rfx.e.r;++x)for(w=O.rfx.s.c;w<=O.rfx.e.c;++w)l.dense?(c[x]||(c[x]=[]),c[x][w]||(c[x][w]={t:"z",v:void 0}),c[x][w].l=O):(y=ft({c:w,r:x}),c[y]||(c[y]={t:"z",v:void 0}),c[y].l=O);break;case 426:if(!l.cellFormula)break;k.push(O),C=l.dense?c[x][w]:c[Mr(w)+N],C.f=ds(O[1],d,{r:m.r,c:w},M,l),C.F=Tt(O[0]);break;case 427:if(!l.cellFormula)break;D[ft(O[0].s)]=O[1],C=l.dense?c[x][w]:c[Mr(w)+N],C.f=ds(O[1],d,{r:m.r,c:w},M,l);break;case 60:if(!l.cellStyles)break;for(;O.e>=O.s;)A[O.e--]={width:O.w/256,hidden:!!(O.flags&1),level:O.level},P||(P=!0,oj(O.w/256)),qu(A[O.e+1]);break;case 161:c["!autofilter"]={ref:Tt(O)};break;case 476:c["!margins"]=O;break;case 147:a.Sheets[r]||(a.Sheets[r]={}),O.name&&(a.Sheets[r].CodeName=O.name),(O.above||O.left)&&(c["!outline"]={above:O.above,left:O.left});break;case 137:a.Views||(a.Views=[{}]),a.Views[0]||(a.Views[0]={}),O.RTL&&(a.Views[0].RTL=!0);break;case 485:break;case 64:case 1053:break;case 151:break;case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:f=!0;break;case 36:f=!1;break;case 37:f=!0;break;case 38:f=!1;break;default:if(!ne.T){if(!f||l.WTF)throw new Error("Unexpected record 0x"+he.toString(16))}}},l),delete l.supbooks,delete l["!row"],!c["!ref"]&&(d.s.r<2e6||u&&(u.e.r>0||u.e.c>0||u.s.r>0||u.s.c>0))&&(c["!ref"]=Tt(u||d)),l.sheetRows&&c["!ref"]){var Z=hr(c["!ref"]);l.sheetRows<=+Z.e.r&&(Z.e.r=l.sheetRows-1,Z.e.r>d.e.r&&(Z.e.r=d.e.r),Z.e.r<Z.s.r&&(Z.s.r=Z.e.r),Z.e.c>d.e.c&&(Z.e.c=d.e.c),Z.e.c<Z.s.c&&(Z.s.c=Z.e.c),c["!fullref"]=c["!ref"],c["!ref"]=Tt(Z))}return _.length>0&&(c["!merges"]=_),A.length>0&&(c["!cols"]=A),W.length>0&&(c["!rows"]=W),c}function eie(e){var t=[],r=e.match(/^<c:numCache>/),n;(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/mg)||[]).forEach(function(i){var o=i.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);o&&(t[+o[1]]=r?+o[2]:o[2])});var a=Rt((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/mg)||[]).forEach(function(i){n=i.replace(/<.*?>/g,"")}),[t,a,n]}function tie(e,t,r,n,a,i){var o=i||{"!type":"chart"};if(!e)return i;var l=0,c=0,u="A",d={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(f){var h=eie(f);d.s.r=d.s.c=0,d.e.c=l,u=Mr(l),h[0].forEach(function(m,v){o[u+ts(v)]={t:"n",v:m,z:h[1]},c=v}),d.e.r<c&&(d.e.r=c),++l}),l>0&&(o["!ref"]=Tt(d)),o}function rie(e,t,r,n,a){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},o,l=e.match(M6);return l&&cj(l[0],i,a,r),(o=e.match(/drawing r:id="(.*?)"/))&&(i["!rel"]=o[1]),n["!id"][i["!rel"]]&&(i["!drawel"]=n["!id"][i["!rel"]]),i}function sie(e,t){e.l+=10;var r=xs(e);return{name:r}}function nie(e,t,r,n,a){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},o=!1;return Mi(e,function(c,u,d){switch(d){case 550:i["!rel"]=c;break;case 651:a.Sheets[r]||(a.Sheets[r]={}),c.name&&(a.Sheets[r].CodeName=c.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:o=!0;break;case 36:o=!1;break;case 37:break;case 38:break;default:if(!(u.T>0)){if(!(u.T<0)){if(!o||t.WTF)throw new Error("Unexpected record 0x"+d.toString(16))}}}},t),n["!id"][i["!rel"]]&&(i["!drawel"]=n["!id"][i["!rel"]]),i}var U6=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],aie=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],iie=[],oie=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function XC(e,t){for(var r=0;r!=e.length;++r)for(var n=e[r],a=0;a!=t.length;++a){var i=t[a];if(n[i[0]]==null)n[i[0]]=i[1];else switch(i[2]){case"bool":typeof n[i[0]]=="string"&&(n[i[0]]=Jt(n[i[0]]));break;case"int":typeof n[i[0]]=="string"&&(n[i[0]]=parseInt(n[i[0]],10));break}}}function QC(e,t){for(var r=0;r!=t.length;++r){var n=t[r];if(e[n[0]]==null)e[n[0]]=n[1];else switch(n[2]){case"bool":typeof e[n[0]]=="string"&&(e[n[0]]=Jt(e[n[0]]));break;case"int":typeof e[n[0]]=="string"&&(e[n[0]]=parseInt(e[n[0]],10));break}}}function $6(e){QC(e.WBProps,U6),QC(e.CalcPr,oie),XC(e.WBView,aie),XC(e.Sheets,iie),iu.date1904=Jt(e.WBProps.date1904)}var lie="][*?/\\".split("");function cie(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var r=!0;return lie.forEach(function(n){if(e.indexOf(n)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),r}var uie=/<\w+:workbook/;function die(e,t){if(!e)throw new Error("Could not find file");var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},n=!1,a="xmlns",i={},o=0;if(e.replace(ys,function(c,u){var d=ut(c);switch(Ya(d[0])){case"<?xml":break;case"<workbook":c.match(uie)&&(a="xmlns"+c.match(/<(\w+):/)[1]),r.xmlns=d[a];break;case"</workbook>":break;case"<fileVersion":delete d[0],r.AppVersion=d;break;case"<fileVersion/>":case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":case"<workbookPr/>":U6.forEach(function(f){if(d[f[0]]!=null)switch(f[2]){case"bool":r.WBProps[f[0]]=Jt(d[f[0]]);break;case"int":r.WBProps[f[0]]=parseInt(d[f[0]],10);break;default:r.WBProps[f[0]]=d[f[0]]}}),d.codeName&&(r.WBProps.CodeName=Kt(d.codeName));break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":case"<bookViews>":case"</bookViews>":break;case"<workbookView":case"<workbookView/>":delete d[0],r.WBView.push(d);break;case"</workbookView>":break;case"<sheets":case"<sheets>":case"</sheets>":break;case"<sheet":switch(d.state){case"hidden":d.Hidden=1;break;case"veryHidden":d.Hidden=2;break;default:d.Hidden=0}delete d.state,d.name=Rt(Kt(d.name)),delete d[0],r.Sheets.push(d);break;case"</sheet>":break;case"<functionGroups":case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":case"</externalReferences>":case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":case"<definedNames":n=!0;break;case"</definedNames>":n=!1;break;case"<definedName":i={},i.Name=Kt(d.name),d.comment&&(i.Comment=d.comment),d.localSheetId&&(i.Sheet=+d.localSheetId),Jt(d.hidden||"0")&&(i.Hidden=!0),o=u+c.length;break;case"</definedName>":i.Ref=Rt(Kt(e.slice(o,u))),r.Names.push(i);break;case"<definedName/>":break;case"<calcPr":delete d[0],r.CalcPr=d;break;case"<calcPr/>":delete d[0],r.CalcPr=d;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":break;case"<customWorkbookView":case"</customWorkbookView>":break;case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":case"<smartTagPr/>":break;case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":case"<webPublishing/>":break;case"<fileRecoveryPr":case"<fileRecoveryPr/>":break;case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":break;case"<webPublishObject":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;case"<ArchID":break;case"<AlternateContent":case"<AlternateContent>":n=!0;break;case"</AlternateContent>":n=!1;break;case"<revisionPtr":break;default:if(!n&&t.WTF)throw new Error("unrecognized "+d[0]+" in workbook")}return c}),TZ.indexOf(r.xmlns)===-1)throw new Error("Unknown Namespace: "+r.xmlns);return $6(r),r}function fie(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=V1(e),r.name=xs(e),r}function hie(e,t){var r={},n=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var a=t>8?xs(e):"";return a.length>0&&(r.CodeName=a),r.autoCompressPictures=!!(n&65536),r.backupFile=!!(n&64),r.checkCompatibility=!!(n&4096),r.date1904=!!(n&1),r.filterPrivacy=!!(n&8),r.hidePivotFieldList=!!(n&1024),r.promptedSolutions=!!(n&16),r.publishItems=!!(n&2048),r.refreshAllConnections=!!(n&262144),r.saveExternalLinkValues=!!(n&128),r.showBorderUnselectedTables=!!(n&4),r.showInkAnnotation=!!(n&32),r.showObjects=["all","placeholders","none"][n>>13&3],r.showPivotChartFilter=!!(n&32768),r.updateLinks=["userSet","never","always"][n>>8&3],r}function mie(e,t){var r={};return e.read_shift(4),r.ArchID=e.read_shift(4),e.l+=t-8,r}function pie(e,t,r){var n=e.l+t;e.l+=4,e.l+=1;var a=e.read_shift(4),i=GZ(e),o=Jne(e,0,r),l=rj(e);e.l=n;var c={Name:i,Ptg:o};return a<268435455&&(c.Sheet=a),l&&(c.Comment=l),c}function xie(e,t){var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},n=[],a=!1;t||(t={}),t.biff=12;var i=[],o=[[]];return o.SheetNames=[],o.XTI=[],ux[16]={n:"BrtFRTArchID$",f:mie},Mi(e,function(c,u,d){switch(d){case 156:o.SheetNames.push(c.name),r.Sheets.push(c);break;case 153:r.WBProps=c;break;case 39:c.Sheet!=null&&(t.SID=c.Sheet),c.Ref=ds(c.Ptg,null,null,o,t),delete t.SID,delete c.Ptg,i.push(c);break;case 1036:break;case 357:case 358:case 355:case 667:o[0].length?o.push([d,c]):o[0]=[d,c],o[o.length-1].XTI=[];break;case 362:o.length===0&&(o[0]=[],o[0].XTI=[]),o[o.length-1].XTI=o[o.length-1].XTI.concat(c),o.XTI=o.XTI.concat(c);break;case 361:break;case 2071:case 158:case 143:case 664:case 353:break;case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:break;case 35:n.push(d),a=!0;break;case 36:n.pop(),a=!1;break;case 37:n.push(d),a=!0;break;case 38:n.pop(),a=!1;break;case 16:break;default:if(!u.T){if(!a||t.WTF&&n[n.length-1]!=37&&n[n.length-1]!=35)throw new Error("Unexpected record 0x"+d.toString(16))}}},t),$6(r),r.Names=i,r.supbooks=o,r}function gie(e,t,r){return t.slice(-4)===".bin"?xie(e,r):die(e,r)}function vie(e,t,r,n,a,i,o,l){return t.slice(-4)===".bin"?Zae(e,n,r,a,i,o,l):fae(e,n,r,a,i,o,l)}function yie(e,t,r,n,a,i,o,l){return t.slice(-4)===".bin"?nie(e,n,r,a,i):rie(e,n,r,a,i)}function bie(e,t,r,n,a,i,o,l){return t.slice(-4)===".bin"?kse():Tse()}function wie(e,t,r,n,a,i,o,l){return t.slice(-4)===".bin"?Sse():Ese()}function jie(e,t,r,n){return t.slice(-4)===".bin"?zre(e,r,n):Lre(e,r,n)}function Nie(e,t,r){return E6(e,r)}function _ie(e,t,r){return t.slice(-4)===".bin"?are(e,r):sre(e,r)}function Cie(e,t,r){return t.slice(-4)===".bin"?Nse(e,r):vse(e,r)}function Sie(e,t,r){return t.slice(-4)===".bin"?pse(e):hse(e)}function Eie(e,t,r,n){return r.slice(-4)===".bin"?xse(e,t,r,n):void 0}function kie(e,t,r){return t.slice(-4)===".bin"?dse(e,t,r):fse(e,t,r)}var q6=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,z6=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function Vn(e,t){var r=e.split(/\s+/),n=[];if(n[0]=r[0],r.length===1)return n;var a=e.match(q6),i,o,l,c;if(a)for(c=0;c!=a.length;++c)i=a[c].match(z6),(o=i[1].indexOf(":"))===-1?n[i[1]]=i[2].slice(1,i[2].length-1):(i[1].slice(0,6)==="xmlns:"?l="xmlns"+i[1].slice(6):l=i[1].slice(o+1),n[l]=i[2].slice(1,i[2].length-1));return n}function Tie(e){var t=e.split(/\s+/),r={};if(t.length===1)return r;var n=e.match(q6),a,i,o,l;if(n)for(l=0;l!=n.length;++l)a=n[l].match(z6),(i=a[1].indexOf(":"))===-1?r[a[1]]=a[2].slice(1,a[2].length-1):(a[1].slice(0,6)==="xmlns:"?o="xmlns"+a[1].slice(6):o=a[1].slice(i+1),r[o]=a[2].slice(1,a[2].length-1));return r}var gf;function Aie(e,t){var r=gf[e]||Rt(e);return r==="General"?Jl(t):Ln(r,t)}function Rie(e,t,r,n){var a=n;switch((r[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":a=Jt(n);break;case"i2":case"int":a=parseInt(n,10);break;case"r4":case"float":a=parseFloat(n);break;case"date":case"dateTime.tz":a=Gr(n);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+r[0])}e[Rt(t)]=a}function Die(e,t,r){if(e.t!=="z"){if(!r||r.cellText!==!1)try{e.t==="e"?e.w=e.w||hc[e.v]:t==="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=rh(e.v):e.w=Jl(e.v):e.w=Aie(t||"General",e.v)}catch(i){if(r.WTF)throw i}try{var n=gf[t]||t||"General";if(r.cellNF&&(e.z=n),r.cellDates&&e.t=="n"&&ld(n)){var a=vl(e.v);a&&(e.t="d",e.v=new Date(a.y,a.m-1,a.d,a.H,a.M,a.S,a.u))}}catch(i){if(r.WTF)throw i}}}function Oie(e,t,r){if(r.cellStyles&&t.Interior){var n=t.Interior;n.Pattern&&(n.patternType=Rre[n.Pattern]||n.Pattern)}e[t.ID]=t}function Pie(e,t,r,n,a,i,o,l,c,u){var d="General",f=n.StyleID,h={};u=u||{};var m=[],v=0;for(f===void 0&&l&&(f=l.StyleID),f===void 0&&o&&(f=o.StyleID);i[f]!==void 0&&(i[f].nf&&(d=i[f].nf),i[f].Interior&&m.push(i[f].Interior),!!i[f].Parent);)f=i[f].Parent;switch(r.Type){case"Boolean":n.t="b",n.v=Jt(e);break;case"String":n.t="s",n.r=yC(Rt(e)),n.v=e.indexOf("<")>-1?Rt(t||e).replace(/<.*?>/g,""):n.r;break;case"DateTime":e.slice(-1)!="Z"&&(e+="Z"),n.v=(Gr(e)-new Date(Date.UTC(1899,11,30)))/(24*60*60*1e3),n.v!==n.v?n.v=Rt(e):n.v<60&&(n.v=n.v-1),(!d||d=="General")&&(d="yyyy-mm-dd");case"Number":n.v===void 0&&(n.v=+e),n.t||(n.t="n");break;case"Error":n.t="e",n.v=a6[e],u.cellText!==!1&&(n.w=e);break;default:e==""&&t==""?n.t="z":(n.t="s",n.v=yC(t||e));break}if(Die(n,d,u),u.cellFormula!==!1)if(n.Formula){var p=Rt(n.Formula);p.charCodeAt(0)==61&&(p=p.slice(1)),n.f=au(p,a),delete n.Formula,n.ArrayRange=="RC"?n.F=au("RC:RC",a):n.ArrayRange&&(n.F=au(n.ArrayRange,a),c.push([hr(n.F),n.F]))}else for(v=0;v<c.length;++v)a.r>=c[v][0].s.r&&a.r<=c[v][0].e.r&&a.c>=c[v][0].s.c&&a.c<=c[v][0].e.c&&(n.F=c[v][1]);u.cellStyles&&(m.forEach(function(x){!h.patternType&&x.patternType&&(h.patternType=x.patternType)}),n.s=h),n.StyleID!==void 0&&(n.ixfe=n.StyleID)}function Iie(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,`
`).replace(/\r/g,`
`),e.v=e.w=e.ixfe=void 0}function Fg(e,t){var r=t||{};RP();var n=Ud(Qw(e));(r.type=="binary"||r.type=="array"||r.type=="base64")&&(n=Kt(n));var a=n.slice(0,1024).toLowerCase(),i=!1;if(a=a.replace(/".*?"/g,""),(a.indexOf(">")&1023)>Math.min(a.indexOf(",")&1023,a.indexOf(";")&1023)){var o=es(r);return o.type="string",ah.to_workbook(n,o)}if(a.indexOf("<?xml")==-1&&["html","table","head","meta","script","style","div"].forEach(function(Me){a.indexOf("<"+Me)>=0&&(i=!0)}),i)return Vie(n,r);gf={"General Number":"General","General Date":gt[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":gt[15],"Short Date":gt[14],"Long Time":gt[19],"Medium Time":gt[18],"Short Time":gt[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:gt[2],Standard:gt[4],Percent:gt[10],Scientific:gt[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var l,c=[],u,d={},f=[],h=r.dense?[]:{},m="",v={},p={},x=Vn('<Data ss:Type="String">'),w=0,y=0,b=0,N={s:{r:2e6,c:2e6},e:{r:0,c:0}},C={},_={},j="",S=0,k=[],D={},M={},T=0,A=[],W=[],P={},V=[],Z,Q=!1,O=[],ne=[],he={},I=0,Y=0,E={Sheets:[],WBProps:{date1904:!1}},B={};nh.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"");for(var ee="";l=nh.exec(n);)switch(l[3]=(ee=l[3]).toLowerCase()){case"data":if(ee=="data"){if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break}if(c[c.length-1][1])break;l[1]==="/"?Pie(n.slice(w,l.index),j,x,c[c.length-1][0]=="comment"?P:v,{c:y,r:b},C,V[y],p,O,r):(j="",x=Vn(l[0]),w=l.index+l[0].length);break;case"cell":if(l[1]==="/")if(W.length>0&&(v.c=W),(!r.sheetRows||r.sheetRows>b)&&v.v!==void 0&&(r.dense?(h[b]||(h[b]=[]),h[b][y]=v):h[Mr(y)+ts(b)]=v),v.HRef&&(v.l={Target:Rt(v.HRef)},v.HRefScreenTip&&(v.l.Tooltip=v.HRefScreenTip),delete v.HRef,delete v.HRefScreenTip),(v.MergeAcross||v.MergeDown)&&(I=y+(parseInt(v.MergeAcross,10)|0),Y=b+(parseInt(v.MergeDown,10)|0),k.push({s:{c:y,r:b},e:{c:I,r:Y}})),!r.sheetStubs)v.MergeAcross?y=I+1:++y;else if(v.MergeAcross||v.MergeDown){for(var J=y;J<=I;++J)for(var K=b;K<=Y;++K)(J>y||K>b)&&(r.dense?(h[K]||(h[K]=[]),h[K][J]={t:"z"}):h[Mr(J)+ts(K)]={t:"z"});y=I+1}else++y;else v=Tie(l[0]),v.Index&&(y=+v.Index-1),y<N.s.c&&(N.s.c=y),y>N.e.c&&(N.e.c=y),l[0].slice(-2)==="/>"&&++y,W=[];break;case"row":l[1]==="/"||l[0].slice(-2)==="/>"?(b<N.s.r&&(N.s.r=b),b>N.e.r&&(N.e.r=b),l[0].slice(-2)==="/>"&&(p=Vn(l[0]),p.Index&&(b=+p.Index-1)),y=0,++b):(p=Vn(l[0]),p.Index&&(b=+p.Index-1),he={},(p.AutoFitHeight=="0"||p.Height)&&(he.hpx=parseInt(p.Height,10),he.hpt=S6(he.hpx),ne[b]=he),p.Hidden=="1"&&(he.hidden=!0,ne[b]=he));break;case"worksheet":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"));f.push(m),N.s.r<=N.e.r&&N.s.c<=N.e.c&&(h["!ref"]=Tt(N),r.sheetRows&&r.sheetRows<=N.e.r&&(h["!fullref"]=h["!ref"],N.e.r=r.sheetRows-1,h["!ref"]=Tt(N))),k.length&&(h["!merges"]=k),V.length>0&&(h["!cols"]=V),ne.length>0&&(h["!rows"]=ne),d[m]=h}else N={s:{r:2e6,c:2e6},e:{r:0,c:0}},b=y=0,c.push([l[3],!1]),u=Vn(l[0]),m=Rt(u.Name),h=r.dense?[]:{},k=[],O=[],ne=[],B={name:m,Hidden:0},E.Sheets.push(B);break;case"table":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else{if(l[0].slice(-2)=="/>")break;c.push([l[3],!1]),V=[],Q=!1}break;case"style":l[1]==="/"?Oie(C,_,r):_=Vn(l[0]);break;case"numberformat":_.nf=Rt(Vn(l[0]).Format||"General"),gf[_.nf]&&(_.nf=gf[_.nf]);for(var ae=0;ae!=392&&gt[ae]!=_.nf;++ae);if(ae==392){for(ae=57;ae!=392;++ae)if(gt[ae]==null){Dl(_.nf,ae);break}}break;case"column":if(c[c.length-1][0]!=="table")break;if(Z=Vn(l[0]),Z.Hidden&&(Z.hidden=!0,delete Z.Hidden),Z.Width&&(Z.wpx=parseInt(Z.Width,10)),!Q&&Z.wpx>10){Q=!0,Es=_6;for(var te=0;te<V.length;++te)V[te]&&qu(V[te])}Q&&qu(Z),V[Z.Index-1||V.length]=Z;for(var xe=0;xe<+Z.Span;++xe)V[V.length]=es(Z);break;case"namedrange":if(l[1]==="/")break;E.Names||(E.Names=[]);var F=ut(l[0]),We={Name:F.Name,Ref:au(F.RefersTo.slice(1),{r:0,c:0})};E.Sheets.length>0&&(We.Sheet=E.Sheets.length-1),E.Names.push(We);break;case"namedcell":break;case"b":break;case"i":break;case"u":break;case"s":break;case"em":break;case"h2":break;case"h3":break;case"sub":break;case"sup":break;case"span":break;case"alignment":break;case"borders":break;case"border":break;case"font":if(l[0].slice(-2)==="/>")break;l[1]==="/"?j+=n.slice(S,l.index):S=l.index+l[0].length;break;case"interior":if(!r.cellStyles)break;_.Interior=Vn(l[0]);break;case"protection":break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if(l[0].slice(-2)==="/>")break;l[1]==="/"?vee(D,ee,n.slice(T,l.index)):T=l.index+l[0].length;break;case"paragraphs":break;case"styles":case"workbook":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else c.push([l[3],!1]);break;case"comment":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"));Iie(P),W.push(P)}else c.push([l[3],!1]),u=Vn(l[0]),P={a:u.Author};break;case"autofilter":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else if(l[0].charAt(l[0].length-2)!=="/"){var je=Vn(l[0]);h["!autofilter"]={ref:au(je.Range).replace(/\$/g,"")},c.push([l[3],!0])}break;case"name":break;case"datavalidation":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break;case"pixelsperinch":break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if(l[1]==="/"){if((u=c.pop())[0]!==l[3])throw new Error("Bad state: "+u.join("|"))}else l[0].charAt(l[0].length-2)!=="/"&&c.push([l[3],!0]);break;case"null":break;default:if(c.length==0&&l[3]=="document"||c.length==0&&l[3]=="uof")return sS(n,r);var Oe=!0;switch(c[c.length-1][0]){case"officedocumentsettings":switch(l[3]){case"allowpng":break;case"removepersonalinformation":break;case"downloadcomponents":break;case"locationofcomponents":break;case"colors":break;case"color":break;case"index":break;case"rgb":break;case"targetscreensize":break;case"readonlyrecommended":break;default:Oe=!1}break;case"componentoptions":switch(l[3]){case"toolbar":break;case"hideofficelogo":break;case"spreadsheetautofit":break;case"label":break;case"caption":break;case"maxheight":break;case"maxwidth":break;case"nextsheetnumber":break;default:Oe=!1}break;case"excelworkbook":switch(l[3]){case"date1904":E.WBProps.date1904=!0;break;case"windowheight":break;case"windowwidth":break;case"windowtopx":break;case"windowtopy":break;case"tabratio":break;case"protectstructure":break;case"protectwindow":break;case"protectwindows":break;case"activesheet":break;case"displayinknotes":break;case"firstvisiblesheet":break;case"supbook":break;case"sheetname":break;case"sheetindex":break;case"sheetindexfirst":break;case"sheetindexlast":break;case"dll":break;case"acceptlabelsinformulas":break;case"donotsavelinkvalues":break;case"iteration":break;case"maxiterations":break;case"maxchange":break;case"path":break;case"xct":break;case"count":break;case"selectedsheets":break;case"calculation":break;case"uncalced":break;case"startupprompt":break;case"crn":break;case"externname":break;case"formula":break;case"colfirst":break;case"collast":break;case"wantadvise":break;case"boolean":break;case"error":break;case"text":break;case"ole":break;case"noautorecover":break;case"publishobjects":break;case"donotcalculatebeforesave":break;case"number":break;case"refmoder1c1":break;case"embedsavesmarttags":break;default:Oe=!1}break;case"workbookoptions":switch(l[3]){case"owcversion":break;case"height":break;case"width":break;default:Oe=!1}break;case"worksheetoptions":switch(l[3]){case"visible":if(l[0].slice(-2)!=="/>")if(l[1]==="/")switch(n.slice(T,l.index)){case"SheetHidden":B.Hidden=1;break;case"SheetVeryHidden":B.Hidden=2;break}else T=l.index+l[0].length;break;case"header":h["!margins"]||xf(h["!margins"]={},"xlml"),isNaN(+ut(l[0]).Margin)||(h["!margins"].header=+ut(l[0]).Margin);break;case"footer":h["!margins"]||xf(h["!margins"]={},"xlml"),isNaN(+ut(l[0]).Margin)||(h["!margins"].footer=+ut(l[0]).Margin);break;case"pagemargins":var Ne=ut(l[0]);h["!margins"]||xf(h["!margins"]={},"xlml"),isNaN(+Ne.Top)||(h["!margins"].top=+Ne.Top),isNaN(+Ne.Left)||(h["!margins"].left=+Ne.Left),isNaN(+Ne.Right)||(h["!margins"].right=+Ne.Right),isNaN(+Ne.Bottom)||(h["!margins"].bottom=+Ne.Bottom);break;case"displayrighttoleft":E.Views||(E.Views=[]),E.Views[0]||(E.Views[0]={}),E.Views[0].RTL=!0;break;case"freezepanes":break;case"frozennosplit":break;case"splithorizontal":case"splitvertical":break;case"donotdisplaygridlines":break;case"activerow":break;case"activecol":break;case"toprowbottompane":break;case"leftcolumnrightpane":break;case"unsynced":break;case"print":break;case"printerrors":break;case"panes":break;case"scale":break;case"pane":break;case"number":break;case"layout":break;case"pagesetup":break;case"selected":break;case"protectobjects":break;case"enableselection":break;case"protectscenarios":break;case"validprinterinfo":break;case"horizontalresolution":break;case"verticalresolution":break;case"numberofcopies":break;case"activepane":break;case"toprowvisible":break;case"leftcolumnvisible":break;case"fittopage":break;case"rangeselection":break;case"papersizeindex":break;case"pagelayoutzoom":break;case"pagebreakzoom":break;case"filteron":break;case"fitwidth":break;case"fitheight":break;case"commentslayout":break;case"zoom":break;case"lefttoright":break;case"gridlines":break;case"allowsort":break;case"allowfilter":break;case"allowinsertrows":break;case"allowdeleterows":break;case"allowinsertcols":break;case"allowdeletecols":break;case"allowinserthyperlinks":break;case"allowformatcells":break;case"allowsizecols":break;case"allowsizerows":break;case"nosummaryrowsbelowdetail":h["!outline"]||(h["!outline"]={}),h["!outline"].above=!0;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":h["!outline"]||(h["!outline"]={}),h["!outline"].left=!0;break;case"blackandwhite":break;case"donotdisplayzeros":break;case"displaypagebreak":break;case"rowcolheadings":break;case"donotdisplayoutline":break;case"noorientation":break;case"allowusepivottables":break;case"zeroheight":break;case"viewablerange":break;case"selection":break;case"protectcontents":break;default:Oe=!1}break;case"pivottable":case"pivotcache":switch(l[3]){case"immediateitemsondrop":break;case"showpagemultipleitemlabel":break;case"compactrowindent":break;case"location":break;case"pivotfield":break;case"orientation":break;case"layoutform":break;case"layoutsubtotallocation":break;case"layoutcompactrow":break;case"position":break;case"pivotitem":break;case"datatype":break;case"datafield":break;case"sourcename":break;case"parentfield":break;case"ptlineitems":break;case"ptlineitem":break;case"countofsameitems":break;case"item":break;case"itemtype":break;case"ptsource":break;case"cacheindex":break;case"consolidationreference":break;case"filename":break;case"reference":break;case"nocolumngrand":break;case"norowgrand":break;case"blanklineafteritems":break;case"hidden":break;case"subtotal":break;case"basefield":break;case"mapchilditems":break;case"function":break;case"refreshonfileopen":break;case"printsettitles":break;case"mergelabels":break;case"defaultversion":break;case"refreshname":break;case"refreshdate":break;case"refreshdatecopy":break;case"versionlastrefresh":break;case"versionlastupdate":break;case"versionupdateablemin":break;case"versionrefreshablemin":break;case"calculation":break;default:Oe=!1}break;case"pagebreaks":switch(l[3]){case"colbreaks":break;case"colbreak":break;case"rowbreaks":break;case"rowbreak":break;case"colstart":break;case"colend":break;case"rowend":break;default:Oe=!1}break;case"autofilter":switch(l[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:Oe=!1}break;case"querytable":switch(l[3]){case"id":break;case"autoformatfont":break;case"autoformatpattern":break;case"querysource":break;case"querytype":break;case"enableredirections":break;case"refreshedinxl9":break;case"urlstring":break;case"htmltables":break;case"connection":break;case"commandtext":break;case"refreshinfo":break;case"notitles":break;case"nextid":break;case"columninfo":break;case"overwritecells":break;case"donotpromptforfile":break;case"textwizardsettings":break;case"source":break;case"number":break;case"decimal":break;case"thousandseparator":break;case"trailingminusnumbers":break;case"formatsettings":break;case"fieldtype":break;case"delimiters":break;case"tab":break;case"comma":break;case"autoformatname":break;case"versionlastedit":break;case"versionlastrefresh":break;default:Oe=!1}break;case"datavalidation":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;case"cellrangelist":break;default:Oe=!1}break;case"sorting":case"conditionalformatting":switch(l[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"cellrangelist":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;default:Oe=!1}break;case"mapinfo":case"schema":case"data":switch(l[3]){case"map":break;case"entry":break;case"range":break;case"xpath":break;case"field":break;case"xsdtype":break;case"filteron":break;case"aggregate":break;case"elementtype":break;case"attributetype":break;case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":break;case"row":break;default:Oe=!1}break;case"smarttags":break;default:Oe=!1;break}if(Oe||l[3].match(/!\[CDATA/))break;if(!c[c.length-1][1])throw"Unrecognized tag: "+l[3]+"|"+c.join("|");if(c[c.length-1][0]==="customdocumentproperties"){if(l[0].slice(-2)==="/>")break;l[1]==="/"?Rie(M,ee,A,n.slice(T,l.index)):(A=l,T=l.index+l[0].length);break}if(r.WTF)throw"Unrecognized tag: "+l[3]+"|"+c.join("|")}var ge={};return!r.bookSheets&&!r.bookProps&&(ge.Sheets=d),ge.SheetNames=f,ge.Workbook=E,ge.SSF=es(gt),ge.Props=D,ge.Custprops=M,ge}function K1(e,t){switch(fj(t=t||{}),t.type||"base64"){case"base64":return Fg(mn(e),t);case"binary":case"buffer":case"file":return Fg(e,t);case"array":return Fg(uc(e),t)}}function Fie(e){var t={},r=e.content;if(r.l=28,t.AnsiUserType=r.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=XZ(r),r.length-r.l<=4)return t;var n=r.read_shift(4);if(n==0||n>40||(r.l-=4,t.Reserved1=r.read_shift(0,"lpstr-ansi"),r.length-r.l<=4)||(n=r.read_shift(4),n!==1907505652)||(t.UnicodeClipboardFormat=QZ(r),n=r.read_shift(4),n==0||n>40))return t;r.l-=4,t.Reserved2=r.read_shift(0,"lpwstr")}var Lie=[60,1084,2066,2165,2175];function Mie(e,t,r,n,a){var i=n,o=[],l=r.slice(r.l,r.l+i);if(a&&a.enc&&a.enc.insitu&&l.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:break;case 133:break;default:a.enc.insitu(l)}o.push(l),r.l+=i;for(var c=di(r,r.l),u=Y1[c],d=0;u!=null&&Lie.indexOf(c)>-1;)i=di(r,r.l+2),d=r.l+4,c==2066?d+=4:(c==2165||c==2175)&&(d+=12),l=r.slice(d,r.l+4+i),o.push(l),r.l+=4+i,u=Y1[c=di(r,r.l)];var f=to(o);Jr(f,0);var h=0;f.lens=[];for(var m=0;m<o.length;++m)f.lens.push(h),h+=o[m].length;if(f.length<n)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+f.length+" < "+n;return t.f(f,f.length,a)}function Ea(e,t,r){if(e.t!=="z"&&e.XF){var n=0;try{n=e.z||e.XF.numFmtId||0,t.cellNF&&(e.z=gt[n])}catch(i){if(t.WTF)throw i}if(!t||t.cellText!==!1)try{e.t==="e"?e.w=e.w||hc[e.v]:n===0||n=="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=rh(e.v):e.w=Jl(e.v):e.w=Ln(n,e.v,{date1904:!!r,dateNF:t&&t.dateNF})}catch(i){if(t.WTF)throw i}if(t.cellDates&&n&&e.t=="n"&&ld(gt[n]||String(n))){var a=vl(e.v);a&&(e.t="d",e.v=new Date(a.y,a.m-1,a.d,a.H,a.M,a.S,a.u))}}}function Rm(e,t,r){return{v:e,ixfe:t,t:r}}function Bie(e,t){var r={opts:{}},n={},a=t.dense?[]:{},i={},o={},l=null,c=[],u="",d={},f,h="",m,v,p,x,w={},y=[],b,N,C=[],_=[],j={Sheets:[],WBProps:{date1904:!1},Views:[{}]},S={},k=function(st){return st<8?Ol[st]:st<64&&_[st-8]||Ol[st]},D=function(st,Et,Ar){var _t=Et.XF.data;if(!(!_t||!_t.patternType||!Ar||!Ar.cellStyles)){Et.s={},Et.s.patternType=_t.patternType;var or;(or=ih(k(_t.icvFore)))&&(Et.s.fgColor={rgb:or}),(or=ih(k(_t.icvBack)))&&(Et.s.bgColor={rgb:or})}},M=function(st,Et,Ar){if(!(he>1)&&!(Ar.sheetRows&&st.r>=Ar.sheetRows)){if(Ar.cellStyles&&Et.XF&&Et.XF.data&&D(st,Et,Ar),delete Et.ixfe,delete Et.XF,f=st,h=ft(st),(!o||!o.s||!o.e)&&(o={s:{r:0,c:0},e:{r:0,c:0}}),st.r<o.s.r&&(o.s.r=st.r),st.c<o.s.c&&(o.s.c=st.c),st.r+1>o.e.r&&(o.e.r=st.r+1),st.c+1>o.e.c&&(o.e.c=st.c+1),Ar.cellFormula&&Et.f){for(var _t=0;_t<y.length;++_t)if(!(y[_t][0].s.c>st.c||y[_t][0].s.r>st.r)&&!(y[_t][0].e.c<st.c||y[_t][0].e.r<st.r)){Et.F=Tt(y[_t][0]),(y[_t][0].s.c!=st.c||y[_t][0].s.r!=st.r)&&delete Et.f,Et.f&&(Et.f=""+ds(y[_t][1],o,st,O,T));break}}Ar.dense?(a[st.r]||(a[st.r]=[]),a[st.r][st.c]=Et):a[h]=Et}},T={enc:!1,sbcch:0,snames:[],sharedf:w,arrayf:y,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!t&&!!t.cellStyles,WTF:!!t&&!!t.wtf};t.password&&(T.password=t.password);var A,W=[],P=[],V=[],Z=[],Q=!1,O=[];O.SheetNames=T.snames,O.sharedf=T.sharedf,O.arrayf=T.arrayf,O.names=[],O.XTI=[];var ne=0,he=0,I=0,Y=[],E=[],B;T.codepage=1200,la(1200);for(var ee=!1;e.l<e.length-1;){var J=e.l,K=e.read_shift(2);if(K===0&&ne===10)break;var ae=e.l===e.length?0:e.read_shift(2),te=Y1[K];if(te&&te.f){if(t.bookSheets&&ne===133&&K!==133)break;if(ne=K,te.r===2||te.r==12){var xe=e.read_shift(2);if(ae-=2,!T.enc&&xe!==K&&((xe&255)<<8|xe>>8)!==K)throw new Error("rt mismatch: "+xe+"!="+K);te.r==12&&(e.l+=10,ae-=10)}var F={};if(K===10?F=te.f(e,ae,T):F=Mie(K,te,e,ae,T),he==0&&[9,521,1033,2057].indexOf(ne)===-1)continue;switch(K){case 34:r.opts.Date1904=j.WBProps.date1904=F;break;case 134:r.opts.WriteProtect=!0;break;case 47:if(T.enc||(e.l=0),T.enc=F,!t.password)throw new Error("File is password-protected");if(F.valid==null)throw new Error("Encryption scheme unsupported");if(!F.valid)throw new Error("Password is incorrect");break;case 92:T.lastuser=F;break;case 66:var We=Number(F);switch(We){case 21010:We=1200;break;case 32768:We=1e4;break;case 32769:We=1252;break}la(T.codepage=We),ee=!0;break;case 317:T.rrtabid=F;break;case 25:T.winlocked=F;break;case 439:r.opts.RefreshAll=F;break;case 12:r.opts.CalcCount=F;break;case 16:r.opts.CalcDelta=F;break;case 17:r.opts.CalcIter=F;break;case 13:r.opts.CalcMode=F;break;case 14:r.opts.CalcPrecision=F;break;case 95:r.opts.CalcSaveRecalc=F;break;case 15:T.CalcRefMode=F;break;case 2211:r.opts.FullCalc=F;break;case 129:F.fDialog&&(a["!type"]="dialog"),F.fBelow||((a["!outline"]||(a["!outline"]={})).above=!0),F.fRight||((a["!outline"]||(a["!outline"]={})).left=!0);break;case 224:C.push(F);break;case 430:O.push([F]),O[O.length-1].XTI=[];break;case 35:case 547:O[O.length-1].push(F);break;case 24:case 536:B={Name:F.Name,Ref:ds(F.rgce,o,null,O,T)},F.itab>0&&(B.Sheet=F.itab-1),O.names.push(B),O[0]||(O[0]=[],O[0].XTI=[]),O[O.length-1].push(F),F.Name=="_xlnm._FilterDatabase"&&F.itab>0&&F.rgce&&F.rgce[0]&&F.rgce[0][0]&&F.rgce[0][0][0]=="PtgArea3d"&&(E[F.itab-1]={ref:Tt(F.rgce[0][0][1][2])});break;case 22:T.ExternCount=F;break;case 23:O.length==0&&(O[0]=[],O[0].XTI=[]),O[O.length-1].XTI=O[O.length-1].XTI.concat(F),O.XTI=O.XTI.concat(F);break;case 2196:if(T.biff<8)break;B!=null&&(B.Comment=F[1]);break;case 18:a["!protect"]=F;break;case 19:F!==0&&T.WTF&&console.error("Password verifier: "+F);break;case 133:i[F.pos]=F,T.snames.push(F.name);break;case 10:{if(--he)break;if(o.e){if(o.e.r>0&&o.e.c>0){if(o.e.r--,o.e.c--,a["!ref"]=Tt(o),t.sheetRows&&t.sheetRows<=o.e.r){var je=o.e.r;o.e.r=t.sheetRows-1,a["!fullref"]=a["!ref"],a["!ref"]=Tt(o),o.e.r=je}o.e.r++,o.e.c++}W.length>0&&(a["!merges"]=W),P.length>0&&(a["!objects"]=P),V.length>0&&(a["!cols"]=V),Z.length>0&&(a["!rows"]=Z),j.Sheets.push(S)}u===""?d=a:n[u]=a,a=t.dense?[]:{}}break;case 9:case 521:case 1033:case 2057:{if(T.biff===8&&(T.biff={9:2,521:3,1033:4}[K]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[F.BIFFVer]||8),T.biffguess=F.BIFFVer==0,F.BIFFVer==0&&F.dt==4096&&(T.biff=5,ee=!0,la(T.codepage=28591)),T.biff==8&&F.BIFFVer==0&&F.dt==16&&(T.biff=2),he++)break;if(a=t.dense?[]:{},T.biff<8&&!ee&&(ee=!0,la(T.codepage=t.codepage||1252)),T.biff<5||F.BIFFVer==0&&F.dt==4096){u===""&&(u="Sheet1"),o={s:{r:0,c:0},e:{r:0,c:0}};var Oe={pos:e.l-ae,name:u};i[Oe.pos]=Oe,T.snames.push(u)}else u=(i[J]||{name:""}).name;F.dt==32&&(a["!type"]="chart"),F.dt==64&&(a["!type"]="macro"),W=[],P=[],T.arrayf=y=[],V=[],Z=[],Q=!1,S={Hidden:(i[J]||{hs:0}).hs,name:u}}break;case 515:case 3:case 2:a["!type"]=="chart"&&(t.dense?(a[F.r]||[])[F.c]:a[ft({c:F.c,r:F.r})])&&++F.c,b={ixfe:F.ixfe,XF:C[F.ixfe]||{},v:F.val,t:"n"},I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M({c:F.c,r:F.r},b,t);break;case 5:case 517:b={ixfe:F.ixfe,XF:C[F.ixfe],v:F.val,t:F.t},I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M({c:F.c,r:F.r},b,t);break;case 638:b={ixfe:F.ixfe,XF:C[F.ixfe],v:F.rknum,t:"n"},I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M({c:F.c,r:F.r},b,t);break;case 189:for(var Ne=F.c;Ne<=F.C;++Ne){var ge=F.rkrec[Ne-F.c][0];b={ixfe:ge,XF:C[ge],v:F.rkrec[Ne-F.c][1],t:"n"},I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M({c:Ne,r:F.r},b,t)}break;case 6:case 518:case 1030:{if(F.val=="String"){l=F;break}if(b=Rm(F.val,F.cell.ixfe,F.tt),b.XF=C[b.ixfe],t.cellFormula){var Me=F.formula;if(Me&&Me[0]&&Me[0][0]&&Me[0][0][0]=="PtgExp"){var Xe=Me[0][0][1][0],G=Me[0][0][1][1],re=ft({r:Xe,c:G});w[re]?b.f=""+ds(F.formula,o,F.cell,O,T):b.F=((t.dense?(a[Xe]||[])[G]:a[re])||{}).F}else b.f=""+ds(F.formula,o,F.cell,O,T)}I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M(F.cell,b,t),l=F}break;case 7:case 519:if(l)l.val=F,b=Rm(F,l.cell.ixfe,"s"),b.XF=C[b.ixfe],t.cellFormula&&(b.f=""+ds(l.formula,o,l.cell,O,T)),I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M(l.cell,b,t),l=null;else throw new Error("String record expects Formula");break;case 33:case 545:{y.push(F);var ce=ft(F[0].s);if(m=t.dense?(a[F[0].s.r]||[])[F[0].s.c]:a[ce],t.cellFormula&&m){if(!l||!ce||!m)break;m.f=""+ds(F[1],o,F[0],O,T),m.F=Tt(F[0])}}break;case 1212:{if(!t.cellFormula)break;if(h){if(!l)break;w[ft(l.cell)]=F[0],m=t.dense?(a[l.cell.r]||[])[l.cell.c]:a[ft(l.cell)],(m||{}).f=""+ds(F[0],o,f,O,T)}}break;case 253:b=Rm(c[F.isst].t,F.ixfe,"s"),c[F.isst].h&&(b.h=c[F.isst].h),b.XF=C[b.ixfe],I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M({c:F.c,r:F.r},b,t);break;case 513:t.sheetStubs&&(b={ixfe:F.ixfe,XF:C[F.ixfe],t:"z"},I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M({c:F.c,r:F.r},b,t));break;case 190:if(t.sheetStubs)for(var _e=F.c;_e<=F.C;++_e){var we=F.ixfe[_e-F.c];b={ixfe:we,XF:C[we],t:"z"},I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M({c:_e,r:F.r},b,t)}break;case 214:case 516:case 4:b=Rm(F.val,F.ixfe,"s"),b.XF=C[b.ixfe],I>0&&(b.z=Y[b.ixfe>>8&63]),Ea(b,t,r.opts.Date1904),M({c:F.c,r:F.r},b,t);break;case 0:case 512:he===1&&(o=F);break;case 252:c=F;break;case 1054:if(T.biff==4){Y[I++]=F[1];for(var ye=0;ye<I+163&&gt[ye]!=F[1];++ye);ye>=163&&Dl(F[1],I+163)}else Dl(F[1],F[0]);break;case 30:{Y[I++]=F;for(var Te=0;Te<I+163&&gt[Te]!=F;++Te);Te>=163&&Dl(F,I+163)}break;case 229:W=W.concat(F);break;case 93:P[F.cmo[0]]=T.lastobj=F;break;case 438:T.lastobj.TxO=F;break;case 127:T.lastobj.ImData=F;break;case 440:for(x=F[0].s.r;x<=F[0].e.r;++x)for(p=F[0].s.c;p<=F[0].e.c;++p)m=t.dense?(a[x]||[])[p]:a[ft({c:p,r:x})],m&&(m.l=F[1]);break;case 2048:for(x=F[0].s.r;x<=F[0].e.r;++x)for(p=F[0].s.c;p<=F[0].e.c;++p)m=t.dense?(a[x]||[])[p]:a[ft({c:p,r:x})],m&&m.l&&(m.l.Tooltip=F[1]);break;case 28:{if(T.biff<=5&&T.biff>=2)break;m=t.dense?(a[F[0].r]||[])[F[0].c]:a[ft(F[0])];var Ze=P[F[2]];m||(t.dense?(a[F[0].r]||(a[F[0].r]=[]),m=a[F[0].r][F[0].c]={t:"z"}):m=a[ft(F[0])]={t:"z"},o.e.r=Math.max(o.e.r,F[0].r),o.s.r=Math.min(o.s.r,F[0].r),o.e.c=Math.max(o.e.c,F[0].c),o.s.c=Math.min(o.s.c,F[0].c)),m.c||(m.c=[]),v={a:F[1],t:Ze.TxO.t},m.c.push(v)}break;case 2173:ose(C[F.ixfe],F.ext);break;case 125:{if(!T.cellStyles)break;for(;F.e>=F.s;)V[F.e--]={width:F.w/256,level:F.level||0,hidden:!!(F.flags&1)},Q||(Q=!0,oj(F.w/256)),qu(V[F.e+1])}break;case 520:{var ot={};F.level!=null&&(Z[F.r]=ot,ot.level=F.level),F.hidden&&(Z[F.r]=ot,ot.hidden=!0),F.hpt&&(Z[F.r]=ot,ot.hpt=F.hpt,ot.hpx=oh(F.hpt))}break;case 38:case 39:case 40:case 41:a["!margins"]||xf(a["!margins"]={}),a["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[K]]=F;break;case 161:a["!margins"]||xf(a["!margins"]={}),a["!margins"].header=F.header,a["!margins"].footer=F.footer;break;case 574:F.RTL&&(j.Views[0].RTL=!0);break;case 146:_=F;break;case 2198:A=F;break;case 140:N=F;break;case 442:u?S.CodeName=F||S.name:j.WBProps.CodeName=F||"ThisWorkbook";break}}else te||console.error("Missing Info for XLS Record 0x"+K.toString(16)),e.l+=ae}return r.SheetNames=Wa(i).sort(function(qt,st){return Number(qt)-Number(st)}).map(function(qt){return i[qt].name}),t.bookSheets||(r.Sheets=n),!r.SheetNames.length&&d["!ref"]?(r.SheetNames.push("Sheet1"),r.Sheets&&(r.Sheets.Sheet1=d)):r.Preamble=d,r.Sheets&&E.forEach(function(qt,st){r.Sheets[r.SheetNames[st]]["!autofilter"]=qt}),r.Strings=c,r.SSF=es(gt),T.enc&&(r.Encryption=T.enc),A&&(r.Themes=A),r.Metadata={},N!==void 0&&(r.Metadata.Country=N),O.names.length>0&&(j.Names=O.names),r.Workbook=j,r}var JC={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function Uie(e,t,r){var n=kt.find(e,"/!DocumentSummaryInformation");if(n&&n.size>0)try{var a=IC(n,see,JC.DSI);for(var i in a)t[i]=a[i]}catch(u){if(r.WTF)throw u}var o=kt.find(e,"/!SummaryInformation");if(o&&o.size>0)try{var l=IC(o,nee,JC.SI);for(var c in l)t[c]==null&&(t[c]=l[c])}catch(u){if(r.WTF)throw u}t.HeadingPairs&&t.TitlesOfParts&&(o6(t.HeadingPairs,t.TitlesOfParts,t,r),delete t.HeadingPairs,delete t.TitlesOfParts)}function V6(e,t){t||(t={}),fj(t),yP(),t.codepage&&Vw(t.codepage);var r,n;if(e.FullPaths){if(kt.find(e,"/encryption"))throw new Error("File is password-protected");r=kt.find(e,"!CompObj"),n=kt.find(e,"/Workbook")||kt.find(e,"/Book")}else{switch(t.type){case"base64":e=na(mn(e));break;case"binary":e=na(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e));break}Jr(e,0),n={content:e}}var a,i;if(r&&Fie(r),t.bookProps&&!t.bookSheets)a={};else{var o=St?"buffer":"array";if(n&&n.content)a=Bie(n.content,t);else if((i=kt.find(e,"PerfectOffice_MAIN"))&&i.content)a=mf.to_workbook(i.content,(t.type=o,t));else if((i=kt.find(e,"NativeContent_MAIN"))&&i.content)a=mf.to_workbook(i.content,(t.type=o,t));else throw(i=kt.find(e,"MN0"))&&i.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");t.bookVBA&&e.FullPaths&&kt.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(a.vbaraw=Cse(e))}var l={};return e.FullPaths&&Uie(e,l,t),a.Props=a.Custprops=l,t.bookFiles&&(a.cfb=e),a}var ux={0:{f:wae},1:{f:Cae},2:{f:Pae},3:{f:Tae},4:{f:Eae},5:{f:Oae},6:{f:Lae},7:{f:Rae},8:{f:qae},9:{f:$ae},10:{f:Bae},11:{f:Uae},12:{f:Sae},13:{f:Iae},14:{f:Aae},15:{f:kae},16:{f:B6},17:{f:Mae},18:{f:Dae},19:{f:tj},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:pie},40:{},42:{},43:{f:Bre},44:{f:Mre},45:{f:Ure},46:{f:qre},47:{f:$re},48:{},49:{f:zZ},50:{},51:{f:cse},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:y6},62:{f:Fae},63:{f:mse},64:{f:Qae},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:vs,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:Xae},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:_ae},148:{f:jae,p:16},151:{f:Hae},152:{},153:{f:hie},154:{},155:{},156:{f:fie},157:{},158:{},159:{T:1,f:nre},160:{T:-1},161:{T:1,f:fc},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:zae},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:lse},336:{T:-1},337:{f:use,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:V1},357:{},358:{},359:{},360:{T:1},361:{},362:{f:v6},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:Wae},427:{f:Gae},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:Yae},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:Nae},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:Vae},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:V1},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:jse},633:{T:1},634:{T:-1},635:{T:1,f:wse},636:{T:-1},637:{f:HZ},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:sie},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:Jae},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},Y1={6:{f:Pg},10:{f:Wi},12:{f:jr},13:{f:jr},14:{f:mr},15:{f:mr},16:{f:ms},17:{f:mr},18:{f:mr},19:{f:jr},20:{f:BC},21:{f:BC},23:{f:v6},24:{f:$C},25:{f:mr},26:{},27:{},28:{f:yte},29:{},34:{f:mr},35:{f:UC},38:{f:ms},39:{f:ms},40:{f:ms},41:{f:ms},42:{f:mr},43:{f:mr},47:{f:Nre},49:{f:ete},51:{f:jr},60:{},61:{f:Qee},64:{f:mr},65:{f:Zee},66:{f:jr},77:{},80:{},81:{},82:{},85:{f:jr},89:{},90:{},91:{},92:{f:zee},93:{f:wte},94:{},95:{f:mr},96:{},97:{},99:{f:mr},125:{f:y6},128:{f:ute},129:{f:Vee},130:{f:jr},131:{f:mr},132:{f:mr},133:{f:Hee},134:{},140:{f:Ete},141:{f:jr},144:{},146:{f:Tte},151:{},152:{},153:{},154:{},155:{},156:{f:jr},157:{},158:{},160:{f:Pte},161:{f:Rte},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:ite},190:{f:ote},193:{f:Wi},197:{},198:{},199:{},200:{},201:{},202:{f:mr},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:jr},220:{},221:{f:mr},222:{},224:{f:cte},225:{f:qee},226:{f:Wi},227:{},229:{f:bte},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:Wee},253:{f:tte},255:{f:Gee},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:f6},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:mr},353:{f:Wi},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:fte},431:{f:mr},432:{},433:{},434:{},437:{},438:{f:_te},439:{f:mr},440:{f:Cte},441:{},442:{f:Ph},443:{},444:{f:jr},445:{},446:{},448:{f:Wi},449:{f:Xee,r:2},450:{f:Wi},512:{f:LC},513:{f:Ote},515:{f:dte},516:{f:rte},517:{f:MC},519:{f:Ite},520:{f:Kee},523:{},545:{f:qC},549:{f:FC},566:{},574:{f:Jee},638:{f:ate},659:{},1048:{},1054:{f:ste},1084:{},1212:{f:xte},2048:{f:Ste},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:km},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:Wi},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:Ate,r:12},2173:{f:ise,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:mr,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:pte,r:12},2197:{},2198:{f:ese,r:12},2199:{},2200:{},2201:{},2202:{f:gte,r:12},2203:{f:Wi},2204:{},2205:{},2206:{},2207:{},2211:{f:Yee},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:jr},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:Dte},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:kte},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:LC},1:{},2:{f:Bte},3:{f:Mte},4:{f:Lte},5:{f:MC},7:{f:Ute},8:{},9:{f:km},11:{},22:{f:jr},30:{f:nte},31:{},32:{},33:{f:qC},36:{},37:{f:FC},50:{f:$te},62:{},52:{},67:{},68:{f:jr},69:{},86:{},126:{},127:{f:Fte},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:qte},223:{},234:{},354:{},421:{},518:{f:Pg},521:{f:km},536:{f:$C},547:{f:UC},561:{},579:{},1030:{f:Pg},1033:{f:km},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function Hn(e,t,r,n){var a=t;if(!isNaN(a)){var i=(r||[]).length||0,o=e.next(4);o.write_shift(2,a),o.write_shift(2,i),i>0&&ZP(r)&&e.push(r)}}function ZC(e,t){var r=t||{},n=r.dense?[]:{};e=e.replace(/<!--.*?-->/g,"");var a=e.match(/<table/i);if(!a)throw new Error("Invalid HTML: could not find <table>");var i=e.match(/<\/table/i),o=a.index,l=i&&i.index||e.length,c=dZ(e.slice(o,l),/(:?<tr[^>]*>)/i,"<tr>"),u=-1,d=0,f=0,h=0,m={s:{r:1e7,c:1e7},e:{r:0,c:0}},v=[];for(o=0;o<c.length;++o){var p=c[o].trim(),x=p.slice(0,3).toLowerCase();if(x=="<tr"){if(++u,r.sheetRows&&r.sheetRows<=u){--u;break}d=0;continue}if(!(x!="<td"&&x!="<th")){var w=p.split(/<\/t[dh]>/i);for(l=0;l<w.length;++l){var y=w[l].trim();if(y.match(/<t[dh]/i)){for(var b=y,N=0;b.charAt(0)=="<"&&(N=b.indexOf(">"))>-1;)b=b.slice(N+1);for(var C=0;C<v.length;++C){var _=v[C];_.s.c==d&&_.s.r<u&&u<=_.e.r&&(d=_.e.c+1,C=-1)}var j=ut(y.slice(0,y.indexOf(">")));h=j.colspan?+j.colspan:1,((f=+j.rowspan)>1||h>1)&&v.push({s:{r:u,c:d},e:{r:u+(f||1)-1,c:d+h-1}});var S=j.t||j["data-t"]||"";if(!b.length){d+=h;continue}if(b=UP(b),m.s.r>u&&(m.s.r=u),m.e.r<u&&(m.e.r=u),m.s.c>d&&(m.s.c=d),m.e.c<d&&(m.e.c=d),!b.length){d+=h;continue}var k={t:"s",v:b};r.raw||!b.trim().length||S=="s"||(b==="TRUE"?k={t:"b",v:!0}:b==="FALSE"?k={t:"b",v:!1}:isNaN(ma(b))?isNaN($u(b).getDate())||(k={t:"d",v:Gr(b)},r.cellDates||(k={t:"n",v:Rs(k.v)}),k.z=r.dateNF||gt[14]):k={t:"n",v:ma(b)}),r.dense?(n[u]||(n[u]=[]),n[u][d]=k):n[ft({r:u,c:d})]=k,d+=h}}}}return n["!ref"]=Tt(m),v.length&&(n["!merges"]=v),n}function $ie(e,t,r,n){for(var a=e["!merges"]||[],i=[],o=t.s.c;o<=t.e.c;++o){for(var l=0,c=0,u=0;u<a.length;++u)if(!(a[u].s.r>r||a[u].s.c>o)&&!(a[u].e.r<r||a[u].e.c<o)){if(a[u].s.r<r||a[u].s.c<o){l=-1;break}l=a[u].e.r-a[u].s.r+1,c=a[u].e.c-a[u].s.c+1;break}if(!(l<0)){var d=ft({r,c:o}),f=n.dense?(e[r]||[])[o]:e[d],h=f&&f.v!=null&&(f.h||Xw(f.w||(Ti(f),f.w)||""))||"",m={};l>1&&(m.rowspan=l),c>1&&(m.colspan=c),n.editable?h='<span contenteditable="true">'+h+"</span>":f&&(m["data-t"]=f&&f.t||"z",f.v!=null&&(m["data-v"]=f.v),f.z!=null&&(m["data-z"]=f.z),f.l&&(f.l.Target||"#").charAt(0)!="#"&&(h='<a href="'+f.l.Target+'">'+h+"</a>")),m.id=(n.id||"sjs")+"-"+d,i.push(EZ("td",h,m))}}var v="<tr>";return v+i.join("")+"</tr>"}var qie='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',zie="</body></html>";function Vie(e,t){var r=e.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!r||r.length==0)throw new Error("Invalid HTML: could not find <table>");if(r.length==1)return el(ZC(r[0],t),t);var n=mj();return r.forEach(function(a,i){pj(n,ZC(a,t),"Sheet"+(i+1))}),n}function Hie(e,t,r){var n=[];return n.join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}function Wie(e,t){var r=t||{},n=r.header!=null?r.header:qie,a=r.footer!=null?r.footer:zie,i=[n],o=cd(e["!ref"]);r.dense=Array.isArray(e),i.push(Hie(e,o,r));for(var l=o.s.r;l<=o.e.r;++l)i.push($ie(e,o,l,r));return i.push("</table>"+a),i.join("")}function H6(e,t,r){var n=r||{},a=0,i=0;if(n.origin!=null)if(typeof n.origin=="number")a=n.origin;else{var o=typeof n.origin=="string"?ks(n.origin):n.origin;a=o.r,i=o.c}var l=t.getElementsByTagName("tr"),c=Math.min(n.sheetRows||1e7,l.length),u={s:{r:0,c:0},e:{r:a,c:i}};if(e["!ref"]){var d=cd(e["!ref"]);u.s.r=Math.min(u.s.r,d.s.r),u.s.c=Math.min(u.s.c,d.s.c),u.e.r=Math.max(u.e.r,d.e.r),u.e.c=Math.max(u.e.c,d.e.c),a==-1&&(u.e.r=a=d.e.r+1)}var f=[],h=0,m=e["!rows"]||(e["!rows"]=[]),v=0,p=0,x=0,w=0,y=0,b=0;for(e["!cols"]||(e["!cols"]=[]);v<l.length&&p<c;++v){var N=l[v];if(eS(N)){if(n.display)continue;m[p]={hidden:!0}}var C=N.children;for(x=w=0;x<C.length;++x){var _=C[x];if(!(n.display&&eS(_))){var j=_.hasAttribute("data-v")?_.getAttribute("data-v"):_.hasAttribute("v")?_.getAttribute("v"):UP(_.innerHTML),S=_.getAttribute("data-z")||_.getAttribute("z");for(h=0;h<f.length;++h){var k=f[h];k.s.c==w+i&&k.s.r<p+a&&p+a<=k.e.r&&(w=k.e.c+1-i,h=-1)}b=+_.getAttribute("colspan")||1,((y=+_.getAttribute("rowspan")||1)>1||b>1)&&f.push({s:{r:p+a,c:w+i},e:{r:p+a+(y||1)-1,c:w+i+(b||1)-1}});var D={t:"s",v:j},M=_.getAttribute("data-t")||_.getAttribute("t")||"";j!=null&&(j.length==0?D.t=M||"z":n.raw||j.trim().length==0||M=="s"||(j==="TRUE"?D={t:"b",v:!0}:j==="FALSE"?D={t:"b",v:!1}:isNaN(ma(j))?isNaN($u(j).getDate())||(D={t:"d",v:Gr(j)},n.cellDates||(D={t:"n",v:Rs(D.v)}),D.z=n.dateNF||gt[14]):D={t:"n",v:ma(j)})),D.z===void 0&&S!=null&&(D.z=S);var T="",A=_.getElementsByTagName("A");if(A&&A.length)for(var W=0;W<A.length&&!(A[W].hasAttribute("href")&&(T=A[W].getAttribute("href"),T.charAt(0)!="#"));++W);T&&T.charAt(0)!="#"&&(D.l={Target:T}),n.dense?(e[p+a]||(e[p+a]=[]),e[p+a][w+i]=D):e[ft({c:w+i,r:p+a})]=D,u.e.c<w+i&&(u.e.c=w+i),w+=b}}++p}return f.length&&(e["!merges"]=(e["!merges"]||[]).concat(f)),u.e.r=Math.max(u.e.r,p-1+a),e["!ref"]=Tt(u),p>=c&&(e["!fullref"]=Tt((u.e.r=l.length-v+p-1+a,u))),e}function W6(e,t){var r=t||{},n=r.dense?[]:{};return H6(n,e,t)}function Gie(e,t){return el(W6(e,t),t)}function eS(e){var t="",r=Kie(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function Kie(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}function Yie(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(n,a){return Array(parseInt(a,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g,"	").replace(/<text:line-break\/>/g,`
`),r=Rt(t.replace(/<[^>]*>/g,""));return[r]}var tS={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function G6(e,t){var r=t||{},n=Qw(e),a=[],i,o,l={name:""},c="",u=0,d,f,h={},m=[],v=r.dense?[]:{},p,x,w={value:""},y="",b=0,N=[],C=-1,_=-1,j={s:{r:1e6,c:1e7},e:{r:0,c:0}},S=0,k={},D=[],M={},T=0,A=0,W=[],P=1,V=1,Z=[],Q={Names:[]},O={},ne=["",""],he=[],I={},Y="",E=0,B=!1,ee=!1,J=0;for(nh.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");p=nh.exec(n);)switch(p[3]=p[3].replace(/_.*$/,"")){case"table":case"工作表":p[1]==="/"?(j.e.c>=j.s.c&&j.e.r>=j.s.r?v["!ref"]=Tt(j):v["!ref"]="A1:A1",r.sheetRows>0&&r.sheetRows<=j.e.r&&(v["!fullref"]=v["!ref"],j.e.r=r.sheetRows-1,v["!ref"]=Tt(j)),D.length&&(v["!merges"]=D),W.length&&(v["!rows"]=W),d.name=d.名称||d.name,typeof JSON<"u"&&JSON.stringify(d),m.push(d.name),h[d.name]=v,ee=!1):p[0].charAt(p[0].length-2)!=="/"&&(d=ut(p[0],!1),C=_=-1,j.s.r=j.s.c=1e7,j.e.r=j.e.c=0,v=r.dense?[]:{},D=[],W=[],ee=!0);break;case"table-row-group":p[1]==="/"?--S:++S;break;case"table-row":case"行":if(p[1]==="/"){C+=P,P=1;break}if(f=ut(p[0],!1),f.行号?C=f.行号-1:C==-1&&(C=0),P=+f["number-rows-repeated"]||1,P<10)for(J=0;J<P;++J)S>0&&(W[C+J]={level:S});_=-1;break;case"covered-table-cell":p[1]!=="/"&&++_,r.sheetStubs&&(r.dense?(v[C]||(v[C]=[]),v[C][_]={t:"z"}):v[ft({r:C,c:_})]={t:"z"}),y="",N=[];break;case"table-cell":case"数据":if(p[0].charAt(p[0].length-2)==="/")++_,w=ut(p[0],!1),V=parseInt(w["number-columns-repeated"]||"1",10),x={t:"z",v:null},w.formula&&r.cellFormula!=!1&&(x.f=YC(Rt(w.formula))),(w.数据类型||w["value-type"])=="string"&&(x.t="s",x.v=Rt(w["string-value"]||""),r.dense?(v[C]||(v[C]=[]),v[C][_]=x):v[ft({r:C,c:_})]=x),_+=V-1;else if(p[1]!=="/"){++_,y="",b=0,N=[],V=1;var K=P?C+P-1:C;if(_>j.e.c&&(j.e.c=_),_<j.s.c&&(j.s.c=_),C<j.s.r&&(j.s.r=C),K>j.e.r&&(j.e.r=K),w=ut(p[0],!1),he=[],I={},x={t:w.数据类型||w["value-type"],v:null},r.cellFormula)if(w.formula&&(w.formula=Rt(w.formula)),w["number-matrix-columns-spanned"]&&w["number-matrix-rows-spanned"]&&(T=parseInt(w["number-matrix-rows-spanned"],10)||0,A=parseInt(w["number-matrix-columns-spanned"],10)||0,M={s:{r:C,c:_},e:{r:C+T-1,c:_+A-1}},x.F=Tt(M),Z.push([M,x.F])),w.formula)x.f=YC(w.formula);else for(J=0;J<Z.length;++J)C>=Z[J][0].s.r&&C<=Z[J][0].e.r&&_>=Z[J][0].s.c&&_<=Z[J][0].e.c&&(x.F=Z[J][1]);switch((w["number-columns-spanned"]||w["number-rows-spanned"])&&(T=parseInt(w["number-rows-spanned"],10)||0,A=parseInt(w["number-columns-spanned"],10)||0,M={s:{r:C,c:_},e:{r:C+T-1,c:_+A-1}},D.push(M)),w["number-columns-repeated"]&&(V=parseInt(w["number-columns-repeated"],10)),x.t){case"boolean":x.t="b",x.v=Jt(w["boolean-value"]);break;case"float":x.t="n",x.v=parseFloat(w.value);break;case"percentage":x.t="n",x.v=parseFloat(w.value);break;case"currency":x.t="n",x.v=parseFloat(w.value);break;case"date":x.t="d",x.v=Gr(w["date-value"]),r.cellDates||(x.t="n",x.v=Rs(x.v)),x.z="m/d/yy";break;case"time":x.t="n",x.v=lZ(w["time-value"])/86400,r.cellDates&&(x.t="d",x.v=y0(x.v)),x.z="HH:MM:SS";break;case"number":x.t="n",x.v=parseFloat(w.数据数值);break;default:if(x.t==="string"||x.t==="text"||!x.t)x.t="s",w["string-value"]!=null&&(y=Rt(w["string-value"]),N=[]);else throw new Error("Unsupported value type "+x.t)}}else{if(B=!1,x.t==="s"&&(x.v=y||"",N.length&&(x.R=N),B=b==0),O.Target&&(x.l=O),he.length>0&&(x.c=he,he=[]),y&&r.cellText!==!1&&(x.w=y),B&&(x.t="z",delete x.v),(!B||r.sheetStubs)&&!(r.sheetRows&&r.sheetRows<=C))for(var ae=0;ae<P;++ae){if(V=parseInt(w["number-columns-repeated"]||"1",10),r.dense)for(v[C+ae]||(v[C+ae]=[]),v[C+ae][_]=ae==0?x:es(x);--V>0;)v[C+ae][_+V]=es(x);else for(v[ft({r:C+ae,c:_})]=x;--V>0;)v[ft({r:C+ae,c:_+V})]=es(x);j.e.c<=_&&(j.e.c=_)}V=parseInt(w["number-columns-repeated"]||"1",10),_+=V-1,V=0,x={},y="",N=[]}O={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(p[1]==="/"){if((i=a.pop())[0]!==p[3])throw"Bad state: "+i}else p[0].charAt(p[0].length-2)!=="/"&&a.push([p[3],!0]);break;case"annotation":if(p[1]==="/"){if((i=a.pop())[0]!==p[3])throw"Bad state: "+i;I.t=y,N.length&&(I.R=N),I.a=Y,he.push(I)}else p[0].charAt(p[0].length-2)!=="/"&&a.push([p[3],!1]);Y="",E=0,y="",b=0,N=[];break;case"creator":p[1]==="/"?Y=n.slice(E,p.index):E=p.index+p[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(p[1]==="/"){if((i=a.pop())[0]!==p[3])throw"Bad state: "+i}else p[0].charAt(p[0].length-2)!=="/"&&a.push([p[3],!1]);y="",b=0,N=[];break;case"scientific-number":break;case"currency-symbol":break;case"currency-style":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if(p[1]==="/"){if(k[l.name]=c,(i=a.pop())[0]!==p[3])throw"Bad state: "+i}else p[0].charAt(p[0].length-2)!=="/"&&(c="",l=ut(p[0],!1),a.push([p[3],!0]));break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":case"page-layout":break;case"style":break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":switch(a[a.length-1][0]){case"time-style":case"date-style":o=ut(p[0],!1),c+=tS[p[3]][o.style==="long"?1:0];break}break;case"fraction":break;case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(a[a.length-1][0]){case"time-style":case"date-style":o=ut(p[0],!1),c+=tS[p[3]][o.style==="long"?1:0];break}break;case"boolean-style":break;case"boolean":break;case"text-style":break;case"text":if(p[0].slice(-2)==="/>")break;if(p[1]==="/")switch(a[a.length-1][0]){case"number-style":case"date-style":case"time-style":c+=n.slice(u,p.index);break}else u=p.index+p[0].length;break;case"named-range":o=ut(p[0],!1),ne=Ig(o["cell-range-address"]);var te={Name:o.name,Ref:ne[0]+"!"+ne[1]};ee&&(te.Sheet=m.length),Q.Names.push(te);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":case"文本串":if(["master-styles"].indexOf(a[a.length-1][0])>-1)break;if(p[1]==="/"&&(!w||!w["string-value"])){var xe=Yie(n.slice(b,p.index));y=(y.length>0?y+`
`:"")+xe[0]}else ut(p[0],!1),b=p.index+p[0].length;break;case"s":break;case"database-range":if(p[1]==="/")break;try{ne=Ig(ut(p[0])["target-range-address"]),h[ne[0]]["!autofilter"]={ref:ne[1]}}catch{}break;case"date":break;case"object":break;case"title":case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":break;case"event-listener":break;case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":break;case"properties":break;case"property":break;case"a":if(p[1]!=="/"){if(O=ut(p[0],!1),!O.href)break;O.Target=Rt(O.href),delete O.href,O.Target.charAt(0)=="#"&&O.Target.indexOf(".")>-1?(ne=Ig(O.Target.slice(1)),O.Target="#"+ne[0]+"!"+ne[1]):O.Target.match(/^\.\.[\\\/]/)&&(O.Target=O.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(p[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(r.WTF)throw new Error(p)}}var F={Sheets:h,SheetNames:m,Workbook:Q};return r.bookSheets&&delete F.Sheets,F}function rS(e,t){t=t||{},bn(e,"META-INF/manifest.xml")&&dee(wr(e,"META-INF/manifest.xml"),t);var r=nn(e,"content.xml");if(!r)throw new Error("Missing content.xml in ODS / UOF file");var n=G6(Kt(r),t);return bn(e,"meta.xml")&&(n.Props=i6(wr(e,"meta.xml"))),n}function sS(e,t){return G6(e,t)}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function uj(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function X1(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):Kt(uc(e))}function Q1(e){var t=e.reduce(function(a,i){return a+i.length},0),r=new Uint8Array(t),n=0;return e.forEach(function(a){r.set(a,n),n+=a.length}),r}function nS(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>>24}function Xie(e,t){for(var r=(e[t+15]&127)<<7|e[t+14]>>1,n=e[t+14]&1,a=t+13;a>=t;--a)n=n*256+e[a];return(e[t+15]&128?-n:n)*Math.pow(10,r-6176)}function lh(e,t){var r=t?t[0]:0,n=e[r]&127;e:if(e[r++]>=128&&(n|=(e[r]&127)<<7,e[r++]<128||(n|=(e[r]&127)<<14,e[r++]<128)||(n|=(e[r]&127)<<21,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,28),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,35),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),n}function Br(e){var t=0,r=e[t]&127;e:if(e[t++]>=128){if(r|=(e[t]&127)<<7,e[t++]<128||(r|=(e[t]&127)<<14,e[t++]<128)||(r|=(e[t]&127)<<21,e[t++]<128))break e;r|=(e[t]&127)<<28}return r}function ps(e){for(var t=[],r=[0];r[0]<e.length;){var n=r[0],a=lh(e,r),i=a&7;a=Math.floor(a/8);var o=0,l;if(a==0)break;switch(i){case 0:{for(var c=r[0];e[r[0]++]>=128;);l=e.slice(c,r[0])}break;case 5:o=4,l=e.slice(r[0],r[0]+o),r[0]+=o;break;case 1:o=8,l=e.slice(r[0],r[0]+o),r[0]+=o;break;case 2:o=lh(e,r),l=e.slice(r[0],r[0]+o),r[0]+=o;break;case 3:case 4:default:throw new Error("PB Type ".concat(i," for Field ").concat(a," at offset ").concat(n))}var u={data:l,type:i};t[a]==null?t[a]=[u]:t[a].push(u)}return t}function dj(e,t){return(e==null?void 0:e.map(function(r){return t(r.data)}))||[]}function Qie(e){for(var t,r=[],n=[0];n[0]<e.length;){var a=lh(e,n),i=ps(e.slice(n[0],n[0]+a));n[0]+=a;var o={id:Br(i[1][0].data),messages:[]};i[2].forEach(function(l){var c=ps(l.data),u=Br(c[3][0].data);o.messages.push({meta:c,data:e.slice(n[0],n[0]+u)}),n[0]+=u}),(t=i[3])!=null&&t[0]&&(o.merge=Br(i[3][0].data)>>>0>0),r.push(o)}return r}function Jie(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=lh(t,r),a=[];r[0]<t.length;){var i=t[r[0]]&3;if(i==0){var o=t[r[0]++]>>2;if(o<60)++o;else{var l=o-59;o=t[r[0]],l>1&&(o|=t[r[0]+1]<<8),l>2&&(o|=t[r[0]+2]<<16),l>3&&(o|=t[r[0]+3]<<24),o>>>=0,o++,r[0]+=l}a.push(t.slice(r[0],r[0]+o)),r[0]+=o;continue}else{var c=0,u=0;if(i==1?(u=(t[r[0]]>>2&7)+4,c=(t[r[0]++]&224)<<3,c|=t[r[0]++]):(u=(t[r[0]++]>>2)+1,i==2?(c=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(c=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),a=[Q1(a)],c==0)throw new Error("Invalid offset 0");if(c>a[0].length)throw new Error("Invalid offset beyond length");if(u>=c)for(a.push(a[0].slice(-c)),u-=c;u>=a[a.length-1].length;)a.push(a[a.length-1]),u-=a[a.length-1].length;a.push(a[0].slice(-c,-c+u))}}var d=Q1(a);if(d.length!=n)throw new Error("Unexpected length: ".concat(d.length," != ").concat(n));return d}function Zie(e){for(var t=[],r=0;r<e.length;){var n=e[r++],a=e[r]|e[r+1]<<8|e[r+2]<<16;r+=3,t.push(Jie(n,e.slice(r,r+a))),r+=a}if(r!==e.length)throw new Error("data is not a valid framed stream!");return Q1(t)}function eoe(e,t,r,n){var a=uj(e),i=a.getUint32(4,!0),o=(n>1?12:8)+nS(i&(n>1?3470:398))*4,l=-1,c=-1,u=NaN,d=new Date(2001,0,1);i&512&&(l=a.getUint32(o,!0),o+=4),o+=nS(i&(n>1?12288:4096))*4,i&16&&(c=a.getUint32(o,!0),o+=4),i&32&&(u=a.getFloat64(o,!0),o+=8),i&64&&(d.setTime(d.getTime()+a.getFloat64(o,!0)*1e3),o+=8);var f;switch(e[2]){case 0:break;case 2:f={t:"n",v:u};break;case 3:f={t:"s",v:t[c]};break;case 5:f={t:"d",v:d};break;case 6:f={t:"b",v:u>0};break;case 7:f={t:"n",v:u/86400};break;case 8:f={t:"e",v:0};break;case 9:if(l>-1)f={t:"s",v:r[l]};else if(c>-1)f={t:"s",v:t[c]};else if(!isNaN(u))f={t:"n",v:u};else throw new Error("Unsupported cell type ".concat(e.slice(0,4)));break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return f}function toe(e,t,r){var n=uj(e),a=n.getUint32(8,!0),i=12,o=-1,l=-1,c=NaN,u=NaN,d=new Date(2001,0,1);a&1&&(c=Xie(e,i),i+=16),a&2&&(u=n.getFloat64(i,!0),i+=8),a&4&&(d.setTime(d.getTime()+n.getFloat64(i,!0)*1e3),i+=8),a&8&&(l=n.getUint32(i,!0),i+=4),a&16&&(o=n.getUint32(i,!0),i+=4);var f;switch(e[1]){case 0:break;case 2:f={t:"n",v:c};break;case 3:f={t:"s",v:t[l]};break;case 5:f={t:"d",v:d};break;case 6:f={t:"b",v:u>0};break;case 7:f={t:"n",v:u/86400};break;case 8:f={t:"e",v:0};break;case 9:if(o>-1)f={t:"s",v:r[o]};else throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(a&31," : ").concat(e.slice(0,4)));break;case 10:f={t:"n",v:c};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(a&31," : ").concat(e.slice(0,4)))}return f}function roe(e,t,r){switch(e[0]){case 0:case 1:case 2:case 3:return eoe(e,t,r,e[0]);case 5:return toe(e,t,r);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function Do(e){var t=ps(e);return lh(t[1][0].data)}function aS(e,t){var r=ps(t.data),n=Br(r[1][0].data),a=r[3],i=[];return(a||[]).forEach(function(o){var l=ps(o.data),c=Br(l[1][0].data)>>>0;switch(n){case 1:i[c]=X1(l[3][0].data);break;case 8:{var u=e[Do(l[9][0].data)][0],d=ps(u.data),f=e[Do(d[1][0].data)][0],h=Br(f.meta[1][0].data);if(h!=2001)throw new Error("2000 unexpected reference to ".concat(h));var m=ps(f.data);i[c]=m[3].map(function(v){return X1(v.data)}).join("")}break}}),i}function soe(e,t){var r,n,a,i,o,l,c,u,d,f,h,m,v,p,x=ps(e),w=Br(x[1][0].data)>>>0,y=Br(x[2][0].data)>>>0,b=((n=(r=x[8])==null?void 0:r[0])==null?void 0:n.data)&&Br(x[8][0].data)>0||!1,N,C;if((i=(a=x[7])==null?void 0:a[0])!=null&&i.data&&t!=0)N=(l=(o=x[7])==null?void 0:o[0])==null?void 0:l.data,C=(u=(c=x[6])==null?void 0:c[0])==null?void 0:u.data;else if((f=(d=x[4])==null?void 0:d[0])!=null&&f.data&&t!=1)N=(m=(h=x[4])==null?void 0:h[0])==null?void 0:m.data,C=(p=(v=x[3])==null?void 0:v[0])==null?void 0:p.data;else throw"NUMBERS Tile missing ".concat(t," cell storage");for(var _=b?4:1,j=uj(N),S=[],k=0;k<N.length/2;++k){var D=j.getUint16(k*2,!0);D<65535&&S.push([k,D])}if(S.length!=y)throw"Expected ".concat(y," cells, found ").concat(S.length);var M=[];for(k=0;k<S.length-1;++k)M[S[k][0]]=C.subarray(S[k][1]*_,S[k+1][1]*_);return S.length>=1&&(M[S[S.length-1][0]]=C.subarray(S[S.length-1][1]*_)),{R:w,cells:M}}function noe(e,t){var r,n=ps(t.data),a=(r=n==null?void 0:n[7])!=null&&r[0]?Br(n[7][0].data)>>>0>0?1:0:-1,i=dj(n[5],function(o){return soe(o,a)});return{nrows:Br(n[4][0].data)>>>0,data:i.reduce(function(o,l){return o[l.R]||(o[l.R]=[]),l.cells.forEach(function(c,u){if(o[l.R][u])throw new Error("Duplicate cell r=".concat(l.R," c=").concat(u));o[l.R][u]=c}),o},[])}}function aoe(e,t,r){var n,a=ps(t.data),i={s:{r:0,c:0},e:{r:0,c:0}};if(i.e.r=(Br(a[6][0].data)>>>0)-1,i.e.r<0)throw new Error("Invalid row varint ".concat(a[6][0].data));if(i.e.c=(Br(a[7][0].data)>>>0)-1,i.e.c<0)throw new Error("Invalid col varint ".concat(a[7][0].data));r["!ref"]=Tt(i);var o=ps(a[4][0].data),l=aS(e,e[Do(o[4][0].data)][0]),c=(n=o[17])!=null&&n[0]?aS(e,e[Do(o[17][0].data)][0]):[],u=ps(o[3][0].data),d=0;u[1].forEach(function(f){var h=ps(f.data),m=e[Do(h[2][0].data)][0],v=Br(m.meta[1][0].data);if(v!=6002)throw new Error("6001 unexpected reference to ".concat(v));var p=noe(e,m);p.data.forEach(function(x,w){x.forEach(function(y,b){var N=ft({r:d+w,c:b}),C=roe(y,l,c);C&&(r[N]=C)})}),d+=p.nrows})}function ioe(e,t){var r=ps(t.data),n={"!ref":"A1"},a=e[Do(r[2][0].data)],i=Br(a[0].meta[1][0].data);if(i!=6001)throw new Error("6000 unexpected reference to ".concat(i));return aoe(e,a[0],n),n}function ooe(e,t){var r,n=ps(t.data),a={name:(r=n[1])!=null&&r[0]?X1(n[1][0].data):"",sheets:[]},i=dj(n[2],Do);return i.forEach(function(o){e[o].forEach(function(l){var c=Br(l.meta[1][0].data);c==6e3&&a.sheets.push(ioe(e,l))})}),a}function loe(e,t){var r=mj(),n=ps(t.data),a=dj(n[1],Do);if(a.forEach(function(i){e[i].forEach(function(o){var l=Br(o.meta[1][0].data);if(l==2){var c=ooe(e,o);c.sheets.forEach(function(u,d){pj(r,u,d==0?c.name:c.name+"_"+d,!0)})}})}),r.SheetNames.length==0)throw new Error("Empty NUMBERS file");return r}function Lg(e){var t,r,n,a,i={},o=[];if(e.FullPaths.forEach(function(c){if(c.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(c){if(c.name.match(/\.iwa$/)){var u;try{u=Zie(c.content)}catch(f){return console.log("?? "+c.content.length+" "+(f.message||f))}var d;try{d=Qie(u)}catch(f){return console.log("## "+(f.message||f))}d.forEach(function(f){i[f.id]=f.messages,o.push(f.id)})}}),!o.length)throw new Error("File has no messages");var l=((a=(n=(r=(t=i==null?void 0:i[1])==null?void 0:t[0])==null?void 0:r.meta)==null?void 0:n[1])==null?void 0:a[0].data)&&Br(i[1][0].meta[1][0].data)==1&&i[1][0];if(l||o.forEach(function(c){i[c].forEach(function(u){var d=Br(u.meta[1][0].data)>>>0;if(d==1)if(!l)l=u;else throw new Error("Document has multiple roots")})}),!l)throw new Error("Cannot find Document root");return loe(i,l)}function coe(e){return function(r){for(var n=0;n!=e.length;++n){var a=e[n];r[a[0]]===void 0&&(r[a[0]]=a[1]),a[2]==="n"&&(r[a[0]]=Number(r[a[0]]))}}}function fj(e){coe([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function uoe(e){return Wc.WS.indexOf(e)>-1?"sheet":e==Wc.CS?"chart":e==Wc.DS?"dialog":e==Wc.MS?"macro":e&&e.length?e:"sheet"}function doe(e,t){if(!e)return 0;try{e=t.map(function(n){return n.id||(n.id=n.strRelID),[n.name,e["!id"][n.id].Target,uoe(e["!id"][n.id].Type)]})}catch{return null}return!e||e.length===0?null:e}function foe(e,t,r,n,a,i,o,l,c,u,d,f){try{i[n]=ff(nn(e,r,!0),t);var h=wr(e,t),m;switch(l){case"sheet":m=vie(h,t,a,c,i[n],u,d,f);break;case"chart":if(m=yie(h,t,a,c,i[n],u,d,f),!m||!m["!drawel"])break;var v=qd(m["!drawel"].Target,t),p=H1(v),x=gse(nn(e,v,!0),ff(nn(e,p,!0),v)),w=qd(x,v),y=H1(w);m=tie(nn(e,w,!0),w,c,ff(nn(e,y,!0),w),u,m);break;case"macro":m=bie(h,t,a,c,i[n],u,d,f);break;case"dialog":m=wie(h,t,a,c,i[n],u,d,f);break;default:throw new Error("Unrecognized sheet type "+l)}o[n]=m;var b=[];i&&i[n]&&Wa(i[n]).forEach(function(N){var C="";if(i[n][N].Type==Wc.CMNT){C=qd(i[n][N].Target,t);var _=Cie(wr(e,C,!0),C,c);if(!_||!_.length)return;VC(m,_,!1)}i[n][N].Type==Wc.TCMNT&&(C=qd(i[n][N].Target,t),b=b.concat(yse(wr(e,C,!0),c)))}),b&&b.length&&VC(m,b,!0,c.people||[])}catch(N){if(c.WTF)throw N}}function vn(e){return e.charAt(0)=="/"?e.slice(1):e}function hoe(e,t){if(RP(),t=t||{},fj(t),bn(e,"META-INF/manifest.xml")||bn(e,"objectdata.xml"))return rS(e,t);if(bn(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof Lg<"u"){if(e.FileIndex)return Lg(e);var r=kt.utils.cfb_new();return gC(e).forEach(function(W){mZ(r,W,hZ(e,W))}),Lg(r)}throw new Error("Unsupported NUMBERS file")}if(!bn(e,"[Content_Types].xml"))throw bn(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):bn(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var n=gC(e),a=cee(nn(e,"[Content_Types].xml")),i=!1,o,l;if(a.workbooks.length===0&&(l="xl/workbook.xml",wr(e,l,!0)&&a.workbooks.push(l)),a.workbooks.length===0){if(l="xl/workbook.bin",!wr(e,l,!0))throw new Error("Could not find workbook");a.workbooks.push(l),i=!0}a.workbooks[0].slice(-3)=="bin"&&(i=!0);var c={},u={};if(!t.bookSheets&&!t.bookProps){if(pf=[],a.sst)try{pf=_ie(wr(e,vn(a.sst)),a.sst,t)}catch(W){if(t.WTF)throw W}t.cellStyles&&a.themes.length&&(c=Nie(nn(e,a.themes[0].replace(/^\//,""),!0)||"",a.themes[0],t)),a.style&&(u=jie(wr(e,vn(a.style)),a.style,c,t))}a.links.map(function(W){try{var P=ff(nn(e,H1(vn(W))),W);return Eie(wr(e,vn(W)),P,W,t)}catch{}});var d=gie(wr(e,vn(a.workbooks[0])),a.workbooks[0],t),f={},h="";a.coreprops.length&&(h=wr(e,vn(a.coreprops[0]),!0),h&&(f=i6(h)),a.extprops.length!==0&&(h=wr(e,vn(a.extprops[0]),!0),h&&mee(h,f,t)));var m={};(!t.bookSheets||t.bookProps)&&a.custprops.length!==0&&(h=nn(e,vn(a.custprops[0]),!0),h&&(m=xee(h,t)));var v={};if((t.bookSheets||t.bookProps)&&(d.Sheets?o=d.Sheets.map(function(P){return P.name}):f.Worksheets&&f.SheetNames.length>0&&(o=f.SheetNames),t.bookProps&&(v.Props=f,v.Custprops=m),t.bookSheets&&typeof o<"u"&&(v.SheetNames=o),t.bookSheets?v.SheetNames:t.bookProps))return v;o={};var p={};t.bookDeps&&a.calcchain&&(p=Sie(wr(e,vn(a.calcchain)),a.calcchain));var x=0,w={},y,b;{var N=d.Sheets;f.Worksheets=N.length,f.SheetNames=[];for(var C=0;C!=N.length;++C)f.SheetNames[C]=N[C].name}var _=i?"bin":"xml",j=a.workbooks[0].lastIndexOf("/"),S=(a.workbooks[0].slice(0,j+1)+"_rels/"+a.workbooks[0].slice(j+1)+".rels").replace(/^\//,"");bn(e,S)||(S="xl/_rels/workbook."+_+".rels");var k=ff(nn(e,S,!0),S.replace(/_rels.*/,"s5s"));(a.metadata||[]).length>=1&&(t.xlmeta=kie(wr(e,vn(a.metadata[0])),a.metadata[0],t)),(a.people||[]).length>=1&&(t.people=bse(wr(e,vn(a.people[0])),t)),k&&(k=doe(k,d.Sheets));var D=wr(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(x=0;x!=f.Worksheets;++x){var M="sheet";if(k&&k[x]?(y="xl/"+k[x][1].replace(/[\/]?xl\//,""),bn(e,y)||(y=k[x][1]),bn(e,y)||(y=S.replace(/_rels\/.*$/,"")+k[x][1]),M=k[x][2]):(y="xl/worksheets/sheet"+(x+1-D)+"."+_,y=y.replace(/sheet0\./,"sheet.")),b=y.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&t.sheets!=null)switch(typeof t.sheets){case"number":if(x!=t.sheets)continue e;break;case"string":if(f.SheetNames[x].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var T=!1,A=0;A!=t.sheets.length;++A)typeof t.sheets[A]=="number"&&t.sheets[A]==x&&(T=1),typeof t.sheets[A]=="string"&&t.sheets[A].toLowerCase()==f.SheetNames[x].toLowerCase()&&(T=1);if(!T)continue e}}foe(e,y,b,f.SheetNames[x],x,w,o,M,t,d,c,u)}return v={Directory:a,Workbook:d,Props:f,Custprops:m,Deps:p,Sheets:o,SheetNames:f.SheetNames,Strings:pf,Styles:u,Themes:c,SSF:es(gt)},t&&t.bookFiles&&(e.files?(v.keys=n,v.files=e.files):(v.keys=[],v.files={},e.FullPaths.forEach(function(W,P){W=W.replace(/^Root Entry[\/]/,""),v.keys.push(W),v.files[W]=e.FileIndex[P]}))),t&&t.bookVBA&&(a.vba.length>0?v.vbaraw=wr(e,vn(a.vba[0]),!0):a.defaults&&a.defaults.bin===_se&&(v.vbaraw=wr(e,"xl/vbaProject.bin",!0))),v}function moe(e,t){var r=t||{},n="Workbook",a=kt.find(e,n);try{if(n="/!DataSpaces/Version",a=kt.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(ire(a.content),n="/!DataSpaces/DataSpaceMap",a=kt.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var i=lre(a.content);if(i.length!==1||i[0].comps.length!==1||i[0].comps[0].t!==0||i[0].name!=="StrongEncryptionDataSpace"||i[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",a=kt.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var o=cre(a.content);if(o.length!=1||o[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",a=kt.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);dre(a.content)}catch{}if(n="/EncryptionInfo",a=kt.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);var l=fre(a.content);if(n="/EncryptedPackage",a=kt.find(e,n),!a||!a.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(l[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(l[1],a.content,r.password||"",r);if(l[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(l[1],a.content,r.password||"",r);throw new Error("File is password-protected")}function hj(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=mn(e.slice(0,12));break;case"binary":r=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function poe(e,t){return kt.find(e,"EncryptedPackage")?moe(e,t):V6(e,t)}function xoe(e,t){var r,n=e,a=t||{};return a.type||(a.type=St&&Buffer.isBuffer(e)?"buffer":"base64"),r=LP(n,a),hoe(r,a)}function K6(e,t){var r=0;e:for(;r<e.length;)switch(e.charCodeAt(r)){case 10:case 13:case 32:++r;break;case 60:return K1(e.slice(r),t);default:break e}return ah.to_workbook(e,t)}function goe(e,t){var r="",n=hj(e,t);switch(t.type){case"base64":r=mn(e);break;case"binary":r=e;break;case"buffer":r=e.toString("binary");break;case"array":r=Zl(e);break;default:throw new Error("Unrecognized type "+t.type)}return n[0]==239&&n[1]==187&&n[2]==191&&(r=Kt(r)),t.type="binary",K6(r,t)}function voe(e,t){var r=e;return t.type=="base64"&&(r=mn(r)),r=th.utils.decode(1200,r.slice(2),"str"),t.type="binary",K6(r,t)}function yoe(e){return e.match(/[^\x00-\x7F]/)?zd(e):e}function Mg(e,t,r,n){return n?(r.type="string",ah.to_workbook(e,r)):ah.to_workbook(t,r)}function J1(e,t){yP();var r=t||{};if(typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer)return J1(new Uint8Array(e),(r=es(r),r.type="array",r));typeof Uint8Array<"u"&&e instanceof Uint8Array&&!r.type&&(r.type=typeof Deno<"u"?"buffer":"array");var n=e,a=[0,0,0,0],i=!1;if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),iu={},r.dateNF&&(iu.dateNF=r.dateNF),r.type||(r.type=St&&Buffer.isBuffer(e)?"buffer":"base64"),r.type=="file"&&(r.type=St?"buffer":"binary",n=iZ(e),typeof Uint8Array<"u"&&!St&&(r.type="array")),r.type=="string"&&(i=!0,r.type="binary",r.codepage=65001,n=yoe(e)),r.type=="array"&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var o=new ArrayBuffer(3),l=new Uint8Array(o);if(l.foo="bar",!l.foo)return r=es(r),r.type="array",J1(Hw(n),r)}switch((a=hj(n,r))[0]){case 208:if(a[1]===207&&a[2]===17&&a[3]===224&&a[4]===161&&a[5]===177&&a[6]===26&&a[7]===225)return poe(kt.read(n,r),r);break;case 9:if(a[1]<=8)return V6(n,r);break;case 60:return K1(n,r);case 73:if(a[1]===73&&a[2]===42&&a[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(a[1]===68)return Gte(n,r);break;case 84:if(a[1]===65&&a[2]===66&&a[3]===76)return Hte.to_workbook(n,r);break;case 80:return a[1]===75&&a[2]<9&&a[3]<9?xoe(n,r):Mg(e,n,r,i);case 239:return a[3]===60?K1(n,r):Mg(e,n,r,i);case 255:if(a[1]===254)return voe(n,r);if(a[1]===0&&a[2]===2&&a[3]===0)return mf.to_workbook(n,r);break;case 0:if(a[1]===0&&(a[2]>=2&&a[3]===0||a[2]===0&&(a[3]===8||a[3]===9)))return mf.to_workbook(n,r);break;case 3:case 131:case 139:case 140:return zC.to_workbook(n,r);case 123:if(a[1]===92&&a[2]===114&&a[3]===116)return _re.to_workbook(n,r);break;case 10:case 13:case 32:return goe(n,r);case 137:if(a[1]===80&&a[2]===78&&a[3]===71)throw new Error("PNG Image File is not a spreadsheet");break}return zte.indexOf(a[0])>-1&&a[2]<=12&&a[3]<=31?zC.to_workbook(n,r):Mg(e,n,r,i)}function boe(e,t,r,n,a,i,o,l){var c=ts(r),u=l.defval,d=l.raw||!Object.prototype.hasOwnProperty.call(l,"raw"),f=!0,h=a===1?[]:{};if(a!==1)if(Object.defineProperty)try{Object.defineProperty(h,"__rowNum__",{value:r,enumerable:!1})}catch{h.__rowNum__=r}else h.__rowNum__=r;if(!o||e[r])for(var m=t.s.c;m<=t.e.c;++m){var v=o?e[r][m]:e[n[m]+c];if(v===void 0||v.t===void 0){if(u===void 0)continue;i[m]!=null&&(h[i[m]]=u);continue}var p=v.v;switch(v.t){case"z":if(p==null)break;continue;case"e":p=p==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+v.t)}if(i[m]!=null){if(p==null)if(v.t=="e"&&p===null)h[i[m]]=null;else if(u!==void 0)h[i[m]]=u;else if(d&&p===null)h[i[m]]=null;else continue;else h[i[m]]=d&&(v.t!=="n"||v.t==="n"&&l.rawNumbers!==!1)?p:Ti(v,p,l);p!=null&&(f=!1)}}return{row:h,isempty:f}}function Z1(e,t){if(e==null||e["!ref"]==null)return[];var r={t:"n",v:0},n=0,a=1,i=[],o=0,l="",c={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range!=null?u.range:e["!ref"];switch(u.header===1?n=1:u.header==="A"?n=2:Array.isArray(u.header)?n=3:u.header==null&&(n=0),typeof d){case"string":c=hr(d);break;case"number":c=hr(e["!ref"]),c.s.r=d;break;default:c=d}n>0&&(a=0);var f=ts(c.s.r),h=[],m=[],v=0,p=0,x=Array.isArray(e),w=c.s.r,y=0,b={};x&&!e[w]&&(e[w]=[]);var N=u.skipHidden&&e["!cols"]||[],C=u.skipHidden&&e["!rows"]||[];for(y=c.s.c;y<=c.e.c;++y)if(!(N[y]||{}).hidden)switch(h[y]=Mr(y),r=x?e[w][y]:e[h[y]+f],n){case 1:i[y]=y-c.s.c;break;case 2:i[y]=h[y];break;case 3:i[y]=u.header[y-c.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),l=o=Ti(r,null,u),p=b[o]||0,!p)b[o]=1;else{do l=o+"_"+p++;while(b[l]);b[o]=p,b[l]=1}i[y]=l}for(w=c.s.r+a;w<=c.e.r;++w)if(!(C[w]||{}).hidden){var _=boe(e,c,w,h,n,i,x,u);(_.isempty===!1||(n===1?u.blankrows!==!1:u.blankrows))&&(m[v++]=_.row)}return m.length=v,m}var iS=/"/g;function woe(e,t,r,n,a,i,o,l){for(var c=!0,u=[],d="",f=ts(r),h=t.s.c;h<=t.e.c;++h)if(n[h]){var m=l.dense?(e[r]||[])[h]:e[n[h]+f];if(m==null)d="";else if(m.v!=null){c=!1,d=""+(l.rawNumbers&&m.t=="n"?m.v:Ti(m,null,l));for(var v=0,p=0;v!==d.length;++v)if((p=d.charCodeAt(v))===a||p===i||p===34||l.forceQuotes){d='"'+d.replace(iS,'""')+'"';break}d=="ID"&&(d='"ID"')}else m.f!=null&&!m.F?(c=!1,d="="+m.f,d.indexOf(",")>=0&&(d='"'+d.replace(iS,'""')+'"')):d="";u.push(d)}return l.blankrows===!1&&c?null:u.join(o)}function Y6(e,t){var r=[],n=t??{};if(e==null||e["!ref"]==null)return"";var a=hr(e["!ref"]),i=n.FS!==void 0?n.FS:",",o=i.charCodeAt(0),l=n.RS!==void 0?n.RS:`
`,c=l.charCodeAt(0),u=new RegExp((i=="|"?"\\|":i)+"+$"),d="",f=[];n.dense=Array.isArray(e);for(var h=n.skipHidden&&e["!cols"]||[],m=n.skipHidden&&e["!rows"]||[],v=a.s.c;v<=a.e.c;++v)(h[v]||{}).hidden||(f[v]=Mr(v));for(var p=0,x=a.s.r;x<=a.e.r;++x)(m[x]||{}).hidden||(d=woe(e,a,x,f,o,c,i,n),d!=null&&(n.strip&&(d=d.replace(u,"")),(d||n.blankrows!==!1)&&r.push((p++?l:"")+d)));return delete n.dense,r.join("")}function joe(e,t){t||(t={}),t.FS="	",t.RS=`
`;var r=Y6(e,t);return r}function Noe(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var a=hr(e["!ref"]),i="",o=[],l,c=[],u=Array.isArray(e);for(l=a.s.c;l<=a.e.c;++l)o[l]=Mr(l);for(var d=a.s.r;d<=a.e.r;++d)for(i=ts(d),l=a.s.c;l<=a.e.c;++l)if(t=o[l]+i,r=u?(e[d]||[])[l]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}c[c.length]=t+"="+n}return c}function X6(e,t,r){var n=r||{},a=+!n.skipHeader,i=e||{},o=0,l=0;if(i&&n.origin!=null)if(typeof n.origin=="number")o=n.origin;else{var c=typeof n.origin=="string"?ks(n.origin):n.origin;o=c.r,l=c.c}var u,d={s:{c:0,r:0},e:{c:l,r:o+t.length-1+a}};if(i["!ref"]){var f=hr(i["!ref"]);d.e.c=Math.max(d.e.c,f.e.c),d.e.r=Math.max(d.e.r,f.e.r),o==-1&&(o=f.e.r+1,d.e.r=o+t.length-1+a)}else o==-1&&(o=0,d.e.r=t.length-1+a);var h=n.header||[],m=0;t.forEach(function(p,x){Wa(p).forEach(function(w){(m=h.indexOf(w))==-1&&(h[m=h.length]=w);var y=p[w],b="z",N="",C=ft({c:l+m,r:o+x+a});u=ch(i,C),y&&typeof y=="object"&&!(y instanceof Date)?i[C]=y:(typeof y=="number"?b="n":typeof y=="boolean"?b="b":typeof y=="string"?b="s":y instanceof Date?(b="d",n.cellDates||(b="n",y=Rs(y)),N=n.dateNF||gt[14]):y===null&&n.nullError&&(b="e",y=0),u?(u.t=b,u.v=y,delete u.w,delete u.R,N&&(u.z=N)):i[C]=u={t:b,v:y},N&&(u.z=N))})}),d.e.c=Math.max(d.e.c,l+h.length-1);var v=ts(o);if(a)for(m=0;m<h.length;++m)i[Mr(m+l)+v]={t:"s",v:h[m]};return i["!ref"]=Tt(d),i}function _oe(e,t){return X6(null,e,t)}function ch(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=ks(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?ch(e,ft(t)):ch(e,ft({r:t,c:r||0}))}function Coe(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function mj(){return{SheetNames:[],Sheets:{}}}function pj(e,t,r,n){var a=1;if(!r)for(;a<=65535&&e.SheetNames.indexOf(r="Sheet"+a)!=-1;++a,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var i=r.match(/(^.*?)(\d+)$/);a=i&&+i[2]||0;var o=i&&i[1]||r;for(++a;a<=65535&&e.SheetNames.indexOf(r=o+a)!=-1;++a);}if(cie(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function Soe(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=Coe(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function Eoe(e,t){return e.z=t,e}function Q6(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function koe(e,t,r){return Q6(e,"#"+t,r)}function Toe(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function Aoe(e,t,r,n){for(var a=typeof t!="string"?t:hr(t),i=typeof t=="string"?t:Tt(t),o=a.s.r;o<=a.e.r;++o)for(var l=a.s.c;l<=a.e.c;++l){var c=ch(e,o,l);c.t="n",c.F=i,delete c.v,o==a.s.r&&l==a.s.c&&(c.f=r,n&&(c.D=!0))}return e}var Roe={encode_col:Mr,encode_row:ts,encode_cell:ft,encode_range:Tt,decode_col:ej,decode_row:Zw,split_cell:qZ,decode_cell:ks,decode_range:cd,format_cell:Ti,sheet_add_aoa:t6,sheet_add_json:X6,sheet_add_dom:H6,aoa_to_sheet:ud,json_to_sheet:_oe,table_to_sheet:W6,table_to_book:Gie,sheet_to_csv:Y6,sheet_to_txt:joe,sheet_to_json:Z1,sheet_to_html:Wie,sheet_to_formulae:Noe,sheet_to_row_object_array:Z1,sheet_get_cell:ch,book_new:mj,book_append_sheet:pj,book_set_sheet_visibility:Soe,cell_set_number_format:Eoe,cell_set_hyperlink:Q6,cell_set_internal_link:koe,cell_add_comment:Toe,sheet_set_array_formula:Aoe,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Doe(){const[e,t]=g.useState([]),[r,n]=g.useState(!0),[a,i]=g.useState(!1),[o,l]=g.useState(""),[c,u]=g.useState({totalUsers:0,totalPoints:0,averagePoints:0}),[d,f]=g.useState(null),[h,m]=g.useState(0),v=g.useCallback(async()=>{let N=be.from("loyalty_points").select("*").order("points",{ascending:!1});o&&(N=N.or(`email.ilike.%${o}%,firstname.ilike.%${o}%,lastname.ilike.%${o}%`));const{data:C,error:_}=await N.limit(100);_?(fe.error("Erreur lors du chargement des données"),console.error(_)):t(C||[]),n(!1)},[o]),p=async()=>{const{data:N,error:C}=await be.from("loyalty_points").select("points");if(!C&&N){const _=N.reduce((j,S)=>j+(S.points||0),0);u({totalUsers:N.length,totalPoints:_,averagePoints:N.length>0?Math.round(_/N.length):0})}};g.useEffect(()=>{v(),p()},[v]);const x=async N=>{var _,j;const C=(_=N.target.files)==null?void 0:_[0];if(C){i(!0);try{const S=await C.arrayBuffer(),k=J1(S),D=k.SheetNames[0],M=k.Sheets[D],A=Roe.sheet_to_json(M).map(V=>({email:V.email||V.Email||V.EMAIL||"",points:parseInt(V.points||V.Points||V.POINTS||"0")||0,wordpress_user_id:parseInt(V.id||V.ID||"0")||null,username:V.username||V.Username||null,firstname:V.firstname||V.Firstname||V.first_name||null,lastname:V.lastname||V.Lastname||V.last_name||null})).filter(V=>V.email);console.log(`Parsed ${A.length} records from file`);const{data:W,error:P}=await be.functions.invoke("import-loyalty-points",{body:{records:A}});if(P)throw P;fe.success(`Import terminé: ${W.imported} nouveaux, ${W.updated} mis à jour`),((j=W.errors)==null?void 0:j.length)>0&&(console.warn("Import errors:",W.errors),fe.warning(`${W.errors.length} erreurs lors de l'import`)),v(),p()}catch(S){console.error("Import error:",S),fe.error(`Erreur d'import: ${S.message}`)}finally{i(!1),N.target.value=""}}},w=N=>{f(N.id),m(N.points)},y=()=>{f(null),m(0)},b=async N=>{const{error:C}=await be.from("loyalty_points").update({points:h}).eq("id",N);C?fe.error("Erreur lors de la mise à jour"):(fe.success("Points mis à jour"),v(),p()),f(null)};return s.jsx(Ur,{children:s.jsx("div",{className:"min-h-screen bg-background p-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Programme de Fidélité"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Gérez les points de fidélité de vos clients"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Total Clients"}),s.jsx(hi,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold",children:c.totalUsers.toLocaleString()})})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Total Points"}),s.jsx(Ut,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold",children:c.totalPoints.toLocaleString()})})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Moyenne / Client"}),s.jsx(w4,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold",children:c.averagePoints.toLocaleString()})})]})]}),s.jsx(ve,{children:s.jsx(Ie,{className:"pt-6",children:s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[s.jsx("div",{className:"flex-1",children:s.jsxs("div",{className:"relative",children:[s.jsx(ql,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(lt,{placeholder:"Rechercher par email, nom...",value:o,onChange:N=>l(N.target.value),className:"pl-10"})]})}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"file-upload",children:s.jsx(se,{asChild:!0,disabled:a,children:s.jsxs("span",{className:"cursor-pointer",children:[s.jsx(nc,{className:"mr-2 h-4 w-4"}),a?"Import en cours...":"Importer Excel"]})})}),s.jsx("input",{id:"file-upload",type:"file",accept:".xlsx,.xls,.csv",onChange:x,className:"hidden"})]})]})})}),s.jsx(ve,{children:s.jsx(Ie,{className:"pt-6",children:r?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Chargement..."}):e.length===0?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Aucun enregistrement trouvé. Importez un fichier Excel pour commencer."}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(Pi,{children:[s.jsx(Ii,{children:s.jsxs(nr,{children:[s.jsx(nt,{children:"Email"}),s.jsx(nt,{children:"Nom"}),s.jsx(nt,{children:"Username"}),s.jsx(nt,{className:"text-right",children:"Points"}),s.jsx(nt,{children:"Importé le"}),s.jsx(nt,{className:"w-24",children:"Actions"})]})}),s.jsx(Fi,{children:e.map(N=>s.jsxs(nr,{children:[s.jsx(Be,{className:"font-medium",children:N.email}),s.jsx(Be,{children:[N.firstname,N.lastname].filter(Boolean).join(" ")||"-"}),s.jsx(Be,{children:N.username||"-"}),s.jsx(Be,{className:"text-right",children:d===N.id?s.jsx(lt,{type:"number",value:h,onChange:C=>m(parseInt(C.target.value)||0),className:"w-24 text-right"}):s.jsx("span",{className:"font-semibold text-primary",children:N.points.toLocaleString()})}),s.jsx(Be,{className:"text-muted-foreground text-sm",children:new Date(N.imported_at).toLocaleDateString("fr-FR")}),s.jsx(Be,{children:d===N.id?s.jsxs("div",{className:"flex gap-1",children:[s.jsx(se,{size:"icon",variant:"ghost",onClick:()=>b(N.id),children:s.jsx(tL,{className:"h-4 w-4"})}),s.jsx(se,{size:"icon",variant:"ghost",onClick:y,children:s.jsx(Tu,{className:"h-4 w-4"})})]}):s.jsx(se,{size:"icon",variant:"ghost",onClick:()=>w(N),children:s.jsx(J8,{className:"h-4 w-4"})})})]},N.id))})]})})})})]})})})}function Ooe(){const{data:e,isLoading:t}=Vr({queryKey:["admin-orders-stats"],queryFn:async()=>{const{data:P,error:V}=await be.from("orders").select("*").order("created_at",{ascending:!1});if(V)throw V;return P}}),{data:r,isLoading:n}=Vr({queryKey:["admin-loyalty-redemptions-stats"],queryFn:async()=>{const{data:P,error:V}=await be.from("loyalty_redemptions").select("*").order("created_at",{ascending:!1});if(V)throw V;return P}}),{data:a,isLoading:i}=Vr({queryKey:["admin-subscribers-count"],queryFn:async()=>{const{count:P,error:V}=await be.from("email_subscribers").select("*",{count:"exact",head:!0});if(V)throw V;return P||0}}),{data:o,isLoading:l}=Vr({queryKey:["admin-loyalty-count"],queryFn:async()=>{const{count:P,error:V}=await be.from("loyalty_points").select("*",{count:"exact",head:!0});if(V)throw V;return P||0}}),{data:c,isLoading:u}=Vr({queryKey:["admin-products-count"],queryFn:async()=>{const{count:P,error:V}=await be.from("products").select("*",{count:"exact",head:!0});if(V)throw V;return P||0}}),d=t||i||l||u||n,f=(e==null?void 0:e.filter(P=>P.status==="paid"))||[];e!=null&&e.filter(P=>P.status==="pending");const h=f.reduce((P,V)=>P+Number(V.total),0),m=f.length,v=m>0?h/m:0,p=new Date,x=GG(p),w=WG(p),y=f.filter(P=>{const V=new Date(P.created_at||"");return V>=x&&V<=w}),b=y.reduce((P,V)=>P+Number(V.total),0),N=y.reduce((P,V)=>P+(V.points_used||0),0),_=((r==null?void 0:r.filter(P=>{const V=new Date(P.created_at);return V>=x&&V<=w}))||[]).reduce((P,V)=>P+V.points_used,0),j=N+_,S=WK(p),k=f.filter(P=>new Date(P.created_at||"")>=S),D=new Set(e==null?void 0:e.map(P=>P.email)).size,T=[...((e==null?void 0:e.filter(P=>P.status!=="pending"))||[]).slice(0,20).map(P=>({type:"order",data:P,created_at:P.created_at||""})),...(r==null?void 0:r.slice(0,20).map(P=>({type:"loyalty",data:P,created_at:P.created_at})))||[]].sort((P,V)=>new Date(V.created_at).getTime()-new Date(P.created_at).getTime()).slice(0,10),A={};f.forEach(P=>{const V=P.items;Array.isArray(V)&&V.forEach(Z=>{A[Z.name]||(A[Z.name]={name:Z.name,quantity:0,revenue:0}),A[Z.name].quantity+=Z.quantity,A[Z.name].revenue+=Z.price*Z.quantity})});const W=Object.values(A).sort((P,V)=>V.revenue-P.revenue).slice(0,5);return d?s.jsx(Ur,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Wr,{className:"h-8 w-8 animate-spin text-primary"})})}):s.jsx(Ur,{children:s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Tableau de bord"}),s.jsx("p",{className:"text-muted-foreground",children:"Vue d'ensemble de votre activité"})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Chiffre d'affaires total"}),s.jsx(sb,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:[h.toFixed(2)," €"]}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[b.toFixed(2)," € ce mois-ci"]})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Commandes payées"}),s.jsx(ga,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold",children:m}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[k.length," ces 7 derniers jours"]})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Panier moyen"}),s.jsx(w4,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:[v.toFixed(2)," €"]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Par commande payée"})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Clients uniques"}),s.jsx(hi,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold",children:D}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ayant passé commande"})]})]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Produits"}),s.jsx(hs,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold",children:c}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"En catalogue"})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Abonnés newsletter"}),s.jsx(hi,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold",children:a}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Inscrits"})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Membres fidélité"}),s.jsx(hi,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold",children:o}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Avec points"})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Points fidélité utilisés"}),s.jsx(Ut,{className:"h-4 w-4 text-purple-500"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold text-purple-600",children:j.toLocaleString()}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Ce mois-ci"})]})]})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsx(rt,{children:"Dernières commandes"})}),s.jsx(Ie,{children:s.jsx("div",{className:"space-y-3",children:T.length===0?s.jsx("p",{className:"text-muted-foreground text-sm",children:"Aucune commande"}):T.map(P=>{var V,Z;return P.type==="order"?s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:"€"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:P.data.reference}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[P.data.first_name," ",P.data.last_name]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"font-medium text-sm",children:[Number(P.data.total).toFixed(2)," €"]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${P.data.status==="paid"?"bg-green-100 text-green-700":P.data.status==="pending"?"bg-yellow-100 text-yellow-700":"bg-red-100 text-red-700"}`,children:P.data.status==="paid"?"Payée":P.data.status==="pending"?"En attente":P.data.status})]})]},P.data.id):s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-purple-100 text-purple-700",children:"Pts"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm text-purple-600",children:"Fidélité"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[((V=P.data.shipping_address)==null?void 0:V.first_name)||""," ",((Z=P.data.shipping_address)==null?void 0:Z.last_name)||""]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"font-medium text-sm text-purple-600",children:[P.data.points_used," pts"]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${P.data.status==="processing"?"bg-green-100 text-green-700":P.data.status==="pending"?"bg-yellow-100 text-yellow-700":P.data.status==="shipped"||P.data.status==="completed"?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:P.data.status==="processing"?"Payée":P.data.status==="pending"?"En attente":P.data.status==="shipped"?"Expédié":P.data.status==="completed"?"Terminé":P.data.status})]})]},P.data.id)})})})]}),s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsx(rt,{children:"Meilleures ventes"})}),s.jsx(Ie,{children:s.jsx("div",{className:"space-y-3",children:W.length===0?s.jsx("p",{className:"text-muted-foreground text-sm",children:"Aucune vente"}):W.map((P,V)=>s.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"text-xs font-bold text-muted-foreground w-5",children:["#",V+1]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm line-clamp-1",children:P.name}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[P.quantity," vendu(s)"]})]})]}),s.jsxs("p",{className:"font-medium text-sm",children:[P.revenue.toFixed(2)," €"]})]},P.name))})})]})]})]})})}const Poe=()=>{const[e,t]=g.useState(null),[r,n]=g.useState(!1),[a,i]=g.useState(null),o=c=>{var d;const u=(d=c.target.files)==null?void 0:d[0];u&&u.name.endsWith(".xml")?(t(u),i(null)):fe.error("Veuillez sélectionner un fichier XML")},l=async()=>{if(!e){fe.error("Veuillez sélectionner un fichier");return}n(!0),i(null);try{const c=await e.text(),{data:u,error:d}=await be.functions.invoke("import-products-xml",{body:{xmlContent:c}});if(d)throw d;i(u),u.success?fe.success(`Import réussi ! ${u.imported} produits importés`):fe.error("Erreur lors de l'import")}catch(c){console.error("Import error:",c),fe.error(`Erreur: ${c.message}`),i({error:c.message})}finally{n(!1)}};return s.jsx(Ur,{children:s.jsx("div",{className:"min-h-screen bg-background py-12",children:s.jsx("div",{className:"container mx-auto px-4 max-w-2xl",children:s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsx(rt,{className:"text-2xl text-primary",children:"Import de Produits XML"}),s.jsx(fa,{children:"Importez les produits depuis un fichier XML WordPress WooCommerce"})]}),s.jsxs(Ie,{className:"space-y-6",children:[s.jsxs("div",{className:"border-2 border-dashed border-border rounded-lg p-8 text-center",children:[s.jsx("input",{type:"file",accept:".xml",onChange:o,className:"hidden",id:"xml-upload"}),s.jsx("label",{htmlFor:"xml-upload",className:"cursor-pointer",children:s.jsx("div",{className:"flex flex-col items-center gap-4",children:e?s.jsxs(s.Fragment,{children:[s.jsx(z8,{className:"h-16 w-16 text-primary"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-lg",children:e.name}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[(e.size/1024/1024).toFixed(2)," MB"]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(nc,{className:"h-16 w-16 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-lg",children:"Sélectionner un fichier XML"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Cliquez pour choisir un fichier"})]})]})})})]}),s.jsx(se,{onClick:l,disabled:!e||r,className:"w-full bg-primary hover:bg-primary-dark",size:"lg",children:r?"Import en cours...":"Importer les produits"}),a&&s.jsx(ve,{className:a.error?"border-destructive":"border-primary",children:s.jsx(Ie,{className:"pt-6",children:a.error?s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Su,{className:"h-6 w-6 text-destructive flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Erreur d'import"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a.error})]})]}):s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(aa,{className:"h-6 w-6 text-primary flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold text-lg mb-3",children:"Import terminé"}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Total produits :"}),s.jsx("span",{className:"font-semibold",children:a.total})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Importés :"}),s.jsx("span",{className:"font-semibold text-primary",children:a.imported})]}),a.skipped>0&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Ignorés :"}),s.jsx("span",{className:"font-semibold",children:a.skipped})]}),a.errors&&a.errors.length>0&&s.jsxs("div",{className:"mt-4",children:[s.jsx("p",{className:"font-semibold mb-2",children:"Erreurs :"}),s.jsx("div",{className:"text-xs text-muted-foreground space-y-1 max-h-40 overflow-y-auto",children:a.errors.map((c,u)=>s.jsxs("p",{children:["• ",c]},u))})]})]})]})]})})}),s.jsxs("div",{className:"text-sm text-muted-foreground bg-muted p-4 rounded-lg",children:[s.jsx("p",{className:"font-semibold mb-2",children:"Instructions :"}),s.jsxs("ol",{className:"list-decimal list-inside space-y-1",children:[s.jsx("li",{children:"Exportez vos produits depuis WordPress (Outils → Exporter)"}),s.jsx("li",{children:"Sélectionnez le fichier XML exporté"}),s.jsx("li",{children:'Cliquez sur "Importer les produits"'}),s.jsx("li",{children:"Les produits seront automatiquement ajoutés à la base de données"})]})]})]})]})})})})},Ioe=()=>{const[e,t]=g.useState(null),[r,n]=g.useState(!1),[a,i]=g.useState(null),o=c=>{var d;const u=(d=c.target.files)==null?void 0:d[0];if(u){if(!u.name.endsWith(".json")){fe.error("Veuillez sélectionner un fichier JSON");return}t(u),i(null)}},l=async()=>{if(e){n(!0),i(null);try{const c=await e.text(),u=JSON.parse(c),{data:d,error:f}=await be.functions.invoke("import-orders-json",{body:{orders:Array.isArray(u)?u:[u]}});if(f)throw new Error(f.message);i(d.results),d.results.imported>0&&fe.success(`${d.results.imported} commande(s) importée(s) avec succès`),d.results.skipped>0&&fe.info(`${d.results.skipped} commande(s) ignorée(s) (déjà existantes)`),d.results.errors.length>0&&fe.error(`${d.results.errors.length} erreur(s) lors de l'import`)}catch(c){console.error("Import error:",c),fe.error(`Erreur lors de l'import: ${c.message}`)}finally{n(!1)}}};return s.jsx(Ur,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Import des commandes WordPress"}),s.jsx("p",{className:"text-muted-foreground",children:"Importez les commandes depuis un fichier JSON exporté de WordPress"})]}),s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsxs(rt,{className:"flex items-center gap-2",children:[s.jsx(O2,{className:"h-5 w-5"}),"Fichier JSON"]}),s.jsx(fa,{children:"Sélectionnez le fichier d'export des commandes WordPress"})]}),s.jsxs(Ie,{className:"space-y-4",children:[s.jsxs("div",{className:"border-2 border-dashed border-muted-foreground/25 rounded-lg p-8 text-center cursor-pointer hover:border-primary/50 transition-colors",onClick:()=>{var c;return(c=document.getElementById("file-input"))==null?void 0:c.click()},children:[s.jsx("input",{id:"file-input",type:"file",accept:".json",onChange:o,className:"hidden"}),e?s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx(O2,{className:"h-8 w-8 text-primary"}),s.jsx("span",{className:"font-medium",children:e.name})]}):s.jsxs("div",{className:"space-y-2",children:[s.jsx(nc,{className:"h-8 w-8 mx-auto text-muted-foreground"}),s.jsx("p",{className:"text-muted-foreground",children:"Cliquez pour sélectionner un fichier JSON"})]})]}),s.jsx(se,{onClick:l,disabled:!e||r,className:"w-full",children:r?"Import en cours...":"Importer les commandes"})]})]}),a&&s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsx(rt,{children:"Résultats de l'import"})}),s.jsxs(Ie,{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2 p-4 bg-green-500/10 rounded-lg",children:[s.jsx(aa,{className:"h-5 w-5 text-green-500"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Importées"}),s.jsx("p",{className:"text-2xl font-bold",children:a.imported})]})]}),s.jsxs("div",{className:"flex items-center gap-2 p-4 bg-yellow-500/10 rounded-lg",children:[s.jsx(I8,{className:"h-5 w-5 text-yellow-500"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Ignorées"}),s.jsx("p",{className:"text-2xl font-bold",children:a.skipped})]})]}),s.jsxs("div",{className:"flex items-center gap-2 p-4 bg-red-500/10 rounded-lg",children:[s.jsx(Su,{className:"h-5 w-5 text-red-500"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Erreurs"}),s.jsx("p",{className:"text-2xl font-bold",children:a.errors.length})]})]})]}),a.errors.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"font-medium text-red-500",children:"Détails des erreurs:"}),s.jsx("div",{className:"bg-red-500/10 p-4 rounded-lg max-h-48 overflow-y-auto",children:a.errors.map((c,u)=>s.jsx("p",{className:"text-sm text-red-500",children:c},u))})]})]})]}),s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsx(rt,{children:"Instructions"})}),s.jsx(Ie,{children:s.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-muted-foreground",children:[s.jsx("li",{children:"Exportez les commandes depuis WordPress au format JSON"}),s.jsx("li",{children:"Sélectionnez le fichier JSON exporté"}),s.jsx("li",{children:'Cliquez sur "Importer les commandes"'}),s.jsx("li",{children:'Les commandes seront importées avec le préfixe "WP-"'}),s.jsx("li",{children:"Les doublons seront automatiquement ignorés"}),s.jsx("li",{children:'Les clients verront leurs commandes dans "Mon Compte"'})]})})]})]})})},oS=[{name:"Granules Algos",slug:"granules-algos",points:565,image:"/products/granules-algos.png",category:"granules"},{name:"Granules Morphée",slug:"granules-morphee",points:565,image:"/products/granules-morphee.png",category:"granules"},{name:"Granules Olympe",slug:"granules-olympe",points:565,image:"/products/granules-olympe.png",category:"granules"},{name:"Capsules Articulations",slug:"capsules-articulations-curcuma",points:1710,image:"/products/capsules-articulations-curcuma.png",category:"capsules"},{name:"Capsules Sommeil",slug:"capsules-sommeil-valeriane",points:1710,image:"/products/capsules-sommeil-valeriane.png",category:"capsules"},{name:"Capsules Stress",slug:"capsules-stress-melisse",points:1710,image:"/products/capsules-stress-melisse.png",category:"capsules"},{name:"Huile CBD 5% Citron 10ml",slug:"huile-cbd-500mg-citron-10ml",points:1420,image:"/products/huile-cbd-500mg-citron-30ml.jpg",category:"huiles"},{name:"Huile CBD 5% Fruits Rouges 10ml",slug:"huile-cbd-500mg-fruits-rouges-10ml",points:1420,image:"/products/huile-cbd-500mg-fruits-rouges-30ml.jpg",category:"huiles"},{name:"Huile CBD 5% Menthe 10ml",slug:"huile-cbd-500mg-menthe-poivree-10ml",points:1420,image:"/products/huile-cbd-500mg-menthe-poivree-10ml.jpg",category:"huiles"},{name:"Huile CBD 5% Citron 30ml",slug:"huile-cbd-500mg-citron-30ml",points:2280,image:"/products/huile-cbd-500mg-citron-30ml.jpg",category:"huiles"},{name:"Huile CBD 5% Fruits Rouges 30ml",slug:"huile-cbd-500mg-fruits-rouges-30ml",points:2280,image:"/products/huile-cbd-500mg-fruits-rouges-30ml.jpg",category:"huiles"},{name:"Huile CBD 5% Menthe 30ml",slug:"huile-cbd-500mg-menthe-poivree-30ml",points:2280,image:"/products/huile-cbd-500mg-menthe-poivree-10ml.jpg",category:"huiles"},{name:"Huile CBD 10% Fraise 10ml",slug:"huile-cbd-1000mg-fraise-10ml",points:1995,image:"/products/huile-cbd-1000mg-fraise-10ml.png",category:"huiles"},{name:"Huile CBD 20% Mangue 10ml",slug:"huile-cbd-2000mg-mangue-10ml",points:2850,image:"/products/huile-cbd-2000mg-mangue-10ml.png",category:"huiles"},{name:"Shampoing Sec Cheveux Foncés",slug:"shampoing-sec-cbd-cheveux-fonces",points:680,image:"/products/shampoing-sec-cheveux-fonces.jpg",category:"shampoings"},{name:"Shampoing Sec Cheveux Clairs",slug:"shampoing-sec-cbd-cheveux-clairs",points:680,image:"/products/shampoing-sec-cheveux-clairs.jpg",category:"shampoings"}],Foe=e=>{if(!e||e.length===0)return 0;const t=e.find(r=>r.quantity===1);return t?t.price:e[0].price};function Loe(){g.useEffect(()=>{document.title="Boutique Fidélité | Produits CBD Gratuits";const A=document.querySelector('meta[name="description"]');A&&A.setAttribute("content","Boutique fidélité NŌTO : échangez vos points contre huiles, gummies et granules CBD gratuits. Utilisez vos récompenses maintenant.")},[]);const e=wa(),{addItem:t,getLoyaltyItems:r,hasEuroItems:n,getEuroTotal:a,clearLoyaltyItems:i}=sd(),[o,l]=g.useState(null),[c,u]=g.useState(null),[d,f]=g.useState(!0),[h,m]=g.useState([]),[v,p]=g.useState({}),[x,w]=g.useState(!1),[y,b]=g.useState([]);g.useEffect(()=>{const A=r(),W={};A.forEach(P=>{W[P.productSlug]=P.quantity}),p(W)},[]),g.useEffect(()=>{(async()=>{var Q;const{data:{session:W}}=await be.auth.getSession();if((Q=W==null?void 0:W.user)!=null&&Q.email){u(W.user.email);const{data:O}=await be.from("loyalty_points").select("points").eq("email",W.user.email).maybeSingle();l(O?O.points:0)}const P=oS.map(O=>O.slug),{data:V}=await be.from("products").select("slug, product_variants(price, quantity)").in("slug",P),Z=oS.map(O=>{const ne=V==null?void 0:V.find(Y=>Y.slug===O.slug),he=(ne==null?void 0:ne.product_variants)||[],I=Foe(he);return{...O,value:I>0?I:9.9}});m(Z),f(!1)})()},[]);const N=A=>v[A]||0,C=(A,W)=>{if(!h.find(Q=>Q.slug===A))return;const V=v[A]||0,Z=Math.max(0,V+W);p(Q=>{if(Z===0){const{[A]:O,...ne}=Q;return ne}return{...Q,[A]:Z}})},_=()=>Object.entries(v).reduce((A,[W,P])=>{const V=h.find(Z=>Z.slug===W);return A+((V==null?void 0:V.points)||0)*P},0),j=()=>Object.entries(v).reduce((A,[W,P])=>{const V=h.find(Z=>Z.slug===W);return A+((V==null?void 0:V.value)||0)*P},0),S=()=>{if(!c){fe.error("Vous devez être connecté pour utiliser vos points"),e("/auth");return}const A=_();if(A===0){fe.error("Veuillez ajouter au moins un produit");return}if(o===null||o<A){fe.error("Vous n'avez pas assez de points");return}i();const W=[];Object.entries(v).forEach(([P,V])=>{if(V>0){const Z=h.find(Q=>Q.slug===P);Z&&(t({productId:`loyalty-${P}`,productName:Z.name,productSlug:P,imageUrl:Z.image,variantId:`loyalty-${P}`,variantName:"Produit fidélité",quantity:V,price:Z.value,packQuantity:1,paymentType:"points",pointsCost:Z.points}),W.push({name:Z.name,qty:V}))}}),b(W),w(!0),window.scrollTo({top:0,behavior:"smooth"})},k=(A,W=1)=>{if(o===null)return!1;const P=_();return o>=P+A.points*W};if(d)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Wr,{className:"h-8 w-8 animate-spin text-primary"})}),s.jsx(it,{})]});const D=_(),M=o!==null?o-D:null,T=a();return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsxs("main",{className:"container mx-auto px-4 py-12",children:[x&&s.jsxs("div",{className:"bg-green-50 border-2 border-green-300 rounded-2xl p-6 mb-8 animate-fade-in max-w-2xl mx-auto",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(aa,{className:"h-8 w-8 text-green-600"}),s.jsx("h2",{className:"text-xl font-bold text-green-800",children:"Produits ajoutés au panier !"})]}),s.jsx("ul",{className:"mb-4 space-y-1",children:y.map((A,W)=>s.jsxs("li",{className:"text-green-700",children:["• ",A.qty,"x ",A.name]},W))}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsxs(se,{onClick:()=>e("/panier"),className:"flex-1",children:[s.jsx(ga,{className:"h-4 w-4 mr-2"}),"Voir le panier"]}),s.jsx(se,{variant:"outline",onClick:()=>{w(!1),p({})},className:"flex-1",children:"Continuer mes achats"})]})]}),s.jsxs("div",{className:"text-center mb-12",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[s.jsx(Ut,{className:"h-10 w-10 text-primary"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold",children:"Boutique Fidélité"})]}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Utilisez vos points de fidélité pour obtenir nos produits gratuitement"})]}),s.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-xl p-4 mb-8 text-center max-w-2xl mx-auto",children:[s.jsxs("p",{className:"text-green-800",children:["🚚 ",s.jsx("strong",{children:"Livraison offerte en point relais"})," dès 70€ d'achats payants"]}),n()&&T>=70&&s.jsxs("p",{className:"text-green-600 text-sm mt-1",children:["✓ Vous avez déjà ",T.toFixed(2),"€ d'achats dans votre panier"]})]}),s.jsxs("div",{className:"bg-primary/10 rounded-2xl p-6 md:p-8 mb-12 text-center max-w-xl mx-auto",children:[s.jsx("p",{className:"text-lg text-muted-foreground mb-2",children:"Votre balance de points de fidélité"}),s.jsx("p",{className:"text-4xl md:text-5xl font-bold text-primary",children:o!==null?o.toLocaleString():"—"}),s.jsx("p",{className:"text-lg font-medium mt-2",children:"points"}),!c&&s.jsx(se,{onClick:()=>e("/auth"),className:"mt-4",children:"Se connecter pour voir vos points"})]}),D>0&&s.jsx("div",{className:"sticky top-20 z-40 bg-background/95 backdrop-blur border rounded-xl p-4 mb-8 shadow-lg",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Points utilisés"}),s.jsxs("p",{className:"text-xl font-bold text-primary",children:[D.toLocaleString()," points"]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Valeur"}),s.jsxs("p",{className:"text-xl font-bold",children:[j().toFixed(2),"€"]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Points restants"}),s.jsx("p",{className:`text-xl font-bold ${M!==null&&M<0?"text-destructive":"text-green-600"}`,children:M!==null?M.toLocaleString():"—"})]})]}),s.jsxs(se,{onClick:S,disabled:M!==null&&M<0,size:"lg",children:[s.jsx(ga,{className:"h-5 w-5 mr-2"}),"Ajouter au panier"]})]})}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:h.map(A=>{const W=N(A.slug),P=k(A);return s.jsxs(ve,{className:"overflow-hidden group",children:[s.jsxs("div",{className:"aspect-square bg-muted/30 relative overflow-hidden",children:[s.jsx("img",{src:A.image,alt:A.name,className:"w-full h-full object-contain p-4 transition-transform duration-300 group-hover:scale-105"}),W>0&&s.jsx("div",{className:"absolute top-2 right-2 bg-primary text-primary-foreground rounded-full w-8 h-8 flex items-center justify-center font-bold",children:W}),s.jsx(Je,{className:"absolute top-2 left-2 bg-violet-600 hover:bg-violet-700",children:"Fidélité"})]}),s.jsxs(Ie,{className:"p-4",children:[s.jsx("h3",{className:"font-semibold text-lg mb-2 line-clamp-2",children:A.name}),s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx("span",{className:"text-2xl font-bold text-primary",children:A.points.toLocaleString()}),s.jsx("span",{className:"text-muted-foreground",children:"points"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Valeur : ",A.value.toFixed(2),"€"]}),s.jsx("div",{className:"flex items-center justify-between gap-2",children:W>0?s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s.jsx(se,{variant:"outline",size:"icon",onClick:()=>C(A.slug,-1),children:s.jsx(Np,{className:"h-4 w-4"})}),s.jsx("span",{className:"flex-1 text-center font-semibold text-lg",children:W}),s.jsx(se,{variant:"outline",size:"icon",onClick:()=>C(A.slug,1),disabled:!P,children:s.jsx($l,{className:"h-4 w-4"})})]}):s.jsxs(se,{onClick:()=>C(A.slug,1),disabled:!P,className:"w-full",variant:P?"default":"secondary",children:[s.jsx($l,{className:"h-4 w-4 mr-2"}),P?"Ajouter":"Points insuffisants"]})})]})]},A.slug)})})]}),s.jsx(it,{})]})}function Moe(){const e=Ch(),{data:t,isLoading:r}=Vr({queryKey:["admin-redemptions"],queryFn:async()=>{const{data:l,error:c}=await be.from("loyalty_redemptions").select("*").order("created_at",{ascending:!1});if(c)throw c;return l}}),n=_b({mutationFn:async({id:l,status:c})=>{const u={status:c};(c==="shipped"||c==="completed")&&(u.processed_at=new Date().toISOString());const{error:d}=await be.from("loyalty_redemptions").update(u).eq("id",l);if(d)throw d},onSuccess:()=>{e.invalidateQueries({queryKey:["admin-redemptions"]}),fe.success("Statut mis à jour")},onError:()=>{fe.error("Erreur lors de la mise à jour")}}),a=l=>{switch(l){case"pending":return s.jsx(Je,{variant:"secondary",children:"En attente"});case"processing":return s.jsx(Je,{className:"bg-blue-100 text-blue-700",children:"En préparation"});case"shipped":return s.jsx(Je,{className:"bg-purple-100 text-purple-700",children:"Expédié"});case"completed":return s.jsx(Je,{className:"bg-green-100 text-green-700",children:"Terminé"});case"cancelled":return s.jsx(Je,{variant:"destructive",children:"Annulé"});default:return s.jsx(Je,{variant:"outline",children:l})}};if(r)return s.jsx(Ur,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Wr,{className:"h-8 w-8 animate-spin text-primary"})})});const i=(t==null?void 0:t.filter(l=>l.status==="pending").length)||0,o=(t==null?void 0:t.reduce((l,c)=>l+c.points_used,0))||0;return s.jsx(Ur,{children:s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Commandes Fidélité"}),s.jsx("p",{className:"text-muted-foreground",children:"Gérez les commandes passées avec les points de fidélité"})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium",children:"Total commandes"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold",children:(t==null?void 0:t.length)||0})})]}),s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium",children:"En attente"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold text-orange-600",children:i})})]}),s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium",children:"Points utilisés"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold",children:o.toLocaleString()})})]})]}),s.jsx(ve,{children:s.jsx(Ie,{className:"p-0",children:(t==null?void 0:t.length)===0?s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Aucune commande fidélité"}):s.jsx("div",{className:"divide-y divide-border",children:t==null?void 0:t.map(l=>{const c=l.shipping_address;return s.jsx("div",{className:"p-4 hover:bg-muted/50",children:s.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center gap-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(hs,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"font-semibold",children:l.product_name}),a(l.status||"pending")]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:l.email}),s.jsx("p",{className:"text-sm text-muted-foreground",children:zs(new Date(l.created_at),"dd MMM yyyy à HH:mm",{locale:ha})})]}),s.jsxs("div",{className:"text-center lg:text-right",children:[s.jsxs("p",{className:"font-bold text-primary",children:[l.points_used.toLocaleString()," pts"]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[Number(l.euro_value).toFixed(2),"€"]})]}),c&&s.jsxs("div",{className:"text-sm text-muted-foreground lg:w-56",children:[s.jsxs("p",{className:"font-medium text-foreground",children:[c.first_name," ",c.last_name]}),s.jsx("p",{children:c.address}),s.jsxs("p",{children:[c.postal_code," ",c.city]}),c.country&&s.jsx("p",{children:c.country}),c.phone&&s.jsx("p",{children:c.phone}),c.delivery_option&&s.jsx("p",{className:"mt-1 text-xs font-medium text-primary",children:c.delivery_option.name})]}),s.jsx("div",{className:"w-40",children:s.jsxs(mi,{value:l.status||"pending",onValueChange:u=>n.mutate({id:l.id,status:u}),children:[s.jsx($a,{children:s.jsx(pi,{})}),s.jsxs(qa,{children:[s.jsx(yt,{value:"pending",children:"En attente"}),s.jsx(yt,{value:"processing",children:"En préparation"}),s.jsx(yt,{value:"shipped",children:"Expédié"}),s.jsx(yt,{value:"completed",children:"Terminé"}),s.jsx(yt,{value:"cancelled",children:"Annulé"})]})]})})]})},l.id)})})})})]})})}const Boe="/assets/fidelite-hero-BdxBxmKI.jpg",Uoe="/assets/fidelite-product-BOtvQzqL.jpg",$oe=[{number:"1",title:"Je crée mon compte",description:"avec mon adresse e-mail",icon:j4},{number:"2",title:"Je complète mon profil",description:"avec mes informations personnelles",icon:M8},{number:"3",title:"Je cumule des points",description:"avec mes achats en ligne",icon:eb},{number:"4",title:"Je dépense mes points",description:"dans la boutique en ligne exclusive à NŌTO",icon:zl}],qoe=[{icon:sb,title:"1€ dépensé",points:"+10 points"},{icon:j4,title:"Inscription NŌTO",points:"+40 points"},{icon:O8,title:"Anniversaire",points:"+10 points"},{icon:Yu,title:"Renseigner ma pharmacie préférée",points:"+20 points"}];function zoe(){return g.useEffect(()=>{document.title="Programme Fidélité CBD | Cumulez des Points";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Programme fidélité NŌTO : 1€ = 10 points, bonus inscription. Échangez vos points contre des produits CBD gratuits. 100% digital.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Programme Fidélité CBD | Cumulez des Points",description:"Programme fidélité NŌTO : 1€ = 10 points, bonus inscription. Échangez vos points contre des produits CBD gratuits. 100% digital.",url:"/fidelite",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Programme Fidélité",url:"/fidelite"}]}),s.jsxs("section",{className:"relative h-[60vh] min-h-[400px] flex items-center justify-center overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0",children:[s.jsx("img",{src:Boe,alt:"Programme de fidélité",className:"w-full h-full object-cover"}),s.jsx("div",{className:"absolute inset-0 bg-black/50"})]}),s.jsxs("div",{className:"relative z-10 text-center text-white px-4 max-w-3xl mx-auto",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest mb-4 opacity-80",children:"DÉCOMPLEXER le chanvre"}),s.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold mb-6",children:"Programme de Fidélité"}),s.jsx("p",{className:"text-lg md:text-xl opacity-90 mb-8",children:"Votre programme 100% digital qui récompense votre fidélité pour tous vos achats de produits NŌTO."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx(se,{size:"lg",asChild:!0,className:"bg-white text-primary hover:bg-white/90",children:s.jsx(pe,{to:"/auth",children:"M'enregistrer"})}),s.jsx(se,{size:"lg",variant:"outline",asChild:!0,className:"border-white text-white hover:bg-white/10",children:s.jsx(pe,{to:"/auth",children:"Me connecter"})})]})]})]}),s.jsx("section",{className:"py-16 md:py-24 bg-muted/30",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Votre programme"}),s.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Inscrivez-vous en quelques clics pour profiter de tous les avantages."})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 max-w-5xl mx-auto",children:$oe.map(e=>s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"relative mb-6",children:[s.jsx("div",{className:"w-20 h-20 mx-auto bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(e.icon,{className:"h-8 w-8 text-primary"})}),s.jsx("span",{className:"absolute -top-2 -right-2 w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold text-sm",children:e.number})]}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:e.title}),s.jsx("p",{className:"text-muted-foreground text-sm",children:e.description})]},e.number))}),s.jsx("div",{className:"text-center mt-12",children:s.jsx(se,{size:"lg",asChild:!0,children:s.jsxs(pe,{to:"/boutique-fidelite",children:[s.jsx(Ut,{className:"h-5 w-5 mr-2"}),"Voir la boutique cadeau"]})})})]})}),s.jsx("section",{className:"py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Cumulez des points"}),s.jsx("p",{className:"text-muted-foreground text-lg mb-8",children:"Vos points se cumulent et sont valables 12 mois à partir de leur obtention."}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:qoe.map((e,t)=>s.jsx("div",{className:"bg-card border border-border rounded-xl p-6 hover:shadow-lg transition-shadow",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center shrink-0",children:s.jsx(e.icon,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-foreground",children:e.title}),s.jsx("p",{className:"text-xl font-bold text-primary",children:e.points})]})]})},t))})]}),s.jsxs("div",{className:"relative",children:[s.jsx("img",{src:Uoe,alt:"Produits NŌTO",className:"w-full rounded-2xl shadow-2xl"}),s.jsxs("div",{className:"absolute -bottom-6 -left-6 bg-primary text-primary-foreground p-6 rounded-xl shadow-lg",children:[s.jsx("p",{className:"text-sm opacity-80",children:"Exemple"}),s.jsx("p",{className:"text-2xl font-bold",children:"100€ = 1000 pts"})]})]})]})})}),s.jsx("section",{className:"py-16 md:py-24 bg-primary text-primary-foreground",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx(Ut,{className:"h-16 w-16 mx-auto mb-6 opacity-80"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Prêt à rejoindre le programme ?"}),s.jsx("p",{className:"text-lg opacity-90 max-w-2xl mx-auto mb-8",children:"Créez votre compte gratuitement et commencez à cumuler des points dès votre inscription."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsx(se,{size:"lg",asChild:!0,className:"bg-white text-primary hover:bg-white/90",children:s.jsx(pe,{to:"/auth",children:"Créer mon compte"})}),s.jsx(se,{size:"lg",variant:"outline",asChild:!0,className:"border-white text-white hover:bg-white/10",children:s.jsx(pe,{to:"/boutique-fidelite",children:"Découvrir la boutique"})})]})]})}),s.jsx(it,{})]})}function Voe(){const[e,t]=g.useState(""),[r,n]=g.useState(null),[a,i]=g.useState(!1),[o,l]=g.useState(!1),[c,u]=g.useState({first_name:"",last_name:"",email:"",secondary_email:""}),d=Ch(),{data:f,isLoading:h}=Vr({queryKey:["admin-customers-orders"],queryFn:async()=>{const{data:T,error:A}=await be.from("orders").select("id, reference, email, first_name, last_name, total, status, created_at, items, points_used, phone, city").order("created_at",{ascending:!1});if(A)throw A;return T}}),{data:m,isLoading:v}=Vr({queryKey:["admin-customers-profiles"],queryFn:async()=>{const{data:T,error:A}=await be.from("profiles").select("*");if(A)throw A;return T}}),{data:p,isLoading:x}=Vr({queryKey:["admin-customers-loyalty"],queryFn:async()=>{const{data:T,error:A}=await be.from("loyalty_points").select("email, points, firstname, lastname");if(A)throw A;return T}}),w=_b({mutationFn:async T=>{const{error:A}=await be.from("profiles").update(T.updates).eq("id",T.profile_id);if(A)throw A},onSuccess:()=>{fe.success("Profil mis à jour avec succès"),d.invalidateQueries({queryKey:["admin-customers-profiles"]}),l(!1)},onError:T=>{fe.error("Erreur lors de la mise à jour: "+T.message)}}),y=g.useMemo(()=>{if(!f)return[];const T=new Map;return f.forEach(A=>{const W=A.email.toLowerCase(),P=T.get(W),V={id:A.id,reference:A.reference,total:A.total,status:A.status,created_at:A.created_at,items:A.items,points_used:A.points_used};P?(P.orders.push(V),A.status==="paid"&&(P.total_spent+=A.total,P.order_count+=1),(!P.last_order_date||A.created_at&&A.created_at>P.last_order_date)&&(P.last_order_date=A.created_at),!P.first_name&&A.first_name&&(P.first_name=A.first_name),!P.last_name&&A.last_name&&(P.last_name=A.last_name),!P.phone&&A.phone&&(P.phone=A.phone),!P.city&&A.city&&(P.city=A.city)):T.set(W,{email:W,first_name:A.first_name,last_name:A.last_name,secondary_email:null,profile_id:null,user_id:null,orders:[V],total_spent:A.status==="paid"?A.total:0,order_count:A.status==="paid"?1:0,loyalty_points:0,last_order_date:A.created_at,phone:A.phone,city:A.city})}),m==null||m.forEach(A=>{const W=A.email.toLowerCase(),P=T.get(W);P?(P.profile_id=A.id,P.user_id=A.user_id,P.secondary_email=A.secondary_email,!P.first_name&&A.first_name&&(P.first_name=A.first_name),!P.last_name&&A.last_name&&(P.last_name=A.last_name)):T.set(W,{email:W,first_name:A.first_name,last_name:A.last_name,secondary_email:A.secondary_email,profile_id:A.id,user_id:A.user_id,orders:[],total_spent:0,order_count:0,loyalty_points:0,last_order_date:null,phone:null,city:null})}),p==null||p.forEach(A=>{const W=A.email.toLowerCase(),P=T.get(W);P?(P.loyalty_points=A.points,!P.first_name&&A.firstname&&(P.first_name=A.firstname),!P.last_name&&A.lastname&&(P.last_name=A.lastname)):T.set(W,{email:W,first_name:A.firstname,last_name:A.lastname,secondary_email:null,profile_id:null,user_id:null,orders:[],total_spent:0,order_count:0,loyalty_points:A.points,last_order_date:null,phone:null,city:null})}),Array.from(T.values()).sort((A,W)=>W.total_spent-A.total_spent)},[f,m,p]),b=g.useMemo(()=>{if(!e)return y;const T=e.toLowerCase();return y.filter(A=>{var W,P,V,Z;return A.email.toLowerCase().includes(T)||((W=A.first_name)==null?void 0:W.toLowerCase().includes(T))||((P=A.last_name)==null?void 0:P.toLowerCase().includes(T))||((V=A.secondary_email)==null?void 0:V.toLowerCase().includes(T))||((Z=A.phone)==null?void 0:Z.toLowerCase().includes(T))})},[y,e]),N=h||v||x,C=T=>T?zs(new Date(T),"dd MMM yyyy",{locale:ha}):"-",_=T=>{n(T),i(!0)},j=T=>{n(T),u({first_name:T.first_name||"",last_name:T.last_name||"",email:T.email,secondary_email:T.secondary_email||""}),l(!0)},S=()=>{if(!(r!=null&&r.profile_id)){fe.error("Ce client n'a pas de profil utilisateur. Il doit d'abord créer un compte.");return}w.mutate({profile_id:r.profile_id,updates:{first_name:c.first_name||null,last_name:c.last_name||null,secondary_email:c.secondary_email||null}})},k=y.length,D=y.filter(T=>T.order_count>0).length,M=y.reduce((T,A)=>T+A.loyalty_points,0);return N?s.jsx(Ur,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Wr,{className:"h-8 w-8 animate-spin text-primary"})})}):s.jsxs(Ur,{children:[s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Gestion des clients"}),s.jsx("p",{className:"text-muted-foreground",children:"Vue d'ensemble de tous vos clients"})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Total clients"}),s.jsx(hi,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold",children:k}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Emails uniques"})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Clients acheteurs"}),s.jsx(ga,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold",children:D}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Avec au moins une commande payée"})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(rt,{className:"text-sm font-medium",children:"Points fidélité totaux"}),s.jsx(Ut,{className:"h-4 w-4 text-purple-500"})]}),s.jsxs(Ie,{children:[s.jsx("div",{className:"text-2xl font-bold text-purple-600",children:M.toLocaleString()}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Tous clients confondus"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"relative flex-1 max-w-md",children:[s.jsx(ql,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(lt,{placeholder:"Rechercher par email, nom, téléphone...",value:e,onChange:T=>t(T.target.value),className:"pl-10"})]}),s.jsxs(Je,{variant:"outline",children:[b.length," client(s)"]})]}),s.jsx(ve,{children:s.jsx(Ie,{className:"p-0",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(Pi,{children:[s.jsx(Ii,{children:s.jsxs(nr,{children:[s.jsx(nt,{className:"min-w-[200px]",children:"Client"}),s.jsx(nt,{className:"min-w-[180px]",children:"Email"}),s.jsx(nt,{className:"min-w-[100px]",children:"Commandes"}),s.jsx(nt,{className:"min-w-[100px]",children:"Total dépensé"}),s.jsx(nt,{className:"min-w-[100px]",children:"Points fidélité"}),s.jsx(nt,{className:"min-w-[120px]",children:"Dernière commande"}),s.jsx(nt,{className:"min-w-[80px]",children:"Statut"}),s.jsx(nt,{className:"text-right min-w-[120px]",children:"Actions"})]})}),s.jsxs(Fi,{children:[b.map(T=>s.jsxs(nr,{className:"cursor-pointer hover:bg-muted/50",children:[s.jsx(Be,{children:s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:T.first_name||T.last_name?`${T.first_name||""} ${T.last_name||""}`.trim():"-"}),T.phone&&s.jsxs("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(Ff,{className:"h-3 w-3"}),T.phone]})]})}),s.jsxs(Be,{children:[s.jsx("div",{className:"text-sm",children:T.email}),T.secondary_email&&s.jsx("div",{className:"text-xs text-muted-foreground",children:T.secondary_email})]}),s.jsx(Be,{children:s.jsx("span",{className:"font-medium",children:T.order_count})}),s.jsx(Be,{children:s.jsxs("span",{className:"font-medium",children:[T.total_spent.toFixed(2)," €"]})}),s.jsx(Be,{children:T.loyalty_points>0?s.jsxs(Je,{className:"bg-purple-100 text-purple-700",children:[T.loyalty_points.toLocaleString()," pts"]}):s.jsx("span",{className:"text-muted-foreground",children:"-"})}),s.jsx(Be,{className:"text-sm",children:C(T.last_order_date)}),s.jsx(Be,{children:T.user_id?s.jsx(Je,{className:"bg-green-100 text-green-700",children:"Compte"}):s.jsx(Je,{variant:"outline",children:"Invité"})}),s.jsx(Be,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-1",children:[s.jsx(se,{variant:"ghost",size:"sm",onClick:()=>_(T),children:s.jsx(Us,{className:"h-4 w-4"})}),s.jsx(se,{variant:"ghost",size:"sm",onClick:()=>j(T),disabled:!T.profile_id,title:T.profile_id?"Modifier":"Ce client n'a pas de compte",children:s.jsx(I2,{className:"h-4 w-4"})})]})})]},T.email)),b.length===0&&s.jsx(nr,{children:s.jsx(Be,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"Aucun client trouvé"})})]})]})})})})]}),s.jsx(Uo,{open:a,onOpenChange:i,children:s.jsxs(Ci,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[s.jsx(Si,{children:s.jsx(Ei,{children:"Détails du client"})}),r&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(wt,{className:"text-muted-foreground text-xs",children:"Nom complet"}),s.jsx("p",{className:"font-medium",children:r.first_name||r.last_name?`${r.first_name||""} ${r.last_name||""}`.trim():"-"})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-muted-foreground text-xs",children:"Statut"}),s.jsx("p",{children:r.user_id?s.jsx(Je,{className:"bg-green-100 text-green-700",children:"Compte créé"}):s.jsx(Je,{variant:"outline",children:"Invité"})})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-muted-foreground text-xs",children:"Email principal"}),s.jsxs("p",{className:"font-medium flex items-center gap-2",children:[s.jsx(xa,{className:"h-4 w-4 text-muted-foreground"}),r.email]})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-muted-foreground text-xs",children:"Email secondaire"}),s.jsx("p",{className:"font-medium",children:r.secondary_email||"-"})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-muted-foreground text-xs",children:"Téléphone"}),s.jsx("p",{className:"font-medium flex items-center gap-2",children:r.phone?s.jsxs(s.Fragment,{children:[s.jsx(Ff,{className:"h-4 w-4 text-muted-foreground"}),r.phone]}):"-"})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-muted-foreground text-xs",children:"Ville"}),s.jsx("p",{className:"font-medium flex items-center gap-2",children:r.city?s.jsxs(s.Fragment,{children:[s.jsx(Yu,{className:"h-4 w-4 text-muted-foreground"}),r.city]}):"-"})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ga,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Commandes"})]}),s.jsx("p",{className:"text-2xl font-bold mt-1",children:r.order_count})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(sb,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Total dépensé"})]}),s.jsxs("p",{className:"text-2xl font-bold mt-1",children:[r.total_spent.toFixed(2)," €"]})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ut,{className:"h-4 w-4 text-purple-500"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Points fidélité"})]}),s.jsx("p",{className:"text-2xl font-bold mt-1 text-purple-600",children:r.loyalty_points.toLocaleString()})]})})]}),s.jsxs("div",{children:[s.jsx(wt,{className:"text-muted-foreground text-xs",children:"Historique des commandes"}),s.jsx("div",{className:"mt-2 space-y-2 max-h-[200px] overflow-y-auto",children:r.orders.length===0?s.jsx("p",{className:"text-muted-foreground text-sm py-4 text-center",children:"Aucune commande"}):r.orders.map(T=>s.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-muted/50 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-mono text-sm font-medium",children:T.reference}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:C(T.created_at)})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"font-medium",children:[T.total.toFixed(2)," €"]}),T.points_used&&T.points_used>0&&s.jsxs(Je,{className:"bg-purple-100 text-purple-700 text-xs",children:["+",T.points_used," pts"]}),s.jsx(Je,{className:T.status==="paid"?"bg-green-100 text-green-700":T.status==="pending"?"bg-yellow-100 text-yellow-700":"bg-gray-100 text-gray-700",children:T.status==="paid"?"Payée":T.status==="pending"?"En attente":T.status||"?"})]})]},T.id))})]}),s.jsxs(Kf,{children:[s.jsx(se,{variant:"outline",onClick:()=>i(!1),children:"Fermer"}),s.jsxs(se,{onClick:()=>{i(!1),j(r)},disabled:!r.profile_id,children:[s.jsx(I2,{className:"h-4 w-4 mr-2"}),"Modifier"]})]})]})]})}),s.jsx(Uo,{open:o,onOpenChange:l,children:s.jsxs(Ci,{children:[s.jsx(Si,{children:s.jsx(Ei,{children:"Modifier le profil client"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"first_name",children:"Prénom"}),s.jsx(lt,{id:"first_name",value:c.first_name,onChange:T=>u({...c,first_name:T.target.value})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"last_name",children:"Nom"}),s.jsx(lt,{id:"last_name",value:c.last_name,onChange:T=>u({...c,last_name:T.target.value})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"email",children:"Email principal"}),s.jsx(lt,{id:"email",value:c.email,disabled:!0,className:"bg-muted"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"L'email principal ne peut pas être modifié car il est lié au compte utilisateur."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(wt,{htmlFor:"secondary_email",children:"Email secondaire"}),s.jsx(lt,{id:"secondary_email",type:"email",value:c.secondary_email,onChange:T=>u({...c,secondary_email:T.target.value}),placeholder:"email.secondaire@exemple.com"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Utilisé pour les notifications alternatives."})]})]}),s.jsxs(Kf,{children:[s.jsx(se,{variant:"outline",onClick:()=>l(!1),children:"Annuler"}),s.jsxs(se,{onClick:S,disabled:w.isPending,children:[w.isPending&&s.jsx(Wr,{className:"h-4 w-4 mr-2 animate-spin"}),"Enregistrer"]})]})]})})]})}const Hoe=()=>{const[e,t]=g.useState(""),[r,n]=g.useState("all"),[a,i]=g.useState("all"),[o,l]=g.useState(null),{data:c=[],isLoading:u,refetch:d}=Vr({queryKey:["api-logs",r,a],queryFn:async()=>{let p=be.from("api_logs").select("*").order("created_at",{ascending:!1}).limit(200);r!=="all"&&(r==="success"?p=p.gte("status_code",200).lt("status_code",300):r==="error"&&(p=p.gte("status_code",400))),a!=="all"&&(p=p.eq("method",a));const{data:x,error:w}=await p;if(w)throw w;return x||[]},refetchInterval:3e4}),f=c.filter(p=>{var w;if(!e)return!0;const x=e.toLowerCase();return p.path.toLowerCase().includes(x)||p.method.toLowerCase().includes(x)||((w=p.ip_address)==null?void 0:w.toLowerCase().includes(x))}),h=p=>p>=200&&p<300?s.jsx(Je,{className:"bg-green-500/10 text-green-600 border-green-500/20",children:p}):p>=400&&p<500?s.jsx(Je,{className:"bg-yellow-500/10 text-yellow-600 border-yellow-500/20",children:p}):p>=500?s.jsx(Je,{className:"bg-red-500/10 text-red-600 border-red-500/20",children:p}):s.jsx(Je,{variant:"outline",children:p}),m=p=>{const x={GET:"bg-blue-500/10 text-blue-600 border-blue-500/20",POST:"bg-green-500/10 text-green-600 border-green-500/20",PUT:"bg-orange-500/10 text-orange-600 border-orange-500/20",DELETE:"bg-red-500/10 text-red-600 border-red-500/20"};return s.jsx(Je,{className:x[p]||"bg-gray-500/10 text-gray-600",children:p})},v={total:c.length,success:c.filter(p=>p.status_code>=200&&p.status_code<300).length,errors:c.filter(p=>p.status_code>=400).length,avgDuration:c.length>0?Math.round(c.reduce((p,x)=>p+(x.duration_ms||0),0)/c.length):0};return s.jsx(Ur,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Logs API Shippingbo"}),s.jsx("p",{className:"text-muted-foreground",children:"Historique des requêtes entrantes de l'API WooCommerce"})]}),s.jsxs(se,{onClick:()=>d(),variant:"outline",size:"sm",children:[s.jsx(ln,{className:"h-4 w-4 mr-2"}),"Actualiser"]})]}),s.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsx("div",{className:"text-2xl font-bold",children:v.total}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Requêtes totales"})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:v.success}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Succès (2xx)"})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsx("div",{className:"text-2xl font-bold text-red-600",children:v.errors}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Erreurs (4xx/5xx)"})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsxs("div",{className:"text-2xl font-bold",children:[v.avgDuration,"ms"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Temps moyen"})]})})]}),s.jsx(ve,{children:s.jsx(Ie,{className:"pt-4",children:s.jsxs("div",{className:"flex gap-4",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(ql,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(lt,{placeholder:"Rechercher par path, méthode ou IP...",value:e,onChange:p=>t(p.target.value),className:"pl-10"})]}),s.jsxs(mi,{value:a,onValueChange:i,children:[s.jsx($a,{className:"w-32",children:s.jsx(pi,{placeholder:"Méthode"})}),s.jsxs(qa,{children:[s.jsx(yt,{value:"all",children:"Toutes"}),s.jsx(yt,{value:"GET",children:"GET"}),s.jsx(yt,{value:"POST",children:"POST"}),s.jsx(yt,{value:"PUT",children:"PUT"}),s.jsx(yt,{value:"DELETE",children:"DELETE"})]})]}),s.jsxs(mi,{value:r,onValueChange:n,children:[s.jsx($a,{className:"w-32",children:s.jsx(pi,{placeholder:"Statut"})}),s.jsxs(qa,{children:[s.jsx(yt,{value:"all",children:"Tous"}),s.jsx(yt,{value:"success",children:"Succès"}),s.jsx(yt,{value:"error",children:"Erreurs"})]})]})]})})}),s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2",children:[s.jsx(x4,{className:"h-5 w-5"}),"Requêtes récentes"]})}),s.jsx(Ie,{children:u?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Chargement des logs..."}):f.length===0?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Aucun log trouvé"}):s.jsx("div",{className:"space-y-2",children:f.map(p=>s.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-lg border hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>l(p),children:[s.jsx("div",{className:"flex items-center gap-2 w-24",children:m(p.method)}),s.jsx("div",{className:"flex-1 font-mono text-sm truncate",children:p.path}),s.jsx("div",{className:"flex items-center gap-2 w-20",children:h(p.status_code)}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground w-20",children:[s.jsx(Ri,{className:"h-3 w-3"}),p.duration_ms?`${p.duration_ms}ms`:"-"]}),s.jsx("div",{className:"text-sm text-muted-foreground w-40",children:zs(new Date(p.created_at),"dd/MM HH:mm:ss",{locale:ha})}),s.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8",children:s.jsx(Us,{className:"h-4 w-4"})})]},p.id))})})]}),s.jsx(Uo,{open:!!o,onOpenChange:()=>l(null),children:s.jsxs(Ci,{className:"max-w-3xl max-h-[80vh]",children:[s.jsx(Si,{children:s.jsxs(Ei,{className:"flex items-center gap-2",children:[o&&m(o.method),s.jsx("span",{className:"font-mono",children:o==null?void 0:o.path})]})}),o&&s.jsx(Ah,{className:"max-h-[60vh]",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Date"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:zs(new Date(o.created_at),"dd MMMM yyyy à HH:mm:ss",{locale:ha})})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Statut"}),h(o.status_code)]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Durée"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:o.duration_ms?`${o.duration_ms}ms`:"N/A"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"IP"}),s.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:o.ip_address||"N/A"})]})]}),o.user_agent&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"User Agent"}),s.jsx("p",{className:"text-sm text-muted-foreground font-mono break-all",children:o.user_agent})]}),o.request_body&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Request Body"}),s.jsx("pre",{className:"bg-muted p-3 rounded-lg text-xs overflow-x-auto",children:JSON.stringify(o.request_body,null,2)})]}),o.response_body&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Response Body"}),s.jsx("pre",{className:"bg-muted p-3 rounded-lg text-xs overflow-x-auto max-h-64 overflow-y-auto",children:JSON.stringify(o.response_body,null,2)})]})]})})]})})]})})},Woe=Gu("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),J6=g.forwardRef(({className:e,variant:t,...r},n)=>s.jsx("div",{ref:n,role:"alert",className:Pe(Woe({variant:t}),e),...r}));J6.displayName="Alert";const Z6=g.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:Pe("mb-1 font-medium leading-none tracking-tight",e),...t}));Z6.displayName="AlertTitle";const e5=g.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Pe("text-sm [&_p]:leading-relaxed",e),...t}));e5.displayName="AlertDescription";function Goe(){const[e,t]=g.useState([]),[r,n]=g.useState(!0),a=async()=>{n(!0);try{const{data:c,error:u}=await be.from("orders").select("id, reference, email, first_name, last_name, subtotal, total, status, created_at, items").in("status",["pending","failed"]).order("created_at",{ascending:!1});if(u)throw u;t(c||[])}catch(c){console.error("Error fetching abandoned orders:",c),fe.error("Erreur lors du chargement des commandes abandonnées")}finally{n(!1)}};g.useEffect(()=>{a()},[]);const i=c=>{switch(c){case"pending":return s.jsx(Je,{variant:"outline",className:"bg-yellow-50 text-yellow-700 border-yellow-200",children:"En attente"});case"failed":return s.jsx(Je,{variant:"destructive",children:"Échec paiement"});default:return s.jsx(Je,{variant:"secondary",children:c})}},o=c=>c&&Array.isArray(c)?c.reduce((u,d)=>u+(d.quantity||1),0):0,l={total:e.length,pending:e.filter(c=>c.status==="pending").length,failed:e.filter(c=>c.status==="failed").length,totalValue:e.reduce((c,u)=>c+(u.total||0),0)};return s.jsx(Ur,{children:s.jsxs("div",{className:"p-4 md:p-8 space-y-6",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl md:text-3xl font-bold flex items-center gap-2",children:[s.jsx(ga,{className:"h-6 w-6 md:h-8 md:w-8"}),"Commandes abandonnées"]}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Clients qui n'ont pas finalisé leur paiement"})]}),s.jsxs(se,{onClick:a,variant:"outline",className:"gap-2",children:[s.jsx(ln,{className:"h-4 w-4"}),"Actualiser"]})]}),s.jsxs(J6,{children:[s.jsx(Ax,{className:"h-4 w-4"}),s.jsx(Z6,{children:"À propos des commandes abandonnées"}),s.jsx(e5,{children:"Ces commandes ont été créées mais le paiement n'a jamais abouti. Cela peut être dû à un abandon du panier, un échec de paiement, ou une fermeture de page avant la finalisation. Ces données peuvent être utiles pour analyser les abandons de panier."})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium text-muted-foreground",children:"Total"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold",children:l.total})})]}),s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium text-muted-foreground",children:"En attente"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold text-yellow-600",children:l.pending})})]}),s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium text-muted-foreground",children:"Échec paiement"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-2xl font-bold text-destructive",children:l.failed})})]}),s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium text-muted-foreground",children:"Valeur perdue"})}),s.jsx(Ie,{children:s.jsxs("div",{className:"text-2xl font-bold",children:[l.totalValue.toFixed(2)," €"]})})]})]}),s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsx(rt,{children:"Liste des commandes abandonnées"}),s.jsxs(fa,{children:[e.length," commande",e.length>1?"s":""," non finalisée",e.length>1?"s":""]})]}),s.jsx(Ie,{children:r?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(ln,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):e.length===0?s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(ga,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),s.jsx("p",{children:"Aucune commande abandonnée"})]}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(Pi,{children:[s.jsx(Ii,{children:s.jsxs(nr,{children:[s.jsx(nt,{children:"Date"}),s.jsx(nt,{children:"Référence"}),s.jsx(nt,{children:"Client"}),s.jsx(nt,{children:"Email"}),s.jsx(nt,{className:"text-center",children:"Articles"}),s.jsx(nt,{className:"text-right",children:"Montant"}),s.jsx(nt,{children:"Statut"})]})}),s.jsx(Fi,{children:e.map(c=>{var u;return s.jsxs(nr,{children:[s.jsx(Be,{className:"whitespace-nowrap",children:c.created_at?zs(new Date(c.created_at),"dd/MM/yyyy HH:mm",{locale:ha}):"-"}),s.jsx(Be,{className:"font-mono text-sm",children:c.reference}),s.jsx(Be,{children:c.first_name||c.last_name?`${c.first_name||""} ${c.last_name||""}`.trim():s.jsx("span",{className:"text-muted-foreground",children:"-"})}),s.jsx(Be,{className:"max-w-[200px] truncate",children:c.email}),s.jsx(Be,{className:"text-center",children:o(c.items)}),s.jsxs(Be,{className:"text-right font-medium",children:[(u=c.total)==null?void 0:u.toFixed(2)," €"]}),s.jsx(Be,{children:i(c.status)})]},c.id)})})]})})})]})]})})}const Koe=()=>{const e=Ch(),[t,r]=g.useState(null),{data:n=[],isLoading:a,refetch:i}=Vr({queryKey:["webhooks"],queryFn:async()=>{const{data:m,error:v}=await be.from("webhooks").select("*").order("created_at",{ascending:!1});if(v)throw v;return m||[]}}),{data:o=[],isLoading:l,refetch:c}=Vr({queryKey:["webhook-deliveries"],queryFn:async()=>{const{data:m,error:v}=await be.from("webhook_deliveries").select("*").order("created_at",{ascending:!1}).limit(100);if(v)throw v;return m||[]},refetchInterval:3e4}),u=_b({mutationFn:async m=>{const{error:v}=await be.from("webhooks").delete().eq("id",m);if(v)throw v},onSuccess:()=>{fe.success("Webhook supprimé"),e.invalidateQueries({queryKey:["webhooks"]})},onError:m=>{fe.error(`Erreur: ${m.message}`)}}),d={totalWebhooks:n.length,activeWebhooks:n.filter(m=>m.status==="active").length,totalDeliveries:o.length,successDeliveries:o.filter(m=>m.success).length,failedDeliveries:o.filter(m=>!m.success).length},f=m=>m==="active"?s.jsx(Je,{className:"bg-green-500/10 text-green-600 border-green-500/20",children:"Actif"}):s.jsx(Je,{variant:"outline",children:m}),h=(m,v)=>m?s.jsx(Je,{className:"bg-green-500/10 text-green-600 border-green-500/20",children:v||"OK"}):s.jsx(Je,{className:"bg-red-500/10 text-red-600 border-red-500/20",children:v||"Erreur"});return s.jsx(Ur,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Webhooks Shippingbo"}),s.jsx("p",{className:"text-muted-foreground",children:"Gestion des webhooks et historique des livraisons"})]}),s.jsxs(se,{onClick:()=>{i(),c()},variant:"outline",size:"sm",children:[s.jsx(ln,{className:"h-4 w-4 mr-2"}),"Actualiser"]})]}),s.jsxs("div",{className:"grid grid-cols-5 gap-4",children:[s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsx("div",{className:"text-2xl font-bold",children:d.totalWebhooks}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Webhooks"})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:d.activeWebhooks}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Actifs"})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsx("div",{className:"text-2xl font-bold",children:d.totalDeliveries}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Livraisons"})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600",children:d.successDeliveries}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Succès"})]})}),s.jsx(ve,{children:s.jsxs(Ie,{className:"pt-4",children:[s.jsx("div",{className:"text-2xl font-bold text-red-600",children:d.failedDeliveries}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Échecs"})]})})]}),s.jsxs(bw,{defaultValue:"webhooks",children:[s.jsxs(d0,{children:[s.jsxs(To,{value:"webhooks",className:"gap-2",children:[s.jsx(Lv,{className:"h-4 w-4"}),"Webhooks (",n.length,")"]}),s.jsxs(To,{value:"deliveries",className:"gap-2",children:[s.jsx(ku,{className:"h-4 w-4"}),"Livraisons (",o.length,")"]})]}),s.jsx(Qf,{value:"webhooks",className:"mt-4",children:s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsx(rt,{children:"Webhooks enregistrés"}),s.jsx(fa,{children:"Webhooks créés par Shippingbo pour recevoir les notifications"})]}),s.jsx(Ie,{children:a?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Chargement..."}):n.length===0?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Aucun webhook enregistré. Shippingbo créera des webhooks lors de la connexion."}):s.jsx("div",{className:"space-y-3",children:n.map(m=>s.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border",children:[s.jsx(Lv,{className:"h-5 w-5 text-muted-foreground shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-medium",children:m.name}),f(m.status),s.jsx(Je,{variant:"outline",children:m.topic})]}),s.jsx("p",{className:"text-sm text-muted-foreground truncate mt-1",children:m.delivery_url})]}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:["ID: ",m.webhook_id]}),s.jsx("div",{className:"text-sm text-muted-foreground",children:zs(new Date(m.created_at),"dd/MM/yyyy",{locale:ha})}),s.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8 text-red-500",onClick:()=>u.mutate(m.id),children:s.jsx(Vl,{className:"h-4 w-4"})})]},m.id))})})]})}),s.jsx(Qf,{value:"deliveries",className:"mt-4",children:s.jsxs(ve,{children:[s.jsxs(tt,{children:[s.jsx(rt,{children:"Historique des livraisons"}),s.jsx(fa,{children:"Dernières notifications envoyées aux webhooks"})]}),s.jsx(Ie,{children:l?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Chargement..."}):o.length===0?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Aucune livraison. Les notifications apparaîtront ici lors des mises à jour de commandes."}):s.jsx("div",{className:"space-y-2",children:o.map(m=>s.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-lg border hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>r(m),children:[m.success?s.jsx(aa,{className:"h-5 w-5 text-green-500 shrink-0"}):s.jsx(Su,{className:"h-5 w-5 text-red-500 shrink-0"}),s.jsx("div",{className:"flex-1",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Je,{variant:"outline",children:m.event}),h(m.success,m.response_status)]})}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[s.jsx(Ri,{className:"h-3 w-3"}),m.duration_ms?`${m.duration_ms}ms`:"-"]}),s.jsx("div",{className:"text-sm text-muted-foreground",children:zs(new Date(m.created_at),"dd/MM HH:mm:ss",{locale:ha})}),s.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8",children:s.jsx(Us,{className:"h-4 w-4"})})]},m.id))})})]})})]}),s.jsx(Uo,{open:!!t,onOpenChange:()=>r(null),children:s.jsxs(Ci,{className:"max-w-3xl max-h-[80vh]",children:[s.jsxs(Si,{children:[s.jsxs(Ei,{className:"flex items-center gap-2",children:[t!=null&&t.success?s.jsx(aa,{className:"h-5 w-5 text-green-500"}):s.jsx(Su,{className:"h-5 w-5 text-red-500"}),"Détails de la livraison"]}),s.jsxs(Iu,{children:[t==null?void 0:t.event," - ",t&&zs(new Date(t.created_at),"dd MMMM yyyy à HH:mm:ss",{locale:ha})]})]}),t&&s.jsx(Ah,{className:"max-h-[60vh]",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Statut"}),h(t.success,t.response_status)]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Durée"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:t.duration_ms?`${t.duration_ms}ms`:"N/A"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Order ID"}),s.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:t.order_id||"N/A"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Payload envoyé"}),s.jsx("pre",{className:"bg-muted p-3 rounded-lg text-xs overflow-x-auto max-h-48 overflow-y-auto",children:JSON.stringify(t.payload,null,2)})]}),t.response_body&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-1",children:"Réponse"}),s.jsx("pre",{className:"bg-muted p-3 rounded-lg text-xs overflow-x-auto max-h-32 overflow-y-auto",children:t.response_body})]})]})})]})})]})})},Yoe=()=>{const{isAdmin:e,loading:t}=ID(),[r,n]=g.useState([]),[a,i]=g.useState(!0),[o,l]=g.useState({total:0,uniquePaths:0,todayHits:0}),c=async()=>{i(!0);try{const{data:h,error:m}=await be.from("error_404_logs").select("*").order("hit_count",{ascending:!1});if(m)throw m;const v=h||[];n(v);const p=new Date().toISOString().split("T")[0],x=v.filter(w=>w.last_seen_at.startsWith(p));l({total:v.reduce((w,y)=>w+y.hit_count,0),uniquePaths:v.length,todayHits:x.reduce((w,y)=>w+y.hit_count,0)})}catch(h){console.error("Error fetching 404 logs:",h),fe.error("Erreur lors du chargement des logs 404")}finally{i(!1)}},u=async h=>{try{const{error:m}=await be.from("error_404_logs").delete().eq("id",h);if(m)throw m;n(r.filter(v=>v.id!==h)),fe.success("Log supprimé")}catch(m){console.error("Error deleting log:",m),fe.error("Erreur lors de la suppression")}},d=async()=>{if(confirm("Êtes-vous sûr de vouloir supprimer tous les logs 404 ?"))try{const{error:h}=await be.from("error_404_logs").delete().neq("id","00000000-0000-0000-0000-000000000000");if(h)throw h;n([]),l({total:0,uniquePaths:0,todayHits:0}),fe.success("Tous les logs ont été supprimés")}catch(h){console.error("Error clearing logs:",h),fe.error("Erreur lors de la suppression")}},f=()=>{if(r.length===0){fe.error("Aucune donnée à exporter");return}const m=[["URL","Occurrences","Première vue","Dernière vue","Referrer","User Agent"].join(";"),...r.map(w=>[w.path,w.hit_count,zs(new Date(w.first_seen_at),"yyyy-MM-dd HH:mm:ss"),zs(new Date(w.last_seen_at),"yyyy-MM-dd HH:mm:ss"),w.referrer||"",w.user_agent||""].map(y=>`"${String(y).replace(/"/g,'""')}"`).join(";"))].join(`
`),v=new Blob(["\uFEFF"+m],{type:"text/csv;charset=utf-8;"}),p=URL.createObjectURL(v),x=document.createElement("a");x.href=p,x.download=`logs-404-${zs(new Date,"yyyy-MM-dd")}.csv`,document.body.appendChild(x),x.click(),document.body.removeChild(x),URL.revokeObjectURL(p),fe.success("Export CSV téléchargé")};return g.useEffect(()=>{e&&c()},[e]),t?s.jsx(Ur,{children:s.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:s.jsx(ln,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}):s.jsx(Ur,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Monitoring 404"}),s.jsx("p",{className:"text-muted-foreground",children:"Suivez les URLs manquantes pour identifier les pages à créer"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(se,{variant:"outline",onClick:c,disabled:a,children:[s.jsx(ln,{className:`h-4 w-4 mr-2 ${a?"animate-spin":""}`}),"Actualiser"]}),r.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs(se,{variant:"outline",onClick:f,children:[s.jsx(rb,{className:"h-4 w-4 mr-2"}),"Export CSV"]}),s.jsxs(se,{variant:"destructive",onClick:d,children:[s.jsx(Vl,{className:"h-4 w-4 mr-2"}),"Tout supprimer"]})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium text-muted-foreground",children:"Total des erreurs 404"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-3xl font-bold",children:o.total})})]}),s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium text-muted-foreground",children:"URLs uniques"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-3xl font-bold",children:o.uniquePaths})})]}),s.jsxs(ve,{children:[s.jsx(tt,{className:"pb-2",children:s.jsx(rt,{className:"text-sm font-medium text-muted-foreground",children:"Erreurs aujourd'hui"})}),s.jsx(Ie,{children:s.jsx("div",{className:"text-3xl font-bold",children:o.todayHits})})]})]}),s.jsxs(ve,{children:[s.jsx(tt,{children:s.jsxs(rt,{className:"flex items-center gap-2",children:[s.jsx(Ax,{className:"h-5 w-5 text-destructive"}),"URLs en erreur 404"]})}),s.jsx(Ie,{children:a?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(ln,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):r.length===0?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Aucune erreur 404 enregistrée"}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(Pi,{children:[s.jsx(Ii,{children:s.jsxs(nr,{children:[s.jsx(nt,{children:"URL"}),s.jsx(nt,{className:"text-center",children:"Occurrences"}),s.jsx(nt,{children:"Première vue"}),s.jsx(nt,{children:"Dernière vue"}),s.jsx(nt,{children:"Referrer"}),s.jsx(nt,{className:"w-[80px]"})]})}),s.jsx(Fi,{children:r.map(h=>s.jsxs(nr,{children:[s.jsx(Be,{className:"font-mono text-sm max-w-[300px] truncate",children:s.jsxs("a",{href:`https://www.notocbd.com${h.path}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:text-primary",children:[h.path,s.jsx(Al,{className:"h-3 w-3"})]})}),s.jsx(Be,{className:"text-center",children:s.jsx(Je,{variant:h.hit_count>10?"destructive":h.hit_count>5?"default":"secondary",children:h.hit_count})}),s.jsx(Be,{className:"text-sm text-muted-foreground",children:zs(new Date(h.first_seen_at),"dd MMM yyyy HH:mm",{locale:ha})}),s.jsx(Be,{className:"text-sm text-muted-foreground",children:zs(new Date(h.last_seen_at),"dd MMM yyyy HH:mm",{locale:ha})}),s.jsx(Be,{className:"text-sm text-muted-foreground max-w-[200px] truncate",children:h.referrer||"-"}),s.jsx(Be,{children:s.jsx(se,{variant:"ghost",size:"icon",onClick:()=>u(h.id),children:s.jsx(Vl,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"})})})]},h.id))})]})})})]})]})})},Xoe=()=>s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Promotions CBD | Offres Spéciales NŌTO",description:"Découvrez nos offres spéciales sur les produits CBD NŌTO : huiles, gummies, granules et capsules. Livraison gratuite dès 49€. Fabrication française.",url:"/blackfriday-cbd"}),s.jsxs("main",{children:[s.jsx("section",{className:"relative bg-gradient-to-br from-primary/10 via-background to-secondary/10 py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full mb-6",children:[s.jsx(P2,{className:"h-5 w-5"}),s.jsx("span",{className:"font-medium",children:"Offres Spéciales"})]}),s.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-6",children:["Promotions ",s.jsx("span",{className:"text-primary",children:"CBD"})]}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Profitez de nos offres exceptionnelles sur toute notre gamme de produits CBD premium. Qualité française, efficacité prouvée."}),s.jsx("div",{className:"flex flex-wrap justify-center gap-4",children:s.jsx(pe,{to:"/produits",children:s.jsxs(se,{size:"lg",className:"gap-2",children:[s.jsx(Ut,{className:"h-5 w-5"}),"Voir tous les produits"]})})})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"flex items-center gap-4 p-6 bg-background rounded-2xl shadow-sm",children:[s.jsx("div",{className:"p-3 bg-primary/10 rounded-full",children:s.jsx(Rx,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground",children:"Livraison Gratuite"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Dès 49€ d'achat"})]})]}),s.jsxs("div",{className:"flex items-center gap-4 p-6 bg-background rounded-2xl shadow-sm",children:[s.jsx("div",{className:"p-3 bg-primary/10 rounded-full",children:s.jsx(P2,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground",children:"Packs Économiques"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Jusqu'à -50% sur les lots"})]})]}),s.jsxs("div",{className:"flex items-center gap-4 p-6 bg-background rounded-2xl shadow-sm",children:[s.jsx("div",{className:"p-3 bg-primary/10 rounded-full",children:s.jsx(Nh,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground",children:"Qualité Premium"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Fabrication 100% française"})]})]})]})})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Huiles CBD"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Nos huiles CBD sublinguales aux arômes naturels. Absorption rapide, effet durable."})]}),s.jsx(oa,{categoryName:"Huiles CBD"})]})}),s.jsx("section",{className:"py-16 bg-muted/30",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Gummies CBD"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Des bonbons CBD délicieux et pratiques. Une façon gourmande de profiter du CBD."})]}),s.jsx(oa,{categoryName:"Gummies CBD"})]})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Capsules CBD"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Capsules CBD enrichies en extraits de plantes pour des besoins ciblés : stress, sommeil, articulations."})]}),s.jsx(oa,{categoryName:"Capsules CBD"})]})}),s.jsx("section",{className:"py-16 bg-muted/30",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Granules CBD"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Granules sublinguaux vegan au xylitol. Format pratique et absorption optimale."})]}),s.jsx(oa,{categoryName:"Granules CBD"})]})}),s.jsx("section",{className:"py-16 bg-primary/5",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Une question sur nos produits ?"}),s.jsx("p",{className:"text-muted-foreground mb-8 max-w-xl mx-auto",children:"Notre équipe est disponible pour vous conseiller sur le produit adapté à vos besoins."}),s.jsx(pe,{to:"/contact",children:s.jsx(se,{variant:"outline",size:"lg",children:"Nous contacter"})})]})})]}),s.jsx(it,{})]}),lS=[{question:"Le CBD soulage-t-il les douleurs articulaires ?",answer:"Le CBD possède des propriétés anti-inflammatoires naturelles qui peuvent aider à réduire l'inconfort articulaire. Il agit sur le système endocannabinoïde impliqué dans la régulation de la douleur et de l'inflammation."},{question:"Pourquoi associer le CBD au Curcuma pour les articulations ?",answer:"Le Curcuma contient de la curcumine, un puissant anti-inflammatoire naturel. Associé au CBD, il offre une action synergique pour soutenir le confort articulaire. Cette combinaison est particulièrement efficace pour les inconforts chroniques."},{question:"Combien de temps avant de ressentir les bienfaits sur les articulations ?",answer:"Les premiers effets peuvent se ressentir en quelques jours, mais pour un soulagement durable, nous recommandons une cure d'au moins 30 jours. Le CBD et le Curcuma agissent en profondeur sur l'inflammation."},{question:"À quel moment de la journée prendre les capsules CBD Articulations ?",answer:"Nous recommandons de prendre 2 capsules par jour, de préférence au moment des repas pour une meilleure absorption. Le matin et le soir, ou les deux au déjeuner selon votre préférence."},{question:"Le CBD pour articulations convient-il aux sportifs ?",answer:"Oui, nos capsules CBD Articulations sont idéales pour les sportifs. Elles aident à la récupération articulaire après l'effort et peuvent être utilisées en prévention lors d'entraînements intensifs."}],Qoe=()=>{var a;const{data:e,isLoading:t}=lc(),r=(e==null?void 0:e.filter(i=>{var o,l,c;return((o=i.slug)==null?void 0:o.includes("articulation"))||((l=i.slug)==null?void 0:l.includes("curcuma"))||((c=i.name)==null?void 0:c.toLowerCase().includes("articulation"))}))||[],n=((a=e==null?void 0:e.filter(i=>{var o,l;return((o=i.category)==null?void 0:o.toLowerCase().includes("granule"))||((l=i.category)==null?void 0:l.toLowerCase().includes("huile"))&&!r.find(c=>c.id===i.id)}))==null?void 0:a.slice(0,4))||[];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"CBD pour Articulations & Douleurs | NŌTO CBD",description:"Découvrez nos produits CBD spécialement formulés pour le confort articulaire. Capsules CBD au Curcuma, huiles et granules. Fabrication française, qualité premium.",url:"/pour-articulations"}),s.jsx(gn,{items:lS,pageUrl:"/pour-articulations"}),s.jsxs("main",{children:[s.jsx("section",{className:"relative bg-gradient-to-br from-primary/10 via-background to-accent/10 py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full mb-6",children:[s.jsx(g4,{className:"h-5 w-5"}),s.jsx("span",{className:"font-medium",children:"Confort Articulaire"})]}),s.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-6",children:["CBD pour les ",s.jsx("span",{className:"text-primary",children:"Articulations"})]}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Retrouvez mobilité et confort au quotidien grâce à nos produits CBD enrichis en actifs naturels comme le Curcuma, reconnu pour ses propriétés anti-inflammatoires."})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(ss,{className:"h-7 w-7 text-primary"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"100% Naturel"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Formules à base de CBD et d'extraits de plantes, sans additifs chimiques."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(On,{className:"h-7 w-7 text-primary"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Curcuma Bio"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Le Curcuma, puissant anti-inflammatoire naturel, renforce l'action du CBD."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(Ot,{className:"h-7 w-7 text-primary"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Efficacité Prouvée"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Des milliers de clients satisfaits témoignent de l'efficacité de nos produits."})]})]})})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Nos Solutions pour les Articulations"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Nos capsules CBD Articulations combinent le CBD à haute concentration avec du Curcuma pour un soutien optimal de vos articulations."})]}),t?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:[...Array(4)].map((i,o)=>s.jsx("div",{className:"h-[420px] bg-muted animate-pulse rounded-2xl"},o))}):r.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:r.map(i=>s.jsx(Kr,{product:i},i.id))}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground mb-6",children:"Découvrez notre gamme complète de produits CBD."}),s.jsx(pe,{to:"/capsules-cbd",children:s.jsx(se,{children:"Voir les Capsules CBD"})})]})]})}),s.jsx("section",{className:"py-16 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Comment le CBD agit sur les articulations ?"}),s.jsxs("div",{className:"prose prose-lg max-w-none text-muted-foreground",children:[s.jsxs("p",{className:"mb-6",children:["Le ",s.jsx("strong",{className:"text-foreground",children:"CBD (cannabidiol)"})," interagit avec le système endocannabinoïde de notre corps, qui joue un rôle clé dans la régulation de la douleur et de l'inflammation."]}),s.jsxs("p",{className:"mb-6",children:["Associé au ",s.jsx("strong",{className:"text-foreground",children:"Curcuma"}),", reconnu depuis des millénaires pour ses propriétés anti-inflammatoires, le CBD offre une approche naturelle pour soulager les inconforts articulaires."]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border mt-8",children:[s.jsx("h3",{className:"text-xl font-semibold text-foreground mb-4",children:"Conseils d'utilisation"}),s.jsxs("ul",{className:"space-y-3",children:[s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"Prenez 2 capsules par jour avec un verre d'eau"})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"De préférence au moment des repas pour une meilleure absorption"})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"Cure recommandée de 30 jours minimum pour des résultats optimaux"})]})]})]})]})]})})}),n.length>0&&s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Produits Complémentaires"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Complétez votre routine bien-être avec nos autres produits CBD."})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:n.map(i=>s.jsx(Kr,{product:i},i.id))})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Questions fréquentes sur le CBD et les Articulations"}),s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-4",children:lS.map((i,o)=>s.jsxs(Pn,{value:`item-${o}`,className:"bg-card border border-border rounded-xl px-6 shadow-sm",children:[s.jsx(In,{className:"text-left font-semibold text-foreground hover:text-primary py-5",children:i.question}),s.jsx(Fn,{className:"pb-5 text-muted-foreground",children:i.answer})]},o))})]})})}),s.jsx("section",{className:"py-16 bg-primary/5",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Besoin de conseils personnalisés ?"}),s.jsx("p",{className:"text-muted-foreground mb-8 max-w-xl mx-auto",children:"Notre équipe est là pour vous accompagner dans le choix du produit le plus adapté à vos besoins."}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[s.jsx(pe,{to:"/faq",children:s.jsx(se,{variant:"outline",size:"lg",children:"Consulter la FAQ"})}),s.jsx(pe,{to:"/contact",children:s.jsx(se,{size:"lg",children:"Nous contacter"})})]})]})})]}),s.jsx(it,{})]})},cS=[{question:"Le CBD aide-t-il vraiment à dormir ?",answer:"Oui, le CBD favorise la relaxation en agissant sur le système endocannabinoïde. Il aide à réduire l'anxiété et les tensions qui perturbent l'endormissement, sans créer de dépendance ni d'accoutumance."},{question:"Quelle est la différence entre CBD, CBN et Mélatonine pour le sommeil ?",answer:"Le CBD favorise la détente générale. Le CBN (cannabinol) a des propriétés sédatives naturelles plus marquées. La Mélatonine est l'hormone du sommeil qui synchronise votre horloge biologique. Nos produits combinent ces actifs pour une action synergique."},{question:"Combien de temps avant de dormir faut-il prendre du CBD ?",answer:"Pour les sprays sublinguaux, nous recommandons 30 minutes avant le coucher. Pour les capsules ou granules, prenez-les avec le dîner ou 1 heure avant le coucher pour une absorption optimale."},{question:"Le CBD provoque-t-il une somnolence au réveil ?",answer:"Non, contrairement aux somnifères classiques, le CBD ne provoque pas d'effet de somnolence le matin. Vous vous réveillez frais et reposé, sans sensation de « gueule de bois »."},{question:"Puis-je utiliser le CBD sommeil tous les jours ?",answer:"Oui, nos produits CBD sont conçus pour une utilisation quotidienne. Le CBD ne crée pas de dépendance. Pour les produits avec Mélatonine, nous recommandons des cures de 3 mois maximum."}],Joe=()=>{var a;const{data:e,isLoading:t}=lc(),r=(e==null?void 0:e.filter(i=>{var o,l,c,u,d;return((o=i.slug)==null?void 0:o.includes("sommeil"))||((l=i.slug)==null?void 0:l.includes("morphee"))||((c=i.slug)==null?void 0:c.includes("valeriane"))||((u=i.name)==null?void 0:u.toLowerCase().includes("sommeil"))||((d=i.name)==null?void 0:d.toLowerCase().includes("morphée"))}))||[],n=((a=e==null?void 0:e.filter(i=>{var o,l;return(((o=i.category)==null?void 0:o.toLowerCase().includes("huile"))||((l=i.category)==null?void 0:l.toLowerCase().includes("gummies")))&&!r.find(c=>c.id===i.id)}))==null?void 0:a.slice(0,4))||[];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"CBD pour Dormir & Sommeil | NŌTO CBD",description:"Améliorez votre sommeil naturellement avec nos produits CBD : sprays à la mélatonine, granules Morphée au CBN, capsules à la Valériane. Fabrication française.",url:"/pour-sommeil"}),s.jsx(gn,{items:cS,pageUrl:"/pour-sommeil"}),s.jsxs("main",{children:[s.jsx("section",{className:"relative bg-gradient-to-br from-indigo-500/10 via-background to-primary/10 py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 px-4 py-2 rounded-full mb-6",children:[s.jsx(ef,{className:"h-5 w-5"}),s.jsx("span",{className:"font-medium",children:"Sommeil & Récupération"})]}),s.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-6",children:["CBD pour le ",s.jsx("span",{className:"text-primary",children:"Sommeil"})]}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Retrouvez des nuits paisibles et réparatrices grâce à nos formules CBD enrichies en Mélatonine, Valériane et CBN pour un endormissement naturel."})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-indigo-500/10 rounded-full flex items-center justify-center",children:s.jsx(ef,{className:"h-7 w-7 text-indigo-600 dark:text-indigo-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Endormissement Rapide"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"La Mélatonine et le CBN favorisent un endormissement naturel en moins de 30 minutes."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-indigo-500/10 rounded-full flex items-center justify-center",children:s.jsx(Ri,{className:"h-7 w-7 text-indigo-600 dark:text-indigo-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Sommeil Profond"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Le CBD et la Valériane prolongent les phases de sommeil profond réparateur."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-indigo-500/10 rounded-full flex items-center justify-center",children:s.jsx(Fo,{className:"h-7 w-7 text-indigo-600 dark:text-indigo-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Réveil Frais"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucun effet de somnolence au réveil, vous vous sentez reposé et énergisé."})]})]})})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Nos Solutions pour le Sommeil"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Sprays sublinguaux à action rapide, granules Morphée au CBN, ou capsules à la Valériane : trouvez la formule qui vous convient."})]}),t?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:[...Array(4)].map((i,o)=>s.jsx("div",{className:"h-[420px] bg-muted animate-pulse rounded-2xl"},o))}):r.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:r.map(i=>s.jsx(Kr,{product:i},i.id))}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground mb-6",children:"Découvrez notre gamme complète de produits CBD."}),s.jsx(pe,{to:"/sprays-cbd",children:s.jsx(se,{children:"Voir les Sprays CBD"})})]})]})}),s.jsx("section",{className:"py-16 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Les actifs naturels pour mieux dormir"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-10",children:[s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(ss,{className:"h-5 w-5 text-primary"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"CBD (Cannabidiol)"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Le CBD favorise la relaxation en agissant sur le système endocannabinoïde. Il aide à réduire l'anxiété et les tensions qui peuvent perturber l'endormissement."})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-indigo-500/10 rounded-full flex items-center justify-center",children:s.jsx(ef,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-400"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"CBN (Cannabinol)"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Le CBN est reconnu pour ses propriétés sédatives naturelles. Présent dans nos Granules Morphée, il potentialise l'effet relaxant du CBD."})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-purple-500/10 rounded-full flex items-center justify-center",children:s.jsx(Fo,{className:"h-5 w-5 text-purple-600 dark:text-purple-400"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"Mélatonine"})]}),s.jsx("p",{className:"text-muted-foreground",children:"L'hormone du sommeil par excellence. Nos sprays contiennent de la mélatonine pour synchroniser votre horloge biologique et faciliter l'endormissement."})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-green-500/10 rounded-full flex items-center justify-center",children:s.jsx(ss,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"Valériane"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Plante millénaire utilisée pour ses vertus apaisantes. Nos capsules Sommeil associent Valériane et CBD pour un sommeil profond."})]})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsx("h3",{className:"text-xl font-semibold text-foreground mb-4",children:"Conseils d'utilisation"}),s.jsxs("ul",{className:"space-y-3",children:[s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Spray :"})," 4 pulvérisations sous la langue, 30 min avant le coucher"]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Granules :"})," 5 granules à laisser fondre sous la langue le soir"]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Capsules :"})," 2 capsules avec un verre d'eau au dîner"]})]})]})]})]})})}),n.length>0&&s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Produits Complémentaires"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Complétez votre routine bien-être avec nos huiles et gummies CBD."})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:n.map(i=>s.jsx(Kr,{product:i},i.id))})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Questions fréquentes sur le CBD et le Sommeil"}),s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-4",children:cS.map((i,o)=>s.jsxs(Pn,{value:`item-${o}`,className:"bg-card border border-border rounded-xl px-6 shadow-sm",children:[s.jsx(In,{className:"text-left font-semibold text-foreground hover:text-primary py-5",children:i.question}),s.jsx(Fn,{className:"pb-5 text-muted-foreground",children:i.answer})]},o))})]})})}),s.jsx("section",{className:"py-16 bg-indigo-500/5",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Des questions sur le CBD et le sommeil ?"}),s.jsx("p",{className:"text-muted-foreground mb-8 max-w-xl mx-auto",children:"Consultez notre guide complet ou contactez notre équipe pour des conseils personnalisés."}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[s.jsx(pe,{to:"/blog/dosage-cbd-guide",children:s.jsx(se,{variant:"outline",size:"lg",children:"Guide du dosage CBD"})}),s.jsx(pe,{to:"/contact",children:s.jsx(se,{size:"lg",children:"Nous contacter"})})]})]})})]}),s.jsx(it,{})]})},uS=[{question:"Le CBD est-il efficace contre le stress ?",answer:"Oui, le CBD interagit avec les récepteurs du système endocannabinoïde pour favoriser un état de calme. Des études montrent qu'il peut réduire les manifestations physiques du stress comme les tensions musculaires et la nervosité."},{question:"Combien de temps faut-il pour ressentir les effets anti-stress du CBD ?",answer:"Avec un spray sublingual, les effets se ressentent en 15-30 minutes. Les capsules et granules nécessitent 30 minutes à 1 heure. Pour des résultats durables, une cure de 2-3 semaines est recommandée."},{question:"Le CBD anti-stress fait-il dormir ?",answer:"Non, nos produits anti-stress sont formulés pour apporter calme et clarté mentale sans somnolence. Vous restez concentré et alerte tout en étant plus serein. Pour le sommeil, préférez nos produits dédiés."},{question:"Puis-je prendre du CBD anti-stress au travail ?",answer:"Oui, le CBD n'altère pas vos capacités cognitives et ne contient pas de THC. Vous pouvez l'utiliser avant une réunion importante ou lors de pics de stress sans impact sur votre concentration."},{question:"Qu'est-ce que la Mélisse et comment agit-elle avec le CBD ?",answer:"La Mélisse est une plante médicinale reconnue pour ses propriétés calmantes. Associée au CBD, elle renforce l'effet relaxant et aide à réduire l'agitation mentale. C'est une synergie naturelle et sans effets secondaires."}],Zoe=()=>{var a;const{data:e,isLoading:t}=lc(),r=(e==null?void 0:e.filter(i=>{var o,l,c,u,d;return((o=i.slug)==null?void 0:o.includes("stress"))||((l=i.slug)==null?void 0:l.includes("melisse"))||((c=i.slug)==null?void 0:c.includes("olympe"))||((u=i.slug)==null?void 0:u.includes("algos"))||((d=i.name)==null?void 0:d.toLowerCase().includes("stress"))}))||[],n=((a=e==null?void 0:e.filter(i=>{var o,l;return(((o=i.category)==null?void 0:o.toLowerCase().includes("huile"))||((l=i.category)==null?void 0:l.toLowerCase().includes("gummies")))&&!r.find(c=>c.id===i.id)}))==null?void 0:a.slice(0,4))||[];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"CBD Anti-Stress & Relaxation | NŌTO CBD",description:"Gérez votre stress naturellement avec nos produits CBD : sprays relaxants, capsules à la Mélisse, granules Olympe. Détente et sérénité au quotidien. Fabrication française.",url:"/anti-stress"}),s.jsx(gn,{items:uS,pageUrl:"/anti-stress"}),s.jsxs("main",{children:[s.jsx("section",{className:"relative bg-gradient-to-br from-rose-500/10 via-background to-primary/10 py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-rose-500/10 text-rose-600 dark:text-rose-400 px-4 py-2 rounded-full mb-6",children:[s.jsx(Eu,{className:"h-5 w-5"}),s.jsx("span",{className:"font-medium",children:"Relaxation & Bien-être"})]}),s.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-6",children:["CBD ",s.jsx("span",{className:"text-primary",children:"Anti-Stress"})]}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Retrouvez calme et sérénité au quotidien grâce à nos formules CBD enrichies en plantes adaptogènes comme la Mélisse et l'Ashwagandha."})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-rose-500/10 rounded-full flex items-center justify-center",children:s.jsx(Iv,{className:"h-7 w-7 text-rose-600 dark:text-rose-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Clarté Mentale"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Le CBD aide à apaiser le mental sans effet de somnolence, pour rester concentré."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-rose-500/10 rounded-full flex items-center justify-center",children:s.jsx(On,{className:"h-7 w-7 text-rose-600 dark:text-rose-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Résistance au Stress"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Les adaptogènes renforcent la capacité du corps à gérer le stress quotidien."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-rose-500/10 rounded-full flex items-center justify-center",children:s.jsx(Eu,{className:"h-7 w-7 text-rose-600 dark:text-rose-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Équilibre Émotionnel"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Retrouvez un état de calme intérieur et une humeur stable tout au long de la journée."})]})]})})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Nos Solutions Anti-Stress"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Sprays sublinguaux à action rapide, capsules à la Mélisse ou granules relaxants : choisissez votre allié bien-être."})]}),t?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:[...Array(4)].map((i,o)=>s.jsx("div",{className:"h-[420px] bg-muted animate-pulse rounded-2xl"},o))}):r.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:r.map(i=>s.jsx(Kr,{product:i},i.id))}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground mb-6",children:"Découvrez notre gamme complète de produits CBD."}),s.jsx(pe,{to:"/sprays-cbd",children:s.jsx(se,{children:"Voir les Sprays CBD"})})]})]})}),s.jsx("section",{className:"py-16 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Les actifs naturels contre le stress"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-10",children:[s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(ss,{className:"h-5 w-5 text-primary"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"CBD (Cannabidiol)"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Le CBD interagit avec les récepteurs du système endocannabinoïde pour favoriser un état de calme et réduire les manifestations physiques du stress."})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-green-500/10 rounded-full flex items-center justify-center",children:s.jsx(ss,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"Mélisse"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Plante médicinale traditionnelle reconnue pour ses propriétés calmantes. Elle aide à réduire l'agitation et favorise la détente mentale."})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-orange-500/10 rounded-full flex items-center justify-center",children:s.jsx(On,{className:"h-5 w-5 text-orange-600 dark:text-orange-400"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"Ashwagandha"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Adaptogène puissant utilisé en médecine ayurvédique. Il aide le corps à s'adapter au stress et réduit le taux de cortisol."})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-blue-500/10 rounded-full flex items-center justify-center",children:s.jsx(Iv,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"CBG (Cannabigérol)"})]}),s.jsx("p",{className:"text-muted-foreground",children:"Cannabinoïde présent dans nos granules Olympe. Le CBG favorise la concentration et le bien-être mental."})]})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsx("h3",{className:"text-xl font-semibold text-foreground mb-4",children:"Conseils d'utilisation"}),s.jsxs("ul",{className:"space-y-3",children:[s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Spray :"})," 4 pulvérisations sous la langue en cas de stress, jusqu'à 3 fois par jour"]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Granules :"})," 5 granules à laisser fondre sous la langue, 1 à 4 fois par jour"]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Capsules :"})," 2 capsules par jour avec un verre d'eau (50mg de CBD)"]})]})]})]})]})})}),n.length>0&&s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Produits Complémentaires"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Complétez votre routine anti-stress avec nos huiles et gummies CBD."})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:n.map(i=>s.jsx(Kr,{product:i},i.id))})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Questions fréquentes sur le CBD Anti-Stress"}),s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-4",children:uS.map((i,o)=>s.jsxs(Pn,{value:`item-${o}`,className:"bg-card border border-border rounded-xl px-6 shadow-sm",children:[s.jsx(In,{className:"text-left font-semibold text-foreground hover:text-primary py-5",children:i.question}),s.jsx(Fn,{className:"pb-5 text-muted-foreground",children:i.answer})]},o))})]})})}),s.jsx("section",{className:"py-16 bg-rose-500/5",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Besoin d'aide pour choisir ?"}),s.jsx("p",{className:"text-muted-foreground mb-8 max-w-xl mx-auto",children:"Notre équipe vous accompagne pour trouver le produit le plus adapté à votre quotidien."}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[s.jsx(pe,{to:"/blog/dosage-cbd-guide",children:s.jsx(se,{variant:"outline",size:"lg",children:"Guide du dosage CBD"})}),s.jsx(pe,{to:"/contact",children:s.jsx(se,{size:"lg",children:"Nous contacter"})})]})]})})]}),s.jsx(it,{})]})},ele=()=>{const[e,t]=g.useState(!1),r=Oi();if(r.pathname.startsWith("/admin")||r.pathname.startsWith("/import-"))return null;const a="33744976885",i=encodeURIComponent("Bonjour, j'ai une question concernant vos produits CBD."),o=`https://wa.me/${a}?text=${i}`;return s.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"fixed bottom-6 right-6 z-50 flex items-center gap-3 group",onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),"aria-label":"Contacter sur WhatsApp",children:[s.jsx("div",{className:`
          hidden md:flex items-center bg-white shadow-lg rounded-full px-4 py-2
          transition-all duration-300 ease-out
          ${e?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none"}
        `,children:s.jsx("span",{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:"Besoin d'aide ?"})}),s.jsx("div",{className:`
          flex items-center justify-center
          w-14 h-14 md:w-16 md:h-16
          bg-[#25D366] hover:bg-[#20BD5A]
          rounded-full shadow-lg hover:shadow-xl
          transition-all duration-300 ease-out
          hover:scale-110
          ${e?"animate-pulse":""}
        `,children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:"w-7 h-7 md:w-8 md:h-8 fill-white",children:s.jsx("path",{d:"M16.002 0C7.165 0 .001 7.163.001 16c0 2.825.736 5.572 2.137 7.996L.004 32l8.217-2.156A15.932 15.932 0 0016.002 32C24.838 32 32 24.837 32 16S24.838 0 16.002 0zm0 29.091c-2.617 0-5.18-.708-7.41-2.048l-.531-.316-5.503 1.444 1.471-5.371-.346-.55A13.009 13.009 0 012.91 16c0-7.218 5.873-13.091 13.092-13.091S29.091 8.782 29.091 16 23.22 29.091 16.002 29.091zm7.173-9.808c-.393-.197-2.329-1.149-2.69-1.28-.361-.131-.624-.197-.886.197-.262.393-1.017 1.28-1.247 1.543-.23.262-.459.295-.852.098-.393-.197-1.66-.612-3.161-1.951-1.169-1.042-1.958-2.33-2.188-2.723-.23-.393-.025-.606.173-.802.178-.176.393-.459.59-.689.197-.23.262-.393.393-.656.131-.262.066-.492-.033-.689-.098-.197-.886-2.134-1.214-2.921-.32-.767-.645-.663-.886-.676-.23-.011-.492-.014-.755-.014-.262 0-.689.098-1.05.492-.361.393-1.378 1.346-1.378 3.282s1.411 3.807 1.608 4.07c.197.262 2.778 4.241 6.731 5.948.94.406 1.674.649 2.247.83.944.3 1.803.258 2.482.157.757-.113 2.329-.952 2.658-1.871.328-.919.328-1.707.23-1.871-.098-.164-.361-.262-.755-.459z"})})}),s.jsxs("span",{className:"absolute -top-1 -right-1 flex h-4 w-4",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-4 w-4 bg-red-500"})]})]})},dS=()=>{const{slug:e}=Ux();return s.jsx(zt,{to:`/produit/${e}`,replace:!0})},tle=()=>{const{category:e}=Ux(),r={"huiles-cbd":"/huiles-cbd","gummies-cbd":"/gummies-cbd","capsules-cbd":"/capsules-cbd","granules-cbd":"/granules-cbd","sprays-cbd":"/sprays-cbd","shampoings-secs-cbd":"/shampoings-secs-cbd"}[e||""]||`/produits/${e}`;return s.jsx(zt,{to:r,replace:!0})},rle=[{question:"Comment utiliser l'huile CBD ?",answer:"Déposez quelques gouttes sous la langue, attendez 60 secondes avant d'avaler. Cette méthode sublinguale permet une absorption rapide et efficace du CBD."},{question:"Quelle concentration d'huile CBD choisir ?",answer:"Débutants : 5% (500mg). Utilisateurs réguliers : 10-15%. Besoins importants : 20% (2000mg). Commencez par une faible concentration et augmentez progressivement."},{question:"Combien de gouttes d'huile CBD par jour ?",answer:"La dose recommandée est de 50mg de CBD par jour. Avec une huile 5%, cela représente environ 10 gouttes. Adaptez selon vos besoins et votre ressenti."},{question:"Quand prendre l'huile CBD ?",answer:"Pour le stress : le matin ou avant une situation stressante. Pour le sommeil : 30 minutes avant le coucher. Pour les douleurs : répartir les prises dans la journée."},{question:"L'huile CBD est-elle légale en France ?",answer:"Oui, les huiles CBD NŌTO sont 100% légales en France. Elles contiennent 0% de THC et sont fabriquées à partir de chanvre européen certifié."},{question:"Quelle différence entre huile 10ml et 30ml ?",answer:"Le format 30ml offre un meilleur rapport qualité-prix pour une utilisation régulière. Le 10ml est idéal pour découvrir le produit ou pour les déplacements."}],sle=()=>(g.useEffect(()=>{document.title="Huiles CBD 5% 10% 20% | NŌTO France";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Huiles CBD sublinguales NŌTO : 5%, 10% et 20%. Broad spectrum, saveurs citron, fruits rouges et menthe. Qualité pharmacie française.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Huiles CBD 5% 10% 20% | NŌTO France",description:"Huiles CBD sublinguales NŌTO : 5%, 10% et 20%. Broad spectrum, saveurs citron, fruits rouges et menthe. Qualité pharmacie française.",url:"/huiles-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Huiles CBD",url:"/huiles-cbd"}]}),s.jsx(gn,{items:rle,pageUrl:"/huiles-cbd"}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:"Huiles CBD"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-8",children:"Huiles CBD"}),s.jsx(oa,{categoryName:"Huiles CBD"})]})}),s.jsx(it,{})]})),nle=[{question:"Combien de capsules CBD par jour ?",answer:"La dose recommandée est de 2 capsules par jour, soit 50mg de CBD. Prenez-les de préférence avec un verre d'eau pendant ou après un repas."},{question:"Les capsules CBD sont-elles vegan ?",answer:"Les capsules NŌTO utilisent une enveloppe marine (poisson). Elles ne sont donc pas vegan mais conviennent aux personnes évitant la gélatine de porc."},{question:"Quelle différence entre capsules sommeil, stress et articulations ?",answer:"Capsules Sommeil : CBD + Valériane pour favoriser l'endormissement. Capsules Stress : CBD + Mélisse pour la relaxation. Capsules Articulations : CBD + Curcuma pour le confort articulaire."},{question:"Quand prendre les capsules CBD sommeil ?",answer:"Prenez les capsules sommeil 30 à 60 minutes avant le coucher avec un verre d'eau. La valériane et le CBD agissent en synergie pour favoriser un sommeil réparateur."},{question:"Les capsules CBD sont-elles efficaces ?",answer:"Oui, les capsules offrent une libération progressive du CBD dans l'organisme. L'effet est plus durable qu'avec l'huile sublinguale, idéal pour une action sur plusieurs heures."},{question:"Peut-on associer capsules CBD et huile CBD ?",answer:"Oui, vous pouvez combiner les deux formes. Par exemple : huile le matin pour un effet rapide, capsules le soir pour un effet prolongé pendant la nuit."}],ale=()=>(g.useEffect(()=>{document.title="Capsules CBD Sommeil & Stress | NŌTO France";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Capsules CBD NŌTO pour sommeil, stress et articulations. Formules naturelles à base de valériane, mélisse et curcuma. Fabrication française.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Capsules CBD Sommeil & Stress | NŌTO France",description:"Capsules CBD NŌTO pour sommeil, stress et articulations. Formules naturelles à base de valériane, mélisse et curcuma. Fabrication française.",url:"/capsules-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Capsules CBD",url:"/capsules-cbd"}]}),s.jsx(gn,{items:nle,pageUrl:"/capsules-cbd"}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:"Capsules CBD"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-8",children:"Capsules CBD"}),s.jsx(oa,{categoryName:"Capsules CBD"})]})}),s.jsx(it,{})]})),ile=[{question:"Combien de gummies CBD par jour ?",answer:"La dose recommandée est de 2 à 3 gummies par jour, soit 40 à 60mg de CBD. Commencez par 1 gummy et augmentez progressivement selon vos besoins."},{question:"Les gummies CBD sont-ils vegan ?",answer:"Oui, les gummies CBD NŌTO sont 100% vegan. Ils sont fabriqués sans gélatine animale, avec des ingrédients d'origine végétale uniquement."},{question:"Les gummies CBD contiennent-ils du sucre ?",answer:"Non, les gummies NŌTO sont sans sucre ajouté. Ils sont sucrés naturellement, ce qui les rend adaptés aux personnes surveillant leur consommation de sucre."},{question:"Quand prendre les gummies CBD ?",answer:"Les gummies peuvent être pris à tout moment de la journée. Pour la relaxation, prenez-les le soir. Pour le stress quotidien, répartissez les prises dans la journée."},{question:"Quel goût ont les gummies CBD NŌTO ?",answer:"Nos gummies ont un délicieux goût tutti frutti qui masque complètement le goût du chanvre. Ils sont agréables à consommer comme des bonbons."},{question:"Les gummies CBD font-ils planer ?",answer:"Non, les gummies CBD ne font pas planer. Ils contiennent 0% de THC, la substance psychoactive du cannabis. Vous restez parfaitement lucide."}],ole=()=>(g.useEffect(()=>{document.title="Gummies CBD Vegan Sans Sucre | NŌTO France";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Gummies CBD NŌTO délicieux et efficaces. Vegan, sans sucre ajouté, 20mg CBD par gummy. Façon gourmande de consommer le CBD.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Gummies CBD Vegan Sans Sucre | NŌTO France",description:"Gummies CBD NŌTO délicieux et efficaces. Vegan, sans sucre ajouté, 20mg CBD par gummy. Façon gourmande de consommer le CBD.",url:"/gummies-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Gummies CBD",url:"/gummies-cbd"}]}),s.jsx(gn,{items:ile,pageUrl:"/gummies-cbd"}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:"Gummies CBD"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-8",children:"Gummies CBD"}),s.jsx(oa,{categoryName:"Gummies CBD"})]})}),s.jsx(it,{})]})),lle=[{question:"Comment utiliser les granules CBD ?",answer:"Laissez fondre 5 granules sous la langue, 1 à 4 fois par jour selon vos besoins. L'absorption sublinguale permet une action rapide en 15-30 minutes."},{question:"Quelle différence entre granules Algos, Morphée et Olympe ?",answer:"Algos : CBD + CBG pour les douleurs et l'inflammation. Morphée : CBD + CBN pour le sommeil et la relaxation profonde. Olympe : CBD + CBG pour le stress et l'anxiété."},{question:"Les granules CBD sont-ils vegan ?",answer:"Oui, les granules NŌTO sont 100% vegan. Ils sont fabriqués avec du xylitol comme édulcorant naturel, sans aucun ingrédient d'origine animale."},{question:"Les granules CBD contiennent-ils du sucre ?",answer:"Non, les granules sont sans sucre. Ils contiennent du xylitol, un édulcorant naturel qui n'impacte pas la glycémie et protège les dents."},{question:"Qu'est-ce que le CBN et le CBG ?",answer:"Le CBN (cannabinol) favorise le sommeil et la détente. Le CBG (cannabigérol) a des propriétés anti-inflammatoires et analgésiques. Ces cannabinoïdes complètent l'action du CBD."},{question:"Combien de granules CBD par jour maximum ?",answer:"La dose maximale recommandée est de 20 granules par jour (4 prises de 5 granules), soit environ 200mg de CBD. Commencez par 5 granules et ajustez selon vos besoins."}],cle=()=>(g.useEffect(()=>{document.title="Granules CBD Homéopathiques | NŌTO France";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Granules CBD NŌTO pour dosage précis : Algos (douleurs), Morphée (sommeil), Olympe (stress). Format pratique, absorption rapide.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Granules CBD Homéopathiques | NŌTO France",description:"Granules CBD NŌTO pour dosage précis : Algos (douleurs), Morphée (sommeil), Olympe (stress). Format pratique, absorption rapide.",url:"/granules-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Granules CBD",url:"/granules-cbd"}]}),s.jsx(gn,{items:lle,pageUrl:"/granules-cbd"}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:"Granules CBD"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-8",children:"Granules CBD"}),s.jsx(oa,{categoryName:"Granules CBD"})]})}),s.jsx(it,{})]})),ule=()=>(g.useEffect(()=>{document.title="Sprays CBD Sommeil & Relaxation | NŌTO";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Sprays CBD NŌTO pour sommeil et relaxation. CBD associé à mélatonine ou ashwagandha. Application pratique, effet rapide.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Sprays CBD Sommeil & Relaxation | NŌTO",description:"Sprays CBD NŌTO pour sommeil et relaxation. CBD associé à mélatonine ou ashwagandha. Application pratique, effet rapide.",url:"/sprays-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Sprays CBD",url:"/sprays-cbd"}]}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:"Sprays CBD"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-8",children:"Sprays CBD"}),s.jsx(oa,{categoryName:"Spray CBD"})]})}),s.jsx(it,{})]})),dle=()=>(g.useEffect(()=>{document.title="Shampoing Sec CBD Cheveux | NŌTO France";const e=document.querySelector('meta[name="description"]');e&&e.setAttribute("content","Shampoings secs au CBD NŌTO pour cheveux clairs et foncés. Formule naturelle à la poudre de riz, fraîcheur instantanée.")},[]),s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Shampoing Sec CBD Cheveux | NŌTO France",description:"Shampoings secs au CBD NŌTO pour cheveux clairs et foncés. Formule naturelle à la poudre de riz, fraîcheur instantanée.",url:"/shampoings-secs-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Shampoings Secs CBD",url:"/shampoings-secs-cbd"}]}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:"Shampoings Secs CBD"}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-center mb-8",children:"Shampoings Secs CBD"}),s.jsx(oa,{categoryName:"Cosmétiques CBD"})]})}),s.jsx(it,{})]})),fS=[{question:"Comment fonctionne un shampoing sec au CBD ?",answer:"Notre shampoing sec combine la poudre de riz absorbante avec l'isolat de CBD. La poudre absorbe l'excès de sébum instantanément tandis que le CBD apaise le cuir chevelu et régule la production de sébum à long terme."},{question:"Le shampoing sec CBD laisse-t-il des résidus blancs ?",answer:"Notre formule pour cheveux foncés est spécialement pigmentée pour ne laisser aucun résidu visible. Pour les cheveux clairs, la formule standard se fond naturellement. Il suffit de bien masser le produit."},{question:"Puis-je utiliser le shampoing sec CBD tous les jours ?",answer:"Oui, notre formule naturelle est suffisamment douce pour un usage quotidien. Elle ne dessèche pas les cheveux et aide même à espacer les shampoings classiques en régulant le sébum."},{question:"Quels sont les bienfaits du CBD pour les cheveux ?",answer:"Le CBD aide à réguler la production de sébum, apaise les irritations du cuir chevelu, hydrate la fibre capillaire grâce aux acides gras essentiels, et protège des agressions environnementales grâce à ses antioxydants."},{question:"Le shampoing sec CBD convient-il aux cuirs chevelus sensibles ?",answer:"Absolument. Grâce aux propriétés anti-inflammatoires du CBD, notre shampoing sec convient parfaitement aux cuirs chevelus sensibles ou irrités. Il apaise les démangeaisons et réduit les rougeurs."}],fle=()=>{var a;const{data:e,isLoading:t}=lc(),r=(e==null?void 0:e.filter(i=>{var o,l,c;return((o=i.slug)==null?void 0:o.includes("shampoing"))||((l=i.category)==null?void 0:l.toLowerCase().includes("cosmétique"))||((c=i.name)==null?void 0:c.toLowerCase().includes("shampoing"))}))||[],n=((a=e==null?void 0:e.filter(i=>{var o,l;return((o=i.category)==null?void 0:o.toLowerCase().includes("huile"))||((l=i.category)==null?void 0:l.toLowerCase().includes("spray"))}))==null?void 0:a.slice(0,3))||[];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Shampoing CBD Sec pour Cheveux | NŌTO CBD",description:"Découvrez nos shampoings secs au CBD pour cheveux clairs et foncés. Formule naturelle séboréductrice, absorbe l'excès de sébum. Fabriqué en France, vegan.",url:"/shampoing-cbd"}),s.jsx(Vt,{items:[{name:"Shampoing CBD",url:"/shampoing-cbd"}]}),s.jsx(gn,{items:fS,pageUrl:"/shampoing-cbd"}),s.jsxs("main",{children:[s.jsx("section",{className:"relative bg-gradient-to-br from-accent/20 via-background to-primary/10 py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full mb-6",children:[s.jsx(Fo,{className:"h-5 w-5"}),s.jsx("span",{className:"font-medium",children:"Cosmétique CBD"})]}),s.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-6",children:["Shampoing ",s.jsx("span",{className:"text-primary",children:"CBD"})," Sec"]}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Rafraîchissez vos cheveux instantanément avec notre shampoing sec au CBD. Formule séboréductrice naturelle qui absorbe l'excès de sébum sans eau."}),s.jsx("div",{className:"flex flex-wrap justify-center gap-3",children:s.jsx(se,{asChild:!0,size:"lg",className:"rounded-full",children:s.jsx("a",{href:"#produits",children:"Découvrir nos shampoings"})})})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(Ku,{className:"h-7 w-7 text-primary"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Séboréducteur"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Absorbe l'excès de sébum en quelques secondes pour des cheveux frais et légers."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(ss,{className:"h-7 w-7 text-primary"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"100% Naturel"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"CBD Isolat et poudre de riz bio. Sans silicones, parabènes ni sulfates."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-primary/10 rounded-full flex items-center justify-center",children:s.jsx(lL,{className:"h-7 w-7 text-primary"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Effet Instantané"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Rafraîchit vos cheveux en 30 secondes, sans eau ni rinçage."})]})]})})}),s.jsx("section",{id:"produits",className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Nos Shampoings CBD"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Choisissez la formule adaptée à votre couleur de cheveux pour un résultat invisible et naturel."})]}),t?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[...Array(2)].map((i,o)=>s.jsx("div",{className:"h-96 bg-muted animate-pulse rounded-lg"},o))}):r.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-4xl mx-auto",children:r.map(i=>s.jsx(Kr,{product:i},i.id))}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground",children:"Aucun shampoing disponible pour le moment."}),s.jsx(se,{asChild:!0,className:"mt-4",children:s.jsx(pe,{to:"/produits",children:"Voir tous les produits"})})]})]})}),s.jsx("section",{className:"py-16 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx(jh,{className:"h-12 w-12 text-primary mx-auto mb-4"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Le CBD pour vos cheveux"}),s.jsx("p",{className:"text-muted-foreground",children:"Découvrez les bienfaits du cannabidiol en application capillaire."})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Ot,{className:"h-6 w-6 text-primary flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Régulation du sébum"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Le CBD aide à équilibrer la production de sébum du cuir chevelu, réduisant l'aspect gras sans assécher."})]})]}),s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Ot,{className:"h-6 w-6 text-primary flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Apaisement du cuir chevelu"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Propriétés anti-inflammatoires naturelles qui calment les irritations et les démangeaisons."})]})]}),s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Ot,{className:"h-6 w-6 text-primary flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Hydratation profonde"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Riche en acides gras essentiels (oméga 3, 6, 9), le CBD nourrit la fibre capillaire en profondeur."})]})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Ot,{className:"h-6 w-6 text-primary flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Protection antioxydante"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Les antioxydants du CBD protègent les cheveux contre les agressions environnementales (pollution, UV)."})]})]}),s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Ot,{className:"h-6 w-6 text-primary flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Stimulation capillaire"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Améliore la microcirculation au niveau du cuir chevelu, favorisant des cheveux plus forts et brillants."})]})]}),s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Ot,{className:"h-6 w-6 text-primary flex-shrink-0 mt-1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground mb-1",children:"Sans résidus"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Notre formule à base de poudre de riz ne laisse aucun résidu visible, même sur cheveux foncés."})]})]})]})]})]})})}),n.length>0&&s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Complétez votre routine"}),s.jsx("p",{className:"text-muted-foreground",children:"Découvrez nos huiles et sprays CBD pour un bien-être complet."})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 max-w-4xl mx-auto",children:n.map(i=>s.jsx(Kr,{product:i},i.id))})]})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Questions fréquentes sur le Shampoing CBD"}),s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-4",children:fS.map((i,o)=>s.jsxs(Pn,{value:`item-${o}`,className:"bg-card border border-border rounded-xl px-6 shadow-sm",children:[s.jsx(In,{className:"text-left font-semibold text-foreground hover:text-primary py-5",children:i.question}),s.jsx(Fn,{className:"pb-5 text-muted-foreground",children:i.answer})]},o))})]})})}),s.jsx("section",{className:"py-16 bg-primary/5",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Des questions sur nos shampoings CBD ?"}),s.jsx("p",{className:"text-muted-foreground mb-8",children:"Notre équipe est disponible pour vous conseiller sur le choix du produit adapté à vos cheveux."}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[s.jsx(se,{asChild:!0,size:"lg",className:"rounded-full",children:s.jsx(pe,{to:"/contact",children:"Nous contacter"})}),s.jsx(se,{asChild:!0,variant:"outline",size:"lg",className:"rounded-full",children:s.jsx(pe,{to:"/faq",children:"Consulter la FAQ"})})]})]})})})]}),s.jsx(it,{})]})},hS=[{question:"Qu'est-ce qu'une huile CBD à 20% (2000mg) ?",answer:"Une huile CBD à 20% contient 2000mg de CBD pour 10ml, soit une concentration élevée idéale pour les utilisateurs expérimentés ou ceux ayant des besoins plus importants. Elle permet d'obtenir des effets significatifs avec moins de gouttes."},{question:"Quelle est la différence entre 5%, 15% et 20% de CBD ?",answer:"La concentration indique la quantité de CBD par flacon : 5% (500mg/10ml) pour débuter, 15% (1500mg/10ml) en dosage intermédiaire, et 20% (2000mg/10ml) pour les utilisateurs confirmés. Plus la concentration est élevée, moins vous avez besoin de gouttes pour un même effet."},{question:"Combien de gouttes d'huile CBD 20% dois-je prendre ?",answer:"Commencez par 2-3 gouttes sous la langue, 2 fois par jour. Une goutte d'huile 20% équivaut à environ 10mg de CBD. Ajustez progressivement selon vos besoins. Nous recommandons de ne pas dépasser 70mg de CBD par jour."},{question:"L'huile CBD 20% convient-elle aux débutants ?",answer:"Nous recommandons aux débutants de commencer avec une concentration plus faible (5% ou 15%) pour trouver leur dosage optimal. L'huile 20% est idéale pour ceux qui connaissent déjà leurs besoins en CBD et souhaitent une formule plus concentrée."},{question:"Quels sont les bienfaits d'une huile CBD haute concentration ?",answer:"Une huile CBD 20% offre un meilleur rapport qualité-prix pour les utilisateurs réguliers, une action plus rapide avec moins de gouttes, et convient particulièrement aux besoins importants : stress chronique, troubles du sommeil persistants, inconfort musculaire ou articulaire."},{question:"L'huile CBD 20% NŌTO est-elle légale en France ?",answer:"Oui, notre huile CBD 20% est 100% légale. Elle contient moins de 0.3% de THC conformément à la réglementation française et européenne. Elle est fabriquée en France à partir de chanvre biologique certifié."}],hle=()=>{var a;const{data:e,isLoading:t}=lc(),r=(e==null?void 0:e.filter(i=>{var o,l,c,u,d;return(((o=i.slug)==null?void 0:o.includes("2000mg"))||((l=i.name)==null?void 0:l.toLowerCase().includes("2000mg"))||((c=i.name)==null?void 0:c.toLowerCase().includes("20%"))||((u=i.subcategory)==null?void 0:u.toLowerCase().includes("2000mg")))&&((d=i.category)==null?void 0:d.toLowerCase().includes("huile"))}))||[],n=((a=e==null?void 0:e.filter(i=>{var o;return((o=i.category)==null?void 0:o.toLowerCase().includes("huile"))&&!r.find(l=>l.id===i.id)}))==null?void 0:a.slice(0,4))||[];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Huile CBD 20% (2000mg) | Haute Concentration | NŌTO CBD",description:"Découvrez notre huile CBD 20% haute concentration (2000mg). Idéale pour les utilisateurs expérimentés. Fabrication française, chanvre bio. Saveur Mangue.",url:"/huile-cbd-20-pourcent"}),s.jsx(gn,{items:hS,pageUrl:"/huile-cbd-20-pourcent"}),s.jsxs("main",{children:[s.jsx("section",{className:"relative bg-gradient-to-br from-amber-500/10 via-background to-primary/10 py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 bg-amber-500/10 text-amber-600 dark:text-amber-400 px-4 py-2 rounded-full mb-6",children:[s.jsx(Ku,{className:"h-5 w-5"}),s.jsx("span",{className:"font-medium",children:"Haute Concentration"})]}),s.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-6",children:["Huile CBD ",s.jsx("span",{className:"text-primary",children:"20%"})," (2000mg)"]}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Notre huile CBD la plus concentrée pour les utilisateurs expérimentés. 2000mg de CBD Broad Spectrum dans un flacon de 10ml, saveur Mangue exotique."})]})})}),s.jsx("section",{className:"py-12 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-amber-500/10 rounded-full flex items-center justify-center",children:s.jsx(Dx,{className:"h-7 w-7 text-amber-600 dark:text-amber-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Action Puissante"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"2-3 gouttes suffisent pour ressentir les effets. Idéal pour les besoins importants."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-amber-500/10 rounded-full flex items-center justify-center",children:s.jsx(iL,{className:"h-7 w-7 text-amber-600 dark:text-amber-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Dosage Précis"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Environ 10mg de CBD par goutte. Facile à calculer et à ajuster selon vos besoins."})]}),s.jsxs("div",{className:"p-6 bg-background rounded-2xl shadow-sm text-center",children:[s.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-amber-500/10 rounded-full flex items-center justify-center",children:s.jsx(On,{className:"h-7 w-7 text-amber-600 dark:text-amber-400"})}),s.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Meilleur Rapport"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Plus économique à long terme : plus de CBD par euro pour les utilisateurs réguliers."})]})]})})}),s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Nos Huiles CBD 20% (2000mg)"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Concentration premium pour les utilisateurs expérimentés. CBD Broad Spectrum de qualité pharmaceutique."})]}),t?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:[...Array(4)].map((i,o)=>s.jsx("div",{className:"h-[420px] bg-muted animate-pulse rounded-2xl"},o))}):r.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 justify-items-center",children:r.map(i=>s.jsx(Kr,{product:i},i.id))}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground mb-6",children:"Découvrez notre gamme complète d'huiles CBD."}),s.jsx(pe,{to:"/huiles-cbd",children:s.jsx(se,{children:"Voir toutes les Huiles CBD"})})]})]})}),s.jsx("section",{className:"py-16 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Guide des concentrations CBD"}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6 mb-10",children:[s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-green-500/10 rounded-full flex items-center justify-center",children:s.jsx("span",{className:"font-bold text-green-600 dark:text-green-400",children:"5%"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"500mg"})]}),s.jsx("p",{className:"text-muted-foreground text-sm mb-3",children:"Idéal pour débuter. Environ 2.5mg par goutte."}),s.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1",children:[s.jsx("li",{children:"• Première découverte du CBD"}),s.jsx("li",{children:"• Stress léger occasionnel"}),s.jsx("li",{children:"• Petit budget"})]})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-blue-500/10 rounded-full flex items-center justify-center",children:s.jsx("span",{className:"font-bold text-blue-600 dark:text-blue-400",children:"15%"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"1500mg"})]}),s.jsx("p",{className:"text-muted-foreground text-sm mb-3",children:"Concentration intermédiaire. Environ 7.5mg par goutte."}),s.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1",children:[s.jsx("li",{children:"• Utilisateurs réguliers"}),s.jsx("li",{children:"• Stress modéré"}),s.jsx("li",{children:"• Inconfort léger"})]})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-primary/50 ring-2 ring-primary/20",children:[s.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:s.jsx("span",{className:"bg-primary text-primary-foreground text-xs px-3 py-1 rounded-full font-medium",children:"Recommandé"})}),s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-10 h-10 bg-amber-500/10 rounded-full flex items-center justify-center",children:s.jsx("span",{className:"font-bold text-amber-600 dark:text-amber-400",children:"20%"})}),s.jsx("h3",{className:"text-xl font-semibold text-foreground",children:"2000mg"})]}),s.jsx("p",{className:"text-muted-foreground text-sm mb-3",children:"Haute concentration. Environ 10mg par goutte."}),s.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1",children:[s.jsx("li",{children:"• Utilisateurs expérimentés"}),s.jsx("li",{children:"• Besoins importants"}),s.jsx("li",{children:"• Meilleur rapport qualité-prix"})]})]})]}),s.jsxs("div",{className:"bg-background p-6 rounded-xl border border-border",children:[s.jsxs("h3",{className:"text-xl font-semibold text-foreground mb-4 flex items-center gap-2",children:[s.jsx(ss,{className:"h-5 w-5 text-primary"}),"Conseils d'utilisation - Huile CBD 20%"]}),s.jsxs("ul",{className:"space-y-3",children:[s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Dosage initial :"})," Commencez par 2 gouttes sous la langue, 2 fois par jour (matin et soir)"]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Administration :"})," Gardez l'huile sous la langue 60-90 secondes avant d'avaler pour une absorption optimale"]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Ajustement :"})," Augmentez progressivement d'1 goutte tous les 3-4 jours jusqu'à trouver votre dosage idéal"]})]}),s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(Ot,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),s.jsxs("span",{className:"text-muted-foreground",children:[s.jsx("strong",{className:"text-foreground",children:"Conservation :"})," Gardez le flacon à l'abri de la lumière et de la chaleur. À consommer dans les 6 mois après ouverture."]})]})]})]})]})})}),n.length>0&&s.jsx("section",{className:"py-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs("div",{className:"text-center mb-10",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Découvrez nos autres concentrations"}),s.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Trouvez la concentration CBD adaptée à vos besoins parmi notre gamme complète."})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:n.map(i=>s.jsx(Kr,{product:i},i.id))}),s.jsx("div",{className:"text-center mt-8",children:s.jsx(pe,{to:"/huiles-cbd",children:s.jsx(se,{variant:"outline",size:"lg",children:"Voir toutes les huiles CBD"})})})]})}),s.jsx("section",{className:"py-16 bg-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-8 text-center",children:"Questions fréquentes sur l'huile CBD 20%"}),s.jsx(ba,{type:"single",collapsible:!0,className:"space-y-4",children:hS.map((i,o)=>s.jsxs(Pn,{value:`item-${o}`,className:"bg-card border border-border rounded-xl px-6 shadow-sm",children:[s.jsx(In,{className:"text-left font-semibold text-foreground hover:text-primary py-5",children:i.question}),s.jsx(Fn,{className:"pb-5 text-muted-foreground",children:i.answer})]},o))})]})})}),s.jsx("section",{className:"py-16 bg-amber-500/5",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-foreground mb-4",children:"Besoin de conseils sur le dosage CBD ?"}),s.jsx("p",{className:"text-muted-foreground mb-8 max-w-xl mx-auto",children:"Consultez notre guide complet ou contactez notre équipe pour des recommandations personnalisées."}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[s.jsx(pe,{to:"/blog/dosage-cbd-guide",children:s.jsx(se,{variant:"outline",size:"lg",children:"Guide du dosage CBD"})}),s.jsx(pe,{to:"/contact",children:s.jsx(se,{size:"lg",children:"Nous contacter"})})]})]})})]}),s.jsx(it,{})]})},mS=[{question:"Comment fonctionne le spray sommeil CBD avec mélatonine ?",answer:"Le spray sommeil CBD associe les propriétés relaxantes du cannabidiol à la mélatonine, l'hormone naturelle du sommeil. Le CBD aide à réduire l'anxiété et favorise la détente, tandis que la mélatonine régule le cycle veille-sommeil. Cette synergie permet un endormissement plus rapide et un sommeil plus réparateur."},{question:"Quel est le dosage recommandé pour le spray sommeil CBD ?",answer:"Le dosage recommandé est de 4 pulvérisations sous la langue (soit environ 30mg de CBD), 20 à 30 minutes avant le coucher. Maintenez le produit sous la langue pendant 20 secondes avant d'avaler pour une absorption optimale par les muqueuses."},{question:"Le spray sommeil CBD crée-t-il une dépendance ?",answer:"Non, contrairement aux somnifères classiques, le spray sommeil CBD ne crée pas de dépendance. Le CBD n'est pas addictif et la mélatonine est une hormone naturellement produite par l'organisme. Vous pouvez utiliser ce spray quotidiennement sans risque d'accoutumance."},{question:"Puis-je utiliser le spray CBD sommeil avec d'autres médicaments ?",answer:"Si vous prenez des médicaments, notamment des anticoagulants ou des sédatifs, consultez votre médecin avant d'utiliser le spray sommeil CBD. Le CBD peut interagir avec certains médicaments métabolisés par le foie. En cas de doute, demandez conseil à un professionnel de santé."},{question:"Au bout de combien de temps le spray sommeil CBD fait-il effet ?",answer:"L'application sublinguale permet une absorption rapide : les premiers effets relaxants se font sentir en 15 à 30 minutes. La mélatonine agit généralement dans les 30 minutes suivant la prise. Pour de meilleurs résultats, utilisez le spray dans un environnement calme, avant de vous coucher."},{question:"Le spray sommeil CBD est-il légal en France ?",answer:"Oui, le spray sommeil CBD NŌTO est 100% légal en France et dans l'Union Européenne. Il contient moins de 0,3% de THC (la molécule psychoactive du cannabis) et est fabriqué à partir de chanvre cultivé légalement. Nos produits sont analysés en laboratoire pour garantir leur conformité."}],mle=()=>{var a;const{data:e,isLoading:t}=lc(),r=(e==null?void 0:e.filter(i=>{var o,l,c,u;return(((o=i.slug)==null?void 0:o.includes("sommeil"))||((l=i.name)==null?void 0:l.toLowerCase().includes("sommeil")))&&(((c=i.category)==null?void 0:c.toLowerCase().includes("spray"))||((u=i.slug)==null?void 0:u.includes("spray")))}))||[],n=((a=e==null?void 0:e.filter(i=>{var o,l,c,u;return(((o=i.slug)==null?void 0:o.includes("sommeil"))||((l=i.slug)==null?void 0:l.includes("morphee"))||((c=i.name)==null?void 0:c.toLowerCase().includes("sommeil")))&&!((u=i.slug)!=null&&u.includes("spray"))}))==null?void 0:a.slice(0,3))||[];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Spray Sommeil CBD + Mélatonine | Endormissement Naturel | NŌTO",description:"Spray CBD sommeil avec mélatonine pour un endormissement rapide et naturel. Application sublinguale, effet en 15-30 min. Fabriqué en France, sans THC.",url:"/spray-sommeil-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Sprays CBD",url:"/sprays-cbd"},{name:"Spray Sommeil CBD",url:"/spray-sommeil-cbd"}]}),s.jsx(gn,{items:mS,pageUrl:"/spray-sommeil-cbd"}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:"Spray Sommeil CBD"}),s.jsxs("section",{className:"text-center mb-12",children:[s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-4",children:"Spray Sommeil CBD + Mélatonine"}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto mb-6",children:"Retrouvez un sommeil réparateur grâce à notre spray CBD enrichi en mélatonine. Une solution naturelle et efficace pour faciliter l'endormissement."}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4 text-sm",children:[s.jsxs("span",{className:"flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full",children:[s.jsx(ef,{className:"h-4 w-4"}),"Endormissement rapide"]}),s.jsxs("span",{className:"flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full",children:[s.jsx(Ku,{className:"h-4 w-4"}),"Application sublinguale"]}),s.jsxs("span",{className:"flex items-center gap-2 bg-primary/10 text-primary px-4 py-2 rounded-full",children:[s.jsx(ss,{className:"h-4 w-4"}),"100% naturel"]})]})]}),s.jsxs("section",{className:"mb-16",children:[s.jsx("h2",{className:"text-2xl font-bold text-center mb-8",children:"Nos Sprays Sommeil CBD"}),t?s.jsx("div",{className:"text-center py-8",children:"Chargement des produits..."}):r.length>0?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:r.map(i=>s.jsx(Kr,{product:i},i.id))}):s.jsxs("div",{className:"text-center py-8",children:[s.jsx("p",{className:"text-muted-foreground mb-4",children:"Découvrez notre gamme de sprays CBD"}),s.jsx(pe,{to:"/sprays-cbd",children:s.jsx(se,{children:"Voir tous les sprays CBD"})})]})]}),s.jsxs("section",{className:"mb-16 bg-muted/30 rounded-2xl p-8 md:p-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",children:"Pourquoi choisir un spray CBD pour dormir ?"}),s.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"bg-background rounded-xl p-6 shadow-sm",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mb-4",children:s.jsx(Dx,{className:"h-6 w-6 text-primary"})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Absorption rapide"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"L'application sublinguale permet une absorption directe dans le sang, pour des effets ressentis en 15-30 minutes."})]}),s.jsxs("div",{className:"bg-background rounded-xl p-6 shadow-sm",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mb-4",children:s.jsx(Ri,{className:"h-6 w-6 text-primary"})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Dosage précis"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Chaque pulvérisation délivre une dose exacte de CBD et mélatonine, pour un contrôle optimal de votre consommation."})]}),s.jsxs("div",{className:"bg-background rounded-xl p-6 shadow-sm",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mb-4",children:s.jsx(On,{className:"h-6 w-6 text-primary"})}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Sans accoutumance"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Contrairement aux somnifères, le spray CBD ne crée pas de dépendance et peut être utilisé quotidiennement."})]})]})]}),s.jsxs("section",{className:"mb-16",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",children:"Comment utiliser le spray sommeil CBD ?"}),s.jsx("div",{className:"max-w-3xl mx-auto",children:s.jsxs("div",{className:"grid gap-4",children:[s.jsxs("div",{className:"flex items-start gap-4 p-4 bg-muted/20 rounded-lg",children:[s.jsx("div",{className:"w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold shrink-0",children:"1"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-1",children:"Préparez-vous au coucher"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"20 à 30 minutes avant de vous coucher, dans un environnement calme et détendu."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 p-4 bg-muted/20 rounded-lg",children:[s.jsx("div",{className:"w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold shrink-0",children:"2"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-1",children:"Appliquez sous la langue"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Effectuez 4 pulvérisations sous la langue (environ 30mg de CBD)."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 p-4 bg-muted/20 rounded-lg",children:[s.jsx("div",{className:"w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold shrink-0",children:"3"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-1",children:"Laissez agir"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Gardez le spray sous la langue pendant 20 secondes avant d'avaler pour une absorption optimale."})]})]}),s.jsxs("div",{className:"flex items-start gap-4 p-4 bg-muted/20 rounded-lg",children:[s.jsx("div",{className:"w-8 h-8 bg-primary text-primary-foreground rounded-full flex items-center justify-center font-bold shrink-0",children:"4"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold mb-1",children:"Profitez d'un sommeil réparateur"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Les effets relaxants se font sentir en 15-30 minutes pour un endormissement naturel."})]})]})]})})]}),s.jsxs("section",{className:"mb-16 max-w-3xl mx-auto",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-center mb-8",children:"Questions fréquentes sur le spray sommeil CBD"}),s.jsx(ba,{type:"single",collapsible:!0,className:"w-full",children:mS.map((i,o)=>s.jsxs(Pn,{value:`item-${o}`,children:[s.jsx(In,{className:"text-left",children:i.question}),s.jsx(Fn,{className:"text-muted-foreground",children:i.answer})]},o))})]}),n.length>0&&s.jsxs("section",{className:"mb-16",children:[s.jsx("h2",{className:"text-2xl font-bold text-center mb-8",children:"Autres produits CBD pour le sommeil"}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto",children:n.map(i=>s.jsx(Kr,{product:i},i.id))})]}),s.jsxs("section",{className:"text-center bg-primary/5 rounded-2xl p-8 md:p-12",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold mb-4",children:"Prêt à retrouver un sommeil de qualité ?"}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-2xl mx-auto",children:"Découvrez notre gamme complète de produits CBD pour le sommeil et trouvez la solution adaptée à vos besoins."}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[s.jsx(pe,{to:"/sprays-cbd",children:s.jsx(se,{size:"lg",children:"Voir tous les sprays CBD"})}),s.jsx(pe,{to:"/pour-sommeil",children:s.jsx(se,{size:"lg",variant:"outline",children:"Tous les produits sommeil"})})]})]})]})}),s.jsx(it,{})]})},pS=[{question:"Comment fonctionne le spray CBD anti-stress ?",answer:"Le spray CBD anti-stress NŌTO combine le CBD avec l'Ashwagandha, une plante adaptogène reconnue pour ses propriétés relaxantes. L'application sublinguale permet une absorption rapide (15-30 minutes) pour un effet anti-stress efficace. Le CBD agit sur le système endocannabinoïde pour favoriser la détente naturelle."},{question:"Quelle est la différence entre le spray anti-stress et les huiles CBD ?",answer:"Le spray anti-stress offre une application plus pratique et un dosage précis (4 pulvérisations = 30mg CBD). Contrairement aux huiles classiques, il contient de l'Ashwagandha qui potentialise l'effet relaxant. Le format spray est idéal pour une utilisation nomade et discrète en cas de pic de stress."},{question:"Combien de fois par jour puis-je utiliser le spray anti-stress CBD ?",answer:"Nous recommandons 4 pulvérisations 1 à 2 fois par jour selon vos besoins. Pour un stress quotidien, une prise le matin suffit généralement. En période de stress intense, vous pouvez ajouter une seconde prise en fin de journée. Le flacon de 10ml est conçu pour environ 13 jours d'utilisation."},{question:"Le spray CBD anti-stress provoque-t-il de la somnolence ?",answer:"Non, le spray anti-stress CBD NŌTO est formulé pour favoriser la relaxation sans provoquer de somnolence. L'Ashwagandha est un adaptogène qui aide le corps à gérer le stress tout en maintenant la vigilance. Vous restez alerte et concentré tout en étant plus détendu."},{question:"Le spray anti-stress CBD est-il légal en France ?",answer:"Oui, le spray anti-stress CBD NŌTO est 100% légal en France et en Europe. Il contient 0% de THC (garanti par nos analyses en laboratoire) et respecte toutes les réglementations européennes sur les produits CBD. Il est fabriqué en Bretagne avec des ingrédients naturels."},{question:"Puis-je utiliser le spray CBD au travail pour gérer mon stress ?",answer:"Absolument ! Le spray anti-stress CBD est parfait pour une utilisation au bureau ou en déplacement. Il ne provoque pas de somnolence ni d'effet psychoactif. Son format discret permet une application rapide en toute situation. C'est une solution naturelle pour gérer le stress professionnel."}],ple=()=>{var a;const{data:e,isLoading:t}=lc(),r=(e==null?void 0:e.filter(i=>{var o,l,c,u;return(((o=i.slug)==null?void 0:o.includes("stress"))||((l=i.name)==null?void 0:l.toLowerCase().includes("stress")))&&(((c=i.category)==null?void 0:c.toLowerCase().includes("spray"))||((u=i.slug)==null?void 0:u.includes("spray")))}))||[],n=((a=e==null?void 0:e.filter(i=>{var o,l,c,u,d;return(((o=i.slug)==null?void 0:o.includes("stress"))||((l=i.name)==null?void 0:l.toLowerCase().includes("stress"))||((c=i.slug)==null?void 0:c.includes("relaxation"))||((u=i.name)==null?void 0:u.toLowerCase().includes("relaxation")))&&!((d=i.slug)!=null&&d.includes("spray"))}))==null?void 0:a.slice(0,3))||[];return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(at,{}),s.jsx(It,{title:"Spray CBD Anti-Stress à l'Ashwagandha | Relaxation Naturelle | NŌTO",description:"Découvrez notre spray CBD anti-stress enrichi à l'Ashwagandha. Solution naturelle contre le stress et l'anxiété. Absorption rapide, effet relaxant sans somnolence. Fabriqué en France.",url:"/spray-anti-stress-cbd",image:"/favicon.png"}),s.jsx(Vt,{items:[{name:"Sprays CBD",url:"/sprays-cbd"},{name:"Spray Anti-Stress CBD",url:"/spray-anti-stress-cbd"}]}),s.jsx(gn,{items:pS,pageUrl:"/spray-anti-stress-cbd"}),s.jsx("main",{className:"pt-8 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx(Li,{categoryName:"Spray Anti-Stress CBD"}),s.jsxs("section",{className:"text-center mb-12",children:[s.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-4",children:"Spray CBD Anti-Stress"}),s.jsx("p",{className:"text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto",children:"Retrouvez calme et sérénité avec notre spray CBD enrichi à l'Ashwagandha. Une solution naturelle et efficace contre le stress quotidien."})]}),s.jsxs("section",{className:"mb-16",children:[s.jsx("h2",{className:"text-2xl font-bold mb-6 text-center",children:"Notre Spray Anti-Stress"}),t?s.jsx("div",{className:"flex justify-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}):r.length>0?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-4xl mx-auto",children:r.map(i=>s.jsx(Kr,{product:i},i.id))}):s.jsx("p",{className:"text-center text-muted-foreground py-8",children:"Aucun spray anti-stress disponible actuellement."})]}),s.jsxs("section",{className:"mb-16 bg-muted/30 rounded-2xl p-8",children:[s.jsx("h2",{className:"text-2xl font-bold mb-8 text-center",children:"Pourquoi Choisir Notre Spray Anti-Stress ?"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"bg-background rounded-xl p-6 text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Dx,{className:"w-6 h-6 text-primary"})}),s.jsx("h3",{className:"font-semibold mb-2",children:"Action Rapide"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Absorption sublinguale pour un effet en 15-30 minutes"})]}),s.jsxs("div",{className:"bg-background rounded-xl p-6 text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(ss,{className:"w-6 h-6 text-primary"})}),s.jsx("h3",{className:"font-semibold mb-2",children:"Ashwagandha"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Plante adaptogène reconnue pour ses vertus anti-stress"})]}),s.jsxs("div",{className:"bg-background rounded-xl p-6 text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Iv,{className:"w-6 h-6 text-primary"})}),s.jsx("h3",{className:"font-semibold mb-2",children:"Sans Somnolence"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Restez alerte et concentré tout en étant détendu"})]}),s.jsxs("div",{className:"bg-background rounded-xl p-6 text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Ri,{className:"w-6 h-6 text-primary"})}),s.jsx("h3",{className:"font-semibold mb-2",children:"Dosage Précis"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"4 pulvérisations = 30mg CBD, facile à contrôler"})]}),s.jsxs("div",{className:"bg-background rounded-xl p-6 text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(On,{className:"w-6 h-6 text-primary"})}),s.jsx("h3",{className:"font-semibold mb-2",children:"0% THC"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"100% légal, garanti par analyses laboratoire"})]}),s.jsxs("div",{className:"bg-background rounded-xl p-6 text-center",children:[s.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Eu,{className:"w-6 h-6 text-primary"})}),s.jsx("h3",{className:"font-semibold mb-2",children:"Made in France"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Fabriqué en Bretagne avec des ingrédients naturels"})]})]})]}),s.jsxs("section",{className:"mb-16",children:[s.jsx("h2",{className:"text-2xl font-bold mb-8 text-center",children:"Comment Utiliser le Spray Anti-Stress ?"}),s.jsx("div",{className:"max-w-3xl mx-auto",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"text-center p-4",children:[s.jsx("div",{className:"w-10 h-10 bg-primary text-primary-foreground rounded-full flex items-center justify-center mx-auto mb-3 font-bold",children:"1"}),s.jsx("h3",{className:"font-semibold mb-1",children:"Agitez"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Secouez le flacon avant utilisation"})]}),s.jsxs("div",{className:"text-center p-4",children:[s.jsx("div",{className:"w-10 h-10 bg-primary text-primary-foreground rounded-full flex items-center justify-center mx-auto mb-3 font-bold",children:"2"}),s.jsx("h3",{className:"font-semibold mb-1",children:"Pulvérisez"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"4 pulvérisations sous la langue"})]}),s.jsxs("div",{className:"text-center p-4",children:[s.jsx("div",{className:"w-10 h-10 bg-primary text-primary-foreground rounded-full flex items-center justify-center mx-auto mb-3 font-bold",children:"3"}),s.jsx("h3",{className:"font-semibold mb-1",children:"Attendez"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Gardez 20 secondes sous la langue"})]}),s.jsxs("div",{className:"text-center p-4",children:[s.jsx("div",{className:"w-10 h-10 bg-primary text-primary-foreground rounded-full flex items-center justify-center mx-auto mb-3 font-bold",children:"4"}),s.jsx("h3",{className:"font-semibold mb-1",children:"Relaxez"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Effet ressenti en 15-30 minutes"})]})]})})]}),s.jsxs("section",{className:"mb-16",children:[s.jsx("h2",{className:"text-2xl font-bold mb-8 text-center",children:"Questions Fréquentes sur le Spray Anti-Stress CBD"}),s.jsx("div",{className:"max-w-3xl mx-auto",children:s.jsx(ba,{type:"single",collapsible:!0,className:"w-full",children:pS.map((i,o)=>s.jsxs(Pn,{value:`item-${o}`,children:[s.jsx(In,{className:"text-left",children:i.question}),s.jsx(Fn,{className:"text-muted-foreground",children:i.answer})]},o))})})]}),n.length>0&&s.jsxs("section",{className:"mb-16",children:[s.jsx("h2",{className:"text-2xl font-bold mb-6 text-center",children:"Autres Produits Anti-Stress"}),s.jsx("p",{className:"text-center text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Découvrez notre gamme complète de produits CBD pour la gestion du stress et de l'anxiété."}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-4xl mx-auto",children:n.map(i=>s.jsx(Kr,{product:i},i.id))})]})]})}),s.jsx(it,{})]})},xle=new A9,gle=()=>s.jsx(zU,{children:s.jsx(I9,{client:xle,children:s.jsxs(f9,{children:[s.jsx(KL,{}),s.jsx(SM,{}),s.jsxs(H7,{children:[s.jsxs(L7,{children:[s.jsx(Ae,{path:"/",element:s.jsx(PW,{})}),s.jsx(Ae,{path:"/produits",element:s.jsx(uX,{})}),s.jsx(Ae,{path:"/produits/:category",element:s.jsx(fX,{})}),s.jsx(Ae,{path:"/produit/:slug",element:s.jsx(lX,{})}),s.jsx(Ae,{path:"/huiles-cbd",element:s.jsx(sle,{})}),s.jsx(Ae,{path:"/capsules-cbd",element:s.jsx(ale,{})}),s.jsx(Ae,{path:"/gummies-cbd",element:s.jsx(ole,{})}),s.jsx(Ae,{path:"/granules-cbd",element:s.jsx(cle,{})}),s.jsx(Ae,{path:"/sprays-cbd",element:s.jsx(ule,{})}),s.jsx(Ae,{path:"/shampoings-secs-cbd",element:s.jsx(dle,{})}),s.jsx(Ae,{path:"/shampoing-cbd",element:s.jsx(fle,{})}),s.jsx(Ae,{path:"/huile-cbd-20-pourcent",element:s.jsx(hle,{})}),s.jsx(Ae,{path:"/spray-sommeil-cbd",element:s.jsx(mle,{})}),s.jsx(Ae,{path:"/spray-anti-stress-cbd",element:s.jsx(ple,{})}),s.jsx(Ae,{path:"/panier",element:s.jsx(hX,{})}),s.jsx(Ae,{path:"/commander",element:s.jsx(NQ,{})}),s.jsx(Ae,{path:"/paiement-confirme",element:s.jsx(oJ,{})}),s.jsx(Ae,{path:"/paiement-refuse",element:s.jsx(cJ,{})}),s.jsx(Ae,{path:"/paiement-annule",element:s.jsx(uJ,{})}),s.jsx(Ae,{path:"/paiement-attente",element:s.jsx(dJ,{})}),s.jsx(Ae,{path:"/faq",element:s.jsx(CQ,{})}),s.jsx(Ae,{path:"/cgv",element:s.jsx(SQ,{})}),s.jsx(Ae,{path:"/livraison",element:s.jsx(EQ,{})}),s.jsx(Ae,{path:"/analyses-cbd",element:s.jsx(AQ,{})}),s.jsx(Ae,{path:"/notre-cbd",element:s.jsx(IQ,{})}),s.jsx(Ae,{path:"/notre-marque",element:s.jsx(BQ,{})}),s.jsx(Ae,{path:"/contact",element:s.jsx($Q,{})}),s.jsx(Ae,{path:"/newsletter",element:s.jsx(GQ,{})}),s.jsx(Ae,{path:"/blog",element:s.jsx(XQ,{})}),s.jsx(Ae,{path:"/blog/cbd-mutuelle-remboursement",element:s.jsx(QQ,{})}),s.jsx(Ae,{path:"/blog/cbd-arthrose-chien-chat",element:s.jsx(eJ,{})}),s.jsx(Ae,{path:"/blog/dosage-cbd-guide",element:s.jsx(rJ,{})}),s.jsx(Ae,{path:"/blog/terpenes-cbd-guide",element:s.jsx(aJ,{})}),s.jsx(Ae,{path:"/blog/remboursement-mutuelle-cbd",element:s.jsx(zt,{to:"/blog/cbd-mutuelle-remboursement",replace:!0})}),s.jsx(Ae,{path:"/blog/cbd-arthrose-animaux",element:s.jsx(zt,{to:"/blog/cbd-arthrose-chien-chat",replace:!0})}),s.jsx(Ae,{path:"/blog/dosage-cbd",element:s.jsx(zt,{to:"/blog/dosage-cbd-guide",replace:!0})}),s.jsx(Ae,{path:"/blog/terpenes-cbd",element:s.jsx(zt,{to:"/blog/terpenes-cbd-guide",replace:!0})}),s.jsx(Ae,{path:"/shop",element:s.jsx(zt,{to:"/produits",replace:!0})}),s.jsx(Ae,{path:"/cart",element:s.jsx(zt,{to:"/panier",replace:!0})}),s.jsx(Ae,{path:"/checkout",element:s.jsx(zt,{to:"/commander",replace:!0})}),s.jsx(Ae,{path:"/my-account",element:s.jsx(zt,{to:"/mon-compte",replace:!0})}),s.jsx(Ae,{path:"/product/:slug",element:s.jsx(dS,{})}),s.jsx(Ae,{path:"/produit-cbd/:slug",element:s.jsx(dS,{})}),s.jsx(Ae,{path:"/product-category/:category",element:s.jsx(tle,{})}),s.jsx(Ae,{path:"/terpenes",element:s.jsx(zt,{to:"/blog/terpenes-cbd-guide",replace:!0})}),s.jsx(Ae,{path:"/terpenes-cbd",element:s.jsx(zt,{to:"/blog/terpenes-cbd-guide",replace:!0})}),s.jsx(Ae,{path:"/faq-cbd",element:s.jsx(zt,{to:"/faq",replace:!0})}),s.jsx(Ae,{path:"/la-marque",element:s.jsx(zt,{to:"/notre-marque",replace:!0})}),s.jsx(Ae,{path:"/noto-cbd",element:s.jsx(zt,{to:"/notre-marque",replace:!0})}),s.jsx(Ae,{path:"/storelocator",element:s.jsx(zt,{to:"/contact",replace:!0})}),s.jsx(Ae,{path:"/store-locator",element:s.jsx(zt,{to:"/contact",replace:!0})}),s.jsx(Ae,{path:"/affiliation",element:s.jsx(zt,{to:"/contact",replace:!0})}),s.jsx(Ae,{path:"/cbd-pharmacies",element:s.jsx(zt,{to:"/contact",replace:!0})}),s.jsx(Ae,{path:"/delivery",element:s.jsx(zt,{to:"/livraison",replace:!0})}),s.jsx(Ae,{path:"/cbd-paris",element:s.jsx(zt,{to:"/",replace:!0})}),s.jsx(Ae,{path:"/Contact",element:s.jsx(zt,{to:"/contact",replace:!0})}),s.jsx(Ae,{path:"/Newsletter",element:s.jsx(zt,{to:"/newsletter",replace:!0})}),s.jsx(Ae,{path:"/blackfriday-cbd",element:s.jsx(Xoe,{})}),s.jsx(Ae,{path:"/pour-articulations",element:s.jsx(Qoe,{})}),s.jsx(Ae,{path:"/pour-sommeil",element:s.jsx(Joe,{})}),s.jsx(Ae,{path:"/anti-stress",element:s.jsx(Zoe,{})}),s.jsx(Ae,{path:"/temoignages",element:s.jsx(iJ,{})}),s.jsx(Ae,{path:"/auth",element:s.jsx(EJ,{})}),s.jsx(Ae,{path:"/login",element:s.jsx(zt,{to:"/auth",replace:!0})}),s.jsx(Ae,{path:"/connexion",element:s.jsx(zt,{to:"/auth",replace:!0})}),s.jsx(Ae,{path:"/inscription",element:s.jsx(zt,{to:"/auth",replace:!0})}),s.jsx(Ae,{path:"/mon-compte",element:s.jsx(TJ,{})}),s.jsx(Ae,{path:"/programme-fidelite",element:s.jsx(zoe,{})}),s.jsx(Ae,{path:"/boutique-fidelite",element:s.jsx(Loe,{})}),s.jsx(Ae,{path:"/fidelite",element:s.jsx(zt,{to:"/programme-fidelite",replace:!0})}),s.jsx(Ae,{path:"/admin-login",element:s.jsx(kJ,{})}),s.jsx(Ae,{path:"/admin",element:s.jsx(Ooe,{})}),s.jsx(Ae,{path:"/admin-produits",element:s.jsx(MG,{})}),s.jsx(Ae,{path:"/admin-commandes",element:s.jsx(kY,{})}),s.jsx(Ae,{path:"/admin-emails",element:s.jsx(TY,{})}),s.jsx(Ae,{path:"/admin-subscribers",element:s.jsx(XY,{})}),s.jsx(Ae,{path:"/admin-sms",element:s.jsx(QY,{})}),s.jsx(Ae,{path:"/admin-loyalty",element:s.jsx(Doe,{})}),s.jsx(Ae,{path:"/admin-redemptions",element:s.jsx(Moe,{})}),s.jsx(Ae,{path:"/admin-clients",element:s.jsx(Voe,{})}),s.jsx(Ae,{path:"/admin-api-logs",element:s.jsx(Hoe,{})}),s.jsx(Ae,{path:"/admin-webhooks",element:s.jsx(Koe,{})}),s.jsx(Ae,{path:"/admin-404",element:s.jsx(Yoe,{})}),s.jsx(Ae,{path:"/admin-abandonnees",element:s.jsx(Goe,{})}),s.jsx(Ae,{path:"/import-produits",element:s.jsx(Poe,{})}),s.jsx(Ae,{path:"/import-commandes",element:s.jsx(Ioe,{})}),s.jsx(Ae,{path:"*",element:s.jsx(IW,{})})]}),s.jsx(ele,{})]})]})})}),vle=()=>{console.warn("Sentry DSN not configured. Error tracking disabled.")};vle();Uk(document.getElementById("root")).render(s.jsx(gle,{}));