cuelo 0.10.102 → 0.10.103

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 (60) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +33 -33
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +2 -2
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  20. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  22. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  25. package/.next/server/app/api/attachments/[id]/transcription/route.js +1 -1
  26. package/.next/server/app/api/subagents/eta/route.js +1 -1
  27. package/.next/server/app/api/updates/apply/route.js +2 -2
  28. package/.next/server/app/api/updates/route.js +1 -1
  29. package/.next/server/app/index.html +1 -1
  30. package/.next/server/app/index.rsc +4 -4
  31. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  32. package/.next/server/app/index.segments/_full.segment.rsc +4 -4
  33. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  34. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  35. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  36. package/.next/server/app/page.js +13 -13
  37. package/.next/server/app/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  39. package/.next/server/app/recover.html +1 -1
  40. package/.next/server/app/recover.rsc +2 -2
  41. package/.next/server/app/recover.segments/_full.segment.rsc +2 -2
  42. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  43. package/.next/server/app/recover.segments/_index.segment.rsc +2 -2
  44. package/.next/server/app/recover.segments/_tree.segment.rsc +1 -1
  45. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  46. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  47. package/.next/server/app-paths-manifest.json +33 -33
  48. package/.next/server/middleware-build-manifest.js +1 -1
  49. package/.next/server/pages/404.html +1 -1
  50. package/.next/server/pages/500.html +1 -1
  51. package/.next/server/server-reference-manifest.json +1 -1
  52. package/.next/static/chunks/app/{layout-cd6bffa8745e8a36.js → layout-fa6bbbf25705e42f.js} +1 -1
  53. package/.next/static/chunks/app/{page-548c310776ce6f9e.js → page-48d585396bfe53c4.js} +15 -15
  54. package/.next/trace +108 -108
  55. package/.next/trace-build +1 -1
  56. package/README.md +3 -1
  57. package/Tools/CUELO_Setup/files/native-runtime-patch.js +1 -1
  58. package/package.json +1 -1
  59. /package/.next/static/{HLcEFheRa4cc7fPRMy0H2 → iRphzzaeVui7bPQbSH2WA}/_buildManifest.js +0 -0
  60. /package/.next/static/{HLcEFheRa4cc7fPRMy0H2 → iRphzzaeVui7bPQbSH2WA}/_ssgManifest.js +0 -0
@@ -1,7 +1,7 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[57121,[],""]
3
3
  3:I[74581,[],""]
4
- 4:I[57788,["7177","static/chunks/app/layout-cd6bffa8745e8a36.js"],"PwaRegistration"]
4
+ 4:I[57788,["7177","static/chunks/app/layout-fa6bbbf25705e42f.js"],"PwaRegistration"]
5
5
  5:I[90484,[],"OutletBoundary"]
6
6
  6:"$Sreact.suspense"
7
7
  9:I[90484,[],"ViewportBoundary"]
@@ -10,7 +10,7 @@ d:I[27123,[],"default",1]
10
10
  :HL["/_next/static/css/2f46e0db0d4a3aed.css","style"]
11
11
  :HL["/_next/static/css/c1267ab82d673037.css","style"]
12
12
  :HL["/fonts/fonts.css","style"]
13
- 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/c1267ab82d673037.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","link",null,{"rel":"stylesheet","href":"/fonts/fonts.css"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"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":{"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."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,null]},null,false,"$@8"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],null]}],false]],"m":"$undefined","G":["$d",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"HLcEFheRa4cc7fPRMy0H2"}
13
+ 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/c1267ab82d673037.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","link",null,{"rel":"stylesheet","href":"/fonts/fonts.css"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"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":{"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."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,null]},null,false,"$@8"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],null]}],false]],"m":"$undefined","G":["$d",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"iRphzzaeVui7bPQbSH2WA"}
14
14
  e:[]
15
15
  8:"$We"
16
16
  a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#ffffff","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#16171b","media":"(prefers-color-scheme: dark)"}]]
@@ -1,7 +1,7 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[57121,[],""]
3
3
  3:I[74581,[],""]
4
- 4:I[57788,["7177","static/chunks/app/layout-cd6bffa8745e8a36.js"],"PwaRegistration"]
4
+ 4:I[57788,["7177","static/chunks/app/layout-fa6bbbf25705e42f.js"],"PwaRegistration"]
5
5
  5:I[90484,[],"OutletBoundary"]
6
6
  6:"$Sreact.suspense"
7
7
  9:I[90484,[],"ViewportBoundary"]
@@ -10,7 +10,7 @@ d:I[27123,[],"default",1]
10
10
  :HL["/_next/static/css/2f46e0db0d4a3aed.css","style"]
11
11
  :HL["/_next/static/css/c1267ab82d673037.css","style"]
12
12
  :HL["/fonts/fonts.css","style"]
