qalita 2.6.3__py3-none-any.whl → 2.8.1__py3-none-any.whl

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 (136) hide show
  1. qalita/__main__.py +29 -19
  2. qalita/_frontend/.next/BUILD_ID +1 -1
  3. qalita/_frontend/.next/build-manifest.json +7 -7
  4. qalita/_frontend/.next/prerender-manifest.json +3 -3
  5. qalita/_frontend/.next/server/app/_global-error/page/build-manifest.json +5 -5
  6. qalita/_frontend/.next/server/app/_global-error/page.js +1 -1
  7. qalita/_frontend/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. qalita/_frontend/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. qalita/_frontend/.next/server/app/_global-error.html +2 -2
  10. qalita/_frontend/.next/server/app/_global-error.rsc +7 -7
  11. qalita/_frontend/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  12. qalita/_frontend/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  13. qalita/_frontend/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  14. qalita/_frontend/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  15. qalita/_frontend/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. qalita/_frontend/.next/server/app/_not-found/page/build-manifest.json +5 -5
  17. qalita/_frontend/.next/server/app/_not-found/page.js +1 -1
  18. qalita/_frontend/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. qalita/_frontend/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. qalita/_frontend/.next/server/app/_not-found.html +1 -1
  21. qalita/_frontend/.next/server/app/_not-found.rsc +14 -12
  22. qalita/_frontend/.next/server/app/_not-found.segments/_full.segment.rsc +14 -12
  23. qalita/_frontend/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
  24. qalita/_frontend/.next/server/app/_not-found.segments/_index.segment.rsc +6 -4
  25. qalita/_frontend/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  26. qalita/_frontend/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  27. qalita/_frontend/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -2
  28. qalita/_frontend/.next/server/app/page/build-manifest.json +5 -5
  29. qalita/_frontend/.next/server/app/page.js +1 -1
  30. qalita/_frontend/.next/server/app/page.js.nft.json +1 -1
  31. qalita/_frontend/.next/server/app/page_client-reference-manifest.js +1 -1
  32. qalita/_frontend/.next/server/app/sources/add/page/build-manifest.json +5 -5
  33. qalita/_frontend/.next/server/app/sources/add/page.js +1 -1
  34. qalita/_frontend/.next/server/app/sources/add/page.js.nft.json +1 -1
  35. qalita/_frontend/.next/server/app/sources/add/page_client-reference-manifest.js +1 -1
  36. qalita/_frontend/.next/server/app/sources/add.html +1 -1
  37. qalita/_frontend/.next/server/app/sources/add.rsc +18 -16
  38. qalita/_frontend/.next/server/app/sources/add.segments/_full.segment.rsc +18 -16
  39. qalita/_frontend/.next/server/app/sources/add.segments/_head.segment.rsc +3 -3
  40. qalita/_frontend/.next/server/app/sources/add.segments/_index.segment.rsc +6 -4
  41. qalita/_frontend/.next/server/app/sources/add.segments/_tree.segment.rsc +3 -2
  42. qalita/_frontend/.next/server/app/sources/add.segments/sources/add/__PAGE__.segment.rsc +4 -4
  43. qalita/_frontend/.next/server/app/sources/add.segments/sources/add.segment.rsc +3 -3
  44. qalita/_frontend/.next/server/app/sources/add.segments/sources.segment.rsc +3 -3
  45. qalita/_frontend/.next/server/app/sources/edit/[id]/page/build-manifest.json +5 -5
  46. qalita/_frontend/.next/server/app/sources/edit/[id]/page.js +1 -1
  47. qalita/_frontend/.next/server/app/sources/edit/[id]/page.js.nft.json +1 -1
  48. qalita/_frontend/.next/server/app/sources/edit/[id]/page_client-reference-manifest.js +1 -1
  49. qalita/_frontend/.next/server/app/sources/page/build-manifest.json +5 -5
  50. qalita/_frontend/.next/server/app/sources/page.js +1 -1
  51. qalita/_frontend/.next/server/app/sources/page.js.nft.json +1 -1
  52. qalita/_frontend/.next/server/app/sources/page_client-reference-manifest.js +1 -1
  53. qalita/_frontend/.next/server/app/sources.html +1 -1
  54. qalita/_frontend/.next/server/app/sources.rsc +18 -16
  55. qalita/_frontend/.next/server/app/sources.segments/_full.segment.rsc +18 -16
  56. qalita/_frontend/.next/server/app/sources.segments/_head.segment.rsc +3 -3
  57. qalita/_frontend/.next/server/app/sources.segments/_index.segment.rsc +6 -4
  58. qalita/_frontend/.next/server/app/sources.segments/_tree.segment.rsc +3 -2
  59. qalita/_frontend/.next/server/app/sources.segments/sources/__PAGE__.segment.rsc +4 -4
  60. qalita/_frontend/.next/server/app/sources.segments/sources.segment.rsc +3 -3
  61. qalita/_frontend/.next/server/chunks/[root-of-the-server]__e868c9e1._.js +1 -1
  62. qalita/_frontend/.next/server/chunks/[root-of-the-server]__ebaae723._.js +1 -1
  63. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__17f2c9b6._.js +1 -1
  64. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__1d5b5394._.js +3 -0
  65. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__21824174._.js +3 -0
  66. qalita/_frontend/.next/server/chunks/ssr/{[root-of-the-server]__b9356576._.js → [root-of-the-server]__336e4c46._.js} +2 -2
  67. qalita/_frontend/.next/server/chunks/ssr/{[root-of-the-server]__c507bbfe._.js → [root-of-the-server]__7876511a._.js} +2 -2
  68. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__be91267c._.js +3 -0
  69. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__d15765f1._.js +3 -0
  70. qalita/_frontend/.next/server/chunks/ssr/{_3b4a232c._.js → _404f6e81._.js} +4 -4
  71. qalita/_frontend/.next/server/chunks/ssr/{_cd257a0c._.js → _6a67f6f0._.js} +4 -4
  72. qalita/_frontend/.next/server/chunks/ssr/_cafb65ac._.js +3 -0
  73. qalita/_frontend/.next/server/chunks/ssr/_cb7b44d6._.js +1 -1
  74. qalita/_frontend/.next/server/chunks/ssr/_d44c43ed._.js +3 -0
  75. qalita/_frontend/.next/server/chunks/ssr/components_DashboardContent_tsx_c3635665._.js +1 -1
  76. qalita/_frontend/.next/server/chunks/ssr/node_modules_next_dist_server_route-modules_app-page_vendored_a443a6bf._.js +3 -0
  77. qalita/_frontend/.next/server/middleware-build-manifest.js +5 -5
  78. qalita/_frontend/.next/server/pages/404.html +1 -1
  79. qalita/_frontend/.next/server/pages/500.html +2 -2
  80. qalita/_frontend/.next/server/server-reference-manifest.js +1 -1
  81. qalita/_frontend/.next/server/server-reference-manifest.json +1 -1
  82. qalita/_frontend/.next/static/chunks/02a64570f0a14789.js +1 -0
  83. qalita/_frontend/.next/static/chunks/{7340adf74ff47ec0.js → 0b082245f106d665.js} +1 -1
  84. qalita/_frontend/.next/static/chunks/27b3ba70c7ef50a8.js +1 -0
  85. qalita/_frontend/.next/static/chunks/517e9b74d1a3c0ce.js +1 -0
  86. qalita/_frontend/.next/static/chunks/58689c96b0676c41.js +1 -0
  87. qalita/_frontend/.next/static/chunks/{236f7e5abd6f09ff.js → 89ba62a8ba9b79ce.js} +2 -2
  88. qalita/_frontend/.next/static/chunks/acc5da18ff20daa1.js +3 -0
  89. qalita/_frontend/.next/static/chunks/bdc8a8e7721f5675.js +2 -0
  90. qalita/_frontend/.next/static/chunks/e0df86cbf44bbf9f.js +1 -0
  91. qalita/_frontend/.next/static/chunks/e4c3a252774ab7fd.css +1 -0
  92. qalita/_frontend/.next/static/chunks/e6ce59ba40b863f2.js +1 -0
  93. qalita/_frontend/.next/static/chunks/{30ea11065999f7ac.js → ec4b1f1e3cd3ae43.js} +1 -1
  94. qalita/_frontend/.next/static/chunks/{turbopack-25186fc8e1264445.js → turbopack-d21156d03715fafa.js} +1 -1
  95. qalita/_frontend/node_modules/@swc/helpers/package.json +225 -2
  96. qalita/_frontend/node_modules/next/node_modules/@swc/helpers/package.json +471 -0
  97. qalita/_frontend/package.json +12 -1
  98. qalita/commands/pack.py +61 -8
  99. qalita/commands/worker.py +46 -20
  100. qalita/commands/worker_grpc.py +941 -0
  101. qalita/grpc/__init__.py +8 -0
  102. qalita/grpc/client.py +693 -0
  103. qalita/grpc/protos/__init__.py +4 -0
  104. qalita/grpc/protos/qalita.proto +391 -0
  105. qalita/grpc/protos/qalita_pb2.py +112 -0
  106. qalita/grpc/protos/qalita_pb2_grpc.py +588 -0
  107. qalita/internal/data_preview.py +565 -0
  108. qalita/internal/request.py +4 -3
  109. qalita/internal/utils.py +1 -1
  110. qalita/web/app.py +6 -2
  111. qalita/web/blueprints/dashboard.py +12 -44
  112. qalita/web/blueprints/helpers.py +119 -46
  113. qalita/web/blueprints/sources.py +5 -99
  114. qalita/web/blueprints/workers.py +6 -6
  115. {qalita-2.6.3.dist-info → qalita-2.8.1.dist-info}/METADATA +7 -1
  116. {qalita-2.6.3.dist-info → qalita-2.8.1.dist-info}/RECORD +124 -111
  117. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__345b6cae._.js +0 -3
  118. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__7213ba1d._.js +0 -3
  119. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__9130e1f5._.js +0 -3
  120. qalita/_frontend/.next/server/chunks/ssr/[root-of-the-server]__e2a7729d._.js +0 -3
  121. qalita/_frontend/.next/server/chunks/ssr/app_layout_tsx_271801d7._.js +0 -3
  122. qalita/_frontend/.next/static/chunks/0f84739db4a8acc7.js +0 -1
  123. qalita/_frontend/.next/static/chunks/1107bdca1eff6d34.css +0 -1
  124. qalita/_frontend/.next/static/chunks/4b0c5de8d4cc313f.js +0 -1
  125. qalita/_frontend/.next/static/chunks/4dd28bc3f722184a.js +0 -2
  126. qalita/_frontend/.next/static/chunks/711d597b816a80c1.js +0 -1
  127. qalita/_frontend/.next/static/chunks/bb29c2be4df20a40.js +0 -1
  128. qalita/_frontend/.next/static/chunks/ecf559101be0ae12.js +0 -3
  129. /qalita/_frontend/.next/static/{N9MqNrf23ZZkbbSW2aXkt → 8__jz-coq8Cacgz6IFGzi}/_buildManifest.js +0 -0
  130. /qalita/_frontend/.next/static/{N9MqNrf23ZZkbbSW2aXkt → 8__jz-coq8Cacgz6IFGzi}/_clientMiddlewareManifest.json +0 -0
  131. /qalita/_frontend/.next/static/{N9MqNrf23ZZkbbSW2aXkt → 8__jz-coq8Cacgz6IFGzi}/_ssgManifest.js +0 -0
  132. /qalita/_frontend/node_modules/{@swc → next/node_modules/@swc}/helpers/cjs/_interop_require_default.cjs +0 -0
  133. /qalita/_frontend/node_modules/{@swc → next/node_modules/@swc}/helpers/cjs/_interop_require_wildcard.cjs +0 -0
  134. {qalita-2.6.3.dist-info → qalita-2.8.1.dist-info}/WHEEL +0 -0
  135. {qalita-2.6.3.dist-info → qalita-2.8.1.dist-info}/entry_points.txt +0 -0
  136. {qalita-2.6.3.dist-info → qalita-2.8.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  module.exports=[57997,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={UnrecognizedActionError:function(){return f},unstable_isUnrecognizedActionError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});class f extends Error{constructor(...a){super(...a),this.name="UnrecognizedActionError"}}function g(a){return!!(a&&"object"==typeof a&&a instanceof f)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},75718,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReadonlyURLSearchParams",{enumerable:!0,get:function(){return e}});class d extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class e extends URLSearchParams{append(){throw new d}delete(){throw new d}set(){throw new d}sort(){throw new d}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},15128,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"RedirectStatusCode",{enumerable:!0,get:function(){return e}});var d,e=((d={})[d.SeeOther=303]="SeeOther",d[d.TemporaryRedirect=307]="TemporaryRedirect",d[d.PermanentRedirect=308]="PermanentRedirect",d);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},11026,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d,e={REDIRECT_ERROR_CODE:function(){return h},RedirectType:function(){return i},isRedirectError:function(){return j}};for(var f in e)Object.defineProperty(c,f,{enumerable:!0,get:e[f]});let g=a.r(15128),h="NEXT_REDIRECT";var i=((d={}).push="push",d.replace="replace",d);function j(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let b=a.digest.split(";"),[c,d]=b,e=b.slice(2,-2).join(";"),f=Number(b.at(-2));return c===h&&("replace"===d||"push"===d)&&"string"==typeof e&&!isNaN(f)&&f in g.RedirectStatusCode}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},22099,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={getRedirectError:function(){return i},getRedirectStatusCodeFromError:function(){return n},getRedirectTypeFromError:function(){return m},getURLFromRedirectError:function(){return l},permanentRedirect:function(){return k},redirect:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(15128),g=a.r(11026),h=a.r(20635).actionAsyncStorage;function i(a,b,c=f.RedirectStatusCode.TemporaryRedirect){let d=Object.defineProperty(Error(g.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return d.digest=`${g.REDIRECT_ERROR_CODE};${b};${a};${c};`,d}function j(a,b){throw i(a,b??=h?.getStore()?.isAction?g.RedirectType.push:g.RedirectType.replace,f.RedirectStatusCode.TemporaryRedirect)}function k(a,b=g.RedirectType.replace){throw i(a,b,f.RedirectStatusCode.PermanentRedirect)}function l(a){return(0,g.isRedirectError)(a)?a.digest.split(";").slice(2,-2).join(";"):null}function m(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return a.digest.split(";",2)[1]}function n(a){if(!(0,g.isRedirectError)(a))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(a.digest.split(";").at(-2))}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},8535,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HTTPAccessErrorStatus:function(){return f},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return h},getAccessFallbackErrorTypeByStatus:function(){return k},getAccessFallbackHTTPStatus:function(){return j},isHTTPAccessFallbackError:function(){return i}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},g=new Set(Object.values(f)),h="NEXT_HTTP_ERROR_FALLBACK";function i(a){if("object"!=typeof a||null===a||!("digest"in a)||"string"!=typeof a.digest)return!1;let[b,c]=a.digest.split(";");return b===h&&g.has(Number(c))}function j(a){return Number(a.digest.split(";")[1])}function k(a){switch(a){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},28102,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"notFound",{enumerable:!0,get:function(){return f}});let d=a.r(8535),e=`${d.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;function f(){let a=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});throw a.digest=e,a}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},64177,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"forbidden",{enumerable:!0,get:function(){return d}}),a.r(8535).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},88213,(a,b,c)=>{"use strict";function d(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unauthorized",{enumerable:!0,get:function(){return d}}),a.r(8535).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},35710,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={isHangingPromiseRejectionError:function(){return f},makeDevtoolsIOAwarePromise:function(){return l},makeHangingPromise:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return"object"==typeof a&&null!==a&&"digest"in a&&a.digest===g}let g="HANGING_PROMISE_REJECTION";class h extends Error{constructor(a,b){super(`During prerendering, ${b} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${b} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${a}".`),this.route=a,this.expression=b,this.digest=g}}let i=new WeakMap;function j(a,b,c){if(a.aborted)return Promise.reject(new h(b,c));{let d=new Promise((d,e)=>{let f=e.bind(null,new h(b,c)),g=i.get(a);if(g)g.push(f);else{let b=[f];i.set(a,b),a.addEventListener("abort",()=>{for(let a=0;a<b.length;a++)b[a]()},{once:!0})}});return d.catch(k),d}}function k(){}function l(a,b,c){return b.stagedRendering?b.stagedRendering.delayUntilStage(c,void 0,a):new Promise(b=>{setTimeout(()=>{b(a)},0)})}},31101,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isPostpone",{enumerable:!0,get:function(){return e}});let d=Symbol.for("react.postpone");function e(a){return"object"==typeof a&&null!==a&&a.$$typeof===d}},41997,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={BailoutToCSRError:function(){return g},isBailoutToCSRError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="BAILOUT_TO_CLIENT_SIDE_RENDERING";class g extends Error{constructor(a){super(`Bail out to client-side rendering: ${a}`),this.reason=a,this.digest=f}}function h(a){return"object"==typeof a&&null!==a&&"digest"in a&&a.digest===f}},77747,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"isNextRouterError",{enumerable:!0,get:function(){return f}});let d=a.r(8535),e=a.r(11026);function f(a){return(0,e.isRedirectError)(a)||(0,d.isHTTPAccessFallbackError)(a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},3326,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DynamicServerError:function(){return g},isDynamicServerError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="DYNAMIC_SERVER_USAGE";class g extends Error{constructor(a){super(`Dynamic server usage: ${a}`),this.description=a,this.digest=f}}function h(a){return"object"==typeof a&&null!==a&&"digest"in a&&"string"==typeof a.digest&&a.digest===f}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},99392,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={StaticGenBailoutError:function(){return g},isStaticGenBailoutError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="NEXT_STATIC_GEN_BAILOUT";class g extends Error{constructor(...a){super(...a),this.code=f}}function h(a){return"object"==typeof a&&null!==a&&"code"in a&&a.code===f}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},83590,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={METADATA_BOUNDARY_NAME:function(){return f},OUTLET_BOUNDARY_NAME:function(){return h},ROOT_LAYOUT_BOUNDARY_NAME:function(){return i},VIEWPORT_BOUNDARY_NAME:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="__next_metadata_boundary__",g="__next_viewport_boundary__",h="__next_outlet_boundary__",i="__next_root_layout_boundary__"},36785,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={atLeastOneTask:function(){return h},scheduleImmediate:function(){return g},scheduleOnNextTick:function(){return f},waitAtLeastOneReactRenderTask:function(){return i}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a=>{Promise.resolve().then(()=>{process.nextTick(a)})},g=a=>{setImmediate(a)};function h(){return new Promise(a=>g(a))}function i(){return new Promise(a=>setImmediate(a))}},88644,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},54110,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d,e,f={Postpone:function(){return B},PreludeState:function(){return $},abortAndThrowOnSynchronousRequestDataAccess:function(){return A},abortOnSynchronousPlatformIOAccess:function(){return z},accessedDynamicData:function(){return J},annotateDynamicAccess:function(){return O},consumeDynamicAccess:function(){return K},createDynamicTrackingState:function(){return s},createDynamicValidationState:function(){return t},createHangingInputAbortSignal:function(){return N},createRenderInBrowserAbortSignal:function(){return M},delayUntilRuntimeStage:function(){return ac},formatDynamicAPIAccesses:function(){return L},getFirstDynamicReason:function(){return u},getStaticShellDisallowedDynamicReasons:function(){return ab},isDynamicPostpone:function(){return E},isPrerenderInterruptedError:function(){return I},logDisallowedDynamicError:function(){return _},markCurrentScopeAsDynamic:function(){return v},postponeWithTracking:function(){return C},throwIfDisallowedDynamic:function(){return aa},throwToInterruptStaticGeneration:function(){return w},trackAllowedDynamicAccess:function(){return W},trackDynamicDataInDynamicRender:function(){return x},trackDynamicHoleInRuntimeShell:function(){return X},trackDynamicHoleInStaticShell:function(){return Y},useDynamicRouteParams:function(){return P},useDynamicSearchParams:function(){return Q}};for(var g in f)Object.defineProperty(c,g,{enumerable:!0,get:f[g]});let h=(d=a.r(72131))&&d.__esModule?d:{default:d},i=a.r(3326),j=a.r(99392),k=a.r(32319),l=a.r(56704),m=a.r(35710),n=a.r(83590),o=a.r(36785),p=a.r(41997),q=a.r(88644),r="function"==typeof h.default.unstable_postpone;function s(a){return{isDebugDynamicAccesses:a,dynamicAccesses:[],syncDynamicErrorWithStack:null}}function t(){return{hasSuspenseAboveBody:!1,hasDynamicMetadata:!1,dynamicMetadata:null,hasDynamicViewport:!1,hasAllowedDynamic:!1,dynamicErrors:[]}}function u(a){var b;return null==(b=a.dynamicAccesses[0])?void 0:b.expression}function v(a,b,c){if(b)switch(b.type){case"cache":case"unstable-cache":case"private-cache":return}if(!a.forceDynamic&&!a.forceStatic){if(a.dynamicShouldError)throw Object.defineProperty(new j.StaticGenBailoutError(`Route ${a.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${c}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(b)switch(b.type){case"prerender-ppr":return C(a.route,c,b.dynamicTracking);case"prerender-legacy":b.revalidate=0;let d=Object.defineProperty(new i.DynamicServerError(`Route ${a.route} couldn't be rendered statically because it used ${c}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E550",enumerable:!1,configurable:!0});throw a.dynamicUsageDescription=c,a.dynamicUsageStack=d.stack,d}}}function w(a,b,c){let d=Object.defineProperty(new i.DynamicServerError(`Route ${b.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.revalidate=0,b.dynamicUsageDescription=a,b.dynamicUsageStack=d.stack,d}function x(a){switch(a.type){case"cache":case"unstable-cache":case"private-cache":return}}function y(a,b,c){let d=H(`Route ${a} needs to bail out of prerendering at this point because it used ${b}.`);c.controller.abort(d);let e=c.dynamicTracking;e&&e.dynamicAccesses.push({stack:e.isDebugDynamicAccesses?Error().stack:void 0,expression:b})}function z(a,b,c,d){let e=d.dynamicTracking;y(a,b,d),e&&null===e.syncDynamicErrorWithStack&&(e.syncDynamicErrorWithStack=c)}function A(a,b,c,d){if(!1===d.controller.signal.aborted){y(a,b,d);let e=d.dynamicTracking;e&&null===e.syncDynamicErrorWithStack&&(e.syncDynamicErrorWithStack=c)}throw H(`Route ${a} needs to bail out of prerendering at this point because it used ${b}.`)}function B({reason:a,route:b}){let c=k.workUnitAsyncStorage.getStore();C(b,a,c&&"prerender-ppr"===c.type?c.dynamicTracking:null)}function C(a,b,c){(function(){if(!r)throw Object.defineProperty(Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E224",enumerable:!1,configurable:!0})})(),c&&c.dynamicAccesses.push({stack:c.isDebugDynamicAccesses?Error().stack:void 0,expression:b}),h.default.unstable_postpone(D(a,b))}function D(a,b){return`Route ${a} needs to bail out of prerendering at this point because it used ${b}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`}function E(a){return"object"==typeof a&&null!==a&&"string"==typeof a.message&&F(a.message)}function F(a){return a.includes("needs to bail out of prerendering at this point because it used")&&a.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}if(!1===F(D("%%%","^^^")))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});let G="NEXT_PRERENDER_INTERRUPTED";function H(a){let b=Object.defineProperty(Error(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return b.digest=G,b}function I(a){return"object"==typeof a&&null!==a&&a.digest===G&&"name"in a&&"message"in a&&a instanceof Error}function J(a){return a.length>0}function K(a,b){return a.dynamicAccesses.push(...b.dynamicAccesses),a.dynamicAccesses}function L(a){return a.filter(a=>"string"==typeof a.stack&&a.stack.length>0).map(({expression:a,stack:b})=>(b=b.split("\n").slice(4).filter(a=>!(a.includes("node_modules/next/")||a.includes(" (<anonymous>)")||a.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${a}:
2
2
  ${b}`))}function M(){let a=new AbortController;return a.abort(Object.defineProperty(new p.BailoutToCSRError("Render in Browser"),"__NEXT_ERROR_CODE",{value:"E721",enumerable:!1,configurable:!0})),a.signal}function N(a){switch(a.type){case"prerender":case"prerender-runtime":let b=new AbortController;if(a.cacheSignal)a.cacheSignal.inputReady().then(()=>{b.abort()});else{let c=(0,k.getRuntimeStagePromise)(a);c?c.then(()=>(0,o.scheduleOnNextTick)(()=>b.abort())):(0,o.scheduleOnNextTick)(()=>b.abort())}return b.signal;case"prerender-client":case"prerender-ppr":case"prerender-legacy":case"request":case"cache":case"private-cache":case"unstable-cache":return}}function O(a,b){let c=b.dynamicTracking;c&&c.dynamicAccesses.push({stack:c.isDebugDynamicAccesses?Error().stack:void 0,expression:a})}function P(a){let b=l.workAsyncStorage.getStore(),c=k.workUnitAsyncStorage.getStore();if(b&&c)switch(c.type){case"prerender-client":case"prerender":{let d=c.fallbackRouteParams;d&&d.size>0&&h.default.use((0,m.makeHangingPromise)(c.renderSignal,b.route,a));break}case"prerender-ppr":{let d=c.fallbackRouteParams;if(d&&d.size>0)return C(b.route,a,c.dynamicTracking);break}case"prerender-runtime":throw Object.defineProperty(new q.InvariantError(`\`${a}\` was called during a runtime prerender. Next.js should be preventing ${a} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E771",enumerable:!1,configurable:!0});case"cache":case"private-cache":throw Object.defineProperty(new q.InvariantError(`\`${a}\` was called inside a cache scope. Next.js should be preventing ${a} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0})}}function Q(a){let b=l.workAsyncStorage.getStore(),c=k.workUnitAsyncStorage.getStore();if(b)switch(!c&&(0,k.throwForMissingRequestStore)(a),c.type){case"prerender-client":h.default.use((0,m.makeHangingPromise)(c.renderSignal,b.route,a));break;case"prerender-legacy":case"prerender-ppr":if(b.forceStatic)return;throw Object.defineProperty(new p.BailoutToCSRError(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":throw Object.defineProperty(new q.InvariantError(`\`${a}\` was called from a Server Component. Next.js should be preventing ${a} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E795",enumerable:!1,configurable:!0});case"cache":case"unstable-cache":case"private-cache":throw Object.defineProperty(new q.InvariantError(`\`${a}\` was called inside a cache scope. Next.js should be preventing ${a} from being included in server components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E745",enumerable:!1,configurable:!0});case"request":return}}let R=/\n\s+at Suspense \(<anonymous>\)/,S=RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${n.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`),T=RegExp(`\\n\\s+at ${n.METADATA_BOUNDARY_NAME}[\\n\\s]`),U=RegExp(`\\n\\s+at ${n.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`),V=RegExp(`\\n\\s+at ${n.OUTLET_BOUNDARY_NAME}[\\n\\s]`);function W(a,b,c,d){if(!V.test(b)){if(T.test(b)){c.hasDynamicMetadata=!0;return}if(U.test(b)){c.hasDynamicViewport=!0;return}if(S.test(b)){c.hasAllowedDynamic=!0,c.hasSuspenseAboveBody=!0;return}else if(R.test(b)){c.hasAllowedDynamic=!0;return}else{if(d.syncDynamicErrorWithStack)return void c.dynamicErrors.push(d.syncDynamicErrorWithStack);let e=Z(`Route "${a.route}": Uncached data was accessed outside of <Suspense>. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`,b);return void c.dynamicErrors.push(e)}}}function X(a,b,c,d){if(!V.test(b)){if(T.test(b)){c.dynamicMetadata=Z(`Route "${a.route}": Uncached data or \`connection()\` was accessed inside \`generateMetadata\`. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`,b);return}if(U.test(b)){let d=Z(`Route "${a.route}": Uncached data or \`connection()\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`,b);c.dynamicErrors.push(d);return}if(S.test(b)){c.hasAllowedDynamic=!0,c.hasSuspenseAboveBody=!0;return}else if(R.test(b)){c.hasAllowedDynamic=!0;return}else{if(d.syncDynamicErrorWithStack)return void c.dynamicErrors.push(d.syncDynamicErrorWithStack);let e=Z(`Route "${a.route}": Uncached data or \`connection()\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`,b);return void c.dynamicErrors.push(e)}}}function Y(a,b,c,d){if(!V.test(b)){if(T.test(b)){c.dynamicMetadata=Z(`Route "${a.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateMetadata\` or you have file-based metadata such as icons that depend on dynamic params segments. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`,b);return}if(U.test(b)){let d=Z(`Route "${a.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`,b);c.dynamicErrors.push(d);return}if(S.test(b)){c.hasAllowedDynamic=!0,c.hasSuspenseAboveBody=!0;return}else if(R.test(b)){c.hasAllowedDynamic=!0;return}else{if(d.syncDynamicErrorWithStack)return void c.dynamicErrors.push(d.syncDynamicErrorWithStack);let e=Z(`Route "${a.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`,b);return void c.dynamicErrors.push(e)}}}function Z(a,b){let c=Object.defineProperty(Error(a),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return c.stack=c.name+": "+a+b,c}var $=((e={})[e.Full=0]="Full",e[e.Empty=1]="Empty",e[e.Errored=2]="Errored",e);function _(a,b){console.error(b),a.dev||(a.hasReadableErrorStacks?console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${a.route}" in your browser to investigate the error.`):console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
3
3
  - Start the app in development mode by running \`next dev\`, then open "${a.route}" in your browser to investigate the error.
4
- - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`))}function aa(a,b,c,d){if(d.syncDynamicErrorWithStack)throw _(a,d.syncDynamicErrorWithStack),new j.StaticGenBailoutError;if(0!==b){if(c.hasSuspenseAboveBody)return;let d=c.dynamicErrors;if(d.length>0){for(let b=0;b<d.length;b++)_(a,d[b]);throw new j.StaticGenBailoutError}if(c.hasDynamicViewport)throw console.error(`Route "${a.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),new j.StaticGenBailoutError;if(1===b)throw console.error(`Route "${a.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new j.StaticGenBailoutError}else if(!1===c.hasAllowedDynamic&&c.hasDynamicMetadata)throw console.error(`Route "${a.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),new j.StaticGenBailoutError}function ab(a,b,c){if(c.hasSuspenseAboveBody)return[];if(0!==b){let d=c.dynamicErrors;if(d.length>0)return d;if(1===b)return[Object.defineProperty(new q.InvariantError(`Route "${a.route}" did not produce a static shell and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E936",enumerable:!1,configurable:!0})]}else if(!1===c.hasAllowedDynamic&&0===c.dynamicErrors.length&&c.dynamicMetadata)return[c.dynamicMetadata];return[]}function ac(a,b){return a.runtimeStagePromise?a.runtimeStagePromise.then(()=>b):b}},44753,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return function a(b){if((0,g.isNextRouterError)(b)||(0,f.isBailoutToCSRError)(b)||(0,i.isDynamicServerError)(b)||(0,h.isDynamicPostpone)(b)||(0,e.isPostpone)(b)||(0,d.isHangingPromiseRejectionError)(b)||(0,h.isPrerenderInterruptedError)(b))throw b;b instanceof Error&&"cause"in b&&a(b.cause)}}});let d=a.r(35710),e=a.r(31101),f=a.r(41997),g=a.r(77747),h=a.r(54110),i=a.r(3326);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},47083,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return d}});let d=a.r(44753).unstable_rethrow;("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},21066,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return h.RedirectType},forbidden:function(){return j.forbidden},notFound:function(){return i.notFound},permanentRedirect:function(){return g.permanentRedirect},redirect:function(){return g.redirect},unauthorized:function(){return k.unauthorized},unstable_isUnrecognizedActionError:function(){return m},unstable_rethrow:function(){return l.unstable_rethrow}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(75718),g=a.r(22099),h=a.r(11026),i=a.r(28102),j=a.r(64177),k=a.r(88213),l=a.r(47083);function m(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},74137,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return h.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return j.ServerInsertedHTMLContext},forbidden:function(){return l.forbidden},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},unauthorized:function(){return l.unauthorized},unstable_isUnrecognizedActionError:function(){return k.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return l.unstable_rethrow},useParams:function(){return r},usePathname:function(){return p},useRouter:function(){return q},useSearchParams:function(){return o},useSelectedLayoutSegment:function(){return t},useSelectedLayoutSegments:function(){return s},useServerInsertedHTML:function(){return j.useServerInsertedHTML}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(46058)._(a.r(72131)),g=a.r(9270),h=a.r(36313),i=a.r(39118),j=a.r(18341),k=a.r(57997),l=a.r(21066),m=a.r(54110).useDynamicRouteParams,n=a.r(54110).useDynamicSearchParams;function o(){n?.("useSearchParams()");let a=(0,f.useContext)(h.SearchParamsContext);return(0,f.useMemo)(()=>a?new h.ReadonlyURLSearchParams(a):null,[a])}function p(){return m?.("usePathname()"),(0,f.useContext)(h.PathnameContext)}function q(){let a=(0,f.useContext)(g.AppRouterContext);if(null===a)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return a}function r(){return m?.("useParams()"),(0,f.useContext)(h.PathParamsContext)}function s(a="children"){m?.("useSelectedLayoutSegments()");let b=(0,f.useContext)(g.LayoutRouterContext);return b?(0,i.getSelectedLayoutSegmentPath)(b.parentTree,a):null}function t(a="children"){m?.("useSelectedLayoutSegment()"),(0,f.useContext)(h.NavigationPromisesContext);let b=s(a);return(0,i.computeSelectedLayoutSegment)(b,a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},50944,(a,b,c)=>{b.exports=a.r(74137)},37433,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(71987);let f=["file","csv","excel","folder","postgresql","mysql","oracle","mssql","sqlite","mongodb","s3","gcs","azure_blob","hdfs"],g={file:"file.svg",csv:"csv.svg",excel:"excel.svg",folder:"folder.svg",postgresql:"postgresql.svg",mysql:"mysql.svg",oracle:"oracle.svg",mssql:"mssql.svg",sqlite:"sqlite.svg",mongodb:"mongodb.svg",s3:"s3.svg",gcs:"gcs.png",azure_blob:"azure_blob.svg",hdfs:"hdfs.svg"};function h(a,b){let c={name:a?.name||"",type:a?.type||b||"file",description:a?.description||"",visibility:a?.visibility||"private",reference:a?.config?.reference||!1,sensitive:a?.config?.sensitive||!1};if(!a?.config)return c;let d=a.config,e=a.type||b||"file",f={...c};return"file"===e&&d.path?f.file_path=d.path:"csv"===e&&d.path?(f.csv_path=d.path,f.csv_delimiter=d.delimiter||",",f.csv_encoding=d.encoding||"utf-8",f.csv_header=d.has_header||!1):"excel"===e&&d.path?(f.excel_path=d.path,f.excel_sheet=d.sheet||"",f.excel_header_row=d.header_row||"1"):"sqlite"===e&&d.file_path?f.sqlite_file_path=d.file_path:"folder"===e&&d.path&&(f.folder_path=d.path),["postgresql","mysql","oracle","mssql"].includes(e)&&(d.host&&(f.db_host=d.host),d.port&&(f.db_port=d.port),d.username&&(f.db_username=d.username),d.password&&(f.db_password=d.password),d.database&&(f.db_database=d.database),d.table_or_query&&(f.db_table_or_query=d.table_or_query),("postgresql"===e||"oracle"===e)&&d.schema&&(f.db_schema=d.schema)),"mongodb"===e&&(d.host&&(f.mongo_host=d.host),d.port&&(f.mongo_port=d.port),d.username&&(f.mongo_username=d.username),d.password&&(f.mongo_password=d.password),d.database&&(f.mongo_database=d.database)),"s3"===e&&(d.bucket&&(f.s3_bucket=d.bucket),d.prefix&&(f.s3_prefix=d.prefix),d.access_key&&(f.s3_access_key=d.access_key),d.secret_key&&(f.s3_secret_key=d.secret_key),d.region&&(f.s3_region=d.region)),"gcs"===e&&(d.bucket&&(f.gcs_bucket=d.bucket),d.prefix&&(f.gcs_prefix=d.prefix),d.credentials&&(f.gcs_credentials=d.credentials)),"azure_blob"===e&&(d.container&&(f.azure_blob_container=d.container),d.prefix&&(f.azure_blob_prefix=d.prefix),d.account_name&&(f.azure_blob_account_name=d.account_name),d.account_key&&(f.azure_blob_account_key=d.account_key)),"hdfs"===e&&(d.path&&(f.hdfs_path=d.path),d.namenode&&(f.hdfs_namenode=d.namenode)),f}function i({source:a,preselectedType:i,onSuccess:j}){let k=(0,d.useRouter)(),[l,m]=(0,c.useState)(()=>h(a,i)),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null);(0,c.useEffect)(()=>{a&&m(h(a,i))},[a,i]);let t=a=>{let{name:b,value:c,type:d}=a.target;if("checkbox"===d){let c=a.target.checked;m(a=>({...a,[b]:c}))}else m(a=>({...a,[b]:c}))},u=async()=>{try{let a=await fetch("/api/sources/pick-file"),b=await a.json();if(b.path){let a="csv"===l.type?"csv_path":"excel"===l.type?"excel_path":"sqlite"===l.type?"sqlite_file_path":"file_path";m(c=>({...c,[a]:b.path}))}}catch(a){console.error("Failed to pick file:",a)}},v=async()=>{try{let a=await fetch("/api/sources/pick-folder"),b=await a.json();b.path&&m(a=>({...a,folder_path:b.path}))}catch(a){console.error("Failed to pick folder:",a)}},w=async()=>{q(!0),s(null);try{let b,c=new FormData;Object.entries(l).forEach(([a,b])=>{null!=b&&c.append(a,String(b))}),a&&c.append("original_name",a.name);let d=await fetch("/api/sources/validate",{method:"POST",body:c}),e=await d.text();try{b=JSON.parse(e)}catch(a){s({message:`Validation failed: ${d.status} ${d.statusText}. ${e.substring(0,100)}`,ok:!1});return}s({message:b.message||(b.ok?"Valid.":"Invalid."),ok:b.ok||!1})}catch(a){s({message:`Validation failed due to a network error: ${a instanceof Error?a.message:String(a)}`,ok:!1})}finally{q(!1)}},x=async b=>{b.preventDefault(),o(null);try{let b=new FormData;Object.entries(l).forEach(([a,c])=>{null!=c&&("boolean"==typeof c?c&&b.append(a,"on"):b.append(a,String(c)))}),a&&b.append("original_name",a.name);let c=a&&a.name?`/api/sources/edit/${encodeURIComponent(a.name)}`:"/api/sources/add",d=await fetch(c,{method:"POST",body:b});if(d.ok)j();else{let a=await d.text();try{let b=JSON.parse(a);o(b.error||b.message||"Failed to save source")}catch{o("Failed to save source")}}}catch(a){o("Failed to save source")}},y=l.type,z=g[y]||"folder.svg";return(0,b.jsxs)("form",{onSubmit:x,children:[n&&(0,b.jsx)("div",{className:"alert alert-error mb-3",children:n}),r&&(0,b.jsx)("div",{className:`alert ${r.ok?"alert-info":"alert-error"} mb-3`,children:r.message}),(0,b.jsxs)("label",{className:"mt-0",children:["Name",(0,b.jsx)("input",{type:"text",name:"name",value:l.name,onChange:t,required:!0})]}),(0,b.jsxs)("label",{children:["Description",(0,b.jsx)("input",{type:"text",name:"description",value:l.description,onChange:t})]}),(0,b.jsxs)("label",{children:["Type",(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.default,{src:`/sources-logos/${z}`,alt:y,width:24,height:24,className:"w-6 h-6"}),(0,b.jsx)("select",{name:"type",value:l.type,onChange:t,required:!0,children:f.map(a=>(0,b.jsx)("option",{value:a,children:a},a))})]})]}),["file","csv","excel","sqlite"].includes(y)&&(0,b.jsxs)("label",{children:["csv"===y?"CSV file path":"excel"===y?"Excel file path":"sqlite"===y?"SQLite file path":"File path",(0,b.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-end",children:[(0,b.jsx)("input",{type:"text",name:"csv"===y?"csv_path":"excel"===y?"excel_path":"sqlite"===y?"sqlite_file_path":"file_path",value:l["csv"===y?"csv_path":"excel"===y?"excel_path":"sqlite"===y?"sqlite_file_path":"file_path"]||"",onChange:t,className:"w-full"}),(0,b.jsx)("button",{type:"button",className:"btn secondary",onClick:u,children:"Browse…"})]})]}),"csv"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Delimiter",(0,b.jsx)("input",{type:"text",name:"csv_delimiter",value:l.csv_delimiter||",",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Encoding",(0,b.jsx)("input",{type:"text",name:"csv_encoding",value:l.csv_encoding||"utf-8",onChange:t})]})})]}),(0,b.jsxs)("label",{children:[(0,b.jsx)("input",{type:"checkbox",name:"csv_header",checked:l.csv_header||!1,onChange:t}),"Has header row"]})]}),"excel"===y&&(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Sheet name",(0,b.jsx)("input",{type:"text",name:"excel_sheet",value:l.excel_sheet||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Header row index",(0,b.jsx)("input",{type:"number",name:"excel_header_row",value:l.excel_header_row||1,onChange:t})]})})]}),"folder"===y&&(0,b.jsxs)("label",{children:["Folder path",(0,b.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-end",children:[(0,b.jsx)("input",{type:"text",name:"folder_path",value:l.folder_path||"",onChange:t}),(0,b.jsx)("button",{type:"button",className:"btn secondary",onClick:v,children:"Browse…"})]})]}),["postgresql","mysql","oracle","mssql"].includes(y)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Host",(0,b.jsx)("input",{type:"text",name:"db_host",value:l.db_host||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Port",(0,b.jsx)("input",{type:"number",name:"db_port",value:l.db_port||"",onChange:t})]})})]}),(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Username",(0,b.jsx)("input",{type:"text",name:"db_username",value:l.db_username||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Password",(0,b.jsx)("input",{type:"password",name:"db_password",value:l.db_password||"",onChange:t})]})})]}),(0,b.jsxs)("label",{children:["Database",(0,b.jsx)("input",{type:"text",name:"db_database",value:l.db_database||"",onChange:t})]}),("postgresql"===y||"oracle"===y)&&(0,b.jsxs)("label",{children:["Schema",(0,b.jsx)("input",{type:"text",name:"db_schema",value:l.db_schema||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Tables or SQL (default '*')",(0,b.jsx)("input",{type:"text",name:"db_table_or_query",value:l.db_table_or_query||"*",onChange:t})]})]}),"mongodb"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Host",(0,b.jsx)("input",{type:"text",name:"mongo_host",value:l.mongo_host||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Port",(0,b.jsx)("input",{type:"number",name:"mongo_port",value:l.mongo_port||"",onChange:t})]})})]}),(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Username",(0,b.jsx)("input",{type:"text",name:"mongo_username",value:l.mongo_username||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Password",(0,b.jsx)("input",{type:"password",name:"mongo_password",value:l.mongo_password||"",onChange:t})]})})]}),(0,b.jsxs)("label",{children:["Database",(0,b.jsx)("input",{type:"text",name:"mongo_database",value:l.mongo_database||"",onChange:t})]})]}),"s3"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{children:["Bucket",(0,b.jsx)("input",{type:"text",name:"s3_bucket",value:l.s3_bucket||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Prefix",(0,b.jsx)("input",{type:"text",name:"s3_prefix",value:l.s3_prefix||"",onChange:t})]}),(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Access key",(0,b.jsx)("input",{type:"text",name:"s3_access_key",value:l.s3_access_key||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Secret key",(0,b.jsx)("input",{type:"password",name:"s3_secret_key",value:l.s3_secret_key||"",onChange:t})]})})]}),(0,b.jsxs)("label",{children:["Region",(0,b.jsx)("input",{type:"text",name:"s3_region",value:l.s3_region||"",onChange:t})]})]}),"gcs"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{children:["Bucket",(0,b.jsx)("input",{type:"text",name:"gcs_bucket",value:l.gcs_bucket||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Prefix",(0,b.jsx)("input",{type:"text",name:"gcs_prefix",value:l.gcs_prefix||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Credentials JSON path",(0,b.jsx)("input",{type:"text",name:"gcs_credentials",value:l.gcs_credentials||"",onChange:t})]})]}),"azure_blob"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{children:["Container",(0,b.jsx)("input",{type:"text",name:"az_container",value:l.az_container||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Prefix",(0,b.jsx)("input",{type:"text",name:"az_prefix",value:l.az_prefix||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Connection string",(0,b.jsx)("input",{type:"password",name:"az_connection",value:l.az_connection||"",onChange:t})]})]}),"hdfs"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{children:["Namenode host",(0,b.jsx)("input",{type:"text",name:"hdfs_namenode",value:l.hdfs_namenode||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Port",(0,b.jsx)("input",{type:"number",name:"hdfs_port",value:l.hdfs_port||"",onChange:t})]}),(0,b.jsxs)("label",{children:["User",(0,b.jsx)("input",{type:"text",name:"hdfs_user",value:l.hdfs_user||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Path",(0,b.jsx)("input",{type:"text",name:"hdfs_path",value:l.hdfs_path||"",onChange:t})]})]}),(0,b.jsxs)("div",{className:"row mb-3",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Visibility",(0,b.jsxs)("select",{name:"visibility",value:l.visibility,onChange:t,children:[(0,b.jsx)("option",{value:"private",children:"Private"}),(0,b.jsx)("option",{value:"internal",children:"Internal"}),(0,b.jsx)("option",{value:"public",children:"Public"})]})]})}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("label",{children:[(0,b.jsx)("input",{type:"checkbox",name:"reference",checked:l.reference||!1,onChange:t}),"Reference"]}),(0,b.jsxs)("label",{children:[(0,b.jsx)("input",{type:"checkbox",name:"sensitive",checked:l.sensitive||!1,onChange:t}),"Sensitive"]})]})]}),(0,b.jsxs)("div",{className:"actions",children:[(0,b.jsx)("button",{type:"button",className:"btn secondary",onClick:w,disabled:p,children:p?"Validating...":"Validate"}),(0,b.jsx)("button",{type:"submit",className:"btn",children:"Save"}),(0,b.jsx)("button",{type:"button",className:"btn secondary",onClick:()=>k.push("/"),children:"Cancel"})]})]})}a.s(["default",()=>i])}];
4
+ - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`))}function aa(a,b,c,d){if(d.syncDynamicErrorWithStack)throw _(a,d.syncDynamicErrorWithStack),new j.StaticGenBailoutError;if(0!==b){if(c.hasSuspenseAboveBody)return;let d=c.dynamicErrors;if(d.length>0){for(let b=0;b<d.length;b++)_(a,d[b]);throw new j.StaticGenBailoutError}if(c.hasDynamicViewport)throw console.error(`Route "${a.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`),new j.StaticGenBailoutError;if(1===b)throw console.error(`Route "${a.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`),new j.StaticGenBailoutError}else if(!1===c.hasAllowedDynamic&&c.hasDynamicMetadata)throw console.error(`Route "${a.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`),new j.StaticGenBailoutError}function ab(a,b,c){if(c.hasSuspenseAboveBody)return[];if(0!==b){let d=c.dynamicErrors;if(d.length>0)return d;if(1===b)return[Object.defineProperty(new q.InvariantError(`Route "${a.route}" did not produce a static shell and Next.js was unable to determine a reason.`),"__NEXT_ERROR_CODE",{value:"E936",enumerable:!1,configurable:!0})]}else if(!1===c.hasAllowedDynamic&&0===c.dynamicErrors.length&&c.dynamicMetadata)return[c.dynamicMetadata];return[]}function ac(a,b){return a.runtimeStagePromise?a.runtimeStagePromise.then(()=>b):b}},44753,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return function a(b){if((0,g.isNextRouterError)(b)||(0,f.isBailoutToCSRError)(b)||(0,i.isDynamicServerError)(b)||(0,h.isDynamicPostpone)(b)||(0,e.isPostpone)(b)||(0,d.isHangingPromiseRejectionError)(b)||(0,h.isPrerenderInterruptedError)(b))throw b;b instanceof Error&&"cause"in b&&a(b.cause)}}});let d=a.r(35710),e=a.r(31101),f=a.r(41997),g=a.r(77747),h=a.r(54110),i=a.r(3326);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},47083,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"unstable_rethrow",{enumerable:!0,get:function(){return d}});let d=a.r(44753).unstable_rethrow;("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},21066,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return f.ReadonlyURLSearchParams},RedirectType:function(){return h.RedirectType},forbidden:function(){return j.forbidden},notFound:function(){return i.notFound},permanentRedirect:function(){return g.permanentRedirect},redirect:function(){return g.redirect},unauthorized:function(){return k.unauthorized},unstable_isUnrecognizedActionError:function(){return m},unstable_rethrow:function(){return l.unstable_rethrow}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(75718),g=a.r(22099),h=a.r(11026),i=a.r(28102),j=a.r(64177),k=a.r(88213),l=a.r(47083);function m(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},74137,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ReadonlyURLSearchParams:function(){return h.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return j.ServerInsertedHTMLContext},forbidden:function(){return l.forbidden},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},unauthorized:function(){return l.unauthorized},unstable_isUnrecognizedActionError:function(){return k.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return l.unstable_rethrow},useParams:function(){return r},usePathname:function(){return p},useRouter:function(){return q},useSearchParams:function(){return o},useSelectedLayoutSegment:function(){return t},useSelectedLayoutSegments:function(){return s},useServerInsertedHTML:function(){return j.useServerInsertedHTML}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(33463)._(a.r(72131)),g=a.r(9270),h=a.r(36313),i=a.r(39118),j=a.r(18341),k=a.r(57997),l=a.r(21066),m=a.r(54110).useDynamicRouteParams,n=a.r(54110).useDynamicSearchParams;function o(){n?.("useSearchParams()");let a=(0,f.useContext)(h.SearchParamsContext);return(0,f.useMemo)(()=>a?new h.ReadonlyURLSearchParams(a):null,[a])}function p(){return m?.("usePathname()"),(0,f.useContext)(h.PathnameContext)}function q(){let a=(0,f.useContext)(g.AppRouterContext);if(null===a)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return a}function r(){return m?.("useParams()"),(0,f.useContext)(h.PathParamsContext)}function s(a="children"){m?.("useSelectedLayoutSegments()");let b=(0,f.useContext)(g.LayoutRouterContext);return b?(0,i.getSelectedLayoutSegmentPath)(b.parentTree,a):null}function t(a="children"){m?.("useSelectedLayoutSegment()"),(0,f.useContext)(h.NavigationPromisesContext);let b=s(a);return(0,i.computeSelectedLayoutSegment)(b,a)}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},50944,(a,b,c)=>{b.exports=a.r(74137)},37433,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(71987);let f=["file","csv","excel","folder","postgresql","mysql","oracle","mssql","sqlite","mongodb","s3","gcs","azure_blob","hdfs"],g={file:"file.svg",csv:"csv.svg",excel:"excel.svg",folder:"folder.svg",postgresql:"postgresql.svg",mysql:"mysql.svg",oracle:"oracle.svg",mssql:"mssql.svg",sqlite:"sqlite.svg",mongodb:"mongodb.svg",s3:"s3.svg",gcs:"gcs.png",azure_blob:"azure_blob.svg",hdfs:"hdfs.svg"};function h(a,b){let c={name:a?.name||"",type:a?.type||b||"file",description:a?.description||"",visibility:a?.visibility||"private",reference:a?.config?.reference||!1,sensitive:a?.config?.sensitive||!1};if(!a?.config)return c;let d=a.config,e=a.type||b||"file",f={...c};return"file"===e&&d.path?f.file_path=d.path:"csv"===e&&d.path?(f.csv_path=d.path,f.csv_delimiter=d.delimiter||",",f.csv_encoding=d.encoding||"utf-8",f.csv_header=d.has_header||!1):"excel"===e&&d.path?(f.excel_path=d.path,f.excel_sheet=d.sheet||"",f.excel_header_row=d.header_row||"1"):"sqlite"===e&&d.file_path?f.sqlite_file_path=d.file_path:"folder"===e&&d.path&&(f.folder_path=d.path),["postgresql","mysql","oracle","mssql"].includes(e)&&(d.host&&(f.db_host=d.host),d.port&&(f.db_port=d.port),d.username&&(f.db_username=d.username),d.password&&(f.db_password=d.password),d.database&&(f.db_database=d.database),d.table_or_query&&(f.db_table_or_query=d.table_or_query),("postgresql"===e||"oracle"===e)&&d.schema&&(f.db_schema=d.schema)),"mongodb"===e&&(d.host&&(f.mongo_host=d.host),d.port&&(f.mongo_port=d.port),d.username&&(f.mongo_username=d.username),d.password&&(f.mongo_password=d.password),d.database&&(f.mongo_database=d.database)),"s3"===e&&(d.bucket&&(f.s3_bucket=d.bucket),d.prefix&&(f.s3_prefix=d.prefix),d.access_key&&(f.s3_access_key=d.access_key),d.secret_key&&(f.s3_secret_key=d.secret_key),d.region&&(f.s3_region=d.region)),"gcs"===e&&(d.bucket&&(f.gcs_bucket=d.bucket),d.prefix&&(f.gcs_prefix=d.prefix),d.credentials&&(f.gcs_credentials=d.credentials)),"azure_blob"===e&&(d.container&&(f.azure_blob_container=d.container),d.prefix&&(f.azure_blob_prefix=d.prefix),d.account_name&&(f.azure_blob_account_name=d.account_name),d.account_key&&(f.azure_blob_account_key=d.account_key)),"hdfs"===e&&(d.path&&(f.hdfs_path=d.path),d.namenode&&(f.hdfs_namenode=d.namenode)),f}function i({source:a,preselectedType:i,onSuccess:j}){let k=(0,d.useRouter)(),[l,m]=(0,c.useState)(()=>h(a,i)),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null);(0,c.useEffect)(()=>{a&&m(h(a,i))},[a,i]);let t=a=>{let{name:b,value:c,type:d}=a.target;if("checkbox"===d){let c=a.target.checked;m(a=>({...a,[b]:c}))}else m(a=>({...a,[b]:c}))},u=async()=>{try{let a=await fetch("/api/sources/pick-file"),b=await a.json();if(b.path){let a="csv"===l.type?"csv_path":"excel"===l.type?"excel_path":"sqlite"===l.type?"sqlite_file_path":"file_path";m(c=>({...c,[a]:b.path}))}}catch{}},v=async()=>{try{let a=await fetch("/api/sources/pick-folder"),b=await a.json();b.path&&m(a=>({...a,folder_path:b.path}))}catch{}},w=async()=>{q(!0),s(null);try{let b,c=new FormData;Object.entries(l).forEach(([a,b])=>{null!=b&&c.append(a,String(b))}),a&&c.append("original_name",a.name);let d=await fetch("/api/sources/validate",{method:"POST",body:c}),e=await d.text();try{b=JSON.parse(e)}catch(a){s({message:`Validation failed: ${d.status} ${d.statusText}. ${e.substring(0,100)}`,ok:!1});return}s({message:b.message||(b.ok?"Valid.":"Invalid."),ok:b.ok||!1})}catch(a){s({message:`Validation failed due to a network error: ${a instanceof Error?a.message:String(a)}`,ok:!1})}finally{q(!1)}},x=async b=>{b.preventDefault(),o(null);try{let b=new FormData;Object.entries(l).forEach(([a,c])=>{null!=c&&("boolean"==typeof c?c&&b.append(a,"on"):b.append(a,String(c)))}),a&&b.append("original_name",a.name);let c=a&&a.name?`/api/sources/edit/${encodeURIComponent(a.name)}`:"/api/sources/add",d=await fetch(c,{method:"POST",body:b});if(d.ok)j();else{let a=await d.text();try{let b=JSON.parse(a);o(b.error||b.message||"Failed to save source")}catch{o("Failed to save source")}}}catch(a){o("Failed to save source")}},y=l.type,z=g[y]||"folder.svg";return(0,b.jsxs)("form",{onSubmit:x,children:[n&&(0,b.jsx)("div",{className:"alert alert-error mb-3",children:n}),r&&(0,b.jsx)("div",{className:`alert ${r.ok?"alert-info":"alert-error"} mb-3`,children:r.message}),(0,b.jsxs)("label",{className:"mt-0",children:["Name",(0,b.jsx)("input",{type:"text",name:"name",value:l.name,onChange:t,required:!0})]}),(0,b.jsxs)("label",{children:["Description",(0,b.jsx)("input",{type:"text",name:"description",value:l.description,onChange:t})]}),(0,b.jsxs)("label",{children:["Type",(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.default,{src:`/sources-logos/${z}`,alt:y,width:24,height:24,className:"w-6 h-6"}),(0,b.jsx)("select",{name:"type",value:l.type,onChange:t,required:!0,children:f.map(a=>(0,b.jsx)("option",{value:a,children:a},a))})]})]}),["file","csv","excel","sqlite"].includes(y)&&(0,b.jsxs)("label",{children:["csv"===y?"CSV file path":"excel"===y?"Excel file path":"sqlite"===y?"SQLite file path":"File path",(0,b.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-end",children:[(0,b.jsx)("input",{type:"text",name:"csv"===y?"csv_path":"excel"===y?"excel_path":"sqlite"===y?"sqlite_file_path":"file_path",value:l["csv"===y?"csv_path":"excel"===y?"excel_path":"sqlite"===y?"sqlite_file_path":"file_path"]||"",onChange:t,className:"w-full"}),(0,b.jsx)("button",{type:"button",className:"btn secondary",onClick:u,children:"Browse…"})]})]}),"csv"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Delimiter",(0,b.jsx)("input",{type:"text",name:"csv_delimiter",value:l.csv_delimiter||",",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Encoding",(0,b.jsx)("input",{type:"text",name:"csv_encoding",value:l.csv_encoding||"utf-8",onChange:t})]})})]}),(0,b.jsxs)("label",{children:[(0,b.jsx)("input",{type:"checkbox",name:"csv_header",checked:l.csv_header||!1,onChange:t}),"Has header row"]})]}),"excel"===y&&(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Sheet name",(0,b.jsx)("input",{type:"text",name:"excel_sheet",value:l.excel_sheet||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Header row index",(0,b.jsx)("input",{type:"number",name:"excel_header_row",value:l.excel_header_row||1,onChange:t})]})})]}),"folder"===y&&(0,b.jsxs)("label",{children:["Folder path",(0,b.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-end",children:[(0,b.jsx)("input",{type:"text",name:"folder_path",value:l.folder_path||"",onChange:t}),(0,b.jsx)("button",{type:"button",className:"btn secondary",onClick:v,children:"Browse…"})]})]}),["postgresql","mysql","oracle","mssql"].includes(y)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Host",(0,b.jsx)("input",{type:"text",name:"db_host",value:l.db_host||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Port",(0,b.jsx)("input",{type:"number",name:"db_port",value:l.db_port||"",onChange:t})]})})]}),(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Username",(0,b.jsx)("input",{type:"text",name:"db_username",value:l.db_username||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Password",(0,b.jsx)("input",{type:"password",name:"db_password",value:l.db_password||"",onChange:t})]})})]}),(0,b.jsxs)("label",{children:["Database",(0,b.jsx)("input",{type:"text",name:"db_database",value:l.db_database||"",onChange:t})]}),("postgresql"===y||"oracle"===y)&&(0,b.jsxs)("label",{children:["Schema",(0,b.jsx)("input",{type:"text",name:"db_schema",value:l.db_schema||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Tables or SQL (default '*')",(0,b.jsx)("input",{type:"text",name:"db_table_or_query",value:l.db_table_or_query||"*",onChange:t})]})]}),"mongodb"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Host",(0,b.jsx)("input",{type:"text",name:"mongo_host",value:l.mongo_host||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Port",(0,b.jsx)("input",{type:"number",name:"mongo_port",value:l.mongo_port||"",onChange:t})]})})]}),(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Username",(0,b.jsx)("input",{type:"text",name:"mongo_username",value:l.mongo_username||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Password",(0,b.jsx)("input",{type:"password",name:"mongo_password",value:l.mongo_password||"",onChange:t})]})})]}),(0,b.jsxs)("label",{children:["Database",(0,b.jsx)("input",{type:"text",name:"mongo_database",value:l.mongo_database||"",onChange:t})]})]}),"s3"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{children:["Bucket",(0,b.jsx)("input",{type:"text",name:"s3_bucket",value:l.s3_bucket||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Prefix",(0,b.jsx)("input",{type:"text",name:"s3_prefix",value:l.s3_prefix||"",onChange:t})]}),(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Access key",(0,b.jsx)("input",{type:"text",name:"s3_access_key",value:l.s3_access_key||"",onChange:t})]})}),(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Secret key",(0,b.jsx)("input",{type:"password",name:"s3_secret_key",value:l.s3_secret_key||"",onChange:t})]})})]}),(0,b.jsxs)("label",{children:["Region",(0,b.jsx)("input",{type:"text",name:"s3_region",value:l.s3_region||"",onChange:t})]})]}),"gcs"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{children:["Bucket",(0,b.jsx)("input",{type:"text",name:"gcs_bucket",value:l.gcs_bucket||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Prefix",(0,b.jsx)("input",{type:"text",name:"gcs_prefix",value:l.gcs_prefix||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Credentials JSON path",(0,b.jsx)("input",{type:"text",name:"gcs_credentials",value:l.gcs_credentials||"",onChange:t})]})]}),"azure_blob"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{children:["Container",(0,b.jsx)("input",{type:"text",name:"az_container",value:l.az_container||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Prefix",(0,b.jsx)("input",{type:"text",name:"az_prefix",value:l.az_prefix||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Connection string",(0,b.jsx)("input",{type:"password",name:"az_connection",value:l.az_connection||"",onChange:t})]})]}),"hdfs"===y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("label",{children:["Namenode host",(0,b.jsx)("input",{type:"text",name:"hdfs_namenode",value:l.hdfs_namenode||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Port",(0,b.jsx)("input",{type:"number",name:"hdfs_port",value:l.hdfs_port||"",onChange:t})]}),(0,b.jsxs)("label",{children:["User",(0,b.jsx)("input",{type:"text",name:"hdfs_user",value:l.hdfs_user||"",onChange:t})]}),(0,b.jsxs)("label",{children:["Path",(0,b.jsx)("input",{type:"text",name:"hdfs_path",value:l.hdfs_path||"",onChange:t})]})]}),(0,b.jsxs)("div",{className:"row mb-3",children:[(0,b.jsx)("div",{children:(0,b.jsxs)("label",{children:["Visibility",(0,b.jsxs)("select",{name:"visibility",value:l.visibility,onChange:t,children:[(0,b.jsx)("option",{value:"private",children:"Private"}),(0,b.jsx)("option",{value:"internal",children:"Internal"}),(0,b.jsx)("option",{value:"public",children:"Public"})]})]})}),(0,b.jsxs)("div",{className:"flex flex-col gap-3 mt-3.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:`relative w-[46px] h-[26px] rounded-full cursor-pointer inline-block transition-colors duration-150 ${l.reference?"bg-primary-500":"bg-gray-200 dark:bg-gray-600"}`,onClick:()=>m(a=>({...a,reference:!a.reference})),children:(0,b.jsx)("div",{className:`absolute top-[3px] w-5 h-5 bg-white rounded-[35%] shadow-sm transition-all duration-150 ${l.reference?"left-[23px]":"left-[3px]"}`})}),(0,b.jsx)("span",{className:"text-gray-900 dark:text-gray-200",children:"Reference"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:`relative w-[46px] h-[26px] rounded-full cursor-pointer inline-block transition-colors duration-150 ${l.sensitive?"bg-primary-500":"bg-gray-200 dark:bg-gray-600"}`,onClick:()=>m(a=>({...a,sensitive:!a.sensitive})),children:(0,b.jsx)("div",{className:`absolute top-[3px] w-5 h-5 bg-white rounded-[35%] shadow-sm transition-all duration-150 ${l.sensitive?"left-[23px]":"left-[3px]"}`})}),(0,b.jsx)("span",{className:"text-gray-900 dark:text-gray-200",children:"Sensitive"})]})]})]}),(0,b.jsxs)("div",{className:"actions",children:[(0,b.jsx)("button",{type:"button",className:"btn secondary",onClick:w,disabled:p,children:p?"Validating...":"Validate"}),(0,b.jsx)("button",{type:"submit",className:"btn",children:"Save"}),(0,b.jsx)("button",{type:"button",className:"btn secondary",onClick:()=>k.push("/"),children:"Cancel"})]})]})}a.s(["default",()=>i])}];
5
5
 
6
6
  //# sourceMappingURL=_cb7b44d6._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[87924,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},9270,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.AppRouterContext},38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},14667,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(71987);function e(){return(0,b.jsxs)(b.Fragment,{children:[[{name:"Flat files",items:[{value:"csv",label:"CSV",icon:"csv.svg",implemented:!0},{value:"json",label:"JSON",icon:"json.png",implemented:!1},{value:"parquet",label:"Parquet",icon:"parquet.svg",implemented:!1},{value:"excel",label:"Excel",icon:"excel.svg",implemented:!0},{value:"file",label:"File",icon:"file.svg",implemented:!0}]},{name:"Relational databases",items:[{value:"clickhouse",label:"ClickHouse",icon:"clickhouse.png",implemented:!1},{value:"ibm_db2",label:"IBM Db2",icon:"ibm-db2.png",implemented:!1},{value:"mariadb",label:"MariaDB",icon:"maria-db.png",implemented:!1},{value:"mssql",label:"Microsoft SQL Server",icon:"mssql.svg",implemented:!0},{value:"mysql",label:"MySQL",icon:"mysql.svg",implemented:!0},{value:"oracle",label:"Oracle",icon:"oracle.svg",implemented:!0},{value:"postgresql",label:"PostgreSQL",icon:"postgresql.svg",implemented:!0},{value:"sap_hana",label:"SAP HANA",icon:"sap-hana.png",implemented:!1},{value:"teradata",label:"Teradata",icon:"teradata.png",implemented:!1},{value:"yugabytedb",label:"YugabyteDB",icon:"yugabyte-db.png",implemented:!1},{value:"cockroachdb",label:"CockroachDB",icon:"cockroach-db.png",implemented:!1},{value:"sqlite",label:"SQLite",icon:"sqlite.svg",implemented:!0}]},{name:"No SQL databases",items:[{value:"elasticsearch",label:"Elasticsearch",icon:"elasticsearch.svg",implemented:!1},{value:"cassandra",label:"Cassandra",icon:"cassandra.svg",implemented:!1},{value:"mongodb",label:"MongoDB",icon:"mongodb.svg",implemented:!0}]},{name:"Data storages",items:[{value:"folder",label:"Folder",icon:"folder.svg",implemented:!0},{value:"s3",label:"Amazon S3",icon:"s3.svg",implemented:!0},{value:"azure_blob",label:"Azure Blob Storage",icon:"azure_blob.svg",implemented:!0},{value:"gcs",label:"Google Cloud Storage",icon:"gcs.png",implemented:!0},{value:"hdfs",label:"HDFS",icon:"hdfs.svg",implemented:!0}]},{name:"Cloud databases",items:[{value:"alloydb",label:"AlloyDB for PostgreSQL",icon:"alloy-db.png",implemented:!1},{value:"aurora",label:"Amazon Aurora",icon:"amazon-rds.png",implemented:!1},{value:"rds_mysql",label:"Amazon RDS for MySQL",icon:"amazon-rds.png",implemented:!1},{value:"rds_postgresql",label:"Amazon RDS for PostgreSQL",icon:"amazon-rds.png",implemented:!1},{value:"rds_sqlserver",label:"Amazon RDS for SQL Server",icon:"amazon-rds.png",implemented:!1},{value:"azure_mysql",label:"Azure Database for MySQL",icon:"azure-database-mysql.png",implemented:!1},{value:"azure_postgresql",label:"Azure Database for PostgreSQL",icon:"azure-database-postgresql.png",implemented:!1},{value:"azure_sql_database",label:"Azure SQL Database",icon:"azure-sql-database.png",implemented:!1},{value:"azure_sql_managed_instance",label:"Azure SQL Managed Instance",icon:"azure-sql-managed-instance.png",implemented:!1},{value:"cloudsql_mysql",label:"Cloud SQL for MySQL",icon:"mysql.svg",implemented:!1},{value:"cloudsql_postgresql",label:"Cloud SQL for PostgreSQL",icon:"postgresql.svg",implemented:!1},{value:"cloudsql_sqlserver",label:"Cloud SQL for SQL Server",icon:"mssql.svg",implemented:!1}]},{name:"SaaS databases",items:[{value:"databricks",label:"Databricks",icon:"databricks.png",implemented:!1},{value:"singlestoredb",label:"SingleStoreDB",icon:"single-store.png",implemented:!1},{value:"snowflake",label:"Snowflake",icon:"snowflake.png",implemented:!1},{value:"starburst",label:"Starburst",icon:"starburst.png",implemented:!1}]},{name:"Data warehouses",items:[{value:"athena",label:"Amazon Athena",icon:"amazon-athena.png",implemented:!1},{value:"redshift",label:"Amazon Redshift",icon:"redshift.png",implemented:!1},{value:"synapse",label:"Azure Synapse Analytics",icon:"azure-synapse-analytics.png",implemented:!1},{value:"bigquery",label:"Google BigQuery",icon:"bigquery.png",implemented:!1}]},{name:"Time series databases",items:[{value:"questdb",label:"QuestDB",icon:"questdb.png",implemented:!1},{value:"timescale",label:"Timescale",icon:"timescale.png",implemented:!1}]}].map(a=>(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsx)("h2",{className:"m-0 mb-2",children:a.name}),(0,b.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(160px,1fr))] gap-4",children:a.items.map(a=>a.implemented?(0,b.jsxs)(c.default,{href:`/sources/add?type=${a.value}`,className:"btn light flex flex-col items-center gap-2.5 p-4",children:[(0,b.jsx)(d.default,{src:`/sources-logos/${a.icon}`,alt:a.label,width:40,height:40,className:"w-10 h-10 object-contain rounded-md",onError:a=>{a.target.src="/sources-logos/file.svg"}}),(0,b.jsx)("span",{className:"font-semibold",children:a.label})]},a.value):(0,b.jsxs)("div",{className:"btn light bg-gray-100 flex flex-col items-center gap-2.5 p-4 opacity-50 cursor-not-allowed",children:[(0,b.jsx)(d.default,{src:`/sources-logos/${a.icon}`,alt:`${a.label} (coming soon)`,title:"Not yet implemented",width:40,height:40,className:"w-10 h-10 object-contain rounded-md",onError:a=>{a.target.src="/sources-logos/file.svg"}}),(0,b.jsx)("span",{className:"font-semibold",children:a.label})]},a.value))})]},a.name)),(0,b.jsxs)("div",{className:"actions mt-4",children:[(0,b.jsx)("a",{className:"btn",href:"mailto:contact@qalita.io?subject=Suggest%20a%20new%20source%20type&body=Hi%20QALITA%20team%2C%0A%0AI%27d%20like%20to%20suggest%20support%20for%20this%20source%20type%3A%20%5Bplease%20describe%5D%0A%0AThanks!",children:"Suggest a new source type"}),(0,b.jsx)(c.default,{className:"btn secondary",href:"/",children:"Cancel"})]})]})}a.s(["default",()=>e])},97909,a=>{"use strict";var b=a.i(87924),c=a.i(72850),d=a.i(783),e=a.i(14667);function f(){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c.default,{}),(0,b.jsxs)("div",{className:"container-form",children:[(0,b.jsx)("h1",{children:"Select a source type"}),(0,b.jsx)("div",{className:"card",children:(0,b.jsx)(e.default,{})})]}),(0,b.jsx)(d.default,{})]})}a.s(["default",()=>f])}];
2
+
3
+ //# sourceMappingURL=_d44c43ed._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[49309,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246);function e(){{let a=process.env.HOSTNAME||"localhost",b=process.env.PORT||"7070";return`http://${a}:${b}/api`}}async function f(){let a=await fetch(`${e()}/worker/status`);if(!a.ok){let b=await a.text();throw Error(`Failed to get worker status: ${a.status} - ${b.substring(0,100)}`)}let b=a.headers.get("content-type")||"";if(!b.includes("application/json")){let c=await a.text();throw Error(`Expected JSON but got ${b}: ${c.substring(0,100)}`)}return a.json()}async function g(){return(await fetch(`${e()}/worker/start`,{method:"POST"})).json()}async function h(){return(await fetch(`${e()}/worker/stop`,{method:"POST"})).json()}async function i(){await fetch(`${e()}/validate`,{method:"POST"})}async function j(){await fetch(`${e()}/push`,{method:"POST"})}async function k(a){let b=new FormData;b.append("pack_dir",a);let c=await fetch(`${e()}/pack/push`,{method:"POST",body:b});if(!c.ok){let a=await c.text();throw Error(`Failed to push pack: ${c.status} - ${a.substring(0,100)}`)}return c.json()}function l(){let[a,d]=(0,c.useState)(!1),[e,i]=(0,c.useState)(!0);(0,c.useEffect)(()=>{j();let a=setInterval(j,2e3);return()=>clearInterval(a)},[]);let j=async()=>{try{let a=await f();d(a.running||!1),i(!1)}catch(a){console.error("Failed to get worker status:",a),i(!1)}},k=async()=>{try{a?await h():await g(),await j()}catch(a){console.error("Failed to toggle worker:",a)}};return e?(0,b.jsx)("span",{className:"muted -mt-[13px]",children:"(loading...)"}):(0,b.jsxs)("div",{className:"flex gap-5 items-center",children:[(0,b.jsx)("div",{id:"agent_switch",className:`-mt-[11px] relative w-[46px] h-[26px] rounded-full cursor-pointer inline-block transition-colors duration-150 ${a?"bg-green-600":"bg-gray-200"}`,onClick:k,children:(0,b.jsx)("div",{id:"agent_knob",className:`absolute top-[3px] w-5 h-5 bg-white rounded-[35%] shadow-sm transition-all duration-150 ${a?"left-[23px]":"left-[3px]"}`})}),(0,b.jsxs)("span",{className:"muted -mt-[13px]",children:["(",a?"running":"stopped",")"]})]})}var m=a.i(71987);function n({isOpen:a,onClose:c,onConfirm:d,title:e,message:f,itemName:g}){return a?(0,b.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",onClick:c,children:(0,b.jsxs)("div",{className:"card min-w-[400px] max-w-[90%] bg-white p-6",onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("h2",{className:"mt-0",children:e}),(0,b.jsx)("p",{children:f}),g&&(0,b.jsx)("p",{className:"font-bold text-danger",children:g}),(0,b.jsxs)("div",{className:"actions mt-5 justify-end",children:[(0,b.jsx)("button",{className:"btn secondary",onClick:c,type:"button",children:"Cancel"}),(0,b.jsx)("button",{className:"btn danger",onClick:d,type:"button",children:"Delete"})]})]})}):null}let o={file:"file.svg",csv:"csv.svg",excel:"excel.svg",folder:"folder.svg",postgresql:"postgresql.svg",mysql:"mysql.svg",oracle:"oracle.svg",mssql:"mssql.svg",sqlite:"sqlite.svg",mongodb:"mongodb.svg",s3:"s3.svg",gcs:"gcs.png",azure_blob:"azure_blob.svg",hdfs:"hdfs.svg"};function p({sources:a,platformUrl:e}){let[f,g]=(0,c.useState)({isOpen:!1,sourceName:null}),h=async()=>{if(f.sourceName)try{await fetch(`/api/sources/delete/${encodeURIComponent(f.sourceName)}`,{method:"POST"}),window.location.reload()}catch(a){console.error("Failed to delete source:",a)}finally{g({isOpen:!1,sourceName:null})}};return(0,b.jsxs)("div",{className:"card",children:[(0,b.jsxs)("table",{children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Name"}),(0,b.jsx)("th",{children:"Type"}),(0,b.jsx)("th",{children:"Visibility"}),(0,b.jsx)("th",{children:"Check"}),(0,b.jsx)("th",{})]})}),(0,b.jsx)("tbody",{children:a.map(a=>{let c=o[a.type]||"folder.svg",f=(a.visibility||"").toLowerCase(),h=(a.validate||"").toLowerCase();return(0,b.jsxs)("tr",{children:[(0,b.jsxs)("td",{children:[a.id&&e?(0,b.jsx)("a",{href:`${e}/home/data-engineering/sources/${a.id}`,target:"_blank",rel:"noopener noreferrer",children:a.name}):a.name,a.description&&(0,b.jsx)("div",{className:"subtle",children:a.description})]}),(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(m.default,{src:`/sources-logos/${c}`,alt:a.type,width:20,height:20,className:"h-5 max-w-[30px] rounded"}),(0,b.jsx)("span",{children:a.type})]})}),(0,b.jsxs)("td",{children:["private"===f&&(0,b.jsxs)("span",{title:"private",className:"badge badge-private",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("rect",{x:"3",y:"9",width:"14",height:"8",rx:"2",stroke:"#374151",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M6 9V7a4 4 0 1 1 8 0v2",stroke:"#374151",strokeWidth:"2",fill:"none"})]}),"Private"]}),"internal"===f&&(0,b.jsxs)("span",{title:"internal",className:"badge badge-internal",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("rect",{x:"3",y:"6",width:"14",height:"10",rx:"2",stroke:"#0ea5e9",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M7 6V4h6v2",stroke:"#0ea5e9",strokeWidth:"2"})]}),"Internal"]}),"public"===f&&(0,b.jsxs)("span",{title:"public",className:"badge badge-public",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"#16a34a",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M2 10h16M10 2a12 12 0 0 1 0 16M10 2a12 12 0 0 0 0 16",stroke:"#16a34a",strokeWidth:"2"})]}),"Public"]}),!["private","internal","public"].includes(f)&&(0,b.jsx)("span",{className:"muted",children:a.visibility})]}),(0,b.jsxs)("td",{children:["valid"===h&&(0,b.jsxs)("span",{title:"valid",className:"badge badge-valid",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("circle",{cx:"10",cy:"10",r:"9",stroke:"#059669",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M6 10.5l2.5 2.5L14 7.5",stroke:"#059669",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Reachable"]}),"invalid"===h&&(0,b.jsxs)("span",{title:"invalid",className:"badge badge-invalid",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("circle",{cx:"10",cy:"10",r:"9",stroke:"#b91c1c",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"#b91c1c",strokeWidth:"2",strokeLinecap:"round"})]}),"Unreachable"]}),!["valid","invalid"].includes(h)&&(0,b.jsx)("span",{className:"muted",children:a.validate||""})]}),(0,b.jsx)("td",{className:"muted"}),(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"actions",children:[a.id?(0,b.jsx)(d.default,{className:"btn secondary",href:`/sources/edit/${encodeURIComponent(a.id)}`,children:"Edit"}):(0,b.jsx)("span",{className:"btn secondary opacity-50 cursor-not-allowed",title:"Source ID not available",children:"Edit"}),(0,b.jsx)("button",{className:"btn danger",type:"button",onClick:()=>{g({isOpen:!0,sourceName:a.name})},children:"Delete"})]})})]},a.name)})})]}),(0,b.jsx)(n,{isOpen:f.isOpen,onClose:()=>{g({isOpen:!1,sourceName:null})},onConfirm:h,title:"Delete Source",message:"Are you sure you want to delete this source? This action cannot be undone.",itemName:f.sourceName||void 0})]})}function q({initialData:a}){let[e,f]=(0,c.useState)(null),g=async()=>{try{await i(),f({message:"Validation completed",level:"info"}),setTimeout(()=>window.location.reload(),1e3)}catch(a){f({message:"Validation failed",level:"error"})}},h=async()=>{try{await j(),f({message:"Push completed",level:"info"}),setTimeout(()=>window.location.reload(),1e3)}catch(a){f({message:"Push failed",level:"error"})}},m=async a=>{a.preventDefault();let b=new FormData(a.currentTarget).get("pack_dir");if(!b)return void f({message:"Please select a pack folder",level:"error"});try{let a=await k(b);f({message:a.message||(a.ok?"Pack pushed successfully":"Pack push failed"),level:a.level||(a.ok?"info":"error")}),a.ok&&setTimeout(()=>window.location.reload(),1e3)}catch(a){f({message:`Pack push failed: ${a instanceof Error?a.message:"Unknown error"}`,level:"error"})}};return(0,b.jsxs)("div",{className:"container mt-3",children:[e&&(0,b.jsx)("div",{className:`alert ${"error"===e.level?"alert-error":"alert-info"} mb-3`,children:e.message}),(0,b.jsxs)("div",{className:"grid",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-start gap-3 mb-3",children:[(0,b.jsx)("h2",{className:"m-0",children:"Sources"}),(0,b.jsxs)("div",{className:"actions",children:[(0,b.jsx)(d.default,{className:"btn",href:"/sources/add",children:"Add source"}),(0,b.jsx)("form",{className:"inline",onSubmit:a=>{a.preventDefault(),g()},children:(0,b.jsx)("button",{className:"btn secondary",type:"submit",children:"Validate"})}),(0,b.jsx)("form",{className:"inline",onSubmit:a=>{a.preventDefault(),h()},children:(0,b.jsx)("button",{className:"btn secondary",type:"submit",children:"Push"})})]})]}),(0,b.jsx)(p,{sources:a.sources,platformUrl:a.platform_url})]}),(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("h2",{children:"Agent"}),(0,b.jsx)(l,{})]}),(0,b.jsx)("div",{className:"card mb-6",children:a.agent_conf?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"grid grid-cols-[160px_1fr] gap-y-2 gap-x-3",children:[(0,b.jsx)("div",{className:"muted",children:"Name"}),(0,b.jsx)("div",{"data-agent-name":!0,children:a.platform_url?(0,b.jsx)("a",{href:`${a.platform_url}/home/data-engineering/agents/?agent=${a.agent_conf.name||""}`,target:"_blank",rel:"noopener noreferrer",children:a.agent_conf.name||""}):a.agent_conf.name||""}),(0,b.jsx)("div",{className:"muted",children:"Mode"}),(0,b.jsx)("div",{"data-agent-mode":!0,children:a.agent_conf.mode||""}),(0,b.jsx)("div",{className:"muted",children:"Backend URL"}),(0,b.jsx)("div",{"data-agent-url":!0,children:(0,b.jsx)("a",{href:a.agent_conf.url||"",target:"_blank",rel:"noopener noreferrer",children:a.agent_conf.url||""})}),(0,b.jsx)("div",{className:"muted",children:"Agent ID"}),(0,b.jsx)("div",{"data-agent-id":!0,children:a.agent_conf.agent_id||""})]}),(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("div",{className:"muted mb-1.5",children:"Agent Runs"}),a.agent_runs_page&&a.agent_runs_page.length>0?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("ul",{className:"m-0 pl-[18px]",children:a.agent_runs_page.map(a=>(0,b.jsxs)("li",{children:[(0,b.jsx)("span",{className:"muted",children:a.when})," —"," ",(0,b.jsx)("code",{children:(0,b.jsx)("a",{href:`/api/worker/run/${a.name}`,onClick:async b=>{b.preventDefault();try{await fetch(`/api/worker/run/${a.name}`)}catch(a){console.error("Failed to open agent run:",a)}},className:"cursor-pointer",children:a.name})})]},a.name))}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,b.jsxs)("div",{className:"muted",children:["Showing ",a.runs_start,"–",a.runs_end," of ",a.runs_total]}),(0,b.jsxs)("div",{className:"actions flex gap-2",children:[a.runs_has_prev?(0,b.jsx)(d.default,{className:"btn secondary",href:`/?runs_page=${a.runs_page-1}&runs_per_page=${a.runs_per_page}`,children:"Prev"}):(0,b.jsx)("button",{className:"btn secondary",disabled:!0,children:"Prev"}),a.runs_has_next?(0,b.jsx)(d.default,{className:"btn secondary",href:`/?runs_page=${a.runs_page+1}&runs_per_page=${a.runs_per_page}`,children:"Next"}):(0,b.jsx)("button",{className:"btn secondary",disabled:!0,children:"Next"})]})]})]}):(0,b.jsx)("div",{className:"muted",children:"No runs found."})]})]}):(0,b.jsx)("div",{className:"muted",children:'No agent configuration found. Use "qalita agent login" to configure.'})}),a.platform_url&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{children:"Pack"}),(0,b.jsx)("div",{className:"card mb-6",children:(0,b.jsxs)("form",{onSubmit:m,children:[(0,b.jsx)("label",{className:"mt-0",htmlFor:"pack_dir",children:"Pack folder"}),(0,b.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-center",children:[(0,b.jsx)("input",{id:"pack_dir",name:"pack_dir",type:"text",placeholder:"/path/to/your_pack"}),(0,b.jsx)("button",{type:"button",className:"btn secondary mt-1.5",id:"browse_pack",onClick:async()=>{try{let a=await fetch("/api/sources/pick-folder"),b=await a.json();if(b.path){let a=document.getElementById("pack_dir");a&&(a.value=b.path)}}catch(a){console.error("Failed to pick folder:",a)}},children:"Browse…"})]}),(0,b.jsx)("div",{className:"actions mt-3",children:(0,b.jsx)("button",{className:"btn",type:"submit",children:"Push Pack"})})]})})]})]})]})]})}a.s(["default",()=>q],49309)}];
1
+ module.exports=[49309,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246);function e(){{let a=process.env.HOSTNAME||"localhost",b=process.env.PORT||"7070";return`http://${a}:${b}/api`}}async function f(){let a=await fetch(`${e()}/worker/status`);if(!a.ok){let b=await a.text();throw Error(`Failed to get worker status: ${a.status} - ${b.substring(0,100)}`)}let b=a.headers.get("content-type")||"";if(!b.includes("application/json")){let c=await a.text();throw Error(`Expected JSON but got ${b}: ${c.substring(0,100)}`)}return a.json()}async function g(){return(await fetch(`${e()}/worker/start`,{method:"POST"})).json()}async function h(){return(await fetch(`${e()}/worker/stop`,{method:"POST"})).json()}async function i(){await fetch(`${e()}/validate`,{method:"POST"})}async function j(){await fetch(`${e()}/push`,{method:"POST"})}async function k(a){let b=new FormData;b.append("pack_dir",a);let c=await fetch(`${e()}/pack/push`,{method:"POST",body:b});if(!c.ok){let a=await c.text();throw Error(`Failed to push pack: ${c.status} - ${a.substring(0,100)}`)}return c.json()}function l(){let[a,d]=(0,c.useState)(!1),[e,i]=(0,c.useState)(!0);(0,c.useEffect)(()=>{j();let a=setInterval(j,2e3);return()=>clearInterval(a)},[]);let j=async()=>{try{let a=await f();d(a.running||!1)}catch{}finally{i(!1)}},k=async()=>{try{a?await h():await g(),await j()}catch{}};return e?(0,b.jsx)("span",{className:"muted -mt-[13px]",children:"(loading...)"}):(0,b.jsxs)("div",{className:"flex gap-5 items-center",children:[(0,b.jsx)("div",{id:"worker_switch",className:`-mt-[11px] relative w-[46px] h-[26px] rounded-full cursor-pointer inline-block transition-colors duration-150 ${a?"bg-green-600":"bg-gray-200"}`,onClick:k,children:(0,b.jsx)("div",{id:"worker_knob",className:`absolute top-[3px] w-5 h-5 bg-white rounded-[35%] shadow-sm transition-all duration-150 ${a?"left-[23px]":"left-[3px]"}`})}),(0,b.jsxs)("span",{className:"muted -mt-[13px]",children:["(",a?"running":"stopped",")"]})]})}var m=a.i(71987);function n({isOpen:a,onClose:c,onConfirm:d,title:e,message:f,itemName:g}){return a?(0,b.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",onClick:c,children:(0,b.jsxs)("div",{className:"card min-w-[400px] max-w-[90%] bg-white dark:bg-gray-800 p-6",onClick:a=>a.stopPropagation(),children:[(0,b.jsx)("h2",{className:"mt-0 dark:text-white",children:e}),(0,b.jsx)("p",{className:"dark:text-gray-300",children:f}),g&&(0,b.jsx)("p",{className:"font-bold text-danger",children:g}),(0,b.jsxs)("div",{className:"actions mt-5 justify-end",children:[(0,b.jsx)("button",{className:"btn secondary",onClick:c,type:"button",children:"Cancel"}),(0,b.jsx)("button",{className:"btn danger",onClick:d,type:"button",children:"Delete"})]})]})}):null}let o={file:"file.svg",csv:"csv.svg",excel:"excel.svg",folder:"folder.svg",postgresql:"postgresql.svg",mysql:"mysql.svg",oracle:"oracle.svg",mssql:"mssql.svg",sqlite:"sqlite.svg",mongodb:"mongodb.svg",s3:"s3.svg",gcs:"gcs.png",azure_blob:"azure_blob.svg",hdfs:"hdfs.svg"};function p({sources:a,platformUrl:e}){let[f,g]=(0,c.useState)({isOpen:!1,sourceName:null}),h=async()=>{if(f.sourceName)try{await fetch(`/api/sources/delete/${encodeURIComponent(f.sourceName)}`,{method:"POST"}),window.location.reload()}catch{}finally{g({isOpen:!1,sourceName:null})}};return(0,b.jsxs)("div",{className:"card",children:[(0,b.jsxs)("table",{children:[(0,b.jsx)("thead",{children:(0,b.jsxs)("tr",{children:[(0,b.jsx)("th",{children:"Name"}),(0,b.jsx)("th",{children:"Type"}),(0,b.jsx)("th",{children:"Visibility"}),(0,b.jsx)("th",{children:"Check"}),(0,b.jsx)("th",{})]})}),(0,b.jsx)("tbody",{children:a.map(a=>{let c=o[a.type]||"folder.svg",f=(a.visibility||"").toLowerCase(),h=(a.validate||"").toLowerCase();return(0,b.jsxs)("tr",{children:[(0,b.jsxs)("td",{className:"dark:text-gray-200",children:[a.id&&e?(0,b.jsx)("a",{href:`${e}/home/data-engineering/sources/${a.id}`,target:"_blank",rel:"noopener noreferrer",children:a.name}):a.name,a.description&&(0,b.jsx)("div",{className:"subtle",children:a.description})]}),(0,b.jsx)("td",{className:"dark:text-gray-200",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(m.default,{src:`/sources-logos/${c}`,alt:a.type,width:20,height:20,className:"h-5 max-w-[30px] rounded"}),(0,b.jsx)("span",{children:a.type})]})}),(0,b.jsxs)("td",{children:["private"===f&&(0,b.jsxs)("span",{title:"private",className:"badge badge-private dark:text-gray-400",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("rect",{x:"3",y:"9",width:"14",height:"8",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M6 9V7a4 4 0 1 1 8 0v2",stroke:"currentColor",strokeWidth:"2",fill:"none"})]}),"Private"]}),"internal"===f&&(0,b.jsxs)("span",{title:"internal",className:"badge badge-internal",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("rect",{x:"3",y:"6",width:"14",height:"10",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M7 6V4h6v2",stroke:"currentColor",strokeWidth:"2"})]}),"Internal"]}),"public"===f&&(0,b.jsxs)("span",{title:"public",className:"badge badge-public",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"currentColor",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M2 10h16M10 2a12 12 0 0 1 0 16M10 2a12 12 0 0 0 0 16",stroke:"currentColor",strokeWidth:"2"})]}),"Public"]}),!["private","internal","public"].includes(f)&&(0,b.jsx)("span",{className:"muted",children:a.visibility})]}),(0,b.jsxs)("td",{children:["valid"===h&&(0,b.jsxs)("span",{title:"valid",className:"badge badge-valid",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M6 10.5l2.5 2.5L14 7.5",stroke:"currentColor",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Reachable"]}),"invalid"===h&&(0,b.jsxs)("span",{title:"invalid",className:"badge badge-invalid",children:[(0,b.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2"}),(0,b.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),"Unreachable"]}),!["valid","invalid"].includes(h)&&(0,b.jsx)("span",{className:"muted",children:a.validate||""})]}),(0,b.jsx)("td",{className:"muted"}),(0,b.jsx)("td",{children:(0,b.jsxs)("div",{className:"actions",children:[a.id?(0,b.jsx)(d.default,{className:"btn secondary",href:`/sources/edit/${encodeURIComponent(a.id)}`,children:"Edit"}):(0,b.jsx)("span",{className:"btn secondary opacity-50 cursor-not-allowed",title:"Source ID not available",children:"Edit"}),(0,b.jsx)("button",{className:"btn danger",type:"button",onClick:()=>{g({isOpen:!0,sourceName:a.name})},children:"Delete"})]})})]},a.name)})})]}),(0,b.jsx)(n,{isOpen:f.isOpen,onClose:()=>{g({isOpen:!1,sourceName:null})},onConfirm:h,title:"Delete Source",message:"Are you sure you want to delete this source? This action cannot be undone.",itemName:f.sourceName||void 0})]})}function q({initialData:a}){let[e,f]=(0,c.useState)(null),g=async()=>{try{await i(),f({message:"Validation completed",level:"info"}),setTimeout(()=>window.location.reload(),1e3)}catch(a){f({message:"Validation failed",level:"error"})}},h=async()=>{try{await j(),f({message:"Push completed",level:"info"}),setTimeout(()=>window.location.reload(),1e3)}catch(a){f({message:"Push failed",level:"error"})}},m=async a=>{a.preventDefault();let b=new FormData(a.currentTarget).get("pack_dir");if(!b)return void f({message:"Please select a pack folder",level:"error"});try{let a=await k(b);f({message:a.message||(a.ok?"Pack pushed successfully":"Pack push failed"),level:a.level||(a.ok?"info":"error")}),a.ok&&setTimeout(()=>window.location.reload(),1e3)}catch(a){f({message:`Pack push failed: ${a instanceof Error?a.message:"Unknown error"}`,level:"error"})}};return(0,b.jsxs)("div",{className:"container mt-3",children:[e&&(0,b.jsx)("div",{className:`alert ${"error"===e.level?"alert-error":"alert-info"} mb-3`,children:e.message}),(0,b.jsxs)("div",{className:"grid",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-start gap-3 mb-3",children:[(0,b.jsx)("h2",{className:"m-0 dark:text-white",children:"Sources"}),(0,b.jsxs)("div",{className:"actions",children:[(0,b.jsx)(d.default,{className:"btn",href:"/sources/add",children:"Add source"}),(0,b.jsx)("form",{className:"inline",onSubmit:a=>{a.preventDefault(),g()},children:(0,b.jsx)("button",{className:"btn secondary",type:"submit",children:"Validate"})}),(0,b.jsx)("form",{className:"inline",onSubmit:a=>{a.preventDefault(),h()},children:(0,b.jsx)("button",{className:"btn secondary",type:"submit",children:"Push"})})]})]}),(0,b.jsx)(p,{sources:a.sources,platformUrl:a.platform_url})]}),(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,b.jsx)("h2",{className:"dark:text-white",children:"Worker"}),(0,b.jsx)(l,{})]}),(0,b.jsx)("div",{className:"card mb-6",children:a.worker_conf?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"grid grid-cols-[160px_1fr] gap-y-2 gap-x-3",children:[(0,b.jsx)("div",{className:"muted",children:"Name"}),(0,b.jsx)("div",{"data-worker-name":!0,className:"dark:text-gray-200",children:a.platform_url?(0,b.jsx)("a",{href:`${a.platform_url}/home/data-engineering/workers/?worker=${a.worker_conf.name||""}`,target:"_blank",rel:"noopener noreferrer",children:a.worker_conf.name||""}):a.worker_conf.name||""}),(0,b.jsx)("div",{className:"muted",children:"Mode"}),(0,b.jsx)("div",{"data-worker-mode":!0,className:"dark:text-gray-200",children:a.worker_conf.mode||""}),(0,b.jsx)("div",{className:"muted",children:"Backend URL"}),(0,b.jsx)("div",{"data-worker-url":!0,className:"dark:text-gray-200",children:(0,b.jsx)("a",{href:a.worker_conf.url||"",target:"_blank",rel:"noopener noreferrer",children:a.worker_conf.url||""})}),(0,b.jsx)("div",{className:"muted",children:"Worker ID"}),(0,b.jsx)("div",{"data-worker-id":!0,className:"dark:text-gray-200",children:a.worker_conf.worker_id||""})]}),(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("div",{className:"muted mb-1.5",children:"Worker Runs"}),a.worker_runs_page&&a.worker_runs_page.length>0?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("ul",{className:"m-0 pl-[18px] dark:text-gray-200",children:a.worker_runs_page.map(a=>(0,b.jsxs)("li",{children:[(0,b.jsx)("span",{className:"muted",children:a.when})," —"," ",(0,b.jsx)("code",{className:"dark:bg-gray-700 dark:text-gray-200 px-1 rounded",children:(0,b.jsx)("a",{href:`/api/worker/run/${a.name}`,onClick:async b=>{b.preventDefault();try{await fetch(`/api/worker/run/${a.name}`)}catch{}},className:"cursor-pointer",children:a.name})})]},a.name))}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,b.jsxs)("div",{className:"muted",children:["Showing ",a.runs_start,"–",a.runs_end," of ",a.runs_total]}),(0,b.jsxs)("div",{className:"actions flex gap-2",children:[a.runs_has_prev?(0,b.jsx)(d.default,{className:"btn secondary",href:`/?runs_page=${a.runs_page-1}&runs_per_page=${a.runs_per_page}`,children:"Prev"}):(0,b.jsx)("button",{className:"btn secondary",disabled:!0,children:"Prev"}),a.runs_has_next?(0,b.jsx)(d.default,{className:"btn secondary",href:`/?runs_page=${a.runs_page+1}&runs_per_page=${a.runs_per_page}`,children:"Next"}):(0,b.jsx)("button",{className:"btn secondary",disabled:!0,children:"Next"})]})]})]}):(0,b.jsx)("div",{className:"muted",children:"No runs found."})]})]}):(0,b.jsx)("div",{className:"muted",children:'No worker configuration found. Use "qalita worker login" to configure.'})}),a.platform_url&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h2",{className:"dark:text-white",children:"Pack"}),(0,b.jsx)("div",{className:"card mb-6",children:(0,b.jsxs)("form",{onSubmit:m,children:[(0,b.jsx)("label",{className:"mt-0 mb-2",htmlFor:"pack_dir",children:"Pack folder"}),(0,b.jsxs)("div",{className:"flex gap-2 items-stretch",children:[(0,b.jsx)("input",{id:"pack_dir",name:"pack_dir",type:"text",placeholder:"/path/to/your_pack",className:"flex-1 !mt-0 h-[38px]"}),(0,b.jsx)("button",{type:"button",className:"btn secondary h-[38px] shrink-0",id:"browse_pack",onClick:async()=>{try{let a=await fetch("/api/sources/pick-folder"),b=await a.json();if(b.path){let a=document.getElementById("pack_dir");a&&(a.value=b.path)}}catch{}},children:"Browse…"})]}),(0,b.jsx)("div",{className:"flex justify-end mt-4",children:(0,b.jsx)("button",{className:"btn h-[38px]",type:"submit",children:"Push Pack"})})]})})]})]})]})]})}a.s(["default",()=>q],49309)}];
2
2
 
