This commit implements the core admin dashboard functionality including NextAuth authentication, Cloudflare D1 database integration with complete schema, and Cloudflare R2 file upload system for portfolio images. Features include artist management, appointment scheduling, and data migration capabilities.
1 line
27 KiB
JavaScript
1 line
27 KiB
JavaScript
"use strict";exports.id=3630,exports.ids=[3630],exports.modules={62513:(e,t,n)=>{n.d(t,{Z:()=>r});let r=(0,n(26323).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},62386:(e,t,n)=>{n.d(t,{x7:()=>eL,Me:()=>ev,oo:()=>eE,RR:()=>eA,Cp:()=>eS,dr:()=>eT,cv:()=>eb,uY:()=>eR,dp:()=>eC});let r=["top","right","bottom","left"],i=Math.min,o=Math.max,l=Math.round,a=Math.floor,f=e=>({x:e,y:e}),s={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function c(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}let g=new Set(["top","bottom"]);function y(e){return g.has(d(e))?"y":"x"}function w(e){return e.replace(/start|end/g,e=>u[e])}let x=["left","right"],v=["right","left"],b=["top","bottom"],R=["bottom","top"];function A(e){return e.replace(/left|right|bottom|top/g,e=>s[e])}function C(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function S(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function L(e,t,n){let r,{reference:i,floating:o}=e,l=y(t),a=h(y(t)),f=m(a),s=d(t),u="y"===l,c=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,w=i[f]/2-o[f]/2;switch(s){case"top":r={x:c,y:i.y-o.height};break;case"bottom":r={x:c,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:g};break;case"left":r={x:i.x-o.width,y:g};break;default:r={x:i.x,y:i.y}}switch(p(t)){case"start":r[a]-=w*(n&&u?-1:1);break;case"end":r[a]+=w*(n&&u?-1:1)}return r}let T=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),f=await (null==l.isRTL?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=L(s,r,f),d=r,p={},h=0;for(let n=0;n<a.length;n++){let{name:o,fn:m}=a[n],{x:g,y:y,data:w,reset:x}=await m({x:u,y:c,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,c=null!=y?y:c,p={...p,[o]:{...p[o],...w}},x&&h<=50&&(h++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(s=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:c}=L(s,d,f)),n=-1)}return{x:u,y:c,placement:d,strategy:i,middlewareData:p}};async function E(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:l,elements:a,strategy:f}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=c(t,e),m=C(h),g=a[p?"floating"===d?"reference":"floating":d],y=S(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:s,rootBoundary:u,strategy:f})),w="floating"===d?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),v=await (null==o.isElement?void 0:o.isElement(x))&&await (null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},b=S(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:f}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}function O(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function P(e){return r.some(t=>e[t]>=0)}let M=new Set(["left","top"]);async function D(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=d(n),a=p(n),f="y"===y(n),s=M.has(l)?-1:1,u=o&&f?-1:1,h=c(t,e),{mainAxis:m,crossAxis:g,alignmentAxis:w}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof w&&(g="end"===a?-1*w:w),f?{x:g*u,y:m*s}:{x:m*s,y:g*u}}function k(){return"undefined"!=typeof window}function F(e){return j(e)?(e.nodeName||"").toLowerCase():"#document"}function H(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function W(e){var t;return null==(t=(j(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function j(e){return!!k()&&(e instanceof Node||e instanceof H(e).Node)}function $(e){return!!k()&&(e instanceof Element||e instanceof H(e).Element)}function N(e){return!!k()&&(e instanceof HTMLElement||e instanceof H(e).HTMLElement)}function V(e){return!!k()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof H(e).ShadowRoot)}let Y=new Set(["inline","contents"]);function B(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Y.has(i)}let z=new Set(["table","td","th"]),I=[":popover-open",":modal"];function q(e){return I.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let X=["transform","translate","scale","rotate","perspective"],Z=["transform","translate","scale","rotate","perspective","filter"],_=["paint","layout","strict","content"];function G(e){let t=J(),n=$(e)?U(e):e;return X.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Z.some(e=>(n.willChange||"").includes(e))||_.some(e=>(n.contain||"").includes(e))}function J(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let K=new Set(["html","body","#document"]);function Q(e){return K.has(F(e))}function U(e){return H(e).getComputedStyle(e)}function ee(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function et(e){if("html"===F(e))return e;let t=e.assignedSlot||e.parentNode||V(e)&&e.host||W(e);return V(t)?t.host:t}function en(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=et(t);return Q(n)?t.ownerDocument?t.ownerDocument.body:t.body:N(n)&&B(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=H(i);if(o){let e=er(l);return t.concat(l,l.visualViewport||[],B(i)?i:[],e&&n?en(e):[])}return t.concat(i,en(i,[],n))}function er(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ei(e){let t=U(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=N(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,f=l(n)!==o||l(r)!==a;return f&&(n=o,r=a),{width:n,height:r,$:f}}function eo(e){return $(e)?e:e.contextElement}function el(e){let t=eo(e);if(!N(t))return f(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=ei(t),a=(o?l(n.width):n.width)/r,s=(o?l(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}let ea=f(0);function ef(e){let t=H(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ea}function es(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),l=eo(e),a=f(1);t&&(r?$(r)&&(a=el(r)):a=el(e));let s=(void 0===(i=n)&&(i=!1),r&&(!i||r===H(l))&&i)?ef(l):f(0),u=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,p=o.height/a.y;if(l){let e=H(l),t=r&&$(r)?H(r):r,n=e,i=er(n);for(;i&&r&&t!==n;){let e=el(i),t=i.getBoundingClientRect(),r=U(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,p*=e.y,u+=o,c+=l,i=er(n=H(i))}}return S({width:d,height:p,x:u,y:c})}function eu(e,t){let n=ee(e).scrollLeft;return t?t.left+n:es(W(e)).left+n}function ec(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eu(e,n),y:n.top+t.scrollTop}}let ed=new Set(["absolute","fixed"]);function ep(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=H(e),r=W(e),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,a=0,f=0;if(i){o=i.width,l=i.height;let e=J();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,f=i.offsetTop)}let s=eu(r);if(s<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-i);l<=25&&(o-=l)}else s<=25&&(o+=s);return{width:o,height:l,x:a,y:f}}(e,n);else if("document"===t)r=function(e){let t=W(e),n=ee(e),r=e.ownerDocument.body,i=o(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=o(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+eu(e),f=-n.scrollTop;return"rtl"===U(r).direction&&(a+=o(t.clientWidth,r.clientWidth)-i),{width:i,height:l,x:a,y:f}}(W(e));else if($(t))r=function(e,t){let n=es(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=N(e)?el(e):f(1),l=e.clientWidth*o.x;return{width:l,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,n);else{let n=ef(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function eh(e){return"static"===U(e).position}function em(e,t){if(!N(e)||"fixed"===U(e).position)return null;if(t)return t(e);let n=e.offsetParent;return W(e)===n&&(n=n.ownerDocument.body),n}function eg(e,t){var n;let r=H(e);if(q(e))return r;if(!N(e)){let t=et(e);for(;t&&!Q(t);){if($(t)&&!eh(t))return t;t=et(t)}return r}let i=em(e,t);for(;i&&(n=i,z.has(F(n)))&&eh(i);)i=em(i,t);return i&&Q(i)&&eh(i)&&!G(i)?r:i||function(e){let t=et(e);for(;N(t)&&!Q(t);){if(G(t))return t;if(q(t))break;t=et(t)}return null}(e)||r}let ey=async function(e){let t=this.getOffsetParent||eg,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=N(t),i=W(t),o="fixed"===n,l=es(e,!0,o,t),a={scrollLeft:0,scrollTop:0},s=f(0);if(r||!r&&!o){if(("body"!==F(t)||B(i))&&(a=ee(t)),r){let e=es(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=eu(i))}o&&!r&&i&&(s.x=eu(i));let u=!i||r||o?f(0):ec(i,a);return{x:l.left+a.scrollLeft-s.x-u.x,y:l.top+a.scrollTop-s.y-u.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ew={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,l=W(r),a=!!t&&q(t.floating);if(r===l||a&&o)return n;let s={scrollLeft:0,scrollTop:0},u=f(1),c=f(0),d=N(r);if((d||!d&&!o)&&(("body"!==F(r)||B(l))&&(s=ee(r)),N(r))){let e=es(r);u=el(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let p=!l||d||o?f(0):ec(l,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-s.scrollTop*u.y+c.y+p.y}},getDocumentElement:W,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e,a=[..."clippingAncestors"===n?q(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=en(e,[],!1).filter(e=>$(e)&&"body"!==F(e)),i=null,o="fixed"===U(e).position,l=o?et(e):e;for(;$(l)&&!Q(l);){let t=U(l),n=G(l);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&ed.has(i.position)||B(l)&&!n&&function e(t,n){let r=et(t);return!(r===n||!$(r)||Q(r))&&("fixed"===U(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):i=t,l=et(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],f=a[0],s=a.reduce((e,n)=>{let r=ep(t,n,l);return e.top=o(r.top,e.top),e.right=i(r.right,e.right),e.bottom=i(r.bottom,e.bottom),e.left=o(r.left,e.left),e},ep(t,f,l));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:eg,getElementRects:ey,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ei(e);return{width:t,height:n}},getScale:el,isElement:$,isRTL:function(e){return"rtl"===U(e).direction}};function ex(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ev(e,t,n,r){let l;void 0===r&&(r={});let{ancestorScroll:f=!0,ancestorResize:s=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,p=eo(e),h=f||s?[...p?en(p):[],...en(t)]:[];h.forEach(e=>{f&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)});let m=p&&c?function(e,t){let n,r=null,l=W(e);function f(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(u,c){void 0===u&&(u=!1),void 0===c&&(c=1),f();let d=e.getBoundingClientRect(),{left:p,top:h,width:m,height:g}=d;if(u||t(),!m||!g)return;let y=a(h),w=a(l.clientWidth-(p+m)),x={rootMargin:-y+"px "+-w+"px "+-a(l.clientHeight-(h+g))+"px "+-a(p)+"px",threshold:o(0,i(1,c))||1},v=!0;function b(t){let r=t[0].intersectionRatio;if(r!==c){if(!v)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||ex(d,e.getBoundingClientRect())||s(),v=!1}try{r=new IntersectionObserver(b,{...x,root:l.ownerDocument})}catch(e){r=new IntersectionObserver(b,x)}r.observe(e)}(!0),f}(p,n):null,g=-1,y=null;u&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),p&&!d&&y.observe(p),y.observe(t));let w=d?es(e):null;return d&&function t(){let r=es(e);w&&!ex(w,r)&&n(),w=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{f&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(l)}}let eb=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:o,placement:l,middlewareData:a}=t,f=await D(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}},eR=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:l}=t,{mainAxis:a=!0,crossAxis:f=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=c(e,t),p={x:n,y:r},m=await E(t,u),g=y(d(l)),w=h(g),x=p[w],v=p[g];if(a){let e="y"===w?"top":"left",t="y"===w?"bottom":"right",n=x+m[e],r=x-m[t];x=o(n,i(x,r))}if(f){let e="y"===g?"top":"left",t="y"===g?"bottom":"right",n=v+m[e],r=v-m[t];v=o(n,i(v,r))}let b=s.fn({...t,[w]:x,[g]:v});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[w]:a,[g]:f}}}}}},eA=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o,l;let{placement:a,middlewareData:f,rects:s,initialPlacement:u,platform:g,elements:C}=t,{mainAxis:S=!0,crossAxis:L=!0,fallbackPlacements:T,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:M=!0,...D}=c(e,t);if(null!=(n=f.arrow)&&n.alignmentOffset)return{};let k=d(a),F=y(u),H=d(u)===u,W=await (null==g.isRTL?void 0:g.isRTL(C.floating)),j=T||(H||!M?[A(u)]:function(e){let t=A(e);return[w(e),t,w(t)]}(u)),$="none"!==P;!T&&$&&j.push(...function(e,t,n,r){let i=p(e),o=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?v:x;return t?x:v;case"left":case"right":return t?b:R;default:return[]}}(d(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(w)))),o}(u,M,P,W));let N=[u,...j],V=await E(t,D),Y=[],B=(null==(r=f.flip)?void 0:r.overflows)||[];if(S&&Y.push(V[k]),L){let e=function(e,t,n){void 0===n&&(n=!1);let r=p(e),i=h(y(e)),o=m(i),l="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=A(l)),[l,A(l)]}(a,s,W);Y.push(V[e[0]],V[e[1]])}if(B=[...B,{placement:a,overflows:Y}],!Y.every(e=>e<=0)){let e=((null==(i=f.flip)?void 0:i.index)||0)+1,t=N[e];if(t&&(!("alignment"===L&&F!==y(t))||B.every(e=>y(e.placement)!==F||e.overflows[0]>0)))return{data:{index:e,overflows:B},reset:{placement:t}};let n=null==(o=B.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(O){case"bestFit":{let e=null==(l=B.filter(e=>{if($){let t=y(e.placement);return t===F||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=u}if(a!==n)return{reset:{placement:n}}}return{}}}},eC=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let l,a;let{placement:f,rects:s,platform:u,elements:h}=t,{apply:m=()=>{},...g}=c(e,t),w=await E(t,g),x=d(f),v=p(f),b="y"===y(f),{width:R,height:A}=s.floating;"top"===x||"bottom"===x?(l=x,a=v===(await (null==u.isRTL?void 0:u.isRTL(h.floating))?"start":"end")?"left":"right"):(a=x,l="end"===v?"top":"bottom");let C=A-w.top-w.bottom,S=R-w.left-w.right,L=i(A-w[l],C),T=i(R-w[a],S),O=!t.middlewareData.shift,P=L,M=T;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(M=S),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(P=C),O&&!v){let e=o(w.left,0),t=o(w.right,0),n=o(w.top,0),r=o(w.bottom,0);b?M=R-2*(0!==e||0!==t?e+t:o(w.left,w.right)):P=A-2*(0!==n||0!==r?n+r:o(w.top,w.bottom))}await m({...t,availableWidth:M,availableHeight:P});let D=await u.getDimensions(h.floating);return R!==D.width||A!==D.height?{reset:{rects:!0}}:{}}}},eS=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...i}=c(e,t);switch(r){case"referenceHidden":{let e=O(await E(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:P(e)}}}case"escaped":{let e=O(await E(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:P(e)}}}default:return{}}}}},eL=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:l,rects:a,platform:f,elements:s,middlewareData:u}=t,{element:d,padding:g=0}=c(e,t)||{};if(null==d)return{};let w=C(g),x={x:n,y:r},v=h(y(l)),b=m(v),R=await f.getDimensions(d),A="y"===v,S=A?"clientHeight":"clientWidth",L=a.reference[b]+a.reference[v]-x[v]-a.floating[b],T=x[v]-a.reference[v],E=await (null==f.getOffsetParent?void 0:f.getOffsetParent(d)),O=E?E[S]:0;O&&await (null==f.isElement?void 0:f.isElement(E))||(O=s.floating[S]||a.floating[b]);let P=O/2-R[b]/2-1,M=i(w[A?"top":"left"],P),D=i(w[A?"bottom":"right"],P),k=O-R[b]-D,F=O/2-R[b]/2+(L/2-T/2),H=o(M,i(F,k)),W=!u.arrow&&null!=p(l)&&F!==H&&a.reference[b]/2-(F<M?M:D)-R[b]/2<0,j=W?F<M?F-M:F-k:0;return{[v]:x[v]+j,data:{[v]:H,centerOffset:F-H-j,...W&&{alignmentOffset:j}},reset:W}}}),eT=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:a=0,mainAxis:f=!0,crossAxis:s=!0}=c(e,t),u={x:n,y:r},p=y(i),m=h(p),g=u[m],w=u[p],x=c(a,t),v="number"==typeof x?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(f){let e="y"===m?"height":"width",t=o.reference[m]-o.floating[e]+v.mainAxis,n=o.reference[m]+o.reference[e]-v.mainAxis;g<t?g=t:g>n&&(g=n)}if(s){var b,R;let e="y"===m?"width":"height",t=M.has(d(i)),n=o.reference[p]-o.floating[e]+(t&&(null==(b=l.offset)?void 0:b[p])||0)+(t?0:v.crossAxis),r=o.reference[p]+o.reference[e]+(t?0:(null==(R=l.offset)?void 0:R[p])||0)-(t?v.crossAxis:0);w<n?w=n:w>r&&(w=r)}return{[m]:g,[p]:w}}}},eE=(e,t,n)=>{let r=new Map,i={platform:ew,...n},o={...i.platform,_c:r};return T(e,t,{...i,platform:o})}},62246:(e,t,n)=>{n.d(t,{Cp:()=>w,RR:()=>g,YF:()=>c,cv:()=>p,dp:()=>y,dr:()=>m,uY:()=>h,x7:()=>x});var r=n(62386),i=n(28964),o=n(46817),l="undefined"!=typeof document?i.useLayoutEffect:function(){};function a(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!a(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!a(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function f(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function s(e,t){let n=f(e);return Math.round(t*n)/n}function u(e){let t=i.useRef(e);return l(()=>{t.current=e}),t}function c(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:c=[],platform:d,elements:{reference:p,floating:h}={},transform:m=!0,whileElementsMounted:g,open:y}=e,[w,x]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=i.useState(c);a(v,c)||b(c);let[R,A]=i.useState(null),[C,S]=i.useState(null),L=i.useCallback(e=>{e!==P.current&&(P.current=e,A(e))},[]),T=i.useCallback(e=>{e!==M.current&&(M.current=e,S(e))},[]),E=p||R,O=h||C,P=i.useRef(null),M=i.useRef(null),D=i.useRef(w),k=null!=g,F=u(g),H=u(d),W=u(y),j=i.useCallback(()=>{if(!P.current||!M.current)return;let e={placement:t,strategy:n,middleware:v};H.current&&(e.platform=H.current),(0,r.oo)(P.current,M.current,e).then(e=>{let t={...e,isPositioned:!1!==W.current};$.current&&!a(D.current,t)&&(D.current=t,o.flushSync(()=>{x(t)}))})},[v,t,n,H,W]);l(()=>{!1===y&&D.current.isPositioned&&(D.current.isPositioned=!1,x(e=>({...e,isPositioned:!1})))},[y]);let $=i.useRef(!1);l(()=>($.current=!0,()=>{$.current=!1}),[]),l(()=>{if(E&&(P.current=E),O&&(M.current=O),E&&O){if(F.current)return F.current(E,O,j);j()}},[E,O,j,F,k]);let N=i.useMemo(()=>({reference:P,floating:M,setReference:L,setFloating:T}),[L,T]),V=i.useMemo(()=>({reference:E,floating:O}),[E,O]),Y=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!V.floating)return e;let t=s(V.floating,w.x),r=s(V.floating,w.y);return m?{...e,transform:"translate("+t+"px, "+r+"px)",...f(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,m,V.floating,w.x,w.y]);return i.useMemo(()=>({...w,update:j,refs:N,elements:V,floatingStyles:Y}),[w,j,N,V,Y])}let d=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:i}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.x7)({element:n.current,padding:i}).fn(t):{}:n?(0,r.x7)({element:n,padding:i}).fn(t):{}}}),p=(e,t)=>({...(0,r.cv)(e),options:[e,t]}),h=(e,t)=>({...(0,r.uY)(e),options:[e,t]}),m=(e,t)=>({...(0,r.dr)(e),options:[e,t]}),g=(e,t)=>({...(0,r.RR)(e),options:[e,t]}),y=(e,t)=>({...(0,r.dp)(e),options:[e,t]}),w=(e,t)=>({...(0,r.Cp)(e),options:[e,t]}),x=(e,t)=>({...d(e),options:[e,t]})},63714:(e,t,n)=>{n.d(t,{B:()=>f});var r=n(28964),i=n(20732),o=n(93191),l=n(69008),a=n(97247);function f(e){let t=e+"CollectionProvider",[n,f]=(0,i.b)(t),[s,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:t,children:n}=e,i=r.useRef(null),o=r.useRef(new Map).current;return(0,a.jsx)(s,{scope:t,itemMap:o,collectionRef:i,children:n})};c.displayName=t;let d=e+"CollectionSlot",p=(0,l.Z8)(d),h=r.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=u(d,n),l=(0,o.e)(t,i.collectionRef);return(0,a.jsx)(p,{ref:l,children:r})});h.displayName=d;let m=e+"CollectionItemSlot",g="data-radix-collection-item",y=(0,l.Z8)(m),w=r.forwardRef((e,t)=>{let{scope:n,children:i,...l}=e,f=r.useRef(null),s=(0,o.e)(t,f),c=u(m,n);return r.useEffect(()=>(c.itemMap.set(f,{ref:f,...l}),()=>void c.itemMap.delete(f))),(0,a.jsx)(y,{[g]:"",ref:s,children:i})});return w.displayName=m,[{Provider:c,Slot:h,ItemSlot:w},function(t){let n=u(e+"CollectionConsumer",t);return r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},f]}},71310:(e,t,n)=>{n.d(t,{gm:()=>o});var r=n(28964);n(97247);var i=r.createContext(void 0);function o(e){let t=r.useContext(i);return e||t||"ltr"}},90556:(e,t,n)=>{n.d(t,{ee:()=>k,Eh:()=>H,VY:()=>F,fC:()=>D,D7:()=>g});var r=n(28964),i=n(62246),o=n(62386),l=n(22251),a=n(97247),f=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,a.jsx)(l.WV.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,a.jsx)("polygon",{points:"0,0 30,0 15,10"})})});f.displayName="Arrow";var s=n(93191),u=n(20732),c=n(85090),d=n(9537),p=n(30255),h="Popper",[m,g]=(0,u.b)(h),[y,w]=m(h),x=e=>{let{__scopePopper:t,children:n}=e,[i,o]=r.useState(null);return(0,a.jsx)(y,{scope:t,anchor:i,onAnchorChange:o,children:n})};x.displayName=h;var v="PopperAnchor",b=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:i,...o}=e,f=w(v,n),u=r.useRef(null),c=(0,s.e)(t,u),d=r.useRef(null);return r.useEffect(()=>{let e=d.current;d.current=i?.current||u.current,e!==d.current&&f.onAnchorChange(d.current)}),i?null:(0,a.jsx)(l.WV.div,{...o,ref:c})});b.displayName=v;var R="PopperContent",[A,C]=m(R),S=r.forwardRef((e,t)=>{let{__scopePopper:n,side:f="bottom",sideOffset:u=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:x=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:C=!1,updatePositionStrategy:S="optimized",onPlaced:L,...T}=e,E=w(R,n),[D,k]=r.useState(null),F=(0,s.e)(t,e=>k(e)),[H,W]=r.useState(null),j=(0,p.t)(H),$=j?.width??0,N=j?.height??0,V="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},Y=Array.isArray(x)?x:[x],B=Y.length>0,z={padding:V,boundary:Y.filter(O),altBoundary:B},{refs:I,floatingStyles:q,placement:X,isPositioned:Z,middlewareData:_}=(0,i.YF)({strategy:"fixed",placement:f+("center"!==h?"-"+h:""),whileElementsMounted:(...e)=>(0,o.Me)(...e,{animationFrame:"always"===S}),elements:{reference:E.anchor},middleware:[(0,i.cv)({mainAxis:u+N,alignmentAxis:m}),y&&(0,i.uY)({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?(0,i.dr)():void 0,...z}),y&&(0,i.RR)({...z}),(0,i.dp)({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:o}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${i}px`),l.setProperty("--radix-popper-anchor-height",`${o}px`)}}),H&&(0,i.x7)({element:H,padding:g}),P({arrowWidth:$,arrowHeight:N}),C&&(0,i.Cp)({strategy:"referenceHidden",...z})]}),[G,J]=M(X),K=(0,c.W)(L);(0,d.b)(()=>{Z&&K?.()},[Z,K]);let Q=_.arrow?.x,U=_.arrow?.y,ee=_.arrow?.centerOffset!==0,[et,en]=r.useState();return(0,d.b)(()=>{D&&en(window.getComputedStyle(D).zIndex)},[D]),(0,a.jsx)("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:Z?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,a.jsx)(A,{scope:n,placedSide:G,onArrowChange:W,arrowX:Q,arrowY:U,shouldHideArrow:ee,children:(0,a.jsx)(l.WV.div,{"data-side":G,"data-align":J,...T,ref:F,style:{...T.style,animation:Z?void 0:"none"}})})})});S.displayName=R;var L="PopperArrow",T={top:"bottom",right:"left",bottom:"top",left:"right"},E=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=C(L,n),o=T[i.placedSide];return(0,a.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,a.jsx)(f,{...r,ref:t,style:{...r.style,display:"block"}})})});function O(e){return null!==e}E.displayName=L;var P=e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,o=i.arrow?.centerOffset!==0,l=o?0:e.arrowWidth,a=o?0:e.arrowHeight,[f,s]=M(n),u={start:"0%",center:"50%",end:"100%"}[s],c=(i.arrow?.x??0)+l/2,d=(i.arrow?.y??0)+a/2,p="",h="";return"bottom"===f?(p=o?u:`${c}px`,h=`${-a}px`):"top"===f?(p=o?u:`${c}px`,h=`${r.floating.height+a}px`):"right"===f?(p=`${-a}px`,h=o?u:`${d}px`):"left"===f&&(p=`${r.floating.width+a}px`,h=o?u:`${d}px`),{data:{x:p,y:h}}}});function M(e){let[t,n="center"]=e.split("-");return[t,n]}var D=x,k=b,F=S,H=E}}; |