13
- 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/c1267ab82d673037.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","link",null,{"rel":"stylesheet","href":"/fonts/fonts.css"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"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":{"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."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,null]},null,false,"$@8"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],null]}],false]],"m":"$undefined","G":["$d",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"HLcEFheRa4cc7fPRMy0H2"}
13
+ 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/c1267ab82d673037.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","link",null,{"rel":"stylesheet","href":"/fonts/fonts.css"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L4",null,{}]]}]]}]]}],{"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":{"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."}]}]]}]}]],null,["$","$L5",null,{"children":["$","$6",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,null]},null,false,"$@8"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L9",null,{"children":"$La"}],["$","div",null,{"hidden":true,"children":["$","$Lb",null,{"children":["$","$6",null,{"name":"Next.Metadata","children":"$Lc"}]}]}],null]}],false]],"m":"$undefined","G":["$d",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"iRphzzaeVui7bPQbSH2WA"}
14
14
  e:[]
15
15
  8:"$We"
16
16
  a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#ffffff","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#16171b","media":"(prefers-color-scheme: dark)"}]]
@@ -3,4 +3,4 @@
3
3
  3:I[90484,[],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
5
  5:I[86869,[],"IconMark"]
6
- 0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#ffffff","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#16171b","media":"(prefers-color-scheme: dark)"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"CUELO"}],["$","meta","1",{"name":"description","content":"Web view for the omp (oh-my-pi) coding agent"}],["$","meta","2",{"name":"application-name","content":"CUELO"}],["$","link","3",{"rel":"manifest","href":"/manifest.webmanifest"}],["$","meta","4",{"name":"format-detection","content":"telephone=no"}],["$","meta","5",{"name":"mobile-web-app-capable","content":"yes"}],["$","meta","6",{"name":"apple-mobile-web-app-title","content":"CUELO"}],["$","meta","7",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}],["$","link","8",{"rel":"icon","href":"/favicon.ico?bcf2d9369cb3cf33","type":"image/x-icon","sizes":"16x16"}],["$","link","9",{"rel":"icon","href":"/icons/icon-192.png","sizes":"192x192","type":"image/png"}],["$","link","10",{"rel":"apple-touch-icon","href":"/icons/apple-touch-icon.png","sizes":"180x180","type":"image/png"}],["$","$L5","11",{}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"HLcEFheRa4cc7fPRMy0H2"}
6
+ 0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#ffffff","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#16171b","media":"(prefers-color-scheme: dark)"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"CUELO"}],["$","meta","1",{"name":"description","content":"Web view for the omp (oh-my-pi) coding agent"}],["$","meta","2",{"name":"application-name","content":"CUELO"}],["$","link","3",{"rel":"manifest","href":"/manifest.webmanifest"}],["$","meta","4",{"name":"format-detection","content":"telephone=no"}],["$","meta","5",{"name":"mobile-web-app-capable","content":"yes"}],["$","meta","6",{"name":"apple-mobile-web-app-title","content":"CUELO"}],["$","meta","7",{"name":"apple-mobile-web-app-status-bar-style","content":"default"}],["$","link","8",{"rel":"icon","href":"/favicon.ico?bcf2d9369cb3cf33","type":"image/x-icon","sizes":"16x16"}],["$","link","9",{"rel":"icon","href":"/icons/icon-192.png","sizes":"192x192","type":"image/png"}],["$","link","10",{"rel":"apple-touch-icon","href":"/icons/apple-touch-icon.png","sizes":"180x180","type":"image/png"}],["$","$L5","11",{}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"iRphzzaeVui7bPQbSH2WA"}
@@ -1,8 +1,8 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[57121,[],""]
3
3
  3:I[74581,[],""]
4
- 4:I[57788,["7177","static/chunks/app/layout-cd6bffa8745e8a36.js"],"PwaRegistration"]
4
+ 4:I[57788,["7177","static/chunks/app/layout-fa6bbbf25705e42f.js"],"PwaRegistration"]
5
5
  :HL["/_next/static/css/2f46e0db0d4a3aed.css","style"]
6
6
  :HL["/_next/static/css/c1267ab82d673037.css","style"]
7
7
  :HL["/fonts/fonts.css","style"]
8
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/c1267ab82d673037.css","precedence":"next"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","link",null,{"rel":"stylesheet","href":"/fonts/fonts.css"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}],["$","$L4",null,{}]]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"HLcEFheRa4cc7fPRMy0H2"}
8
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2f46e0db0d4a3aed.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/c1267ab82d673037.css","precedence":"next"}]],["$","html",null,{"lang":"en","translate":"no","className":"notranslate","data-seed":true,"suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","meta",null,{"name":"google","content":"notranslate"}],["$","meta",null,{"name":"color-scheme","content":"light dark"}],["$","link",null,{"rel":"stylesheet","href":"/fonts/fonts.css"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=localStorage,p=s.getItem(\"pi-theme\");if(p!==\"light\"&&p!==\"dark\"&&p!==\"auto\"){p=s.getItem(\"omp-theme\");if(p!==\"light\"&&p!==\"dark\")p=\"auto\"}var m=p===\"auto\"?(window.matchMedia(\"(prefers-color-scheme: dark)\").matches?\"dark\":\"light\"):p,r=document.documentElement;r.dataset.ompThemeMode=m;r.setAttribute(\"data-seed-color-mode\",m===\"dark\"?\"dark-only\":\"light-only\");r.classList.toggle(\"dark\",m===\"dark\");for(var i=r.style.length-1;i>=0;i--){var n=r.style.item(i);if(n.indexOf(\"--\")===0&&n.indexOf(\"--omp-md-\")!==0)r.style.removeProperty(n)}var c=JSON.parse(s.getItem(\"omp-theme-config\")||\"null\"),v=c&&c.palettes&&c.palettes[m];if(v&&v.variables){Object.keys(v.variables).forEach(function(k){if(k.indexOf(\"--omp-md-\")===0)r.style.setProperty(k,v.variables[k])});r.dataset.ompThemeName=v.name}}catch(e){}})();"}}]]}],["$","body",null,{"translate":"no","className":"notranslate","children":[["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}],["$","$L4",null,{}]]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"iRphzzaeVui7bPQbSH2WA"}
@@ -1,5 +1,5 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[90484,[],"OutletBoundary"]
3
3
  3:"$Sreact.suspense"
4
- 0:{"rsc":["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"HLcEFheRa4cc7fPRMy0H2"}
4
+ 0:{"rsc":["$","$1","c",{"children":[[["$","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."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"iRphzzaeVui7bPQbSH2WA"}
5
5
  4:null
@@ -2,4 +2,4 @@
2
2
  2:I[57121,[],""]
3
3
  3:I[74581,[],""]
4
4
  4:[]
5
- 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"HLcEFheRa4cc7fPRMy0H2"}
5
+ 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"iRphzzaeVui7bPQbSH2WA"}
@@ -1,4 +1,4 @@
1
1
  :HL["/_next/static/css/2f46e0db0d4a3aed.css","style"]
2
2
  :HL["/_next/static/css/c1267ab82d673037.css","style"]
3
3
  :HL["/fonts/fonts.css","style"]
4
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"HLcEFheRa4cc7fPRMy0H2"}
4
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"iRphzzaeVui7bPQbSH2WA"}
@@ -1,2 +1,2 @@
1
- "use strict";(()=>{var a={};a.id=5807,a.ids=[5807],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11746:a=>{a.exports=import("@oh-my-pi/pi-ai")},20201:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(49974),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/attachments/[id]/transcription/route",pathname:"/api/attachments/[id]/transcription",filename:"route",bundlePath:"app/api/attachments/[id]/transcription/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/attachments/[id]/transcription/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/attachments/[id]/transcription/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},27427:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{bk:()=>h,eY:()=>i});var e=c(75199),f=c(45157),g=a([e,f]);[e,f]=g.then?(await g)():g;let i=15,j="openai-codex",k="audio/mpeg";async function h(a,b,d){let{getOmpRuntime:g}=await c.e(8741).then(c.bind(c,38741)),{authStorage:h}=await g();return(function({getAccess:a,fetch:b,baseUrl:c,timeoutMs:d=6e4}){return async(e,g,h)=>{let i;if(g!==k)throw Error(`Codex transcription takes only MP3 chunks, not ${g}`);let j=await a(h);if(!j?.accessToken)throw Error("No Codex OAuth credential is available");let l={Authorization:`Bearer ${j.accessToken}`,Accept:"application/json","User-Agent":`Codex Desktop/${f.CODEX_CLIENT_VERSION}`,[f.OPENAI_HEADERS.ORIGINATOR]:"Codex Desktop"},m=j.accountId??(0,f.getCodexAccountId)(j.accessToken);m&&(l[f.OPENAI_HEADERS.ACCOUNT_ID]=m),(0,f.applyCodexResidencyHeader)(l,j.accessToken);let n=new FormData;n.append("file",new File([e],"audio.mp3",{type:k}));let o=AbortSignal.timeout(d),p=await b(`${c}/transcribe`,{method:"POST",headers:l,body:n,signal:h?AbortSignal.any([h,o]):o});if(!p.ok)throw await p.body?.cancel(),Error(`Codex transcription failed (HTTP ${p.status})`);let q=await p.text();try{i=JSON.parse(q).text}catch{throw Error("Codex transcription returned a response that is not JSON")}if("string"!=typeof i)throw Error("Codex transcription response has no text");return i.trim()}})({getAccess:a=>h.oauth.access(j,void 0,{signal:a}),fetch:(0,e.wrapFetchForProxy)(fetch,j),baseUrl:f.CODEX_BASE_URL})(a,b,d)}d()}catch(a){d(a)}})},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34069:a=>{a.exports=import("@oh-my-pi/pi-utils")},39379:a=>{a.exports=import("@oh-my-pi/pi-ai/error")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45157:a=>{a.exports=import("@oh-my-pi/pi-catalog/wire/codex")},48161:a=>{a.exports=require("node:os")},49974:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>m,POST:()=>n,dynamic:()=>p,runtime:()=>o});var e=c(23211),f=c(91524),g=c(27427),h=c(58824),i=c(2979),j=c(66544),k=a([f,g,h,i]);[f,g,h,i]=k.then?(await k)():k;let o="nodejs",p="force-dynamic";function l(a){if(a instanceof i.bO)switch(a.code){case"invalid_id":return e.NextResponse.json({code:a.code,error:"Invalid attachment id"},{status:400});case"not_found":return e.NextResponse.json({code:a.code,error:"Attachment not found"},{status:404});case"busy":return e.NextResponse.json({code:a.code,error:"Attachment is being cleaned up; try again"},{status:503})}return console.error("[attachments/transcription] unexpected failure",a),e.NextResponse.json({code:"internal",error:"Transcription failed unexpectedly"},{status:500})}async function m(a,{params:b}){if(!(0,j.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});let{id:c}=await b;try{return await (0,i.rE)(c,b=>(0,h.VF)(b,{resolveFfmpeg:h.hM,signal:a.signal}))}catch(a){return l(a)}}async function n(a,{params:b}){if(!(0,j.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});let{id:c}=await b,d=await (0,h.k3)(a);if(!d)return e.NextResponse.json({code:"invalid_body",error:"Body must be empty or { confirmed?: boolean }"},{status:400});try{return await (0,i.rE)(c,b=>(0,h.a2)(b,d,{resolveFfmpeg:h.hM,transcribe:f.Du,fallback:{transcribe:g.bk,chunkSeconds:g.eY},signal:a.signal}))}catch(a){return l(a)}}d()}catch(a){d(a)}})},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},58824:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{VF:()=>z,a2:()=>A,hM:()=>o,k3:()=>B});var e=c(31421),f=c(73024),g=c(51455),h=c(48161),i=c(76760),j=c(79046),k=c.n(j),l=c(91524),m=c(90876),n=a([l]);l=(n.then?(await n)():n)[0];let C=["-ac","1","-ar","16000","-c:a","libmp3lame","-b:a","32k"],D="audio/mpeg",E=/^part-\d{4}\.mp3$/;class F extends Error{constructor(a,b,c,d={}){super(b),this.code=a,this.status=c,this.details=d,this.name="AudioTranscriptionError"}}let G=()=>new F("aborted","Transcription was cancelled",499),H=()=>new F("media_unreadable","The attachment has no readable audio stream",422);async function o(){if(!k()||!(0,f.existsSync)(k()))throw new F("media_tool_unavailable","FFmpeg is not available on this server; reinstall CUELO to restore it",503);return k()}function p(a){return["-protocol_whitelist","file","-format_whitelist","mov,mp4,m4a,3gp,3g2,mj2,mp3,wav,ogg,flac,matroska,webm,aac,aiff","-i",`file:${a}`]}function q(a,b,c){if(c?.aborted)return Promise.reject(G());let{promise:d,resolve:f,reject:g}=Promise.withResolvers(),h=(0,e.spawn)(a,["-hide_banner","-nostdin","-v","error",...b],{stdio:["ignore","pipe","pipe"],windowsHide:!0,signal:c}),i="",j="";return h.stdout.setEncoding("utf8").on("data",a=>{i=(i+a).slice(-4096)}),h.stderr.setEncoding("utf8").on("data",a=>{j=(j+a).slice(-4096)}),h.on("error",()=>{void 0===h.pid&&g(c?.aborted?G():new F("media_tool_unavailable","FFmpeg could not be started",503))}),h.on("close",a=>c?.aborted?g(G()):0===a?f(i):void(console.warn(`[attachment-audio] ffmpeg exited with ${a}: ${j.trim()}`),g(H()))),d}async function r(a,b,c){let d=await q(a,[...p(b),"-map","0:a:0","-c","copy","-f","null","-progress","pipe:1","-nostats","-"],c),e=Number([...d.matchAll(/^out_time_us=(\d+)\s*$/gm)].at(-1)?.[1]);if(!Number.isFinite(e)||e<=0)throw H();return e/1e6}function s(a){if(!a.mimeType.toLowerCase().startsWith("audio/"))throw new F("not_audio","Only audio attachments can be transcribed",415)}let I="If primary transcription fails, CUELO may send the failing segment and remaining audio to ChatGPT/Codex using your existing sign-in. It splits fallback audio into 15-second MP3 chunks, which can increase request counts and account usage beyond the estimate. This endpoint is private and undocumented. A response included asset_ttl='30d'; actual retention and deletion policies remain unverified.";async function t(a,{resolveFfmpeg:b,signal:c}){let d,e,f,g;if(s(a),a.size<=m.E)return{durationSeconds:null,estimatedCalls:1,requiresConfirmation:!1,processing:"direct",notice:`The audio is sent as it is in one transcription request to the model service of the draft role. ${I}`};let h=await r(await b(),a.path,c),i=Math.ceil(h/600);return{durationSeconds:h,estimatedCalls:i,requiresConfirmation:!0,processing:"compress-and-split",notice:[`The audio is ${(d=Math.round(h),e=Math.floor(d/3600),f=Math.floor(d%3600/60),g=String(d%60).padStart(2,"0"),e>0?`${e}:${String(f).padStart(2,"0")}:${g}`:`${f}:${g}`)} long.`,`A compressed copy is split into ${i} part${1===i?"":"s"} of up to 10 minutes,`,`sent one after another as ${i} transcription request${1===i?"":"s"} billed to that model service's account.`,`Each request can take up to ${l.nA/6e4} minutes. The original file stays unchanged.`,I].join(" ")}}async function u(a,b,c){let{signal:d}=c,e=await (0,g.mkdtemp)((0,i.join)(c.tmpRoot??(0,h.tmpdir)(),"cuelo-audio-chunks-"));try{let f=await c.resolveFfmpeg(),h=(0,i.join)(e,"chunk.mp3"),j=[];for(let c of a){let a=await r(f,c,d),e=Math.max(1,Math.ceil(a/b.chunkSeconds)),i=a/e,k=Array.from({length:e},(a,b)=>b*i),l=[];for(let[a,e]of k.entries()){if(d?.aborted)throw G();let j=a===k.length-1;await q(f,["-ss",String(e),...p(c),...j?[]:["-t",String(i)],"-map","0:a:0",...C,"-y",h],d);try{let a=await b.transcribe(await (0,g.readFile)(h),D,d);a.trim()&&l.push(a.trim())}catch(b){if(b instanceof F)throw b;throw Error(`chunk ${a+1} of ${k.length}: ${b instanceof Error?b.message:String(b)}`)}}j.push(l.join(" "))}return j}finally{await (0,g.rm)(e,{recursive:!0,force:!0,maxRetries:3})}}async function v(a,b,c){let{transcribe:d,fallback:e,signal:f}=c,h=[],i="",j=(b,c)=>new F("transcription_failed",b,502,{completedParts:c,parts:a.length});for(let[k,m]of a.entries()){if(f?.aborted)throw G();let n=new Uint8Array(await (0,g.readFile)(m));try{h.push(await d(n,b,f));continue}catch(g){if(f?.aborted)throw G();let b=g instanceof Error?g.message:String(g),d=1===a.length?"":`part ${k+1} of ${a.length} failed: `;if(!e||g instanceof l.t4)throw j(`${d}${b}`,k);i=`${d}${b}`;try{h.push(...await u(a.slice(k),e,c))}catch(b){if(f?.aborted||b instanceof F&&"aborted"===b.code)throw G();let a=b instanceof Error?b.message:String(b);throw j(`${i}; fallback transcription failed: ${a}`,k)}break}}let k=h.filter(Boolean).join("\n\n");if(!k)throw j(i?`${i}; fallback transcription failed: transcription returned no text`:"transcription returned no text",0);return{transcript:k,parts:a.length}}async function w(a,b){let c=await b.resolveFfmpeg(),d=b.maxPartBytes??m.E,e=await (0,g.mkdtemp)((0,i.join)(b.tmpRoot??(0,h.tmpdir)(),"cuelo-audio-"));try{await q(c,[...p(a.path),"-map","0:a:0",...C,"-f","segment","-segment_time",String(600),"-reset_timestamps","1",(0,i.join)(e,"part-%04d.mp3")],b.signal);let f=(await (0,g.readdir)(e)).filter(a=>E.test(a)).sort().map(a=>(0,i.join)(e,a));if(0===f.length)throw H();for(let a of f)if((await (0,g.stat)(a)).size>d)throw new F("part_too_large","A converted part is larger than the transcription limit",500);return await v(f,D,b)}finally{await (0,g.rm)(e,{recursive:!0,force:!0,maxRetries:3})}}async function x(a,b){let c;s(a);let d=a.size>m.E;if(d&&!0!==b.confirmed)throw new F("confirmation_required","Large audio needs confirmation before it is transcribed",409);let e=(c=globalThis,c.__cueloAudioTranscriptions??=new Set,c.__cueloAudioTranscriptions);if(e.has(a.id))throw new F("in_progress","This attachment is already being transcribed",409);e.add(a.id);try{return d?await w(a,b):await v([a.path],a.mimeType,b)}finally{e.delete(a.id)}}function y(a){return a instanceof F?Response.json({code:a.code,error:a.message,...a.details},{status:a.status}):(console.error("[attachment-audio] unexpected failure",a),Response.json({code:"internal",error:"Transcription failed unexpectedly"},{status:500}))}async function z(a,b){try{return Response.json(await t(a,b))}catch(a){return y(a)}}async function A(a,{confirmed:b},c){try{return Response.json(await x(a,{...c,confirmed:b}))}catch(b){if(!(b instanceof F)||"confirmation_required"!==b.code)return y(b);try{let d=await t(a,c);return Response.json({code:b.code,error:b.message,plan:d},{status:b.status})}catch(a){return y(a)}}}async function B(a){let b,c=await a.text();if(!c.trim())return{confirmed:!1};try{b=JSON.parse(c)}catch{return null}if(!b||"object"!=typeof b||Array.isArray(b))return null;let{confirmed:d}=b;return void 0!==d&&"boolean"!=typeof d?null:{confirmed:!0===d}}d()}catch(a){d(a)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75199:a=>{a.exports=import("@oh-my-pi/pi-ai/utils/proxy")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79046:a=>{a.exports=require("ffmpeg-static")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},90876:(a,b,c)=>{c.d(b,{E:()=>d});let d=0xe00000},91524:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Du:()=>i,nA:()=>l,t4:()=>o});var e=c(39379),f=c(96282),g=c(90876),h=a([e,f]);[e,f]=h.then?(await h)():h;let j="google-vertex",k="gemini-4-argon",l=18e4,m={"google-generative-ai":!0,"google-vertex":!0};class n extends Error{}class o extends n{}let p=/finish reason:\s*(?:SAFETY|BLOCKLIST|PROHIBITED_CONTENT|SPII|IMAGE_SAFETY|IMAGE_PROHIBITED_CONTENT|IMAGE_RECITATION|RECITATION)\b/;async function i(a,b,d){let h,i,q;if(a.byteLength>g.E)throw Error(`audio exceeds the ${g.E/1024/1024} MB transcription limit`);let[{completeSimple:r},{getOmpRuntime:s}]=await Promise.all([Promise.resolve().then(c.bind(c,11746)),c.e(8741).then(c.bind(c,38741))]),{modelRegistry:t,settings:u}=await s(),v=((q=(0,f.parseModelString)(u.getModelRole("draft")?.trim()??""))?t.find(q.provider,q.id):void 0)??t.find(j,k);if(!v)throw Error(`${j}/${k} is not available`);let w=`${v.provider}/${v.id}`;if(!Object.hasOwn(m,v.api))throw Error(`${w} (${v.api}) cannot carry audio`);if(!v.input.includes("image"))throw Error(`${w} does not accept inline media`);let x=`${v.provider}/${v.id}`,y=await t.getApiKeyAndHeaders(v);if(!y.ok||!y.apiKey)throw Error(y.ok?`No credentials for ${x}`:y.error);let z=AbortSignal.timeout(l),A={messages:[{role:"user",content:[{type:"text",text:"Transcribe the speech in this audio file verbatim.\n- Keep the spoken language; do not translate or summarize.\n- Output only the transcript text: no heading, quotes, timestamps, or commentary.\n- If several people speak, start each speaker change on a new line.\n- If there is no intelligible speech, output exactly: [no speech]"},{type:"image",mimeType:b,data:Buffer.from(a).toString("base64")}],timestamp:Date.now()}]},B={apiKey:y.apiKey,headers:y.headers,maxTokens:32768,disableReasoning:!0,cacheRetention:"none",signal:d?AbortSignal.any([d,z]):z};for(let a=0;a<2;a+=1)try{return function(a){let b=a.content.filter(a=>"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join("").trim();if("stop"!==a.stopReason&&"length"!==a.stopReason){let c=[a.errorMessage,b.slice(0,160)].filter(Boolean).join("; "),d=`transcription stopped: ${a.stopReason}${c?` (${c})`:""}`;throw(0,e.is)(a.errorId,e.Flag.ContentBlocked)||p.test(a.errorMessage??"")?new o(d):new n(d)}if(!b)throw Error("transcription returned no text");return"length"===a.stopReason?`${b}
1
+ "use strict";(()=>{var a={};a.id=5807,a.ids=[5807],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11746:a=>{a.exports=import("@oh-my-pi/pi-ai")},20201:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(49974),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/attachments/[id]/transcription/route",pathname:"/api/attachments/[id]/transcription",filename:"route",bundlePath:"app/api/attachments/[id]/transcription/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/attachments/[id]/transcription/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/attachments/[id]/transcription/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},27427:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{bk:()=>h,eY:()=>i});var e=c(75199),f=c(45157),g=a([e,f]);[e,f]=g.then?(await g)():g;let i=15,j="openai-codex",k="audio/mpeg";async function h(a,b,d){let{getOmpRuntime:g}=await c.e(8741).then(c.bind(c,38741)),{authStorage:h}=await g();return(function({getAccess:a,fetch:b,baseUrl:c,timeoutMs:d=6e4}){return async(e,g,h)=>{let i;if(g!==k)throw Error(`Codex transcription takes only MP3 chunks, not ${g}`);let j=await a(h);if(!j?.accessToken)throw Error("No Codex OAuth credential is available");let l={Authorization:`Bearer ${j.accessToken}`,Accept:"application/json","User-Agent":`Codex Desktop/${f.CODEX_CLIENT_VERSION}`,[f.OPENAI_HEADERS.ORIGINATOR]:"Codex Desktop"},m=j.accountId??(0,f.getCodexAccountId)(j.accessToken);m&&(l[f.OPENAI_HEADERS.ACCOUNT_ID]=m),(0,f.applyCodexResidencyHeader)(l,j.accessToken);let n=new FormData;n.append("file",new File([e],"audio.mp3",{type:k}));let o=AbortSignal.timeout(d),p=await b(`${c}/transcribe`,{method:"POST",headers:l,body:n,signal:h?AbortSignal.any([h,o]):o});if(!p.ok)throw await p.body?.cancel(),Error(`Codex transcription failed (HTTP ${p.status})`);let q=await p.text();try{i=JSON.parse(q).text}catch{throw Error("Codex transcription returned a response that is not JSON")}if("string"!=typeof i)throw Error("Codex transcription response has no text");return i.trim()}})({getAccess:a=>h.oauth.access(j,void 0,{signal:a}),fetch:(0,e.wrapFetchForProxy)(fetch,j),baseUrl:f.CODEX_BASE_URL})(a,b,d)}d()}catch(a){d(a)}})},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34069:a=>{a.exports=import("@oh-my-pi/pi-utils")},39379:a=>{a.exports=import("@oh-my-pi/pi-ai/error")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},45157:a=>{a.exports=import("@oh-my-pi/pi-catalog/wire/codex")},48161:a=>{a.exports=require("node:os")},49974:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>m,POST:()=>n,dynamic:()=>p,runtime:()=>o});var e=c(23211),f=c(91524),g=c(27427),h=c(58824),i=c(2979),j=c(66544),k=a([f,g,h,i]);[f,g,h,i]=k.then?(await k)():k;let o="nodejs",p="force-dynamic";function l(a){if(a instanceof i.bO)switch(a.code){case"invalid_id":return e.NextResponse.json({code:a.code,error:"Invalid attachment id"},{status:400});case"not_found":return e.NextResponse.json({code:a.code,error:"Attachment not found"},{status:404});case"busy":return e.NextResponse.json({code:a.code,error:"Attachment is being cleaned up; try again"},{status:503})}return console.error("[attachments/transcription] unexpected failure",a),e.NextResponse.json({code:"internal",error:"Transcription failed unexpectedly"},{status:500})}async function m(a,{params:b}){if(!(0,j.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});let{id:c}=await b;try{return await (0,i.rE)(c,b=>(0,h.VF)(b,{resolveFfmpeg:h.hM,signal:a.signal}))}catch(a){return l(a)}}async function n(a,{params:b}){if(!(0,j.EN)(a))return e.NextResponse.json({error:"Untrusted API request"},{status:403});let{id:c}=await b,d=await (0,h.k3)(a);if(!d)return e.NextResponse.json({code:"invalid_body",error:"Body must be empty, { confirmed?: boolean } or { fallbackToken: string, approve: boolean }"},{status:400});try{return await (0,i.rE)(c,b=>(0,h.a2)(b,d,{resolveFfmpeg:h.hM,transcribe:f.Du,fallback:{transcribe:g.bk,chunkSeconds:g.eY},signal:a.signal}))}catch(a){return l(a)}}d()}catch(a){d(a)}})},51455:a=>{a.exports=require("node:fs/promises")},55511:a=>{a.exports=require("crypto")},58824:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{VF:()=>C,a2:()=>D,hM:()=>p,k3:()=>E});var e=c(31421),f=c(77598),g=c(73024),h=c(51455),i=c(48161),j=c(76760),k=c(79046),l=c.n(k),m=c(91524),n=c(90876),o=a([m]);m=(o.then?(await o)():o)[0];let F=["-ac","1","-ar","16000","-c:a","libmp3lame","-b:a","32k"],G="audio/mpeg",H=/^part-\d{4}\.mp3$/;class I extends Error{constructor(a,b,c,d={}){super(b),this.code=a,this.status=c,this.details=d,this.name="AudioTranscriptionError"}}class J extends I{constructor(a){super(a.code,a.error,409,{completedParts:a.completedParts,parts:a.parts}),this.offer=a,this.name="AudioFallbackOfferError"}}let K=()=>new I("aborted","Transcription was cancelled",499),L=()=>new I("media_unreadable","The attachment has no readable audio stream",422),M=()=>new I("fallback_confirmation_expired","This fallback choice expired or was already used; nothing was sent. Start the transcription again.",409);async function p(){if(!l()||!(0,g.existsSync)(l()))throw new I("media_tool_unavailable","FFmpeg is not available on this server; reinstall CUELO to restore it",503);return l()}function q(a){return["-protocol_whitelist","file","-format_whitelist","mov,mp4,m4a,3gp,3g2,mj2,mp3,wav,ogg,flac,matroska,webm,aac,aiff","-i",`file:${a}`]}function r(a,b,c){if(c?.aborted)return Promise.reject(K());let{promise:d,resolve:f,reject:g}=Promise.withResolvers(),h=(0,e.spawn)(a,["-hide_banner","-nostdin","-v","error",...b],{stdio:["ignore","pipe","pipe"],windowsHide:!0,signal:c}),i="",j="";return h.stdout.setEncoding("utf8").on("data",a=>{i=(i+a).slice(-4096)}),h.stderr.setEncoding("utf8").on("data",a=>{j=(j+a).slice(-4096)}),h.on("error",()=>{void 0===h.pid&&g(c?.aborted?K():new I("media_tool_unavailable","FFmpeg could not be started",503))}),h.on("close",a=>c?.aborted?g(K()):0===a?f(i):void(console.warn(`[attachment-audio] ffmpeg exited with ${a}: ${j.trim()}`),g(L()))),d}async function s(a,b,c){let d=await r(a,[...q(b),"-map","0:a:0","-c","copy","-f","null","-progress","pipe:1","-nostats","-"],c),e=Number([...d.matchAll(/^out_time_us=(\d+)\s*$/gm)].at(-1)?.[1]);if(!Number.isFinite(e)||e<=0)throw L();return e/1e6}function t(a){if(!a.mimeType.toLowerCase().startsWith("audio/"))throw new I("not_audio","Only audio attachments can be transcribed",415)}let N="It splits fallback audio into 15-second MP3 chunks, which can increase request counts and account usage beyond the estimate. This endpoint is private and undocumented. A response included asset_ttl='30d'; actual retention and deletion policies remain unverified.",O=`If primary transcription fails, CUELO asks before sending the failing segment and remaining audio to ChatGPT/Codex using your existing sign-in. ${N}`,P=`Continuing sends the failed segment and remaining audio to ChatGPT/Codex using your existing sign-in. ${N}`;async function u(a,{resolveFfmpeg:b,signal:c}){let d,e,f,g;if(t(a),a.size<=n.E)return{durationSeconds:null,estimatedCalls:1,requiresConfirmation:!1,processing:"direct",notice:`The audio is sent as it is in one transcription request to the model service of the draft role. ${O}`};let h=await s(await b(),a.path,c),i=Math.ceil(h/600);return{durationSeconds:h,estimatedCalls:i,requiresConfirmation:!0,processing:"compress-and-split",notice:[`The audio is ${(d=Math.round(h),e=Math.floor(d/3600),f=Math.floor(d%3600/60),g=String(d%60).padStart(2,"0"),e>0?`${e}:${String(f).padStart(2,"0")}:${g}`:`${f}:${g}`)} long.`,`A compressed copy is split into ${i} part${1===i?"":"s"} of up to 10 minutes,`,`sent one after another as ${i} transcription request${1===i?"":"s"} billed to that model service's account.`,`Each request can take up to ${m.nA/6e4} minutes. The original file stays unchanged.`,O].join(" ")}}function v(){let a=globalThis;return a.__cueloAudioFallbackOffers??=new Map,a.__cueloAudioFallbackOffers}function w(a,b){let c=v(),d=c.get(a);d&&(!b||d===b)&&(clearTimeout(d.timer),c.delete(a))}async function x(a,b,c){let{signal:d}=c,e=await (0,h.mkdtemp)((0,j.join)(c.tmpRoot??(0,i.tmpdir)(),"cuelo-audio-chunks-"));try{let f=await c.resolveFfmpeg(),g=(0,j.join)(e,"chunk.mp3"),i=[];for(let c of a){let a=await s(f,c,d),e=Math.max(1,Math.ceil(a/b.chunkSeconds)),j=a/e,k=Array.from({length:e},(a,b)=>b*j),l=[];for(let[a,e]of k.entries()){if(d?.aborted)throw K();let i=a===k.length-1;await r(f,["-ss",String(e),...q(c),...i?[]:["-t",String(j)],"-map","0:a:0",...F,"-y",g],d);try{let a=await b.transcribe(await (0,h.readFile)(g),G,d);a.trim()&&l.push(a.trim())}catch(b){if(b instanceof I)throw b;throw Error(`chunk ${a+1} of ${k.length}: ${b instanceof Error?b.message:String(b)}`)}}i.push(l.join(" "))}return i}finally{await (0,h.rm)(e,{recursive:!0,force:!0,maxRetries:3})}}async function y(a,b,c,d,e){let{transcribe:g,fallback:i,signal:j}=d,k=(a,c)=>new I("transcription_failed",a,502,{completedParts:c,parts:b.length}),l=a=>a instanceof Error?a.message:String(a);if(e){let a;if(!i||e.parts!==b.length)throw M();let{failedIndex:c,primaryFailure:f}=e;try{a=await x(b.slice(c),i,d)}catch(a){if(j?.aborted||a instanceof I&&"aborted"===a.code)throw K();throw k(`${f}; fallback transcription failed: ${l(a)}`,c)}let g=[...e.texts,...a].filter(Boolean).join("\n\n");if(!g)throw k(`${f}; fallback transcription failed: transcription returned no text`,0);return{transcript:g,parts:b.length}}let n=[];for(let[e,o]of b.entries()){if(j?.aborted)throw K();let p=new Uint8Array(await (0,h.readFile)(o));try{n.push(await g(p,c,j))}catch(h){if(j?.aborted)throw K();let c=1===b.length?"":`part ${e+1} of ${b.length} failed: `,g=`${c}${l(h)}`;if(!i||h instanceof m.t4)throw k(g,e);try{await d.resolveFfmpeg()}catch(a){throw k(`${g}; fallback transcription failed: ${l(a)}`,e)}if(j?.aborted)throw K();throw new J(function(a,b){w(a.id);let c={...b,texts:[...b.texts],source:{...a},token:(0,f.randomBytes)(16).toString("hex"),expiresAt:Date.now()+18e5,timer:setTimeout(()=>w(a.id,c),18e5)};return c.timer.unref?.(),v().set(a.id,c),{code:"fallback_confirmation_required",error:b.primaryFailure,completedParts:b.failedIndex,parts:b.parts,fallbackToken:c.token,notice:P,expiresInSeconds:1800}}(a,{texts:n,failedIndex:e,parts:b.length,primaryFailure:g}))}}let o=n.filter(Boolean).join("\n\n");if(!o)throw k("transcription returned no text",0);return{transcript:o,parts:b.length}}async function z(a,b,c){let d=await b.resolveFfmpeg(),e=b.maxPartBytes??n.E,f=await (0,h.mkdtemp)((0,j.join)(b.tmpRoot??(0,i.tmpdir)(),"cuelo-audio-"));try{await r(d,[...q(a.path),"-map","0:a:0",...F,"-f","segment","-segment_time",String(600),"-reset_timestamps","1",(0,j.join)(f,"part-%04d.mp3")],b.signal);let g=(await (0,h.readdir)(f)).filter(a=>H.test(a)).sort().map(a=>(0,j.join)(f,a));if(0===g.length)throw L();for(let a of g)if((await (0,h.stat)(a)).size>e)throw new I("part_too_large","A converted part is larger than the transcription limit",500);return await y(a,g,G,b,c)}finally{await (0,h.rm)(f,{recursive:!0,force:!0,maxRetries:3})}}async function A(a,b){let c;t(a);let d=a.size>n.E,e=b.fallbackToken,f=void 0!==e;if(d&&!f&&!0!==b.confirmed)throw new I("confirmation_required","Large audio needs confirmation before it is transcribed",409);let g=(c=globalThis,c.__cueloAudioTranscriptions??=new Set,c.__cueloAudioTranscriptions);if(g.has(a.id))throw new I("in_progress","This attachment is already being transcribed",409);let h=f?function(a,b){let c=v().get(a.id);if(!c||c.token!==b||(w(a.id,c),c.source.path!==a.path||c.source.size!==a.size||c.source.mimeType!==a.mimeType||Date.now()>=c.expiresAt))throw M();return c}(a,e):null;f||w(a.id),g.add(a.id);try{return d?await z(a,b,h):await y(a,[a.path],a.mimeType,b,h)}finally{g.delete(a.id)}}function B(a){return a instanceof J?Response.json(a.offer,{status:a.status}):a instanceof I?Response.json({code:a.code,error:a.message,...a.details},{status:a.status}):(console.error("[attachment-audio] unexpected failure",a),Response.json({code:"internal",error:"Transcription failed unexpectedly"},{status:500}))}async function C(a,b){try{return Response.json(await u(a,b))}catch(a){return B(a)}}async function D(a,b,c){if("fallbackToken"in b&&!b.approve){var d,e;let c;return Response.json({discarded:(d=a.id,e=b.fallbackToken,!!(c=v().get(d))&&c.token===e&&(w(d,c),!0))})}let f="fallbackToken"in b?{fallbackToken:b.fallbackToken}:{confirmed:!0===b.confirmed};try{return Response.json(await A(a,{...c,...f}))}catch(b){if(!(b instanceof I)||"confirmation_required"!==b.code)return B(b);try{let d=await u(a,c);return Response.json({code:b.code,error:b.message,plan:d},{status:b.status})}catch(a){return B(a)}}}let Q=/^[0-9a-f]{32}$/;async function E(a){let b,c=await a.text();if(!c.trim())return{confirmed:!1};try{b=JSON.parse(c)}catch{return null}if(!b||"object"!=typeof b||Array.isArray(b))return null;let{confirmed:d,fallbackToken:e,approve:f}=b;return void 0!==e?"string"==typeof e&&Q.test(e)&&"boolean"==typeof f&&void 0===d?{fallbackToken:e,approve:f}:null:void 0!==f||void 0!==d&&"boolean"!=typeof d?null:{confirmed:!0===d}}d()}catch(a){d(a)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{a.exports=require("node:fs")},75199:a=>{a.exports=import("@oh-my-pi/pi-ai/utils/proxy")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},79046:a=>{a.exports=require("ffmpeg-static")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},90876:(a,b,c)=>{c.d(b,{E:()=>d});let d=0xe00000},91524:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Du:()=>i,nA:()=>l,t4:()=>o});var e=c(39379),f=c(96282),g=c(90876),h=a([e,f]);[e,f]=h.then?(await h)():h;let j="google-vertex",k="gemini-4-argon",l=18e4,m={"google-generative-ai":!0,"google-vertex":!0};class n extends Error{}class o extends n{}let p=/finish reason:\s*(?:SAFETY|BLOCKLIST|PROHIBITED_CONTENT|SPII|IMAGE_SAFETY|IMAGE_PROHIBITED_CONTENT|IMAGE_RECITATION|RECITATION)\b/;async function i(a,b,d){let h,i,q;if(a.byteLength>g.E)throw Error(`audio exceeds the ${g.E/1024/1024} MB transcription limit`);let[{completeSimple:r},{getOmpRuntime:s}]=await Promise.all([Promise.resolve().then(c.bind(c,11746)),c.e(8741).then(c.bind(c,38741))]),{modelRegistry:t,settings:u}=await s(),v=((q=(0,f.parseModelString)(u.getModelRole("draft")?.trim()??""))?t.find(q.provider,q.id):void 0)??t.find(j,k);if(!v)throw Error(`${j}/${k} is not available`);let w=`${v.provider}/${v.id}`;if(!Object.hasOwn(m,v.api))throw Error(`${w} (${v.api}) cannot carry audio`);if(!v.input.includes("image"))throw Error(`${w} does not accept inline media`);let x=`${v.provider}/${v.id}`,y=await t.getApiKeyAndHeaders(v);if(!y.ok||!y.apiKey)throw Error(y.ok?`No credentials for ${x}`:y.error);let z=AbortSignal.timeout(l),A={messages:[{role:"user",content:[{type:"text",text:"Transcribe the speech in this audio file verbatim.\n- Keep the spoken language; do not translate or summarize.\n- Output only the transcript text: no heading, quotes, timestamps, or commentary.\n- If several people speak, start each speaker change on a new line.\n- If there is no intelligible speech, output exactly: [no speech]"},{type:"image",mimeType:b,data:Buffer.from(a).toString("base64")}],timestamp:Date.now()}]},B={apiKey:y.apiKey,headers:y.headers,maxTokens:32768,disableReasoning:!0,cacheRetention:"none",signal:d?AbortSignal.any([d,z]):z};for(let a=0;a<2;a+=1)try{return function(a){let b=a.content.filter(a=>"text"===a.type&&"string"==typeof a.text).map(a=>a.text).join("").trim();if("stop"!==a.stopReason&&"length"!==a.stopReason){let c=[a.errorMessage,b.slice(0,160)].filter(Boolean).join("; "),d=`transcription stopped: ${a.stopReason}${c?` (${c})`:""}`;throw(0,e.is)(a.errorId,e.Flag.ContentBlocked)||p.test(a.errorMessage??"")?new o(d):new n(d)}if(!b)throw Error("transcription returned no text");return"length"===a.stopReason?`${b}
2
2
  [transcript truncated at the output limit]`:b}(await r(v,A,B))}catch(a){if(a instanceof o&&(h=a),!(a instanceof n)||B.signal.aborted)throw h??a;i=a}throw h??i}d()}catch(a){d(a)}})},92582:a=>{a.exports=import("@oh-my-pi/pi-coding-agent")},96282:a=>{a.exports=import("@oh-my-pi/pi-tui/overlays/model-selector")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5270],()=>b(b.s=20201));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=2663,a.ids=[2663],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},9421:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(26078),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/subagents/eta/route",pathname:"/api/subagents/eta",filename:"route",bundlePath:"app/api/subagents/eta/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/subagents/eta/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/subagents/eta/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},26078:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,dynamic:()=>m,runtime:()=>l});var e=c(51455),f=c(76760),g=c(34069),h=c(23211),i=c(65369),j=a([g]);g=(j.then?(await j)():j)[0];let l="nodejs",m="force-dynamic",n={"Cache-Control":"no-store"};async function k(a){let b=new URL(a.url).searchParams.get("sessionId")?.trim()??"";if(!b)return h.NextResponse.json({error:"sessionId is required"},{status:400,headers:n});let c="";try{c=await (0,e.readFile)((0,f.join)((0,g.getAgentDir)(),"routing-ledger.jsonl"),"utf8")}catch(a){if("ENOENT"!==a.code)return h.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500,headers:n})}let d={sessionId:b,histories:(0,i.by)((0,i.OQ)(c),b)};return h.NextResponse.json(d,{headers:n})}d()}catch(a){d(a)}})},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},34069:a=>{a.exports=import("@oh-my-pi/pi-utils")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65369:(a,b,c)=>{function d(a){return"string"==typeof a?a:""}function e(a){let b=[];for(let c of a.split("\n")){let a=c.trim();if(a)try{b.push(JSON.parse(a))}catch{}}return b}function f(a,b){let c=new Map,e=new Map,f=new Map,g=[];for(let h of a){if(!h||"object"!=typeof h)continue;if("dispatch"===h.type){let a=d(h.attemptId),g=d(h.chosenModel);if(!a||!g)continue;let i="string"==typeof h.ts?Date.parse(h.ts):NaN,j={sessionId:d(h.sessionId),attemptId:a,assignmentId:d(h.assignmentId),attempt:"number"==typeof h.attempt?h.attempt:1,ts:Number.isFinite(i)?i:null,agentId:d(h.agentId),jobId:d(h.jobId),model:g,workClass:"NORMAL"===h.workClass||"HARD"===h.workClass?h.workClass:null};if(c.set(a,j),j.sessionId===b){for(let a of new Set([j.agentId,j.jobId]))a&&e.set(a,j);if(j.assignmentId&&null!==j.ts){let a=f.get(j.assignmentId);(void 0===a||j.ts<a)&&f.set(j.assignmentId,j.ts)}}continue}if("outcome"!==h.type||"completed"!==h.status)continue;let a=c.get(d(h.attemptId)),i=h.durationSec;a&&1===a.attempt&&"number"==typeof i&&i>0&&g.push({attemptId:a.attemptId,model:a.model,workClass:a.workClass,sec:i})}let h={};for(let[a,b]of e){let c=1!==b.attempt;h[a]={model:b.model,workClass:b.workClass,rework:c,attempt:b.attempt,firstDispatchedAtMs:f.get(b.assignmentId)??null,durationsSec:c?[]:g.filter(a=>a.attemptId!==b.attemptId&&a.model===b.model&&(null===b.workClass||a.workClass===b.workClass)).map(a=>a.sec).sort((a,b)=>a-b)}}return h}c.d(b,{OQ:()=>e,by:()=>f}),c(81856),c(51402)},76760:a=>{a.exports=require("node:path")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5948],()=>b(b.s=9421));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=2663,a.ids=[2663],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},26078:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,dynamic:()=>m,runtime:()=>l});var e=c(51455),f=c(76760),g=c(34069),h=c(23211),i=c(65369),j=a([g]);g=(j.then?(await j)():j)[0];let l="nodejs",m="force-dynamic",n={"Cache-Control":"no-store"};async function k(a){let b=new URL(a.url).searchParams.get("sessionId")?.trim()??"";if(!b)return h.NextResponse.json({error:"sessionId is required"},{status:400,headers:n});let c="";try{c=await (0,e.readFile)((0,f.join)((0,g.getAgentDir)(),"routing-ledger.jsonl"),"utf8")}catch(a){if("ENOENT"!==a.code)return h.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:500,headers:n})}let d={sessionId:b,histories:(0,i.by)((0,i.OQ)(c),b)};return h.NextResponse.json(d,{headers:n})}d()}catch(a){d(a)}})},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},34069:a=>{a.exports=import("@oh-my-pi/pi-utils")},37831:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(26078),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/subagents/eta/route",pathname:"/api/subagents/eta",filename:"route",bundlePath:"app/api/subagents/eta/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/subagents/eta/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/subagents/eta/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65369:(a,b,c)=>{function d(a){return"string"==typeof a?a:""}function e(a){let b=[];for(let c of a.split("\n")){let a=c.trim();if(a)try{b.push(JSON.parse(a))}catch{}}return b}function f(a,b){let c=new Map,e=new Map,f=new Map,g=[];for(let h of a){if(!h||"object"!=typeof h)continue;if("dispatch"===h.type){let a=d(h.attemptId),g=d(h.chosenModel);if(!a||!g)continue;let i="string"==typeof h.ts?Date.parse(h.ts):NaN,j={sessionId:d(h.sessionId),attemptId:a,assignmentId:d(h.assignmentId),attempt:"number"==typeof h.attempt?h.attempt:1,ts:Number.isFinite(i)?i:null,agentId:d(h.agentId),jobId:d(h.jobId),model:g,workClass:"NORMAL"===h.workClass||"HARD"===h.workClass?h.workClass:null};if(c.set(a,j),j.sessionId===b){for(let a of new Set([j.agentId,j.jobId]))a&&e.set(a,j);if(j.assignmentId&&null!==j.ts){let a=f.get(j.assignmentId);(void 0===a||j.ts<a)&&f.set(j.assignmentId,j.ts)}}continue}if("outcome"!==h.type||"completed"!==h.status)continue;let a=c.get(d(h.attemptId)),i=h.durationSec;a&&1===a.attempt&&"number"==typeof i&&i>0&&g.push({attemptId:a.attemptId,model:a.model,workClass:a.workClass,sec:i})}let h={};for(let[a,b]of e){let c=1!==b.attempt;h[a]={model:b.model,workClass:b.workClass,rework:c,attempt:b.attempt,firstDispatchedAtMs:f.get(b.assignmentId)??null,durationsSec:c?[]:g.filter(a=>a.attemptId!==b.attemptId&&a.model===b.model&&(null===b.workClass||a.workClass===b.workClass)).map(a=>a.sec).sort((a,b)=>a-b)}}return h}c.d(b,{OQ:()=>e,by:()=>f}),c(81856),c(51402)},76760:a=>{a.exports=require("node:path")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813,5948],()=>b(b.s=37831));module.exports=c})();