3
3
  //# sourceMappingURL=components_DashboardContent_tsx_c3635665._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[87924,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},9270,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.AppRouterContext},38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM}];
2
+
3
+ //# sourceMappingURL=node_modules_next_dist_server_route-modules_app-page_vendored_a443a6bf._.js.map
@@ -8,11 +8,11 @@ globalThis.__BUILD_MANIFEST = {
8
8
  ],
9
9
  "lowPriorityFiles": [],
10
10
  "rootMainFiles": [
11
- "static/chunks/711d597b816a80c1.js",
12
- "static/chunks/236f7e5abd6f09ff.js",
13
- "static/chunks/30ea11065999f7ac.js",
14
- "static/chunks/4dd28bc3f722184a.js",
15
- "static/chunks/turbopack-25186fc8e1264445.js"
11
+ "static/chunks/e6ce59ba40b863f2.js",
12
+ "static/chunks/89ba62a8ba9b79ce.js",
13
+ "static/chunks/bdc8a8e7721f5675.js",
14
+ "static/chunks/ec4b1f1e3cd3ae43.js",
15
+ "static/chunks/turbopack-d21156d03715fafa.js"
16
16
  ]
17
17
  };
18
18
  globalThis.__BUILD_MANIFEST.lowPriorityFiles = [
@@ -1 +1 @@
1
- <!DOCTYPE html><!--N9MqNrf23ZZkbbSW2aXkt--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/1107bdca1eff6d34.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/711d597b816a80c1.js"/><script src="/_next/static/chunks/236f7e5abd6f09ff.js" async=""></script><script src="/_next/static/chunks/30ea11065999f7ac.js" async=""></script><script src="/_next/static/chunks/4dd28bc3f722184a.js" async=""></script><script src="/_next/static/chunks/turbopack-25186fc8e1264445.js" async=""></script><script src="/_next/static/chunks/ff1a16fafef87110.js" async=""></script><script src="/_next/static/chunks/7340adf74ff47ec0.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>QALITA CLI</title><meta name="description" content="QALITA Platform Command Line Interface"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="root-layout"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/711d597b816a80c1.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"default\"]\n:HL[\"/_next/static/chunks/1107bdca1eff6d34.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"N9MqNrf23ZZkbbSW2aXkt\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/1107bdca1eff6d34.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/ff1a16fafef87110.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/7340adf74ff47ec0.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"root-layout\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[[\"$\",\"title\",\"0\",{\"children\":\"QALITA CLI\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"QALITA Platform Command Line Interface\"}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><!--8__jz_coq8Cacgz6IFGzi--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/e4c3a252774ab7fd.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/e6ce59ba40b863f2.js"/><script src="/_next/static/chunks/89ba62a8ba9b79ce.js" async=""></script><script src="/_next/static/chunks/bdc8a8e7721f5675.js" async=""></script><script src="/_next/static/chunks/ec4b1f1e3cd3ae43.js" async=""></script><script src="/_next/static/chunks/turbopack-d21156d03715fafa.js" async=""></script><script src="/_next/static/chunks/e0df86cbf44bbf9f.js" async=""></script><script src="/_next/static/chunks/0b082245f106d665.js" async=""></script><link rel="preload" href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&amp;display=swap" as="style"/><meta name="robots" content="noindex"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><title>404: This page could not be found.</title><title>QALITA CLI</title><meta name="description" content="QALITA Platform Command Line Interface"/><link href="https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&amp;display=swap" rel="stylesheet"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="root-layout"><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","light",null,["light","dark"],null,false,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/e6ce59ba40b863f2.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[63178,[\"/_next/static/chunks/e0df86cbf44bbf9f.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"ThemeProvider\"]\n3:I[39756,[\"/_next/static/chunks/e0df86cbf44bbf9f.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"default\"]\n4:I[37457,[\"/_next/static/chunks/e0df86cbf44bbf9f.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"default\"]\n5:I[97367,[\"/_next/static/chunks/e0df86cbf44bbf9f.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/e0df86cbf44bbf9f.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/e0df86cbf44bbf9f.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/e0df86cbf44bbf9f.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"default\"]\n:HL[\"/_next/static/chunks/e4c3a252774ab7fd.css\",\"style\"]\n:HL[\"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900\u0026display=swap\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"8__jz-coq8Cacgz6IFGzi\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/e4c3a252774ab7fd.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/e0df86cbf44bbf9f.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0b082245f106d665.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.googleapis.com\"}],[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.gstatic.com\",\"crossOrigin\":\"anonymous\"}],[\"$\",\"link\",null,{\"href\":\"https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900\u0026display=swap\",\"rel\":\"stylesheet\"}]]}],[\"$\",\"body\",null,{\"className\":\"root-layout\",\"children\":[\"$\",\"$L2\",null,{\"attribute\":\"class\",\"defaultTheme\":\"light\",\"enableSystem\":false,\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"7:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"QALITA CLI\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"QALITA Platform Command Line Interface\"}]]\n"])</script></body></html>
@@ -1,2 +1,2 @@
1
- <!DOCTYPE html><!--N9MqNrf23ZZkbbSW2aXkt--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/711d597b816a80c1.js"/><script src="/_next/static/chunks/236f7e5abd6f09ff.js" async=""></script><script src="/_next/static/chunks/30ea11065999f7ac.js" async=""></script><script src="/_next/static/chunks/4dd28bc3f722184a.js" async=""></script><script src="/_next/static/chunks/turbopack-25186fc8e1264445.js" async=""></script><script src="/_next/static/chunks/ff1a16fafef87110.js" async=""></script><script src="/_next/static/chunks/7340adf74ff47ec0.js" async=""></script><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
- @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/711d597b816a80c1.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/7340adf74ff47ec0.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"N9MqNrf23ZZkbbSW2aXkt\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/ff1a16fafef87110.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/7340adf74ff47ec0.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><!--8__jz_coq8Cacgz6IFGzi--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/e6ce59ba40b863f2.js"/><script src="/_next/static/chunks/89ba62a8ba9b79ce.js" async=""></script><script src="/_next/static/chunks/bdc8a8e7721f5675.js" async=""></script><script src="/_next/static/chunks/ec4b1f1e3cd3ae43.js" async=""></script><script src="/_next/static/chunks/turbopack-d21156d03715fafa.js" async=""></script><script src="/_next/static/chunks/ff1a16fafef87110.js" async=""></script><script src="/_next/static/chunks/0b082245f106d665.js" async=""></script><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
+ @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/e6ce59ba40b863f2.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/0b082245f106d665.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"8__jz-coq8Cacgz6IFGzi\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/ff1a16fafef87110.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/0b082245f106d665.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"DGU3ANZuZZanIc0GOc6C3J9vHxJMBzSm+aRu0Z6/fWE=\"\n}"
1
+ self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"SaQX0ETgO191BdMwqlWRRPPCYMrS5B5+gD25B+L89nU=\"\n}"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "node": {},
3
3
  "edge": {},
4
- "encryptionKey": "DGU3ANZuZZanIc0GOc6C3J9vHxJMBzSm+aRu0Z6/fWE="
4
+ "encryptionKey": "SaQX0ETgO191BdMwqlWRRPPCYMrS5B5+gD25B+L89nU="
5
5
  }
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,s,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return t}});let t=e=>{}},10887,e=>{"use strict";var s=e.i(43476),r=e.i(71645),t=e.i(22016);function a(){return"/api"}async function n(){let e=await fetch(`${a()}/worker/status`);if(!e.ok){let s=await e.text();throw Error(`Failed to get worker status: ${e.status} - ${s.substring(0,100)}`)}let s=e.headers.get("content-type")||"";if(!s.includes("application/json")){let r=await e.text();throw Error(`Expected JSON but got ${s}: ${r.substring(0,100)}`)}return e.json()}async function l(){return(await fetch(`${a()}/worker/start`,{method:"POST"})).json()}async function i(){return(await fetch(`${a()}/worker/stop`,{method:"POST"})).json()}async function c(){await fetch(`${a()}/validate`,{method:"POST"})}async function o(){await fetch(`${a()}/push`,{method:"POST"})}async function d(e){let s=new FormData;s.append("pack_dir",e);let r=await fetch(`${a()}/pack/push`,{method:"POST",body:s});if(!r.ok){let e=await r.text();throw Error(`Failed to push pack: ${r.status} - ${e.substring(0,100)}`)}return r.json()}function h(){let[e,t]=(0,r.useState)(!1),[a,c]=(0,r.useState)(!0);(0,r.useEffect)(()=>{o();let e=setInterval(o,2e3);return()=>clearInterval(e)},[]);let o=async()=>{try{let e=await n();t(e.running||!1)}catch{}finally{c(!1)}},d=async()=>{try{e?await i():await l(),await o()}catch{}};return a?(0,s.jsx)("span",{className:"muted -mt-[13px]",children:"(loading...)"}):(0,s.jsxs)("div",{className:"flex gap-5 items-center",children:[(0,s.jsx)("div",{id:"worker_switch",className:`-mt-[11px] relative w-[46px] h-[26px] rounded-full cursor-pointer inline-block transition-colors duration-150 ${e?"bg-green-600":"bg-gray-200"}`,onClick:d,children:(0,s.jsx)("div",{id:"worker_knob",className:`absolute top-[3px] w-5 h-5 bg-white rounded-[35%] shadow-sm transition-all duration-150 ${e?"left-[23px]":"left-[3px]"}`})}),(0,s.jsxs)("span",{className:"muted -mt-[13px]",children:["(",e?"running":"stopped",")"]})]})}var m=e.i(57688);function u({isOpen:e,onClose:r,onConfirm:t,title:a,message:n,itemName:l}){return e?(0,s.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",onClick:r,children:(0,s.jsxs)("div",{className:"card min-w-[400px] max-w-[90%] bg-white dark:bg-gray-800 p-6",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("h2",{className:"mt-0 dark:text-white",children:a}),(0,s.jsx)("p",{className:"dark:text-gray-300",children:n}),l&&(0,s.jsx)("p",{className:"font-bold text-danger",children:l}),(0,s.jsxs)("div",{className:"actions mt-5 justify-end",children:[(0,s.jsx)("button",{className:"btn secondary",onClick:r,type:"button",children:"Cancel"}),(0,s.jsx)("button",{className:"btn danger",onClick:t,type:"button",children:"Delete"})]})]})}):null}let x={file:"file.svg",csv:"csv.svg",excel:"excel.svg",folder:"folder.svg",postgresql:"postgresql.svg",mysql:"mysql.svg",oracle:"oracle.svg",mssql:"mssql.svg",sqlite:"sqlite.svg",mongodb:"mongodb.svg",s3:"s3.svg",gcs:"gcs.png",azure_blob:"azure_blob.svg",hdfs:"hdfs.svg"};function p({sources:e,platformUrl:a}){let[n,l]=(0,r.useState)({isOpen:!1,sourceName:null}),i=async()=>{if(n.sourceName)try{await fetch(`/api/sources/delete/${encodeURIComponent(n.sourceName)}`,{method:"POST"}),window.location.reload()}catch{}finally{l({isOpen:!1,sourceName:null})}};return(0,s.jsxs)("div",{className:"card",children:[(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Name"}),(0,s.jsx)("th",{children:"Type"}),(0,s.jsx)("th",{children:"Visibility"}),(0,s.jsx)("th",{children:"Check"}),(0,s.jsx)("th",{})]})}),(0,s.jsx)("tbody",{children:e.map(e=>{let r=x[e.type]||"folder.svg",n=(e.visibility||"").toLowerCase(),i=(e.validate||"").toLowerCase();return(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{className:"dark:text-gray-200",children:[e.id&&a?(0,s.jsx)("a",{href:`${a}/home/data-engineering/sources/${e.id}`,target:"_blank",rel:"noopener noreferrer",children:e.name}):e.name,e.description&&(0,s.jsx)("div",{className:"subtle",children:e.description})]}),(0,s.jsx)("td",{className:"dark:text-gray-200",children:(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(m.default,{src:`/sources-logos/${r}`,alt:e.type,width:20,height:20,className:"h-5 max-w-[30px] rounded"}),(0,s.jsx)("span",{children:e.type})]})}),(0,s.jsxs)("td",{children:["private"===n&&(0,s.jsxs)("span",{title:"private",className:"badge badge-private dark:text-gray-400",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("rect",{x:"3",y:"9",width:"14",height:"8",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,s.jsx)("path",{d:"M6 9V7a4 4 0 1 1 8 0v2",stroke:"currentColor",strokeWidth:"2",fill:"none"})]}),"Private"]}),"internal"===n&&(0,s.jsxs)("span",{title:"internal",className:"badge badge-internal",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("rect",{x:"3",y:"6",width:"14",height:"10",rx:"2",stroke:"currentColor",strokeWidth:"2"}),(0,s.jsx)("path",{d:"M7 6V4h6v2",stroke:"currentColor",strokeWidth:"2"})]}),"Internal"]}),"public"===n&&(0,s.jsxs)("span",{title:"public",className:"badge badge-public",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"currentColor",strokeWidth:"2"}),(0,s.jsx)("path",{d:"M2 10h16M10 2a12 12 0 0 1 0 16M10 2a12 12 0 0 0 0 16",stroke:"currentColor",strokeWidth:"2"})]}),"Public"]}),!["private","internal","public"].includes(n)&&(0,s.jsx)("span",{className:"muted",children:e.visibility})]}),(0,s.jsxs)("td",{children:["valid"===i&&(0,s.jsxs)("span",{title:"valid",className:"badge badge-valid",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2"}),(0,s.jsx)("path",{d:"M6 10.5l2.5 2.5L14 7.5",stroke:"currentColor",strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Reachable"]}),"invalid"===i&&(0,s.jsxs)("span",{title:"invalid",className:"badge badge-invalid",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"2"}),(0,s.jsx)("path",{d:"M7 7l6 6M13 7l-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),"Unreachable"]}),!["valid","invalid"].includes(i)&&(0,s.jsx)("span",{className:"muted",children:e.validate||""})]}),(0,s.jsx)("td",{className:"muted"}),(0,s.jsx)("td",{children:(0,s.jsxs)("div",{className:"actions",children:[e.id?(0,s.jsx)(t.default,{className:"btn secondary",href:`/sources/edit/${encodeURIComponent(e.id)}`,children:"Edit"}):(0,s.jsx)("span",{className:"btn secondary opacity-50 cursor-not-allowed",title:"Source ID not available",children:"Edit"}),(0,s.jsx)("button",{className:"btn danger",type:"button",onClick:()=>{l({isOpen:!0,sourceName:e.name})},children:"Delete"})]})})]},e.name)})})]}),(0,s.jsx)(u,{isOpen:n.isOpen,onClose:()=>{l({isOpen:!1,sourceName:null})},onConfirm:i,title:"Delete Source",message:"Are you sure you want to delete this source? This action cannot be undone.",itemName:n.sourceName||void 0})]})}function g({initialData:e}){let[a,n]=(0,r.useState)(null),l=async()=>{try{await c(),n({message:"Validation completed",level:"info"}),setTimeout(()=>window.location.reload(),1e3)}catch(e){n({message:"Validation failed",level:"error"})}},i=async()=>{try{await o(),n({message:"Push completed",level:"info"}),setTimeout(()=>window.location.reload(),1e3)}catch(e){n({message:"Push failed",level:"error"})}},m=async e=>{e.preventDefault();let s=new FormData(e.currentTarget).get("pack_dir");if(!s)return void n({message:"Please select a pack folder",level:"error"});try{let e=await d(s);n({message:e.message||(e.ok?"Pack pushed successfully":"Pack push failed"),level:e.level||(e.ok?"info":"error")}),e.ok&&setTimeout(()=>window.location.reload(),1e3)}catch(e){n({message:`Pack push failed: ${e instanceof Error?e.message:"Unknown error"}`,level:"error"})}};return(0,s.jsxs)("div",{className:"container mt-3",children:[a&&(0,s.jsx)("div",{className:`alert ${"error"===a.level?"alert-error":"alert-info"} mb-3`,children:a.message}),(0,s.jsxs)("div",{className:"grid",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-start gap-3 mb-3",children:[(0,s.jsx)("h2",{className:"m-0 dark:text-white",children:"Sources"}),(0,s.jsxs)("div",{className:"actions",children:[(0,s.jsx)(t.default,{className:"btn",href:"/sources/add",children:"Add source"}),(0,s.jsx)("form",{className:"inline",onSubmit:e=>{e.preventDefault(),l()},children:(0,s.jsx)("button",{className:"btn secondary",type:"submit",children:"Validate"})}),(0,s.jsx)("form",{className:"inline",onSubmit:e=>{e.preventDefault(),i()},children:(0,s.jsx)("button",{className:"btn secondary",type:"submit",children:"Push"})})]})]}),(0,s.jsx)(p,{sources:e.sources,platformUrl:e.platform_url})]}),(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)("h2",{className:"dark:text-white",children:"Worker"}),(0,s.jsx)(h,{})]}),(0,s.jsx)("div",{className:"card mb-6",children:e.worker_conf?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"grid grid-cols-[160px_1fr] gap-y-2 gap-x-3",children:[(0,s.jsx)("div",{className:"muted",children:"Name"}),(0,s.jsx)("div",{"data-worker-name":!0,className:"dark:text-gray-200",children:e.platform_url?(0,s.jsx)("a",{href:`${e.platform_url}/home/data-engineering/workers/?worker=${e.worker_conf.name||""}`,target:"_blank",rel:"noopener noreferrer",children:e.worker_conf.name||""}):e.worker_conf.name||""}),(0,s.jsx)("div",{className:"muted",children:"Mode"}),(0,s.jsx)("div",{"data-worker-mode":!0,className:"dark:text-gray-200",children:e.worker_conf.mode||""}),(0,s.jsx)("div",{className:"muted",children:"Backend URL"}),(0,s.jsx)("div",{"data-worker-url":!0,className:"dark:text-gray-200",children:(0,s.jsx)("a",{href:e.worker_conf.url||"",target:"_blank",rel:"noopener noreferrer",children:e.worker_conf.url||""})}),(0,s.jsx)("div",{className:"muted",children:"Worker ID"}),(0,s.jsx)("div",{"data-worker-id":!0,className:"dark:text-gray-200",children:e.worker_conf.worker_id||""})]}),(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)("div",{className:"muted mb-1.5",children:"Worker Runs"}),e.worker_runs_page&&e.worker_runs_page.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("ul",{className:"m-0 pl-[18px] dark:text-gray-200",children:e.worker_runs_page.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)("span",{className:"muted",children:e.when})," —"," ",(0,s.jsx)("code",{className:"dark:bg-gray-700 dark:text-gray-200 px-1 rounded",children:(0,s.jsx)("a",{href:`/api/worker/run/${e.name}`,onClick:async s=>{s.preventDefault();try{await fetch(`/api/worker/run/${e.name}`)}catch{}},className:"cursor-pointer",children:e.name})})]},e.name))}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,s.jsxs)("div",{className:"muted",children:["Showing ",e.runs_start,"–",e.runs_end," of ",e.runs_total]}),(0,s.jsxs)("div",{className:"actions flex gap-2",children:[e.runs_has_prev?(0,s.jsx)(t.default,{className:"btn secondary",href:`/?runs_page=${e.runs_page-1}&runs_per_page=${e.runs_per_page}`,children:"Prev"}):(0,s.jsx)("button",{className:"btn secondary",disabled:!0,children:"Prev"}),e.runs_has_next?(0,s.jsx)(t.default,{className:"btn secondary",href:`/?runs_page=${e.runs_page+1}&runs_per_page=${e.runs_per_page}`,children:"Next"}):(0,s.jsx)("button",{className:"btn secondary",disabled:!0,children:"Next"})]})]})]}):(0,s.jsx)("div",{className:"muted",children:"No runs found."})]})]}):(0,s.jsx)("div",{className:"muted",children:'No worker configuration found. Use "qalita worker login" to configure.'})}),e.platform_url&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:"dark:text-white",children:"Pack"}),(0,s.jsx)("div",{className:"card mb-6",children:(0,s.jsxs)("form",{onSubmit:m,children:[(0,s.jsx)("label",{className:"mt-0 mb-2",htmlFor:"pack_dir",children:"Pack folder"}),(0,s.jsxs)("div",{className:"flex gap-2 items-stretch",children:[(0,s.jsx)("input",{id:"pack_dir",name:"pack_dir",type:"text",placeholder:"/path/to/your_pack",className:"flex-1 !mt-0 h-[38px]"}),(0,s.jsx)("button",{type:"button",className:"btn secondary h-[38px] shrink-0",id:"browse_pack",onClick:async()=>{try{let e=await fetch("/api/sources/pick-folder"),s=await e.json();if(s.path){let e=document.getElementById("pack_dir");e&&(e.value=s.path)}}catch{}},children:"Browse…"})]}),(0,s.jsx)("div",{className:"flex justify-end mt-4",children:(0,s.jsx)("button",{className:"btn h-[38px]",type:"submit",children:"Push Pack"})})]})})]})]})]})]})}e.s(["default",()=>g],10887)}]);