Jd&&(t.y=1)}function br(e,t){e.min=e.min+t,e.max=e.max+t}function ef(e,t,n,r,i=.5){const s=he(e.min,e.max,i);pu(e,t,n,s,r)}function Cr(e,t){ef(e.x,t.x,t.scaleX,t.scale,t.originX),ef(e.y,t.y,t.scaleY,t.scale,t.originY)}function jy(e,t){return Ey(rS(e.getBoundingClientRect(),t))}function sS(e,t,n){const r=jy(e,n),{scroll:i}=t;return i&&(br(r.x,i.offset.x),br(r.y,i.offset.y)),r}const tf=()=>({translate:0,scale:1,origin:0,originPoint:0}),Er=()=>({x:tf(),y:tf()}),nf=()=>({min:0,max:0}),ve=()=>({x:nf(),y:nf()}),gu={current:null},My={current:!1};function oS(){if(My.current=!0,!!Ec)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gu.current=e.matches;e.addEventListener("change",t),t()}else gu.current=!1}const aS=new WeakMap;function lS(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Le(i))e.addValue(r,i);else if(Le(s))e.addValue(r,zr(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,zr(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const rf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class uS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Wc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=qe.now();this.renderScheduledAtthis.bindToMotionValue(i,r)),My.current||oS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gu.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),_n(this.notifyUpdate),_n(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Xr.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Wr){const n=Wr[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ve()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Pm(r)||bm(r))?r=parseFloat(r):!yk(r)&&Pn.test(n)&&(r=ay(t,n)),this.setBaseTarget(t,Le(r)?r.get():r)),Le(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=th(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Le(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Mc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Gc.render(this.render)}}class Oy extends uS{constructor(){super(...arguments),this.KeyframeResolver=sk}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Dy(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function cS(e){return window.getComputedStyle(e)}class hS extends Oy{constructor(){super(...arguments),this.type="html",this.renderInstance=Dy}readValueFromInstance(t,n){var r;if(Xr.has(n))return(r=this.projection)!=null&&r.isProjecting?ou(n):P1(t,n);{const i=cS(t),s=(Ic(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return jy(t,n)}build(t,n,r){Jc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return nh(t,n,r)}}const Iy=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function dS(e,t,n,r){Dy(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Iy.has(i)?i:rh(i),t.attrs[i])}class fS extends Oy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ve}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xr.has(n)){const r=oy(n);return r&&r.default||0}return n=Iy.has(n)?n:rh(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Py(t,n,r)}build(t,n,r){xy(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){dS(t,n,r,i)}mount(t){this.isSVGTag=Sy(t.tagName),super.mount(t)}}const pS=(e,t)=>eh(e)?new fS(t):new hS(t,{allowProjection:e!==R.Fragment});function Ir(e,t,n){const r=e.getProps();return th(r,t,n!==void 0?n:r.custom,e)}const mu=e=>Array.isArray(e);function gS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zr(n))}function mS(e){return mu(e)?e[e.length-1]||0:e}function yS(e,t){const n=Ir(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=mS(s[o]);gS(e,o,a)}}function vS(e){return!!(Le(e)&&e.add)}function yu(e,t){const n=e.getValue("willChange");if(vS(n))return n.add(t);if(!n&&Jt.WillChange){const r=new Jt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Ly(e){return e.props[Ty]}const wS=e=>e!==null;function xS(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(wS),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const kS={type:"spring",stiffness:500,damping:25,restSpeed:10},SS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_S={type:"keyframes",duration:.8},PS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},TS=(e,{keyframes:t})=>t.length>2?_S:Xr.has(e)?e.startsWith("scale")?SS(t[1]):kS:PS;function bS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}const ih=(e,t,n,r={},i,s)=>o=>{const a=Hc(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Lt(l);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};bS(a)||Object.assign(h,TS(e,h)),h.duration&&(h.duration=Lt(h.duration)),h.repeatDelay&&(h.repeatDelay=Lt(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let d=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(hu(h),h.delay===0&&(d=!0)),(Jt.instantAnimations||Jt.skipAnimations)&&(d=!0,hu(h),h.delay=0),h.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const p=xS(h.keyframes,a);if(p!==void 0){ue.update(()=>{h.onUpdate(p),h.onComplete()});return}}return a.isSync?new zc(h):new G1(h)};function CS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ny(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const h in a){const d=e.getValue(h,e.latestValues[h]??null),p=a[h];if(p===void 0||u&&CS(u,h))continue;const v={delay:n,...Hc(s||{},h)},k=d.get();if(k!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===k&&!v.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const w=Ly(e);if(w){const y=window.MotionHandoffAnimation(w,h,ue);y!==null&&(v.startTime=y,_=!0)}}yu(e,h),d.start(ih(h,d,p,e.shouldReduceMotion&&ry.has(h)?{type:!1}:v,e,_));const b=d.animation;b&&l.push(b)}return o&&Promise.all(l).then(()=>{ue.update(()=>{o&&yS(e,o)})}),l}function $y(e,t,n,r=0,i=1){const s=Array.from(e).sort((u,h)=>u.sortNodePosition(h)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}function vu(e,t,n={}){var l;const r=Ir(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Ny(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:d,staggerDirection:p}=i;return ES(e,t,u,h,d,p,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,h]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>h())}else return Promise.all([s(),o(n.delay)])}function ES(e,t,n=0,r=0,i=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(vu(l,t,{...o,delay:n+(typeof r=="function"?0:r)+$y(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function RS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>vu(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=vu(e,t,n);else{const i=typeof t=="function"?Ir(e,t,n.custom):t;r=Promise.all(Ny(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Fy(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>RS(e,n,r)))}function DS(e){let t=OS(e),n=sf(),r=!0;const i=l=>(u,h)=>{var p;const d=Ir(e,h,l==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(d){const{transition:v,transitionEnd:k,..._}=d;u={...u,..._,...k}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,h=By(e.parent)||{},d=[],p=new Set;let v={},k=1/0;for(let b=0;bk&&c,E=!1;const A=Array.isArray(g)?g:[g];let D=A.reduce(i(w),{});f===!1&&(D={});const{prevResolvedValues:X={}}=y,Q={...X,...D},L=z=>{S=!0,p.has(z)&&(E=!0,p.delete(z)),y.needsAnimating[z]=!0;const M=e.getValue(z);M&&(M.liveStyle=!1)};for(const z in Q){const M=D[z],N=X[z];if(v.hasOwnProperty(z))continue;let T=!1;mu(M)&&mu(N)?T=!Fy(M,N):T=M!==N,T?M!=null?L(z):p.add(z):M!==void 0&&p.has(z)?L(z):y.protectedKeys[z]=!0}y.prevProp=g,y.prevResolvedValues=D,y.isActive&&(v={...v,...D}),r&&e.blockInitialAnimation&&(S=!1);const U=m&&x;S&&(!U||E)&&d.push(...A.map(z=>{const M={type:w};if(typeof z=="string"&&r&&!U&&e.manuallyAnimateOnMount&&e.parent){const{parent:N}=e,T=Ir(N,z);if(N.enteringChildren&&T){const{delayChildren:P}=T.transition||{};M.delay=$y(N.enteringChildren,e,P)}}return{animation:z,options:M}}))}if(p.size){const b={};if(typeof u.initial!="boolean"){const w=Ir(e,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(b.transition=w.transition)}p.forEach(w=>{const y=e.getBaseTarget(w),g=e.getValue(w);g&&(g.liveStyle=!0),b[w]=y??null}),d.push({animation:b})}let _=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(_=!1),r=!1,_?t(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(p=>{var v;return(v=p.animationState)==null?void 0:v.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=sf()}}}function IS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Fy(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sf(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class Rn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class LS extends Rn{constructor(t){super(t),t.animationState||(t.animationState=DS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ta(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let NS=0;class $S extends Rn{constructor(){super(...arguments),this.id=NS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const FS={animation:{Feature:LS},exit:{Feature:$S}};function ns(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ds(e){return{point:{x:e.pageX,y:e.pageY}}}const BS=e=>t=>qc(t)&&e(t,ds(t));function Ei(e,t,n,r){return ns(e,t,BS(n),r)}const Vy=1e-4,VS=1-Vy,US=1+Vy,Uy=.01,zS=0-Uy,WS=0+Uy;function Be(e){return e.max-e.min}function HS(e,t,n){return Math.abs(e-t)<=n}function of(e,t,n,r=.5){e.origin=r,e.originPoint=he(t.min,t.max,e.origin),e.scale=Be(n)/Be(t),e.translate=he(n.min,n.max,e.origin)-e.originPoint,(e.scale>=VS&&e.scale<=US||isNaN(e.scale))&&(e.scale=1),(e.translate>=zS&&e.translate<=WS||isNaN(e.translate))&&(e.translate=0)}function Ri(e,t,n,r){of(e.x,t.x,n.x,r?r.originX:void 0),of(e.y,t.y,n.y,r?r.originY:void 0)}function af(e,t,n){e.min=n.min+t.min,e.max=e.min+Be(t)}function KS(e,t,n){af(e.x,t.x,n.x),af(e.y,t.y,n.y)}function lf(e,t,n){e.min=t.min-n.min,e.max=e.min+Be(t)}function Ai(e,t,n){lf(e.x,t.x,n.x),lf(e.y,t.y,n.y)}function at(e){return[e("x"),e("y")]}const zy=({current:e})=>e?e.ownerDocument.defaultView:null,uf=(e,t)=>Math.abs(e-t);function GS(e,t){const n=uf(e.x,t.x),r=uf(e.y,t.y);return Math.sqrt(n**2+r**2)}class Wy{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Ha(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,k=GS(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!k)return;const{point:_}=p,{timestamp:b}=Ae;this.history.push({..._,timestamp:b});const{onStart:w,onMove:y}=this.handlers;v||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Wa(v,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:k,onSessionEnd:_,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Ha(p.type==="pointercancel"?this.lastMoveEventInfo:Wa(v,this.transformPagePoint),this.history);this.startEvent&&k&&k(p,w),_&&_(p,w)},!qc(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const a=ds(t),l=Wa(a,this.transformPagePoint),{point:u}=l,{timestamp:h}=Ae;this.history=[{...u,timestamp:h}];const{onSessionStart:d}=n;d&&d(t,Ha(l,this.history)),this.removeListeners=us(Ei(this.contextWindow,"pointermove",this.handlePointerMove),Ei(this.contextWindow,"pointerup",this.handlePointerUp),Ei(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_n(this.updatePoint)}}function Wa(e,t){return t?{point:t(e.point)}:e}function cf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ha({point:e},t){return{point:e,delta:cf(e,Hy(t)),offset:cf(e,qS(t)),velocity:YS(t,.1)}}function qS(e){return e[0]}function Hy(e){return e[e.length-1]}function YS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Hy(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Lt(t)));)n--;if(!r)return{x:0,y:0};const s=ht(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function QS(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?he(n,e,r.max):Math.min(e,n)),e}function hf(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function XS(e,{top:t,left:n,bottom:r,right:i}){return{x:hf(e.x,n,i),y:hf(e.y,t,r)}}function df(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Xi(t.min,t.max-r,e.min):r>i&&(n=Xi(e.min,e.max-i,t.min)),Xt(0,1,n)}function e_(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const wu=.35;function t_(e=wu){return e===!1?e=0:e===!0&&(e=wu),{x:ff(e,"left","right"),y:ff(e,"top","bottom")}}function ff(e,t,n){return{min:pf(e,t),max:pf(e,n)}}function pf(e,t){return typeof e=="number"?e:e[t]||0}const n_=new WeakMap;class r_{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ve(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ds(d).point)},o=(d,p)=>{const{drag:v,dragPropagation:k,onDragStart:_}=this.getProps();if(v&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=uk(v),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),at(w=>{let y=this.getAxisMotionValue(w).get()||0;if(Nt.test(y)){const{projection:g}=this.visualElement;if(g&&g.layout){const c=g.layout.layoutBox[w];c&&(y=Be(c)*(parseFloat(y)/100))}}this.originPoint[w]=y}),_&&ue.postRender(()=>_(d,p)),yu(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p;const{dragPropagation:v,dragDirectionLock:k,onDirectionLock:_,onDrag:b}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:w}=p;if(k&&this.currentDirection===null){this.currentDirection=i_(w),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",p.point,w),this.updateAxis("y",p.point,w),this.visualElement.render(),b&&b(d,p)},l=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p,this.stop(d,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>at(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)==null?void 0:p.play())}),{dragSnapToOrigin:h}=this.getProps();this.panSession=new Wy(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:zy(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ue.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ns(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=QS(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Tr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=XS(r.layoutBox,t):this.constraints=!1,this.elastic=t_(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&at(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=e_(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Tr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=sS(r,i.root,this.visualElement.getTransformPagePoint());let o=JS(i.layout.layoutBox,s);if(n){const a=n(nS(o));this.hasMutatedConstraints=!!a,a&&(o=Ey(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=at(h=>{if(!Ns(h,n,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=i?200:1e6,v=i?40:1e7,k={type:"inertia",velocity:r?t[h]:0,bounceStiffness:p,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,k)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return yu(this.visualElement,t),r.start(ih(t,r,0,n,this.visualElement,!1))}stopAnimation(){at(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){at(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){at(n=>{const{drag:r}=this.getProps();if(!Ns(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-he(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Tr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};at(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=ZS({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),at(o=>{if(!Ns(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(he(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;n_.set(this.visualElement,this);const t=this.visualElement.current,n=Ei(t,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Tr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ue.read(r);const o=ns(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(at(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=wu,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ns(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function i_(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class s_ extends Rn{constructor(t){super(t),this.removeGroupControls=ft,this.removeListeners=ft,this.controls=new r_(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ft}unmount(){this.removeGroupControls(),this.removeListeners()}}const gf=e=>(t,n)=>{e&&ue.postRender(()=>e(t,n))};class o_ extends Rn{constructor(){super(...arguments),this.removePointerDownListener=ft}onPointerDown(t){this.session=new Wy(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zy(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:gf(t),onStart:gf(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&ue.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ei(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ro={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mf(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const li={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=mf(e,t.target.x),r=mf(e,t.target.y);return`${n}% ${r}%`}},a_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Pn.parse(e);if(i.length>5)return r;const s=Pn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=he(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};let Ka=!1;class l_ extends R.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Ak(u_),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),Ka&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ro.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,Ka=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ue.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Gc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Ka=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ky(e){const[t,n]=py(),r=R.useContext(bc);return C.jsx(l_,{...e,layoutGroup:r,switchLayoutGroup:R.useContext(by),isPresent:t,safeToRemove:n})}const u_={borderRadius:{...li,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:li,borderTopRightRadius:li,borderBottomLeftRadius:li,borderBottomRightRadius:li,boxShadow:a_};function c_(e,t,n){const r=Le(e)?e:zr(e);return r.start(ih("",r,t,n)),r.animation}const h_=(e,t)=>e.depth-t.depth;class d_{constructor(){this.children=[],this.isDirty=!1}add(t){Rc(this.children,t),this.isDirty=!0}remove(t){Ac(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(h_),this.isDirty=!1,this.children.forEach(t)}}function f_(e,t){const n=qe.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(_n(r),e(s-t))};return ue.setup(r,!0),()=>_n(r)}const Gy=["TopLeft","TopRight","BottomLeft","BottomRight"],p_=Gy.length,yf=e=>typeof e=="string"?parseFloat(e):e,vf=e=>typeof e=="number"||B.test(e);function g_(e,t,n,r,i,s){i?(e.opacity=he(0,n.opacity??1,m_(r)),e.opacityExit=he(t.opacity??1,0,y_(r))):s&&(e.opacity=he(t.opacity??1,n.opacity??1,r));for(let o=0;ort?1:n(Xi(e,t,r))}function xf(e,t){e.min=t.min,e.max=t.max}function ot(e,t){xf(e.x,t.x),xf(e.y,t.y)}function kf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sf(e,t,n,r,i){return e-=t,e=Do(e,1/n,r),i!==void 0&&(e=Do(e,1/i,r)),e}function v_(e,t=0,n=1,r=.5,i,s=e,o=e){if(Nt.test(t)&&(t=parseFloat(t),t=he(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=he(s.min,s.max,r);e===s&&(a-=t),e.min=Sf(e.min,t,n,a,i),e.max=Sf(e.max,t,n,a,i)}function _f(e,t,[n,r,i],s,o){v_(e,t[n],t[r],t[i],t.scale,s,o)}const w_=["x","scaleX","originX"],x_=["y","scaleY","originY"];function Pf(e,t,n,r){_f(e.x,t,w_,n?n.x:void 0,r?r.x:void 0),_f(e.y,t,x_,n?n.y:void 0,r?r.y:void 0)}function Tf(e){return e.translate===0&&e.scale===1}function Yy(e){return Tf(e.x)&&Tf(e.y)}function bf(e,t){return e.min===t.min&&e.max===t.max}function k_(e,t){return bf(e.x,t.x)&&bf(e.y,t.y)}function Cf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Qy(e,t){return Cf(e.x,t.x)&&Cf(e.y,t.y)}function Ef(e){return Be(e.x)/Be(e.y)}function Rf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class S_{constructor(){this.members=[]}add(t){Rc(this.members,t),t.scheduleRender()}remove(t){if(Ac(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function __(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:h,rotateX:d,rotateY:p,skewX:v,skewY:k}=n;u&&(r=`perspective(${u}px) ${r}`),h&&(r+=`rotate(${h}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),v&&(r+=`skewX(${v}deg) `),k&&(r+=`skewY(${k}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Ga=["","X","Y","Z"],P_=1e3;let T_=0;function qa(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Xy(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ly(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Xy(r)}function Jy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=T_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(E_),this.nodes.forEach(M_),this.nodes.forEach(O_),this.nodes.forEach(R_)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;ue.read(()=>{d=window.innerWidth}),e(o,()=>{const v=window.innerWidth;v!==d&&(d=v,this.root.updateBlockedByResize=!0,h&&h(),h=f_(p,250),ro.hasAnimatedSinceResize&&(ro.hasAnimatedSinceResize=!1,this.nodes.forEach(Mf)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||u.getDefaultTransition()||$_,{onLayoutAnimationStart:_,onLayoutAnimationComplete:b}=u.getProps(),w=!this.targetLayout||!Qy(this.targetLayout,v),y=!d&&p;if(this.options.layoutRoot||this.resumeFrom||y||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const g={...Hc(k,"layout"),onPlay:_,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(g.delay=0,g.type=!1),this.startAnimation(g),this.setAnimationOrigin(h,y)}else d||Mf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_n(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(D_),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Xy(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Be(this.snapshot.measuredBox.x)&&!Be(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const f=c/1e3;Of(d.x,o.x,f),Of(d.y,o.y,f),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ai(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),L_(this.relativeTarget,this.relativeTargetOrigin,p,f),g&&k_(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=ve()),ot(g,this.relativeTarget)),_&&(this.animationValues=h,g_(h,u,this.latestValues,f,y,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=f},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(_n(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{ro.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zr(0)),this.currentAnimation=c_(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),o.onUpdate&&o.onUpdate(h)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(P_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:h}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Zy(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ve();const d=Be(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=Be(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}ot(a,l),Cr(a,h),Ri(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new S_),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&qa("z",o,u,this.animationValues);for(let h=0;h{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Af),this.root.sharedNodes.clear()}}}function b_(e){e.updateLayout()}function C_(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?at(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Be(p);p.min=r[d].min,p.max=p.min+v}):Zy(s,t.layoutBox,r)&&at(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Be(r[d]);p.max=p.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+v)});const a=Er();Ri(a,r,t.layoutBox);const l=Er();o?Ri(l,e.applyTransform(i,!0),t.measuredBox):Ri(l,r,t.layoutBox);const u=!Yy(a);let h=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:v}=d;if(p&&v){const k=ve();Ai(k,t.layoutBox,p.layoutBox);const _=ve();Ai(_,r,v.layoutBox),Qy(k,_)||(h=!0),d.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=k,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function E_(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function R_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function A_(e){e.clearSnapshot()}function Af(e){e.clearMeasurements()}function jf(e){e.isLayoutDirty=!1}function j_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function M_(e){e.resolveTargetDelta()}function O_(e){e.calcProjection()}function D_(e){e.resetSkewAndRotation()}function I_(e){e.removeLeadSnapshot()}function Of(e,t,n){e.translate=he(t.translate,0,n),e.scale=he(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Df(e,t,n,r){e.min=he(t.min,n.min,r),e.max=he(t.max,n.max,r)}function L_(e,t,n,r){Df(e.x,t.x,n.x,r),Df(e.y,t.y,n.y,r)}function N_(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $_={duration:.45,ease:[.4,0,.1,1]},If=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lf=If("applewebkit/")&&!If("chrome/")?Math.round:ft;function Nf(e){e.min=Lf(e.min),e.max=Lf(e.max)}function F_(e){Nf(e.x),Nf(e.y)}function Zy(e,t,n){return e==="position"||e==="preserve-aspect"&&!HS(Ef(t),Ef(n),.2)}function B_(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const V_=Jy({attachResizeListener:(e,t)=>ns(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ya={current:void 0},e0=Jy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ya.current){const e=new V_({});e.mount(window),e.setOptions({layoutScroll:!0}),Ya.current=e}return Ya.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),U_={pan:{Feature:o_},drag:{Feature:s_,ProjectionNode:e0,MeasureLayout:Ky}};function $f(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ue.postRender(()=>s(t,ds(t)))}class z_ extends Rn{mount(){const{current:t}=this.node;t&&(this.unmount=ck(t,(n,r)=>($f(this.node,r,"Start"),i=>$f(this.node,i,"End"))))}unmount(){}}class W_ extends Rn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=us(ns(this.node.current,"focus",()=>this.onFocus()),ns(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ff(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ue.postRender(()=>s(t,ds(t)))}class H_ extends Rn{mount(){const{current:t}=this.node;t&&(this.unmount=pk(t,(n,r)=>(Ff(this.node,r,"Start"),(i,{success:s})=>Ff(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const xu=new WeakMap,Qa=new WeakMap,K_=e=>{const t=xu.get(e.target);t&&t(e)},G_=e=>{e.forEach(K_)};function q_({root:e,...t}){const n=e||document;Qa.has(n)||Qa.set(n,{});const r=Qa.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(G_,{root:e,...t})),r[i]}function Y_(e,t,n){const r=q_(t);return xu.set(e,n),r.observe(e),()=>{xu.delete(e),r.unobserve(e)}}const Q_={some:0,all:1};class X_ extends Rn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Q_[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=u?h:d;p&&p(l)};return Y_(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(J_(t,n))&&this.startObserver()}unmount(){}}function J_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Z_={inView:{Feature:X_},tap:{Feature:H_},focus:{Feature:W_},hover:{Feature:z_}},eP={layout:{ProjectionNode:e0,MeasureLayout:Ky}},tP={...FS,...Z_,...U_,...eP},Ft=tS(tP,pS);function t0({code:e,language:t="rust"}){const n=R.useMemo(()=>e.split(`
+`).map((i,s)=>({number:s+1,code:nP(i)})),[e]);return C.jsx("pre",{className:"text-sm overflow-x-auto bg-zinc-900 rounded-lg p-2",style:{fontFamily:"'Fira Code', Fira Code, 'Courier New', monospace"},children:C.jsx("code",{className:"block",children:n.map(r=>C.jsxs("div",{className:"flex",children:[C.jsx("span",{className:"inline-block w-8 text-right pr-4 text-zinc-500 select-none flex-shrink-0 py-0 leading-relaxed",children:r.number}),C.jsx("span",{className:"flex-1 py-0 leading-relaxed",dangerouslySetInnerHTML:{__html:r.code}})]},r.number))})})}function nP(e){const t=["use","async","await","fn","let","mut","return","if","else","match","while","for","loop","break","continue","impl","trait","struct","enum","pub","mod","const","static","type","where","unsafe","extern","crate","move","as","ref","in","self","Self"],n=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","bool","char","str","String","Vec","Option","Result","Box","Rc","Arc","HashMap","HashSet","BTreeMap","BTreeSet","Ok","Err","Some","None","Client","PublicKey","ListBuilder","anyhow"],r=["println!","print!","vec!","format!","panic!","assert!","tokio::main"];let i=e;return i=i.replace(/&/g,"&").replace(//g,">"),i=i.replace(/"([^"\\]*(\\.[^"\\]*)*)"/g,'"$1"'),i=i.replace(/\/\/.*/g,'$&'),i=i.replace(/\/\*[\s\S]*?\*\//g,'$&'),i=i.replace(/\b(\d+\.?\d*|\.\d+)\b/g,'$1'),t.forEach(s=>{const o=new RegExp(`\\b${s}\\b`,"g");i=i.replace(o,`${s}`)}),n.forEach(s=>{const o=new RegExp(`\\b${s}\\b`,"g");i=i.replace(o,`${s}`)}),r.forEach(s=>{const o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(o,"g");i=i.replace(a,`${s}`)}),i=i.replace(/#\[([^\]]+)\]/g,'#[$1]'),i=i.replace(/\b([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/g,'$1('),i=i.replace(/(\?|&|\||->|=>|::)/g,'$1'),`${i}`}const rP="modulepreload",iP=function(e){return"/"+e},Bf={},fs=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=iP(l),l in Bf)return;Bf[l]=!0;const u=l.endsWith(".css"),h=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${h}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":rP,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((p,v)=>{d.addEventListener("load",p),d.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},sP=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>fs(async()=>{const{default:r}=await Promise.resolve().then(()=>Jr);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class sh extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class oP extends sh{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Vf extends sh{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Uf extends sh{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var ku;(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"})(ku||(ku={}));var aP=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class lP{constructor(t,{headers:n={},customFetch:r,region:i=ku.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=sP(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return aP(this,void 0,void 0,function*(){try{const{headers:i,method:s,body:o}=n;let a={},{region:l}=n;l||(l=this.region);const u=new URL(`${this.url}/${t}`);l&&l!=="any"&&(a["x-region"]=l,u.searchParams.set("forceFunctionRegion",l));let h;o&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",h=o):typeof o=="string"?(a["Content-Type"]="text/plain",h=o):typeof FormData<"u"&&o instanceof FormData?h=o:(a["Content-Type"]="application/json",h=JSON.stringify(o)));const d=yield this.fetch(u.toString(),{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),i),body:h}).catch(_=>{throw new oP(_)}),p=d.headers.get("x-relay-error");if(p&&p==="true")throw new Vf(d);if(!d.ok)throw new Uf(d);let v=((r=d.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),k;return v==="application/json"?k=yield d.json():v==="application/octet-stream"?k=yield d.blob():v==="text/event-stream"?k=d:v==="multipart/form-data"?k=yield d.formData():k=yield d.text(),{data:k,error:null,response:d}}catch(i){return{data:null,error:i,response:i instanceof Uf||i instanceof Vf?i.context:void 0}}})}}var Ke={},oh={},ra={},ps={},ia={},sa={},uP=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Hr=uP();const cP=Hr.fetch,n0=Hr.fetch.bind(Hr),r0=Hr.Headers,hP=Hr.Request,dP=Hr.Response,Jr=Object.freeze(Object.defineProperty({__proto__:null,Headers:r0,Request:hP,Response:dP,default:n0,fetch:cP},Symbol.toStringTag,{value:"Module"})),fP=L0(Jr);var oa={};Object.defineProperty(oa,"__esModule",{value:!0});let pP=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}};oa.default=pP;var i0=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sa,"__esModule",{value:!0});const gP=i0(fP),mP=i0(oa);let yP=class{constructor(t){var n,r;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(n=t.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=gP.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=new Headers(this.headers),this.headers.set(t,n),this}then(t,n){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 r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s=>{var o,a,l,u;let h=null,d=null,p=null,v=s.status,k=s.statusText;if(s.ok){if(this.method!=="HEAD"){const y=await s.text();y===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((o=this.headers.get("Accept"))===null||o===void 0)&&o.includes("application/vnd.pgrst.plan+text"))?d=y:d=JSON.parse(y))}const b=(a=this.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),w=(l=s.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");b&&w&&w.length>1&&(p=parseInt(w[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(h={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,p=null,v=406,k="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const b=await s.text();try{h=JSON.parse(b),Array.isArray(h)&&s.status===404&&(d=[],h=null,v=200,k="OK")}catch{s.status===404&&b===""?(v=204,k="No Content"):h={message:b}}if(h&&this.isMaybeSingle&&(!((u=h==null?void 0:h.details)===null||u===void 0)&&u.includes("0 rows"))&&(h=null,v=200,k="OK"),h&&this.shouldThrowOnError)throw new mP.default(h)}return{error:h,data:d,count:p,status:v,statusText:k}});return this.shouldThrowOnError||(i=i.catch(s=>{var o,a,l;return{error:{message:`${(o=s==null?void 0:s.name)!==null&&o!==void 0?o:"FetchError"}: ${s==null?void 0:s.message}`,details:`${(a=s==null?void 0:s.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=s==null?void 0:s.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),i.then(t,n)}returns(){return this}overrideTypes(){return this}};sa.default=yP;var vP=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ia,"__esModule",{value:!0});const wP=vP(sa);let xP=class extends wP.default{select(t){let n=!1;const r=(t??"*").split("").map(i=>/\s/.test(i)&&!n?"":(i==='"'&&(n=!n),i)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:i,referencedTable:s=i}={}){const o=s?`${s}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:i=r}={}){const s=typeof i>"u"?"offset":`${i}.offset`,o=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(o,`${n-t+1}`),this}abortSignal(t){return this.signal=t,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:t=!1,verbose:n=!1,settings:r=!1,buffers:i=!1,wal:s=!1,format:o="text"}={}){var a;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,i?"buffers":null,s?"wal":null].filter(Boolean).join("|"),u=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${u}"; options=${l};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};ia.default=xP;var kP=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ps,"__esModule",{value:!0});const SP=kP(ia);let _P=class extends SP.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:i}={}){let s="";i==="plain"?s="pl":i==="phrase"?s="ph":i==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${o}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const i=r?`${r}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};ps.default=_P;var PP=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ra,"__esModule",{value:!0});const ui=PP(ps);let TP=class{constructor(t,{headers:n={},schema:r,fetch:i}){this.url=t,this.headers=new Headers(n),this.schema=r,this.fetch=i}select(t,{head:n=!1,count:r}={}){const i=n?"HEAD":"GET";let s=!1;const o=(t??"*").split("").map(a=>/\s/.test(a)&&!s?"":(a==='"'&&(s=!s),a)).join("");return this.url.searchParams.set("select",o),r&&this.headers.append("Prefer",`count=${r}`),new ui.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(t,{count:n,defaultToNull:r=!0}={}){var i;const s="POST";if(n&&this.headers.append("Prefer",`count=${n}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const o=t.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new ui.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:i,defaultToNull:s=!0}={}){var o;const a="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),n!==void 0&&this.url.searchParams.set("on_conflict",n),i&&this.headers.append("Prefer",`count=${i}`),s||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const l=t.reduce((u,h)=>u.concat(Object.keys(h)),[]);if(l.length>0){const u=[...new Set(l)].map(h=>`"${h}"`);this.url.searchParams.set("columns",u.join(","))}}return new ui.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(t,{count:n}={}){var r;const i="PATCH";return n&&this.headers.append("Prefer",`count=${n}`),new ui.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:t}={}){var n;const r="DELETE";return t&&this.headers.append("Prefer",`count=${t}`),new ui.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}};ra.default=TP;var s0=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oh,"__esModule",{value:!0});const bP=s0(ra),CP=s0(ps);let EP=class o0{constructor(t,{headers:n={},schema:r,fetch:i}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.fetch=i}from(t){const n=new URL(`${this.url}/${t}`);return new bP.default(n,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new o0(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:i=!1,count:s}={}){var o;let a;const l=new URL(`${this.url}/rpc/${t}`);let u;r||i?(a=r?"HEAD":"GET",Object.entries(n).filter(([d,p])=>p!==void 0).map(([d,p])=>[d,Array.isArray(p)?`{${p.join(",")}}`:`${p}`]).forEach(([d,p])=>{l.searchParams.append(d,p)})):(a="POST",u=n);const h=new Headers(this.headers);return s&&h.set("Prefer",`count=${s}`),new CP.default({method:a,url:l,headers:h,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};oh.default=EP;var Zr=tt&&tt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.PostgrestError=Ke.PostgrestBuilder=Ke.PostgrestTransformBuilder=Ke.PostgrestFilterBuilder=Ke.PostgrestQueryBuilder=Ke.PostgrestClient=void 0;const a0=Zr(oh);Ke.PostgrestClient=a0.default;const l0=Zr(ra);Ke.PostgrestQueryBuilder=l0.default;const u0=Zr(ps);Ke.PostgrestFilterBuilder=u0.default;const c0=Zr(ia);Ke.PostgrestTransformBuilder=c0.default;const h0=Zr(sa);Ke.PostgrestBuilder=h0.default;const d0=Zr(oa);Ke.PostgrestError=d0.default;var RP=Ke.default={PostgrestClient:a0.default,PostgrestQueryBuilder:l0.default,PostgrestFilterBuilder:u0.default,PostgrestTransformBuilder:c0.default,PostgrestBuilder:h0.default,PostgrestError:d0.default};const{PostgrestClient:AP,PostgrestQueryBuilder:Ub,PostgrestFilterBuilder:zb,PostgrestTransformBuilder:Wb,PostgrestBuilder:Hb,PostgrestError:Kb}=RP;class jP{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 n=process.versions;if(n&&n.node){const r=n.node,i=parseInt(r.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} 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 n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
+
+Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const MP="2.15.5",OP=`realtime-js/${MP}`,DP="1.0.0",Su=1e4,IP=1e3,LP=100;var ji;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(ji||(ji={}));var Se;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Se||(Se={}));var _t;(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"})(_t||(_t={}));var _u;(function(e){e.websocket="websocket"})(_u||(_u={}));var Bn;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Bn||(Bn={}));class NP{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const i=n.getUint8(1),s=n.getUint8(2);let o=this.HEADER_LENGTH+2;const a=r.decode(t.slice(o,o+i));o=o+i;const l=r.decode(t.slice(o,o+s));o=o+s;const u=JSON.parse(r.decode(t.slice(o,t.byteLength)));return{ref:null,topic:a,event:l,payload:u}}}class f0{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}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 re;(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"})(re||(re={}));const zf=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((s,o)=>(s[o]=$P(o,e,t,i),s),{})},$P=(e,t,n,r)=>{const i=t.find(a=>a.name===e),s=i==null?void 0:i.type,o=n[e];return s&&!r.includes(s)?p0(s,o):Pu(o)},p0=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return UP(t,n)}switch(e){case re.bool:return FP(t);case re.float4:case re.float8:case re.int2:case re.int4:case re.int8:case re.numeric:case re.oid:return BP(t);case re.json:case re.jsonb:return VP(t);case re.timestamp:return zP(t);case re.abstime:case re.date:case re.daterange:case re.int4range:case re.int8range:case re.money:case re.reltime:case re.text:case re.time:case re.timestamptz:case re.timetz:case re.tsrange:case re.tstzrange:return Pu(t);default:return Pu(t)}},Pu=e=>e,FP=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},BP=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},VP=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},UP=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let s;const o=e.slice(1,n);try{s=JSON.parse("["+o+"]")}catch{s=o?o.split(","):[]}return s.map(a=>p0(t,a))}return e},zP=e=>typeof e=="string"?e.replace(" ","T"):e,g0=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")+"/api/broadcast"};class Xa{constructor(t,n,r={},i=Su){this.channel=t,this.event=n,this.payload=r,this.timeout=i,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,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}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:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Wf;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Wf||(Wf={}));class Mi{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Mi.syncState(this.state,i,s,o),this.pendingDiffs.forEach(l=>{this.state=Mi.syncDiff(this.state,l,s,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},i=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Mi.syncDiff(this.state,i,s,o),a())}),this.onJoin((i,s,o)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:s,newPresences:o})}),this.onLeave((i,s,o)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:s,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const s=this.cloneDeep(t),o=this.transformState(n),a={},l={};return this.map(s,(u,h)=>{o[u]||(l[u]=h)}),this.map(o,(u,h)=>{const d=s[u];if(d){const p=h.map(b=>b.presence_ref),v=d.map(b=>b.presence_ref),k=h.filter(b=>v.indexOf(b.presence_ref)<0),_=d.filter(b=>p.indexOf(b.presence_ref)<0);k.length>0&&(a[u]=k),_.length>0&&(l[u]=_)}else a[u]=h}),this.syncDiff(s,{joins:a,leaves:l},r,i)}static syncDiff(t,n,r,i){const{joins:s,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(s,(a,l)=>{var u;const h=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),h.length>0){const d=t[a].map(v=>v.presence_ref),p=h.filter(v=>d.indexOf(v.presence_ref)<0);t[a].unshift(...p)}r(a,h,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;const h=l.map(d=>d.presence_ref);u=u.filter(d=>h.indexOf(d.presence_ref)<0),t[a]=u,i(a,u,l),u.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):n[r]=i,n},{})}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 Hf;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Hf||(Hf={}));var Oi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Oi||(Oi={}));var Ut;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Ut||(Ut={}));class ah{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Se.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},n.config),this.timeout=this.socket.timeout,this.joinPush=new Xa(this,_t.join,this.params,this.timeout),this.rejoinTimer=new f0(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Se.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Se.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this._on(_t.reply,{},(i,s)=>{this._trigger(this._replyEventName(s),i)}),this.presence=new Mi(this),this.broadcastEndpointURL=g0(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var r,i,s;if(this.socket.isConnected()||this.socket.connect(),this.state==Se.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(v=>v.filter))!==null&&i!==void 0?i:[],h=!!this.bindings[Oi.PRESENCE]&&this.bindings[Oi.PRESENCE].length>0||((s=this.params.config.presence)===null||s===void 0?void 0:s.enabled)===!0,d={},p={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:h}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(v=>t==null?void 0:t(Ut.CHANNEL_ERROR,v)),this._onClose(()=>t==null?void 0:t(Ut.CLOSED)),this.updateJoinPayload(Object.assign({config:p},d)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:v})=>{var k;if(this.socket.setAuth(),v===void 0){t==null||t(Ut.SUBSCRIBED);return}else{const _=this.bindings.postgres_changes,b=(k=_==null?void 0:_.length)!==null&&k!==void 0?k:0,w=[];for(let y=0;y{this.state=Se.errored,t==null||t(Ut.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(v).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Ut.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===Se.joined&&t===Oi.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,n,r)}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){const{event:s,payload:o}=t,l={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:s,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var o,a,l;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Se.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(_t.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(i=>{r=new Xa(this,_t.leave,{},t),r.receive("ok",()=>{n(),i("ok")}).receive("timeout",()=>{n(),i("timed out")}).receive("error",()=>{i("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Se.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const i=new AbortController,s=setTimeout(()=>i.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(s),o}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new Xa(this,t,n,r);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>LP){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,s;const o=t.toLocaleLowerCase(),{close:a,error:l,leave:u,join:h}=_t;if(r&&[a,l,u,h].indexOf(o)>=0&&r!==this._joinRef())return;let p=this._onMessage(o,n,r);if(n&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(v=>{var k,_,b;return((k=v.filter)===null||k===void 0?void 0:k.event)==="*"||((b=(_=v.filter)===null||_===void 0?void 0:_.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===o}).map(v=>v.callback(p,r)):(s=this.bindings[o])===null||s===void 0||s.filter(v=>{var k,_,b,w,y,g;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in v){const c=v.id,f=(k=v.filter)===null||k===void 0?void 0:k.event;return c&&((_=n.ids)===null||_===void 0?void 0:_.includes(c))&&(f==="*"||(f==null?void 0:f.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const c=(y=(w=v==null?void 0:v.filter)===null||w===void 0?void 0:w.event)===null||y===void 0?void 0:y.toLocaleLowerCase();return c==="*"||c===((g=n==null?void 0:n.event)===null||g===void 0?void 0:g.toLocaleLowerCase())}else return v.type.toLocaleLowerCase()===o}).map(v=>{if(typeof p=="object"&&"ids"in p){const k=p.data,{schema:_,table:b,commit_timestamp:w,type:y,errors:g}=k;p=Object.assign(Object.assign({},{schema:_,table:b,commit_timestamp:w,eventType:y,new:{},old:{},errors:g}),this._getPayloadRecords(k))}v.callback(p,r)})}_isClosed(){return this.state===Se.closed}_isJoined(){return this.state===Se.joined}_isJoining(){return this.state===Se.joining}_isLeaving(){return this.state===Se.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),s={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(i=>{var s;return!(((s=i.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===r&&ah.isEqual(i.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(_t.close,{},t)}_onError(t){this._on(_t.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Se.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=zf(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=zf(t.columns,t.old_record)),n}}const Ja=()=>{},$s={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},WP=[1e3,2e3,5e3,1e4],HP=1e4,KP=`
+ addEventListener("message", (e) => {
+ if (e.data.event === "start") {
+ setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
+ }
+ });`;class GP{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Su,this.transport=null,this.heartbeatIntervalMs=$s.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Ja,this.ref=0,this.reconnectTimer=null,this.logger=Ja,this.conn=null,this.sendBuffer=[],this.serializer=new NP,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=i=>{let s;return i?s=i:typeof fetch>"u"?s=(...o)=>fs(async()=>{const{default:a}=await Promise.resolve().then(()=>Jr);return{default:a}},void 0).then(({default:a})=>a(...o)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):s=fetch,(...o)=>s(...o)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${_u.websocket}`,this.httpEndpoint=g0(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.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=jP.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
+
+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: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:DP}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},t?this.conn.close(t,n??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case ji.connecting:return Bn.Connecting;case ji.open:return Bn.Open;case ji.closing:return Bn.Closing;default:return Bn.Closed}}isConnected(){return this.connectionState()===Bn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,i=this.getChannels().find(s=>s.topic===r);if(i)return i;{const s=new ah(`realtime:${t}`,n,this);return this.channels.push(s),s}}push(t){const{topic:n,event:r,payload:i,ref:s}=t,o=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${s})`,i),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(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(IP,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},$s.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}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 n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply")try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:i,payload:s,ref:o}=n,a=o?`(${o})`:"",l=s.status||"";this.log("receive",`${l} ${r} ${i} ${a}`.trim(),s),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(i,s,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.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=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.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(_t.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([KP],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n;t?n=t:this.accessToken?n=await this.accessToken():n=this.accessTokenValue,this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const i={access_token:n,version:OP};n&&r.updateJoinPayload(i),r.joinedOnce&&r._isJoined()&&r._push(_t.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(n=>{this.log("error",`error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new f0(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},$s.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,i,s,o,a,l,u,h;if(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:Su,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:$s.HEARTBEAT_INTERVAL,this.worker=(s=t==null?void 0:t.worker)!==null&&s!==void 0?s:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:Ja,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=(l=t==null?void 0:t.reconnectAfterMs)!==null&&l!==void 0?l:d=>WP[d-1]||HP,this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(d,p)=>p(JSON.stringify(d)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h: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 lh extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function _e(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class qP extends lh{constructor(t,n,r){super(t),this.name="StorageApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Tu extends lh{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var YP=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const m0=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>fs(async()=>{const{default:r}=await Promise.resolve().then(()=>Jr);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},QP=()=>YP(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield fs(()=>Promise.resolve().then(()=>Jr),void 0)).Response:Response}),bu=e=>{if(Array.isArray(e))return e.map(n=>bu(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[i]=bu(r)}),t},XP=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)};var rr=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const Za=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),JP=(e,t,n)=>rr(void 0,void 0,void 0,function*(){const r=yield QP();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(i=>{const s=e.status||500,o=(i==null?void 0:i.statusCode)||s+"";t(new qP(Za(i),s,o))}).catch(i=>{t(new Tu(Za(i),i))}):t(new Tu(Za(e),e))}),ZP=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!r?i:(XP(r)?(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r)):i.body=r,t!=null&&t.duplex&&(i.duplex=t.duplex),Object.assign(Object.assign({},i),n))};function gs(e,t,n,r,i,s){return rr(this,void 0,void 0,function*(){return new Promise((o,a)=>{e(n,ZP(t,r,i,s)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>JP(l,a,r))})})}function Io(e,t,n,r){return rr(this,void 0,void 0,function*(){return gs(e,"GET",t,n,r)})}function Mt(e,t,n,r,i){return rr(this,void 0,void 0,function*(){return gs(e,"POST",t,r,i,n)})}function Cu(e,t,n,r,i){return rr(this,void 0,void 0,function*(){return gs(e,"PUT",t,r,i,n)})}function eT(e,t,n,r){return rr(this,void 0,void 0,function*(){return gs(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function y0(e,t,n,r,i){return rr(this,void 0,void 0,function*(){return gs(e,"DELETE",t,r,i,n)})}var $e=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const tT={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Kf={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class nT{constructor(t,n={},r,i){this.shouldThrowOnError=!1,this.url=t,this.headers=n,this.bucketId=r,this.fetch=m0(i)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,n,r,i){return $e(this,void 0,void 0,function*(){try{let s;const o=Object.assign(Object.assign({},Kf),i);let a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(s=new FormData,s.append("cacheControl",o.cacheControl),l&&s.append("metadata",this.encodeMetadata(l)),s.append("",r)):typeof FormData<"u"&&r instanceof FormData?(s=r,s.append("cacheControl",o.cacheControl),l&&s.append("metadata",this.encodeMetadata(l))):(s=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),i!=null&&i.headers&&(a=Object.assign(Object.assign({},a),i.headers));const u=this._removeEmptyFolders(n),h=this._getFinalPath(u),d=yield(t=="PUT"?Cu:Mt)(this.fetch,`${this.url}/object/${h}`,s,Object.assign({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:d.Id,fullPath:d.Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(_e(s))return{data:null,error:s};throw s}})}upload(t,n,r){return $e(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,i){return $e(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(t),o=this._getFinalPath(s),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:Kf.upsert},i),h=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,h["cache-control"]=`max-age=${u.cacheControl}`,h["content-type"]=u.contentType);const d=yield Cu(this.fetch,a.toString(),l,{headers:h});return{data:{path:s,fullPath:d.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(_e(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return $e(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const i=Object.assign({},this.headers);n!=null&&n.upsert&&(i["x-upsert"]="true");const s=yield Mt(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(this.url+s.url),a=o.searchParams.get("token");if(!a)throw new lh("No token returned by API");return{data:{signedUrl:o.toString(),path:t,token:a},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}update(t,n,r){return $e(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return $e(this,void 0,void 0,function*(){try{return{data:yield Mt(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}copy(t,n,r){return $e(this,void 0,void 0,function*(){try{return{data:{path:(yield Mt(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}createSignedUrl(t,n,r){return $e(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),s=yield Mt(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${o}`)},{data:s,error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}createSignedUrls(t,n,r){return $e(this,void 0,void 0,function*(){try{const i=yield Mt(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:i.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${s}`):null})),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}download(t,n){return $e(this,void 0,void 0,function*(){const i=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),o=s?`?${s}`:"";try{const a=this._getFinalPath(t);return{data:yield(yield Io(this.fetch,`${this.url}/${i}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(_e(a))return{data:null,error:a};throw a}})}info(t){return $e(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield Io(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:bu(r),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}exists(t){return $e(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield eT(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r)&&r instanceof Tu){const i=r.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),i=[],s=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";s!==""&&i.push(s);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&i.push(l);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${u}`)}}}remove(t){return $e(this,void 0,void 0,function*(){try{return{data:yield y0(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(_e(n))return{data:null,error:n};throw n}})}list(t,n,r){return $e(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},tT),n),{prefix:t||""});return{data:yield Mt(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},r),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(_e(i))return{data:null,error:i};throw i}})}listV2(t,n){return $e(this,void 0,void 0,function*(){try{const r=Object.assign({},t);return{data:yield Mt(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}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 n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const rT="2.12.1",iT={"X-Client-Info":`storage-js/${rT}`};var sr=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class sT{constructor(t,n={},r,i){this.shouldThrowOnError=!1;const s=new URL(t);i!=null&&i.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href,this.headers=Object.assign(Object.assign({},iT),n),this.fetch=m0(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(){return sr(this,void 0,void 0,function*(){try{return{data:yield Io(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(_e(t))return{data:null,error:t};throw t}})}getBucket(t){return sr(this,void 0,void 0,function*(){try{return{data:yield Io(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(_e(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return sr(this,void 0,void 0,function*(){try{return{data:yield Mt(this.fetch,`${this.url}/bucket`,{id:t,name:t,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return sr(this,void 0,void 0,function*(){try{return{data:yield Cu(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(_e(r))return{data:null,error:r};throw r}})}emptyBucket(t){return sr(this,void 0,void 0,function*(){try{return{data:yield Mt(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(_e(n))return{data:null,error:n};throw n}})}deleteBucket(t){return sr(this,void 0,void 0,function*(){try{return{data:yield y0(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(_e(n))return{data:null,error:n};throw n}})}}class oT extends sT{constructor(t,n={},r,i){super(t,n,r,i)}from(t){return new nT(this.url,this.headers,t,this.fetch)}}const aT="2.57.4";let mi="";typeof Deno<"u"?mi="deno":typeof document<"u"?mi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?mi="react-native":mi="node";const lT={"X-Client-Info":`supabase-js-${mi}/${aT}`},uT={headers:lT},cT={schema:"public"},hT={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},dT={};var fT=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const pT=e=>{let t;return e?t=e:typeof fetch>"u"?t=n0:t=fetch,(...n)=>t(...n)},gT=()=>typeof Headers>"u"?r0:Headers,mT=(e,t,n)=>{const r=pT(n),i=gT();return(s,o)=>fT(void 0,void 0,void 0,function*(){var a;const l=(a=yield t())!==null&&a!==void 0?a:e;let u=new i(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(s,Object.assign(Object.assign({},o),{headers:u}))})};var yT=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};function vT(e){return e.endsWith("/")?e:e+"/"}function wT(e,t){var n,r;const{db:i,auth:s,realtime:o,global:a}=e,{db:l,auth:u,realtime:h,global:d}=t,p={db:Object.assign(Object.assign({},l),i),auth:Object.assign(Object.assign({},u),s),realtime:Object.assign(Object.assign({},h),o),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>yT(this,void 0,void 0,function*(){return""})};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function xT(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(vT(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const v0="2.71.1",cr=30*1e3,Eu=3,el=Eu*cr,kT="http://localhost:9999",ST="supabase.auth.token",_T={"X-Client-Info":`gotrue-js/${v0}`},Ru="X-Supabase-Api-Version",w0={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},PT=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,TT=10*60*1e3;class uh extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function K(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class bT extends uh{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function CT(e){return K(e)&&e.name==="AuthApiError"}class x0 extends uh{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class An extends uh{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class rn extends An{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ET(e){return K(e)&&e.name==="AuthSessionMissingError"}class Fs extends An{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Bs extends An{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Vs extends An{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function RT(e){return K(e)&&e.name==="AuthImplicitGrantRedirectError"}class Gf extends An{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Au extends An{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function tl(e){return K(e)&&e.name==="AuthRetryableFetchError"}class qf extends An{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class ju extends An{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Lo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Yf=`
+\r=`.split(""),AT=(()=>{const e=new Array(128);for(let t=0;t=6;){const r=t.queue>>t.queuedBits-6&63;n(Lo[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Lo[r]),t.queuedBits-=6}}function k0(e,t,n){const r=AT[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Xf(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=o=>{OT(o,r,n)};for(let o=0;o>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 MT(e,t){for(let n=0;n55295&&r<=56319){const i=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}jT(r,t)}}function OT(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;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&&n(t.codepoint)}}function DT(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};for(let i=0;it.push(n)),new Uint8Array(t)}function LT(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};return e.forEach(i=>Qf(i,n,r)),Qf(null,n,r),t.join("")}function NT(e){return Math.round(Date.now()/1e3)+e}function $T(){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 wt=()=>typeof window<"u"&&typeof document<"u",On={tested:!1,writable:!1},S0=()=>{if(!wt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(On.tested)return On.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),On.tested=!0,On.writable=!0}catch{On.tested=!0,On.writable=!1}return On.writable};function FT(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,s)=>{t[s]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const _0=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>fs(async()=>{const{default:r}=await Promise.resolve().then(()=>Jr);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},BT=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",hr=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Dn=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},tn=async(e,t)=>{await e.removeItem(t)};class aa{constructor(){this.promise=new aa.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}aa.promiseConstructor=Promise;function nl(e){const t=e.split(".");if(t.length!==3)throw new ju("Invalid JWT structure");for(let r=0;r{setTimeout(()=>t(null),e)})}function UT(e,t){return new Promise((r,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const o=await e(s);if(!t(s,null,o)){r(o);return}}catch(o){if(!t(s,o)){i(o);return}}})()})}function zT(e){return("0"+e.toString(16)).substr(-2)}function WT(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let s=0;s<56;s++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,zT).join("")}async function HT(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}async function KT(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 n=await HT(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function or(e,t,n=!1){const r=WT();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await hr(e,`${t}-code-verifier`,i);const s=await KT(r);return[s,r===s?"plain":"s256"]}const GT=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function qT(e){const t=e.headers.get(Ru);if(!t||!t.match(GT))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function YT(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 QT(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 XT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ar(e){if(!XT.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function rl(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="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 "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Jf(e){return JSON.parse(JSON.stringify(e))}var JT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);ie.msg||e.message||e.error_description||e.error||JSON.stringify(e),ZT=[502,503,504];async function Zf(e){var t;if(!BT(e))throw new Au(Fn(e),0);if(ZT.includes(e.status))throw new Au(Fn(e),e.status);let n;try{n=await e.json()}catch(s){throw new x0(Fn(s),s)}let r;const i=qT(e);if(i&&i.getTime()>=w0["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new qf(Fn(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new rn}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((s,o)=>s&&typeof o=="string",!0))throw new qf(Fn(n),e.status,n.weak_password.reasons);throw new bT(Fn(n),e.status||500,r)}const eb=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function G(e,t,n,r){var i;const s=Object.assign({},r==null?void 0:r.headers);s[Ru]||(s[Ru]=w0["2024-01-01"].name),r!=null&&r.jwt&&(s.Authorization=`Bearer ${r.jwt}`);const o=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await tb(e,t,n+a,{headers:s,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function tb(e,t,n,r,i,s){const o=eb(t,r,i,s);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new Au(Fn(l),0)}if(a.ok||await Zf(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await Zf(l)}}function Bt(e){var t;let n=null;sb(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=NT(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function ep(e){const t=Bt(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((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function un(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function nb(e){return{data:e,error:null}}function rb(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s}=e,o=JT(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function ib(e){return e}function sb(e){return e.access_token&&e.refresh_token&&e.expires_in}const il=["global","local","others"];var ob=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i0&&(v.forEach(k=>{const _=parseInt(k.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(k.split(";")[1].split("=")[1]);u[`${b}Page`]=_}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(K(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){ar(t);try{return await G(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:un})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){ar(t);try{return await G(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:un})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){ar(t);try{return await G(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:un})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){ar(t.userId);try{const{data:n,error:r}=await G(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(K(n))return{data:null,error:n};throw n}}async _deleteFactor(t){ar(t.userId),ar(t.id);try{return{data:await G(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}}function tp(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function lb(){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)}}const lr={debug:!!(globalThis&&S0()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class P0 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class ub extends P0{}async function cb(e,t,n){lr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),lr.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:r.signal},async i=>{if(i){lr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{lr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw lr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new ub(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(lr.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null," "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}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 n()}}))}lb();const hb={url:kT,storageKey:ST,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:_T,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function np(e,t,n){return await n()}const ur={};class rs{constructor(t){var n,r;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,this.instanceID=rs.nextInstanceID,rs.nextInstanceID+=1,this.instanceID>0&&wt()&&console.warn("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.");const i=Object.assign(Object.assign({},hb),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new ab({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=_0(i.fetch),this.lock=i.lock||np,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:wt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=cb:this.lock=np,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)},this.persistSession?(i.storage?this.storage=i.storage:S0()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=tp(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=tp(this.memoryStorage)),wt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s),await this._notifyAllSubscribers(s.data.event,s.data.session,!1)})}this.initialize()}get jwks(){var t,n;return(n=(t=ur[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){ur[this.storageKey]=Object.assign(Object.assign({},ur[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=ur[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){ur[this.storageKey]=Object.assign(Object.assign({},ur[this.storageKey]),{cachedAt:t})}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${v0}) ${new Date().toISOString()}`,...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{const n=FT(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),wt()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:s}=await this._getSessionFromURL(n,r);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),RT(s)){const l=(t=s.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:s}}return await this._removeSession(),{error:s}}const{session:o,redirectType:a}=i;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return K(n)?{error:n}:{error:new x0("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{const s=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Bt}),{data:o,error:a}=s;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(K(s))return{data:{user:null,session:null},error:s};throw s}}async signUp(t){var n,r,i;try{let s;if("email"in t){const{email:h,password:d,options:p}=t;let v=null,k=null;this.flowType==="pkce"&&([v,k]=await or(this.storage,this.storageKey)),s=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:h,password:d,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:v,code_challenge_method:k},xform:Bt})}else if("phone"in t){const{phone:h,password:d,options:p}=t;s=await G(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:h,password:d,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},channel:(i=p==null?void 0:p.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Bt})}else throw new Bs("You must provide either an email or phone number and a password");const{data:o,error:a}=s;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(K(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithPassword(t){try{let n;if("email"in t){const{email:s,password:o,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ep})}else if("phone"in t){const{phone:s,password:o,options:a}=t;n=await G(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ep})}else throw new Bs("You must provide either an email or phone number and a password");const{data:r,error:i}=n;return i?{data:{user:null,session:null},error:i}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Fs}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(K(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,i,s;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;if(n==="solana")return await this.signInWithSolana(t);throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}async signInWithSolana(t){var n,r,i,s,o,a,l,u,h,d,p,v;let k,_;if("message"in t)k=t.message,_=t.signature;else{const{chain:b,wallet:w,statement:y,options:g}=t;let c;if(wt())if(typeof w=="object")c=w;else{const m=window;if("solana"in m&&typeof m.solana=="object"&&("signIn"in m.solana&&typeof m.solana.signIn=="function"||"signMessage"in m.solana&&typeof m.solana.signMessage=="function"))c=m.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"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");c=w}const f=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in c&&c.signIn){const m=await c.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:f.host,uri:f.href}),y?{statement:y}:null));let x;if(Array.isArray(m)&&m[0]&&typeof m[0]=="object")x=m[0];else if(m&&typeof m=="object"&&"signedMessage"in m&&"signature"in m)x=m;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in x&&"signature"in x&&(typeof x.signedMessage=="string"||x.signedMessage instanceof Uint8Array)&&x.signature instanceof Uint8Array)k=typeof x.signedMessage=="string"?x.signedMessage:new TextDecoder().decode(x.signedMessage),_=x.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in c)||typeof c.signMessage!="function"||!("publicKey"in c)||typeof c!="object"||!c.publicKey||!("toBase58"in c.publicKey)||typeof c.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");k=[`${f.host} wants you to sign in with your Solana account:`,c.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${f.href}`,`Issued At: ${(i=(r=g==null?void 0:g.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((s=g==null?void 0:g.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((o=g==null?void 0:g.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((u=g==null?void 0:g.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((d=(h=g==null?void 0:g.signInWithSolana)===null||h===void 0?void 0:h.resources)===null||d===void 0)&&d.length?["Resources",...g.signInWithSolana.resources.map(x=>`- ${x}`)]:[]].join(`
+`);const m=await c.signMessage(new TextEncoder().encode(k),"utf8");if(!m||!(m instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");_=m}}try{const{data:b,error:w}=await G(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:k,signature:LT(_)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(v=t.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Bt});if(w)throw w;return!b||!b.session||!b.user?{data:{user:null,session:null},error:new Fs}:(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:w})}catch(b){if(K(b))return{data:{user:null,session:null},error:b};throw b}}async _exchangeCodeForSession(t){const n=await Dn(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{const{data:s,error:o}=await G(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Bt});if(await tn(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new Fs}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:o})}catch(s){if(K(s))return{data:{user:null,session:null,redirectType:null},error:s};throw s}}async signInWithIdToken(t){try{const{options:n,provider:r,token:i,access_token:s,nonce:o}=t,a=await G(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:s,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Bt}),{data:l,error:u}=a;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Fs}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(K(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,i,s,o;try{if("email"in t){const{email:a,options:l}=t;let u=null,h=null;this.flowType==="pkce"&&([u,h]=await or(this.storage,this.storageKey));const{error:d}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:h},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:h}=await G(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:h}}throw new Bs("You must provide either an email or phone number.")}catch(a){if(K(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(t){var n,r;try{let i,s;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,s=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await G(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:Bt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(K(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var n,r,i;try{let s=null,o=null;return this.flowType==="pkce"&&([s,o]=await or(this.storage,this.storageKey)),await G(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:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:o}),headers:this.headers,xform:nb})}catch(s){if(K(s))return{data:null,error:s};throw s}}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:n},error:r}=t;if(r)throw r;if(!n)throw new rn;const{error:i}=await G(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(K(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:s}=t,{error:o}=await G(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in t){const{phone:r,type:i,options:s}=t,{data:o,error:a}=await G(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new Bs("You must provide either an email or phone number and a type")}catch(n){if(K(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}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 n=await this.__loadSession();return await t(n)}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 n=await Dn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()(!o&&u==="user"&&(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."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,u,h))})}return{data:{session:t},error:null}}const{session:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{session:null},error:s}:{data:{session:i},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 G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:un}):await this._useSession(async n=>{var r,i,s;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new rn}:await G(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:un})})}catch(n){if(K(n))return ET(n)&&(await this._removeSession(),await tn(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:s}=r;if(s)throw s;if(!i.session)throw new rn;const o=i.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await or(this.storage,this.storageKey));const{data:u,error:h}=await G(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:un});if(h)throw h;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}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 rn;const n=Date.now()/1e3;let r=n,i=!0,s=null;const{payload:o}=nl(t.access_token);if(o.exp&&(r=o.exp,i=r<=n),i){const{session:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};s=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;s={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(n){if(K(n))return{data:{session:null,user:null},error:n};throw n}}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 n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new rn;const{session:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{user:null,session:null},error:s}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(K(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!wt())throw new Vs("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Vs(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Gf("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Vs("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Gf("No code detected.");const{data:y,error:g}=await this._exchangeCodeForSession(t.code);if(g)throw g;const c=new URL(window.location.href);return c.searchParams.delete("code"),window.history.replaceState(window.history.state,"",c.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:i,access_token:s,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=t;if(!s||!a||!o||!u)throw new Vs("No session defined in URL");const h=Math.round(Date.now()/1e3),d=parseInt(a);let p=h+d;l&&(p=parseInt(l));const v=p-h;v*1e3<=cr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${d}s`);const k=p-d;h-k>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",k,p,h):h-k<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",k,p,h);const{data:_,error:b}=await this._getUser(s);if(b)throw b;const w={provider_token:r,provider_refresh_token:i,access_token:s,expires_in:d,expires_at:p,refresh_token:o,token_type:u,user:_.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:w,redirectType:t.type},error:null}}catch(r){if(K(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Dn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}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 n=>{var r;const{data:i,error:s}=n;if(s)return{error:s};const o=(r=i.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(CT(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return t!=="others"&&(await this._removeSession(),await tn(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=$T(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:s},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),console.error(s)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await or(this.storage,this.storageKey,!0));try{return await G(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(K(s))return{data:null,error:s};throw s}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:i}=await this._useSession(async s=>{var o,a,l,u,h;const{data:d,error:p}=s;if(p)throw p;const v=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await G(this.fetch,"GET",v,{headers:this.headers,jwt:(h=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&h!==void 0?h:void 0})});if(i)throw i;return wt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(K(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:o}=n;if(o)throw o;return await G(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await UT(async i=>(i>0&&await VT(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await G(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Bt})),(i,s)=>{const o=200*Math.pow(2,i);return s&&tl(s)&&Date.now()+o-r{try{await a.callback(t,n)}catch(l){s.push(l)}});if(await Promise.all(o),s.length>0){for(let a=0;athis._autoRefreshTokenTick(),cr);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 n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/cr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${cr}ms, refresh threshold is ${Eu} ticks`),i<=Eu&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof P0)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!wt()||!(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 n=`#_onVisibilityChanged(${t})`;this._debug(n,"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(n,"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,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[s,o]=await or(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(a.toString())}if(r!=null&&r.queryParams){const s=new URLSearchParams(r.queryParams);i.push(s.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?{data:null,error:s}:await G(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:o}=n;if(o)return{data:null,error:o};const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:l,error:u}=await G(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return u?{data:null,error:u}:(t.factorType==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s)return{data:null,error:s};const{data:o,error:a}=await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(n){if(K(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?{data:null,error:s}:await G(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(K(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],i=r.filter(o=>o.factor_type==="totp"&&o.status==="verified"),s=r.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:r,totp:i,phone:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:i},error:s}=t;if(s)return{data:null,error:s};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=nl(i.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((r=(n=i.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const h=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:h},error:null}}))}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(a=>a.kid===t);if(r)return r;const i=Date.now();if(r=this.jwks.keys.find(a=>a.kid===t),r&&this.jwks_cached_at+TT>i)return r;const{data:s,error:o}=await G(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=i,r=s.keys.find(a=>a.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:v,error:k}=await this.getSession();if(k||!v.session)return{data:null,error:k};r=v.session.access_token}const{header:i,payload:s,signature:o,raw:{header:a,payload:l}}=nl(r);n!=null&&n.allowExpired||YT(s.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:v}=await this.getUser(r);if(v)throw v;return{data:{claims:s,header:i,signature:o},error:null}}const h=QT(i.alg),d=await crypto.subtle.importKey("jwk",u,h,!0,["verify"]);if(!await crypto.subtle.verify(h,d,o,IT(`${a}.${l}`)))throw new ju("Invalid JWT signature");return{data:{claims:s,header:i,signature:o},error:null}}catch(r){if(K(r))return{data:null,error:r};throw r}}}rs.nextInstanceID=0;const db=rs;class fb extends db{constructor(t){super(t)}}var pb=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(h){try{u(r.next(h))}catch(d){o(d)}}function l(h){try{u(r.throw(h))}catch(d){o(d)}}function u(h){h.done?s(h.value):i(h.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class gb{constructor(t,n,r){var i,s,o;this.supabaseUrl=t,this.supabaseKey=n;const a=xT(t);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const l=`sb-${a.hostname.split(".")[0]}-auth-token`,u={db:cT,realtime:dT,auth:Object.assign(Object.assign({},hT),{storageKey:l}),global:uT},h=wT(r??{},u);this.storageKey=(i=h.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(s=h.global.headers)!==null&&s!==void 0?s:{},h.accessToken?(this.accessToken=h.accessToken,this.auth=new Proxy({},{get:(d,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=h.auth)!==null&&o!==void 0?o:{},this.headers,h.global.fetch),this.fetch=mT(n,this._getAccessToken.bind(this),h.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},h.realtime)),this.rest=new AP(new URL("rest/v1",a).href,{headers:this.headers,schema:h.db.schema,fetch:this.fetch}),this.storage=new oT(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),h.accessToken||this._listenForAuthEvents()}get functions(){return new lP(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,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return pb(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,userStorage:s,storageKey:o,flowType:a,lock:l,debug:u},h,d){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new fb({url:this.authUrl.href,headers:Object.assign(Object.assign({},p),h),storageKey:o,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,userStorage:s,flowType:a,lock:l,debug:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(v=>v.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new GP(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((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const mb=(e,t,n)=>new gb(e,t,n);function yb(){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}yb()&&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 vb="https://eynxipjyamdwblmegsmc.supabase.co",wb="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImV5bnhpcGp5YW1kd2JsbWVnc21jIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjEwNzkxMDAsImV4cCI6MjA3NjY1NTEwMH0.OAQA1FwXiKSxasQ0JjsGCdrJ73M8MMjZg4xmOEBqqgs",Tn=mb(vb,wb);function xb(){let e=localStorage.getItem("cooky_session_id");return e||(e=crypto.randomUUID(),localStorage.setItem("cooky_session_id",e)),e}async function sl(e){const{data:t,error:n}=await Tn.from("recipe_bookmarks").select("*").eq("session_id",e).order("created_at",{ascending:!1});return n?(console.error("Error fetching bookmarks:",n),[]):t||[]}async function kb(e,t){const{data:n}=await Tn.from("recipe_bookmarks").select("id").eq("recipe_id",e).eq("session_id",t).maybeSingle();if(n)return console.log("Bookmark already exists, skipping insert"),!0;const{error:r}=await Tn.from("recipe_bookmarks").insert({recipe_id:e,session_id:t,notes:null});return r?(console.error("Error adding bookmark:",r),!1):!0}async function Sb(e,t){console.log("removeBookmark called with:",{recipeId:e,sessionId:t});const{data:n,error:r,count:i}=await Tn.from("recipe_bookmarks").delete().eq("recipe_id",e).eq("session_id",t).select();return console.log("removeBookmark response:",{data:n,error:r,count:i}),r?(console.error("Error removing bookmark:",r),!1):!0}async function ol(e){const{data:t,error:n}=await Tn.from("tried_recipes").select("*").eq("session_id",e).order("created_at",{ascending:!1});return n?(console.error("Error fetching tried recipes:",n),[]):t||[]}async function _b(e,t){const{data:n}=await Tn.from("tried_recipes").select("id").eq("recipe_id",e).eq("session_id",t).maybeSingle();if(n)return console.log("Recipe already marked as tried, skipping insert"),!0;const{error:r}=await Tn.from("tried_recipes").insert({recipe_id:e,session_id:t});return r?(console.error("Error marking recipe as tried:",r),!1):!0}async function Pb(e,t){console.log("unmarkRecipeAsTried called with:",{recipeId:e,sessionId:t});const{data:n,error:r,count:i}=await Tn.from("tried_recipes").delete().eq("recipe_id",e).eq("session_id",t).select();return console.log("unmarkRecipeAsTried response:",{data:n,error:r,count:i}),r?(console.error("Error unmarking recipe:",r),!1):!0}var ms={};(function e(t,n,r,i){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=function(){if(!t.OffscreenCanvas)return!1;var T=new OffscreenCanvas(1,1),P=T.getContext("2d");P.fillRect(0,0,1,1);var O=T.transferToImageBitmap();try{P.createPattern(O,"no-repeat")}catch{return!1}return!0}();function l(){}function u(T){var P=n.exports.Promise,O=P!==void 0?P:t.Promise;return typeof O=="function"?new O(T):(T(l,l),null)}var h=function(T,P){return{transform:function(O){if(T)return O;if(P.has(O))return P.get(O);var F=new OffscreenCanvas(O.width,O.height),V=F.getContext("2d");return V.drawImage(O,0,0),P.set(O,F),F},clear:function(){P.clear()}}}(a,new Map),d=function(){var T=Math.floor(16.666666666666668),P,O,F={},V=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(P=function(H){var W=Math.random();return F[W]=requestAnimationFrame(function $(Y){V===Y||V+T-1/pub//...\` for public files and HTTPS relay forms for read-only examples.
+• Keys. Generate a keypair locally, store an encrypted recovery file, and keep secrets out of your repo.`},{id:"welcome-2",title:"Let's cook",kind:"intro",estimatedTime:"1 min read",body:`## Quick start
+1) cargo add pubky@=0.6.0 tokio --features macros,rt-multi-thread
+2) Pick a backend: local \`pubky-testnet\` for offline dev or staging (see beta guide for host key and tokens).
+3) Paste "Create a client," then try "Sign up," then "Write a file," and verify with "HEAD" and "List."
+
+## Beta shortcuts
+• Staging homeserver public key, example signup tokens, and the admin endpoint are in the tester PDF (currently only available internally or on request). Rotate as needed.
+
+## Safety tips
+• Treat recovery files like secrets. Use strong passphrases.
+• When in doubt, first test against \`pubky-testnet\` first, then stage, and then prod.
+
+Ready? Let's cook. 👨🍳`},{id:"client",title:"Create a Pubky instance",kind:"identity",estimatedTime:"1 min",code:`use pubky::Pubky;
+
+fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ Ok(())
+}`,notes:"Every program needs one. The Pubky instance is your entry point to the SDK."},{id:"signup",title:"Sign up a new user to a homeserver",kind:"identity",estimatedTime:"3 min",code:`use pubky::{Pubky, Keypair};
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ let keypair = Keypair::random();
+ let homeserver = "ufib...u1uy";
+ let token = Some("G12J-824M-F0V0");
+
+ let signer = pubky.signer(keypair);
+ let session = signer.signup(&homeserver, token).await?;
+ println!("Signed up: {:?}", session);
+ Ok(())
+}`,notes:"Use staging host key and token during beta. Keypair::random() generates a new key."},{id:"signin",title:"Sign in later with the same keypair",kind:"identity",estimatedTime:"2 min",code:`use pubky::{Pubky, Keypair};
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ let keypair = Keypair::random(); // load your real key from recovery file
+ let signer = pubky.signer(keypair);
+ let session = signer.signin().await?;
+ println!("Signed in: {:?}", session);
+ Ok(())
+}`,notes:"Use recovery file to restore your keypair securely."},{id:"putget",title:"Write a file and read it back (public)",kind:"storage",estimatedTime:"3 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ // Assume you have a session from signin/signup
+ let session = /* your session */;
+
+ // Write to public storage
+ session.storage().put("/pub/my.app/hello.txt", "hello world").await?;
+
+ // Read back using public storage (no auth needed)
+ let text = pubky.public_storage()
+ .get("/pub/my.app/hello.txt")
+ .await?
+ .text()
+ .await?;
+ println!("Got: {}", text);
+ Ok(())
+}`,notes:"Use domain-like paths: /pub/mycoolnew.app/ for public data."},{id:"head",title:"HEAD check for size and existence",kind:"storage",estimatedTime:"2 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ let session = /* your session */;
+
+ let resp = session.storage().head("/pub/my.app/hello.txt").await?;
+ if let Some(size) = resp.content_length() {
+ println!("Size: {} bytes", size);
+ } else {
+ println!("File exists, size unknown");
+ }
+ Ok(())
+}`,notes:"HEAD is efficient for checking existence without downloading content."},{id:"list",title:"List files with cursor and limit",kind:"storage",estimatedTime:"3 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ let session = /* your session */;
+ let base = "/pub/my.app/";
+
+ // List files with pagination
+ let files = session.storage().list(base).await?;
+ println!("Files: {:?}", files);
+ Ok(())
+}`,notes:"List returns file paths under the specified directory."},{id:"delete",title:"Delete a file",kind:"storage",estimatedTime:"1 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ let session = /* your session */;
+
+ session.storage().delete("/pub/my.app/hello.txt").await?;
+ println!("File deleted");
+ Ok(())
+}`,notes:"Deletes are permanent. Make sure you have the right path!"},{id:"public-get",title:"Get public data from any user",kind:"storage",estimatedTime:"2 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+
+ // Read public data from any user (no auth needed)
+ let url = "pubky://USER_PUBKY/pub/pubky.app/profile.json";
+ let data = pubky.public_storage()
+ .get(url)
+ .await?
+ .text()
+ .await?;
+
+ println!("Public data: {}", data);
+ Ok(())
+}`,notes:"Access public data from any Pubky user without authentication."},{id:"resolve",title:"Resolve homeserver for a given Pubky",kind:"discovery",estimatedTime:"2 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ let user_id = "YOUR_PUBKY";
+
+ if let Some(homeserver) = pubky.resolve_homeserver(user_id).await? {
+ println!("Homeserver: {}", homeserver);
+ } else {
+ println!("Not found");
+ }
+ Ok(())
+}`,notes:"Uses Pkarr DNS to discover where a user's data lives."},{id:"pairing",title:"Pubky Ring pairing (QR login flow)",kind:"auth",estimatedTime:"4 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+
+ // Start authentication flow
+ let auth_flow = pubky.start_auth_flow().await?;
+ println!("Show this URL as QR code: {}", auth_flow.url());
+
+ // Wait for user to scan and approve
+ let session = auth_flow.wait_for_auth().await?;
+ println!("Authenticated! Session: {:?}", session);
+ Ok(())
+}`,notes:"Display the URL as a QR code for users to scan with Pubky Ring app."},{id:"recovery",title:"Create and decrypt a recovery file",kind:"identity",estimatedTime:"3 min",code:`use pubky::Keypair;
+
+fn main() -> anyhow::Result<()> {
+ let keypair = Keypair::random();
+ let passphrase = "strong passphrase";
+
+ // Save keypair to encrypted file
+ keypair.save_to_file("my_recovery.bin", passphrase)?;
+
+ // Restore keypair from file
+ let restored = Keypair::from_file("my_recovery.bin", passphrase)?;
+ assert_eq!(restored.public_key(), keypair.public_key());
+ println!("Recovery successful!");
+ Ok(())
+}`,notes:"NEVER share your recovery file or passphrase. Store them securely like passwords."},{id:"logging",title:"Enable debug logging",kind:"testing",estimatedTime:"2 min",code:`use tracing_subscriber;
+
+fn main() -> anyhow::Result<()> {
+ // Initialize tracing subscriber for debug output
+ tracing_subscriber::fmt()
+ .with_max_level(tracing::Level::DEBUG)
+ .init();
+
+ // Now run your Pubky operations
+ // You'll see detailed debug logs for all SDK activity
+ println!("Logging enabled!");
+ Ok(())
+}`,notes:"See what's happening under the hood. Great for debugging storage roundtrips."},{id:"testnet",title:"Run an embedded local testnet",kind:"testing",estimatedTime:"2 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ // Create Pubky instance with testnet config
+ let pubky = Pubky::testnet().await?;
+
+ // Now you can test signup, signin, and storage operations
+ // without connecting to staging or production servers
+ println!("Testnet ready for testing!");
+ Ok(())
+}`,notes:"Perfect for offline development and testing. No internet required!"},{id:"capabilities",title:"Define granular access with Capabilities",kind:"auth",estimatedTime:"3 min",code:`use pubky::{Pubky, Capabilities};
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+
+ // Define specific permissions for auth flow
+ let caps = Capabilities::builder()
+ .read("/pub/my.app/**")
+ .write("/pub/my.app/posts/**")
+ .delete("/pub/my.app/drafts/**")
+ .build();
+
+ let auth_flow = pubky.start_auth_flow_with_caps(caps).await?;
+ println!("Auth URL: {}", auth_flow.url());
+ Ok(())
+}`,notes:"Limit what apps can access. Use wildcards for flexible path matching."},{id:"pkdns",title:"Publish and resolve PKDNS records",kind:"discovery",estimatedTime:"3 min",code:`use pubky::Pubky;
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+ let session = /* your session */;
+
+ // Publish a DNS-like record using Pkarr
+ session.publish_pkarr_record("myapp", "example.com").await?;
+
+ // Resolve it later
+ let record = pubky.resolve_pkarr("YOUR_PUBKY", "myapp").await?;
+ println!("Record: {:?}", record);
+ Ok(())
+}`,notes:"Pkarr enables decentralized DNS using your Pubky as the root of trust."},{id:"session-persist",title:"Persist and restore sessions",kind:"identity",estimatedTime:"2 min",code:`use pubky::{Pubky, PubkySession};
+use tokio;
+
+#[tokio::main]
+async fn main() -> anyhow::Result<()> {
+ let pubky = Pubky::new()?;
+
+ // After signin/signup, save session
+ let session = /* your session */;
+ let session_data = session.to_bytes()?;
+ std::fs::write("session.dat", session_data)?;
+
+ // Restore later
+ let saved = std::fs::read("session.dat")?;
+ let restored = PubkySession::from_bytes(&saved)?;
+ println!("Session restored!");
+ Ok(())
+}`,notes:"Store session secrets securely. Treat them like passwords!"}],la=[{id:"intro",label:"Intro"},{id:"identity",label:"Identity"},{id:"storage",label:"Storage"},{id:"auth",label:"Auth"},{id:"discovery",label:"Discovery"},{id:"testing",label:"Testing"}],At=(()=>{const e=la.map(t=>t.id);return[...bb].sort((t,n)=>{const r=e.indexOf(t.kind),i=e.indexOf(n.kind);return r-i})})();function Cb(){const[e,t]=R.useState(!1);return R.useEffect(()=>{const n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>t(n.matches);return r(),n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function Eb(e){const t=e.split(`
+`),n=[];let r=[],i=0;const s=()=>{r.length>0&&(n.push(C.jsx("div",{className:"text-sm leading-relaxed text-zinc-700 mb-3",children:r.join(`
+`)},i++)),r=[])};return t.forEach(o=>{o.startsWith("## ")?(s(),n.push(C.jsx("h3",{className:"text-lg font-bold text-orange-600 mt-4 mb-2 first:mt-0",children:o.substring(3)},i++))):r.push(o)}),s(),C.jsx("div",{className:"whitespace-pre-wrap flex-1",children:n})}function Rb({items:e,currentId:t,onSelect:n,open:r,bookmarkedIds:i,triedIds:s}){return C.jsx(Nn,{children:(r||typeof r>"u")&&C.jsxs(Ft.aside,{initial:{x:-16,opacity:0},animate:{x:0,opacity:1},exit:{x:-16,opacity:0},transition:{duration:.2},className:"h-full w-72 shrink-0 p-6 hidden md:flex md:flex-col gap-3",children:[C.jsxs("div",{className:"flex items-center gap-2 px-1 py-1",children:[C.jsx(ym,{className:"size-5"}),C.jsx("div",{className:"font-semibold tracking-tight",children:"Pubky SDK Cookbook"})]}),C.jsx("nav",{className:"flex-1 overflow-auto pr-1",children:la.map(o=>C.jsxs("div",{className:"mb-2",children:[C.jsx("div",{className:"px-1 pb-1 text-xs uppercase tracking-wide text-orange-600 font-semibold",children:o.label}),C.jsx("ul",{className:"space-y-1",children:e.filter(a=>a.kind===o.id).map(a=>C.jsx("li",{children:C.jsxs("button",{onClick:()=>n(a.id),className:`text-left w-full rounded-xl px-3 py-1 hover:bg-orange-50 transition-colors flex items-center justify-between gap-2 ${t===a.id?"bg-orange-100 text-orange-600":"text-zinc-700"}`,children:[C.jsx("div",{className:"text-xs font-medium leading-snug flex-1",children:a.title}),C.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.has(a.id)&&C.jsx(km,{className:"size-3.5 text-orange-600"}),i.has(a.id)&&C.jsx(vm,{className:"size-3.5 fill-orange-600 text-orange-600"})]})]})},a.id))})]},o.id))})]})})}function T0({recipe:e,copyFeedback:t,setCopyFeedback:n,bookmarkFeedback:r,triedFeedback:i,isBookmarked:s,onToggleBookmark:o,isTried:a,onToggleTried:l,onEnlargeCode:u}){var h;return C.jsx("div",{className:"w-full h-full shadow-xl rounded-3xl",children:C.jsx(fx,{className:"w-full h-full rounded-3xl shadow-[0_8px_40px_rgba(217,119,6,0.12)] border-orange-300/50 bg-orange-100",children:C.jsxs(px,{className:"p-7 h-full flex flex-col relative overflow-auto",children:[C.jsxs("div",{className:"flex items-center justify-between mb-1",children:[C.jsx("div",{className:"text-xs uppercase tracking-wide text-orange-600 font-semibold",children:(h=la.find(d=>d.id===e.kind))==null?void 0:h.label}),e.estimatedTime&&C.jsxs("div",{className:"flex items-center gap-1 text-xs text-orange-600",children:[C.jsx(wx,{className:"size-3"}),e.estimatedTime]})]}),C.jsx("h2",{className:"text-2xl font-bold leading-snug mb-3 tracking-tight text-zinc-900",children:e.title}),e.body&&Eb(e.body),e.code&&C.jsxs("div",{className:"mt-1 flex-1 space-y-3",children:[C.jsxs("div",{className:"flex flex-wrap gap-2",children:[C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>{navigator.clipboard.writeText(e.code),n(!0),setTimeout(()=>n(!1),2e3)},title:"Copy to clipboard",children:[C.jsx(Sm,{className:"size-4 mr-1"}),t?"Copied!":"Copy"]}),u&&C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>u(e.code),title:"Enlarge code view",children:[C.jsx(xx,{className:"size-4 mr-1"}),"Enlarge"]}),C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>o(e.id),className:s?"!bg-orange-600 !border-orange-600 hover:!bg-orange-700 !text-white":"",title:s?"Bookmarked":"Bookmark recipe",children:[C.jsx(wm,{className:`size-4 mr-1 ${s?"fill-white text-white":""}`}),s?"Bookmarked":"Bookmark"]}),C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>l(e.id),className:a?"!bg-orange-600 !border-orange-600 hover:!bg-orange-700 !text-white":"",title:a?"Mark as not tried":"Mark as tried",children:[C.jsx(xm,{className:`size-4 mr-1 ${a?"text-white":""}`}),"Cooked!"]})]}),C.jsx("div",{className:"relative",children:C.jsx("div",{className:"rounded-xl overflow-auto max-h-[420px]",children:C.jsx(t0,{code:e.code})})})]}),e.notes&&C.jsx("div",{className:"mt-3 text-xs text-orange-600",children:e.notes})]})})})}function Ab({recipes:e,currentId:t,onFlip:n,copyFeedback:r,setCopyFeedback:i,bookmarkFeedback:s,triedFeedback:o,bookmarkedIds:a,onToggleBookmark:l,triedIds:u,onToggleTried:h,onEnlargeCode:d}){const p=R.useRef(null),v=R.useRef(!1),k=R.useMemo(()=>{const _=new Map;return e.forEach((b,w)=>_.set(b.id,w)),_},[e]);return R.useEffect(()=>{const _=k.get(t);if(_!=null&&p.current)try{v.current=!0,p.current.pageFlip().turnToPage(_)}catch{}},[t,k]),e.length===0?C.jsx("div",{className:"relative flex-1 h-full p-2 md:p-6 flex items-center justify-center",children:C.jsx("p",{className:"text-orange-600 text-center",children:"No recipes found"})}):C.jsxs("div",{className:"relative flex-1 h-full p-2 md:p-6",children:[C.jsx(hx,{width:680,height:900,minWidth:300,maxWidth:900,minHeight:600,maxHeight:1400,className:"mx-auto",size:"stretch",showCover:!1,mobileScrollSupport:!0,onFlip:_=>{var y;if(v.current){v.current=!1;return}const b=(_==null?void 0:_.data)??0,w=(y=e[b])==null?void 0:y.id;w&&n(w)},ref:p,children:e.map(_=>C.jsx("div",{className:"bg-transparent",children:C.jsx(T0,{recipe:_,copyFeedback:r,setCopyFeedback:i,bookmarkFeedback:s,triedFeedback:o,isBookmarked:a.has(_.id),onToggleBookmark:l,isTried:u.has(_.id),onToggleTried:h,onEnlargeCode:d})},_.id))},e.map(_=>_.id).join(",")),C.jsxs("div",{className:"absolute inset-x-0 bottom-8 gap-3 flex justify-center pointer-events-none",children:[C.jsx("span",{className:"pointer-events-auto",children:C.jsx(dn,{size:"icon",variant:"secondary",onClick:()=>{var _;return(_=p.current)==null?void 0:_.pageFlip().flipPrev()},"aria-label":"Previous page",children:C.jsx(yx,{className:"size-5"})})}),C.jsx("span",{className:"pointer-events-auto",children:C.jsx(dn,{size:"icon",variant:"secondary",onClick:()=>{var _;return(_=p.current)==null?void 0:_.pageFlip().flipNext()},"aria-label":"Next page",children:C.jsx(vx,{className:"size-5"})})})]})]})}function jb({recipes:e,currentId:t,copyFeedback:n,setCopyFeedback:r,bookmarkFeedback:i,triedFeedback:s,bookmarkedIds:o,onToggleBookmark:a,triedIds:l,onToggleTried:u,onEnlargeCode:h}){const d=R.useRef(null);return R.useEffect(()=>{var v;const p=(v=d.current)==null?void 0:v.querySelector(`[data-id='${t}']`);p==null||p.scrollIntoView({behavior:"smooth",block:"start"})},[t]),e.length===0?C.jsx("div",{className:"flex-1 h-full overflow-auto px-6 py-8 flex items-center justify-center",children:C.jsx("p",{className:"text-orange-600 text-center",children:"No recipes found"})}):C.jsx("div",{ref:d,className:"flex-1 h-full overflow-auto px-6 py-8 space-y-6",children:e.map(p=>C.jsx("div",{"data-id":p.id,children:C.jsx(T0,{recipe:p,copyFeedback:n,setCopyFeedback:r,bookmarkFeedback:i,triedFeedback:s,isBookmarked:o.has(p.id),onToggleBookmark:a,isTried:l.has(p.id),onToggleTried:u,onEnlargeCode:h})},p.id))})}function Mb(){const[e,t]=R.useState(""),[n,r]=R.useState(!1),[i,s]=R.useState(At[0].id),[o,a]=R.useState(!1),[l,u]=R.useState(null),[h,d]=R.useState(null),[p,v]=R.useState([]),[k,_]=R.useState([]),[b]=R.useState(()=>xb()),[w,y]=R.useState(null),[g,c]=R.useState(!1),f=Cb(),m=R.useMemo(()=>new Set(p.map(L=>L.recipe_id)),[p]),x=R.useMemo(()=>new Set(k.map(L=>L.recipe_id)),[k]),S=R.useMemo(()=>At.filter(L=>L.kind!=="intro"),[]),E=S.length;R.useEffect(()=>{sl(b).then(v),ol(b).then(_)},[b]);const A=async L=>{const U=m.has(L);if(console.log("handleToggleBookmark called:",{recipeId:L,isCurrentlyBookmarked:U,sessionId:b,currentBookmarks:p.map(ee=>ee.recipe_id)}),U){console.log("Removing bookmark...");const ee=await Sb(L,b);if(console.log("Remove bookmark result:",ee),ee){const z=await sl(b);console.log("Updated bookmarks after removal:",z.map(M=>M.recipe_id)),v(z)}}else{console.log("Adding bookmark...");const ee=await kb(L,b);if(console.log("Add bookmark result:",ee),ee){const z=await sl(b);console.log("Updated bookmarks after addition:",z.map(M=>M.recipe_id)),v(z),u(L),setTimeout(()=>u(null),2e3)}}},D=async L=>{const U=x.has(L);if(console.log("handleToggleTried called:",{recipeId:L,isCurrentlyTried:U,sessionId:b,currentTried:k.map(ee=>ee.recipe_id)}),U){console.log("Removing tried status...");const ee=await Pb(L,b);if(console.log("Remove tried result:",ee),ee){const z=await ol(b);console.log("Updated tried recipes after removal:",z.map(M=>M.recipe_id)),_(z)}}else{console.log("Adding tried status...");const ee=await _b(L,b);if(console.log("Add tried result:",ee),ee){const z=await ol(b);console.log("Updated tried recipes after addition:",z.map(N=>N.recipe_id)),_(z),d(L),setTimeout(()=>d(null),2e3),z.filter(N=>S.some(T=>T.id===N.recipe_id)).length===E&&X()}}},X=()=>{c(!0);const U=Date.now()+4e3,ee=["#ea580c","#fb923c","#fdba74","#fed7aa"];(function z(){rp({particleCount:3,angle:60,spread:55,origin:{x:0},colors:ee}),rp({particleCount:3,angle:120,spread:55,origin:{x:1},colors:ee}),Date.now()c(!1),5e3)},Q=R.useMemo(()=>{const L=e.trim().toLowerCase();return L?At.filter(U=>{var ee,z;return U.title.toLowerCase().includes(L)||((ee=U.code)==null?void 0:ee.toLowerCase().includes(L))||((z=U.body)==null?void 0:z.toLowerCase().includes(L))}):At},[e]);return R.useEffect(()=>{Q.length>0&&!Q.some(L=>L.id===i)&&s(Q[0].id)},[Q,i]),R.useEffect(()=>{console.assert(Array.isArray(At)&&At.length>0,"SORTED_RECIPES should be a non-empty array"),console.assert(At[0].id==="welcome"&&At[1].id==="welcome-2","Intro should span two pages: welcome, welcome-2");const L=new Set(At.map(U=>U.id));console.assert(L.size===At.length,"Recipe IDs must be unique")},[]),R.useEffect(()=>{const L=U=>{var ee,z;U.key==="ArrowLeft"?(ee=document.querySelector("[aria-label='Previous page']"))==null||ee.click():U.key==="ArrowRight"&&((z=document.querySelector("[aria-label='Next page']"))==null||z.click())};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[]),C.jsxs("div",{className:"min-h-screen h-screen w-full bg-gradient-to-br from-orange-50 via-white to-amber-50 text-zinc-900",children:[C.jsx("header",{className:"sticky top-0 z-30 border-b border-orange-200 bg-white/80 backdrop-blur supports-[backdrop-filter]:bg-white/60",children:C.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-3 md:px-6 md:py-6 flex items-center gap-4",children:[C.jsx("button",{className:"md:hidden",onClick:()=>r(L=>!L),"aria-label":"Toggle menu",children:n?C.jsx(_d,{className:"size-6"}):C.jsx(kx,{className:"size-6"})}),C.jsx(Tb,{className:"scale-100"}),C.jsxs("div",{className:"hidden md:flex items-center gap-2 flex-1 max-w-xs px-8",children:[C.jsx("div",{className:"flex-1 h-2 bg-orange-200 rounded-full overflow-hidden",children:C.jsx("div",{className:"h-full bg-orange-600 transition-all duration-300 ease-out rounded-full",style:{width:`${k.filter(L=>S.some(U=>U.id===L.recipe_id)).length/E*100}%`}})}),C.jsxs("div",{className:"text-xs text-orange-600 font-medium whitespace-nowrap",children:[k.filter(L=>S.some(U=>U.id===L.recipe_id)).length,"/",E," cooked"]})]}),C.jsxs("div",{className:"ml-auto w-full max-w-md relative hidden md:block",children:[C.jsx(dx,{value:e,onChange:L=>t(L.target.value),placeholder:"Search recipes, commands, or code",className:"pl-8 text-orange-600"}),C.jsx(Sx,{className:"absolute left-3 top-3 size-4 text-orange-600"})]})]})}),C.jsxs("main",{className:"max-w-7xl mx-auto h-[calc(100vh-60px)] md:h-[calc(100vh-130px)] flex relative",children:[C.jsx("div",{className:"hidden md:block",children:C.jsx(Rb,{items:Q,currentId:i,onSelect:s,open:!0,bookmarkedIds:m,triedIds:x})}),C.jsx(Nn,{children:n&&C.jsx(Ft.div,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{duration:.18},className:"fixed z-40 top-[61px] md:top-[89px] bottom-0 left-0 w-72 bg-white border-r border-orange-200 md:hidden overflow-auto shadow-lg",children:C.jsxs("div",{className:"h-full w-full p-6 flex flex-col gap-3",children:[C.jsxs("div",{className:"flex items-center gap-2 px-1 py-1",children:[C.jsx(ym,{className:"size-5"}),C.jsx("div",{className:"font-semibold tracking-tight",children:"Pubky SDK Cookbook"})]}),C.jsx("nav",{className:"flex-1 overflow-auto pr-1",children:la.map(L=>C.jsxs("div",{className:"mb-2",children:[C.jsx("div",{className:"px-1 pb-1 text-xs uppercase tracking-wide text-orange-600 font-semibold",children:L.label}),C.jsx("ul",{className:"space-y-1",children:Q.filter(U=>U.kind===L.id).map(U=>C.jsx("li",{children:C.jsxs("button",{onClick:()=>{s(U.id),r(!1)},className:`text-left w-full rounded-xl px-3 py-1 hover:bg-orange-50 transition-colors flex items-center justify-between gap-2 ${i===U.id?"bg-orange-100 text-orange-600":"text-zinc-700"}`,children:[C.jsx("div",{className:"text-xs font-medium leading-snug flex-1",children:U.title}),C.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[x.has(U.id)&&C.jsx(km,{className:"size-3.5 text-orange-600"}),m.has(U.id)&&C.jsx(vm,{className:"size-3.5 fill-orange-600 text-orange-600"})]})]})},U.id))})]},L.id))})]})})}),C.jsx("section",{className:"flex-1 h-full relative",children:f?C.jsx(jb,{recipes:Q,currentId:i,copyFeedback:o,setCopyFeedback:a,bookmarkFeedback:l,triedFeedback:h,bookmarkedIds:m,onToggleBookmark:A,triedIds:x,onToggleTried:D,onEnlargeCode:y}):C.jsx(Ab,{recipes:Q,currentId:i,onFlip:s,copyFeedback:o,setCopyFeedback:a,bookmarkFeedback:l,triedFeedback:h,bookmarkedIds:m,onToggleBookmark:A,triedIds:x,onToggleTried:D,onEnlargeCode:y})})]}),C.jsx("footer",{className:"border-t border-orange-200 text-xs text-orange-600 py-3 bg-white/50",children:C.jsxs("div",{className:"max-w-7xl mx-auto px-4 flex items-center justify-between",children:[C.jsxs("div",{children:["Cooky v.0.7 © ",new Date().getFullYear()," • Built for Pubky SDK v0.6 • ",C.jsx("a",{className:"hover:underline",href:"https://docs.rs/pubky/0.6.0-rc.6/pubky/index.html",target:"_blank",rel:"noreferrer",children:"Docs •"})," ",C.jsx("a",{className:"hover:underline",href:"https://crates.io/crates/pubky/0.6.0-rc.6",target:"_blank",rel:"noreferrer",children:"Crates"})]}),C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx("a",{className:"hover:underline",href:"https://pubky.org",target:"_blank",rel:"noreferrer",children:"pubky.org"}),C.jsx("a",{className:"hover:underline",href:"https://pubky.app",target:"_blank",rel:"noreferrer",children:"pubky.app"}),C.jsx("a",{className:"hover:underline",href:"https://pubkyring.app",target:"_blank",rel:"noreferrer",children:"pubkyring.app"})]})]})}),C.jsx(Nn,{children:o&&C.jsx(Ft.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},className:"fixed bottom-8 left-1/2 -translate-x-1/2 bg-orange-600 text-white px-6 py-3 rounded-full shadow-lg font-semibold text-sm z-50",children:"Code copied! Let's cook! 👨🍳"})}),C.jsx(Nn,{children:h&&C.jsxs(Ft.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},className:"fixed bottom-8 left-1/2 -translate-x-1/2 bg-orange-600 text-white px-6 py-3 rounded-full shadow-lg font-semibold text-sm z-50 flex items-center gap-2",children:[C.jsx(xm,{className:"size-5"}),"Cooked Recipe! 👨🍳 🍔"]})}),C.jsx(Nn,{children:l&&C.jsxs(Ft.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},className:"fixed bottom-8 left-1/2 -translate-x-1/2 bg-orange-600 text-white px-6 py-3 rounded-full shadow-lg font-semibold text-sm z-50 flex items-center gap-2",children:[C.jsx(wm,{className:"size-5"}),"Bookmarked! 📖"]})}),C.jsx(Nn,{children:w&&C.jsx(Ft.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:()=>y(null),children:C.jsxs(Ft.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"bg-white rounded-2xl shadow-2xl max-w-5xl w-full max-h-[90vh] overflow-hidden relative",onClick:L=>L.stopPropagation(),children:[C.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-orange-200 bg-orange-50",children:[C.jsx("h3",{className:"text-lg font-semibold text-orange-600",children:"Code View"}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsxs(dn,{size:"sm",variant:"secondary",onClick:()=>{navigator.clipboard.writeText(w),a(!0),setTimeout(()=>a(!1),2e3)},title:"Copy to clipboard",children:[C.jsx(Sm,{className:"size-4 mr-1"}),"Copy"]}),C.jsx(dn,{size:"sm",variant:"secondary",onClick:()=>y(null),title:"Close",children:C.jsx(_d,{className:"size-5"})})]})]}),C.jsx("div",{className:"overflow-auto max-h-[calc(90vh-80px)] p-6",children:C.jsx(t0,{code:w})})]})})}),C.jsx(Nn,{children:g&&C.jsx(Ft.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:"spring",damping:15,stiffness:200},className:"fixed inset-0 z-[60] flex items-center justify-center pointer-events-none",children:C.jsxs("div",{className:"bg-orange-600 text-white px-12 py-8 rounded-3xl shadow-2xl text-center",children:[C.jsx(Ft.div,{initial:{rotate:-10},animate:{rotate:10},transition:{repeat:1/0,repeatType:"reverse",duration:.5},className:"text-7xl mb-4",children:"🎉"}),C.jsx("h2",{className:"text-4xl font-bold mb-2",children:"Congratulations!"}),C.jsx("p",{className:"text-2xl",children:"You're a Pubky Chef now!"})]})})})]})}mm(document.getElementById("root")).render(C.jsx(R.StrictMode,{children:C.jsx(Mb,{})}))});export default Ob();
diff --git a/cooky/dist/assets/index-Bgo_tuuw.css b/cooky/dist/assets/index-Bgo_tuuw.css
new file mode 100644
index 0000000..7e4d3cc
--- /dev/null
+++ b/cooky/dist/assets/index-Bgo_tuuw.css
@@ -0,0 +1 @@
+@import"https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&display=swap";@import"https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter Tight,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{font-family:Inter Tight,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}pre,code,code span{font-family:Fira Code,Fira Code,Courier New,monospace!important;font-feature-settings:"calt" 1}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.top-0{top:0}.top-3{top:.75rem}.top-\[61px\]{top:61px}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-1{margin-top:.25rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.h-10{height:2.5rem}.h-2{height:.5rem}.h-\[calc\(100vh-60px\)\]{height:calc(100vh - 60px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[420px\]{max-height:420px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(90vh-80px\)\]{max-height:calc(90vh - 80px)}.min-h-screen{min-height:100vh}.w-72{width:18rem}.w-8{width:2rem}.w-auto{width:auto}.w-full{width:100%}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.\!border-orange-600{--tw-border-opacity: 1 !important;border-color:rgb(234 88 12 / var(--tw-border-opacity, 1))!important}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-300\/50{border-color:#fdba7480}.\!bg-orange-600{--tw-bg-opacity: 1 !important;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))!important}.bg-black\/60{background-color:#0009}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-600{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/50{background-color:#ffffff80}.bg-white\/80{background-color:#fffc}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity, 1))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-orange-50{--tw-gradient-from: #fff7ed var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 247 237 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-white{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fff var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-50{--tw-gradient-to: #fffbeb var(--tw-gradient-to-position)}.fill-orange-600{fill:#ea580c}.fill-white{fill:#fff}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-4{padding-right:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-7xl{font-size:4.5rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity, 1))}.text-pink-400{--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-zinc-200{--tw-text-opacity: 1;color:rgb(228 228 231 / var(--tw-text-opacity, 1))}.text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.text-zinc-700{--tw-text-opacity: 1;color:rgb(63 63 70 / var(--tw-text-opacity, 1))}.text-zinc-900{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-zinc-950{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity, 1))}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_8px_40px_rgba\(217\,119\,6\,0\.12\)\]{--tw-shadow: 0 8px 40px rgba(217,119,6,.12);--tw-shadow-colored: 0 8px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-offset-white{--tw-ring-offset-color: #fff}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-orange-600::-moz-placeholder{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.placeholder\:text-orange-600::placeholder{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.first\:mt-0:first-child{margin-top:0}.hover\:\!bg-orange-700:hover{--tw-bg-opacity: 1 !important;background-color:rgb(194 65 12 / var(--tw-bg-opacity, 1))!important}.hover\:bg-orange-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.hover\:bg-orange-700:hover{--tw-bg-opacity: 1;background-color:rgb(194 65 12 / var(--tw-bg-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-orange-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity, 1))}.focus\:ring-orange-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 88 12 / var(--tw-ring-opacity, 1))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-orange-600:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 88 12 / var(--tw-ring-opacity, 1))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@supports ((-webkit-backdrop-filter: var(--tw)) or (backdrop-filter: var(--tw))){.supports-\[backdrop-filter\]\:bg-white\/60{background-color:#fff9}}@media (min-width: 768px){.md\:top-\[89px\]{top:89px}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-\[calc\(100vh-130px\)\]{height:calc(100vh - 130px)}.md\:flex-col{flex-direction:column}.md\:p-6{padding:1.5rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}}
diff --git a/cooky/dist/cooky-logo-animated.mp4 b/cooky/dist/cooky-logo-animated.mp4
new file mode 100644
index 0000000000000000000000000000000000000000..4812197cb225c93a7eaa2b83223e9909a6788ca1
GIT binary patch
literal 667703
zcmeFXWl&w+wkWu9cY+6Zc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