@clicktap/ui 0.18.9 → 0.18.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Image/Image.js +1 -1
- package/components/Image/index.js +1 -1
- package/components/Menu/Menu.js +1 -1
- package/components/ModalOverlay/ModalOverlay.js +1 -1
- package/components/UploadImage/UploadImage.js +1 -1
- package/components/UploadImage/index.js +1 -1
- package/hooks/useRoute/index.js +1 -1
- package/hooks/useRoute/useRoute.js +1 -1
- package/package.json +1 -1
- package/assets/_interop_require_wildcard--0BIJI4E.js +0 -1
- package/assets/image-BrrnSrBZ.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as g,Component as u}from"react";import
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as g,Component as u}from"react";import y from"next/image";import{cn as S}from"../../utils/cn.js";import w from"../../hooks/useIsClient.js";const c=new Set;function m(i){return typeof i=="string"?i:JSON.stringify(i)}class E extends u{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){if(this.state.hasError){c.add(m(this.props.src));const{src:r,alt:o,className:t,style:n,width:a,height:s}=this.props,h=typeof r=="string"?r:typeof r=="object"&&"src"in r?r.src:"";return e("img",{src:h,alt:o??"",className:t,style:n,width:a,height:s,loading:"lazy"})}return this.props.children}}function C({src:i,className:r,style:o,...t}){const[n,a]=g(!0),[s,h]=g(null),f=w(),d="width"in t&&"height"in t&&!("fill"in t)?{height:"auto",...o}:o,l=m(i);if(s===i||c.has(l)){const p=typeof i=="string"?i:typeof i=="object"&&"src"in i?i.src:"";return e("img",{src:p,alt:t.alt??"",className:r,style:d,width:"width"in t?t.width:void 0,height:"height"in t?t.height:void 0,loading:"lazy"})}return e(E,{src:i,alt:t.alt,className:r,style:d,width:"width"in t?t.width:void 0,height:"height"in t?t.height:void 0,children:e(y,{src:i,className:S("transition-[filter] ease-linear duration-200",f&&n&&"blur-md",r),style:d,onError:()=>h(i),onLoad:()=>a(!1),...t})},l)}export{C as Image,C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Image as
|
|
1
|
+
import{Image as a}from"./Image.js";import"react/jsx-runtime";import"react";import"next/image";import"../../utils/cn.js";import"../../hooks/useIsClient.js";export{a as Image};
|
package/components/Menu/Menu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as Pe,jsxs as Xe,Fragment as Ct}from"react/jsx-runtime";import*as g from"react";import{useLayoutEffect as st,useEffect as Pt,useRef as ct,useState as Ot,useId as St,cloneElement as Tt}from"react";import{motion as At}from"framer-motion";import*as Dt from"react-dom";function lt(e){return ut(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lt(e){var t;return(t=(ut(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ut(e){return e instanceof Node||e instanceof se(e).Node}function _(e){return e instanceof Element||e instanceof se(e).Element}function xe(e){return e instanceof HTMLElement||e instanceof se(e).HTMLElement}function Le(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function Mt(e){return["html","body","#document"].includes(lt(e))}function kt(e){return se(e).getComputedStyle(e)}function Ft(e){if(lt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Le(e)&&e.host||Lt(e);return Le(t)?t.host:t}function It(e){let t=e.activeElement;for(;((n=t)==null||(o=n.shadowRoot)==null?void 0:o.activeElement)!=null;){var n,o;t=t.shadowRoot.activeElement}return t}function ie(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Le(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function $t(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Nt(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:o}=t;return n+"/"+o}).join(" "):navigator.userAgent}function _t(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test($t())||t.test(Nt()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Bt(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function pe(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Vt(e){return"nativeEvent"in e}function Wt(e){return e.matches("html,body")}function z(e){return e?.ownerDocument||document}function ae(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Ht(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Kt="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function jt(e){return xe(e)&&e.matches(Kt)}const ne=Math.min,Q=Math.max,he=Math.round,fe=Math.floor,K=e=>({x:e,y:e}),Xt={left:"right",right:"left",bottom:"top",top:"bottom"},zt={start:"end",end:"start"};function Me(e,t,n){return Q(e,ne(t,n))}function ce(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function le(e){return e.split("-")[1]}function ft(e){return e==="x"?"y":"x"}function Ne(e){return e==="y"?"height":"width"}const Yt=new Set(["top","bottom"]);function Y(e){return Yt.has(Z(e))?"y":"x"}function _e(e){return ft(Y(e))}function Ut(e,t,n){n===void 0&&(n=!1);const o=le(e),r=_e(e),i=Ne(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ve(s)),[s,ve(s)]}function qt(e){const t=ve(e);return[ke(e),t,ke(t)]}function ke(e){return e.replace(/start|end/g,t=>zt[t])}const ze=["left","right"],Ye=["right","left"],Gt=["top","bottom"],Qt=["bottom","top"];function Zt(e,t,n){switch(e){case"top":case"bottom":return n?t?Ye:ze:t?ze:Ye;case"left":case"right":return t?Gt:Qt;default:return[]}}function Jt(e,t,n,o){const r=le(e);let i=Zt(Z(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(ke)))),i}function ve(e){return e.replace(/left|right|bottom|top/g,t=>Xt[t])}function en(e){return{top:0,right:0,bottom:0,left:0,...e}}function at(e){return typeof e!="number"?en(e):{top:e,right:e,bottom:e,left:e}}function ye(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Ue(e,t,n){let{reference:o,floating:r}=e;const i=Y(t),s=_e(t),c=Ne(s),f=Z(t),u=i==="y",d=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let l;switch(f){case"top":l={x:d,y:o.y-r.height};break;case"bottom":l={x:d,y:o.y+o.height};break;case"right":l={x:o.x+o.width,y:a};break;case"left":l={x:o.x-r.width,y:a};break;default:l={x:o.x,y:o.y}}switch(le(t)){case"start":l[s]-=m*(n&&u?-1:1);break;case"end":l[s]+=m*(n&&u?-1:1);break}return l}async function tn(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:a="floating",altBoundary:m=!1,padding:l=0}=ce(t,e),p=at(l),R=c[m?a==="floating"?"reference":"floating":a],x=ye(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(R)))==null||n?R:R.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:f})),C=a==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),E=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},O=ye(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:T,strategy:f}):C);return{top:(x.top-O.top+p.top)/E.y,bottom:(O.bottom-x.bottom+p.bottom)/E.y,left:(x.left-O.left+p.left)/E.x,right:(O.right-x.right+p.right)/E.x}}const nn=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:a}=Ue(u,o,f),m=o,l={},p=0;for(let R=0;R<c.length;R++){var h;const{name:x,fn:C}=c[R],{x:T,y:E,data:O,reset:P}=await C({x:d,y:a,initialPlacement:o,placement:m,strategy:r,middlewareData:l,rects:u,platform:{...s,detectOverflow:(h=s.detectOverflow)!=null?h:tn},elements:{reference:e,floating:t}});d=T??d,a=E??a,l={...l,[x]:{...l[x],...O}},P&&p<=50&&(p++,typeof P=="object"&&(P.placement&&(m=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:d,y:a}=Ue(u,m,f)),R=-1)}return{x:d,y:a,placement:m,strategy:r,middlewareData:l}},on=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:f}=t,{element:u,padding:d=0}=ce(e,t)||{};if(u==null)return{};const a=at(d),m={x:n,y:o},l=_e(r),p=Ne(l),h=await s.getDimensions(u),R=l==="y",x=R?"top":"left",C=R?"bottom":"right",T=R?"clientHeight":"clientWidth",E=i.reference[p]+i.reference[l]-m[l]-i.floating[p],O=m[l]-i.reference[l],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let v=P?P[T]:0;(!v||!await(s.isElement==null?void 0:s.isElement(P)))&&(v=c.floating[T]||i.floating[p]);const k=E/2-O/2,$=v/2-h[p]/2-1,I=ne(a[x],$),A=ne(a[C],$),M=I,b=v-h[p]-A,y=v/2-h[p]/2+k,S=Me(M,y,b),L=!f.arrow&&le(r)!=null&&y!==S&&i.reference[p]/2-(y<M?I:A)-h[p]/2<0,F=L?y<M?y-M:y-b:0;return{[l]:m[l]+F,data:{[l]:S,centerOffset:y-S-F,...L&&{alignmentOffset:F}},reset:L}}}),rn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:f,elements:u}=t,{mainAxis:d=!0,crossAxis:a=!0,fallbackPlacements:m,fallbackStrategy:l="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...R}=ce(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Z(r),C=Y(c),T=Z(c)===c,E=await(f.isRTL==null?void 0:f.isRTL(u.floating)),O=m||(T||!h?[ve(c)]:qt(c)),P=p!=="none";!m&&P&&O.push(...Jt(c,h,p,E));const v=[c,...O],k=await f.detectOverflow(t,R),$=[];let I=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&$.push(k[x]),a){const y=Ut(r,s,E);$.push(k[y[0]],k[y[1]])}if(I=[...I,{placement:r,overflows:$}],!$.every(y=>y<=0)){var A,M;const y=(((A=i.flip)==null?void 0:A.index)||0)+1,S=v[y];if(S&&(!(a==="alignment"?C!==Y(S):!1)||I.every(w=>Y(w.placement)===C?w.overflows[0]>0:!0)))return{data:{index:y,overflows:I},reset:{placement:S}};let L=(M=I.filter(F=>F.overflows[0]<=0).sort((F,w)=>F.overflows[1]-w.overflows[1])[0])==null?void 0:M.placement;if(!L)switch(l){case"bestFit":{var b;const F=(b=I.filter(w=>{if(P){const D=Y(w.placement);return D===C||D==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(D=>D>0).reduce((D,N)=>D+N,0)]).sort((w,D)=>w[1]-D[1])[0])==null?void 0:b[0];F&&(L=F);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}},sn=new Set(["left","top"]);async function cn(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Z(n),c=le(n),f=Y(n)==="y",u=sn.has(s)?-1:1,d=i&&f?-1:1,a=ce(t,e);let{mainAxis:m,crossAxis:l,alignmentAxis:p}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return c&&typeof p=="number"&&(l=c==="end"?p*-1:p),f?{x:l*d,y:m*u}:{x:m*u,y:l*d}}const ln=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,f=await cn(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:s}}}}},un=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:x=>{let{x:C,y:T}=x;return{x:C,y:T}}},...u}=ce(e,t),d={x:n,y:o},a=await i.detectOverflow(t,u),m=Y(Z(r)),l=ft(m);let p=d[l],h=d[m];if(s){const x=l==="y"?"top":"left",C=l==="y"?"bottom":"right",T=p+a[x],E=p-a[C];p=Me(T,p,E)}if(c){const x=m==="y"?"top":"left",C=m==="y"?"bottom":"right",T=h+a[x],E=h-a[C];h=Me(T,h,E)}const R=f.fn({...t,[l]:p,[m]:h});return{...R,data:{x:R.x-n,y:R.y-o,enabled:{[l]:s,[m]:c}}}}}};function be(){return typeof window<"u"}function re(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function X(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return be()?e instanceof Node||e instanceof B(e).Node:!1}function V(e){return be()?e instanceof Element||e instanceof B(e).Element:!1}function j(e){return be()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function qe(e){return!be()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}const fn=new Set(["inline","contents"]);function ue(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!fn.has(r)}const an=new Set(["table","td","th"]);function dn(e){return an.has(re(e))}const mn=[":popover-open",":modal"];function Ee(e){return mn.some(t=>{try{return e.matches(t)}catch{return!1}})}const gn=["transform","translate","scale","rotate","perspective"],pn=["transform","translate","scale","rotate","perspective","filter"],hn=["paint","layout","strict","content"];function Be(e){const t=Ve(),n=V(e)?W(e):e;return gn.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||pn.some(o=>(n.willChange||"").includes(o))||hn.some(o=>(n.contain||"").includes(o))}function vn(e){let t=G(e);for(;j(t)&&!oe(t);){if(Be(t))return t;if(Ee(t))return null;t=G(t)}return null}function Ve(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yn=new Set(["html","body","#document"]);function oe(e){return yn.has(re(e))}function W(e){return B(e).getComputedStyle(e)}function Re(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if(re(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qe(e)&&e.host||X(e);return qe(t)?t.host:t}function mt(e){const t=G(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&ue(t)?t:mt(t)}function U(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=mt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=B(r);if(i){const c=Fe(s);return t.concat(s,s.visualViewport||[],ue(r)?r:[],c&&n?U(c):[])}return t.concat(r,U(r,[],n))}function Fe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gt(e){const t=W(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=j(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=he(n)!==i||he(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function We(e){return V(e)?e:e.contextElement}function te(e){const t=We(e);if(!j(t))return K(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=gt(t);let s=(i?he(n.width):n.width)/o,c=(i?he(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const wn=K(0);function pt(e){const t=B(e);return!Ve()||!t.visualViewport?wn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function J(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=We(e);let s=K(1);t&&(o?V(o)&&(s=te(o)):s=te(e));const c=xn(i,n,o)?pt(i):K(0);let f=(r.left+c.x)/s.x,u=(r.top+c.y)/s.y,d=r.width/s.x,a=r.height/s.y;if(i){const m=B(i),l=o&&V(o)?B(o):o;let p=m,h=Fe(p);for(;h&&o&&l!==p;){const R=te(h),x=h.getBoundingClientRect(),C=W(h),T=x.left+(h.clientLeft+parseFloat(C.paddingLeft))*R.x,E=x.top+(h.clientTop+parseFloat(C.paddingTop))*R.y;f*=R.x,u*=R.y,d*=R.x,a*=R.y,f+=T,u+=E,p=B(h),h=Fe(p)}}return ye({width:d,height:a,x:f,y:u})}function Ce(e,t){const n=Re(e).scrollLeft;return t?t.left+n:J(X(e)).left+n}function ht(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Ce(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function bn(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=X(o),c=t?Ee(t.floating):!1;if(o===s||c&&i)return n;let f={scrollLeft:0,scrollTop:0},u=K(1);const d=K(0),a=j(o);if((a||!a&&!i)&&((re(o)!=="body"||ue(s))&&(f=Re(o)),j(o))){const l=J(o);u=te(o),d.x=l.x+o.clientLeft,d.y=l.y+o.clientTop}const m=s&&!a&&!i?ht(s,f):K(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-f.scrollTop*u.y+d.y+m.y}}function En(e){return Array.from(e.getClientRects())}function Rn(e){const t=X(e),n=Re(e),o=e.ownerDocument.body,r=Q(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=Q(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ce(e);const c=-n.scrollTop;return W(o).direction==="rtl"&&(s+=Q(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const Ge=25;function Cn(e,t){const n=B(e),o=X(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,f=0;if(r){i=r.width,s=r.height;const d=Ve();(!d||d&&t==="fixed")&&(c=r.offsetLeft,f=r.offsetTop)}const u=Ce(o);if(u<=0){const d=o.ownerDocument,a=d.body,m=getComputedStyle(a),l=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(o.clientWidth-a.clientWidth-l);p<=Ge&&(i-=p)}else u<=Ge&&(i+=u);return{width:i,height:s,x:c,y:f}}const Pn=new Set(["absolute","fixed"]);function On(e,t){const n=J(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=j(e)?te(e):K(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,f=r*i.x,u=o*i.y;return{width:s,height:c,x:f,y:u}}function Qe(e,t,n){let o;if(t==="viewport")o=Cn(e,n);else if(t==="document")o=Rn(X(e));else if(V(t))o=On(t,n);else{const r=pt(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ye(o)}function vt(e,t){const n=G(e);return n===t||!V(n)||oe(n)?!1:W(n).position==="fixed"||vt(n,t)}function Sn(e,t){const n=t.get(e);if(n)return n;let o=U(e,[],!1).filter(c=>V(c)&&re(c)!=="body"),r=null;const i=W(e).position==="fixed";let s=i?G(e):e;for(;V(s)&&!oe(s);){const c=W(s),f=Be(s);!f&&c.position==="fixed"&&(r=null),(i?!f&&!r:!f&&c.position==="static"&&!!r&&Pn.has(r.position)||ue(s)&&!f&&vt(e,s))?o=o.filter(d=>d!==s):r=c,s=G(s)}return t.set(e,o),o}function Tn(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Ee(t)?[]:Sn(t,this._c):[].concat(n),o],c=s[0],f=s.reduce((u,d)=>{const a=Qe(t,d,r);return u.top=Q(a.top,u.top),u.right=ne(a.right,u.right),u.bottom=ne(a.bottom,u.bottom),u.left=Q(a.left,u.left),u},Qe(t,c,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function An(e){const{width:t,height:n}=gt(e);return{width:t,height:n}}function Dn(e,t,n){const o=j(t),r=X(t),i=n==="fixed",s=J(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const f=K(0);function u(){f.x=Ce(r)}if(o||!o&&!i)if((re(t)!=="body"||ue(r))&&(c=Re(t)),o){const l=J(t,!0,i,t);f.x=l.x+t.clientLeft,f.y=l.y+t.clientTop}else r&&u();i&&!o&&r&&u();const d=r&&!o&&!i?ht(r,c):K(0),a=s.left+c.scrollLeft-f.x-d.x,m=s.top+c.scrollTop-f.y-d.y;return{x:a,y:m,width:s.width,height:s.height}}function Oe(e){return W(e).position==="static"}function Ze(e,t){if(!j(e)||W(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return X(e)===n&&(n=n.ownerDocument.body),n}function yt(e,t){const n=B(e);if(Ee(e))return n;if(!j(e)){let r=G(e);for(;r&&!oe(r);){if(V(r)&&!Oe(r))return r;r=G(r)}return n}let o=Ze(e,t);for(;o&&dn(o)&&Oe(o);)o=Ze(o,t);return o&&oe(o)&&Oe(o)&&!Be(o)?n:o||vn(e)||n}const Ln=async function(e){const t=this.getOffsetParent||yt,n=this.getDimensions,o=await n(e.floating);return{reference:Dn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Mn(e){return W(e).direction==="rtl"}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:bn,getDocumentElement:X,getClippingRect:Tn,getOffsetParent:yt,getElementRects:Ln,getClientRects:En,getDimensions:An,getScale:te,isElement:V,isRTL:Mn};function xt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kn(e,t){let n=null,o;const r=X(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),i();const u=e.getBoundingClientRect(),{left:d,top:a,width:m,height:l}=u;if(c||t(),!m||!l)return;const p=fe(a),h=fe(r.clientWidth-(d+m)),R=fe(r.clientHeight-(a+l)),x=fe(d),T={rootMargin:-p+"px "+-h+"px "+-R+"px "+-x+"px",threshold:Q(0,ne(1,f))||1};let E=!0;function O(P){const v=P[0].intersectionRatio;if(v!==f){if(!E)return s();v?s(!1,v):o=setTimeout(()=>{s(!1,1e-7)},1e3)}v===1&&!xt(u,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(O,{...T,root:r.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(e)}return s(!0),i}function Fn(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,u=We(e),d=r||i?[...u?U(u):[],...U(t)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const a=u&&c?kn(u,n):null;let m=-1,l=null;s&&(l=new ResizeObserver(x=>{let[C]=x;C&&C.target===u&&l&&(l.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var T;(T=l)==null||T.observe(t)})),n()}),u&&!f&&l.observe(u),l.observe(t));let p,h=f?J(e):null;f&&R();function R(){const x=J(e);h&&!xt(h,x)&&n(),h=x,p=requestAnimationFrame(R)}return n(),()=>{var x;d.forEach(C=>{r&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),a?.(),(x=l)==null||x.disconnect(),l=null,f&&cancelAnimationFrame(p)}}const In=ln,$n=un,Nn=rn,Je=on,_n=(e,t,n)=>{const o=new Map,r={platform:wt,...n},i={...r.platform,_c:o};return nn(e,t,{...r,platform:i})};var Bn=typeof document<"u",Vn=function(){},de=Bn?st:Vn;function we(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!we(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!we(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function bt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function et(e,t){const n=bt(e);return Math.round(t*n)/n}function Se(e){const t=g.useRef(e);return de(()=>{t.current=e}),t}function Wn(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:f,open:u}=e,[d,a]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,l]=g.useState(o);we(m,o)||l(o);const[p,h]=g.useState(null),[R,x]=g.useState(null),C=g.useCallback(w=>{w!==P.current&&(P.current=w,h(w))},[]),T=g.useCallback(w=>{w!==v.current&&(v.current=w,x(w))},[]),E=i||p,O=s||R,P=g.useRef(null),v=g.useRef(null),k=g.useRef(d),$=f!=null,I=Se(f),A=Se(r),M=Se(u),b=g.useCallback(()=>{if(!P.current||!v.current)return;const w={placement:t,strategy:n,middleware:m};A.current&&(w.platform=A.current),_n(P.current,v.current,w).then(D=>{const N={...D,isPositioned:M.current!==!1};y.current&&!we(k.current,N)&&(k.current=N,Dt.flushSync(()=>{a(N)}))})},[m,t,n,A,M]);de(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,a(w=>({...w,isPositioned:!1})))},[u]);const y=g.useRef(!1);de(()=>(y.current=!0,()=>{y.current=!1}),[]),de(()=>{if(E&&(P.current=E),O&&(v.current=O),E&&O){if(I.current)return I.current(E,O,b);b()}},[E,O,b,I,$]);const S=g.useMemo(()=>({reference:P,floating:v,setReference:C,setFloating:T}),[C,T]),L=g.useMemo(()=>({reference:E,floating:O}),[E,O]),F=g.useMemo(()=>{const w={position:n,left:0,top:0};if(!L.floating)return w;const D=et(L.floating,d.x),N=et(L.floating,d.y);return c?{...w,transform:"translate("+D+"px, "+N+"px)",...bt(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:N}},[n,c,L.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:b,refs:S,elements:L,floatingStyles:F}),[d,b,S,L,F])}const Hn=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Je({element:o.current,padding:r}).fn(n):{}:o?Je({element:o,padding:r}).fn(n):{}}}},Kn=(e,t)=>({...In(e),options:[e,t]}),jn=(e,t)=>({...$n(e),options:[e,t]}),Xn=(e,t)=>({...Nn(e),options:[e,t]}),zn=(e,t)=>({...Hn(e),options:[e,t]});var q=typeof document<"u"?st:Pt;function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ie.apply(this,arguments)}let Te=!1,Yn=0;const tt=()=>"floating-ui-"+Yn++;function Un(){const[e,t]=g.useState(()=>Te?tt():void 0);return q(()=>{e==null&&t(tt())},[]),g.useEffect(()=>{Te||(Te=!0)},[]),e}const qn=g.useId,He=qn||Un,Gn=g.forwardRef(function(t,n){let{context:{placement:o,elements:{floating:r},middlewareData:{arrow:i}},width:s=14,height:c=7,tipRadius:f=0,strokeWidth:u=0,staticOffset:d,stroke:a,d:m,style:{transform:l,...p}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||console.warn("Floating UI: The `ref` prop is required for the `FloatingArrow`","component."));const R=He();if(!r)return null;u*=2;const x=u/2,C=s/2*(f/-8+1),T=c/2*f/4,[E,O]=o.split("-"),P=wt.isRTL(r),v=!!m,k=E==="top"||E==="bottom",$=d&&O==="end"?"bottom":"top";let I=d&&O==="end"?"right":"left";d&&P&&(I=O==="end"?"left":"right");const A=i?.x!=null?d||i.x:"",M=i?.y!=null?d||i.y:"",b=m||"M0,0"+(" H"+s)+(" L"+(s-C)+","+(c-T))+(" Q"+s/2+","+c+" "+C+","+(c-T))+" Z",y={top:v?"rotate(180deg)":"",left:v?"rotate(90deg)":"rotate(-90deg)",bottom:v?"":"rotate(180deg)",right:v?"rotate(-90deg)":"rotate(90deg)"}[E];return g.createElement("svg",Ie({},h,{"aria-hidden":!0,ref:n,width:v?s:s+u,height:s,viewBox:"0 0 "+s+" "+(c>s?c:s),style:{position:"absolute",pointerEvents:"none",[I]:A,[$]:M,[E]:k||v?"100%":"calc(100% - "+u/2+"px)",transform:""+y+(l??""),...p}}),u>0&&g.createElement("path",{clipPath:"url(#"+R+")",fill:"none",stroke:a,strokeWidth:u+(m?0:1),d:b}),g.createElement("path",{stroke:u&&!m?h.fill:"none",d:b}),g.createElement("clipPath",{id:R},g.createElement("rect",{x:-x,y:x*(v?-1:1),width:s+u,height:s})))});function Qn(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,((o=e.get(t))==null?void 0:o.filter(r=>r!==n))||[])}}}const Zn=g.createContext(null),Jn=g.createContext(null),Et=()=>{var e;return((e=g.useContext(Zn))==null?void 0:e.id)||null},Ke=()=>g.useContext(Jn);function je(e){return"data-floating-ui-"+e}function nt(e){const t=ct(e);return q(()=>{t.current=e}),t}const ot=je("safe-polygon");function me(e,t,n){return n&&!pe(n)?0:typeof e=="number"?e:e?.[t]}function eo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:r,events:i,elements:{domReference:s,floating:c},refs:f}=e,{enabled:u=!0,delay:d=0,handleClose:a=null,mouseOnly:m=!1,restMs:l=0,move:p=!0}=t,h=Ke(),R=Et(),x=nt(a),C=nt(d),T=g.useRef(),E=g.useRef(),O=g.useRef(),P=g.useRef(),v=g.useRef(!0),k=g.useRef(!1),$=g.useRef(()=>{}),I=g.useCallback(()=>{var y;const S=(y=r.current.openEvent)==null?void 0:y.type;return S?.includes("mouse")&&S!=="mousedown"},[r]);g.useEffect(()=>{if(!u)return;function y(){clearTimeout(E.current),clearTimeout(P.current),v.current=!0}return i.on("dismiss",y),()=>{i.off("dismiss",y)}},[u,i]),g.useEffect(()=>{if(!u||!x.current||!n)return;function y(L){I()&&o(!1,L)}const S=z(c).documentElement;return S.addEventListener("mouseleave",y),()=>{S.removeEventListener("mouseleave",y)}},[c,n,o,u,x,r,I]);const A=g.useCallback(function(y,S){S===void 0&&(S=!0);const L=me(C.current,"close",T.current);L&&!O.current?(clearTimeout(E.current),E.current=setTimeout(()=>o(!1,y),L)):S&&(clearTimeout(E.current),o(!1,y))},[C,o]),M=g.useCallback(()=>{$.current(),O.current=void 0},[]),b=g.useCallback(()=>{if(k.current){const y=z(f.floating.current).body;y.style.pointerEvents="",y.removeAttribute(ot),k.current=!1}},[f]);return g.useEffect(()=>{if(!u)return;function y(){return r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1}function S(w){if(clearTimeout(E.current),v.current=!1,m&&!pe(T.current)||l>0&&me(C.current,"open")===0)return;const D=me(C.current,"open",T.current);D?E.current=setTimeout(()=>{o(!0,w)},D):o(!0,w)}function L(w){if(y())return;$.current();const D=z(c);if(clearTimeout(P.current),x.current){n||clearTimeout(E.current),O.current=x.current({...e,tree:h,x:w.clientX,y:w.clientY,onClose(){b(),M(),A(w)}});const H=O.current;D.addEventListener("mousemove",H),$.current=()=>{D.removeEventListener("mousemove",H)};return}(T.current!=="touch"||!ie(c,w.relatedTarget))&&A(w)}function F(w){y()||x.current==null||x.current({...e,tree:h,x:w.clientX,y:w.clientY,onClose(){b(),M(),A(w)}})(w)}if(_(s)){const w=s;return n&&w.addEventListener("mouseleave",F),c?.addEventListener("mouseleave",F),p&&w.addEventListener("mousemove",S,{once:!0}),w.addEventListener("mouseenter",S),w.addEventListener("mouseleave",L),()=>{n&&w.removeEventListener("mouseleave",F),c?.removeEventListener("mouseleave",F),p&&w.removeEventListener("mousemove",S),w.removeEventListener("mouseenter",S),w.removeEventListener("mouseleave",L)}}},[s,c,u,e,m,l,p,A,M,b,o,n,h,C,x,r]),q(()=>{var y;if(u&&n&&(y=x.current)!=null&&y.__options.blockPointerEvents&&I()){const F=z(c).body;if(F.setAttribute(ot,""),F.style.pointerEvents="none",k.current=!0,_(s)&&c){var S,L;const w=s,D=h==null||(S=h.nodesRef.current.find(N=>N.id===R))==null||(L=S.context)==null?void 0:L.elements.floating;return D&&(D.style.pointerEvents=""),w.style.pointerEvents="auto",c.style.pointerEvents="auto",()=>{w.style.pointerEvents="",c.style.pointerEvents=""}}}},[u,n,R,c,s,h,x,r,I]),q(()=>{n||(T.current=void 0,M(),b())},[n,M,b]),g.useEffect(()=>()=>{M(),clearTimeout(E.current),clearTimeout(P.current),b()},[u,s,M,b]),g.useMemo(()=>{if(!u)return{};function y(S){T.current=S.pointerType}return{reference:{onPointerDown:y,onPointerEnter:y,onMouseMove(S){n||l===0||(clearTimeout(P.current),P.current=setTimeout(()=>{v.current||o(!0,S.nativeEvent)},l))}},floating:{onMouseEnter(){clearTimeout(E.current)},onMouseLeave(S){i.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),A(S.nativeEvent,!1)}}}},[i,u,l,n,o,A])}const to=g.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),Rt=()=>g.useContext(to),no=(e,t)=>{let{open:n,onOpenChange:o}=e,{id:r}=t;const{currentId:i,setCurrentId:s,initialDelay:c,setState:f,timeoutMs:u}=Rt();q(()=>{i&&(f({delay:{open:1,close:me(c,"close")}}),i!==r&&o(!1))},[r,o,f,i,c]),q(()=>{function d(){o(!1),f({delay:c,currentId:null})}if(!n&&i===r)if(u){const a=window.setTimeout(d,u);return()=>{clearTimeout(a)}}else d()},[n,f,i,r,o,c,u]),q(()=>{n&&s(r)},[n,s,r])};function Ae(e,t){let n=e.filter(r=>{var i;return r.parentId===t&&((i=r.context)==null?void 0:i.open)}),o=n;for(;o.length;)o=e.filter(r=>{var i;return(i=o)==null?void 0:i.some(s=>{var c;return r.parentId===s.id&&((c=r.context)==null?void 0:c.open)})}),n=n.concat(o);return n}function rt(e){return xe(e.target)&&e.target.tagName==="BUTTON"}function it(e){return jt(e)}function oo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:r,elements:{domReference:i}}=e,{enabled:s=!0,event:c="click",toggle:f=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0}=t,a=g.useRef(),m=g.useRef(!1);return g.useMemo(()=>s?{reference:{onPointerDown(l){a.current=l.pointerType},onMouseDown(l){l.button===0&&(pe(a.current,!0)&&u||c!=="click"&&(n&&f&&(!r.current.openEvent||r.current.openEvent.type==="mousedown")?o(!1,l.nativeEvent):(l.preventDefault(),o(!0,l.nativeEvent))))},onClick(l){if(c==="mousedown"&&a.current){a.current=void 0;return}pe(a.current,!0)&&u||(n&&f&&(!r.current.openEvent||r.current.openEvent.type==="click")?o(!1,l.nativeEvent):o(!0,l.nativeEvent))},onKeyDown(l){a.current=void 0,!(l.defaultPrevented||!d||rt(l))&&(l.key===" "&&!it(i)&&(l.preventDefault(),m.current=!0),l.key==="Enter"&&o(!(n&&f),l.nativeEvent))},onKeyUp(l){l.defaultPrevented||!d||rt(l)||it(i)||l.key===" "&&m.current&&(m.current=!1,o(!(n&&f),l.nativeEvent))}}}:{},[s,r,c,u,d,i,f,n,o])}const ro=g.useInsertionEffect,io=ro||(e=>e());function ge(e){const t=g.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return io(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t.current==null?void 0:t.current(...o)},[])}const so={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},co={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},lo=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function uo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,events:r,nodeId:i,elements:{reference:s,domReference:c,floating:f},dataRef:u}=e,{enabled:d=!0,escapeKey:a=!0,outsidePress:m=!0,outsidePressEvent:l="pointerdown",referencePress:p=!1,referencePressEvent:h="pointerdown",ancestorScroll:R=!1,bubbles:x}=t,C=Ke(),T=Et()!=null,E=ge(typeof m=="function"?m:()=>!1),O=typeof m=="function"?E:m,P=g.useRef(!1),{escapeKeyBubbles:v,outsidePressBubbles:k}=lo(x),$=ge(A=>{if(!n||!d||!a||A.key!=="Escape")return;const M=C?Ae(C.nodesRef.current,i):[];if(!v&&(A.stopPropagation(),M.length>0)){let b=!0;if(M.forEach(y=>{var S;if((S=y.context)!=null&&S.open&&!y.context.dataRef.current.__escapeKeyBubbles){b=!1;return}}),!b)return}r.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),o(!1,Vt(A)?A.nativeEvent:A)}),I=ge(A=>{const M=P.current;if(P.current=!1,M||typeof O=="function"&&!O(A))return;const b=Ht(A),y="["+je("inert")+"]",S=z(f).querySelectorAll(y);let L=_(b)?b:null;for(;L&&!Mt(L);){const D=Ft(L);if(D===z(f).body||!_(D))break;L=D}if(S.length&&_(b)&&!Wt(b)&&!ie(b,f)&&Array.from(S).every(D=>!ie(L,D)))return;if(xe(b)&&f){const D=b.clientWidth>0&&b.scrollWidth>b.clientWidth,N=b.clientHeight>0&&b.scrollHeight>b.clientHeight;let H=N&&A.offsetX>b.clientWidth;if(N&&kt(b).direction==="rtl"&&(H=A.offsetX<=b.offsetWidth-b.clientWidth),H||D&&A.offsetY>b.clientHeight)return}const F=C&&Ae(C.nodesRef.current,i).some(D=>{var N;return ae(A,(N=D.context)==null?void 0:N.elements.floating)});if(ae(A,f)||ae(A,c)||F)return;const w=C?Ae(C.nodesRef.current,i):[];if(w.length>0){let D=!0;if(w.forEach(N=>{var H;if((H=N.context)!=null&&H.open&&!N.context.dataRef.current.__outsidePressBubbles){D=!1;return}}),!D)return}r.emit("dismiss",{type:"outsidePress",data:{returnFocus:T?{preventScroll:!0}:_t(A)||Bt(A)}}),o(!1,A)});return g.useEffect(()=>{if(!n||!d)return;u.current.__escapeKeyBubbles=v,u.current.__outsidePressBubbles=k;function A(y){o(!1,y)}const M=z(f);a&&M.addEventListener("keydown",$),O&&M.addEventListener(l,I);let b=[];return R&&(_(c)&&(b=U(c)),_(f)&&(b=b.concat(U(f))),!_(s)&&s&&s.contextElement&&(b=b.concat(U(s.contextElement)))),b=b.filter(y=>{var S;return y!==((S=M.defaultView)==null?void 0:S.visualViewport)}),b.forEach(y=>{y.addEventListener("scroll",A,{passive:!0})}),()=>{a&&M.removeEventListener("keydown",$),O&&M.removeEventListener(l,I),b.forEach(y=>{y.removeEventListener("scroll",A)})}},[u,f,c,s,a,O,l,n,o,R,d,v,k,$,I]),g.useEffect(()=>{P.current=!1},[O,l]),g.useMemo(()=>d?{reference:{onKeyDown:$,[so[h]]:A=>{p&&(r.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),o(!1,A.nativeEvent))}},floating:{onKeyDown:$,[co[l]]:()=>{P.current=!0}}}:{},[d,r,p,l,h,o,$])}let $e;process.env.NODE_ENV!=="production"&&($e=new Set);function fo(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:o,nodeId:r}=e;if(process.env.NODE_ENV!=="production"){var i;const v="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=e.elements)!=null&&i.reference&&!_(e.elements.reference)){var s;if(!((s=$e)!=null&&s.has(v))){var c;(c=$e)==null||c.add(v),console.error(v)}}}const[f,u]=g.useState(null),d=((t=e.elements)==null?void 0:t.reference)||f,a=Wn(e),m=Ke(),l=ge((v,k)=>{v&&(h.current.openEvent=k),o?.(v,k)}),p=g.useRef(null),h=g.useRef({}),R=g.useState(()=>Qn())[0],x=He(),C=g.useCallback(v=>{const k=_(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;a.refs.setReference(k)},[a.refs]),T=g.useCallback(v=>{(_(v)||v===null)&&(p.current=v,u(v)),(_(a.refs.reference.current)||a.refs.reference.current===null||v!==null&&!_(v))&&a.refs.setReference(v)},[a.refs]),E=g.useMemo(()=>({...a.refs,setReference:T,setPositionReference:C,domReference:p}),[a.refs,T,C]),O=g.useMemo(()=>({...a.elements,domReference:d}),[a.elements,d]),P=g.useMemo(()=>({...a,refs:E,elements:O,dataRef:h,nodeId:r,floatingId:x,events:R,open:n,onOpenChange:l}),[a,r,x,R,n,l,E,O]);return q(()=>{const v=m?.nodesRef.current.find(k=>k.id===r);v&&(v.context=P)}),g.useMemo(()=>({...a,context:P,refs:E,elements:O}),[a,E,O,P])}function ao(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:r,events:i,refs:s,elements:{floating:c,domReference:f}}=e,{enabled:u=!0,keyboardOnly:d=!0}=t,a=g.useRef(""),m=g.useRef(!1),l=g.useRef();return g.useEffect(()=>{if(!u)return;const h=z(c).defaultView||window;function R(){!n&&xe(f)&&f===It(z(f))&&(m.current=!0)}return h.addEventListener("blur",R),()=>{h.removeEventListener("blur",R)}},[c,f,n,u]),g.useEffect(()=>{if(!u)return;function p(h){(h.type==="referencePress"||h.type==="escapeKey")&&(m.current=!0)}return i.on("dismiss",p),()=>{i.off("dismiss",p)}},[i,u]),g.useEffect(()=>()=>{clearTimeout(l.current)},[]),g.useMemo(()=>u?{reference:{onPointerDown(p){let{pointerType:h}=p;a.current=h,m.current=!!(h&&d)},onMouseLeave(){m.current=!1},onFocus(p){var h;m.current||p.type==="focus"&&((h=r.current.openEvent)==null?void 0:h.type)==="mousedown"&&ae(r.current.openEvent,f)||o(!0,p.nativeEvent)},onBlur(p){m.current=!1;const h=p.relatedTarget,R=_(h)&&h.hasAttribute(je("focus-guard"))&&h.getAttribute("data-type")==="outside";l.current=setTimeout(()=>{ie(s.floating.current,h)||ie(f,h)||R||o(!1,p.nativeEvent)})}}}:{},[u,d,f,s,r,o])}function De(e,t,n){const o=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(r=>r?r[n]:null).concat(e).reduce((r,i)=>(i&&Object.entries(i).forEach(s=>{let[c,f]=s;if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof f=="function"){var u;(u=o.get(c))==null||u.push(f),r[c]=function(){for(var d,a=arguments.length,m=new Array(a),l=0;l<a;l++)m[l]=arguments[l];return(d=o.get(c))==null?void 0:d.map(p=>p(...m)).find(p=>p!==void 0)}}}else r[c]=f}),r),{})}}function mo(e){e===void 0&&(e=[]);const t=e,n=g.useCallback(i=>De(i,e,"reference"),t),o=g.useCallback(i=>De(i,e,"floating"),t),r=g.useCallback(i=>De(i,e,"item"),e.map(i=>i?.item));return g.useMemo(()=>({getReferenceProps:n,getFloatingProps:o,getItemProps:r}),[n,o,r])}function go(e,t){t===void 0&&(t={});const{open:n,floatingId:o}=e,{enabled:r=!0,role:i="dialog"}=t,s=He();return g.useMemo(()=>{const c={id:o,role:i};return r?i==="tooltip"?{reference:{"aria-describedby":n?o:void 0},floating:c}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?o:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:s}},floating:{...c,...i==="menu"&&{"aria-labelledby":s}}}:{}},[r,i,n,o,s])}function yo({closeDelay:e=300,offset:t=20,openDelay:n=0,placement:o="bottom-start",slots:r,trigger:i=["hover","focus"],withArrow:s=!0,arrow:c,role:f="dialog",visible:u={},hidden:d={},floatingOptions:a={},isOpen:m,onOpenChange:l}){const[p,h]=Ot(!1),R=ct(null),x=St(),{x:C,y:T,strategy:E,refs:O,context:P}=fo({placement:o,middleware:[Kn(t),Xn(),jn(),zn({element:R})],open:m||p,onOpenChange:l||h,whileElementsMounted:Fn,...a}),v=uo(P),k=go(P,{role:f}),{delay:$}=Rt(),A=eo(P,{delay:$||{open:n,close:e}}),M=ao(P),b=oo(P),y=[i.find(ee=>ee==="hover")?A:void 0,i.find(ee=>ee==="click")?b:void 0,i.find(ee=>ee==="focus")?M:void 0,v,k],{getReferenceProps:S,getFloatingProps:L}=mo(y);no(P,{id:x});const{onClick:F,...w}=S(),D=String((r?.content?.props).className).includes("pressable")?{onPress:F}:{onClick:F},N=r?.content?Tt(r.content,{...r.content.props,ref:O.setReference,...w,...D}):Pe("div",{ref:O.setReference,...S(),children:"Menu Action"}),H=r?.submenu?Xe(At.nav,{ref:O.setFloating,style:{position:E,top:T??0,left:C??0,width:"max-content",zIndex:50},...L(),variants:{hidden:d,visible:u},initial:"hidden",animate:m||p?"visible":"hidden",children:[s&&Pe(Gn,{ref:R,context:P,...c}),r.submenu]}):Pe("nav",{children:"Submenu"});return Xe(Ct,{children:[N,H]})}export{yo as Menu,yo as default};
|
|
1
|
+
import{jsx as Pe,jsxs as Xe,Fragment as Ct}from"react/jsx-runtime";import*as g from"react";import{useLayoutEffect as st,useEffect as Pt,useRef as ct,useState as Ot,useId as St,cloneElement as Tt}from"react";import{motion as At}from"framer-motion";import*as Dt from"react-dom";function lt(e){return ut(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lt(e){var t;return(t=(ut(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ut(e){return e instanceof Node||e instanceof se(e).Node}function _(e){return e instanceof Element||e instanceof se(e).Element}function xe(e){return e instanceof HTMLElement||e instanceof se(e).HTMLElement}function Le(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function Mt(e){return["html","body","#document"].includes(lt(e))}function kt(e){return se(e).getComputedStyle(e)}function Ft(e){if(lt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Le(e)&&e.host||Lt(e);return Le(t)?t.host:t}function It(e){let t=e.activeElement;for(;((n=t)==null||(o=n.shadowRoot)==null?void 0:o.activeElement)!=null;){var n,o;t=t.shadowRoot.activeElement}return t}function ie(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Le(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Nt(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function $t(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:o}=t;return n+"/"+o}).join(" "):navigator.userAgent}function _t(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Nt())||t.test($t()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Bt(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function pe(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Vt(e){return"nativeEvent"in e}function Wt(e){return e.matches("html,body")}function z(e){return e?.ownerDocument||document}function ae(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Ht(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Kt="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function jt(e){return xe(e)&&e.matches(Kt)}const ne=Math.min,Q=Math.max,he=Math.round,fe=Math.floor,K=e=>({x:e,y:e}),Xt={left:"right",right:"left",bottom:"top",top:"bottom"},zt={start:"end",end:"start"};function Me(e,t,n){return Q(e,ne(t,n))}function ce(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function le(e){return e.split("-")[1]}function ft(e){return e==="x"?"y":"x"}function $e(e){return e==="y"?"height":"width"}const Yt=new Set(["top","bottom"]);function Y(e){return Yt.has(Z(e))?"y":"x"}function _e(e){return ft(Y(e))}function Ut(e,t,n){n===void 0&&(n=!1);const o=le(e),r=_e(e),i=$e(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ve(s)),[s,ve(s)]}function qt(e){const t=ve(e);return[ke(e),t,ke(t)]}function ke(e){return e.replace(/start|end/g,t=>zt[t])}const ze=["left","right"],Ye=["right","left"],Gt=["top","bottom"],Qt=["bottom","top"];function Zt(e,t,n){switch(e){case"top":case"bottom":return n?t?Ye:ze:t?ze:Ye;case"left":case"right":return t?Gt:Qt;default:return[]}}function Jt(e,t,n,o){const r=le(e);let i=Zt(Z(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(ke)))),i}function ve(e){return e.replace(/left|right|bottom|top/g,t=>Xt[t])}function en(e){return{top:0,right:0,bottom:0,left:0,...e}}function at(e){return typeof e!="number"?en(e):{top:e,right:e,bottom:e,left:e}}function ye(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Ue(e,t,n){let{reference:o,floating:r}=e;const i=Y(t),s=_e(t),c=$e(s),f=Z(t),u=i==="y",d=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let l;switch(f){case"top":l={x:d,y:o.y-r.height};break;case"bottom":l={x:d,y:o.y+o.height};break;case"right":l={x:o.x+o.width,y:a};break;case"left":l={x:o.x-r.width,y:a};break;default:l={x:o.x,y:o.y}}switch(le(t)){case"start":l[s]-=m*(n&&u?-1:1);break;case"end":l[s]+=m*(n&&u?-1:1);break}return l}async function tn(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:a="floating",altBoundary:m=!1,padding:l=0}=ce(t,e),p=at(l),R=c[m?a==="floating"?"reference":"floating":a],x=ye(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(R)))==null||n?R:R.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:f})),C=a==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),E=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},O=ye(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:T,strategy:f}):C);return{top:(x.top-O.top+p.top)/E.y,bottom:(O.bottom-x.bottom+p.bottom)/E.y,left:(x.left-O.left+p.left)/E.x,right:(O.right-x.right+p.right)/E.x}}const nn=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:a}=Ue(u,o,f),m=o,l={},p=0;for(let R=0;R<c.length;R++){var h;const{name:x,fn:C}=c[R],{x:T,y:E,data:O,reset:P}=await C({x:d,y:a,initialPlacement:o,placement:m,strategy:r,middlewareData:l,rects:u,platform:{...s,detectOverflow:(h=s.detectOverflow)!=null?h:tn},elements:{reference:e,floating:t}});d=T??d,a=E??a,l={...l,[x]:{...l[x],...O}},P&&p<=50&&(p++,typeof P=="object"&&(P.placement&&(m=P.placement),P.rects&&(u=P.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:d,y:a}=Ue(u,m,f)),R=-1)}return{x:d,y:a,placement:m,strategy:r,middlewareData:l}},on=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:f}=t,{element:u,padding:d=0}=ce(e,t)||{};if(u==null)return{};const a=at(d),m={x:n,y:o},l=_e(r),p=$e(l),h=await s.getDimensions(u),R=l==="y",x=R?"top":"left",C=R?"bottom":"right",T=R?"clientHeight":"clientWidth",E=i.reference[p]+i.reference[l]-m[l]-i.floating[p],O=m[l]-i.reference[l],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let v=P?P[T]:0;(!v||!await(s.isElement==null?void 0:s.isElement(P)))&&(v=c.floating[T]||i.floating[p]);const k=E/2-O/2,N=v/2-h[p]/2-1,I=ne(a[x],N),A=ne(a[C],N),M=I,b=v-h[p]-A,y=v/2-h[p]/2+k,S=Me(M,y,b),L=!f.arrow&&le(r)!=null&&y!==S&&i.reference[p]/2-(y<M?I:A)-h[p]/2<0,F=L?y<M?y-M:y-b:0;return{[l]:m[l]+F,data:{[l]:S,centerOffset:y-S-F,...L&&{alignmentOffset:F}},reset:L}}}),rn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:f,elements:u}=t,{mainAxis:d=!0,crossAxis:a=!0,fallbackPlacements:m,fallbackStrategy:l="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...R}=ce(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Z(r),C=Y(c),T=Z(c)===c,E=await(f.isRTL==null?void 0:f.isRTL(u.floating)),O=m||(T||!h?[ve(c)]:qt(c)),P=p!=="none";!m&&P&&O.push(...Jt(c,h,p,E));const v=[c,...O],k=await f.detectOverflow(t,R),N=[];let I=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&N.push(k[x]),a){const y=Ut(r,s,E);N.push(k[y[0]],k[y[1]])}if(I=[...I,{placement:r,overflows:N}],!N.every(y=>y<=0)){var A,M;const y=(((A=i.flip)==null?void 0:A.index)||0)+1,S=v[y];if(S&&(!(a==="alignment"?C!==Y(S):!1)||I.every(w=>Y(w.placement)===C?w.overflows[0]>0:!0)))return{data:{index:y,overflows:I},reset:{placement:S}};let L=(M=I.filter(F=>F.overflows[0]<=0).sort((F,w)=>F.overflows[1]-w.overflows[1])[0])==null?void 0:M.placement;if(!L)switch(l){case"bestFit":{var b;const F=(b=I.filter(w=>{if(P){const D=Y(w.placement);return D===C||D==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(D=>D>0).reduce((D,$)=>D+$,0)]).sort((w,D)=>w[1]-D[1])[0])==null?void 0:b[0];F&&(L=F);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}},sn=new Set(["left","top"]);async function cn(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Z(n),c=le(n),f=Y(n)==="y",u=sn.has(s)?-1:1,d=i&&f?-1:1,a=ce(t,e);let{mainAxis:m,crossAxis:l,alignmentAxis:p}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return c&&typeof p=="number"&&(l=c==="end"?p*-1:p),f?{x:l*d,y:m*u}:{x:m*u,y:l*d}}const ln=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,f=await cn(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:s}}}}},un=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:x=>{let{x:C,y:T}=x;return{x:C,y:T}}},...u}=ce(e,t),d={x:n,y:o},a=await i.detectOverflow(t,u),m=Y(Z(r)),l=ft(m);let p=d[l],h=d[m];if(s){const x=l==="y"?"top":"left",C=l==="y"?"bottom":"right",T=p+a[x],E=p-a[C];p=Me(T,p,E)}if(c){const x=m==="y"?"top":"left",C=m==="y"?"bottom":"right",T=h+a[x],E=h-a[C];h=Me(T,h,E)}const R=f.fn({...t,[l]:p,[m]:h});return{...R,data:{x:R.x-n,y:R.y-o,enabled:{[l]:s,[m]:c}}}}}};function be(){return typeof window<"u"}function re(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function X(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return be()?e instanceof Node||e instanceof B(e).Node:!1}function V(e){return be()?e instanceof Element||e instanceof B(e).Element:!1}function j(e){return be()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function qe(e){return!be()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}const fn=new Set(["inline","contents"]);function ue(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!fn.has(r)}const an=new Set(["table","td","th"]);function dn(e){return an.has(re(e))}const mn=[":popover-open",":modal"];function Ee(e){return mn.some(t=>{try{return e.matches(t)}catch{return!1}})}const gn=["transform","translate","scale","rotate","perspective"],pn=["transform","translate","scale","rotate","perspective","filter"],hn=["paint","layout","strict","content"];function Be(e){const t=Ve(),n=V(e)?W(e):e;return gn.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||pn.some(o=>(n.willChange||"").includes(o))||hn.some(o=>(n.contain||"").includes(o))}function vn(e){let t=G(e);for(;j(t)&&!oe(t);){if(Be(t))return t;if(Ee(t))return null;t=G(t)}return null}function Ve(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yn=new Set(["html","body","#document"]);function oe(e){return yn.has(re(e))}function W(e){return B(e).getComputedStyle(e)}function Re(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if(re(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qe(e)&&e.host||X(e);return qe(t)?t.host:t}function mt(e){const t=G(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:j(t)&&ue(t)?t:mt(t)}function U(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=mt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=B(r);if(i){const c=Fe(s);return t.concat(s,s.visualViewport||[],ue(r)?r:[],c&&n?U(c):[])}return t.concat(r,U(r,[],n))}function Fe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gt(e){const t=W(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=j(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=he(n)!==i||he(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function We(e){return V(e)?e:e.contextElement}function te(e){const t=We(e);if(!j(t))return K(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=gt(t);let s=(i?he(n.width):n.width)/o,c=(i?he(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const wn=K(0);function pt(e){const t=B(e);return!Ve()||!t.visualViewport?wn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function J(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=We(e);let s=K(1);t&&(o?V(o)&&(s=te(o)):s=te(e));const c=xn(i,n,o)?pt(i):K(0);let f=(r.left+c.x)/s.x,u=(r.top+c.y)/s.y,d=r.width/s.x,a=r.height/s.y;if(i){const m=B(i),l=o&&V(o)?B(o):o;let p=m,h=Fe(p);for(;h&&o&&l!==p;){const R=te(h),x=h.getBoundingClientRect(),C=W(h),T=x.left+(h.clientLeft+parseFloat(C.paddingLeft))*R.x,E=x.top+(h.clientTop+parseFloat(C.paddingTop))*R.y;f*=R.x,u*=R.y,d*=R.x,a*=R.y,f+=T,u+=E,p=B(h),h=Fe(p)}}return ye({width:d,height:a,x:f,y:u})}function Ce(e,t){const n=Re(e).scrollLeft;return t?t.left+n:J(X(e)).left+n}function ht(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Ce(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function bn(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=X(o),c=t?Ee(t.floating):!1;if(o===s||c&&i)return n;let f={scrollLeft:0,scrollTop:0},u=K(1);const d=K(0),a=j(o);if((a||!a&&!i)&&((re(o)!=="body"||ue(s))&&(f=Re(o)),j(o))){const l=J(o);u=te(o),d.x=l.x+o.clientLeft,d.y=l.y+o.clientTop}const m=s&&!a&&!i?ht(s,f):K(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-f.scrollTop*u.y+d.y+m.y}}function En(e){return Array.from(e.getClientRects())}function Rn(e){const t=X(e),n=Re(e),o=e.ownerDocument.body,r=Q(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=Q(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ce(e);const c=-n.scrollTop;return W(o).direction==="rtl"&&(s+=Q(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const Ge=25;function Cn(e,t){const n=B(e),o=X(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,f=0;if(r){i=r.width,s=r.height;const d=Ve();(!d||d&&t==="fixed")&&(c=r.offsetLeft,f=r.offsetTop)}const u=Ce(o);if(u<=0){const d=o.ownerDocument,a=d.body,m=getComputedStyle(a),l=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(o.clientWidth-a.clientWidth-l);p<=Ge&&(i-=p)}else u<=Ge&&(i+=u);return{width:i,height:s,x:c,y:f}}const Pn=new Set(["absolute","fixed"]);function On(e,t){const n=J(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=j(e)?te(e):K(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,f=r*i.x,u=o*i.y;return{width:s,height:c,x:f,y:u}}function Qe(e,t,n){let o;if(t==="viewport")o=Cn(e,n);else if(t==="document")o=Rn(X(e));else if(V(t))o=On(t,n);else{const r=pt(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ye(o)}function vt(e,t){const n=G(e);return n===t||!V(n)||oe(n)?!1:W(n).position==="fixed"||vt(n,t)}function Sn(e,t){const n=t.get(e);if(n)return n;let o=U(e,[],!1).filter(c=>V(c)&&re(c)!=="body"),r=null;const i=W(e).position==="fixed";let s=i?G(e):e;for(;V(s)&&!oe(s);){const c=W(s),f=Be(s);!f&&c.position==="fixed"&&(r=null),(i?!f&&!r:!f&&c.position==="static"&&!!r&&Pn.has(r.position)||ue(s)&&!f&&vt(e,s))?o=o.filter(d=>d!==s):r=c,s=G(s)}return t.set(e,o),o}function Tn(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Ee(t)?[]:Sn(t,this._c):[].concat(n),o],c=s[0],f=s.reduce((u,d)=>{const a=Qe(t,d,r);return u.top=Q(a.top,u.top),u.right=ne(a.right,u.right),u.bottom=ne(a.bottom,u.bottom),u.left=Q(a.left,u.left),u},Qe(t,c,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function An(e){const{width:t,height:n}=gt(e);return{width:t,height:n}}function Dn(e,t,n){const o=j(t),r=X(t),i=n==="fixed",s=J(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const f=K(0);function u(){f.x=Ce(r)}if(o||!o&&!i)if((re(t)!=="body"||ue(r))&&(c=Re(t)),o){const l=J(t,!0,i,t);f.x=l.x+t.clientLeft,f.y=l.y+t.clientTop}else r&&u();i&&!o&&r&&u();const d=r&&!o&&!i?ht(r,c):K(0),a=s.left+c.scrollLeft-f.x-d.x,m=s.top+c.scrollTop-f.y-d.y;return{x:a,y:m,width:s.width,height:s.height}}function Oe(e){return W(e).position==="static"}function Ze(e,t){if(!j(e)||W(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return X(e)===n&&(n=n.ownerDocument.body),n}function yt(e,t){const n=B(e);if(Ee(e))return n;if(!j(e)){let r=G(e);for(;r&&!oe(r);){if(V(r)&&!Oe(r))return r;r=G(r)}return n}let o=Ze(e,t);for(;o&&dn(o)&&Oe(o);)o=Ze(o,t);return o&&oe(o)&&Oe(o)&&!Be(o)?n:o||vn(e)||n}const Ln=async function(e){const t=this.getOffsetParent||yt,n=this.getDimensions,o=await n(e.floating);return{reference:Dn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Mn(e){return W(e).direction==="rtl"}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:bn,getDocumentElement:X,getClippingRect:Tn,getOffsetParent:yt,getElementRects:Ln,getClientRects:En,getDimensions:An,getScale:te,isElement:V,isRTL:Mn};function xt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kn(e,t){let n=null,o;const r=X(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),i();const u=e.getBoundingClientRect(),{left:d,top:a,width:m,height:l}=u;if(c||t(),!m||!l)return;const p=fe(a),h=fe(r.clientWidth-(d+m)),R=fe(r.clientHeight-(a+l)),x=fe(d),T={rootMargin:-p+"px "+-h+"px "+-R+"px "+-x+"px",threshold:Q(0,ne(1,f))||1};let E=!0;function O(P){const v=P[0].intersectionRatio;if(v!==f){if(!E)return s();v?s(!1,v):o=setTimeout(()=>{s(!1,1e-7)},1e3)}v===1&&!xt(u,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(O,{...T,root:r.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(e)}return s(!0),i}function Fn(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,u=We(e),d=r||i?[...u?U(u):[],...U(t)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const a=u&&c?kn(u,n):null;let m=-1,l=null;s&&(l=new ResizeObserver(x=>{let[C]=x;C&&C.target===u&&l&&(l.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var T;(T=l)==null||T.observe(t)})),n()}),u&&!f&&l.observe(u),l.observe(t));let p,h=f?J(e):null;f&&R();function R(){const x=J(e);h&&!xt(h,x)&&n(),h=x,p=requestAnimationFrame(R)}return n(),()=>{var x;d.forEach(C=>{r&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),a?.(),(x=l)==null||x.disconnect(),l=null,f&&cancelAnimationFrame(p)}}const In=ln,Nn=un,$n=rn,Je=on,_n=(e,t,n)=>{const o=new Map,r={platform:wt,...n},i={...r.platform,_c:o};return nn(e,t,{...r,platform:i})};var Bn=typeof document<"u",Vn=function(){},de=Bn?st:Vn;function we(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!we(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!we(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function bt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function et(e,t){const n=bt(e);return Math.round(t*n)/n}function Se(e){const t=g.useRef(e);return de(()=>{t.current=e}),t}function Wn(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:f,open:u}=e,[d,a]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,l]=g.useState(o);we(m,o)||l(o);const[p,h]=g.useState(null),[R,x]=g.useState(null),C=g.useCallback(w=>{w!==P.current&&(P.current=w,h(w))},[]),T=g.useCallback(w=>{w!==v.current&&(v.current=w,x(w))},[]),E=i||p,O=s||R,P=g.useRef(null),v=g.useRef(null),k=g.useRef(d),N=f!=null,I=Se(f),A=Se(r),M=Se(u),b=g.useCallback(()=>{if(!P.current||!v.current)return;const w={placement:t,strategy:n,middleware:m};A.current&&(w.platform=A.current),_n(P.current,v.current,w).then(D=>{const $={...D,isPositioned:M.current!==!1};y.current&&!we(k.current,$)&&(k.current=$,Dt.flushSync(()=>{a($)}))})},[m,t,n,A,M]);de(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,a(w=>({...w,isPositioned:!1})))},[u]);const y=g.useRef(!1);de(()=>(y.current=!0,()=>{y.current=!1}),[]),de(()=>{if(E&&(P.current=E),O&&(v.current=O),E&&O){if(I.current)return I.current(E,O,b);b()}},[E,O,b,I,N]);const S=g.useMemo(()=>({reference:P,floating:v,setReference:C,setFloating:T}),[C,T]),L=g.useMemo(()=>({reference:E,floating:O}),[E,O]),F=g.useMemo(()=>{const w={position:n,left:0,top:0};if(!L.floating)return w;const D=et(L.floating,d.x),$=et(L.floating,d.y);return c?{...w,transform:"translate("+D+"px, "+$+"px)",...bt(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:$}},[n,c,L.floating,d.x,d.y]);return g.useMemo(()=>({...d,update:b,refs:S,elements:L,floatingStyles:F}),[d,b,S,L,F])}const Hn=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Je({element:o.current,padding:r}).fn(n):{}:o?Je({element:o,padding:r}).fn(n):{}}}},Kn=(e,t)=>({...In(e),options:[e,t]}),jn=(e,t)=>({...Nn(e),options:[e,t]}),Xn=(e,t)=>({...$n(e),options:[e,t]}),zn=(e,t)=>({...Hn(e),options:[e,t]});var q=typeof document<"u"?st:Pt;function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ie.apply(this,arguments)}let Te=!1,Yn=0;const tt=()=>"floating-ui-"+Yn++;function Un(){const[e,t]=g.useState(()=>Te?tt():void 0);return q(()=>{e==null&&t(tt())},[]),g.useEffect(()=>{Te||(Te=!0)},[]),e}const qn=g.useId,He=qn||Un,Gn=g.forwardRef(function(t,n){let{context:{placement:o,elements:{floating:r},middlewareData:{arrow:i}},width:s=14,height:c=7,tipRadius:f=0,strokeWidth:u=0,staticOffset:d,stroke:a,d:m,style:{transform:l,...p}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||console.warn("Floating UI: The `ref` prop is required for the `FloatingArrow`","component."));const R=He();if(!r)return null;u*=2;const x=u/2,C=s/2*(f/-8+1),T=c/2*f/4,[E,O]=o.split("-"),P=wt.isRTL(r),v=!!m,k=E==="top"||E==="bottom",N=d&&O==="end"?"bottom":"top";let I=d&&O==="end"?"right":"left";d&&P&&(I=O==="end"?"left":"right");const A=i?.x!=null?d||i.x:"",M=i?.y!=null?d||i.y:"",b=m||"M0,0"+(" H"+s)+(" L"+(s-C)+","+(c-T))+(" Q"+s/2+","+c+" "+C+","+(c-T))+" Z",y={top:v?"rotate(180deg)":"",left:v?"rotate(90deg)":"rotate(-90deg)",bottom:v?"":"rotate(180deg)",right:v?"rotate(-90deg)":"rotate(90deg)"}[E];return g.createElement("svg",Ie({},h,{"aria-hidden":!0,ref:n,width:v?s:s+u,height:s,viewBox:"0 0 "+s+" "+(c>s?c:s),style:{position:"absolute",pointerEvents:"none",[I]:A,[N]:M,[E]:k||v?"100%":"calc(100% - "+u/2+"px)",transform:""+y+(l??""),...p}}),u>0&&g.createElement("path",{clipPath:"url(#"+R+")",fill:"none",stroke:a,strokeWidth:u+(m?0:1),d:b}),g.createElement("path",{stroke:u&&!m?h.fill:"none",d:b}),g.createElement("clipPath",{id:R},g.createElement("rect",{x:-x,y:x*(v?-1:1),width:s+u,height:s})))});function Qn(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,((o=e.get(t))==null?void 0:o.filter(r=>r!==n))||[])}}}const Zn=g.createContext(null),Jn=g.createContext(null),Et=()=>{var e;return((e=g.useContext(Zn))==null?void 0:e.id)||null},Ke=()=>g.useContext(Jn);function je(e){return"data-floating-ui-"+e}function nt(e){const t=ct(e);return q(()=>{t.current=e}),t}const ot=je("safe-polygon");function me(e,t,n){return n&&!pe(n)?0:typeof e=="number"?e:e?.[t]}function eo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:r,events:i,elements:{domReference:s,floating:c},refs:f}=e,{enabled:u=!0,delay:d=0,handleClose:a=null,mouseOnly:m=!1,restMs:l=0,move:p=!0}=t,h=Ke(),R=Et(),x=nt(a),C=nt(d),T=g.useRef(),E=g.useRef(),O=g.useRef(),P=g.useRef(),v=g.useRef(!0),k=g.useRef(!1),N=g.useRef(()=>{}),I=g.useCallback(()=>{var y;const S=(y=r.current.openEvent)==null?void 0:y.type;return S?.includes("mouse")&&S!=="mousedown"},[r]);g.useEffect(()=>{if(!u)return;function y(){clearTimeout(E.current),clearTimeout(P.current),v.current=!0}return i.on("dismiss",y),()=>{i.off("dismiss",y)}},[u,i]),g.useEffect(()=>{if(!u||!x.current||!n)return;function y(L){I()&&o(!1,L)}const S=z(c).documentElement;return S.addEventListener("mouseleave",y),()=>{S.removeEventListener("mouseleave",y)}},[c,n,o,u,x,r,I]);const A=g.useCallback(function(y,S){S===void 0&&(S=!0);const L=me(C.current,"close",T.current);L&&!O.current?(clearTimeout(E.current),E.current=setTimeout(()=>o(!1,y),L)):S&&(clearTimeout(E.current),o(!1,y))},[C,o]),M=g.useCallback(()=>{N.current(),O.current=void 0},[]),b=g.useCallback(()=>{if(k.current){const y=z(f.floating.current).body;y.style.pointerEvents="",y.removeAttribute(ot),k.current=!1}},[f]);return g.useEffect(()=>{if(!u)return;function y(){return r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1}function S(w){if(clearTimeout(E.current),v.current=!1,m&&!pe(T.current)||l>0&&me(C.current,"open")===0)return;const D=me(C.current,"open",T.current);D?E.current=setTimeout(()=>{o(!0,w)},D):o(!0,w)}function L(w){if(y())return;N.current();const D=z(c);if(clearTimeout(P.current),x.current){n||clearTimeout(E.current),O.current=x.current({...e,tree:h,x:w.clientX,y:w.clientY,onClose(){b(),M(),A(w)}});const H=O.current;D.addEventListener("mousemove",H),N.current=()=>{D.removeEventListener("mousemove",H)};return}(T.current!=="touch"||!ie(c,w.relatedTarget))&&A(w)}function F(w){y()||x.current==null||x.current({...e,tree:h,x:w.clientX,y:w.clientY,onClose(){b(),M(),A(w)}})(w)}if(_(s)){const w=s;return n&&w.addEventListener("mouseleave",F),c?.addEventListener("mouseleave",F),p&&w.addEventListener("mousemove",S,{once:!0}),w.addEventListener("mouseenter",S),w.addEventListener("mouseleave",L),()=>{n&&w.removeEventListener("mouseleave",F),c?.removeEventListener("mouseleave",F),p&&w.removeEventListener("mousemove",S),w.removeEventListener("mouseenter",S),w.removeEventListener("mouseleave",L)}}},[s,c,u,e,m,l,p,A,M,b,o,n,h,C,x,r]),q(()=>{var y;if(u&&n&&(y=x.current)!=null&&y.__options.blockPointerEvents&&I()){const F=z(c).body;if(F.setAttribute(ot,""),F.style.pointerEvents="none",k.current=!0,_(s)&&c){var S,L;const w=s,D=h==null||(S=h.nodesRef.current.find($=>$.id===R))==null||(L=S.context)==null?void 0:L.elements.floating;return D&&(D.style.pointerEvents=""),w.style.pointerEvents="auto",c.style.pointerEvents="auto",()=>{w.style.pointerEvents="",c.style.pointerEvents=""}}}},[u,n,R,c,s,h,x,r,I]),q(()=>{n||(T.current=void 0,M(),b())},[n,M,b]),g.useEffect(()=>()=>{M(),clearTimeout(E.current),clearTimeout(P.current),b()},[u,s,M,b]),g.useMemo(()=>{if(!u)return{};function y(S){T.current=S.pointerType}return{reference:{onPointerDown:y,onPointerEnter:y,onMouseMove(S){n||l===0||(clearTimeout(P.current),P.current=setTimeout(()=>{v.current||o(!0,S.nativeEvent)},l))}},floating:{onMouseEnter(){clearTimeout(E.current)},onMouseLeave(S){i.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),A(S.nativeEvent,!1)}}}},[i,u,l,n,o,A])}const to=g.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),Rt=()=>g.useContext(to),no=(e,t)=>{let{open:n,onOpenChange:o}=e,{id:r}=t;const{currentId:i,setCurrentId:s,initialDelay:c,setState:f,timeoutMs:u}=Rt();q(()=>{i&&(f({delay:{open:1,close:me(c,"close")}}),i!==r&&o(!1))},[r,o,f,i,c]),q(()=>{function d(){o(!1),f({delay:c,currentId:null})}if(!n&&i===r)if(u){const a=window.setTimeout(d,u);return()=>{clearTimeout(a)}}else d()},[n,f,i,r,o,c,u]),q(()=>{n&&s(r)},[n,s,r])};function Ae(e,t){let n=e.filter(r=>{var i;return r.parentId===t&&((i=r.context)==null?void 0:i.open)}),o=n;for(;o.length;)o=e.filter(r=>{var i;return(i=o)==null?void 0:i.some(s=>{var c;return r.parentId===s.id&&((c=r.context)==null?void 0:c.open)})}),n=n.concat(o);return n}function rt(e){return xe(e.target)&&e.target.tagName==="BUTTON"}function it(e){return jt(e)}function oo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:r,elements:{domReference:i}}=e,{enabled:s=!0,event:c="click",toggle:f=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0}=t,a=g.useRef(),m=g.useRef(!1);return g.useMemo(()=>s?{reference:{onPointerDown(l){a.current=l.pointerType},onMouseDown(l){l.button===0&&(pe(a.current,!0)&&u||c!=="click"&&(n&&f&&(!r.current.openEvent||r.current.openEvent.type==="mousedown")?o(!1,l.nativeEvent):(l.preventDefault(),o(!0,l.nativeEvent))))},onClick(l){if(c==="mousedown"&&a.current){a.current=void 0;return}pe(a.current,!0)&&u||(n&&f&&(!r.current.openEvent||r.current.openEvent.type==="click")?o(!1,l.nativeEvent):o(!0,l.nativeEvent))},onKeyDown(l){a.current=void 0,!(l.defaultPrevented||!d||rt(l))&&(l.key===" "&&!it(i)&&(l.preventDefault(),m.current=!0),l.key==="Enter"&&o(!(n&&f),l.nativeEvent))},onKeyUp(l){l.defaultPrevented||!d||rt(l)||it(i)||l.key===" "&&m.current&&(m.current=!1,o(!(n&&f),l.nativeEvent))}}}:{},[s,r,c,u,d,i,f,n,o])}const ro=g.useInsertionEffect,io=ro||(e=>e());function ge(e){const t=g.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return io(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return t.current==null?void 0:t.current(...o)},[])}const so={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},co={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},lo=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function uo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,events:r,nodeId:i,elements:{reference:s,domReference:c,floating:f},dataRef:u}=e,{enabled:d=!0,escapeKey:a=!0,outsidePress:m=!0,outsidePressEvent:l="pointerdown",referencePress:p=!1,referencePressEvent:h="pointerdown",ancestorScroll:R=!1,bubbles:x}=t,C=Ke(),T=Et()!=null,E=ge(typeof m=="function"?m:()=>!1),O=typeof m=="function"?E:m,P=g.useRef(!1),{escapeKeyBubbles:v,outsidePressBubbles:k}=lo(x),N=ge(A=>{if(!n||!d||!a||A.key!=="Escape")return;const M=C?Ae(C.nodesRef.current,i):[];if(!v&&(A.stopPropagation(),M.length>0)){let b=!0;if(M.forEach(y=>{var S;if((S=y.context)!=null&&S.open&&!y.context.dataRef.current.__escapeKeyBubbles){b=!1;return}}),!b)return}r.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),o(!1,Vt(A)?A.nativeEvent:A)}),I=ge(A=>{const M=P.current;if(P.current=!1,M||typeof O=="function"&&!O(A))return;const b=Ht(A),y="["+je("inert")+"]",S=z(f).querySelectorAll(y);let L=_(b)?b:null;for(;L&&!Mt(L);){const D=Ft(L);if(D===z(f).body||!_(D))break;L=D}if(S.length&&_(b)&&!Wt(b)&&!ie(b,f)&&Array.from(S).every(D=>!ie(L,D)))return;if(xe(b)&&f){const D=b.clientWidth>0&&b.scrollWidth>b.clientWidth,$=b.clientHeight>0&&b.scrollHeight>b.clientHeight;let H=$&&A.offsetX>b.clientWidth;if($&&kt(b).direction==="rtl"&&(H=A.offsetX<=b.offsetWidth-b.clientWidth),H||D&&A.offsetY>b.clientHeight)return}const F=C&&Ae(C.nodesRef.current,i).some(D=>{var $;return ae(A,($=D.context)==null?void 0:$.elements.floating)});if(ae(A,f)||ae(A,c)||F)return;const w=C?Ae(C.nodesRef.current,i):[];if(w.length>0){let D=!0;if(w.forEach($=>{var H;if((H=$.context)!=null&&H.open&&!$.context.dataRef.current.__outsidePressBubbles){D=!1;return}}),!D)return}r.emit("dismiss",{type:"outsidePress",data:{returnFocus:T?{preventScroll:!0}:_t(A)||Bt(A)}}),o(!1,A)});return g.useEffect(()=>{if(!n||!d)return;u.current.__escapeKeyBubbles=v,u.current.__outsidePressBubbles=k;function A(y){o(!1,y)}const M=z(f);a&&M.addEventListener("keydown",N),O&&M.addEventListener(l,I);let b=[];return R&&(_(c)&&(b=U(c)),_(f)&&(b=b.concat(U(f))),!_(s)&&s&&s.contextElement&&(b=b.concat(U(s.contextElement)))),b=b.filter(y=>{var S;return y!==((S=M.defaultView)==null?void 0:S.visualViewport)}),b.forEach(y=>{y.addEventListener("scroll",A,{passive:!0})}),()=>{a&&M.removeEventListener("keydown",N),O&&M.removeEventListener(l,I),b.forEach(y=>{y.removeEventListener("scroll",A)})}},[u,f,c,s,a,O,l,n,o,R,d,v,k,N,I]),g.useEffect(()=>{P.current=!1},[O,l]),g.useMemo(()=>d?{reference:{onKeyDown:N,[so[h]]:A=>{p&&(r.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),o(!1,A.nativeEvent))}},floating:{onKeyDown:N,[co[l]]:()=>{P.current=!0}}}:{},[d,r,p,l,h,o,N])}let Ne;process.env.NODE_ENV!=="production"&&(Ne=new Set);function fo(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:o,nodeId:r}=e;if(process.env.NODE_ENV!=="production"){var i;const v="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((i=e.elements)!=null&&i.reference&&!_(e.elements.reference)){var s;if(!((s=Ne)!=null&&s.has(v))){var c;(c=Ne)==null||c.add(v),console.error(v)}}}const[f,u]=g.useState(null),d=((t=e.elements)==null?void 0:t.reference)||f,a=Wn(e),m=Ke(),l=ge((v,k)=>{v&&(h.current.openEvent=k),o?.(v,k)}),p=g.useRef(null),h=g.useRef({}),R=g.useState(()=>Qn())[0],x=He(),C=g.useCallback(v=>{const k=_(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;a.refs.setReference(k)},[a.refs]),T=g.useCallback(v=>{(_(v)||v===null)&&(p.current=v,u(v)),(_(a.refs.reference.current)||a.refs.reference.current===null||v!==null&&!_(v))&&a.refs.setReference(v)},[a.refs]),E=g.useMemo(()=>({...a.refs,setReference:T,setPositionReference:C,domReference:p}),[a.refs,T,C]),O=g.useMemo(()=>({...a.elements,domReference:d}),[a.elements,d]),P=g.useMemo(()=>({...a,refs:E,elements:O,dataRef:h,nodeId:r,floatingId:x,events:R,open:n,onOpenChange:l}),[a,r,x,R,n,l,E,O]);return q(()=>{const v=m?.nodesRef.current.find(k=>k.id===r);v&&(v.context=P)}),g.useMemo(()=>({...a,context:P,refs:E,elements:O}),[a,E,O,P])}function ao(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:r,events:i,refs:s,elements:{floating:c,domReference:f}}=e,{enabled:u=!0,keyboardOnly:d=!0}=t,a=g.useRef(""),m=g.useRef(!1),l=g.useRef();return g.useEffect(()=>{if(!u)return;const h=z(c).defaultView||window;function R(){!n&&xe(f)&&f===It(z(f))&&(m.current=!0)}return h.addEventListener("blur",R),()=>{h.removeEventListener("blur",R)}},[c,f,n,u]),g.useEffect(()=>{if(!u)return;function p(h){(h.type==="referencePress"||h.type==="escapeKey")&&(m.current=!0)}return i.on("dismiss",p),()=>{i.off("dismiss",p)}},[i,u]),g.useEffect(()=>()=>{clearTimeout(l.current)},[]),g.useMemo(()=>u?{reference:{onPointerDown(p){let{pointerType:h}=p;a.current=h,m.current=!!(h&&d)},onMouseLeave(){m.current=!1},onFocus(p){var h;m.current||p.type==="focus"&&((h=r.current.openEvent)==null?void 0:h.type)==="mousedown"&&ae(r.current.openEvent,f)||o(!0,p.nativeEvent)},onBlur(p){m.current=!1;const h=p.relatedTarget,R=_(h)&&h.hasAttribute(je("focus-guard"))&&h.getAttribute("data-type")==="outside";l.current=setTimeout(()=>{ie(s.floating.current,h)||ie(f,h)||R||o(!1,p.nativeEvent)})}}}:{},[u,d,f,s,r,o])}function De(e,t,n){const o=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(r=>r?r[n]:null).concat(e).reduce((r,i)=>(i&&Object.entries(i).forEach(s=>{let[c,f]=s;if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof f=="function"){var u;(u=o.get(c))==null||u.push(f),r[c]=function(){for(var d,a=arguments.length,m=new Array(a),l=0;l<a;l++)m[l]=arguments[l];return(d=o.get(c))==null?void 0:d.map(p=>p(...m)).find(p=>p!==void 0)}}}else r[c]=f}),r),{})}}function mo(e){e===void 0&&(e=[]);const t=e,n=g.useCallback(i=>De(i,e,"reference"),t),o=g.useCallback(i=>De(i,e,"floating"),t),r=g.useCallback(i=>De(i,e,"item"),e.map(i=>i?.item));return g.useMemo(()=>({getReferenceProps:n,getFloatingProps:o,getItemProps:r}),[n,o,r])}function go(e,t){t===void 0&&(t={});const{open:n,floatingId:o}=e,{enabled:r=!0,role:i="dialog"}=t,s=He();return g.useMemo(()=>{const c={id:o,role:i};return r?i==="tooltip"?{reference:{"aria-describedby":n?o:void 0},floating:c}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?o:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:s}},floating:{...c,...i==="menu"&&{"aria-labelledby":s}}}:{}},[r,i,n,o,s])}function yo({closeDelay:e=300,offset:t=20,openDelay:n=0,placement:o="bottom-start",slots:r,trigger:i=["hover","focus"],withArrow:s=!0,arrow:c,role:f="dialog",visible:u={},hidden:d={},floatingOptions:a={},isOpen:m,onOpenChange:l}){const[p,h]=Ot(!1),R=ct(null),x=St(),{x:C,y:T,strategy:E,refs:O,context:P}=fo({placement:o,middleware:[Kn(t),Xn(),jn(),zn({element:R})],open:m||p,onOpenChange:l||h,whileElementsMounted:Fn,...a}),v=uo(P),k=go(P,{role:f}),{delay:N}=Rt(),A=eo(P,{delay:N||{open:n,close:e}}),M=ao(P),b=oo(P),y=[i.find(ee=>ee==="hover")?A:void 0,i.find(ee=>ee==="click")?b:void 0,i.find(ee=>ee==="focus")?M:void 0,v,k],{getReferenceProps:S,getFloatingProps:L}=mo(y);no(P,{id:x});const{onClick:F,...w}=S(),D=String((r?.content?.props).className).includes("pressable")?{onPress:F}:{onClick:F},$=r?.content?Tt(r.content,{...r.content.props,ref:O.setReference,...w,...D}):Pe("div",{ref:O.setReference,...S(),children:"Menu Action"}),H=r?.submenu?Xe(At.nav,{ref:O.setFloating,style:{position:E,top:T??0,left:C??0,width:"max-content",zIndex:50},...L(),variants:{hidden:d,visible:u},initial:"hidden",animate:m||p?"visible":"hidden",children:[s&&Pe(Gn,{ref:R,context:P,...c}),r.submenu]}):Pe("nav",{children:"Submenu"});return Xe(Ct,{children:[$,H]})}export{yo as Menu,yo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{forwardRef as
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{forwardRef as _,useId as A,useEffect as w,useCallback as k}from"react";import{ModalOverlay as y}from"react-aria-components";import{motion as C,AnimatePresence as I}from"framer-motion";import{useDialogTrigger as N}from"../DialogTrigger/DialogTrigger.js";import{cn as P}from"../../utils/cn.js";const F="body > [inert]:not(#__next):not([data-overlay-container])";function R(t){return Object.keys(t).some(e=>e.startsWith("__react"))}function b(){document.querySelectorAll(F).forEach(t=>t.removeAttribute("inert"))}function S(t){return!!(t.closest("[data-overlay-container]")||t.closest("#__next"))}const T=_(({style:t,children:e,...n},o)=>{const s=typeof t=="function"?t(n):t;return i(y,{...n,ref:o,style:s,children:e})});let d=null;function j(){return typeof window>"u"?null:(d||(d=C.create(T)),d)}const v=j();function p({animate:t,animation:e,setAnimation:n,className:o,animationVariants:s,isDismissable:O=!0,children:m,...h}){const M=A();w(()=>{b();const r=new MutationObserver(a=>{for(const u of a)if(u.type==="attributes"&&u.attributeName==="inert"){const c=u.target;c.parentElement===document.body?b():R(c)||c.removeAttribute("inert")}});return r.observe(document.body,{attributes:!0,attributeFilter:["inert"],subtree:!0}),()=>r.disconnect()},[]);const{key:E,shouldCloseOnInteractOutside:l,...g}=h,x=k(r=>l?l(r):S(r),[l]),f={isDismissable:O,shouldCloseOnInteractOutside:x,className:P("bg-black/30","fixed top-0 left-0","z-[1000]","w-screen h-[var(--visual-viewport-height)]",o),...g};return v?i(v,{isExiting:e==="hidden",onAnimationComplete:r=>{n(a=>r==="hidden"&&a==="hidden"?"unmounted":a)},variants:s||{hidden:{opacity:0,backdropFilter:"blur(0px)",transition:{delay:.08}},visible:{opacity:1,backdropFilter:"blur(8px)"}},initial:"hidden",animate:t,exit:"hidden",...f,children:m},E||M):i(y,{...f,children:m})}function B(t){const{isOpen:e}=t,{animation:n,setAnimation:o}=N();return e!==void 0?i(I,{children:e&&i(p,{...t,animate:"visible",animation:n,setAnimation:o})}):i(p,{...t,animate:n,animation:n,setAnimation:o})}export{B as ModalOverlay,B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as l,Fragment as p,jsx as e}from"react/jsx-runtime";import{forwardRef as y,useState as v}from"react";import{motion as j}from"framer-motion";import
|
|
1
|
+
import{jsxs as l,Fragment as p,jsx as e}from"react/jsx-runtime";import{forwardRef as y,useState as v}from"react";import{motion as j}from"framer-motion";import V from"next/image";import{FieldError as _}from"react-aria-components";import{cn as a}from"../../utils/cn.js";import k from"../../hooks/useIsClient.js";import{Skeleton as u}from"../Skeleton/Skeleton.js";function U({hasTitle:r,className:s}){return l("div",{className:"w-full h-full flex flex-col gap-4",children:[r&&e(u,{className:"w-1/2 h-8 mx-auto rounded-md z-20"}),e(u,{className:a("w-full h-56 rounded-md z-20 relative",s)})]})}const S=y(({title:r,description:s="Preview will display here.",fileExtension:d,actionTitle:g="select file",variant:i,errorMessage:h,defaultImagePath:n,classNames:f,...c},x)=>{const b=k(),[t,w]=v({src:null,alt:null}),C=!!h,N=d?d.split(",").map(o=>`image/${o.trim()}`).join(", "):"image/*";return l("div",{className:a("w-full h-full","flex flex-col gap-4"),children:[b?l(p,{children:[r&&e("h6",{className:a("text-center","text-2xl","m-0 mb-4"),children:r}),l("div",{className:a("w-full h-full","flex flex-col justify-between gap-5 items-center",["bg-slate-100",i==="base"&&"bg-transparent"],"rounded-md",[i==="base"&&"rounded-none"],["p-6 lg:p-7",i==="base"&&"p-0 lg:p-0"]),children:[l("label",{htmlFor:`${c?.name}-upload-file`,"aria-label":"image upload",onChange:o=>{const{target:{files:m}}=o;m&&w({src:URL.createObjectURL(m[0]),alt:m[0].name})},className:a("inline-flex justify-center items-center","uppercase text-base border-slate-200","bg-transparent","border-1 border-solid","px-4 py-0","rounded-2xl","cursor-pointer","w-full h-9",["max-w-48",i==="base"&&"max-w-none"],"my-0 mx-auto","has-[:disabled]:bg-transparent has-[:disabled]:text-slate-950","hover:bg-slate-100s hover:text-black",f?.label),children:[g,e("input",{id:`${c?.name}-upload-file`,accept:N,type:"file",hidden:!0,...c,ref:x,className:"hidden"})]}),n&&!t.src?e("div",{className:"flex justify-center items-center w-60",children:e("a",{href:n,target:"_blank",rel:"noreferrer",children:e("img",{src:n,alt:"",className:"w-full h-auto"})})}):l(p,{children:[e(j.div,{initial:{opacity:0},animate:{opacity:1},transition:{type:"spring",duration:3,bounce:0},className:"flex justify-center items-center w-52 h-auto",children:t.src?e(V,{src:t.src,height:96,width:200,alt:t.alt||"",className:"max-h-full object-contain"}):l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"31",height:"55",viewBox:"0 0 31 55",fill:"none",children:[e("g",{clipPath:"url(#clip0_15607_32844)",children:e("path",{d:"M15.9521 0.721924C24.2431 0.721924 30.9521 7.36392 30.9521 15.5719V43.9219C30.9521 49.8889 26.0703 54.7219 20.0431 54.7219C14.0158 54.7219 9.13397 49.8889 9.13397 43.9219V20.9719C9.13397 17.2459 12.1885 14.2219 15.9521 14.2219C19.7158 14.2219 22.7703 17.2459 22.7703 20.9719V41.2219H17.3158V20.7289C17.3158 19.2439 14.5885 19.2439 14.5885 20.7289V43.9219C14.5885 46.8919 17.0431 49.3219 20.0431 49.3219C23.0431 49.3219 25.4976 46.8919 25.4976 43.9219V15.5719C25.4976 10.3609 21.2158 6.12192 15.9521 6.12192C10.6885 6.12192 6.40669 10.3609 6.40669 15.5719V41.2219H0.952148V15.5719C0.952148 7.36392 7.66124 0.721924 15.9521 0.721924Z",fill:"#646464"})}),e("defs",{children:e("clipPath",{id:"clip0_15607_32844",children:e("rect",{width:"30",height:"54",fill:"white",transform:"translate(0.952148 0.721924)"})})})]})},t.src),e("p",{className:"m-0 text-slate-950 text-center",children:t.alt||s})]})]})]}):e(U,{hasTitle:!!r,className:f?.skeleton}),C&&e(_,{className:a("-mt-2","self-start"),children:h})]})});export{S as UploadImage,S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{UploadImage as
|
|
1
|
+
import{UploadImage as g}from"./UploadImage.js";import"react/jsx-runtime";import"react";import"framer-motion";import"next/image";import"react-aria-components";import"../../utils/cn.js";import"../../hooks/useIsClient.js";import"../Skeleton/Skeleton.js";export{g as UploadImage};
|
package/hooks/useRoute/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildPath as m,resolveParams as u,useRoute as p}from"./useRoute.js";import{RouteProvider as a,useRouteConfig as f}from"./RouteContext.js";import"react";import"
|
|
1
|
+
import{buildPath as m,resolveParams as u,useRoute as p}from"./useRoute.js";import{RouteProvider as a,useRouteConfig as f}from"./RouteContext.js";import"react";import"next/navigation";import"react/jsx-runtime";export{a as RouteProvider,m as buildPath,u as resolveParams,p as useRoute,f as useRouteConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import N,{useMemo as ge}from"react";import{r as Se,a as ve}from"../../assets/_interop_require_wildcard--0BIJI4E.js";import{useRouteConfig as pe}from"./RouteContext.js";import"react/jsx-runtime";var b={exports:{}},U={},Z;function Re(){return Z||(Z=1,(function(n){"use client";Object.defineProperty(n,"__esModule",{value:!0});function e(y,v){for(var g in v)Object.defineProperty(y,g,{enumerable:!0,get:v[g]})}e(n,{AppRouterContext:function(){return c},GlobalLayoutRouterContext:function(){return u},LayoutRouterContext:function(){return r},MissingSlotContext:function(){return f},TemplateContext:function(){return a}});const t=Se()._(N),c=t.default.createContext(null),r=t.default.createContext(null),u=t.default.createContext(null),a=t.default.createContext(null);process.env.NODE_ENV!=="production"&&(c.displayName="AppRouterContext",r.displayName="LayoutRouterContext",u.displayName="GlobalLayoutRouterContext",a.displayName="TemplateContext");const f=t.default.createContext(new Set)})(U)),U}var F={},K;function be(){return K||(K=1,(function(n){"use client";Object.defineProperty(n,"__esModule",{value:!0});function e(u,a){for(var f in a)Object.defineProperty(u,f,{enumerable:!0,get:a[f]})}e(n,{PathParamsContext:function(){return r},PathnameContext:function(){return c},SearchParamsContext:function(){return t}});const o=N,t=(0,o.createContext)(null),c=(0,o.createContext)(null),r=(0,o.createContext)(null);process.env.NODE_ENV!=="production"&&(t.displayName="SearchParamsContext",c.displayName="PathnameContext",r.displayName="PathParamsContext")})(F)),F}var m={exports:{}},W;function me(){return W||(W=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getSegmentValue",{enumerable:!0,get:function(){return o}});function o(t){return Array.isArray(t)?t[1]:t}(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(m,m.exports)),m.exports}var H={},X;function he(){return X||(X=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0});function e(r,u){for(var a in u)Object.defineProperty(r,a,{enumerable:!0,get:u[a]})}e(n,{DEFAULT_SEGMENT_KEY:function(){return c},PAGE_SEGMENT_KEY:function(){return t},isGroupSegment:function(){return o}});function o(r){return r[0]==="("&&r.endsWith(")")}const t="__PAGE__",c="__DEFAULT__"})(H)),H}var h={exports:{}},P={exports:{}},C={exports:{}},O={exports:{}},j={exports:{}},J;function V(){return J||(J=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"createAsyncLocalStorage",{enumerable:!0,get:function(){return r}});const o=new Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class t{disable(){throw o}getStore(){}run(){throw o}exit(){throw o}enterWith(){throw o}}const c=globalThis.AsyncLocalStorage;function r(){return c?new c:new t}(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(j,j.exports)),j.exports}var Q;function Pe(){return Q||(Q=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"requestAsyncStorage",{enumerable:!0,get:function(){return t}});const t=(0,V().createAsyncLocalStorage)();(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(O,O.exports)),O.exports}var $;function Ce(){return $||($=1,(function(n,e){"TURBOPACK { transition: next-shared }";Object.defineProperty(e,"__esModule",{value:!0});function o(r,u){for(var a in u)Object.defineProperty(r,a,{enumerable:!0,get:u[a]})}o(e,{getExpectedRequestStore:function(){return c},requestAsyncStorage:function(){return t.requestAsyncStorage}});const t=Pe();function c(r){const u=t.requestAsyncStorage.getStore();if(u)return u;throw new Error("`"+r+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(C,C.exports)),C.exports}var A={exports:{}},E={exports:{}},ee;function Oe(){return ee||(ee=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"actionAsyncStorage",{enumerable:!0,get:function(){return t}});const t=(0,V().createAsyncLocalStorage)();(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(E,E.exports)),E.exports}var te;function je(){return te||(te=1,(function(n,e){"TURBOPACK { transition: next-shared }";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"actionAsyncStorage",{enumerable:!0,get:function(){return o.actionAsyncStorage}});const o=Oe();(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(A,A.exports)),A.exports}var q={exports:{}},ne;function Ae(){return ne||(ne=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RedirectStatusCode",{enumerable:!0,get:function(){return o}});var o;(function(t){t[t.SeeOther=303]="SeeOther",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect"})(o||(o={})),(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(q,q.exports)),q.exports}var re;function Ee(){return re||(re=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0});function o(d,l){for(var i in l)Object.defineProperty(d,i,{enumerable:!0,get:l[i]})}o(e,{RedirectType:function(){return a},getRedirectError:function(){return f},getRedirectStatusCodeFromError:function(){return R},getRedirectTypeFromError:function(){return I},getURLFromRedirectError:function(){return x},isRedirectError:function(){return g},permanentRedirect:function(){return v},redirect:function(){return y}});const t=Ce(),c=je(),r=Ae(),u="NEXT_REDIRECT";var a;(function(d){d.push="push",d.replace="replace"})(a||(a={}));function f(d,l,i){i===void 0&&(i=r.RedirectStatusCode.TemporaryRedirect);const s=new Error(u);s.digest=u+";"+l+";"+d+";"+i+";";const _=t.requestAsyncStorage.getStore();return _&&(s.mutableCookies=_.mutableCookies),s}function y(d,l){l===void 0&&(l="replace");const i=c.actionAsyncStorage.getStore();throw f(d,l,i?.isAction?r.RedirectStatusCode.SeeOther:r.RedirectStatusCode.TemporaryRedirect)}function v(d,l){l===void 0&&(l="replace");const i=c.actionAsyncStorage.getStore();throw f(d,l,i?.isAction?r.RedirectStatusCode.SeeOther:r.RedirectStatusCode.PermanentRedirect)}function g(d){if(typeof d!="object"||d===null||!("digest"in d)||typeof d.digest!="string")return!1;const[l,i,s,_]=d.digest.split(";",4),S=Number(_);return l===u&&(i==="replace"||i==="push")&&typeof s=="string"&&!isNaN(S)&&S in r.RedirectStatusCode}function x(d){return g(d)?d.digest.split(";",3)[2]:null}function I(d){if(!g(d))throw new Error("Not a redirect error");return d.digest.split(";",2)[1]}function R(d){if(!g(d))throw new Error("Not a redirect error");return Number(d.digest.split(";",4)[3])}(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(P,P.exports)),P.exports}var M={exports:{}},ue;function qe(){return ue||(ue=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0});function o(u,a){for(var f in a)Object.defineProperty(u,f,{enumerable:!0,get:a[f]})}o(e,{isNotFoundError:function(){return r},notFound:function(){return c}});const t="NEXT_NOT_FOUND";function c(){const u=new Error(t);throw u.digest=t,u}function r(u){return typeof u!="object"||u===null||!("digest"in u)?!1:u.digest===t}(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(M,M.exports)),M.exports}var oe;function Me(){return oe||(oe=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0});function o(a,f){for(var y in f)Object.defineProperty(a,y,{enumerable:!0,get:f[y]})}o(e,{ReadonlyURLSearchParams:function(){return u},RedirectType:function(){return t.RedirectType},notFound:function(){return c.notFound},permanentRedirect:function(){return t.permanentRedirect},redirect:function(){return t.redirect}});const t=Ee(),c=qe();class r extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class u extends URLSearchParams{append(){throw new r}delete(){throw new r}set(){throw new r}sort(){throw new r}}(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(h,h.exports)),h.exports}var B={},ae;function Te(){return ae||(ae=1,(function(n){"use client";Object.defineProperty(n,"__esModule",{value:!0});function e(u,a){for(var f in a)Object.defineProperty(u,f,{enumerable:!0,get:a[f]})}e(n,{ServerInsertedHTMLContext:function(){return c},useServerInsertedHTML:function(){return r}});const t=ve()._(N),c=t.default.createContext(null);function r(u){const a=(0,t.useContext)(c);a&&a(u)}})(B)),B}var T={exports:{}},D={},ie;function Le(){return ie||(ie=1,(function(n){Object.defineProperty(n,"__esModule",{value:!0});function e(r,u){for(var a in u)Object.defineProperty(r,a,{enumerable:!0,get:u[a]})}e(n,{BailoutToCSRError:function(){return t},isBailoutToCSRError:function(){return c}});const o="BAILOUT_TO_CLIENT_SIDE_RENDERING";class t extends Error{constructor(u){super("Bail out to client-side rendering: "+u),this.reason=u,this.digest=o}}function c(r){return typeof r!="object"||r===null||!("digest"in r)?!1:r.digest===o}})(D)),D}var L={exports:{}},w={exports:{}},ce;function we(){return ce||(ce=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return t}});const t=(0,V().createAsyncLocalStorage)();(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(w,w.exports)),w.exports}var fe;function Ne(){return fe||(fe=1,(function(n,e){"TURBOPACK { transition: next-shared }";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return o.staticGenerationAsyncStorage}});const o=we();(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(L,L.exports)),L.exports}var de;function xe(){return de||(de=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"bailoutToClientRendering",{enumerable:!0,get:function(){return c}});const o=Le(),t=Ne();function c(r){const u=t.staticGenerationAsyncStorage.getStore();if(!u?.forceStatic&&u?.isStaticGeneration)throw new o.BailoutToCSRError(r)}(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(T,T.exports)),T.exports}var se;function Ie(){return se||(se=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0});function o(i,s){for(var _ in s)Object.defineProperty(i,_,{enumerable:!0,get:s[_]})}o(e,{ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return f.RedirectType},ServerInsertedHTMLContext:function(){return y.ServerInsertedHTMLContext},notFound:function(){return f.notFound},permanentRedirect:function(){return f.permanentRedirect},redirect:function(){return f.redirect},useParams:function(){return I},usePathname:function(){return g},useRouter:function(){return x},useSearchParams:function(){return v},useSelectedLayoutSegment:function(){return l},useSelectedLayoutSegments:function(){return d},useServerInsertedHTML:function(){return y.useServerInsertedHTML}});const t=N,c=Re(),r=be(),u=me(),a=he(),f=Me(),y=Te();function v(){const i=(0,t.useContext)(r.SearchParamsContext),s=(0,t.useMemo)(()=>i?new f.ReadonlyURLSearchParams(i):null,[i]);if(typeof window>"u"){const{bailoutToClientRendering:_}=xe();_("useSearchParams()")}return s}function g(){return(0,t.useContext)(r.PathnameContext)}function x(){const i=(0,t.useContext)(c.AppRouterContext);if(i===null)throw new Error("invariant expected app router to be mounted");return i}function I(){return(0,t.useContext)(r.PathParamsContext)}function R(i,s,_,S){_===void 0&&(_=!0),S===void 0&&(S=[]);let p;if(_)p=i[1][s];else{const z=i[1];var Y;p=(Y=z.children)!=null?Y:Object.values(z)[0]}if(!p)return S;const ye=p[0],G=(0,u.getSegmentValue)(ye);return!G||G.startsWith(a.PAGE_SEGMENT_KEY)?S:(S.push(G),R(p,s,!1,S))}function d(i){i===void 0&&(i="children");const s=(0,t.useContext)(c.LayoutRouterContext);return s?R(s.tree,i):null}function l(i){i===void 0&&(i="children");const s=d(i);if(!s||s.length===0)return null;const _=i==="children"?s[0]:s[s.length-1];return _===a.DEFAULT_SEGMENT_KEY?null:_}(typeof e.default=="function"||typeof e.default=="object"&&e.default!==null)&&typeof e.default.__esModule>"u"&&(Object.defineProperty(e.default,"__esModule",{value:!0}),Object.assign(e.default,e),n.exports=e.default)})(b,b.exports)),b.exports}var k,le;function Ge(){return le||(le=1,k=Ie()),k}var Ue=Ge();const Fe="/account/authenticate";function _e(n,e){return e?n.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,(o,t)=>{const c=e[t];if(c===void 0)throw new Error(`useRoute: missing required param "${t}" for path "${n}"`);return encodeURIComponent(c)}):n}function He(n){return/:([a-zA-Z_][a-zA-Z0-9_]*)/.test(n)}function Ye(n,e){return _e(n.path,e)}function ze(n,e,o){const t=Ue.usePathname(),{isLoggedIn:c}=pe();return ge(()=>{const{path:r,isProtected:u,name:a="unknown"}=n;if(He(r)&&!e)throw new Error(`useRoute: params required for route "${a}" with path "${r}"`);const f=_e(r,e);return o?.returnHere?`${f}?redirect=${encodeURIComponent(t??"/")}`:u&&!c?`${Fe}?redirect=${encodeURIComponent(f)}`:f},[n,e,o?.returnHere,t,c])}export{Ye as buildPath,_e as resolveParams,ze as useRoute};
|
|
1
|
+
import{useMemo as f}from"react";import{usePathname as m}from"next/navigation";import{useRouteConfig as d}from"./RouteContext.js";import"react/jsx-runtime";const h="/account/authenticate";function c(e,r){return r?e.replace(/:([a-zA-Z_][a-zA-Z0-9_]*)/g,(o,t)=>{const n=r[t];if(n===void 0)throw new Error(`useRoute: missing required param "${t}" for path "${e}"`);return encodeURIComponent(n)}):e}function p(e){return/:([a-zA-Z_][a-zA-Z0-9_]*)/.test(e)}function _(e,r){return c(e.path,r)}function w(e,r,o){const t=m(),{isLoggedIn:n}=d();return f(()=>{const{path:u,isProtected:s,name:a="unknown"}=e;if(p(u)&&!r)throw new Error(`useRoute: params required for route "${a}" with path "${u}"`);const i=c(u,r);return o?.returnHere?`${i}?redirect=${encodeURIComponent(t??"/")}`:s&&!n?`${h}?redirect=${encodeURIComponent(i)}`:i},[e,r,o?.returnHere,t,n])}export{_ as buildPath,c as resolveParams,w as useRoute};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f={},l;function o(){if(l)return f;l=1,f._=f._interop_require_default=u;function u(i){return i&&i.__esModule?i:{default:i}}return f}var p={},c;function q(){if(c)return p;c=1;function u(e){if(typeof WeakMap!="function")return null;var a=new WeakMap,r=new WeakMap;return(u=function(t){return t?r:a})(e)}p._=p._interop_require_wildcard=i;function i(e,a){if(!a&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=u(a);if(r&&r.has(e))return r.get(e);var t={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)){var _=d?Object.getOwnPropertyDescriptor(e,n):null;_&&(_.get||_.set)?Object.defineProperty(t,n,_):t[n]=e[n]}return t.default=e,r&&r.set(e,t),t}return p}export{q as a,o as r};
|
package/assets/image-BrrnSrBZ.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{r as he,a as nt}from"./_interop_require_wildcard--0BIJI4E.js";import rt from"react/jsx-runtime";import ge from"react";import at from"react-dom";function ut(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}var be={},Re={},Ee={},je;function $e(){return je||(je=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"warnOnce",{enumerable:!0,get:function(){return v}});let v=N=>{};if(process.env.NODE_ENV!=="production"){const N=new Set;v=T=>{N.has(T)||console.warn(T),N.add(T)}}})(Ee)),Ee}var we={},De;function ct(){return De||(De=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"getImageBlurSvg",{enumerable:!0,get:function(){return v}});function v(N){let{widthInt:T,heightInt:k,blurWidth:p,blurHeight:u,blurDataURL:a,objectFit:C}=N;const M=20,$=p?p*40:T,y=u?u*40:k,d=$&&y?"viewBox='0 0 "+$+" "+y+"'":"",i=d?"none":C==="contain"?"xMidYMid":C==="cover"?"xMidYMid slice":"none";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+d+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+M+"'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='"+M+"'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+i+"' style='filter: url(%23b);' href='"+a+"'/%3E%3C/svg%3E"}})(we)),we}var Ae={},qe;function Me(){return qe||(qe=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0});function v(k,p){for(var u in p)Object.defineProperty(k,u,{enumerable:!0,get:p[u]})}v(w,{VALID_LOADERS:function(){return N},imageConfigDefault:function(){return T}});const N=["default","imgix","cloudinary","akamai","custom"],T={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}})(Ae)),Ae}var Be;function ot(){return Be||(Be=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"getImgProps",{enumerable:!0,get:function(){return i}});const v=$e(),N=ct(),T=Me(),k=["lazy","eager",void 0];function p(c){return c.default!==void 0}function u(c){return c.src!==void 0}function a(c){return typeof c=="object"&&(p(c)||u(c))}const C=new Map;let M;function $(c){return typeof c>"u"?c:typeof c=="number"?Number.isFinite(c)?c:NaN:typeof c=="string"&&/^[0-9]+$/.test(c)?parseInt(c,10):NaN}function y(c,A,f){let{deviceSizes:g,allSizes:I}=c;if(f){const b=/(^|\s)(1?\d?\d)vw/g,s=[];for(let E;E=b.exec(f);E)s.push(parseInt(E[2]));if(s.length){const E=Math.min(...s)*.01;return{widths:I.filter(l=>l>=g[0]*E),kind:"w"}}return{widths:I,kind:"w"}}return typeof A!="number"?{widths:g,kind:"w"}:{widths:[...new Set([A,A*2].map(b=>I.find(s=>s>=b)||I[I.length-1]))],kind:"x"}}function d(c){let{config:A,src:f,unoptimized:g,width:I,quality:r,sizes:b,loader:s}=c;if(g)return{src:f,srcSet:void 0,sizes:void 0};const{widths:E,kind:l}=y(A,I,b),x=E.length-1;return{sizes:!b&&l==="w"?"100vw":b,srcSet:E.map((D,R)=>s({config:A,src:f,quality:r,width:D})+" "+(l==="w"?D:R+1)+l).join(", "),src:s({config:A,src:f,quality:r,width:E[x]})}}function i(c,A){let{src:f,sizes:g,unoptimized:I=!1,priority:r=!1,loading:b,className:s,quality:E,width:l,height:x,fill:D=!1,style:R,overrideSrc:G,onLoad:j,onLoadingComplete:X,placeholder:S="empty",blurDataURL:B,fetchPriority:z,decoding:ie="async",layout:K,objectFit:q,objectPosition:F,lazyBoundary:ne,lazyRoot:Z,...Y}=c;const{imgConf:W,showAltText:ce,blurComplete:V,defaultLoader:t}=A;let H,J=W||T.imageConfigDefault;if("allSizes"in J)H=J;else{var de;const _=[...J.deviceSizes,...J.imageSizes].sort((U,Q)=>U-Q),o=J.deviceSizes.sort((U,Q)=>U-Q),L=(de=J.qualities)==null?void 0:de.sort((U,Q)=>U-Q);H={...J,allSizes:_,deviceSizes:o,qualities:L}}if(typeof t>"u")throw new Error(`images.loaderFile detected but the file is missing default export.
|
|
2
|
-
Read more: https://nextjs.org/docs/messages/invalid-images-config`);let e=Y.loader||t;delete Y.loader,delete Y.srcSet;const n="__next_img_default"in e;if(n){if(H.loader==="custom")throw new Error('Image with src "'+f+`" is missing "loader" prop.
|
|
3
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{const _=e;e=o=>{const{config:L,...U}=o;return _(U)}}if(K){K==="fill"&&(D=!0);const _={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}},o={responsive:"100vw",fill:"100vw"},L=_[K];L&&(R={...R,...L});const U=o[K];U&&!g&&(g=U)}let pe="",m=$(l),P=$(x),ue,le;if(a(f)){const _=p(f)?f.default:f;if(!_.src)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(_));if(!_.height||!_.width)throw new Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(_));if(ue=_.blurWidth,le=_.blurHeight,B=B||_.blurDataURL,pe=_.src,!D){if(!m&&!P)m=_.width,P=_.height;else if(m&&!P){const o=m/_.width;P=Math.round(_.height*o)}else if(!m&&P){const o=P/_.height;m=Math.round(_.width*o)}}}f=typeof f=="string"?f:pe;let re=!r&&(b==="lazy"||typeof b>"u");(!f||f.startsWith("data:")||f.startsWith("blob:"))&&(I=!0,re=!1),H.unoptimized&&(I=!0),n&&f.endsWith(".svg")&&!H.dangerouslyAllowSVG&&(I=!0),r&&(z="high");const ee=$(E);if(process.env.NODE_ENV!=="production"){if(H.output==="export"&&n&&!I)throw new Error("Image Optimization using the default loader is not compatible with `{ output: 'export' }`.\n Possible solutions:\n - Remove `{ output: 'export' }` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure `{ images: { unoptimized: true } }` in `next.config.js` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api");if(!f)I=!0;else if(D){if(l)throw new Error('Image with src "'+f+'" has both "width" and "fill" properties. Only one should be used.');if(x)throw new Error('Image with src "'+f+'" has both "height" and "fill" properties. Only one should be used.');if(R?.position&&R.position!=="absolute")throw new Error('Image with src "'+f+'" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.');if(R?.width&&R.width!=="100%")throw new Error('Image with src "'+f+'" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.');if(R?.height&&R.height!=="100%")throw new Error('Image with src "'+f+'" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.')}else{if(typeof m>"u")throw new Error('Image with src "'+f+'" is missing required "width" property.');if(isNaN(m))throw new Error('Image with src "'+f+'" has invalid "width" property. Expected a numeric value in pixels but received "'+l+'".');if(typeof P>"u")throw new Error('Image with src "'+f+'" is missing required "height" property.');if(isNaN(P))throw new Error('Image with src "'+f+'" has invalid "height" property. Expected a numeric value in pixels but received "'+x+'".')}if(!k.includes(b))throw new Error('Image with src "'+f+'" has invalid "loading" property. Provided "'+b+'" should be one of '+k.map(String).join(",")+".");if(r&&b==="lazy")throw new Error('Image with src "'+f+`" has both "priority" and "loading='lazy'" properties. Only one should be used.`);if(S!=="empty"&&S!=="blur"&&!S.startsWith("data:image/"))throw new Error('Image with src "'+f+'" has invalid "placeholder" property "'+S+'".');if(S!=="empty"&&m&&P&&m*P<1600&&(0,v.warnOnce)('Image with src "'+f+'" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.'),S==="blur"&&!B){const _=["jpeg","png","webp","avif"];throw new Error('Image with src "'+f+`" has "placeholder='blur'" property but is missing the "blurDataURL" property.
|
|
4
|
-
Possible solutions:
|
|
5
|
-
- Add a "blurDataURL" property, the contents should be a small Data URL to represent the image
|
|
6
|
-
- Change the "src" property to a static import with one of the supported file types: `+_.join(",")+` (animated images not supported)
|
|
7
|
-
- Remove the "placeholder" property, effectively no blur effect
|
|
8
|
-
Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`)}if("ref"in Y&&(0,v.warnOnce)('Image with src "'+f+'" is using unsupported "ref" property. Consider using the "onLoad" property instead.'),!I&&!n){const _=e({config:H,src:f,width:m||400,quality:ee||75});let o;try{o=new URL(_)}catch{}(_===f||o&&o.pathname===f&&!o.search)&&(0,v.warnOnce)('Image with src "'+f+`" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.
|
|
9
|
-
Read more: https://nextjs.org/docs/messages/next-image-missing-loader-width`)}X&&(0,v.warnOnce)('Image with src "'+f+'" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.');for(const[_,o]of Object.entries({layout:K,objectFit:q,objectPosition:F,lazyBoundary:ne,lazyRoot:Z}))o&&(0,v.warnOnce)('Image with src "'+f+'" has legacy prop "'+_+`". Did you forget to run the codemod?
|
|
10
|
-
Read more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`);if(typeof window<"u"&&!M&&window.PerformanceObserver){M=new PerformanceObserver(_=>{for(const L of _.getEntries()){var o;const U=(L==null||(o=L.element)==null?void 0:o.src)||"",Q=C.get(U);Q&&!Q.priority&&Q.placeholder==="empty"&&!Q.src.startsWith("data:")&&!Q.src.startsWith("blob:")&&(0,v.warnOnce)('Image with src "'+Q.src+`" was detected as the Largest Contentful Paint (LCP). Please add the "priority" property if this image is above the fold.
|
|
11
|
-
Read more: https://nextjs.org/docs/api-reference/next/image#priority`)}});try{M.observe({type:"largest-contentful-paint",buffered:!0})}catch(_){console.error(_)}}}const fe=Object.assign(D?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:q,objectPosition:F}:{},ce?{}:{color:"transparent"},R),se=!V&&S!=="empty"?S==="blur"?'url("data:image/svg+xml;charset=utf-8,'+(0,N.getImageBlurSvg)({widthInt:m,heightInt:P,blurWidth:ue,blurHeight:le,blurDataURL:B||"",objectFit:fe.objectFit})+'")':'url("'+S+'")':null;let O=se?{backgroundSize:fe.objectFit||"cover",backgroundPosition:fe.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:se}:{};process.env.NODE_ENV==="development"&&O.backgroundImage&&S==="blur"&&B?.startsWith("/")&&(O.backgroundImage='url("'+B+'")');const te=d({config:H,src:f,unoptimized:I,width:m,quality:ee,sizes:g,loader:e});if(process.env.NODE_ENV!=="production"&&typeof window<"u"){let _;try{_=new URL(te.src)}catch{_=new URL(te.src,window.location.href)}C.set(_.href,{src:f,priority:r,placeholder:S})}return{props:{...Y,loading:re?"lazy":b,fetchPriority:z,width:m,height:P,decoding:ie,className:s,style:{...fe,...O},sizes:te.sizes,srcSet:te.srcSet,src:G||te.src},meta:{unoptimized:I,priority:r,placeholder:S,fill:D}}}})(Re)),Re}var _e={exports:{}},ye={exports:{}},xe={},ze;function lt(){return ze||(ze=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"default",{enumerable:!0,get:function(){return p}});const v=ge,N=typeof window>"u",T=N?()=>{}:v.useLayoutEffect,k=N?()=>{}:v.useEffect;function p(u){const{headManager:a,reduceComponentsToState:C}=u;function M(){if(a&&a.mountedInstances){const y=v.Children.toArray(Array.from(a.mountedInstances).filter(Boolean));a.updateHead(C(y,u))}}if(N){var $;a==null||($=a.mountedInstances)==null||$.add(u.children),M()}return T(()=>{var y;return a==null||(y=a.mountedInstances)==null||y.add(u.children),()=>{var d;a==null||(d=a.mountedInstances)==null||d.delete(u.children)}}),T(()=>(a&&(a._pendingUpdate=M),()=>{a&&(a._pendingUpdate=M)})),k(()=>(a&&a._pendingUpdate&&(a._pendingUpdate(),a._pendingUpdate=null),()=>{a&&a._pendingUpdate&&(a._pendingUpdate(),a._pendingUpdate=null)})),null}})(xe)),xe}var Ce={},Ue;function ft(){return Ue||(Ue=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"AmpStateContext",{enumerable:!0,get:function(){return T}});const T=he()._(ge).default.createContext({});process.env.NODE_ENV!=="production"&&(T.displayName="AmpStateContext")})(Ce)),Ce}var Se={},Ge;function pt(){return Ge||(Ge=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"HeadManagerContext",{enumerable:!0,get:function(){return T}});const T=he()._(ge).default.createContext({});process.env.NODE_ENV!=="production"&&(T.displayName="HeadManagerContext")})(Se)),Se}var Oe={},Fe;function dt(){return Fe||(Fe=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"isInAmpMode",{enumerable:!0,get:function(){return v}});function v(N){let{ampFirst:T=!1,hybrid:k=!1,hasQuery:p=!1}=N===void 0?{}:N;return T||k&&p}})(Oe)),Oe}var Ke;function ht(){return Ke||(Ke=1,(function(w,v){"use client";var N={};Object.defineProperty(v,"__esModule",{value:!0});function T(b,s){for(var E in s)Object.defineProperty(b,E,{enumerable:!0,get:s[E]})}T(v,{default:function(){return r},defaultHead:function(){return i}});const k=he(),p=nt(),u=rt,a=p._(ge),C=k._(lt()),M=ft(),$=pt(),y=dt(),d=$e();function i(b){b===void 0&&(b=!1);const s=[(0,u.jsx)("meta",{charSet:"utf-8"})];return b||s.push((0,u.jsx)("meta",{name:"viewport",content:"width=device-width"})),s}function c(b,s){return typeof s=="string"||typeof s=="number"?b:s.type===a.default.Fragment?b.concat(a.default.Children.toArray(s.props.children).reduce((E,l)=>typeof l=="string"||typeof l=="number"?E:E.concat(l),[])):b.concat(s)}const A=["name","httpEquiv","charSet","itemProp"];function f(){const b=new Set,s=new Set,E=new Set,l={};return x=>{let D=!0,R=!1;if(x.key&&typeof x.key!="number"&&x.key.indexOf("$")>0){R=!0;const G=x.key.slice(x.key.indexOf("$")+1);b.has(G)?D=!1:b.add(G)}switch(x.type){case"title":case"base":s.has(x.type)?D=!1:s.add(x.type);break;case"meta":for(let G=0,j=A.length;G<j;G++){const X=A[G];if(x.props.hasOwnProperty(X))if(X==="charSet")E.has(X)?D=!1:E.add(X);else{const S=x.props[X],B=l[X]||new Set;(X!=="name"||!R)&&B.has(S)?D=!1:(B.add(S),l[X]=B)}}break}return D}}function g(b,s){const{inAmpMode:E}=s;return b.reduce(c,[]).reverse().concat(i(E).reverse()).filter(f()).reverse().map((l,x)=>{const D=l.key||x;if(process.env.NODE_ENV!=="development"&&N.__NEXT_OPTIMIZE_FONTS&&!E&&l.type==="link"&&l.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(R=>l.props.href.startsWith(R))){const R={...l.props||{}};return R["data-href"]=R.href,R.href=void 0,R["data-optimized-fonts"]=!0,a.default.cloneElement(l,R)}if(process.env.NODE_ENV==="development")if(l.type==="script"&&l.props.type!=="application/ld+json"){const R=l.props.src?'<script> tag with src="'+l.props.src+'"':"inline <script>";(0,d.warnOnce)("Do not add <script> tags using next/head (see "+R+`). Use next/script instead.
|
|
12
|
-
See more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`)}else l.type==="link"&&l.props.rel==="stylesheet"&&(0,d.warnOnce)('Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="'+l.props.href+`"). Use Document instead.
|
|
13
|
-
See more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);return a.default.cloneElement(l,{key:D})})}function I(b){let{children:s}=b;const E=(0,a.useContext)(M.AmpStateContext),l=(0,a.useContext)($.HeadManagerContext);return(0,u.jsx)(C.default,{reduceComponentsToState:g,headManager:l,inAmpMode:(0,y.isInAmpMode)(E),children:s})}const r=I;(typeof v.default=="function"||typeof v.default=="object"&&v.default!==null)&&typeof v.default.__esModule>"u"&&(Object.defineProperty(v.default,"__esModule",{value:!0}),Object.assign(v.default,v),w.exports=v.default)})(ye,ye.exports)),ye.exports}var Ie={},We;function gt(){return We||(We=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"ImageConfigContext",{enumerable:!0,get:function(){return k}});const N=he()._(ge),T=Me(),k=N.default.createContext(T.imageConfigDefault);process.env.NODE_ENV!=="production"&&(k.displayName="ImageConfigContext")})(Ie)),Ie}var Le={},Xe;function mt(){return Xe||(Xe=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"RouterContext",{enumerable:!0,get:function(){return T}});const T=he()._(ge).default.createContext(null);process.env.NODE_ENV!=="production"&&(T.displayName="RouterContext")})(Le)),Le}var Pe={},Te={},He={exports:{}},Ve;function it(){return Ve||(Ve=1,(()=>{var w={170:(k,p,u)=>{const a=u(510),C=()=>{if(typeof navigator<"u"&&navigator.platform){const $=navigator.platform.toLowerCase();return $==="win32"||$==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function M($,y,d=!1){return y&&(y.windows===null||y.windows===void 0)&&(y={...y,windows:C()}),a($,y,d)}Object.assign(M,a),k.exports=M},154:k=>{const u="[^\\\\/]",y="(?=.)",d="[^/]",i="(?:\\/|$)",c="(?:^|\\/)",A=`\\.{1,2}${i}`,f="(?!\\.)",g=`(?!${c}${A})`,I=`(?!\\.{0,1}${i})`,r=`(?!${A})`,b="[^.\\/]",s=`${d}*?`,l={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:y,QMARK:d,END_ANCHOR:i,DOTS_SLASH:A,NO_DOT:f,NO_DOTS:g,NO_DOT_SLASH:I,NO_DOTS_SLASH:r,QMARK_NO_DOT:b,STAR:s,START_ANCHOR:c,SEP:"/"},x={...l,SLASH_LITERAL:"[\\\\/]",QMARK:u,STAR:`${u}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},D={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};k.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:D,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(R){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${R.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(R){return R===!0?x:l}}},697:(k,p,u)=>{const a=u(154),C=u(96),{MAX_LENGTH:M,POSIX_REGEX_SOURCE:$,REGEX_NON_SPECIAL_CHARS:y,REGEX_SPECIAL_CHARS_BACKREF:d,REPLACEMENTS:i}=a,c=(g,I)=>{if(typeof I.expandRange=="function")return I.expandRange(...g,I);g.sort();const r=`[${g.join("-")}]`;try{new RegExp(r)}catch{return g.map((s=>C.escapeRegex(s))).join("..")}return r},A=(g,I)=>`Missing ${g}: "${I}" - use "\\\\${I}" to match literal characters`,f=(g,I)=>{if(typeof g!="string")throw new TypeError("Expected a string");g=i[g]||g;const r={...I},b=typeof r.maxLength=="number"?Math.min(M,r.maxLength):M;let s=g.length;if(s>b)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${b}`);const E={type:"bos",value:"",output:r.prepend||""},l=[E],x=r.capture?"":"?:",D=a.globChars(r.windows),R=a.extglobChars(D),{DOT_LITERAL:G,PLUS_LITERAL:j,SLASH_LITERAL:X,ONE_CHAR:S,DOTS_SLASH:B,NO_DOT:z,NO_DOT_SLASH:ie,NO_DOTS_SLASH:K,QMARK:q,QMARK_NO_DOT:F,STAR:ne,START_ANCHOR:Z}=D,Y=h=>`(${x}(?:(?!${Z}${h.dot?B:G}).)*?)`,W=r.dot?"":z,ce=r.dot?q:F;let V=r.bash===!0?Y(r):ne;r.capture&&(V=`(${V})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);const t={input:g,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:l};g=C.removePrefix(g,t),s=g.length;const H=[],J=[],de=[];let e=E,n;const pe=()=>t.index===s-1,m=t.peek=(h=1)=>g[t.index+h],P=t.advance=()=>g[++t.index]||"",ue=()=>g.slice(t.index+1),le=(h="",_=0)=>{t.consumed+=h,t.index+=_},re=h=>{t.output+=h.output!=null?h.output:h.value,le(h.value)},ee=()=>{let h=1;for(;m()==="!"&&(m(2)!=="("||m(3)==="?");)P(),t.start++,h++;return h%2===0?!1:(t.negated=!0,t.start++,!0)},fe=h=>{t[h]++,de.push(h)},se=h=>{t[h]--,de.pop()},O=h=>{if(e.type==="globstar"){const _=t.braces>0&&(h.type==="comma"||h.type==="brace"),o=h.extglob===!0||H.length&&(h.type==="pipe"||h.type==="paren");h.type!=="slash"&&h.type!=="paren"&&!_&&!o&&(t.output=t.output.slice(0,-e.output.length),e.type="star",e.value="*",e.output=V,t.output+=e.output)}if(H.length&&h.type!=="paren"&&(H[H.length-1].inner+=h.value),(h.value||h.output)&&re(h),e&&e.type==="text"&&h.type==="text"){e.output=(e.output||e.value)+h.value,e.value+=h.value;return}h.prev=e,l.push(h),e=h},te=(h,_)=>{const o={...R[_],conditions:1,inner:""};o.prev=e,o.parens=t.parens,o.output=t.output;const L=(r.capture?"(":"")+o.open;fe("parens"),O({type:h,value:_,output:t.output?"":S}),O({type:"paren",extglob:!0,value:P(),output:L}),H.push(o)},ae=h=>{let _=h.close+(r.capture?")":""),o;if(h.type==="negate"){let L=V;if(h.inner&&h.inner.length>1&&h.inner.includes("/")&&(L=Y(r)),(L!==V||pe()||/^\)+$/.test(ue()))&&(_=h.close=`)$))${L}`),h.inner.includes("*")&&(o=ue())&&/^\.[^\\/.]+$/.test(o)){const U=f(o,{...I,fastpaths:!1}).output;_=h.close=`)${U})${L})`}h.prev.type==="bos"&&(t.negatedExtglob=!0)}O({type:"paren",extglob:!0,value:n,output:_}),se("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(g)){let h=!1,_=g.replace(d,((o,L,U,Q,oe,ve)=>Q==="\\"?(h=!0,o):Q==="?"?L?L+Q+(oe?q.repeat(oe.length):""):ve===0?ce+(oe?q.repeat(oe.length):""):q.repeat(U.length):Q==="."?G.repeat(U.length):Q==="*"?L?L+Q+(oe?V:""):V:L?o:`\\${o}`));return h===!0&&(r.unescape===!0?_=_.replace(/\\/g,""):_=_.replace(/\\+/g,(o=>o.length%2===0?"\\\\":o?"\\":""))),_===g&&r.contains===!0?(t.output=g,t):(t.output=C.wrapOutput(_,t,I),t)}for(;!pe();){if(n=P(),n==="\0")continue;if(n==="\\"){const o=m();if(o==="/"&&r.bash!==!0||o==="."||o===";")continue;if(!o){n+="\\",O({type:"text",value:n});continue}const L=/^\\+/.exec(ue());let U=0;if(L&&L[0].length>2&&(U=L[0].length,t.index+=U,U%2!==0&&(n+="\\")),r.unescape===!0?n=P():n+=P(),t.brackets===0){O({type:"text",value:n});continue}}if(t.brackets>0&&(n!=="]"||e.value==="["||e.value==="[^")){if(r.posix!==!1&&n===":"){const o=e.value.slice(1);if(o.includes("[")&&(e.posix=!0,o.includes(":"))){const L=e.value.lastIndexOf("["),U=e.value.slice(0,L),Q=e.value.slice(L+2),oe=$[Q];if(oe){e.value=U+oe,t.backtrack=!0,P(),!E.output&&l.indexOf(e)===1&&(E.output=S);continue}}}(n==="["&&m()!==":"||n==="-"&&m()==="]")&&(n=`\\${n}`),n==="]"&&(e.value==="["||e.value==="[^")&&(n=`\\${n}`),r.posix===!0&&n==="!"&&e.value==="["&&(n="^"),e.value+=n,re({value:n});continue}if(t.quotes===1&&n!=='"'){n=C.escapeRegex(n),e.value+=n,re({value:n});continue}if(n==='"'){t.quotes=t.quotes===1?0:1,r.keepQuotes===!0&&O({type:"text",value:n});continue}if(n==="("){fe("parens"),O({type:"paren",value:n});continue}if(n===")"){if(t.parens===0&&r.strictBrackets===!0)throw new SyntaxError(A("opening","("));const o=H[H.length-1];if(o&&t.parens===o.parens+1){ae(H.pop());continue}O({type:"paren",value:n,output:t.parens?")":"\\)"}),se("parens");continue}if(n==="["){if(r.nobracket===!0||!ue().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(A("closing","]"));n=`\\${n}`}else fe("brackets");O({type:"bracket",value:n});continue}if(n==="]"){if(r.nobracket===!0||e&&e.type==="bracket"&&e.value.length===1){O({type:"text",value:n,output:`\\${n}`});continue}if(t.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(A("opening","["));O({type:"text",value:n,output:`\\${n}`});continue}se("brackets");const o=e.value.slice(1);if(e.posix!==!0&&o[0]==="^"&&!o.includes("/")&&(n=`/${n}`),e.value+=n,re({value:n}),r.literalBrackets===!1||C.hasRegexChars(o))continue;const L=C.escapeRegex(e.value);if(t.output=t.output.slice(0,-e.value.length),r.literalBrackets===!0){t.output+=L,e.value=L;continue}e.value=`(${x}${L}|${e.value})`,t.output+=e.value;continue}if(n==="{"&&r.nobrace!==!0){fe("braces");const o={type:"brace",value:n,output:"(",outputIndex:t.output.length,tokensIndex:t.tokens.length};J.push(o),O(o);continue}if(n==="}"){const o=J[J.length-1];if(r.nobrace===!0||!o){O({type:"text",value:n,output:n});continue}let L=")";if(o.dots===!0){const U=l.slice(),Q=[];for(let oe=U.length-1;oe>=0&&(l.pop(),U[oe].type!=="brace");oe--)U[oe].type!=="dots"&&Q.unshift(U[oe].value);L=c(Q,r),t.backtrack=!0}if(o.comma!==!0&&o.dots!==!0){const U=t.output.slice(0,o.outputIndex),Q=t.tokens.slice(o.tokensIndex);o.value=o.output="\\{",n=L="\\}",t.output=U;for(const oe of Q)t.output+=oe.output||oe.value}O({type:"brace",value:n,output:L}),se("braces"),J.pop();continue}if(n==="|"){H.length>0&&H[H.length-1].conditions++,O({type:"text",value:n});continue}if(n===","){let o=n;const L=J[J.length-1];L&&de[de.length-1]==="braces"&&(L.comma=!0,o="|"),O({type:"comma",value:n,output:o});continue}if(n==="/"){if(e.type==="dot"&&t.index===t.start+1){t.start=t.index+1,t.consumed="",t.output="",l.pop(),e=E;continue}O({type:"slash",value:n,output:X});continue}if(n==="."){if(t.braces>0&&e.type==="dot"){e.value==="."&&(e.output=G);const o=J[J.length-1];e.type="dots",e.output+=n,e.value+=n,o.dots=!0;continue}if(t.braces+t.parens===0&&e.type!=="bos"&&e.type!=="slash"){O({type:"text",value:n,output:G});continue}O({type:"dot",value:n,output:G});continue}if(n==="?"){if(!(e&&e.value==="(")&&r.noextglob!==!0&&m()==="("&&m(2)!=="?"){te("qmark",n);continue}if(e&&e.type==="paren"){const L=m();let U=n;(e.value==="("&&!/[!=<:]/.test(L)||L==="<"&&!/<([!=]|\w+>)/.test(ue()))&&(U=`\\${n}`),O({type:"text",value:n,output:U});continue}if(r.dot!==!0&&(e.type==="slash"||e.type==="bos")){O({type:"qmark",value:n,output:F});continue}O({type:"qmark",value:n,output:q});continue}if(n==="!"){if(r.noextglob!==!0&&m()==="("&&(m(2)!=="?"||!/[!=<:]/.test(m(3)))){te("negate",n);continue}if(r.nonegate!==!0&&t.index===0){ee();continue}}if(n==="+"){if(r.noextglob!==!0&&m()==="("&&m(2)!=="?"){te("plus",n);continue}if(e&&e.value==="("||r.regex===!1){O({type:"plus",value:n,output:j});continue}if(e&&(e.type==="bracket"||e.type==="paren"||e.type==="brace")||t.parens>0){O({type:"plus",value:n});continue}O({type:"plus",value:j});continue}if(n==="@"){if(r.noextglob!==!0&&m()==="("&&m(2)!=="?"){O({type:"at",extglob:!0,value:n,output:""});continue}O({type:"text",value:n});continue}if(n!=="*"){(n==="$"||n==="^")&&(n=`\\${n}`);const o=y.exec(ue());o&&(n+=o[0],t.index+=o[0].length),O({type:"text",value:n});continue}if(e&&(e.type==="globstar"||e.star===!0)){e.type="star",e.star=!0,e.value+=n,e.output=V,t.backtrack=!0,t.globstar=!0,le(n);continue}let h=ue();if(r.noextglob!==!0&&/^\([^?]/.test(h)){te("star",n);continue}if(e.type==="star"){if(r.noglobstar===!0){le(n);continue}const o=e.prev,L=o.prev,U=o.type==="slash"||o.type==="bos",Q=L&&(L.type==="star"||L.type==="globstar");if(r.bash===!0&&(!U||h[0]&&h[0]!=="/")){O({type:"star",value:n,output:""});continue}const oe=t.braces>0&&(o.type==="comma"||o.type==="brace"),ve=H.length&&(o.type==="pipe"||o.type==="paren");if(!U&&o.type!=="paren"&&!oe&&!ve){O({type:"star",value:n,output:""});continue}for(;h.slice(0,3)==="/**";){const me=g[t.index+4];if(me&&me!=="/")break;h=h.slice(3),le("/**",3)}if(o.type==="bos"&&pe()){e.type="globstar",e.value+=n,e.output=Y(r),t.output=e.output,t.globstar=!0,le(n);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&!Q&&pe()){t.output=t.output.slice(0,-(o.output+e.output).length),o.output=`(?:${o.output}`,e.type="globstar",e.output=Y(r)+(r.strictSlashes?")":"|$)"),e.value+=n,t.globstar=!0,t.output+=o.output+e.output,le(n);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&h[0]==="/"){const me=h[1]!==void 0?"|$":"";t.output=t.output.slice(0,-(o.output+e.output).length),o.output=`(?:${o.output}`,e.type="globstar",e.output=`${Y(r)}${X}|${X}${me})`,e.value+=n,t.output+=o.output+e.output,t.globstar=!0,le(n+P()),O({type:"slash",value:"/",output:""});continue}if(o.type==="bos"&&h[0]==="/"){e.type="globstar",e.value+=n,e.output=`(?:^|${X}|${Y(r)}${X})`,t.output=e.output,t.globstar=!0,le(n+P()),O({type:"slash",value:"/",output:""});continue}t.output=t.output.slice(0,-e.output.length),e.type="globstar",e.output=Y(r),e.value+=n,t.output+=e.output,t.globstar=!0,le(n);continue}const _={type:"star",value:n,output:V};if(r.bash===!0){_.output=".*?",(e.type==="bos"||e.type==="slash")&&(_.output=W+_.output),O(_);continue}if(e&&(e.type==="bracket"||e.type==="paren")&&r.regex===!0){_.output=n,O(_);continue}(t.index===t.start||e.type==="slash"||e.type==="dot")&&(e.type==="dot"?(t.output+=ie,e.output+=ie):r.dot===!0?(t.output+=K,e.output+=K):(t.output+=W,e.output+=W),m()!=="*"&&(t.output+=S,e.output+=S)),O(_)}for(;t.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(A("closing","]"));t.output=C.escapeLast(t.output,"["),se("brackets")}for(;t.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(A("closing",")"));t.output=C.escapeLast(t.output,"("),se("parens")}for(;t.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(A("closing","}"));t.output=C.escapeLast(t.output,"{"),se("braces")}if(r.strictSlashes!==!0&&(e.type==="star"||e.type==="bracket")&&O({type:"maybe_slash",value:"",output:`${X}?`}),t.backtrack===!0){t.output="";for(const h of t.tokens)t.output+=h.output!=null?h.output:h.value,h.suffix&&(t.output+=h.suffix)}return t};f.fastpaths=(g,I)=>{const r={...I},b=typeof r.maxLength=="number"?Math.min(M,r.maxLength):M,s=g.length;if(s>b)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${b}`);g=i[g]||g;const{DOT_LITERAL:E,SLASH_LITERAL:l,ONE_CHAR:x,DOTS_SLASH:D,NO_DOT:R,NO_DOTS:G,NO_DOTS_SLASH:j,STAR:X,START_ANCHOR:S}=a.globChars(r.windows),B=r.dot?G:R,z=r.dot?j:R,ie=r.capture?"":"?:",K={negated:!1,prefix:""};let q=r.bash===!0?".*?":X;r.capture&&(q=`(${q})`);const F=W=>W.noglobstar===!0?q:`(${ie}(?:(?!${S}${W.dot?D:E}).)*?)`,ne=W=>{switch(W){case"*":return`${B}${x}${q}`;case".*":return`${E}${x}${q}`;case"*.*":return`${B}${q}${E}${x}${q}`;case"*/*":return`${B}${q}${l}${x}${z}${q}`;case"**":return B+F(r);case"**/*":return`(?:${B}${F(r)}${l})?${z}${x}${q}`;case"**/*.*":return`(?:${B}${F(r)}${l})?${z}${q}${E}${x}${q}`;case"**/.*":return`(?:${B}${F(r)}${l})?${E}${x}${q}`;default:{const ce=/^(.*?)\.(\w+)$/.exec(W);if(!ce)return;const V=ne(ce[1]);return V?V+E+ce[2]:void 0}}},Z=C.removePrefix(g,K);let Y=ne(Z);return Y&&r.strictSlashes!==!0&&(Y+=`${l}?`),Y},k.exports=f},510:(k,p,u)=>{const a=u(716),C=u(697),M=u(96),$=u(154),y=i=>i&&typeof i=="object"&&!Array.isArray(i),d=(i,c,A=!1)=>{if(Array.isArray(i)){const l=i.map((D=>d(D,c,A)));return D=>{for(const R of l){const G=R(D);if(G)return G}return!1}}const f=y(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!f)throw new TypeError("Expected pattern to be a non-empty string");const g=c||{},I=g.windows,r=f?d.compileRe(i,c):d.makeRe(i,c,!1,!0),b=r.state;delete r.state;let s=()=>!1;if(g.ignore){const l={...c,ignore:null,onMatch:null,onResult:null};s=d(g.ignore,l,A)}const E=(l,x=!1)=>{const{isMatch:D,match:R,output:G}=d.test(l,r,c,{glob:i,posix:I}),j={glob:i,state:b,regex:r,posix:I,input:l,output:G,match:R,isMatch:D};return typeof g.onResult=="function"&&g.onResult(j),D===!1?(j.isMatch=!1,x?j:!1):s(l)?(typeof g.onIgnore=="function"&&g.onIgnore(j),j.isMatch=!1,x?j:!1):(typeof g.onMatch=="function"&&g.onMatch(j),x?j:!0)};return A&&(E.state=b),E};d.test=(i,c,A,{glob:f,posix:g}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const I=A||{},r=I.format||(g?M.toPosixSlashes:null);let b=i===f,s=b&&r?r(i):i;return b===!1&&(s=r?r(i):i,b=s===f),(b===!1||I.capture===!0)&&(I.matchBase===!0||I.basename===!0?b=d.matchBase(i,c,A,g):b=c.exec(s)),{isMatch:!!b,match:b,output:s}},d.matchBase=(i,c,A)=>(c instanceof RegExp?c:d.makeRe(c,A)).test(M.basename(i)),d.isMatch=(i,c,A)=>d(c,A)(i),d.parse=(i,c)=>Array.isArray(i)?i.map((A=>d.parse(A,c))):C(i,{...c,fastpaths:!1}),d.scan=(i,c)=>a(i,c),d.compileRe=(i,c,A=!1,f=!1)=>{if(A===!0)return i.output;const g=c||{},I=g.contains?"":"^",r=g.contains?"":"$";let b=`${I}(?:${i.output})${r}`;i&&i.negated===!0&&(b=`^(?!${b}).*$`);const s=d.toRegex(b,c);return f===!0&&(s.state=i),s},d.makeRe=(i,c={},A=!1,f=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let g={negated:!1,fastpaths:!0};return c.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(g.output=C.fastpaths(i,c)),g.output||(g=C(i,c)),d.compileRe(g,c,A,f)},d.toRegex=(i,c)=>{try{const A=c||{};return new RegExp(i,A.flags||(A.nocase?"i":""))}catch(A){if(c&&c.debug===!0)throw A;return/$^/}},d.constants=$,k.exports=d},716:(k,p,u)=>{const a=u(96),{CHAR_ASTERISK:C,CHAR_AT:M,CHAR_BACKWARD_SLASH:$,CHAR_COMMA:y,CHAR_DOT:d,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:A,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:g,CHAR_PLUS:I,CHAR_QUESTION_MARK:r,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:s,CHAR_RIGHT_SQUARE_BRACKET:E}=u(154),l=R=>R===c||R===$,x=R=>{R.isPrefix!==!0&&(R.depth=R.isGlobstar?1/0:1)},D=(R,G)=>{const j=G||{},X=R.length-1,S=j.parts===!0||j.scanToEnd===!0,B=[],z=[],ie=[];let K=R,q=-1,F=0,ne=0,Z=!1,Y=!1,W=!1,ce=!1,V=!1,t=!1,H=!1,J=!1,de=!1,e=!1,n=0,pe,m,P={value:"",depth:0,isGlob:!1};const ue=()=>q>=X,le=()=>K.charCodeAt(q+1),re=()=>(pe=m,K.charCodeAt(++q));for(;q<X;){m=re();let te;if(m===$){H=P.backslashes=!0,m=re(),m===A&&(t=!0);continue}if(t===!0||m===A){for(n++;ue()!==!0&&(m=re());){if(m===$){H=P.backslashes=!0,re();continue}if(m===A){n++;continue}if(t!==!0&&m===d&&(m=re())===d){if(Z=P.isBrace=!0,W=P.isGlob=!0,e=!0,S===!0)continue;break}if(t!==!0&&m===y){if(Z=P.isBrace=!0,W=P.isGlob=!0,e=!0,S===!0)continue;break}if(m===b&&(n--,n===0)){t=!1,Z=P.isBrace=!0,e=!0;break}}if(S===!0)continue;break}if(m===c){if(B.push(q),z.push(P),P={value:"",depth:0,isGlob:!1},e===!0)continue;if(pe===d&&q===F+1){F+=2;continue}ne=q+1;continue}if(j.noext!==!0&&(m===I||m===M||m===C||m===r||m===i)===!0&&le()===f){if(W=P.isGlob=!0,ce=P.isExtglob=!0,e=!0,m===i&&q===F&&(de=!0),S===!0){for(;ue()!==!0&&(m=re());){if(m===$){H=P.backslashes=!0,m=re();continue}if(m===s){W=P.isGlob=!0,e=!0;break}}continue}break}if(m===C){if(pe===C&&(V=P.isGlobstar=!0),W=P.isGlob=!0,e=!0,S===!0)continue;break}if(m===r){if(W=P.isGlob=!0,e=!0,S===!0)continue;break}if(m===g){for(;ue()!==!0&&(te=re());){if(te===$){H=P.backslashes=!0,re();continue}if(te===E){Y=P.isBracket=!0,W=P.isGlob=!0,e=!0;break}}if(S===!0)continue;break}if(j.nonegate!==!0&&m===i&&q===F){J=P.negated=!0,F++;continue}if(j.noparen!==!0&&m===f){if(W=P.isGlob=!0,S===!0){for(;ue()!==!0&&(m=re());){if(m===f){H=P.backslashes=!0,m=re();continue}if(m===s){e=!0;break}}continue}break}if(W===!0){if(e=!0,S===!0)continue;break}}j.noext===!0&&(ce=!1,W=!1);let ee=K,fe="",se="";F>0&&(fe=K.slice(0,F),K=K.slice(F),ne-=F),ee&&W===!0&&ne>0?(ee=K.slice(0,ne),se=K.slice(ne)):W===!0?(ee="",se=K):ee=K,ee&&ee!==""&&ee!=="/"&&ee!==K&&l(ee.charCodeAt(ee.length-1))&&(ee=ee.slice(0,-1)),j.unescape===!0&&(se&&(se=a.removeBackslashes(se)),ee&&H===!0&&(ee=a.removeBackslashes(ee)));const O={prefix:fe,input:R,start:F,base:ee,glob:se,isBrace:Z,isBracket:Y,isGlob:W,isExtglob:ce,isGlobstar:V,negated:J,negatedExtglob:de};if(j.tokens===!0&&(O.maxDepth=0,l(m)||z.push(P),O.tokens=z),j.parts===!0||j.tokens===!0){let te;for(let ae=0;ae<B.length;ae++){const h=te?te+1:F,_=B[ae],o=R.slice(h,_);j.tokens&&(ae===0&&F!==0?(z[ae].isPrefix=!0,z[ae].value=fe):z[ae].value=o,x(z[ae]),O.maxDepth+=z[ae].depth),(ae!==0||o!=="")&&ie.push(o),te=_}if(te&&te+1<R.length){const ae=R.slice(te+1);ie.push(ae),j.tokens&&(z[z.length-1].value=ae,x(z[z.length-1]),O.maxDepth+=z[z.length-1].depth)}O.slashes=B,O.parts=ie}return O};k.exports=D},96:(k,p,u)=>{const{REGEX_BACKSLASH:a,REGEX_REMOVE_BACKSLASH:C,REGEX_SPECIAL_CHARS:M,REGEX_SPECIAL_CHARS_GLOBAL:$}=u(154);p.isObject=y=>y!==null&&typeof y=="object"&&!Array.isArray(y),p.hasRegexChars=y=>M.test(y),p.isRegexChar=y=>y.length===1&&p.hasRegexChars(y),p.escapeRegex=y=>y.replace($,"\\$1"),p.toPosixSlashes=y=>y.replace(a,"/"),p.removeBackslashes=y=>y.replace(C,(d=>d==="\\"?"":d)),p.escapeLast=(y,d,i)=>{const c=y.lastIndexOf(d,i);return c===-1?y:y[c-1]==="\\"?p.escapeLast(y,d,c-1):`${y.slice(0,c)}\\${y.slice(c)}`},p.removePrefix=(y,d={})=>{let i=y;return i.startsWith("./")&&(i=i.slice(2),d.prefix="./"),i},p.wrapOutput=(y,d={},i={})=>{const c=i.contains?"":"^",A=i.contains?"":"$";let f=`${c}(?:${y})${A}`;return d.negated===!0&&(f=`(?:^(?!${f}).*$)`),f},p.basename=(y,{windows:d}={})=>{const i=y.split(d?/[\\/]/:"/"),c=i[i.length-1];return c===""?i[i.length-2]:c}}},v={};function N(k){var p=v[k];if(p!==void 0)return p.exports;var u=v[k]={exports:{}},a=!0;try{w[k](u,u.exports,N),a=!1}finally{a&&delete v[k]}return u.exports}typeof N<"u"&&(N.ab=__dirname+"/");var T=N(170);He.exports=T})()),He.exports}var Qe;function _t(){return Qe||(Qe=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0});function v(p,u){for(var a in u)Object.defineProperty(p,a,{enumerable:!0,get:u[a]})}v(w,{hasLocalMatch:function(){return k},matchLocalPattern:function(){return T}});const N=it();function T(p,u){if(p.search!==void 0&&p.search!==u.search)return!1;var a;return!!(0,N.makeRe)((a=p.pathname)!=null?a:"**",{dot:!0}).test(u.pathname)}function k(p,u){if(!p)return!0;const a=new URL(u,"http://n");return p.some(C=>T(C,a))}})(Te)),Te}var Ne={},Ye;function yt(){return Ye||(Ye=1,(function(w){Object.defineProperty(w,"__esModule",{value:!0});function v(p,u){for(var a in u)Object.defineProperty(p,a,{enumerable:!0,get:u[a]})}v(w,{hasRemoteMatch:function(){return k},matchRemotePattern:function(){return T}});const N=it();function T(p,u){if(p.protocol!==void 0){const C=u.protocol.slice(0,-1);if(p.protocol!==C)return!1}if(p.port!==void 0&&p.port!==u.port)return!1;if(p.hostname===void 0)throw new Error(`Pattern should define hostname but found
|
|
14
|
-
`+JSON.stringify(p));if(!(0,N.makeRe)(p.hostname).test(u.hostname)||p.search!==void 0&&p.search!==u.search)return!1;var a;return!!(0,N.makeRe)((a=p.pathname)!=null?a:"**",{dot:!0}).test(u.pathname)}function k(p,u,a){return p.some(C=>a.hostname===C)||u.some(C=>T(C,a))}})(Ne)),Ne}var Ze;function st(){return Ze||(Ze=1,(function(w){var v={};Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"default",{enumerable:!0,get:function(){return k}});const N=75;function T(p){let{config:u,src:a,width:C,quality:M}=p;var $;if(process.env.NODE_ENV!=="production"){const d=[];if(a||d.push("src"),C||d.push("width"),d.length>0)throw new Error("Next Image Optimization requires "+d.join(", ")+" to be provided. Make sure you pass them as props to the `next/image` component. Received: "+JSON.stringify({src:a,width:C,quality:M}));if(a.startsWith("//"))throw new Error('Failed to parse src "'+a+'" on `next/image`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)');if(a.startsWith("/")&&u.localPatterns&&process.env.NODE_ENV!=="test"&&v.NEXT_RUNTIME!=="edge"){const{hasLocalMatch:i}=_t();if(!i(u.localPatterns,a))throw new Error("Invalid src prop ("+a+") on `next/image` does not match `images.localPatterns` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns")}if(!a.startsWith("/")&&(u.domains||u.remotePatterns)){let i;try{i=new URL(a)}catch(c){throw console.error(c),new Error('Failed to parse src "'+a+'" on `next/image`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)')}if(process.env.NODE_ENV!=="test"&&v.NEXT_RUNTIME!=="edge"){const{hasRemoteMatch:c}=yt();if(!c(u.domains,u.remotePatterns,i))throw new Error("Invalid src prop ("+a+') on `next/image`, hostname "'+i.hostname+'" is not configured under images in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host')}}if(M&&u.qualities&&!u.qualities.includes(M))throw new Error("Invalid quality prop ("+M+") on `next/image` does not match `images.qualities` configured in your `next.config.js`\nSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-qualities")}const y=M||(($=u.qualities)==null?void 0:$.reduce((d,i)=>Math.abs(i-N)<Math.abs(d-N)?i:d))||N;return u.path+"?url="+encodeURIComponent(a)+"&w="+C+"&q="+y+(v.NEXT_DEPLOYMENT_ID?"&dpl="+v.NEXT_DEPLOYMENT_ID:"")}T.__next_img_default=!0;const k=T})(Pe)),Pe}var Je;function vt(){return Je||(Je=1,(function(w,v){"use client";var N={};Object.defineProperty(v,"__esModule",{value:!0}),Object.defineProperty(v,"Image",{enumerable:!0,get:function(){return b}});const T=he(),k=nt(),p=rt,u=k._(ge),a=T._(at),C=T._(ht()),M=ot(),$=Me(),y=gt(),d=$e(),i=mt(),c=T._(st()),A=N.__NEXT_IMAGE_OPTS;typeof window>"u"&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);function f(s,E,l,x,D,R,G){const j=s?.src;if(!s||s["data-loaded-src"]===j)return;s["data-loaded-src"]=j,("decode"in s?s.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(!(!s.parentElement||!s.isConnected)){if(E!=="empty"&&D(!0),l?.current){const S=new Event("load");Object.defineProperty(S,"target",{writable:!1,value:s});let B=!1,z=!1;l.current({...S,nativeEvent:S,currentTarget:s,target:s,isDefaultPrevented:()=>B,isPropagationStopped:()=>z,persist:()=>{},preventDefault:()=>{B=!0,S.preventDefault()},stopPropagation:()=>{z=!0,S.stopPropagation()}})}if(x?.current&&x.current(s),process.env.NODE_ENV!=="production"){const S=new URL(j,"http://n").searchParams.get("url")||j;if(s.getAttribute("data-nimg")==="fill"){if(!R&&(!G||G==="100vw")&&s.getBoundingClientRect().width/window.innerWidth<.6&&(G==="100vw"?(0,d.warnOnce)('Image with src "'+S+'" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes'):(0,d.warnOnce)('Image with src "'+S+'" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes')),s.parentElement){const{position:ie}=window.getComputedStyle(s.parentElement),K=["absolute","fixed","relative"];K.includes(ie)||(0,d.warnOnce)('Image with src "'+S+'" has "fill" and parent element with invalid "position". Provided "'+ie+'" should be one of '+K.map(String).join(",")+".")}s.height===0&&(0,d.warnOnce)('Image with src "'+S+'" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.')}const B=s.height.toString()!==s.getAttribute("height"),z=s.width.toString()!==s.getAttribute("width");(B&&!z||!B&&z)&&(0,d.warnOnce)('Image with src "'+S+`" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`)}}})}function g(s){return u.use?{fetchPriority:s}:{fetchpriority:s}}const I=(0,u.forwardRef)((s,E)=>{let{src:l,srcSet:x,sizes:D,height:R,width:G,decoding:j,className:X,style:S,fetchPriority:B,placeholder:z,loading:ie,unoptimized:K,fill:q,onLoadRef:F,onLoadingCompleteRef:ne,setBlurComplete:Z,setShowAltText:Y,sizesInput:W,onLoad:ce,onError:V,...t}=s;return(0,p.jsx)("img",{...t,...g(B),loading:ie,width:G,height:R,decoding:j,"data-nimg":q?"fill":"1",className:X,style:S,sizes:D,srcSet:x,src:l,ref:(0,u.useCallback)(H=>{E&&(typeof E=="function"?E(H):typeof E=="object"&&(E.current=H)),H&&(V&&(H.src=H.src),process.env.NODE_ENV!=="production"&&(l||console.error('Image is missing required "src" property:',H),H.getAttribute("alt")===null&&console.error('Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.')),H.complete&&f(H,z,F,ne,Z,K,W))},[l,z,F,ne,Z,V,K,W,E]),onLoad:H=>{const J=H.currentTarget;f(J,z,F,ne,Z,K,W)},onError:H=>{Y(!0),z!=="empty"&&Z(!0),V&&V(H)}})});function r(s){let{isAppRouter:E,imgAttributes:l}=s;const x={as:"image",imageSrcSet:l.srcSet,imageSizes:l.sizes,crossOrigin:l.crossOrigin,referrerPolicy:l.referrerPolicy,...g(l.fetchPriority)};return E&&a.default.preload?(a.default.preload(l.src,x),null):(0,p.jsx)(C.default,{children:(0,p.jsx)("link",{rel:"preload",href:l.srcSet?void 0:l.src,...x},"__nimg-"+l.src+l.srcSet+l.sizes)})}const b=(0,u.forwardRef)((s,E)=>{const x=!(0,u.useContext)(i.RouterContext),D=(0,u.useContext)(y.ImageConfigContext),R=(0,u.useMemo)(()=>{var ne;const Z=A||D||$.imageConfigDefault,Y=[...Z.deviceSizes,...Z.imageSizes].sort((V,t)=>V-t),W=Z.deviceSizes.sort((V,t)=>V-t),ce=(ne=Z.qualities)==null?void 0:ne.sort((V,t)=>V-t);return{...Z,allSizes:Y,deviceSizes:W,qualities:ce}},[D]),{onLoad:G,onLoadingComplete:j}=s,X=(0,u.useRef)(G);(0,u.useEffect)(()=>{X.current=G},[G]);const S=(0,u.useRef)(j);(0,u.useEffect)(()=>{S.current=j},[j]);const[B,z]=(0,u.useState)(!1),[ie,K]=(0,u.useState)(!1),{props:q,meta:F}=(0,M.getImgProps)(s,{defaultLoader:c.default,imgConf:R,blurComplete:B,showAltText:ie});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(I,{...q,unoptimized:F.unoptimized,placeholder:F.placeholder,fill:F.fill,onLoadRef:X,onLoadingCompleteRef:S,setBlurComplete:z,setShowAltText:K,sizesInput:s.sizes,ref:E}),F.priority?(0,p.jsx)(r,{isAppRouter:x,imgAttributes:q}):null]})});(typeof v.default=="function"||typeof v.default=="object"&&v.default!==null)&&typeof v.default.__esModule>"u"&&(Object.defineProperty(v.default,"__esModule",{value:!0}),Object.assign(v.default,v),w.exports=v.default)})(_e,_e.exports)),_e.exports}var et;function bt(){return et||(et=1,(function(w){var v={};Object.defineProperty(w,"__esModule",{value:!0});function N(M,$){for(var y in $)Object.defineProperty(M,y,{enumerable:!0,get:$[y]})}N(w,{default:function(){return C},getImageProps:function(){return a}});const T=he(),k=ot(),p=vt(),u=T._(st());function a(M){const{props:$}=(0,k.getImgProps)(M,{defaultLoader:u.default,imgConf:v.__NEXT_IMAGE_OPTS});for(const[y,d]of Object.entries($))d===void 0&&delete $[y];return{props:$}}const C=p.Image})(be)),be}var ke,tt;function Rt(){return tt||(tt=1,ke=bt()),ke}var Et=Rt();const St=ut(Et);export{St as N};
|