@@ -1,5 +1,5 @@
1
- (()=>{var a={};a.id=1881,a.ids=[1881],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4555:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>_,patchFetch:()=>$,routeModule:()=>W,serverHooks:()=>Z,workAsyncStorage:()=>X,workUnitAsyncStorage:()=>Y});var d={};c.r(d),c.d(d,{GET:()=>U,POST:()=>V,dynamic:()=>Q});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(66544),x=c(31421),y=c(73024),z=c(48161),A=c(76760),B=c(82371);let C=["done","handed-off","restart-required","failed"],D="job.json",E="update.lock",F="update.log";function G(a=process.env){let b=a.CUELO_SELF_UPDATE_DIR?.trim();return b?(0,A.resolve)(b):(0,A.join)((0,z.homedir)(),".cuelo","self-update")}function H(a){let b=(0,A.resolve)(process.cwd());return(0,y.existsSync)((0,A.join)(b,"package.json"))?b:(0,A.resolve)(a.CUELO_DIR?.trim()||b)}function I(a=process.env){let b="";try{b=(0,y.readFileSync)("/proc/self/cgroup","utf8")}catch{}return function(a){let b=a.exists??y.existsSync,c=(0,A.join)(a.homeDir,"cuelo-run"),d=(0,A.join)(c,"Tools","CUELO_Setup","wsl","update.sh"),e=/(?:^|\/)cuelo-\d+\.service(?:\/|$)/m.test(a.cgroupText);if(e&&(0,A.resolve)(a.appRoot)===(0,A.resolve)(c)&&b(d))return{mode:"wsl",supported:!0,reason:null};let f=a.distDir?.trim()||".next",g=b((0,A.join)(a.appRoot,f,"BUILD_ID"));return b((0,A.join)(a.appRoot,".git"))&&b((0,A.join)(a.appRoot,"bun.lock"))&&b((0,A.join)(a.appRoot,"app","layout.tsx"))?g?{mode:"source",supported:!0,reason:null}:{mode:"source",supported:!1,reason:"this source checkout has no production build; it is a development server, so its dist dir must not be rebuilt under it"}:g&&b((0,A.join)(a.appRoot,"install.mjs"))&&"cuelo"===(0,A.basename)(a.appRoot)&&"cuelo"===function(a){try{let b=JSON.parse((0,y.readFileSync)((0,A.join)(a,"package.json"),"utf8"));return"string"==typeof b.name?b.name:null}catch{return null}}(a.appRoot)?{mode:"npm",supported:!0,reason:null}:{mode:null,supported:!1,reason:e?`the systemd unit was found but this server does not run from ${c}`:"this CUELO install was not recognised (no production build of a source checkout or npm package, and no WSL service tree)"}}({appRoot:H(a),homeDir:a.HOME?.trim()||(0,z.homedir)(),cgroupText:b,distDir:a.CUELO_DIST_DIR})}function J(a){if(!Number.isInteger(a)||a<=0)return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code}}function K(a){try{return JSON.parse((0,y.readFileSync)(a,"utf8"))}catch{return null}}function L(a,b){let c=((0,x.spawnSync)("systemctl",["--user","is-active",a],{encoding:"utf8",timeout:3e3}).stdout??"").trim();if(c)return"active"===c||"activating"===c||"reloading"===c||"deactivating"===c;let d=Date.parse(b);return Number.isFinite(d)&&Date.now()-d<18e5}function M(a,b=J,c=L){var d;let e=function(a){if(!a||"object"!=typeof a)return null;let b="string"==typeof a.phase?a.phase:"",c="npm"===a.mode||"source"===a.mode||"wsl"===a.mode?a.mode:null;return b&&c?{schemaVersion:1,mode:c,phase:b,currentVersion:"string"==typeof a.currentVersion?a.currentVersion:"unknown",targetVersion:"string"==typeof a.targetVersion?a.targetVersion:"unknown",targetRef:"string"==typeof a.targetRef?a.targetRef:null,pid:"number"==typeof a.pid?a.pid:null,supervisorPid:"number"==typeof a.supervisorPid?a.supervisorPid:null,relaunchedPid:"number"==typeof a.relaunchedPid?a.relaunchedPid:null,startedAt:"string"==typeof a.startedAt?a.startedAt:new Date(0).toISOString(),updatedAt:"string"==typeof a.updatedAt?a.updatedAt:new Date(0).toISOString(),error:"string"==typeof a.error?a.error:null,logPath:"string"==typeof a.logPath?a.logPath:(0,A.join)(G(),F)}:null}(K((0,A.join)(a,D)));if(!e)return{job:null,running:!1};if("handed-off"===e.phase)return{job:e,running:!!e.targetRef&&c(e.targetRef,e.updatedAt)};if(d=e.phase,C.includes(d))return{job:e,running:!1};let f=K((0,A.join)(a,E)),g="number"==typeof f?.pid?f.pid:e.pid;return{job:e,running:null!==g&&b(g)}}function N(a=G()){let{job:b,running:c}=M(a);return{job:b,running:c,mode:I(),runningVersion:(0,B.Bp)("0.10.102")??"unknown"}}function O(a,b){let c=a.lastIndexOf(b),d=c>=0?a[c+1]:void 0;return d&&!d.startsWith("--")?d:null}async function P(a={}){let b,c,d=a.env??process.env,e=a.dir??G(d),f=a.mode??I(d);if(!f.supported||!f.mode)return{state:"unsupported",mode:f};let g=f.mode;(0,y.mkdirSync)(e,{recursive:!0});let h=M(e,J,a.unitRunning);if(h.running&&h.job)return{state:"running",job:h.job};!function(a,b){if(M(a,J,b).running)return;let c=(0,A.join)(a,E),d=K(c);if(d&&"number"==typeof d.pid){if(d.pid===process.pid||J(d.pid))return}else if(Date.now()-((0,y.statSync)(c,{throwIfNoEntry:!1})?.mtimeMs??0)<6e5)return;(0,y.rmSync)(c,{force:!0})}(e,a.unitRunning);let i=d.NEXT_PUBLIC_APP_VERSION??"";try{b=a.status?await a.status({currentAppVersion:i}):await (0,B.wt)()}catch(a){return{state:"error",error:a instanceof Error?a.message:String(a)}}if(!b.updateAvailable||!b.latestRelease)return{state:"up-to-date",currentVersion:b.currentAppVersion};let j=function(a){let b=(0,A.join)(a,E);try{let a=(0,y.openSync)(b,"wx");(0,y.writeFileSync)(a,JSON.stringify({pid:process.pid,startedAt:new Date().toISOString()})),(0,y.closeSync)(a)}catch(a){if("EEXIST"!==a.code)throw a;return null}return()=>{(0,y.rmSync)(b,{force:!0})}}(e);if(!j){let b=M(e,J,a.unitRunning);return b.running&&b.job?{state:"running",job:b.job}:{state:"error",error:`another update holds ${(0,A.join)(e,E)}`}}let k=H(d),l="wsl"===g?null:function(a){let b=K((0,A.join)(a,"supervisor.json"));if(!b||"string"!=typeof b.command||!Array.isArray(b.args))return null;let c=b.args.filter(a=>"string"==typeof a);return"number"!=typeof b.pid||"string"!=typeof b.cwd?null:{schemaVersion:1,pid:b.pid,command:b.command,args:c,cwd:b.cwd}}(e),m=Number.parseInt(d.CUELO_SUPERVISOR_PID??"",10),n=null!==l&&Number.isInteger(m)&&l.pid===m?l:null,o=b.latestRelease.version,p=new Date().toISOString(),q={schemaVersion:1,mode:g,phase:"starting",currentVersion:b.currentAppVersion,targetVersion:o,targetRef:null,pid:null,supervisorPid:l?.pid??null,relaunchedPid:null,startedAt:p,updatedAt:p,error:null,logPath:(0,A.join)(e,F)};(0,y.writeFileSync)((0,A.join)(e,D),`${JSON.stringify(q,null,2)}
1
+ (()=>{var a={};a.id=1881,a.ids=[1881],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4555:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>_,patchFetch:()=>$,routeModule:()=>W,serverHooks:()=>Z,workAsyncStorage:()=>X,workUnitAsyncStorage:()=>Y});var d={};c.r(d),c.d(d,{GET:()=>U,POST:()=>V,dynamic:()=>Q});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(66544),x=c(31421),y=c(73024),z=c(48161),A=c(76760),B=c(82371);let C=["done","handed-off","restart-required","failed"],D="job.json",E="update.lock",F="update.log";function G(a=process.env){let b=a.CUELO_SELF_UPDATE_DIR?.trim();return b?(0,A.resolve)(b):(0,A.join)((0,z.homedir)(),".cuelo","self-update")}function H(a){let b=(0,A.resolve)(process.cwd());return(0,y.existsSync)((0,A.join)(b,"package.json"))?b:(0,A.resolve)(a.CUELO_DIR?.trim()||b)}function I(a=process.env){let b="";try{b=(0,y.readFileSync)("/proc/self/cgroup","utf8")}catch{}return function(a){let b=a.exists??y.existsSync,c=(0,A.join)(a.homeDir,"cuelo-run"),d=(0,A.join)(c,"Tools","CUELO_Setup","wsl","update.sh"),e=/(?:^|\/)cuelo-\d+\.service(?:\/|$)/m.test(a.cgroupText);if(e&&(0,A.resolve)(a.appRoot)===(0,A.resolve)(c)&&b(d))return{mode:"wsl",supported:!0,reason:null};let f=a.distDir?.trim()||".next",g=b((0,A.join)(a.appRoot,f,"BUILD_ID"));return b((0,A.join)(a.appRoot,".git"))&&b((0,A.join)(a.appRoot,"bun.lock"))&&b((0,A.join)(a.appRoot,"app","layout.tsx"))?g?{mode:"source",supported:!0,reason:null}:{mode:"source",supported:!1,reason:"this source checkout has no production build; it is a development server, so its dist dir must not be rebuilt under it"}:g&&b((0,A.join)(a.appRoot,"install.mjs"))&&"cuelo"===(0,A.basename)(a.appRoot)&&"cuelo"===function(a){try{let b=JSON.parse((0,y.readFileSync)((0,A.join)(a,"package.json"),"utf8"));return"string"==typeof b.name?b.name:null}catch{return null}}(a.appRoot)?{mode:"npm",supported:!0,reason:null}:{mode:null,supported:!1,reason:e?`the systemd unit was found but this server does not run from ${c}`:"this CUELO install was not recognised (no production build of a source checkout or npm package, and no WSL service tree)"}}({appRoot:H(a),homeDir:a.HOME?.trim()||(0,z.homedir)(),cgroupText:b,distDir:a.CUELO_DIST_DIR})}function J(a){if(!Number.isInteger(a)||a<=0)return!1;try{return process.kill(a,0),!0}catch(a){return"EPERM"===a.code}}function K(a){try{return JSON.parse((0,y.readFileSync)(a,"utf8"))}catch{return null}}function L(a,b){let c=((0,x.spawnSync)("systemctl",["--user","is-active",a],{encoding:"utf8",timeout:3e3}).stdout??"").trim();if(c)return"active"===c||"activating"===c||"reloading"===c||"deactivating"===c;let d=Date.parse(b);return Number.isFinite(d)&&Date.now()-d<18e5}function M(a,b=J,c=L){var d;let e=function(a){if(!a||"object"!=typeof a)return null;let b="string"==typeof a.phase?a.phase:"",c="npm"===a.mode||"source"===a.mode||"wsl"===a.mode?a.mode:null;return b&&c?{schemaVersion:1,mode:c,phase:b,currentVersion:"string"==typeof a.currentVersion?a.currentVersion:"unknown",targetVersion:"string"==typeof a.targetVersion?a.targetVersion:"unknown",targetRef:"string"==typeof a.targetRef?a.targetRef:null,pid:"number"==typeof a.pid?a.pid:null,supervisorPid:"number"==typeof a.supervisorPid?a.supervisorPid:null,relaunchedPid:"number"==typeof a.relaunchedPid?a.relaunchedPid:null,startedAt:"string"==typeof a.startedAt?a.startedAt:new Date(0).toISOString(),updatedAt:"string"==typeof a.updatedAt?a.updatedAt:new Date(0).toISOString(),error:"string"==typeof a.error?a.error:null,logPath:"string"==typeof a.logPath?a.logPath:(0,A.join)(G(),F)}:null}(K((0,A.join)(a,D)));if(!e)return{job:null,running:!1};if("handed-off"===e.phase)return{job:e,running:!!e.targetRef&&c(e.targetRef,e.updatedAt)};if(d=e.phase,C.includes(d))return{job:e,running:!1};let f=K((0,A.join)(a,E)),g="number"==typeof f?.pid?f.pid:e.pid;return{job:e,running:null!==g&&b(g)}}function N(a=G()){let{job:b,running:c}=M(a);return{job:b,running:c,mode:I(),runningVersion:(0,B.Bp)("0.10.103")??"unknown"}}function O(a,b){let c=a.lastIndexOf(b),d=c>=0?a[c+1]:void 0;return d&&!d.startsWith("--")?d:null}async function P(a={}){let b,c,d=a.env??process.env,e=a.dir??G(d),f=a.mode??I(d);if(!f.supported||!f.mode)return{state:"unsupported",mode:f};let g=f.mode;(0,y.mkdirSync)(e,{recursive:!0});let h=M(e,J,a.unitRunning);if(h.running&&h.job)return{state:"running",job:h.job};!function(a,b){if(M(a,J,b).running)return;let c=(0,A.join)(a,E),d=K(c);if(d&&"number"==typeof d.pid){if(d.pid===process.pid||J(d.pid))return}else if(Date.now()-((0,y.statSync)(c,{throwIfNoEntry:!1})?.mtimeMs??0)<6e5)return;(0,y.rmSync)(c,{force:!0})}(e,a.unitRunning);let i=d.NEXT_PUBLIC_APP_VERSION??"";try{b=a.status?await a.status({currentAppVersion:i}):await (0,B.wt)()}catch(a){return{state:"error",error:a instanceof Error?a.message:String(a)}}if(!b.updateAvailable||!b.latestRelease)return{state:"up-to-date",currentVersion:b.currentAppVersion};let j=function(a){let b=(0,A.join)(a,E);try{let a=(0,y.openSync)(b,"wx");(0,y.writeFileSync)(a,JSON.stringify({pid:process.pid,startedAt:new Date().toISOString()})),(0,y.closeSync)(a)}catch(a){if("EEXIST"!==a.code)throw a;return null}return()=>{(0,y.rmSync)(b,{force:!0})}}(e);if(!j){let b=M(e,J,a.unitRunning);return b.running&&b.job?{state:"running",job:b.job}:{state:"error",error:`another update holds ${(0,A.join)(e,E)}`}}let k=H(d),l="wsl"===g?null:function(a){let b=K((0,A.join)(a,"supervisor.json"));if(!b||"string"!=typeof b.command||!Array.isArray(b.args))return null;let c=b.args.filter(a=>"string"==typeof a);return"number"!=typeof b.pid||"string"!=typeof b.cwd?null:{schemaVersion:1,pid:b.pid,command:b.command,args:c,cwd:b.cwd}}(e),m=Number.parseInt(d.CUELO_SUPERVISOR_PID??"",10),n=null!==l&&Number.isInteger(m)&&l.pid===m?l:null,o=b.latestRelease.version,p=new Date().toISOString(),q={schemaVersion:1,mode:g,phase:"starting",currentVersion:b.currentAppVersion,targetVersion:o,targetRef:null,pid:null,supervisorPid:l?.pid??null,relaunchedPid:null,startedAt:p,updatedAt:p,error:null,logPath:(0,A.join)(e,F)};(0,y.writeFileSync)((0,A.join)(e,D),`${JSON.stringify(q,null,2)}
2
2
  `);let r={schemaVersion:1,mode:g,appRoot:k,selfUpdateDir:e,currentVersion:b.currentAppVersion,targetVersion:o,tagName:b.latestRelease.tagName,logPath:(0,A.join)(e,F),nodeBin:d.CUELO_SELF_UPDATE_NODE?.trim()||"node",distDir:d.CUELO_DIST_DIR?.trim()||null,npmBin:d.CUELO_NPM_BIN?.trim()||("win32"===process.platform?"npm.cmd":"npm"),home:(c=n?O(n.args,"--home"):null)?(0,A.isAbsolute)(c)?c:(0,A.resolve)(n?n.cwd:process.cwd(),c):null,webPort:Number.parseInt((n?O(n.args,"--port-base"):null)??d.PORT??"",10)||30141,supervisor:n,wsl:"wsl"===g?{script:(0,A.join)(d.HOME?.trim()||(0,z.homedir)(),"cuelo-run","Tools","CUELO_Setup","wsl","update.sh"),distro:d.WSL_DISTRO_NAME??null,port:Number.parseInt(d.PORT??"",10)||30141}:null},s=(0,A.join)(e,"plan.json");(0,y.writeFileSync)(s,`${JSON.stringify(r,null,2)}
3
3
  `);try{let b=(a.spawnWorker??((a,b)=>(function(a,b,c){let d=(0,A.join)(H(c),"bin","self-update.js"),e=(0,A.join)(b,"worker.js");(0,y.copyFileSync)(d,e);let f=c.CUELO_SELF_UPDATE_NODE?.trim()||"node",g=(0,y.openSync)((0,A.join)(b,F),"a");try{let d=(0,x.spawn)(f,[e,a],{cwd:H(c),detached:!0,stdio:["ignore",g,g],env:{...c,CUELO_SELF_UPDATE_DIR:b}});if(d.unref(),!d.pid)throw Error(`could not start ${f} ${e}`);return d.pid}finally{(0,y.closeSync)(g)}})(a,b,d)))(s,e),c={...q,pid:b,updatedAt:new Date().toISOString()};return(0,y.writeFileSync)((0,A.join)(e,D),`${JSON.stringify(c,null,2)}
4
4
  `),{state:"started",job:c}}catch(b){j();let a=b instanceof Error?b.message:String(b);return(0,y.writeFileSync)((0,A.join)(e,D),`${JSON.stringify({...q,phase:"failed",error:a,updatedAt:new Date().toISOString()},null,2)}
5
- `),{state:"error",error:a}}}let Q="force-dynamic";function R(){return{"Cache-Control":"private, no-store",Connection:"close"}}function S(a){let b=a.job;return{mode:a.mode.mode,supported:a.mode.supported,reason:a.mode.reason,running:a.running,runningVersion:a.runningVersion,job:b?{mode:b.mode,phase:b.phase,currentVersion:b.currentVersion,targetVersion:b.targetVersion,targetRef:b.targetRef,startedAt:b.startedAt,updatedAt:b.updatedAt,error:b.error,logPath:b.logPath}:null}}function T(a,b){return v.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:b,headers:R()})}async function U(a){if(!(0,w.EN)(a))return T("Untrusted API request",403);try{return v.NextResponse.json(S(N()),{headers:R()})}catch(a){return T(a,500)}}async function V(a){if(!(0,w.EN)(a))return T("Untrusted API request",403);if(!(0,w.E2)(a))return T("Content-Type must be application/json",415);try{let a=await P();if("unsupported"===a.state)return v.NextResponse.json({state:a.state,...S(N())},{status:409,headers:R()});if("error"===a.state)return T(a.error,500);return v.NextResponse.json({state:a.state,...S(N())},{headers:R()})}catch(a){return T(a,500)}}let W=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/updates/apply/route",pathname:"/api/updates/apply",filename:"route",bundlePath:"app/api/updates/apply/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/updates/apply/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:X,workUnitAsyncStorage:Y,serverHooks:Z}=W;function $(){return(0,g.patchFetch)({workAsyncStorage:X,workUnitAsyncStorage:Y})}async function _(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),W.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/updates/apply/route";"/index"===d&&(d="/");let e=await W.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(I&&!z){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||W.isDev||z||(K="/index"===(K=E)?"/":K);let L=!0===W.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await W.getIncrementalCache(a,x,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>W.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>W.handle(X,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await W.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await W.handleResponse({req:a,nextConfig:x,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await W.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>k,EN:()=>j,e9:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}function j(a,b=g()){return!!i(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},82371:(a,b,c)=>{"use strict";c.d(b,{Bp:()=>f,wt:()=>h});let d="https://github.com/gim47656-ship-it/CUELO/releases";function e(a){let b=String(a??"").trim().replace(/^[^0-9]*/,""),c=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(b);return c?{major:Number(c[1]),minor:Number(c[2]),patch:Number(c[3]),prerelease:c[4]?c[4].split("."):null}:null}function f(a){let b=e(a);if(!b)return null;let c=`${b.major}.${b.minor}.${b.patch}`;return b.prerelease?`${c}-${b.prerelease.join(".")}`:c}async function g(a){let b=new AbortController,c=setTimeout(()=>b.abort(),12e3);try{let c=await a("https://api.github.com/repos/gim47656-ship-it/CUELO/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":"cuelo-update-check"},signal:b.signal,next:{revalidate:3600}});if(404===c.status)return null;if(!c.ok)throw Error(`Update source returned HTTP ${c.status}`);return await c.json()}finally{clearTimeout(c)}}async function h(a={}){var b;let c=a.fetcher??fetch,i=f(a.currentAppVersion??"0.10.102")??"unknown",j=await g(c),k=j?function(a){let b=f(a.tag_name);if(!b)throw Error("The CUELO release did not contain a valid version tag");let c="string"==typeof a.tag_name&&a.tag_name.trim()?a.tag_name.trim():`v${b}`,e="string"==typeof a.html_url&&a.html_url.startsWith(`${d}/`)?a.html_url:`${d}/tag/${encodeURIComponent(c)}`,g="string"==typeof a.body?a.body.slice(0,4e4):"";return{version:b,tagName:c,name:"string"==typeof a.name&&a.name.trim()?a.name.trim():c,body:g,htmlUrl:e,publishedAt:"string"==typeof a.published_at?a.published_at:null}}(j):null;return{currentAppVersion:i,latestRelease:k,updateAvailable:(b=k?.version??null,!!(b&&i&&function(a,b){let c=e(a),d=e(b);if(!c||!d)return 0;for(let a of["major","minor","patch"])if(c[a]!==d[a])return c[a]>d[a]?1:-1;if(!c.prerelease&&!d.prerelease)return 0;if(!c.prerelease)return 1;if(!d.prerelease)return -1;let f=Math.max(c.prerelease.length,d.prerelease.length);for(let a=0;a<f;a+=1){let b=c.prerelease[a],e=d.prerelease[a];if(void 0===b)return -1;if(void 0===e)return 1;if(b===e)continue;let f=/^\d+$/.test(b),g=/^\d+$/.test(e);if(f&&g){let a=Number(b),c=Number(e);if(a!==c)return a>c?1:-1;continue}if(f!==g)return f?-1:1;return b>e?1:-1}return 0}(b,i)>0)),checkedAt:new Date().toISOString()}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=4555));module.exports=c})();
5
+ `),{state:"error",error:a}}}let Q="force-dynamic";function R(){return{"Cache-Control":"private, no-store",Connection:"close"}}function S(a){let b=a.job;return{mode:a.mode.mode,supported:a.mode.supported,reason:a.mode.reason,running:a.running,runningVersion:a.runningVersion,job:b?{mode:b.mode,phase:b.phase,currentVersion:b.currentVersion,targetVersion:b.targetVersion,targetRef:b.targetRef,startedAt:b.startedAt,updatedAt:b.updatedAt,error:b.error,logPath:b.logPath}:null}}function T(a,b){return v.NextResponse.json({error:a instanceof Error?a.message:String(a)},{status:b,headers:R()})}async function U(a){if(!(0,w.EN)(a))return T("Untrusted API request",403);try{return v.NextResponse.json(S(N()),{headers:R()})}catch(a){return T(a,500)}}async function V(a){if(!(0,w.EN)(a))return T("Untrusted API request",403);if(!(0,w.E2)(a))return T("Content-Type must be application/json",415);try{let a=await P();if("unsupported"===a.state)return v.NextResponse.json({state:a.state,...S(N())},{status:409,headers:R()});if("error"===a.state)return T(a.error,500);return v.NextResponse.json({state:a.state,...S(N())},{headers:R()})}catch(a){return T(a,500)}}let W=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/updates/apply/route",pathname:"/api/updates/apply",filename:"route",bundlePath:"app/api/updates/apply/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/updates/apply/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:X,workUnitAsyncStorage:Y,serverHooks:Z}=W;function $(){return(0,g.patchFetch)({workAsyncStorage:X,workUnitAsyncStorage:Y})}async function _(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),W.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/updates/apply/route";"/index"===d&&(d="/");let e=await W.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,y,!1):b.end("This page could not be found"),null);if(I&&!z){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||W.isDev||z||(K="/index"===(K=E)?"/":K);let L=!0===W.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await W.getIncrementalCache(a,x,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:w,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>W.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g,deploymentId:v}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>W.handle(X,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await W.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await W.handleResponse({req:a,nextConfig:x,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await W.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{"use strict";a.exports=require("node:child_process")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48161:a=>{"use strict";a.exports=require("node:os")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>k,EN:()=>j,e9:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}function j(a,b=g()){return!!i(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},82371:(a,b,c)=>{"use strict";c.d(b,{Bp:()=>f,wt:()=>h});let d="https://github.com/gim47656-ship-it/CUELO/releases";function e(a){let b=String(a??"").trim().replace(/^[^0-9]*/,""),c=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(b);return c?{major:Number(c[1]),minor:Number(c[2]),patch:Number(c[3]),prerelease:c[4]?c[4].split("."):null}:null}function f(a){let b=e(a);if(!b)return null;let c=`${b.major}.${b.minor}.${b.patch}`;return b.prerelease?`${c}-${b.prerelease.join(".")}`:c}async function g(a){let b=new AbortController,c=setTimeout(()=>b.abort(),12e3);try{let c=await a("https://api.github.com/repos/gim47656-ship-it/CUELO/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":"cuelo-update-check"},signal:b.signal,next:{revalidate:3600}});if(404===c.status)return null;if(!c.ok)throw Error(`Update source returned HTTP ${c.status}`);return await c.json()}finally{clearTimeout(c)}}async function h(a={}){var b;let c=a.fetcher??fetch,i=f(a.currentAppVersion??"0.10.103")??"unknown",j=await g(c),k=j?function(a){let b=f(a.tag_name);if(!b)throw Error("The CUELO release did not contain a valid version tag");let c="string"==typeof a.tag_name&&a.tag_name.trim()?a.tag_name.trim():`v${b}`,e="string"==typeof a.html_url&&a.html_url.startsWith(`${d}/`)?a.html_url:`${d}/tag/${encodeURIComponent(c)}`,g="string"==typeof a.body?a.body.slice(0,4e4):"";return{version:b,tagName:c,name:"string"==typeof a.name&&a.name.trim()?a.name.trim():c,body:g,htmlUrl:e,publishedAt:"string"==typeof a.published_at?a.published_at:null}}(j):null;return{currentAppVersion:i,latestRelease:k,updateAvailable:(b=k?.version??null,!!(b&&i&&function(a,b){let c=e(a),d=e(b);if(!c||!d)return 0;for(let a of["major","minor","patch"])if(c[a]!==d[a])return c[a]>d[a]?1:-1;if(!c.prerelease&&!d.prerelease)return 0;if(!c.prerelease)return 1;if(!d.prerelease)return -1;let f=Math.max(c.prerelease.length,d.prerelease.length);for(let a=0;a<f;a+=1){let b=c.prerelease[a],e=d.prerelease[a];if(void 0===b)return -1;if(void 0===e)return 1;if(b===e)continue;let f=/^\d+$/.test(b),g=/^\d+$/.test(e);if(f&&g){let a=Number(b),c=Number(e);if(a!==c)return a>c?1:-1;continue}if(f!==g)return f?-1:1;return b>e?1:-1}return 0}(b,i)>0)),checkedAt:new Date().toISOString()}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=4555));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=5572,a.ids=[5572],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10581:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{GET:()=>z,dynamic:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(66544),x=c(82371);let y="force-dynamic";async function z(a){if(!(0,w.EN)(a))return v.NextResponse.json({error:"Untrusted API request"},{status:403});try{let a=await (0,x.wt)();return v.NextResponse.json(a,{headers:{"Cache-Control":"private, no-store"}})}catch(b){let a=b instanceof Error?b.message:String(b);return v.NextResponse.json({error:a||"Unable to check for updates"},{status:502})}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/updates/route",pathname:"/api/updates",filename:"route",bundlePath:"app/api/updates/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/updates/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),A.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/updates/route";"/index"===d&&(d="/");let e=await A.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||A.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===A.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await A.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>A.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>A.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await A.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>k,EN:()=>j,e9:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}function j(a,b=g()){return!!i(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},82371:(a,b,c)=>{"use strict";c.d(b,{Bp:()=>f,wt:()=>h});let d="https://github.com/gim47656-ship-it/CUELO/releases";function e(a){let b=String(a??"").trim().replace(/^[^0-9]*/,""),c=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(b);return c?{major:Number(c[1]),minor:Number(c[2]),patch:Number(c[3]),prerelease:c[4]?c[4].split("."):null}:null}function f(a){let b=e(a);if(!b)return null;let c=`${b.major}.${b.minor}.${b.patch}`;return b.prerelease?`${c}-${b.prerelease.join(".")}`:c}async function g(a){let b=new AbortController,c=setTimeout(()=>b.abort(),12e3);try{let c=await a("https://api.github.com/repos/gim47656-ship-it/CUELO/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":"cuelo-update-check"},signal:b.signal,next:{revalidate:3600}});if(404===c.status)return null;if(!c.ok)throw Error(`Update source returned HTTP ${c.status}`);return await c.json()}finally{clearTimeout(c)}}async function h(a={}){var b;let c=a.fetcher??fetch,i=f(a.currentAppVersion??"0.10.102")??"unknown",j=await g(c),k=j?function(a){let b=f(a.tag_name);if(!b)throw Error("The CUELO release did not contain a valid version tag");let c="string"==typeof a.tag_name&&a.tag_name.trim()?a.tag_name.trim():`v${b}`,e="string"==typeof a.html_url&&a.html_url.startsWith(`${d}/`)?a.html_url:`${d}/tag/${encodeURIComponent(c)}`,g="string"==typeof a.body?a.body.slice(0,4e4):"";return{version:b,tagName:c,name:"string"==typeof a.name&&a.name.trim()?a.name.trim():c,body:g,htmlUrl:e,publishedAt:"string"==typeof a.published_at?a.published_at:null}}(j):null;return{currentAppVersion:i,latestRelease:k,updateAvailable:(b=k?.version??null,!!(b&&i&&function(a,b){let c=e(a),d=e(b);if(!c||!d)return 0;for(let a of["major","minor","patch"])if(c[a]!==d[a])return c[a]>d[a]?1:-1;if(!c.prerelease&&!d.prerelease)return 0;if(!c.prerelease)return 1;if(!d.prerelease)return -1;let f=Math.max(c.prerelease.length,d.prerelease.length);for(let a=0;a<f;a+=1){let b=c.prerelease[a],e=d.prerelease[a];if(void 0===b)return -1;if(void 0===e)return 1;if(b===e)continue;let f=/^\d+$/.test(b),g=/^\d+$/.test(e);if(f&&g){let a=Number(b),c=Number(e);if(a!==c)return a>c?1:-1;continue}if(f!==g)return f?-1:1;return b>e?1:-1}return 0}(b,i)>0)),checkedAt:new Date().toISOString()}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=10581));module.exports=c})();
1
+ (()=>{var a={};a.id=5572,a.ids=[5572],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10581:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{GET:()=>z,dynamic:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(66544),x=c(82371);let y="force-dynamic";async function z(a){if(!(0,w.EN)(a))return v.NextResponse.json({error:"Untrusted API request"},{status:403});try{let a=await (0,x.wt)();return v.NextResponse.json(a,{headers:{"Cache-Control":"private, no-store"}})}catch(b){let a=b instanceof Error?b.message:String(b);return v.NextResponse.json({error:a||"Unable to check for updates"},{status:502})}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/updates/route",pathname:"/api/updates",filename:"route",bundlePath:"app/api/updates/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/CUELO/CUELO/app/api/updates/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),A.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/updates/route";"/index"===d&&(d="/");let e=await A.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:z,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!z){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||A.isDev||z||(L="/index"===(L=F)?"/":L);let M=!0===A.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await A.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>A.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>A.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await A.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),z&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},66544:(a,b,c)=>{"use strict";c.d(b,{E2:()=>k,EN:()=>j,e9:()=>i});var d=c(77030);function e(a){return(a.startsWith("[")&&a.endsWith("]")?a.slice(1,-1):a).toLowerCase().replace(/\.$/,"")}function f(a){if(!a||/[\s/@\\]/.test(a))return null;try{let b=new URL(`http://${a}`);if(b.username||b.password||"/"!==b.pathname||b.search||b.hash)return null;return e(b.hostname)}catch{return null}}function g(){return[process.env.CUELO_HOSTNAME,...process.env.CUELO_ALLOWED_HOSTS?.split(",")??[]].filter(a=>!!a?.trim())}function h(a){try{return new URL(a).origin}catch{return null}}function i(a,b=g()){let c=a.headers.get("host"),h=c?f(c):null;return!!h&&(!!("localhost"===h||h.endsWith(".localhost")||(0,d.isIP)(h))||b.some(a=>{let b;return((b=a?.trim())?(0,d.isIP)(b)?e(b):f(b):null)===h}))}function j(a,b=g()){return!!i(a,b)&&(!!function(a){if("GET"!==a.method||"navigate"!==a.headers.get("sec-fetch-mode")||"document"!==a.headers.get("sec-fetch-dest")||"?1"!==a.headers.get("sec-fetch-user"))return!1;try{return/^\/api\/sessions\/[^/]+\/export$/.test(new URL(a.url).pathname)}catch{return!1}}(a)||!(a.headers.has("origin")||a.headers.has("sec-fetch-site"))||function(a){let b,c,d=a.headers.get("origin");if("cross-site"===a.headers.get("sec-fetch-site"))return!1;if(!d)return!0;let e=(b=new URL(a.url),(c=a.headers.get("host"))?h(`${b.protocol}//${c}`):null);return null!==e&&h(d)===e}(a))}function k(a){let b=a.headers.get("content-type")?.split(";",1)[0]?.trim().toLowerCase();return"application/json"===b||!!(b?.startsWith("application/")&&b.endsWith("+json"))}},77030:a=>{"use strict";a.exports=require("node:net")},78335:()=>{},82371:(a,b,c)=>{"use strict";c.d(b,{Bp:()=>f,wt:()=>h});let d="https://github.com/gim47656-ship-it/CUELO/releases";function e(a){let b=String(a??"").trim().replace(/^[^0-9]*/,""),c=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(b);return c?{major:Number(c[1]),minor:Number(c[2]),patch:Number(c[3]),prerelease:c[4]?c[4].split("."):null}:null}function f(a){let b=e(a);if(!b)return null;let c=`${b.major}.${b.minor}.${b.patch}`;return b.prerelease?`${c}-${b.prerelease.join(".")}`:c}async function g(a){let b=new AbortController,c=setTimeout(()=>b.abort(),12e3);try{let c=await a("https://api.github.com/repos/gim47656-ship-it/CUELO/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":"cuelo-update-check"},signal:b.signal,next:{revalidate:3600}});if(404===c.status)return null;if(!c.ok)throw Error(`Update source returned HTTP ${c.status}`);return await c.json()}finally{clearTimeout(c)}}async function h(a={}){var b;let c=a.fetcher??fetch,i=f(a.currentAppVersion??"0.10.103")??"unknown",j=await g(c),k=j?function(a){let b=f(a.tag_name);if(!b)throw Error("The CUELO release did not contain a valid version tag");let c="string"==typeof a.tag_name&&a.tag_name.trim()?a.tag_name.trim():`v${b}`,e="string"==typeof a.html_url&&a.html_url.startsWith(`${d}/`)?a.html_url:`${d}/tag/${encodeURIComponent(c)}`,g="string"==typeof a.body?a.body.slice(0,4e4):"";return{version:b,tagName:c,name:"string"==typeof a.name&&a.name.trim()?a.name.trim():c,body:g,htmlUrl:e,publishedAt:"string"==typeof a.published_at?a.published_at:null}}(j):null;return{currentAppVersion:i,latestRelease:k,updateAvailable:(b=k?.version??null,!!(b&&i&&function(a,b){let c=e(a),d=e(b);if(!c||!d)return 0;for(let a of["major","minor","patch"])if(c[a]!==d[a])return c[a]>d[a]?1:-1;if(!c.prerelease&&!d.prerelease)return 0;if(!c.prerelease)return 1;if(!d.prerelease)return -1;let f=Math.max(c.prerelease.length,d.prerelease.length);for(let a=0;a<f;a+=1){let b=c.prerelease[a],e=d.prerelease[a];if(void 0===b)return -1;if(void 0===e)return 1;if(b===e)continue;let f=/^\d+$/.test(b),g=/^\d+$/.test(e);if(f&&g){let a=Number(b),c=Number(e);if(a!==c)return a>c?1:-1;continue}if(f!==g)return f?-1:1;return b>e?1:-1}return 0}(b,i)>0)),checkedAt:new Date().toISOString()}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=10581));module.exports=c})();