1 line
6.8 KiB
JavaScript

"use strict";exports.id=4926,exports.ids=[4926],exports.modules={60782:(t,e,o)=>{o.d(e,{SV:()=>l});var a=o(97247),r=o(28964),n=o.n(r),s=o(27757),i=o(58053),d=o(35921),c=o(28339);class l extends n().Component{constructor(t){super(t),this.handleRetry=()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})},this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,e){console.error("Error caught by boundary:",t,e),console.error("Production error:",{error:t.message,stack:t.stack,componentStack:e.componentStack}),this.setState({hasError:!0,error:t,errorInfo:e})}render(){if(this.state.hasError){let{fallback:t}=this.props;return t&&this.state.error?a.jsx(t,{error:this.state.error,retry:this.handleRetry}):(0,a.jsxs)(s.Zb,{className:"max-w-lg mx-auto mt-8",children:[a.jsx(s.Ol,{children:(0,a.jsxs)(s.ll,{className:"flex items-center gap-2 text-destructive",children:[a.jsx(d.Z,{className:"h-5 w-5"}),"Something went wrong"]})}),(0,a.jsxs)(s.aY,{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"An unexpected error occurred. Please try refreshing the page or contact support if the problem persists."}),!1,(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(i.z,{onClick:this.handleRetry,variant:"outline",size:"sm",children:[a.jsx(c.Z,{className:"h-4 w-4 mr-2"}),"Try Again"]}),a.jsx(i.z,{onClick:()=>window.location.reload(),size:"sm",children:"Refresh Page"})]})]})]})}return this.props.children}}},60985:(t,e,o)=>{o.d(e,{LoadingSpinner:()=>n});var a=o(97247);o(27757);var r=o(8749);function n({size:t="default",className:e=""}){return a.jsx(r.Z,{className:`animate-spin ${{sm:"h-4 w-4",default:"h-6 w-6",lg:"h-8 w-8"}[t]} ${e}`})}},27757:(t,e,o)=>{o.d(e,{Ol:()=>s,SZ:()=>d,Zb:()=>n,aY:()=>c,eW:()=>l,ll:()=>i});var a=o(97247);o(28964);var r=o(25008);function n({className:t,...e}){return a.jsx("div",{"data-slot":"card",className:(0,r.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...e})}function s({className:t,...e}){return a.jsx("div",{"data-slot":"card-header",className:(0,r.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...e})}function i({className:t,...e}){return a.jsx("div",{"data-slot":"card-title",className:(0,r.cn)("leading-none font-semibold",t),...e})}function d({className:t,...e}){return a.jsx("div",{"data-slot":"card-description",className:(0,r.cn)("text-muted-foreground text-sm",t),...e})}function c({className:t,...e}){return a.jsx("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",t),...e})}function l({className:t,...e}){return a.jsx("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center px-6 [.border-t]:pt-6",t),...e})}},70170:(t,e,o)=>{o.d(e,{I:()=>n});var a=o(97247);o(28964);var r=o(25008);function n({className:t,type:e,...o}){return a.jsx("input",{type:e,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...o})}},22394:(t,e,o)=>{o.d(e,{_:()=>s});var a=o(97247);o(28964);var r=o(94056),n=o(25008);function s({className:t,...e}){return a.jsx(r.f,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}},10906:(t,e,o)=>{o.d(e,{pm:()=>m});var a=o(28964);let r=0,n=new Map,s=t=>{if(n.has(t))return;let e=setTimeout(()=>{n.delete(t),l({type:"REMOVE_TOAST",toastId:t})},1e6);n.set(t,e)},i=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,1)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{let{toastId:o}=e;return o?s(o):t.toasts.forEach(t=>{s(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===o||void 0===o?{...t,open:!1}:t)}}case"REMOVE_TOAST":if(void 0===e.toastId)return{...t,toasts:[]};return{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)}}},d=[],c={toasts:[]};function l(t){c=i(c,t),d.forEach(t=>{t(c)})}function u({...t}){let e=(r=(r+1)%Number.MAX_SAFE_INTEGER).toString(),o=()=>l({type:"DISMISS_TOAST",toastId:e});return l({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:t=>{t||o()}}}),{id:e,dismiss:o,update:t=>l({type:"UPDATE_TOAST",toast:{...t,id:e}})}}function m(){let[t,e]=a.useState(c);return a.useEffect(()=>(d.push(e),()=>{let t=d.indexOf(e);t>-1&&d.splice(t,1)}),[t]),{...t,toast:u,dismiss:t=>l({type:"DISMISS_TOAST",toastId:t})}}},15487:(t,e,o)=>{o.d(e,{TK:()=>r});var a=o(45347);let r=(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#LoadingSpinner`);(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#PageLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#StatsLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#TableLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#CalendarLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#FormLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#ChartLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#ListLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#ImageGridLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#ButtonLoading`),(0,a.createProxy)(String.raw`/home/Nicholai/Documents/Dev/united_v03/united-tattoo/united-tattoo/components/admin/loading-states.tsx#InlineLoading`)}};