prisma-flow 0.1.0 → 0.2.0

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.
Files changed (92) hide show
  1. package/README.md +1 -0
  2. package/dist/index.js +2133 -708
  3. package/package.json +10 -23
  4. package/public/404/index.html +1 -1
  5. package/public/404.html +1 -1
  6. package/public/__next.__PAGE__.txt +4 -4
  7. package/public/__next._full.txt +12 -12
  8. package/public/__next._head.txt +4 -4
  9. package/public/__next._index.txt +5 -5
  10. package/public/__next._tree.txt +2 -2
  11. package/public/_next/static/chunks/056iufrwvl369.js +1 -0
  12. package/public/_next/static/chunks/{0ov8yxc8yngji.js → 0acm34w22hx9z.js} +1 -1
  13. package/public/_next/static/chunks/{0drl6u3r7627z.js → 0c984jinxm8f6.js} +1 -1
  14. package/public/_next/static/chunks/{031d4hdncmqdj.js → 0e0fl5qcvu-yx.js} +1 -1
  15. package/public/_next/static/chunks/0z1o-405295er.js +1 -0
  16. package/public/_next/static/chunks/{0p4y8c2fq43wu.js → 1gswx446-o00_.js} +1 -1
  17. package/public/_next/static/chunks/1te0x9fwhrf60.js +1 -0
  18. package/public/_next/static/chunks/25hh9nwx-v3c5.css +1 -0
  19. package/public/_next/static/chunks/25o46h8mdjlrg.js +1 -0
  20. package/public/_next/static/chunks/{0m7w4t_yx6o6a.js → 2ltjmp_97014r.js} +1 -1
  21. package/public/_next/static/chunks/{3cdvjzy78ylzj.js → 2nzee6y5-2q17.js} +1 -1
  22. package/public/_next/static/chunks/{3xrarg7xfb7_g.js → 2yb298owf9iw_.js} +1 -1
  23. package/public/_next/static/chunks/{05-c3ty_6dwfk.js → 3au-rj2yh4vzs.js} +1 -1
  24. package/public/_next/static/chunks/{2o1jw19xgqkzz.js → 3diwb2iuom_tm.js} +3 -3
  25. package/public/_next/static/chunks/3vw-_f96ru14r.js +1 -0
  26. package/public/_next/static/chunks/3zh2lc2jn3p3h.js +1 -0
  27. package/public/_next/static/chunks/{turbopack-0r_p3gsi1hu9t.js → turbopack-15dmj_1idpm1l.js} +1 -1
  28. package/public/_not-found/__next._full.txt +10 -10
  29. package/public/_not-found/__next._head.txt +4 -4
  30. package/public/_not-found/__next._index.txt +5 -5
  31. package/public/_not-found/{__next._not-found/__PAGE__.txt → __next._not-found.__PAGE__.txt} +2 -2
  32. package/public/_not-found/__next._not-found.txt +3 -3
  33. package/public/_not-found/__next._tree.txt +2 -2
  34. package/public/_not-found/index.html +1 -1
  35. package/public/_not-found/index.txt +10 -10
  36. package/public/drift/__next._full.txt +12 -12
  37. package/public/drift/__next._head.txt +4 -4
  38. package/public/drift/__next._index.txt +5 -5
  39. package/public/drift/__next._tree.txt +2 -2
  40. package/public/drift/__next.drift.__PAGE__.txt +9 -0
  41. package/public/drift/__next.drift.txt +3 -3
  42. package/public/drift/index.html +1 -1
  43. package/public/drift/index.txt +12 -12
  44. package/public/index.html +1 -1
  45. package/public/index.txt +12 -12
  46. package/public/migrations/__next._full.txt +12 -12
  47. package/public/migrations/__next._head.txt +4 -4
  48. package/public/migrations/__next._index.txt +5 -5
  49. package/public/migrations/__next._tree.txt +2 -2
  50. package/public/migrations/__next.migrations.__PAGE__.txt +9 -0
  51. package/public/migrations/__next.migrations.txt +3 -3
  52. package/public/migrations/index.html +1 -1
  53. package/public/migrations/index.txt +12 -12
  54. package/public/risks/__next._full.txt +12 -12
  55. package/public/risks/__next._head.txt +4 -4
  56. package/public/risks/__next._index.txt +5 -5
  57. package/public/risks/__next._tree.txt +2 -2
  58. package/public/risks/__next.risks.__PAGE__.txt +9 -0
  59. package/public/risks/__next.risks.txt +3 -3
  60. package/public/risks/index.html +1 -1
  61. package/public/risks/index.txt +12 -12
  62. package/public/schema/__next._full.txt +12 -12
  63. package/public/schema/__next._head.txt +4 -4
  64. package/public/schema/__next._index.txt +5 -5
  65. package/public/schema/__next._tree.txt +2 -2
  66. package/public/schema/__next.schema.__PAGE__.txt +9 -0
  67. package/public/schema/__next.schema.txt +3 -3
  68. package/public/schema/index.html +1 -1
  69. package/public/schema/index.txt +12 -12
  70. package/public/simulate/__next._full.txt +12 -12
  71. package/public/simulate/__next._head.txt +4 -4
  72. package/public/simulate/__next._index.txt +5 -5
  73. package/public/simulate/__next._tree.txt +2 -2
  74. package/public/simulate/__next.simulate.__PAGE__.txt +9 -0
  75. package/public/simulate/__next.simulate.txt +3 -3
  76. package/public/simulate/index.html +1 -1
  77. package/public/simulate/index.txt +12 -12
  78. package/public/_next/static/chunks/03q3r_bvmqrr8.js +0 -2
  79. package/public/_next/static/chunks/0s76k7hq9-wfk.css +0 -1
  80. package/public/_next/static/chunks/0zv5uyi-a4e2y.js +0 -1
  81. package/public/_next/static/chunks/1kk4shlfeass1.js +0 -1
  82. package/public/_next/static/chunks/2nykiepra7i1k.js +0 -1
  83. package/public/_next/static/chunks/2ohti557qol0g.js +0 -1
  84. package/public/_next/static/chunks/3w1qpcrpp5s4-.js +0 -2
  85. package/public/drift/__next.drift/__PAGE__.txt +0 -9
  86. package/public/migrations/__next.migrations/__PAGE__.txt +0 -9
  87. package/public/risks/__next.risks/__PAGE__.txt +0 -9
  88. package/public/schema/__next.schema/__PAGE__.txt +0 -9
  89. package/public/simulate/__next.simulate/__PAGE__.txt +0 -9
  90. /package/public/_next/static/{ySSMgkts9h6_mRnScxk9f → 0mXb1HP7_wVjSa11pmE1C}/_buildManifest.js +0 -0
  91. /package/public/_next/static/{ySSMgkts9h6_mRnScxk9f → 0mXb1HP7_wVjSa11pmE1C}/_clientMiddlewareManifest.js +0 -0
  92. /package/public/_next/static/{ySSMgkts9h6_mRnScxk9f → 0mXb1HP7_wVjSa11pmE1C}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78894,e=>{"use strict";let t=(0,e.i(75254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,t],78894)},55838,(e,t,r)=>{"use strict";var n=e.r(71645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,u=n.useEffect,o=n.useLayoutEffect,s=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return o(function(){i.value=r,i.getSnapshot=t,c(i)&&l({inst:i})},[e,r,t]),u(function(){return c(i)&&l({inst:i}),e(function(){c(i)&&l({inst:i})})},[e]),s(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},2239,(e,t,r)=>{"use strict";t.exports=e.r(55838)},83599,50891,e=>{"use strict";let t;var r=e.i(71645),n=e.i(2239);e.s(["ERROR_REVALIDATE_EVENT",0,3,"FOCUS_EVENT",0,0,"MUTATE_EVENT",0,2,"RECONNECT_EVENT",0,1],11671);var i=Object.prototype.hasOwnProperty;let a=new WeakMap,u=()=>{},o=u(),s=Object,c=e=>e===o,l=(e,t)=>({...e,...t}),f={},d={},p="undefined",g=typeof window!=p,h=typeof document!=p,y=g&&"Deno"in window,w=(e,t)=>{let r=a.get(e);return[()=>!c(t)&&e.get(t)||f,n=>{if(!c(t)){let i=e.get(t);t in d||(d[t]=i),r[5](t,l(i,n),i||f)}},r[6],()=>!c(t)&&t in d?d[t]:!c(t)&&e.get(t)||f]},E=!0,[v,m]=g&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[u,u],R={initFocus:e=>(h&&document.addEventListener("visibilitychange",e),v("focus",e),()=>{h&&document.removeEventListener("visibilitychange",e),m("focus",e)}),initReconnect:e=>{let t=()=>{E=!0,e()},r=()=>{E=!1};return v("online",t),v("offline",r),()=>{m("online",t),m("offline",r)}}},b=!r.default.useId,S=!g||y,T=S?r.useEffect:r.useLayoutEffect,O="u">typeof navigator&&navigator.connection,_=!S&&O&&(["slow-2g","2g"].includes(O.effectiveType)||O.saveData),k=new WeakMap,V=(e,t)=>e===`[object ${t}]`,L=0,C=e=>{let t,r,n=typeof e,i=s.prototype.toString.call(e),a=V(i,"Date"),u=V(i,"RegExp"),o=V(i,"Object");if(s(e)!==e||a||u)t=a?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=k.get(e))return t;if(t=++L+"~",k.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=C(e[r])+",";k.set(e,t)}if(o){t="#";let n=s.keys(e).sort();for(;!c(r=n.pop());)c(e[r])||(t+=r+":"+C(e[r])+",");k.set(e,t)}}return t},A=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?C(e):"",t]},D=0,j=()=>++D;async function P(...e){let[t,r,n,i]=e,u=l({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=u.populateCache,f=u.rollbackOnError,d=u.optimisticData,p=u.throwOnError;if("function"==typeof r){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(g))}return g(r);async function g(r){let i,[l]=A(r);if(!l)return;let[g,h]=w(t,l),[y,E,v,m]=a.get(t),R=()=>{let e=y[l];return("function"==typeof u.revalidate?u.revalidate(g().data,r):!1!==u.revalidate)&&(delete v[l],delete m[l],e&&e[0])?e[0](2).then(()=>g().data):g().data};if(e.length<3)return R();let b=n,S=!1,T=j();E[l]=[T,0];let O=!c(d),_=g(),k=_.data,V=_._c,L=c(V)?k:V;if(O&&h({data:d="function"==typeof d?d(L,k):d,_c:L}),"function"==typeof b)try{b=b(L)}catch(e){i=e,S=!0}if(b&&"function"==typeof b.then){let e;if(b=await b.catch(e=>{i=e,S=!0}),T!==E[l][0]){if(S)throw i;return b}S&&O&&(e=i,"function"==typeof f?f(e):!1!==f)&&(s=!0,h({data:L,_c:o}))}if(s&&!S&&("function"==typeof s?h({data:s(b,L),error:o,_c:o}):h({data:b,error:o,_c:o})),E[l][1]=j(),Promise.resolve(R()).then(()=>{h({_c:o})}),S){if(p)throw i;return}return b}}let $=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},I=(e,t)=>{if(!a.has(e)){let r=l(R,t),n=Object.create(null),i=P.bind(o,e),s=u,c=Object.create(null),f=(e,t)=>{let r=c[e]||[];return c[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},d=(t,r,n)=>{e.set(t,r);let i=c[t];if(i)for(let e of i)e(r,n)},p=()=>{if(!a.has(e)&&(a.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,d,f]),!S)){let t=r.initFocus(setTimeout.bind(o,$.bind(o,n,0))),i=r.initReconnect(setTimeout.bind(o,$.bind(o,n,1)));s=()=>{t&&t(),i&&i(),a.delete(e)}}};return p(),[e,i,p,s]}return[e,a.get(e)[4]]},[N,M]=I(new Map),x=l({onLoadingSlow:u,onSuccess:u,onError:u,onErrorRetry:(e,t,r,n,i)=>{let a=r.errorRetryCount,u=i.retryCount,o=~~((Math.random()+.5)*(1<<(u<8?u:8)))*r.errorRetryInterval;(c(a)||!(u>a))&&setTimeout(n,o,i)},onDiscarded:u,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:_?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:_?5e3:3e3,compare:function e(t,r){var n,a;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((a=t.length)===r.length)for(;a--&&e(t[a],r[a]););return -1===a}if(!n||"object"==typeof t){for(n in a=0,t)if(i.call(t,n)&&++a&&!i.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===a}}return t!=t&&r!=r},isPaused:()=>!1,cache:N,mutate:M,fallback:{}},{isOnline:()=>E,isVisible:()=>{let e=h&&document.visibilityState;return c(e)||"hidden"!==e}}),U=(e,t)=>{let r=l(e,t);if(t){let{use:n,fallback:i}=e,{use:a,fallback:u}=t;n&&a&&(r.use=n.concat(a)),i&&u&&(r.fallback=l(i,u))}return r},F=(0,r.createContext)({});var W=e.i(11671);let q=g&&window.__SWR_DEVTOOLS_USE__,B=(q?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=A(t),[,,,i]=a.get(N);if(n.startsWith("$inf$"))return r(...e);let u=i[n];return c(u)?r(...e):(delete i[n],u)});return e(t,i,n)});q&&(window.__SWR_DEVTOOLS_REACT__=r.default);let z=()=>{},K=z(),J=(new WeakMap,r.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),Y={dedupe:!0},H=Promise.resolve(o),X=()=>u;s.defineProperty(e=>{let{value:t}=e,n=(0,r.useContext)(F),i="function"==typeof t,a=(0,r.useMemo)(()=>i?t(n):t,[i,n,t]),u=(0,r.useMemo)(()=>i?a:U(n,a),[i,n,a]),s=a&&a.provider,c=(0,r.useRef)(o);s&&!c.current&&(c.current=I(s(u.cache||N),a));let f=c.current;return f&&(u.cache=f[0],u.mutate=f[1]),T(()=>{if(f)return f[2]&&f[2](),f[3]},[]),(0,r.createElement)(F.Provider,l(e,{value:u}))},"defaultValue",{value:x});let G=(t=(e,t,i)=>{let{cache:u,compare:s,suspense:f,fallbackData:d,revalidateOnMount:h,revalidateIfStale:y,refreshInterval:E,refreshWhenHidden:v,refreshWhenOffline:m,keepPreviousData:R,strictServerPrefetchWarning:O}=i,[_,k,V,L]=a.get(u),[C,D]=A(e),$=(0,r.useRef)(!1),I=(0,r.useRef)(!1),N=(0,r.useRef)(C),M=(0,r.useRef)(t),x=(0,r.useRef)(i),U=()=>x.current.isVisible()&&x.current.isOnline(),[F,q,B,z]=w(u,C),K=(0,r.useRef)({}).current,G=c(d)?c(i.fallback)?o:i.fallback[C]:d,Q=(e,t)=>{for(let r in K)if("data"===r){if(!s(e[r],t[r])&&(!c(e[r])||!s(eo,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},Z=!$.current,ee=(0,r.useMemo)(()=>{let e=F(),r=z(),n=e=>{let r=l(e);return(delete r._k,(()=>{if(!C||!t||x.current.isPaused())return!1;if(Z&&!c(h))return h;let e=c(G)?r.data:G;return c(e)||y})())?{isValidating:!0,isLoading:!0,...r}:r},i=n(e),a=e===r?i:n(r),u=i;return[()=>{let e=n(F());return Q(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>a]},[u,C]),et=(0,n.useSyncExternalStore)((0,r.useCallback)(e=>B(C,(t,r)=>{Q(r,t)||e()}),[u,C]),ee[0],ee[1]),er=_[C]&&_[C].length>0,en=et.data,ei=c(en)?G&&"function"==typeof G.then?J(G):G:en,ea=et.error,eu=(0,r.useRef)(ei),eo=R?c(en)?c(eu.current)?ei:eu.current:en:ei,es=C&&c(ei),ec=(0,r.useRef)(null);S||(0,n.useSyncExternalStore)(X,()=>(ec.current=!1,ec),()=>(ec.current=!0,ec));let el=ec.current;O&&el&&!f&&es&&console.warn(`Missing pre-initiated data for serialized key "${C}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ef=!(!C||!t||x.current.isPaused())&&(!er||!!c(ea))&&(Z&&!c(h)?h:f?!c(ei)&&y:c(ei)||y),ed=Z&&ef,ep=c(et.isValidating)?ed:et.isValidating,eg=c(et.isLoading)?ed:et.isLoading,eh=(0,r.useCallback)(async e=>{let t,r,n=M.current;if(!C||!n||I.current||x.current.isPaused())return!1;let a=!0,u=e||{},l=!V[C]||!u.dedupe,f=()=>b?!I.current&&C===N.current&&$.current:C===N.current,d={isValidating:!1,isLoading:!1},p=()=>{q(d)},g=()=>{let e=V[C];e&&e[1]===r&&delete V[C]},h={isValidating:!0};c(F().data)&&(h.isLoading=!0);try{if(l&&(q(h),i.loadingTimeout&&c(F().data)&&setTimeout(()=>{a&&f()&&x.current.onLoadingSlow(C,i)},i.loadingTimeout),V[C]=[n(D),j()]),[t,r]=V[C],t=await t,l&&setTimeout(g,i.dedupingInterval),!V[C]||V[C][1]!==r)return l&&f()&&x.current.onDiscarded(C),!1;d.error=o;let e=k[C];if(!c(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return p(),l&&f()&&x.current.onDiscarded(C),!1;let u=F().data;d.data=s(u,t)?u:t,l&&f()&&x.current.onSuccess(t,C,i)}catch(r){g();let e=x.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&f())&&(e.onError(r,C,e),(!0===t||"function"==typeof t&&t(r))&&(!x.current.revalidateOnFocus||!x.current.revalidateOnReconnect||U())&&e.onErrorRetry(r,C,e,e=>{let t=_[C];t&&t[0]&&t[0](W.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))}return a=!1,p(),!0},[C,u]),ey=(0,r.useCallback)((...e)=>P(u,N.current,...e),[]);if(T(()=>{M.current=t,x.current=i,c(en)||(eu.current=en)}),T(()=>{var e;let t;if(!C)return;let r=eh.bind(o,Y),n=0;x.current.revalidateOnFocus&&(n=Date.now()+x.current.focusThrottleInterval);let i=(e=(e,t={})=>{if(e==W.FOCUS_EVENT){let e=Date.now();x.current.revalidateOnFocus&&e>n&&U()&&(n=e+x.current.focusThrottleInterval,r())}else if(e==W.RECONNECT_EVENT)x.current.revalidateOnReconnect&&U()&&r();else if(e==W.MUTATE_EVENT)return eh();else if(e==W.ERROR_REVALIDATE_EVENT)return eh(t)},(t=_[C]||(_[C]=[])).push(e),()=>{let r=t.indexOf(e);r>=0&&(t[r]=t[t.length-1],t.pop())});if(I.current=!1,N.current=C,$.current=!0,q({_k:D}),ef&&!V[C])if(c(ei)||S)r();else g&&typeof window.requestAnimationFrame!=p?window.requestAnimationFrame(r):setTimeout(r,1);return()=>{I.current=!0,i()}},[C]),T(()=>{let e;function t(){let t="function"==typeof E?E(F().data):E;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!F().error&&(v||x.current.isVisible())&&(m||x.current.isOnline())?eh(Y).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[E,v,m,C]),(0,r.useDebugValue)(eo),f){if(!b&&S&&es)throw Error("Fallback data is required when using Suspense in SSR.");es&&(M.current=t,x.current=i,I.current=!1);let e=L[C];if(J(!c(e)&&es?ey(e):H),!c(ea)&&es)throw ea;let r=es?eh(Y):H;!c(eo)&&es&&(r.status="fulfilled",r.value=!0),J(r)}return{mutate:ey,get data(){return K.data=!0,eo},get error(){return K.error=!0,ea},get isValidating(){return K.isValidating=!0,ep},get isLoading(){return K.isLoading=!0,eg}}},function(...e){let n,i=(n=(0,r.useContext)(F),(0,r.useMemo)(()=>l(x,n),[n])),[a,u,o]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],s=U(i,o),c=t,{use:f}=s,d=(f||[]).concat(B);for(let e=d.length;e--;)c=d[e](c);return c(a,u||s.fetcher||null,s)});e.s(["default",0,G],83599);let Q=e.i(47167).default.env.NEXT_PUBLIC_API_URL??window.location.origin;class Z extends Error{status;constructor(e,t){super(t),this.status=e,this.name="ApiRequestError"}}async function ee(e,t){let r=new URLSearchParams(window.location.search).get("token")??"",n=`${Q}${e}${e.includes("?")?"&":"?"}token=${encodeURIComponent(r)}`,i=await fetch(n,{...t,headers:{"Content-Type":"application/json",Authorization:r?`Bearer ${r}`:"",...t?.headers}});if(!i.ok){let e=await i.json().catch(()=>({}));throw new Z(i.status,e.error??`HTTP ${i.status}`)}return i.json()}async function et(){return(await ee("/api/status")).data}async function er(e=1,t=50){return ee(`/api/migrations?page=${e}&limit=${t}`)}async function en(){return(await ee("/api/drift")).data}async function ei(){return(await ee("/api/schema")).data}async function ea(){return(await ee("/api/drift/check",{method:"POST"})).data}async function eu(){return(await ee("/api/risks")).data}async function eo(e){return(await ee(`/api/simulate/${encodeURIComponent(e)}`)).data}e.s(["SWR_KEYS",0,{status:"/api/status",migrations:(e,t)=>`/api/migrations?page=${e}&limit=${t}`,drift:"/api/drift",schema:"/api/schema",risks:"/api/risks"},"fetchDrift",0,en,"fetchMigrations",0,er,"fetchRisks",0,eu,"fetchSchema",0,ei,"fetchSimulation",0,eo,"fetchStatus",0,et,"forceDriftCheck",0,ea],50891)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,78894,e=>{"use strict";let t=(0,e.i(75254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,t],78894)},55838,(e,t,r)=>{"use strict";var n=e.r(71645),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,u=n.useEffect,o=n.useLayoutEffect,s=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return o(function(){i.value=r,i.getSnapshot=t,c(i)&&l({inst:i})},[e,r,t]),u(function(){return c(i)&&l({inst:i}),e(function(){c(i)&&l({inst:i})})},[e]),s(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},2239,(e,t,r)=>{"use strict";t.exports=e.r(55838)},83599,35878,e=>{"use strict";let t;var r=e.i(71645),n=e.i(2239);e.s(["ERROR_REVALIDATE_EVENT",0,3,"FOCUS_EVENT",0,0,"MUTATE_EVENT",0,2,"RECONNECT_EVENT",0,1],11671);var i=Object.prototype.hasOwnProperty;let a=new WeakMap,u=()=>{},o=u(),s=Object,c=e=>e===o,l=(e,t)=>({...e,...t}),f={},d={},p="undefined",g=typeof window!=p,h=typeof document!=p,y=g&&"Deno"in window,w=(e,t)=>{let r=a.get(e);return[()=>!c(t)&&e.get(t)||f,n=>{if(!c(t)){let i=e.get(t);t in d||(d[t]=i),r[5](t,l(i,n),i||f)}},r[6],()=>!c(t)&&t in d?d[t]:!c(t)&&e.get(t)||f]},E=!0,[v,m]=g&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[u,u],R={initFocus:e=>(h&&document.addEventListener("visibilitychange",e),v("focus",e),()=>{h&&document.removeEventListener("visibilitychange",e),m("focus",e)}),initReconnect:e=>{let t=()=>{E=!0,e()},r=()=>{E=!1};return v("online",t),v("offline",r),()=>{m("online",t),m("offline",r)}}},b=!r.default.useId,S=!g||y,T=S?r.useEffect:r.useLayoutEffect,O="u">typeof navigator&&navigator.connection,_=!S&&O&&(["slow-2g","2g"].includes(O.effectiveType)||O.saveData),k=new WeakMap,V=(e,t)=>e===`[object ${t}]`,L=0,C=e=>{let t,r,n=typeof e,i=s.prototype.toString.call(e),a=V(i,"Date"),u=V(i,"RegExp"),o=V(i,"Object");if(s(e)!==e||a||u)t=a?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=k.get(e))return t;if(t=++L+"~",k.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=C(e[r])+",";k.set(e,t)}if(o){t="#";let n=s.keys(e).sort();for(;!c(r=n.pop());)c(e[r])||(t+=r+":"+C(e[r])+",");k.set(e,t)}}return t},A=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?C(e):"",t]},D=0,j=()=>++D;async function P(...e){let[t,r,n,i]=e,u=l({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),s=u.populateCache,f=u.rollbackOnError,d=u.optimisticData,p=u.throwOnError;if("function"==typeof r){let e=[];for(let n of t.keys())!/^\$(inf|sub)\$/.test(n)&&r(t.get(n)._k)&&e.push(n);return Promise.all(e.map(g))}return g(r);async function g(r){let i,[l]=A(r);if(!l)return;let[g,h]=w(t,l),[y,E,v,m]=a.get(t),R=()=>{let e=y[l];return("function"==typeof u.revalidate?u.revalidate(g().data,r):!1!==u.revalidate)&&(delete v[l],delete m[l],e&&e[0])?e[0](2).then(()=>g().data):g().data};if(e.length<3)return R();let b=n,S=!1,T=j();E[l]=[T,0];let O=!c(d),_=g(),k=_.data,V=_._c,L=c(V)?k:V;if(O&&h({data:d="function"==typeof d?d(L,k):d,_c:L}),"function"==typeof b)try{b=b(L)}catch(e){i=e,S=!0}if(b&&"function"==typeof b.then){let e;if(b=await b.catch(e=>{i=e,S=!0}),T!==E[l][0]){if(S)throw i;return b}S&&O&&(e=i,"function"==typeof f?f(e):!1!==f)&&(s=!0,h({data:L,_c:o}))}if(s&&!S&&("function"==typeof s?h({data:s(b,L),error:o,_c:o}):h({data:b,error:o,_c:o})),E[l][1]=j(),Promise.resolve(R()).then(()=>{h({_c:o})}),S){if(p)throw i;return}return b}}let $=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},I=(e,t)=>{if(!a.has(e)){let r=l(R,t),n=Object.create(null),i=P.bind(o,e),s=u,c=Object.create(null),f=(e,t)=>{let r=c[e]||[];return c[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},d=(t,r,n)=>{e.set(t,r);let i=c[t];if(i)for(let e of i)e(r,n)},p=()=>{if(!a.has(e)&&(a.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,d,f]),!S)){let t=r.initFocus(setTimeout.bind(o,$.bind(o,n,0))),i=r.initReconnect(setTimeout.bind(o,$.bind(o,n,1)));s=()=>{t&&t(),i&&i(),a.delete(e)}}};return p(),[e,i,p,s]}return[e,a.get(e)[4]]},[N,M]=I(new Map),x=l({onLoadingSlow:u,onSuccess:u,onError:u,onErrorRetry:(e,t,r,n,i)=>{let a=r.errorRetryCount,u=i.retryCount,o=~~((Math.random()+.5)*(1<<(u<8?u:8)))*r.errorRetryInterval;(c(a)||!(u>a))&&setTimeout(n,o,i)},onDiscarded:u,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:_?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:_?5e3:3e3,compare:function e(t,r){var n,a;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((a=t.length)===r.length)for(;a--&&e(t[a],r[a]););return -1===a}if(!n||"object"==typeof t){for(n in a=0,t)if(i.call(t,n)&&++a&&!i.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===a}}return t!=t&&r!=r},isPaused:()=>!1,cache:N,mutate:M,fallback:{}},{isOnline:()=>E,isVisible:()=>{let e=h&&document.visibilityState;return c(e)||"hidden"!==e}}),U=(e,t)=>{let r=l(e,t);if(t){let{use:n,fallback:i}=e,{use:a,fallback:u}=t;n&&a&&(r.use=n.concat(a)),i&&u&&(r.fallback=l(i,u))}return r},F=(0,r.createContext)({});var W=e.i(11671);let q=g&&window.__SWR_DEVTOOLS_USE__,B=(q?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=A(t),[,,,i]=a.get(N);if(n.startsWith("$inf$"))return r(...e);let u=i[n];return c(u)?r(...e):(delete i[n],u)});return e(t,i,n)});q&&(window.__SWR_DEVTOOLS_REACT__=r.default);let z=()=>{},K=z(),J=(new WeakMap,r.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),Y={dedupe:!0},H=Promise.resolve(o),X=()=>u;s.defineProperty(e=>{let{value:t}=e,n=(0,r.useContext)(F),i="function"==typeof t,a=(0,r.useMemo)(()=>i?t(n):t,[i,n,t]),u=(0,r.useMemo)(()=>i?a:U(n,a),[i,n,a]),s=a&&a.provider,c=(0,r.useRef)(o);s&&!c.current&&(c.current=I(s(u.cache||N),a));let f=c.current;return f&&(u.cache=f[0],u.mutate=f[1]),T(()=>{if(f)return f[2]&&f[2](),f[3]},[]),(0,r.createElement)(F.Provider,l(e,{value:u}))},"defaultValue",{value:x});let G=(t=(e,t,i)=>{let{cache:u,compare:s,suspense:f,fallbackData:d,revalidateOnMount:h,revalidateIfStale:y,refreshInterval:E,refreshWhenHidden:v,refreshWhenOffline:m,keepPreviousData:R,strictServerPrefetchWarning:O}=i,[_,k,V,L]=a.get(u),[C,D]=A(e),$=(0,r.useRef)(!1),I=(0,r.useRef)(!1),N=(0,r.useRef)(C),M=(0,r.useRef)(t),x=(0,r.useRef)(i),U=()=>x.current.isVisible()&&x.current.isOnline(),[F,q,B,z]=w(u,C),K=(0,r.useRef)({}).current,G=c(d)?c(i.fallback)?o:i.fallback[C]:d,Q=(e,t)=>{for(let r in K)if("data"===r){if(!s(e[r],t[r])&&(!c(e[r])||!s(eo,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},Z=!$.current,ee=(0,r.useMemo)(()=>{let e=F(),r=z(),n=e=>{let r=l(e);return(delete r._k,(()=>{if(!C||!t||x.current.isPaused())return!1;if(Z&&!c(h))return h;let e=c(G)?r.data:G;return c(e)||y})())?{isValidating:!0,isLoading:!0,...r}:r},i=n(e),a=e===r?i:n(r),u=i;return[()=>{let e=n(F());return Q(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>a]},[u,C]),et=(0,n.useSyncExternalStore)((0,r.useCallback)(e=>B(C,(t,r)=>{Q(r,t)||e()}),[u,C]),ee[0],ee[1]),er=_[C]&&_[C].length>0,en=et.data,ei=c(en)?G&&"function"==typeof G.then?J(G):G:en,ea=et.error,eu=(0,r.useRef)(ei),eo=R?c(en)?c(eu.current)?ei:eu.current:en:ei,es=C&&c(ei),ec=(0,r.useRef)(null);S||(0,n.useSyncExternalStore)(X,()=>(ec.current=!1,ec),()=>(ec.current=!0,ec));let el=ec.current;O&&el&&!f&&es&&console.warn(`Missing pre-initiated data for serialized key "${C}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let ef=!(!C||!t||x.current.isPaused())&&(!er||!!c(ea))&&(Z&&!c(h)?h:f?!c(ei)&&y:c(ei)||y),ed=Z&&ef,ep=c(et.isValidating)?ed:et.isValidating,eg=c(et.isLoading)?ed:et.isLoading,eh=(0,r.useCallback)(async e=>{let t,r,n=M.current;if(!C||!n||I.current||x.current.isPaused())return!1;let a=!0,u=e||{},l=!V[C]||!u.dedupe,f=()=>b?!I.current&&C===N.current&&$.current:C===N.current,d={isValidating:!1,isLoading:!1},p=()=>{q(d)},g=()=>{let e=V[C];e&&e[1]===r&&delete V[C]},h={isValidating:!0};c(F().data)&&(h.isLoading=!0);try{if(l&&(q(h),i.loadingTimeout&&c(F().data)&&setTimeout(()=>{a&&f()&&x.current.onLoadingSlow(C,i)},i.loadingTimeout),V[C]=[n(D),j()]),[t,r]=V[C],t=await t,l&&setTimeout(g,i.dedupingInterval),!V[C]||V[C][1]!==r)return l&&f()&&x.current.onDiscarded(C),!1;d.error=o;let e=k[C];if(!c(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return p(),l&&f()&&x.current.onDiscarded(C),!1;let u=F().data;d.data=s(u,t)?u:t,l&&f()&&x.current.onSuccess(t,C,i)}catch(r){g();let e=x.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&f())&&(e.onError(r,C,e),(!0===t||"function"==typeof t&&t(r))&&(!x.current.revalidateOnFocus||!x.current.revalidateOnReconnect||U())&&e.onErrorRetry(r,C,e,e=>{let t=_[C];t&&t[0]&&t[0](W.ERROR_REVALIDATE_EVENT,e)},{retryCount:(u.retryCount||0)+1,dedupe:!0}))}return a=!1,p(),!0},[C,u]),ey=(0,r.useCallback)((...e)=>P(u,N.current,...e),[]);if(T(()=>{M.current=t,x.current=i,c(en)||(eu.current=en)}),T(()=>{var e;let t;if(!C)return;let r=eh.bind(o,Y),n=0;x.current.revalidateOnFocus&&(n=Date.now()+x.current.focusThrottleInterval);let i=(e=(e,t={})=>{if(e==W.FOCUS_EVENT){let e=Date.now();x.current.revalidateOnFocus&&e>n&&U()&&(n=e+x.current.focusThrottleInterval,r())}else if(e==W.RECONNECT_EVENT)x.current.revalidateOnReconnect&&U()&&r();else if(e==W.MUTATE_EVENT)return eh();else if(e==W.ERROR_REVALIDATE_EVENT)return eh(t)},(t=_[C]||(_[C]=[])).push(e),()=>{let r=t.indexOf(e);r>=0&&(t[r]=t[t.length-1],t.pop())});if(I.current=!1,N.current=C,$.current=!0,q({_k:D}),ef&&!V[C])if(c(ei)||S)r();else g&&typeof window.requestAnimationFrame!=p?window.requestAnimationFrame(r):setTimeout(r,1);return()=>{I.current=!0,i()}},[C]),T(()=>{let e;function t(){let t="function"==typeof E?E(F().data):E;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!F().error&&(v||x.current.isVisible())&&(m||x.current.isOnline())?eh(Y).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[E,v,m,C]),(0,r.useDebugValue)(eo),f){if(!b&&S&&es)throw Error("Fallback data is required when using Suspense in SSR.");es&&(M.current=t,x.current=i,I.current=!1);let e=L[C];if(J(!c(e)&&es?ey(e):H),!c(ea)&&es)throw ea;let r=es?eh(Y):H;!c(eo)&&es&&(r.status="fulfilled",r.value=!0),J(r)}return{mutate:ey,get data(){return K.data=!0,eo},get error(){return K.error=!0,ea},get isValidating(){return K.isValidating=!0,ep},get isLoading(){return K.isLoading=!0,eg}}},function(...e){let n,i=(n=(0,r.useContext)(F),(0,r.useMemo)(()=>l(x,n),[n])),[a,u,o]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],s=U(i,o),c=t,{use:f}=s,d=(f||[]).concat(B);for(let e=d.length;e--;)c=d[e](c);return c(a,u||s.fetcher||null,s)});e.s(["default",0,G],83599);let Q=e.i(47167).default.env.NEXT_PUBLIC_API_URL??window.location.origin;class Z extends Error{status;constructor(e,t){super(t),this.status=e,this.name="ApiRequestError"}}async function ee(e,t){let r=new URLSearchParams(window.location.search).get("token")??"",n=`${Q}${e}${e.includes("?")?"&":"?"}token=${encodeURIComponent(r)}`,i=await fetch(n,{...t,headers:{"Content-Type":"application/json",Authorization:r?`Bearer ${r}`:"",...t?.headers}});if(!i.ok){let e=await i.json().catch(()=>({}));throw new Z(i.status,e.error??`HTTP ${i.status}`)}return i.json()}async function et(){return(await ee("/api/status")).data}async function er(){return(await ee("/api/plan")).data}async function en(e=1,t=50){return ee(`/api/migrations?page=${e}&limit=${t}`)}async function ei(){return(await ee("/api/drift")).data}async function ea(){return(await ee("/api/schema")).data}async function eu(){return(await ee("/api/drift/check",{method:"POST"})).data}async function eo(){return(await ee("/api/risks")).data}async function es(e){return(await ee(`/api/simulate/${encodeURIComponent(e)}`)).data}e.s(["SWR_KEYS",0,{status:"/api/status",plan:"/api/plan",migrations:(e,t)=>`/api/migrations?page=${e}&limit=${t}`,drift:"/api/drift",schema:"/api/schema",risks:"/api/risks"},"fetchDrift",0,ei,"fetchMigrations",0,en,"fetchPlan",0,er,"fetchRisks",0,eo,"fetchSchema",0,ea,"fetchSimulation",0,es,"fetchStatus",0,et,"forceDriftCheck",0,eu],35878)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95468,e=>{"use strict";let t=(0,e.i(75254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],95468)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],73884)},79508,e=>{"use strict";var t=e.i(43476),l=e.i(932),s=e.i(78894),r=e.i(75254);let a=(0,r.default)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);var i=e.i(95468);let d=(0,r.default)("clock-3",[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var c=e.i(58041),n=e.i(73884),o=e.i(83599),m=e.i(50891);function h(e){if(!e)return"Not recorded";let t=new Date(e);return Number.isNaN(t.getTime())?"Not recorded":t.toLocaleString()}function x(e){var l,s,r,c;return(0,t.jsxs)("article",{className:"relative pl-12",children:[(0,t.jsx)("div",{className:"absolute left-0 top-4 flex h-10 w-10 items-center justify-center rounded-full border bg-background",children:"applied"===(l=e.status)?(0,t.jsx)(i.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):"failed"===l?(0,t.jsx)(n.XCircle,{className:"h-4 w-4 text-destructive"}):(0,t.jsx)(d,{className:"h-4 w-4 text-yellow-500"})}),(0,t.jsxs)("div",{className:"rounded-xl border bg-card p-4 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${"applied"===(s=e.status)?"bg-emerald-500/10 text-emerald-600":"failed"===s?"bg-destructive/10 text-destructive":"bg-yellow-500/10 text-yellow-600"}`,children:e.status}),(0,t.jsxs)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${"critical"===(r=e.riskScore?.level)?"bg-destructive/10 text-destructive":"high"===r?"bg-orange-500/10 text-orange-600":"medium"===r?"bg-yellow-500/10 text-yellow-600":"bg-emerald-500/10 text-emerald-600"}`,children:[e.riskScore?.level??"low"," risk"]})]}),(0,t.jsx)("h2",{className:"mt-2 truncate font-mono text-sm font-semibold",children:e.name})]}),(0,t.jsxs)("div",{className:"grid gap-2 text-xs text-muted-foreground sm:grid-cols-3 lg:min-w-[520px]",children:[(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsx)(a,{className:"mb-1 h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Created"}),(0,t.jsx)("p",{children:h(e.createdAt??e.timestamp)})]}),(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsx)(i.CheckCircle2,{className:"mb-1 h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Applied"}),(0,t.jsx)("p",{children:h(e.appliedAt)})]}),(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsx)(d,{className:"mb-1 h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Duration"}),(0,t.jsx)("p",{children:void 0===(c=e.durationMs)?"Not recorded by Prisma history":c<1e3?`${c} ms`:`${(c/1e3).toFixed(1)} s`})]})]})]}),e.riskScore&&e.riskScore.factors.length>0&&(0,t.jsx)("div",{className:"mt-3 space-y-2",children:e.riskScore.factors.slice(0,3).map(l=>(0,t.jsxs)("div",{className:"rounded-lg bg-muted/50 p-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:l.description}),(0,t.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Recommendation: ",l.recommendation]})]},`${e.name}-${l.pattern}`))})]})]},e.name)}function u(e){return(0,t.jsxs)("div",{className:"rounded-xl border bg-card p-4",children:[(0,t.jsx)("p",{className:`text-2xl font-bold ${e.color}`,children:e.value}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e.label})]},e.label)}function p(e){return(0,t.jsx)("div",{className:"h-24 animate-pulse rounded-lg bg-muted"},e)}function g(e){return e.riskScore?.level==="high"||e.riskScore?.level==="critical"}function f(e){return"failed"===e.status}function b(e){return"pending"===e.status}function v(e){return"applied"===e.status}function j(){return(0,m.fetchMigrations)(1,100)}e.s(["default",0,function(){let e,r,a,i,d,n,h,y,N,k,w,M,S,C,A=(0,l.c)(36);A[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.SWR_KEYS.migrations(1,100),A[0]=e):e=A[0];let{data:T,error:$,isLoading:P}=(0,o.default)(e,j);A[1]!==T?.data?(r=T?.data??[],A[1]=T?.data,A[2]=r):r=A[2];let R=r;A[3]!==R?(a=R.filter(v),A[3]=R,A[4]=a):a=A[4];let _=a.length;A[5]!==R?(i=R.filter(b),A[5]=R,A[6]=i):i=A[6];let z=i.length;A[7]!==R?(d=R.filter(f),A[7]=R,A[8]=d):d=A[8];let D=d.length;A[9]!==R?(n=R.filter(g),A[9]=R,A[10]=n):n=A[10],A[11]!==a.length||A[12]!==i.length||A[13]!==d.length||A[14]!==n.length?(h={applied:_,pending:z,failed:D,risky:n.length},A[11]=a.length,A[12]=i.length,A[13]=d.length,A[14]=n.length,A[15]=h):h=A[15];let F=h;return A[16]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("h1",{className:"flex items-center gap-2 text-2xl font-bold",children:[(0,t.jsx)(c.Database,{className:"h-6 w-6"})," Migration Timeline"]}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Applied, pending, and failed migrations with creation dates, applied dates, duration, and risk context."})]}),A[16]=y):y=A[16],A[17]!==P?(N=P&&(0,t.jsx)("div",{className:"space-y-3",children:[1,2,3,4].map(p)}),A[17]=P,A[18]=N):N=A[18],A[19]!==$?(k=$&&(0,t.jsxs)("div",{className:"rounded-lg border border-destructive/40 bg-destructive/10 p-4 text-destructive",children:[(0,t.jsx)(s.AlertTriangle,{className:"mr-2 inline h-4 w-4"}),$ instanceof Error?$.message:"Failed to load migrations"]}),A[19]=$,A[20]=k):k=A[20],A[21]!==$||A[22]!==P||A[23]!==R.length?(w=!P&&!$&&0===R.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 rounded-xl border py-16 text-muted-foreground",children:[(0,t.jsx)(c.Database,{className:"h-10 w-10 opacity-40"}),(0,t.jsx)("p",{className:"text-sm",children:"No migrations found in this Prisma project."})]}),A[21]=$,A[22]=P,A[23]=R.length,A[24]=w):w=A[24],A[25]!==R.length||A[26]!==F?(M=R.length>0&&(0,t.jsx)("section",{className:"mb-6 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[{label:"Applied",value:F.applied,color:"text-emerald-600"},{label:"Pending",value:F.pending,color:"text-yellow-600"},{label:"Failed",value:F.failed,color:"text-destructive"},{label:"High/Critical Risk",value:F.risky,color:"text-orange-600"}].map(u)}),A[25]=R.length,A[26]=F,A[27]=M):M=A[27],A[28]!==R?(S=R.length>0&&(0,t.jsx)("div",{className:"relative space-y-4 before:absolute before:bottom-0 before:left-5 before:top-0 before:w-px before:bg-border",children:R.map(x)}),A[28]=R,A[29]=S):S=A[29],A[30]!==N||A[31]!==k||A[32]!==w||A[33]!==M||A[34]!==S?(C=(0,t.jsxs)("div",{className:"p-6",children:[y,N,k,w,M,S]}),A[30]=N,A[31]=k,A[32]=w,A[33]=M,A[34]=S,A[35]=C):C=A[35],C}],79508)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95468,e=>{"use strict";let t=(0,e.i(75254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],95468)},73884,e=>{"use strict";let t=(0,e.i(75254).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],73884)},41192,e=>{"use strict";var t=e.i(43476),l=e.i(932),s=e.i(78894),r=e.i(75254);let a=(0,r.default)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);var i=e.i(95468);let d=(0,r.default)("clock-3",[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var c=e.i(58041),n=e.i(73884),o=e.i(83599),m=e.i(35878);function h(e){if(!e)return"Not recorded";let t=new Date(e);return Number.isNaN(t.getTime())?"Not recorded":t.toLocaleString()}function x(e){var l,s,r,c;return(0,t.jsxs)("article",{className:"relative pl-12",children:[(0,t.jsx)("div",{className:"absolute left-0 top-4 flex h-10 w-10 items-center justify-center rounded-full border bg-background",children:"applied"===(l=e.status)?(0,t.jsx)(i.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):"failed"===l?(0,t.jsx)(n.XCircle,{className:"h-4 w-4 text-destructive"}):(0,t.jsx)(d,{className:"h-4 w-4 text-yellow-500"})}),(0,t.jsxs)("div",{className:"rounded-xl border bg-card p-4 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${"applied"===(s=e.status)?"bg-emerald-500/10 text-emerald-600":"failed"===s?"bg-destructive/10 text-destructive":"bg-yellow-500/10 text-yellow-600"}`,children:e.status}),(0,t.jsxs)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${"critical"===(r=e.riskScore?.level)?"bg-destructive/10 text-destructive":"high"===r?"bg-orange-500/10 text-orange-600":"medium"===r?"bg-yellow-500/10 text-yellow-600":"bg-emerald-500/10 text-emerald-600"}`,children:[e.riskScore?.level??"low"," risk"]})]}),(0,t.jsx)("h2",{className:"mt-2 truncate font-mono text-sm font-semibold",children:e.name})]}),(0,t.jsxs)("div",{className:"grid gap-2 text-xs text-muted-foreground sm:grid-cols-3 lg:min-w-[520px]",children:[(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsx)(a,{className:"mb-1 h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Created"}),(0,t.jsx)("p",{children:h(e.createdAt??e.timestamp)})]}),(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsx)(i.CheckCircle2,{className:"mb-1 h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Applied"}),(0,t.jsx)("p",{children:h(e.appliedAt)})]}),(0,t.jsxs)("div",{className:"rounded-lg border p-2",children:[(0,t.jsx)(d,{className:"mb-1 h-3.5 w-3.5"}),(0,t.jsx)("p",{className:"font-medium text-foreground",children:"Duration"}),(0,t.jsx)("p",{children:void 0===(c=e.durationMs)?"Not recorded by Prisma history":c<1e3?`${c} ms`:`${(c/1e3).toFixed(1)} s`})]})]})]}),e.riskScore&&e.riskScore.factors.length>0&&(0,t.jsx)("div",{className:"mt-3 space-y-2",children:e.riskScore.factors.slice(0,3).map(l=>(0,t.jsxs)("div",{className:"rounded-lg bg-muted/50 p-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:l.description}),(0,t.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Recommendation: ",l.recommendation]})]},`${e.name}-${l.pattern}`))})]})]},e.name)}function u(e){return(0,t.jsxs)("div",{className:"rounded-xl border bg-card p-4",children:[(0,t.jsx)("p",{className:`text-2xl font-bold ${e.color}`,children:e.value}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e.label})]},e.label)}function p(e){return(0,t.jsx)("div",{className:"h-24 animate-pulse rounded-lg bg-muted"},e)}function g(e){return e.riskScore?.level==="high"||e.riskScore?.level==="critical"}function f(e){return"failed"===e.status}function b(e){return"pending"===e.status}function v(e){return"applied"===e.status}function j(){return(0,m.fetchMigrations)(1,100)}e.s(["default",0,function(){let e,r,a,i,d,n,h,y,N,k,w,M,S,C,A=(0,l.c)(36);A[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.SWR_KEYS.migrations(1,100),A[0]=e):e=A[0];let{data:T,error:$,isLoading:P}=(0,o.default)(e,j);A[1]!==T?.data?(r=T?.data??[],A[1]=T?.data,A[2]=r):r=A[2];let R=r;A[3]!==R?(a=R.filter(v),A[3]=R,A[4]=a):a=A[4];let _=a.length;A[5]!==R?(i=R.filter(b),A[5]=R,A[6]=i):i=A[6];let z=i.length;A[7]!==R?(d=R.filter(f),A[7]=R,A[8]=d):d=A[8];let D=d.length;A[9]!==R?(n=R.filter(g),A[9]=R,A[10]=n):n=A[10],A[11]!==a.length||A[12]!==i.length||A[13]!==d.length||A[14]!==n.length?(h={applied:_,pending:z,failed:D,risky:n.length},A[11]=a.length,A[12]=i.length,A[13]=d.length,A[14]=n.length,A[15]=h):h=A[15];let F=h;return A[16]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("h1",{className:"flex items-center gap-2 text-2xl font-bold",children:[(0,t.jsx)(c.Database,{className:"h-6 w-6"})," Migration Timeline"]}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Applied, pending, and failed migrations with creation dates, applied dates, duration, and risk context."})]}),A[16]=y):y=A[16],A[17]!==P?(N=P&&(0,t.jsx)("div",{className:"space-y-3",children:[1,2,3,4].map(p)}),A[17]=P,A[18]=N):N=A[18],A[19]!==$?(k=$&&(0,t.jsxs)("div",{className:"rounded-lg border border-destructive/40 bg-destructive/10 p-4 text-destructive",children:[(0,t.jsx)(s.AlertTriangle,{className:"mr-2 inline h-4 w-4"}),$ instanceof Error?$.message:"Failed to load migrations"]}),A[19]=$,A[20]=k):k=A[20],A[21]!==$||A[22]!==P||A[23]!==R.length?(w=!P&&!$&&0===R.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 rounded-xl border py-16 text-muted-foreground",children:[(0,t.jsx)(c.Database,{className:"h-10 w-10 opacity-40"}),(0,t.jsx)("p",{className:"text-sm",children:"No migrations found in this Prisma project."})]}),A[21]=$,A[22]=P,A[23]=R.length,A[24]=w):w=A[24],A[25]!==R.length||A[26]!==F?(M=R.length>0&&(0,t.jsx)("section",{className:"mb-6 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[{label:"Applied",value:F.applied,color:"text-emerald-600"},{label:"Pending",value:F.pending,color:"text-yellow-600"},{label:"Failed",value:F.failed,color:"text-destructive"},{label:"High/Critical Risk",value:F.risky,color:"text-orange-600"}].map(u)}),A[25]=R.length,A[26]=F,A[27]=M):M=A[27],A[28]!==R?(S=R.length>0&&(0,t.jsx)("div",{className:"relative space-y-4 before:absolute before:bottom-0 before:left-5 before:top-0 before:w-px before:bg-border",children:R.map(x)}),A[28]=R,A[29]=S):S=A[29],A[30]!==N||A[31]!==k||A[32]!==w||A[33]!==M||A[34]!==S?(C=(0,t.jsxs)("div",{className:"p-6",children:[y,N,k,w,M,S]}),A[30]=N,A[31]=k,A[32]=w,A[33]=M,A[34]=S,A[35]=C):C=A[35],C}],41192)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95468,e=>{"use strict";let s=(0,e.i(75254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,s],95468)},72701,e=>{"use strict";var s=e.i(43476),t=e.i(932),r=e.i(78894),l=e.i(95468),i=e.i(51737),a=e.i(83599),c=e.i(50891);function n(e){return"critical"===e?"bg-destructive/10 text-destructive":"high"===e?"bg-orange-500/10 text-orange-600":"medium"===e?"bg-yellow-500/10 text-yellow-600":"bg-emerald-500/10 text-emerald-600"}function d(e){var t;return(0,s.jsxs)("article",{className:`rounded-xl border p-4 shadow-sm ${"critical"===(t=e.riskScore.level)?"border-destructive/40 bg-destructive/5":"high"===t?"border-orange-500/40 bg-orange-500/5":"medium"===t?"border-yellow-500/40 bg-yellow-500/5":"bg-card"}`,children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(e.riskScore.level)}`,children:[e.riskScore.level," risk"]}),(0,s.jsx)("h2",{className:"mt-2 truncate font-mono text-sm font-semibold",children:e.name})]}),(0,s.jsxs)("div",{className:"text-right",children:[(0,s.jsx)("p",{className:"text-2xl font-bold",children:e.riskScore.score}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Risk score"})]})]}),(0,s.jsx)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:e.riskScore.factors.map(t=>(0,s.jsxs)("div",{className:"rounded-lg border bg-background/70 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${n(t.severity)}`,children:t.severity}),t.affectedTable&&(0,s.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:t.affectedTable})]}),(0,s.jsx)("p",{className:"mt-2 text-sm font-medium",children:t.description}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Recommendation: ",t.recommendation]})]},`${e.name}-${t.pattern}`))})]},e.name)}function o(e){return(0,s.jsx)("div",{className:"h-28 animate-pulse rounded-lg bg-muted"},e)}function m(e){return e.riskScore.factors.length>0}e.s(["default",0,function(){let e,n,x=(0,t.c)(10);x[0]===Symbol.for("react.memo_cache_sentinel")?(e={refreshInterval:3e4},x[0]=e):e=x[0];let{data:u,error:h,isLoading:f}=(0,a.default)(c.SWR_KEYS.risks,c.fetchRisks,e);if(x[1]!==u||x[2]!==h||x[3]!==f){let e,t,a,c=(u??[]).filter(m);x[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-2xl font-bold",children:[(0,s.jsx)(i.ShieldAlert,{className:"h-6 w-6"})," Migration Risk Analysis"]}),(0,s.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Detect table drops, column drops, data type changes, constraint changes, nullable changes, and index modifications before deployment."})]}),x[5]=e):e=x[5],x[6]!==f?(t=f&&(0,s.jsx)("div",{className:"space-y-3",children:[1,2,3].map(o)}),x[6]=f,x[7]=t):t=x[7],x[8]!==h?(a=h&&(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/40 bg-destructive/10 p-4 text-destructive",children:[(0,s.jsx)(r.AlertTriangle,{className:"mr-2 inline h-4 w-4"}),h instanceof Error?h.message:"Failed to load risk analysis"]}),x[8]=h,x[9]=a):a=x[9],n=(0,s.jsxs)("div",{className:"p-6",children:[e,t,a,!f&&!h&&0===c.length&&(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 rounded-xl border py-16 text-muted-foreground",children:[(0,s.jsx)(l.CheckCircle2,{className:"h-10 w-10 text-emerald-500"}),(0,s.jsx)("p",{className:"font-medium text-foreground",children:"No risky migrations detected"}),(0,s.jsx)("p",{className:"text-sm",children:"All scanned migrations are currently classified as low risk."})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-4",children:c.map(d)})]}),x[1]=u,x[2]=h,x[3]=f,x[4]=n}else n=x[4];return n}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95468,e=>{"use strict";let s=(0,e.i(75254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,s],95468)},77583,e=>{"use strict";var s=e.i(43476),t=e.i(932),r=e.i(78894),l=e.i(95468),i=e.i(51737),a=e.i(83599),c=e.i(35878);function n(e){return"critical"===e?"bg-destructive/10 text-destructive":"high"===e?"bg-orange-500/10 text-orange-600":"medium"===e?"bg-yellow-500/10 text-yellow-600":"bg-emerald-500/10 text-emerald-600"}function d(e){var t;return(0,s.jsxs)("article",{className:`rounded-xl border p-4 shadow-sm ${"critical"===(t=e.riskScore.level)?"border-destructive/40 bg-destructive/5":"high"===t?"border-orange-500/40 bg-orange-500/5":"medium"===t?"border-yellow-500/40 bg-yellow-500/5":"bg-card"}`,children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${n(e.riskScore.level)}`,children:[e.riskScore.level," risk"]}),(0,s.jsx)("h2",{className:"mt-2 truncate font-mono text-sm font-semibold",children:e.name})]}),(0,s.jsxs)("div",{className:"text-right",children:[(0,s.jsx)("p",{className:"text-2xl font-bold",children:e.riskScore.score}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Risk score"})]})]}),(0,s.jsx)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:e.riskScore.factors.map(t=>(0,s.jsxs)("div",{className:"rounded-lg border bg-background/70 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${n(t.severity)}`,children:t.severity}),t.affectedTable&&(0,s.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:t.affectedTable})]}),(0,s.jsx)("p",{className:"mt-2 text-sm font-medium",children:t.description}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Recommendation: ",t.recommendation]})]},`${e.name}-${t.pattern}`))})]},e.name)}function o(e){return(0,s.jsx)("div",{className:"h-28 animate-pulse rounded-lg bg-muted"},e)}function m(e){return e.riskScore.factors.length>0}e.s(["default",0,function(){let e,n,x=(0,t.c)(10);x[0]===Symbol.for("react.memo_cache_sentinel")?(e={refreshInterval:3e4},x[0]=e):e=x[0];let{data:u,error:h,isLoading:f}=(0,a.default)(c.SWR_KEYS.risks,c.fetchRisks,e);if(x[1]!==u||x[2]!==h||x[3]!==f){let e,t,a,c=(u??[]).filter(m);x[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("h1",{className:"flex items-center gap-2 text-2xl font-bold",children:[(0,s.jsx)(i.ShieldAlert,{className:"h-6 w-6"})," Migration Risk Analysis"]}),(0,s.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Detect table drops, column drops, data type changes, constraint changes, nullable changes, and index modifications before deployment."})]}),x[5]=e):e=x[5],x[6]!==f?(t=f&&(0,s.jsx)("div",{className:"space-y-3",children:[1,2,3].map(o)}),x[6]=f,x[7]=t):t=x[7],x[8]!==h?(a=h&&(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/40 bg-destructive/10 p-4 text-destructive",children:[(0,s.jsx)(r.AlertTriangle,{className:"mr-2 inline h-4 w-4"}),h instanceof Error?h.message:"Failed to load risk analysis"]}),x[8]=h,x[9]=a):a=x[9],n=(0,s.jsxs)("div",{className:"p-6",children:[e,t,a,!f&&!h&&0===c.length&&(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 rounded-xl border py-16 text-muted-foreground",children:[(0,s.jsx)(l.CheckCircle2,{className:"h-10 w-10 text-emerald-500"}),(0,s.jsx)("p",{className:"font-medium text-foreground",children:"No risky migrations detected"}),(0,s.jsx)("p",{className:"text-sm",children:"All scanned migrations are currently classified as low risk."})]}),c.length>0&&(0,s.jsx)("div",{className:"space-y-4",children:c.map(d)})]}),x[1]=u,x[2]=h,x[3]=f,x[4]=n}else n=x[4];return n}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},18967,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DecodeError:function(){return P},MiddlewareNotFoundError:function(){return O},MissingStaticPage:function(){return h},NormalizeError:function(){return E},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return i},execOnce:function(){return u},getDisplayName:function(){return l},getLocationOrigin:function(){return c},getURL:function(){return f},isAbsoluteUrl:function(){return a},isResSent:function(){return d},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return N}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function u(e){let r,t=!1;return(...n)=>(t||(t=!0,r=e(...n)),r)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=e=>s.test(e);function c(){let{protocol:e,hostname:r,port:t}=window.location;return`${e}//${r}${t?":"+t:""}`}function f(){let{href:e}=window.location,r=c();return e.substring(r.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let r=e.split("?");return r[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(r[1]?`?${r.slice(1).join("?")}`:"")}async function g(e,r){let t=r.res||r.ctx&&r.ctx.res;if(!e.getInitialProps)return r.ctx&&r.Component?{pageProps:await g(r.Component,r.ctx)}:{};let n=await e.getInitialProps(r);if(t&&d(t))return n;if(!n)throw Object.defineProperty(Error(`"${l(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class P extends Error{}class E extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class h extends Error{constructor(e,r){super(),this.message=`Failed to load static file for page: ${e} ${r}`}}class O extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function N(e){return JSON.stringify({message:e.message,stack:e.stack})}},98183,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={assign:function(){return a},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});function i(e){let r={};for(let[t,n]of e.entries()){let e=r[t];void 0===e?r[t]=n:Array.isArray(e)?e.push(n):r[t]=[e,n]}return r}function u(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let r=new URLSearchParams;for(let[t,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)r.append(t,u(e));else r.set(t,u(n));return r}function a(e,...r){for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},18967,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={DecodeError:function(){return P},MiddlewareNotFoundError:function(){return O},MissingStaticPage:function(){return h},NormalizeError:function(){return E},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return i},execOnce:function(){return u},getDisplayName:function(){return l},getLocationOrigin:function(){return c},getURL:function(){return f},isAbsoluteUrl:function(){return a},isResSent:function(){return d},loadGetInitialProps:function(){return g},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return N}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function u(e){let r,t=!1;return(...n)=>(t||(t=!0,r=e(...n)),r)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=e=>s.test(e);function c(){let{protocol:e,hostname:r,port:t}=window.location;return`${e}//${r}${t?":"+t:""}`}function f(){let{href:e}=window.location,r=c();return e.substring(r.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let r=e.split("?");return r[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(r[1]?`?${r.slice(1).join("?")}`:"")}async function g(e,r){let t=r.res||r.ctx&&r.ctx.res;if(!e.getInitialProps)return r.ctx&&r.Component?{pageProps:await g(r.Component,r.ctx)}:{};let n=await e.getInitialProps(r);if(t&&d(t))return n;if(!n)throw Object.defineProperty(Error(`"${l(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class P extends Error{}class E extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class h extends Error{constructor(e,r){super(),this.message=`Failed to load static file for page: ${e} ${r}`}}class O extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function N(e){return JSON.stringify({message:e.message,stack:e.stack})}},31894,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={assign:function(){return a},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var o in n)Object.defineProperty(t,o,{enumerable:!0,get:n[o]});function i(e){let r={};for(let[t,n]of e.entries()){let e=r[t];void 0===e?r[t]=n:Array.isArray(e)?e.push(n):r[t]=[e,n]}return r}function u(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let r=new URLSearchParams;for(let[t,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)r.append(t,u(e));else r.set(t,u(n));return r}function a(e,...r){for(let t of r){for(let r of t.keys())e.delete(r);for(let[r,n]of t.entries())e.append(r,n)}return e}}]);