bit-office 1.2.2 → 1.2.3

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 (101) hide show
  1. package/dist/index.js +5247 -1840
  2. package/dist/index.js.map +1 -1
  3. package/dist/web/404.html +60 -50
  4. package/dist/web/_next/static/chunks/262.c930af897fc1ae41.js +1 -0
  5. package/dist/web/_next/static/chunks/27.d81804d60bc0f4f0.js +1 -0
  6. package/dist/web/_next/static/chunks/276-7203e26618727a54.js +1 -0
  7. package/dist/web/_next/static/chunks/29.5e4e3e30b02d00ad.js +1 -0
  8. package/dist/web/_next/static/chunks/290.247befe60cb2d28d.js +1 -0
  9. package/dist/web/_next/static/chunks/293.e3a551b691c61d55.js +1 -0
  10. package/dist/web/_next/static/chunks/297.2c14111a5babdc3f.js +1 -0
  11. package/dist/web/_next/static/chunks/336.8eafff71d277c552.js +1 -0
  12. package/dist/web/_next/static/chunks/337.d02d761d8479a26b.js +1 -0
  13. package/dist/web/_next/static/chunks/363.e8a82fede2ce0268.js +1 -0
  14. package/dist/web/_next/static/chunks/368.17f62d3909ec67e9.js +1 -0
  15. package/dist/web/_next/static/chunks/484.9bea1cffd0a0c25d.js +1 -0
  16. package/dist/web/_next/static/chunks/606.64076fb5c9a76eb8.js +1 -0
  17. package/dist/web/_next/static/chunks/611.a9c4df24fea6fe06.js +1 -0
  18. package/dist/web/_next/static/chunks/689-57cf7e431c713dac.js +1 -0
  19. package/dist/web/_next/static/chunks/729.f8f9847d2d765724.js +1 -0
  20. package/dist/web/_next/static/chunks/73.84b7325688d17248.js +1 -0
  21. package/dist/web/_next/static/chunks/757.704acf1f09ac05cb.js +1 -0
  22. package/dist/web/_next/static/chunks/767-52fa35b605461336.js +1 -0
  23. package/dist/web/_next/static/chunks/794.4c6f7ebfcb65fff9.js +1 -0
  24. package/dist/web/_next/static/chunks/810.39f7a3b8c687a8e4.js +1 -0
  25. package/dist/web/_next/static/chunks/849.04bc4b508495ab91.js +1 -0
  26. package/dist/web/_next/static/chunks/853.1223037341c73df9.js +1 -0
  27. package/dist/web/_next/static/chunks/88.219a7fc3735b6d2b.js +1 -0
  28. package/dist/web/_next/static/chunks/880.0799bc27d833d679.js +1 -0
  29. package/dist/web/_next/static/chunks/883.9832cb2358508994.js +1 -0
  30. package/dist/web/_next/static/chunks/895.b20c839956b4d7fa.js +1 -0
  31. package/dist/web/_next/static/chunks/913.d5d32ae6956a650a.js +1 -0
  32. package/dist/web/_next/static/chunks/955.8d32a077607d5dd4.js +1 -0
  33. package/dist/web/_next/static/chunks/999.59e64ccb62c7e043.js +1 -0
  34. package/dist/web/_next/static/chunks/app/_not-found/page-fc90e6f750996b0a.js +1 -0
  35. package/dist/web/_next/static/chunks/app/join/{page-7e3ac640395d940a.js → page-98fb24f2e87aa173.js} +1 -1
  36. package/dist/web/_next/static/chunks/app/layout-a57e585fdbd6e50f.js +1 -0
  37. package/dist/web/_next/static/chunks/app/not-found-fc90e6f750996b0a.js +1 -0
  38. package/dist/web/_next/static/chunks/app/office/page-7e64f4657627f13b.js +1 -0
  39. package/dist/web/_next/static/chunks/app/pair/page-67f86e4adcdf34ea.js +1 -0
  40. package/dist/web/_next/static/chunks/webpack-ecac0d5245a37138.js +1 -0
  41. package/dist/web/_next/static/css/7a1e811bf3f4909f.css +3 -0
  42. package/dist/web/index.html +60 -50
  43. package/dist/web/index.txt +73 -65
  44. package/dist/web/join.html +60 -50
  45. package/dist/web/join.txt +74 -66
  46. package/dist/web/manifest.json +1 -1
  47. package/dist/web/office.html +61 -50
  48. package/dist/web/office.txt +74 -66
  49. package/dist/web/offices/cute-whimsical.jpeg +0 -0
  50. package/dist/web/offices/cute-whimsical.zip +0 -0
  51. package/dist/web/offices/cyberpunk.jpeg +0 -0
  52. package/dist/web/offices/cyberpunk.zip +0 -0
  53. package/dist/web/offices/darkLegend.jpeg +0 -0
  54. package/dist/web/offices/darkLegend.zip +0 -0
  55. package/dist/web/offices/easternFantasy.jpeg +0 -0
  56. package/dist/web/offices/easternFantasy.zip +0 -0
  57. package/dist/web/offices/gothic.jpeg +0 -0
  58. package/dist/web/offices/gothic.zip +0 -0
  59. package/dist/web/offices/historical.jpeg +0 -0
  60. package/dist/web/offices/historical.zip +0 -0
  61. package/dist/web/offices/index.json +26 -25
  62. package/dist/web/offices/modern-cozy.jpeg +0 -0
  63. package/dist/web/offices/modern-cozy.jpg +0 -0
  64. package/dist/web/offices/modern-cozy.zip +0 -0
  65. package/dist/web/offices/mythological.jpeg +0 -0
  66. package/dist/web/offices/mythological.zip +0 -0
  67. package/dist/web/offices/nostalgic.jpeg +0 -0
  68. package/dist/web/offices/nostalgic.zip +0 -0
  69. package/dist/web/offices/postApocalyptic.jpeg +0 -0
  70. package/dist/web/offices/postApocalyptic.zip +0 -0
  71. package/dist/web/offices/sifi.jpeg +0 -0
  72. package/dist/web/offices/sifi.zip +0 -0
  73. package/dist/web/offices/westernFantasy.jpeg +0 -0
  74. package/dist/web/offices/westernFantasy.zip +0 -0
  75. package/dist/web/pair.html +60 -50
  76. package/dist/web/pair.txt +74 -66
  77. package/dist/web/sw.js +1 -1
  78. package/dist/web/workbox-a92c5218.js +1 -0
  79. package/package.json +2 -2
  80. package/dist/web/_next/static/chunks/29.a4a95a903c8b8e7b.js +0 -1
  81. package/dist/web/_next/static/chunks/290.345f536a557e23ec.js +0 -1
  82. package/dist/web/_next/static/chunks/336.033a979c6c5fe642.js +0 -1
  83. package/dist/web/_next/static/chunks/368.61fa3954c03d8818.js +0 -1
  84. package/dist/web/_next/static/chunks/632.d16ffbb5e23a43f2.js +0 -1
  85. package/dist/web/_next/static/chunks/757.a611f4691f6b1582.js +0 -1
  86. package/dist/web/_next/static/chunks/810.44213c6355518b0b.js +0 -1
  87. package/dist/web/_next/static/chunks/880.614e72604eb723a3.js +0 -1
  88. package/dist/web/_next/static/chunks/989-6be071435f8fdadf.js +0 -1
  89. package/dist/web/_next/static/chunks/app/_not-found/page-182ed2c105839b2a.js +0 -1
  90. package/dist/web/_next/static/chunks/app/layout-72c65340fbaef4c0.js +0 -1
  91. package/dist/web/_next/static/chunks/app/office/page-358079be75bf327f.js +0 -1
  92. package/dist/web/_next/static/chunks/app/pair/page-c47333f71aa3f4ef.js +0 -1
  93. package/dist/web/_next/static/chunks/webpack-1c3347ded5c6a52b.js +0 -1
  94. package/dist/web/offices/Nostalgic.jpeg +0 -0
  95. package/dist/web/offices/Nostalgic.zip +0 -0
  96. package/dist/web/offices/modernCozy.jpeg +0 -0
  97. package/dist/web/offices/modernCozy.zip +0 -0
  98. package/dist/web/workbox-5194662c.js +0 -1
  99. /package/dist/web/_next/static/{0Clbb0V7-cqhwpr3pjKk1 → 30c0_3N7JM7PsUvSPrOdD}/_buildManifest.js +0 -0
  100. /package/dist/web/_next/static/{0Clbb0V7-cqhwpr3pjKk1 → 30c0_3N7JM7PsUvSPrOdD}/_ssgManifest.js +0 -0
  101. /package/dist/web/_next/static/chunks/{325ca9c7-f84e7e4973790fdf.js → 325ca9c7.f84e7e4973790fdf.js} +0 -0
package/dist/web/pair.txt CHANGED
@@ -1,69 +1,77 @@
1
1
  1:"$Sreact.fragment"
2
+ 2:I[8163,["767","static/chunks/767-52fa35b605461336.js","276","static/chunks/276-7203e26618727a54.js","177","static/chunks/app/layout-a57e585fdbd6e50f.js"],"TooltipProvider"]
2
3
  3:I[9653,[],""]
3
4
  4:I[1329,[],""]
4
- 8:I[5719,[],""]
5
- 2:T5c9,
6
- :root {
7
- --px-bg-deep: #16122a;
8
- --px-bg-panel: #1e1a30;
9
- --px-bg-card: #231e38;
10
- --px-bg-chat: #1a1530;
11
- --px-border: #3d2e54;
12
- --px-border-warm: #5a3d14;
13
- --px-gold: #e8b040;
14
- --px-gold-dim: #a87820;
15
- --px-text: #eddcb8;
16
- --px-text-muted: #9a8a68;
17
- --px-text-dim: #6a5a48;
18
- --px-amber: #e0900a;
19
- --px-amber-bg: rgba(232, 176, 64, 0.14);
20
- }
21
- * {
22
- scrollbar-width: thin;
23
- scrollbar-color: #5a3d14 #1a1530;
24
- }
25
- *::-webkit-scrollbar {
26
- width: 4px;
27
- height: 4px;
28
- }
29
- *::-webkit-scrollbar-track {
30
- background: transparent;
31
- }
32
- *::-webkit-scrollbar-thumb {
33
- background: #3d2d10;
34
- border-radius: 0;
35
- }
36
- *::-webkit-scrollbar-thumb:hover {
37
- background: #e8b040;
38
- }
39
- *::-webkit-scrollbar-corner {
40
- background: transparent;
41
- }
42
- .px-font {
43
- font-family: 'Press Start 2P', monospace;
44
- }
45
- @keyframes px-blink {
46
- 0%, 49% { opacity: 1; }
47
- 50%, 100% { opacity: 0; }
48
- }
49
- @keyframes px-pulse-gold {
50
- 0%, 100% { box-shadow: 0 0 0 0 rgba(200,155,48,0); }
51
- 50% { box-shadow: 0 0 8px 2px rgba(200,155,48,0.25); }
52
- }
53
- 0:{"P":null,"b":"0Clbb0V7-cqhwpr3pjKk1","p":"","c":["","pair"],"i":false,"f":[[["",{"children":["pair",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[null,["$","html",null,{"lang":"en","children":[["$","head",null,{"children":[["$","meta",null,{"name":"theme-color","content":"#1a1530"}],["$","meta",null,{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.googleapis.com"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.gstatic.com","crossOrigin":"anonymous"}],["$","link",null,{"href":"https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap","rel":"stylesheet"}]]}],["$","body",null,{"style":{"margin":0,"backgroundColor":"#1a1530","color":"#eddcb8","fontFamily":"system-ui, sans-serif"},"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"$2"}}],["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n if ('serviceWorker' in navigator && location.hostname === 'localhost') {\n navigator.serviceWorker.getRegistrations().then(function(regs) {\n for (var r of regs) r.unregister();\n });\n }\n "}}]]}]]}]]}],{"children":["pair","$L5",{"children":["__PAGE__","$L6",{},null,false]},null,false]},null,false],"$L7",false]],"m":"$undefined","G":["$8",[]],"s":false,"S":true}
54
- 9:I[7868,[],"ClientPageRoot"]
55
- a:I[9600,["863","static/chunks/app/pair/page-c47333f71aa3f4ef.js"],"default"]
56
- d:I[9096,[],"OutletBoundary"]
57
- f:I[913,[],"AsyncMetadataOutlet"]
58
- 11:I[9096,[],"ViewportBoundary"]
59
- 13:I[9096,[],"MetadataBoundary"]
60
- 14:"$Sreact.suspense"
61
- 5:["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}]
62
- 6:["$","$1","c",{"children":[["$","$L9",null,{"Component":"$a","searchParams":{},"params":{},"promises":["$@b","$@c"]}],null,["$","$Ld",null,{"children":["$Le",["$","$Lf",null,{"promise":"$@10"}]]}]]}]
63
- 7:["$","$1","h",{"children":[null,[["$","$L11",null,{"children":"$L12"}],null],["$","$L13",null,{"children":["$","div",null,{"hidden":true,"children":["$","$14",null,{"fallback":null,"children":"$L15"}]}]}]]}]
64
- b:{}
65
- c:"$6:props:children:0:props:params"
66
- 12:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
67
- e:null
68
- 10:{"metadata":[["$","title","0",{"children":"Bit Office"}],["$","meta","1",{"name":"description","content":"Control your AI agents from anywhere"}],["$","link","2",{"rel":"manifest","href":"/manifest.json","crossOrigin":"$undefined"}]],"error":null,"digest":"$undefined"}
69
- 15:"$10:metadata"
5
+ 9:I[5719,[],""]
6
+ :HL["/_next/static/css/7a1e811bf3f4909f.css","style"]
7
+ 5:Tb25,
8
+ (function() {
9
+ var attached = new WeakSet();
10
+ var timers = new WeakMap();
11
+ function addScrollbar(el) {
12
+ if (attached.has(el)) return;
13
+ var cs = getComputedStyle(el);
14
+ var ov = cs.overflowY;
15
+ if (ov !== 'auto' && ov !== 'scroll') return;
16
+ if (cs.position === 'static') el.style.position = 'relative';
17
+ var track = document.createElement('div');
18
+ track.className = 'custom-scrollbar';
19
+ var thumb = document.createElement('div');
20
+ thumb.className = 'custom-scrollbar-thumb';
21
+ track.appendChild(thumb);
22
+ el.appendChild(track);
23
+ attached.add(el);
24
+ function update() {
25
+ var sh = el.scrollHeight, ch = el.clientHeight;
26
+ if (sh <= ch) { track.classList.remove('visible'); return; }
27
+ var ratio = ch / sh;
28
+ var thumbH = Math.max(20, ratio * ch);
29
+ var scrollRatio = el.scrollTop / (sh - ch);
30
+ var thumbTop = scrollRatio * (ch - thumbH);
31
+ thumb.style.height = thumbH + 'px';
32
+ thumb.style.top = (el.scrollTop + thumbTop) + 'px';
33
+ track.classList.add('visible');
34
+ clearTimeout(timers.get(el));
35
+ timers.set(el, setTimeout(function() { track.classList.remove('visible'); }, 1200));
36
+ }
37
+ el.addEventListener('scroll', update, { passive: true });
38
+ new ResizeObserver(update).observe(el);
39
+ // Observe subtree content changes (e.g. streaming chat messages)
40
+ var contentTimer = 0;
41
+ new MutationObserver(function() {
42
+ if (contentTimer) return;
43
+ contentTimer = setTimeout(function() { contentTimer = 0; update(); }, 150);
44
+ }).observe(el, { childList: true, subtree: true, characterData: true });
45
+ update();
46
+ }
47
+ function scan() {
48
+ document.querySelectorAll('[data-scrollbar]').forEach(function(el) {
49
+ addScrollbar(el);
50
+ });
51
+ }
52
+ var scanTimer = 0;
53
+ var mo = new MutationObserver(function() {
54
+ if (scanTimer) return;
55
+ scanTimer = setTimeout(function() { scanTimer = 0; scan(); }, 300);
56
+ });
57
+ mo.observe(document.body, { childList: true, subtree: true });
58
+ if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', scan);
59
+ else scan();
60
+ })();
61
+ 0:{"P":null,"b":"30c0_3N7JM7PsUvSPrOdD","p":"","c":["","pair"],"i":false,"f":[[["",{"children":["pair",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7a1e811bf3f4909f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":[["$","head",null,{"children":[["$","meta",null,{"name":"theme-color","content":"#1a1530"}],["$","meta",null,{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.googleapis.com"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.gstatic.com","crossOrigin":"anonymous"}],["$","link",null,{"href":"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400&family=Press+Start+2P&display=swap","rel":"stylesheet"}]]}],["$","body",null,{"style":{"margin":0,"backgroundColor":"#16122a","color":"#eddcb8","fontFamily":"system-ui, sans-serif"},"children":[["$","$L2",null,{"delayDuration":300,"skipDelayDuration":100,"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","div",null,{"style":{"display":"flex","alignItems":"center","justifyContent":"center","minHeight":"100vh"},"children":["$","h1",null,{"style":{"fontFamily":"JetBrains Mono, monospace","fontSize":"1.2rem"},"children":"404 — Not Found"}]}],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n document.addEventListener('visibilitychange', function() {\n document.body.classList.toggle('term-paused', document.hidden);\n });\n "}}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n if ('serviceWorker' in navigator && location.hostname === 'localhost') {\n navigator.serviceWorker.getRegistrations().then(function(regs) {\n for (var r of regs) r.unregister();\n });\n }\n "}}],["$","script",null,{"dangerouslySetInnerHTML":{"__html":"$5"}}]]}]]}]]}],{"children":["pair","$L6",{"children":["__PAGE__","$L7",{},null,false]},null,false]},null,false],"$L8",false]],"m":"$undefined","G":["$9",[]],"s":false,"S":true}
62
+ a:I[7868,[],"ClientPageRoot"]
63
+ b:I[9600,["863","static/chunks/app/pair/page-67f86e4adcdf34ea.js"],"default"]
64
+ e:I[9096,[],"OutletBoundary"]
65
+ 10:I[913,[],"AsyncMetadataOutlet"]
66
+ 12:I[9096,[],"ViewportBoundary"]
67
+ 14:I[9096,[],"MetadataBoundary"]
68
+ 15:"$Sreact.suspense"
69
+ 6:["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}]
70
+ 7:["$","$1","c",{"children":[["$","$La",null,{"Component":"$b","searchParams":{},"params":{},"promises":["$@c","$@d"]}],null,["$","$Le",null,{"children":["$Lf",["$","$L10",null,{"promise":"$@11"}]]}]]}]
71
+ 8:["$","$1","h",{"children":[null,[["$","$L12",null,{"children":"$L13"}],null],["$","$L14",null,{"children":["$","div",null,{"hidden":true,"children":["$","$15",null,{"fallback":null,"children":"$L16"}]}]}]]}]
72
+ c:{}
73
+ d:"$7:props:children:0:props:params"
74
+ 13:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
75
+ f:null
76
+ 11:{"metadata":[["$","title","0",{"children":"Open Office"}],["$","meta","1",{"name":"description","content":"Control your AI agents from anywhere"}],["$","link","2",{"rel":"manifest","href":"/manifest.json","crossOrigin":"$undefined"}]],"error":null,"digest":"$undefined"}
77
+ 16:"$11:metadata"
package/dist/web/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let e,i={};const c=(c,s)=>(c=new URL(c+".js",s).href,i[c]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=c,e.onload=i,document.head.appendChild(e)}else e=c,importScripts(c),i()}).then(()=>{let e=i[c];if(!e)throw new Error(`Module ${c} didn’t register its module`);return e}));self.define=(s,a)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let n={};const t=e=>c(e,f),r={module:{uri:f},exports:n,require:t};i[f]=Promise.all(s.map(e=>r[e]||t(e))).then(e=>(a(...e),n))}}define(["./workbox-5194662c"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/Office Tileset/LICENSE.txt",revision:"e0006f5d6c9512f1f0e903e2de02a79a"},{url:"/Office Tileset/Office Designs/Office Level 1.png",revision:"2df0791e8ced58b7203fbbb90b4fbab4"},{url:"/Office Tileset/Office Designs/Office Level 2.png",revision:"0bc5ecef2fa29bd944f4b633a226a151"},{url:"/Office Tileset/Office Designs/Office Level 3.5.png",revision:"1b574323b372741f9e79bbe7d2fe42bc"},{url:"/Office Tileset/Office Designs/Office Level 3.jpeg",revision:"c3870616be6376a136d8112a1207eec7"},{url:"/Office Tileset/Office Designs/Office Level 3.png",revision:"01b9822957a98b3ddc26c753ab9a8137"},{url:"/Office Tileset/Office Designs/Office Level 4.png",revision:"4da5af3d7a65c3ebb54c37f9a475475a"},{url:"/Office Tileset/Office Palette/Office Palette Large.png",revision:"1df5f24c110f0b6eae0bcd4419270eef"},{url:"/Office Tileset/Office Palette/Office Palette Medium.png",revision:"fca90dd2244f726cb970f8a3361f16e7"},{url:"/Office Tileset/Office Palette/Office Palette Small.png",revision:"300a41219e96e86bca5614a4983ddc95"},{url:"/Office Tileset/Office Tileset All 16x16 no shadow.png",revision:"8972409c007b5da2025bd4782757ab7c"},{url:"/Office Tileset/Office Tileset All 16x16.png",revision:"a55f20978ab44b0ed7c0c5b76eecf0d5"},{url:"/Office Tileset/Office Tileset All 32x32 no shadow.png",revision:"371fd2d0d9466087a1923695cf690c76"},{url:"/Office Tileset/Office Tileset All 32x32.png",revision:"7da73ddacacce9c95dc70a35096a50b7"},{url:"/Office Tileset/Office Tileset All 48x48 no shadow.png",revision:"435a6c6101c70d223af2206f19ea8e69"},{url:"/Office Tileset/Office Tileset All 48x48.png",revision:"668ce69f1267755d1ed9174afacc7bfc"},{url:"/Office Tileset/Office VX Ace/A2 Office Floors.png",revision:"4c74a49895db00fdb9d5ef4f9863f77a"},{url:"/Office Tileset/Office VX Ace/A4 Office Walls.png",revision:"1c9701d762f9f6b9406a7d2ad8369721"},{url:"/Office Tileset/Office VX Ace/A5 Office Floors & Walls.png",revision:"fd1e3583968a840ce5ddcd69b1b1fcf6"},{url:"/Office Tileset/Office VX Ace/B-C-D-E Office 1 No Shadows.png",revision:"23fc1254a128d86b6e69315896cc81ea"},{url:"/Office Tileset/Office VX Ace/B-C-D-E Office 1.png",revision:"6d7da953c1ed326f0518022576828b51"},{url:"/Office Tileset/Office VX Ace/B-C-D-E Office 2 No Shadows.png",revision:"7dc50bb73391f518f136e545d7ee81ac"},{url:"/Office Tileset/Office VX Ace/B-C-D-E Office 2.png",revision:"8a07e0e5e3d0685ebb252af81506b54f"},{url:"/Office Tileset/Office VX Ace/README.txt",revision:"c08786e76eb104580a7ed6839a0d6640"},{url:"/_next/static/0Clbb0V7-cqhwpr3pjKk1/_buildManifest.js",revision:"a343cbeac8daa802ea382dfd6b601938"},{url:"/_next/static/0Clbb0V7-cqhwpr3pjKk1/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/149.4dcc265d90664a46.js",revision:"4dcc265d90664a46"},{url:"/_next/static/chunks/29.a4a95a903c8b8e7b.js",revision:"a4a95a903c8b8e7b"},{url:"/_next/static/chunks/290.345f536a557e23ec.js",revision:"345f536a557e23ec"},{url:"/_next/static/chunks/325ca9c7-f84e7e4973790fdf.js",revision:"f84e7e4973790fdf"},{url:"/_next/static/chunks/336.033a979c6c5fe642.js",revision:"033a979c6c5fe642"},{url:"/_next/static/chunks/368.61fa3954c03d8818.js",revision:"61fa3954c03d8818"},{url:"/_next/static/chunks/388-5a04e93e2531cfb7.js",revision:"5a04e93e2531cfb7"},{url:"/_next/static/chunks/4d67e943-e6a0fd3b5c397505.js",revision:"e6a0fd3b5c397505"},{url:"/_next/static/chunks/632.d16ffbb5e23a43f2.js",revision:"d16ffbb5e23a43f2"},{url:"/_next/static/chunks/712.fe038ea6687b84cf.js",revision:"fe038ea6687b84cf"},{url:"/_next/static/chunks/757.a611f4691f6b1582.js",revision:"a611f4691f6b1582"},{url:"/_next/static/chunks/810.44213c6355518b0b.js",revision:"44213c6355518b0b"},{url:"/_next/static/chunks/880.614e72604eb723a3.js",revision:"614e72604eb723a3"},{url:"/_next/static/chunks/989-6be071435f8fdadf.js",revision:"6be071435f8fdadf"},{url:"/_next/static/chunks/app/_not-found/page-182ed2c105839b2a.js",revision:"182ed2c105839b2a"},{url:"/_next/static/chunks/app/join/page-7e3ac640395d940a.js",revision:"7e3ac640395d940a"},{url:"/_next/static/chunks/app/layout-72c65340fbaef4c0.js",revision:"72c65340fbaef4c0"},{url:"/_next/static/chunks/app/office/page-358079be75bf327f.js",revision:"358079be75bf327f"},{url:"/_next/static/chunks/app/page-9734dfda2b306034.js",revision:"9734dfda2b306034"},{url:"/_next/static/chunks/app/pair/page-c47333f71aa3f4ef.js",revision:"c47333f71aa3f4ef"},{url:"/_next/static/chunks/framework-bec628f2b7cc8f6d.js",revision:"bec628f2b7cc8f6d"},{url:"/_next/static/chunks/main-314e1c8a2c4316bd.js",revision:"314e1c8a2c4316bd"},{url:"/_next/static/chunks/main-app-baad86574bd560af.js",revision:"baad86574bd560af"},{url:"/_next/static/chunks/pages/_app-f4d560c9dbc22e4e.js",revision:"f4d560c9dbc22e4e"},{url:"/_next/static/chunks/pages/_error-492bd157be5771d5.js",revision:"492bd157be5771d5"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-1c3347ded5c6a52b.js",revision:"1c3347ded5c6a52b"},{url:"/assets/characters/char_0.png",revision:"d4dd5678a4144876fac52c57cc2f6c9f"},{url:"/assets/characters/char_1.png",revision:"fc1cca5f7207bb2cd9020b90c2489799"},{url:"/assets/characters/char_2.png",revision:"18d34469ae20cfc42490c7f10d877290"},{url:"/assets/characters/char_3.png",revision:"faaa486a85c835a2497446ae217c0d6e"},{url:"/assets/characters/char_4.png",revision:"ff2eaeec286548199300a70be71c1b9c"},{url:"/assets/characters/char_5.png",revision:"1e7dcef45414d2d20ee13d4323efc830"},{url:"/assets/walls.png",revision:"f7a10cb9381a8acb297b0cfc35e8d80a"},{url:"/icons/icon-192.png",revision:"9ebb6e37caff08f9170961db00132344"},{url:"/icons/icon-512.png",revision:"9ebb6e37caff08f9170961db00132344"},{url:"/manifest.json",revision:"c0d30aaafad74220867e333aaa87df0f"},{url:"/offices/Nostalgic.jpeg",revision:"6d743c670906880d09096b65d128714f"},{url:"/offices/Nostalgic.zip",revision:"032be77eba7fd6b5b11eda09b74789f4"},{url:"/offices/cute-whimsical.jpeg",revision:"a5028ab6deab30dbc7cac3424242b2a6"},{url:"/offices/cute-whimsical.zip",revision:"7f18b28c9885464838ca4214df2e87e4"},{url:"/offices/cyberpunk.jpeg",revision:"e11de093e69b7eb89ba02d6f3d4ad96d"},{url:"/offices/cyberpunk.zip",revision:"f763b9618153c9d8514cab367f40e122"},{url:"/offices/darkLegend.jpeg",revision:"43d03aeca5f6572a5571b731ca53755c"},{url:"/offices/darkLegend.zip",revision:"57bd8b8d8585b04a8abd0b2c25cd99e6"},{url:"/offices/easternFantasy.jpeg",revision:"d8b79c20010019cb8815189ceba04461"},{url:"/offices/easternFantasy.zip",revision:"3abb11c02c0ca970080f823bb850acbc"},{url:"/offices/gothic.jpeg",revision:"960644faf9169fdd1fb928fd63af2d1f"},{url:"/offices/gothic.zip",revision:"b573e1b22f00cbb7f77017bc6526904c"},{url:"/offices/historical.jpeg",revision:"96920b9f9a9a17440bceb2d520f242e4"},{url:"/offices/historical.zip",revision:"de973c112b0fb82b9d3ed6c299536573"},{url:"/offices/index.json",revision:"85f32580b1cc82e8790036813ce010f1"},{url:"/offices/modernCozy.jpeg",revision:"f087e9c5553e5326f88bec012739de77"},{url:"/offices/modernCozy.zip",revision:"7f479d2d10d9bf1de80f9b9cfdf1d256"},{url:"/offices/mythological.jpeg",revision:"aaa939f1bf843369f6f27d0c59e87cf8"},{url:"/offices/mythological.zip",revision:"9db7c5cd4b29f6bc7460206e5d15301e"},{url:"/offices/postApocalyptic.jpeg",revision:"0faca9a7c43bcfb7258fdcaf6d797d80"},{url:"/offices/postApocalyptic.zip",revision:"b34b1d4a348bc4792657bf65a7db93dd"},{url:"/offices/sifi.jpeg",revision:"b27dc1b9702d5c2c645bf58ae84eab5d"},{url:"/offices/sifi.zip",revision:"a051f42cd576ab0807fe26840b4211e6"},{url:"/offices/westernFantasy.jpeg",revision:"cce6bb919ae26866d4e39177780abfd4"},{url:"/offices/westernFantasy.zip",revision:"91139b9e56f3c04c887bbd3e04082aaf"},{url:"/pixel-agents-layout.json",revision:"498f7927cc4a4a1b499b8e9486c50b30"}],{ignoreURLParametersMatching:[/^utm_/,/^fbclid$/]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:function(e){var i=e.response;return _async_to_generator(function(){return _ts_generator(this,function(e){return[2,i&&"opaqueredirect"===i.type?new Response(i.body,{status:200,statusText:"OK",headers:i.headers}):i]})})()}}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:2592e3})]}),"GET"),e.registerRoute(/\/_next\/static.+\.js$/i,new e.CacheFirst({cacheName:"next-static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4|webm)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:48,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){var i=e.sameOrigin,c=e.url.pathname;return!(!i||c.startsWith("/api/auth/callback")||!c.startsWith("/api/"))},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){var i=e.request,c=e.url.pathname,s=e.sameOrigin;return"1"===i.headers.get("RSC")&&"1"===i.headers.get("Next-Router-Prefetch")&&s&&!c.startsWith("/api/")},new e.NetworkFirst({cacheName:"pages-rsc-prefetch",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){var i=e.request,c=e.url.pathname,s=e.sameOrigin;return"1"===i.headers.get("RSC")&&s&&!c.startsWith("/api/")},new e.NetworkFirst({cacheName:"pages-rsc",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){var i=e.url.pathname;return e.sameOrigin&&!i.startsWith("/api/")},new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){return!e.sameOrigin},new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")});
1
+ if(!self.define){let e,c={};const i=(i,s)=>(i=new URL(i+".js",s).href,c[i]||new Promise(c=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=c,document.head.appendChild(e)}else e=i,importScripts(i),c()}).then(()=>{let e=c[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(s,a)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(c[f])return;let n={};const t=e=>i(e,f),r={module:{uri:f},exports:n,require:t};c[f]=Promise.all(s.map(e=>r[e]||t(e))).then(e=>(a(...e),n))}}define(["./workbox-a92c5218"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/Office Tileset/LICENSE.txt",revision:"e0006f5d6c9512f1f0e903e2de02a79a"},{url:"/Office Tileset/Office Designs/Office Level 1.png",revision:"2df0791e8ced58b7203fbbb90b4fbab4"},{url:"/Office Tileset/Office Designs/Office Level 2.png",revision:"0bc5ecef2fa29bd944f4b633a226a151"},{url:"/Office Tileset/Office Designs/Office Level 3.5.png",revision:"1b574323b372741f9e79bbe7d2fe42bc"},{url:"/Office Tileset/Office Designs/Office Level 3.jpeg",revision:"c3870616be6376a136d8112a1207eec7"},{url:"/Office Tileset/Office Designs/Office Level 3.png",revision:"01b9822957a98b3ddc26c753ab9a8137"},{url:"/Office Tileset/Office Designs/Office Level 4.png",revision:"4da5af3d7a65c3ebb54c37f9a475475a"},{url:"/Office Tileset/Office Palette/Office Palette Large.png",revision:"1df5f24c110f0b6eae0bcd4419270eef"},{url:"/Office Tileset/Office Palette/Office Palette Medium.png",revision:"fca90dd2244f726cb970f8a3361f16e7"},{url:"/Office Tileset/Office Palette/Office Palette Small.png",revision:"300a41219e96e86bca5614a4983ddc95"},{url:"/Office Tileset/Office Tileset All 16x16 no shadow.png",revision:"8972409c007b5da2025bd4782757ab7c"},{url:"/Office Tileset/Office Tileset All 16x16.png",revision:"a55f20978ab44b0ed7c0c5b76eecf0d5"},{url:"/Office Tileset/Office Tileset All 32x32 no shadow.png",revision:"371fd2d0d9466087a1923695cf690c76"},{url:"/Office Tileset/Office Tileset All 32x32.png",revision:"7da73ddacacce9c95dc70a35096a50b7"},{url:"/Office Tileset/Office Tileset All 48x48 no shadow.png",revision:"435a6c6101c70d223af2206f19ea8e69"},{url:"/Office Tileset/Office Tileset All 48x48.png",revision:"668ce69f1267755d1ed9174afacc7bfc"},{url:"/Office Tileset/Office VX Ace/A2 Office Floors.png",revision:"4c74a49895db00fdb9d5ef4f9863f77a"},{url:"/Office Tileset/Office VX Ace/A4 Office Walls.png",revision:"1c9701d762f9f6b9406a7d2ad8369721"},{url:"/Office Tileset/Office VX Ace/A5 Office Floors & Walls.png",revision:"fd1e3583968a840ce5ddcd69b1b1fcf6"},{url:"/Office Tileset/Office VX Ace/B-C-D-E Office 1 No Shadows.png",revision:"23fc1254a128d86b6e69315896cc81ea"},{url:"/Office Tileset/Office VX Ace/B-C-D-E Office 1.png",revision:"6d7da953c1ed326f0518022576828b51"},{url:"/Office Tileset/Office VX Ace/B-C-D-E Office 2 No Shadows.png",revision:"7dc50bb73391f518f136e545d7ee81ac"},{url:"/Office Tileset/Office VX Ace/B-C-D-E Office 2.png",revision:"8a07e0e5e3d0685ebb252af81506b54f"},{url:"/Office Tileset/Office VX Ace/README.txt",revision:"c08786e76eb104580a7ed6839a0d6640"},{url:"/_next/static/30c0_3N7JM7PsUvSPrOdD/_buildManifest.js",revision:"a343cbeac8daa802ea382dfd6b601938"},{url:"/_next/static/30c0_3N7JM7PsUvSPrOdD/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/149.4dcc265d90664a46.js",revision:"4dcc265d90664a46"},{url:"/_next/static/chunks/262.c930af897fc1ae41.js",revision:"c930af897fc1ae41"},{url:"/_next/static/chunks/27.d81804d60bc0f4f0.js",revision:"d81804d60bc0f4f0"},{url:"/_next/static/chunks/276-7203e26618727a54.js",revision:"7203e26618727a54"},{url:"/_next/static/chunks/29.5e4e3e30b02d00ad.js",revision:"5e4e3e30b02d00ad"},{url:"/_next/static/chunks/290.247befe60cb2d28d.js",revision:"247befe60cb2d28d"},{url:"/_next/static/chunks/293.e3a551b691c61d55.js",revision:"e3a551b691c61d55"},{url:"/_next/static/chunks/297.2c14111a5babdc3f.js",revision:"2c14111a5babdc3f"},{url:"/_next/static/chunks/325ca9c7.f84e7e4973790fdf.js",revision:"f84e7e4973790fdf"},{url:"/_next/static/chunks/336.8eafff71d277c552.js",revision:"8eafff71d277c552"},{url:"/_next/static/chunks/337.d02d761d8479a26b.js",revision:"d02d761d8479a26b"},{url:"/_next/static/chunks/363.e8a82fede2ce0268.js",revision:"e8a82fede2ce0268"},{url:"/_next/static/chunks/368.17f62d3909ec67e9.js",revision:"17f62d3909ec67e9"},{url:"/_next/static/chunks/388-5a04e93e2531cfb7.js",revision:"5a04e93e2531cfb7"},{url:"/_next/static/chunks/484.9bea1cffd0a0c25d.js",revision:"9bea1cffd0a0c25d"},{url:"/_next/static/chunks/4d67e943-e6a0fd3b5c397505.js",revision:"e6a0fd3b5c397505"},{url:"/_next/static/chunks/606.64076fb5c9a76eb8.js",revision:"64076fb5c9a76eb8"},{url:"/_next/static/chunks/611.a9c4df24fea6fe06.js",revision:"a9c4df24fea6fe06"},{url:"/_next/static/chunks/689-57cf7e431c713dac.js",revision:"57cf7e431c713dac"},{url:"/_next/static/chunks/712.fe038ea6687b84cf.js",revision:"fe038ea6687b84cf"},{url:"/_next/static/chunks/729.f8f9847d2d765724.js",revision:"f8f9847d2d765724"},{url:"/_next/static/chunks/73.84b7325688d17248.js",revision:"84b7325688d17248"},{url:"/_next/static/chunks/757.704acf1f09ac05cb.js",revision:"704acf1f09ac05cb"},{url:"/_next/static/chunks/767-52fa35b605461336.js",revision:"52fa35b605461336"},{url:"/_next/static/chunks/794.4c6f7ebfcb65fff9.js",revision:"4c6f7ebfcb65fff9"},{url:"/_next/static/chunks/810.39f7a3b8c687a8e4.js",revision:"39f7a3b8c687a8e4"},{url:"/_next/static/chunks/849.04bc4b508495ab91.js",revision:"04bc4b508495ab91"},{url:"/_next/static/chunks/853.1223037341c73df9.js",revision:"1223037341c73df9"},{url:"/_next/static/chunks/88.219a7fc3735b6d2b.js",revision:"219a7fc3735b6d2b"},{url:"/_next/static/chunks/880.0799bc27d833d679.js",revision:"0799bc27d833d679"},{url:"/_next/static/chunks/883.9832cb2358508994.js",revision:"9832cb2358508994"},{url:"/_next/static/chunks/895.b20c839956b4d7fa.js",revision:"b20c839956b4d7fa"},{url:"/_next/static/chunks/913.d5d32ae6956a650a.js",revision:"d5d32ae6956a650a"},{url:"/_next/static/chunks/955.8d32a077607d5dd4.js",revision:"8d32a077607d5dd4"},{url:"/_next/static/chunks/999.59e64ccb62c7e043.js",revision:"59e64ccb62c7e043"},{url:"/_next/static/chunks/app/_not-found/page-fc90e6f750996b0a.js",revision:"fc90e6f750996b0a"},{url:"/_next/static/chunks/app/join/page-98fb24f2e87aa173.js",revision:"98fb24f2e87aa173"},{url:"/_next/static/chunks/app/layout-a57e585fdbd6e50f.js",revision:"a57e585fdbd6e50f"},{url:"/_next/static/chunks/app/not-found-fc90e6f750996b0a.js",revision:"fc90e6f750996b0a"},{url:"/_next/static/chunks/app/office/page-7e64f4657627f13b.js",revision:"7e64f4657627f13b"},{url:"/_next/static/chunks/app/page-9734dfda2b306034.js",revision:"9734dfda2b306034"},{url:"/_next/static/chunks/app/pair/page-67f86e4adcdf34ea.js",revision:"67f86e4adcdf34ea"},{url:"/_next/static/chunks/framework-bec628f2b7cc8f6d.js",revision:"bec628f2b7cc8f6d"},{url:"/_next/static/chunks/main-314e1c8a2c4316bd.js",revision:"314e1c8a2c4316bd"},{url:"/_next/static/chunks/main-app-baad86574bd560af.js",revision:"baad86574bd560af"},{url:"/_next/static/chunks/pages/_app-f4d560c9dbc22e4e.js",revision:"f4d560c9dbc22e4e"},{url:"/_next/static/chunks/pages/_error-492bd157be5771d5.js",revision:"492bd157be5771d5"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-ecac0d5245a37138.js",revision:"ecac0d5245a37138"},{url:"/_next/static/css/7a1e811bf3f4909f.css",revision:"7a1e811bf3f4909f"},{url:"/assets/characters/char_0.png",revision:"d4dd5678a4144876fac52c57cc2f6c9f"},{url:"/assets/characters/char_1.png",revision:"fc1cca5f7207bb2cd9020b90c2489799"},{url:"/assets/characters/char_2.png",revision:"18d34469ae20cfc42490c7f10d877290"},{url:"/assets/characters/char_3.png",revision:"faaa486a85c835a2497446ae217c0d6e"},{url:"/assets/characters/char_4.png",revision:"ff2eaeec286548199300a70be71c1b9c"},{url:"/assets/characters/char_5.png",revision:"1e7dcef45414d2d20ee13d4323efc830"},{url:"/assets/walls.png",revision:"f7a10cb9381a8acb297b0cfc35e8d80a"},{url:"/icons/icon-192.png",revision:"9ebb6e37caff08f9170961db00132344"},{url:"/icons/icon-512.png",revision:"9ebb6e37caff08f9170961db00132344"},{url:"/manifest.json",revision:"3afac2b86eb2bf85e224e1c148b17ddd"},{url:"/offices/cute-whimsical.jpeg",revision:"bd5aef612d3eaccf9a56ae5fe6d92d15"},{url:"/offices/cute-whimsical.zip",revision:"8b832808073e977fa6be4f5e1dfe0bc4"},{url:"/offices/cyberpunk.jpeg",revision:"015dc09cb4ccf2f5b437100f8172b90e"},{url:"/offices/cyberpunk.zip",revision:"9e43bd8a57c346ffc8444c5b25d5cd1d"},{url:"/offices/darkLegend.jpeg",revision:"4623c80d3d7d8386a1c983b9a0983dc0"},{url:"/offices/darkLegend.zip",revision:"30ab11b73df1b738c1520c72e72dafa3"},{url:"/offices/easternFantasy.jpeg",revision:"82050ce523c43c280550ebf7c1adaa84"},{url:"/offices/easternFantasy.zip",revision:"d6bc14b18f78eb8f80d6000c3e52a171"},{url:"/offices/gothic.jpeg",revision:"5b03aa38ac3429ac35de5c2cdfd52765"},{url:"/offices/gothic.zip",revision:"e222ff3e8877f0b232d6c1243d16a6c4"},{url:"/offices/historical.jpeg",revision:"ecb89b27f90a0fcc6c7cc06a0651f27b"},{url:"/offices/historical.zip",revision:"f76a9ea83efe6d3de09b2e48b5c2ed36"},{url:"/offices/index.json",revision:"d408fc892bb16211f841a1a3f4d4a55e"},{url:"/offices/modern-cozy.jpeg",revision:"370902a86d461054ceba702cd9a49d1b"},{url:"/offices/modern-cozy.jpg",revision:"372b770f8d52e81c05af70f1886baf1c"},{url:"/offices/modern-cozy.zip",revision:"1b98f6161ced28ab74385f67b9119da8"},{url:"/offices/mythological.jpeg",revision:"fb88d4eeff14055aa38ce82f097cb842"},{url:"/offices/mythological.zip",revision:"d8c7dc5d8c14af54665f0f3d6b0b89f1"},{url:"/offices/nostalgic.jpeg",revision:"76abdfee4f527bdd7c0ea66e8f2f7a30"},{url:"/offices/nostalgic.zip",revision:"373afa29d2c9ee66790908d0f29b5003"},{url:"/offices/postApocalyptic.jpeg",revision:"21e952cdc79f5b9f9514eaffd2e3c6b1"},{url:"/offices/postApocalyptic.zip",revision:"c2357fb513c072f412089b279464e7ab"},{url:"/offices/sifi.jpeg",revision:"ff5d3d4c0b4f67911548d48324710c13"},{url:"/offices/sifi.zip",revision:"6d549aa56edf444f18ed0f1773379a71"},{url:"/offices/westernFantasy.jpeg",revision:"af99e679310db31dac7cfa5b14f61dd2"},{url:"/offices/westernFantasy.zip",revision:"cb6c7bd41e0fb6a72e0d8cc875b669f4"},{url:"/pixel-agents-layout.json",revision:"498f7927cc4a4a1b499b8e9486c50b30"}],{ignoreURLParametersMatching:[/^utm_/,/^fbclid$/]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:function(e){var c=e.response;return _async_to_generator(function(){return _ts_generator(this,function(e){return[2,c&&"opaqueredirect"===c.type?new Response(c.body,{status:200,statusText:"OK",headers:c.headers}):c]})})()}}]}),"GET"),e.registerRoute(function(e){var c=e.url;return/^\/(preview-static|preview-app)(\/.*)?$/.test(c.pathname)},new e.NetworkOnly,"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:2592e3})]}),"GET"),e.registerRoute(/\/_next\/static.+\.js$/i,new e.CacheFirst({cacheName:"next-static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4|webm)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:48,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){var c=e.sameOrigin,i=e.url.pathname;return!(!c||i.startsWith("/api/auth/callback")||!i.startsWith("/api/"))},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){var c=e.request,i=e.url.pathname,s=e.sameOrigin;return"1"===c.headers.get("RSC")&&"1"===c.headers.get("Next-Router-Prefetch")&&s&&!i.startsWith("/api/")},new e.NetworkFirst({cacheName:"pages-rsc-prefetch",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){var c=e.request,i=e.url.pathname,s=e.sameOrigin;return"1"===c.headers.get("RSC")&&s&&!i.startsWith("/api/")},new e.NetworkFirst({cacheName:"pages-rsc",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){var c=e.url.pathname;return e.sameOrigin&&!c.startsWith("/api/")},new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(function(e){return!e.sameOrigin},new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")});
@@ -0,0 +1 @@
1
+ define(["exports"],function(t){"use strict";try{self["workbox:core:7.0.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class i extends r{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=i&&i.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:r})}catch(t){c=Promise.reject(t)}const h=i&&i.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:r})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n})),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const r=this.t.get(s.method)||[];for(const i of r){let r;const a=i.match({url:t,sameOrigin:e,request:s,event:n});if(a)return r=a,(Array.isArray(r)&&0===r.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(r=void 0),{route:i,params:r}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new r(({url:t})=>t.href===s.href,e,n)}else if(t instanceof RegExp)a=new i(t,e,n);else if("function"==typeof t)a=new r(t,e,n);else{if(!(t instanceof r))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null},l={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},f=t=>[l.prefix,t,l.suffix].filter(t=>t&&t.length>0).join("-"),w=t=>t||f(l.precache),d=t=>t||f(l.runtime);function p(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class y{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const g=new Set;function m(t){return new Promise(e=>setTimeout(e,t))}function R(t){return"string"==typeof t?new Request(t):t}class v{constructor(t,e){this.h={},Object.assign(this,e),this.event=e.event,this.u=t,this.l=new y,this.p=[],this.m=[...t.plugins],this.R=new Map;for(const t of this.m)this.R.set(t,{});this.event.waitUntil(this.l.promise)}async fetch(t){const{event:e}=this;let n=R(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.u.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:i,response:t});return t}catch(t){throw r&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:r.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=R(t);let s;const{cacheName:n,matchOptions:r}=this.u,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},r),{cacheName:n});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:r,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,e){const n=R(t);await m(0);const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(i=r.url,new URL(String(i),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var i;const a=await this.v(e);if(!a)return!1;const{cacheName:o,matchOptions:c}=this.u,h=await self.caches.open(o),u=this.hasCallback("cacheDidUpdate"),l=u?await async function(t,e,s,n){const r=p(e.url,s);if(e.url===r)return t.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,i);for(const e of a)if(r===p(e.url,s))return t.match(e,n)}(h,r.clone(),["__WB_REVISION__"],c):null;try{await h.put(r,u?a.clone():a)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of g)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:o,oldResponse:l,newResponse:a.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.h[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=R(await t({mode:e,request:n,event:this.event,params:this.params}));this.h[s]=n}return this.h[s]}hasCallback(t){for(const e of this.u.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.u.plugins)if("function"==typeof e[t]){const s=this.R.get(e),n=n=>{const r=Object.assign(Object.assign({},n),{state:s});return e[t](r)};yield n}}waitUntil(t){return this.p.push(t),t}async doneWaiting(){let t;for(;t=this.p.shift();)await t}destroy(){this.l.resolve(null)}async v(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class b{constructor(t={}){this.cacheName=d(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,r=new v(this,{event:e,request:s,params:n}),i=this.q(r,s,e);return[i,this.D(i,r,s,e)]}async q(t,e,n){let r;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(r=await this.U(e,t),!r||"error"===r.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(r=await i({error:s,event:n,request:e}),r)break;if(!r)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))r=await s({event:n,request:e,response:r});return r}async D(t,e,s,n){let r,i;try{r=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:r}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:r,error:i}),e.destroy(),i)throw i}}function q(t){t.then(()=>{})}function D(){return D=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)({}).hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},D.apply(null,arguments)}let U,x;const E=new WeakMap,L=new WeakMap,I=new WeakMap,C=new WeakMap,N=new WeakMap;let T={get(t,e,s){if(t instanceof IDBTransaction){if("done"===e)return L.get(t);if("objectStoreNames"===e)return t.objectStoreNames||I.get(t);if("store"===e)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return B(t[e])},set:(t,e,s)=>(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function k(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(x||(x=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(P(this),e),B(E.get(this))}:function(...e){return B(t.apply(P(this),e))}:function(e,...s){const n=t.call(P(this),e,...s);return I.set(n,e.sort?e.sort():[e]),B(n)}}function O(t){return"function"==typeof t?k(t):(t instanceof IDBTransaction&&function(t){if(L.has(t))return;const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",i),t.removeEventListener("abort",i)},r=()=>{e(),n()},i=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",r),t.addEventListener("error",i),t.addEventListener("abort",i)});L.set(t,e)}(t),e=t,(U||(U=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(t,T):t);var e}function B(t){if(t instanceof IDBRequest)return function(t){const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("success",r),t.removeEventListener("error",i)},r=()=>{e(B(t.result)),n()},i=()=>{s(t.error),n()};t.addEventListener("success",r),t.addEventListener("error",i)});return e.then(e=>{e instanceof IDBCursor&&E.set(e,t)}).catch(()=>{}),N.set(e,t),e}(t);if(C.has(t))return C.get(t);const e=O(t);return e!==t&&(C.set(t,e),N.set(e,t)),e}const P=t=>N.get(t);const M=["get","getKey","getAll","getAllKeys","count"],W=["put","add","delete","clear"],j=new Map;function S(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(j.get(e))return j.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,r=W.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!M.includes(s))return;const i=async function(t,...e){const i=this.transaction(t,r?"readwrite":"readonly");let a=i.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),r&&i.done]))[0]};return j.set(e,i),i}T=(t=>D({},t,{get:(e,s,n)=>S(e,s)||t.get(e,s,n),has:(e,s)=>!!S(e,s)||t.has(e,s)}))(T);try{self["workbox:expiration:7.0.0"]&&_()}catch(t){}const K="cache-entries",A=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class F{constructor(t){this._=null,this.L=t}I(t){const e=t.createObjectStore(K,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}C(t){this.I(t),this.L&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",t=>e(t.oldVersion,t)),B(s).then(()=>{})}(this.L)}async setTimestamp(t,e){const s={url:t=A(t),timestamp:e,cacheName:this.L,id:this.N(t)},n=(await this.getDb()).transaction(K,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(t){const e=await this.getDb(),s=await e.get(K,this.N(t));return null==s?void 0:s.timestamp}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(K).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;n;){const s=n.value;s.cacheName===this.L&&(t&&s.timestamp<t||e&&i>=e?r.push(n.value):i++),n=await n.continue()}const a=[];for(const t of r)await s.delete(K,t.id),a.push(t.url);return a}N(t){return this.L+"|"+A(t)}async getDb(){return this._||(this._=await function(t,e,{blocked:s,upgrade:n,blocking:r,terminated:i}={}){const a=indexedDB.open(t,e),o=B(a);return n&&a.addEventListener("upgradeneeded",t=>{n(B(a.result),t.oldVersion,t.newVersion,B(a.transaction),t)}),s&&a.addEventListener("blocked",t=>s(t.oldVersion,t.newVersion,t)),o.then(t=>{i&&t.addEventListener("close",()=>i()),r&&t.addEventListener("versionchange",t=>r(t.oldVersion,t.newVersion,t))}).catch(()=>{}),o}("workbox-expiration",1,{upgrade:this.C.bind(this)})),this._}}class ${constructor(t,e={}){this.T=!1,this.k=!1,this.O=e.maxEntries,this.B=e.maxAgeSeconds,this.P=e.matchOptions,this.L=t,this.M=new F(t)}async expireEntries(){if(this.T)return void(this.k=!0);this.T=!0;const t=this.B?Date.now()-1e3*this.B:0,e=await this.M.expireEntries(t,this.O),s=await self.caches.open(this.L);for(const t of e)await s.delete(t,this.P);this.T=!1,this.k&&(this.k=!1,q(this.expireEntries()))}async updateTimestamp(t){await this.M.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.B){const e=await this.M.getTimestamp(t),s=Date.now()-1e3*this.B;return void 0===e||e<s}return!1}async delete(){this.k=!1,await this.M.expireEntries(1/0)}}try{self["workbox:range-requests:7.0.0"]&&_()}catch(t){}async function H(t,e){try{if(206===e.status)return e;const n=t.headers.get("range");if(!n)throw new s("no-range-header");const r=function(t){const e=t.trim().toLowerCase();if(!e.startsWith("bytes="))throw new s("unit-must-be-bytes",{normalizedRangeHeader:e});if(e.includes(","))throw new s("single-range-only",{normalizedRangeHeader:e});const n=/(\d*)-(\d*)/.exec(e);if(!n||!n[1]&&!n[2])throw new s("invalid-range-values",{normalizedRangeHeader:e});return{start:""===n[1]?void 0:Number(n[1]),end:""===n[2]?void 0:Number(n[2])}}(n),i=await e.blob(),a=function(t,e,n){const r=t.size;if(n&&n>r||e&&e<0)throw new s("range-not-satisfiable",{size:r,end:n,start:e});let i,a;return void 0!==e&&void 0!==n?(i=e,a=n+1):void 0!==e&&void 0===n?(i=e,a=r):void 0!==n&&void 0===e&&(i=r-n,a=r),{start:i,end:a}}(i,r.start,r.end),o=i.slice(a.start,a.end),c=o.size,h=new Response(o,{status:206,statusText:"Partial Content",headers:e.headers});return h.headers.set("Content-Length",String(c)),h.headers.set("Content-Range",`bytes ${a.start}-${a.end-1}/${i.size}`),h}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}function z(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function G(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const r=new URL(n,location.href),i=new URL(n,location.href);return r.searchParams.set("__WB_REVISION__",e),{cacheKey:r.href,url:i.href}}class V{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class J{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.W.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.W=t}}let Q,X;async function Y(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const r=t.clone(),i={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},a=e?e(i):i,o=function(){if(void 0===Q){const t=new Response("");if("body"in t)try{new Response(t.body),Q=!0}catch(t){Q=!1}Q=!1}return Q}()?r.body:await r.blob();return new Response(o,a)}class Z extends b{constructor(t={}){t.cacheName=w(t.cacheName),super(t),this.j=!1!==t.fallbackToNetwork,this.plugins.push(Z.copyRedirectedCacheableResponsesPlugin)}async U(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.S(t,e):await this.K(t,e))}async K(t,e){let n;const r=e.params||{};if(!this.j)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=r.integrity,i=t.integrity,a=!i||i===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?i||s:void 0})),s&&a&&"no-cors"!==t.mode&&(this.A(),await e.cachePut(t,n.clone()))}return n}async S(t,e){this.A();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}A(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==Z.copyRedirectedCacheableResponsesPlugin&&(n===Z.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(Z.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}Z.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},Z.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await Y(t):t};class tt{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.F=new Map,this.$=new Map,this.H=new Map,this.u=new Z({cacheName:w(t),plugins:[...e,new J({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.u}precache(t){this.addToCacheList(t),this.G||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.G=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:r}=G(n),i="string"!=typeof n&&n.revision?"reload":"default";if(this.F.has(r)&&this.F.get(r)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.F.get(r),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.H.has(t)&&this.H.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:r});this.H.set(t,n.integrity)}if(this.F.set(r,t),this.$.set(r,i),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return z(t,async()=>{const e=new V;this.strategy.plugins.push(e);for(const[e,s]of this.F){const n=this.H.get(s),r=this.$.get(e),i=new Request(e,{integrity:n,cache:r,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:i,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}})}activate(t){return z(t,async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.F.values()),n=[];for(const r of e)s.has(r.url)||(await t.delete(r),n.push(r.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this.F}getCachedURLs(){return[...this.F.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.F.get(e.href)}getIntegrityForCacheKey(t){return this.H.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}const et=()=>(X||(X=new tt),X);class st extends r{constructor(t,e){super(({request:s})=>{const n=t.getURLsToCacheKeys();for(const r of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const i=new URL(t,location.href);i.hash="",yield i.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some(t=>t.test(s))&&t.searchParams.delete(s);return t}(i,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(r){const t=r({url:i});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(r);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}},t.strategy)}}t.CacheFirst=class extends b{async U(t,e){let n,r=await e.cacheMatch(t);if(!r)try{r=await e.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!r)throw new s("no-response",{url:t.url,error:n});return r}},t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const r=this.V(n),i=this.J(s);q(i.expireEntries());const a=i.updateTimestamp(e.url);if(t)try{t.waitUntil(a)}catch(t){}return r?n:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.J(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.X=t,this.B=t.maxAgeSeconds,this.Y=new Map,t.purgeOnQuotaError&&function(t){g.add(t)}(()=>this.deleteCacheAndMetadata())}J(t){if(t===d())throw new s("expire-custom-caches-only");let e=this.Y.get(t);return e||(e=new $(t,this.X),this.Y.set(t,e)),e}V(t){if(!this.B)return!0;const e=this.Z(t);if(null===e)return!0;return e>=Date.now()-1e3*this.B}Z(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.Y)await self.caches.delete(t),await e.delete();this.Y=new Map}},t.NetworkFirst=class extends b{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(u),this.tt=t.networkTimeoutSeconds||0}async U(t,e){const n=[],r=[];let i;if(this.tt){const{id:s,promise:a}=this.et({request:t,logs:n,handler:e});i=s,r.push(a)}const a=this.st({timeoutId:i,request:t,logs:n,handler:e});r.push(a);const o=await e.waitUntil((async()=>await e.waitUntil(Promise.race(r))||await a)());if(!o)throw new s("no-response",{url:t.url});return o}et({request:t,logs:e,handler:s}){let n;return{promise:new Promise(e=>{n=setTimeout(async()=>{e(await s.cacheMatch(t))},1e3*this.tt)}),id:n}}async st({timeoutId:t,request:e,logs:s,handler:n}){let r,i;try{i=await n.fetchAndCachePut(e)}catch(t){t instanceof Error&&(r=t)}return t&&clearTimeout(t),!r&&i||(i=await n.cacheMatch(e)),i}},t.NetworkOnly=class extends b{constructor(t={}){super(t),this.tt=t.networkTimeoutSeconds||0}async U(t,e){let n,r;try{const s=[e.fetch(t)];if(this.tt){const t=m(1e3*this.tt);s.push(t)}if(r=await Promise.race(s),!r)throw new Error(`Timed out the network response after ${this.tt} seconds.`)}catch(t){t instanceof Error&&(n=t)}if(!r)throw new s("no-response",{url:t.url,error:n});return r}},t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await H(t,e):e}},t.StaleWhileRevalidate=class extends b{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(u)}async U(t,e){const n=e.fetchAndCachePut(t).catch(()=>{});e.waitUntil(n);let r,i=await e.cacheMatch(t);if(i);else try{i=await n}catch(t){t instanceof Error&&(r=t)}if(!i)throw new s("no-response",{url:t.url,error:r});return i}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",t=>{const e=w();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter(s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t);return await Promise.all(s.map(t=>self.caches.delete(t))),s})(e).then(t=>{}))})},t.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},t.precacheAndRoute=function(t,e){!function(t){et().precache(t)}(t),function(t){const e=et();h(new st(e,t))}(e)},t.registerRoute=h});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bit-office",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Control AI agents from your phone — pixel office UI + real-time gateway",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,7 @@
10
10
  "dist"
11
11
  ],
12
12
  "scripts": {
13
- "dev": "NODE_ENV=development tsx watch src/index.ts",
13
+ "dev": "NODE_ENV=development WS_PORT=9099 tsx watch src/index.ts",
14
14
  "start": "tsx src/index.ts",
15
15
  "build": "tsup && rm -rf dist/web && cp -r ../web/out dist/web",
16
16
  "typecheck": "tsc --noEmit"
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29],{6029:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var o=n(206),r=n(1406),a=n(9631),l=n(7378);let i={display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"6px 10px",fontSize:"15px",color:"rgba(255, 255, 255, 0.8)",background:"transparent",border:"none",borderRadius:4,cursor:"pointer",textAlign:"left"};function s(e){let{isOpen:t,onClose:n,layout:s,onImportLayout:c,onImportRoomZip:u,soundEnabled:p,onSoundEnabledChange:d}=e,[f,g]=(0,r.useState)(null),b=(0,r.useRef)(null),h=(0,r.useRef)(null);if(!t)return null;let m=async e=>{var t;let o=null==(t=e.target.files)?void 0:t[0];if(!o)return;e.target.value="";let r=await (0,l.l)(o);r&&u&&(u(r.layout,r.backgroundImage),n())};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{onClick:n,style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.5)",zIndex:99}}),(0,o.jsxs)("div",{style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:100,background:"rgba(20, 20, 25, 0.92)",backdropFilter:"blur(16px)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:10,padding:"4px",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.4)",minWidth:200},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"4px 10px",borderBottom:"1px solid rgba(255, 255, 255, 0.08)",marginBottom:"4px"},children:[(0,o.jsx)("span",{style:{fontSize:"15px",color:"rgba(255, 255, 255, 0.9)"},children:"Settings"}),(0,o.jsx)("button",{onClick:n,onMouseEnter:()=>g("close"),onMouseLeave:()=>g(null),style:{background:"close"===f?"rgba(255, 255, 255, 0.08)":"transparent",border:"none",borderRadius:4,color:"rgba(255, 255, 255, 0.6)",fontSize:"15px",cursor:"pointer",padding:"0 4px",lineHeight:1},children:"X"})]}),(0,o.jsx)("button",{onClick:()=>{let e=new Blob([(0,a.hF)(s)],{type:"application/json"}),t=URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.download="office-layout-".concat(Date.now(),".json"),o.click(),URL.revokeObjectURL(t),n()},onMouseEnter:()=>g("export"),onMouseLeave:()=>g(null),style:{...i,background:"export"===f?"rgba(255, 255, 255, 0.08)":"transparent"},children:"Export Layout"}),(0,o.jsx)("button",{onClick:()=>{var e;null==(e=b.current)||e.click()},onMouseEnter:()=>g("import"),onMouseLeave:()=>g(null),style:{...i,background:"import"===f?"rgba(255, 255, 255, 0.08)":"transparent"},children:"Import Layout"}),(0,o.jsx)("button",{onClick:()=>{var e;null==(e=h.current)||e.click()},onMouseEnter:()=>g("room-zip"),onMouseLeave:()=>g(null),style:{...i,background:"room-zip"===f?"rgba(255, 255, 255, 0.08)":"transparent"},children:"Import Room (.zip)"}),(0,o.jsx)("input",{ref:b,type:"file",accept:".json",onChange:e=>{var t;let o=null==(t=e.target.files)?void 0:t[0];if(!o)return;let r=new FileReader;r.onload=()=>{let e=r.result,t=(0,a.Kf)(e);t?(c(t),n()):alert("Invalid layout file")},r.readAsText(o),e.target.value=""},style:{display:"none"}}),(0,o.jsx)("input",{ref:h,type:"file",accept:".zip",onChange:m,style:{display:"none"}}),(0,o.jsxs)("button",{onClick:()=>{let e=!p;d(e),localStorage.setItem("office-sound-enabled",JSON.stringify(e))},onMouseEnter:()=>g("sound"),onMouseLeave:()=>g(null),style:{...i,background:"sound"===f?"rgba(255, 255, 255, 0.08)":"transparent"},children:[(0,o.jsx)("span",{children:"Sound Notifications"}),(0,o.jsx)("span",{style:{width:14,height:14,border:"2px solid rgba(255, 255, 255, 0.5)",borderRadius:3,background:p?"rgba(90, 140, 255, 0.8)":"transparent",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"11px",lineHeight:1,color:"#fff"},children:p?"X":""})]})]})]})}},7378:(e,t,n)=>{n.d(t,{k:()=>p,l:()=>u});var o=n(5712),r=n.n(o),a=n(5195),l=n(9892);function i(e){return new Promise((t,n)=>{let o=URL.createObjectURL(e),r=new Image;r.onload=()=>{URL.revokeObjectURL(o),t(r)},r.onerror=()=>{URL.revokeObjectURL(o),n(Error("Failed to load image from blob"))},r.src=o})}function s(e){var t;let n=(null==(t=e.split(".").pop())?void 0:t.toLowerCase())||"png";return"jpg"===n||"jpeg"===n?"image/jpeg":"webp"===n?"image/webp":"image/png"}function c(e){return 0===e?a.nb.WALL:8===e?a.nb.VOID:e>=1&&e<=7?e:a.nb.FLOOR_1}async function u(e){let t=await r().loadAsync(e),n=t.file("room.json");if(!n)return alert("Invalid room zip: missing room.json"),null;let o=JSON.parse(await n.async("text"));if(!o.cols||!o.rows||!o.tiles)return alert("Invalid room.json: missing cols/rows/tiles"),null;let u=null;if(o.backgroundFile){let e=t.file(o.backgroundFile);if(e){let t=new Blob([await e.async("arraybuffer")],{type:s(o.backgroundFile)});u=await i(t)}}let p=new Map;if(o.tileset){for(let e of o.tileset){if(!e.file)continue;let n=t.file(e.file);if(!n)continue;let o=new Blob([await n.async("arraybuffer")],{type:s(e.file)}),r=await i(o),l=function(e,t,n){let o=document.createElement("canvas");o.width=t,o.height=n;let r=o.getContext("2d");r.imageSmoothingEnabled=!1;let a=Math.min(t/e.naturalWidth,n/e.naturalHeight),l=Math.round(e.naturalWidth*a),i=Math.round(e.naturalHeight*a),s=Math.round((t-l)/2);r.drawImage(e,s,n-i,l,i);let{data:c}=r.getImageData(0,0,t,n),u=[];for(let e=0;e<n;e++){let n=[];for(let o=0;o<t;o++){let r=(e*t+o)*4,a=c[r],l=c[r+1],i=c[r+2];c[r+3]<128?n.push(""):n.push("#".concat(a.toString(16).padStart(2,"0")).concat(l.toString(16).padStart(2,"0")).concat(i.toString(16).padStart(2,"0")).toUpperCase())}u.push(n)}return u}(r,e.gridW*a.dn,e.gridH*a.dn);p.set("room-".concat(e.id),{sprite:l,footprintW:e.gridW,footprintH:e.gridH,label:e.name,tag:e.tag})}p.size>0&&(0,l.F$)(p)}let d=o.tiles.map(c),f={h:35,s:30,b:15,c:0},g=d.map(e=>e===a.nb.WALL||e===a.nb.VOID?null:f),b=(o.furniture||[]).map(e=>({uid:e.uid,type:"room-".concat(e.tileId),col:e.col,row:e.row}));if(o.objects){let e=["front","right","back","left"];for(let t of new Set(o.objects.map(e=>e.type))){let n=(0,l.Um)(t);if(n)for(let o of e){let e="".concat(t,"-").concat(o);if((0,l.Um)(e))continue;let r={...n,type:e,orientation:o,footprintW:1,footprintH:1};l.hS.push(r)}}for(let e of o.objects){var h;let t=function(e){switch(e%360){case 0:default:return"front";case 90:return"right";case 180:return"back";case 270:return"left"}}(null!=(h=e.rotation)?h:0),n="".concat(e.type,"-").concat(t);b.push({uid:e.id,type:n,col:e.col,row:e.row})}}return{layout:{version:1,cols:o.cols,rows:o.rows,tiles:d,furniture:b,tileColors:g},backgroundImage:u}}async function p(e){let t=await fetch(e);return t.ok?u(new File([new Blob([await t.arrayBuffer()],{type:"application/zip"})],e.split("/").pop()||"room.zip",{type:"application/zip"})):(console.error("[roomZipLoader] Failed to fetch ".concat(e,": ").concat(t.status)),null)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[290],{9290:(e,r,t)=>{t.r(r),t.d(r,{default:()=>i});var o=t(206),n=t(1406),l=t(2243);let u={width:36,height:36,padding:0,background:"rgba(20, 20, 25, 0.85)",backdropFilter:"blur(12px)",color:"rgba(255, 255, 255, 0.8)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:8,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.3)"};function i(e){let{zoom:r,onZoomChange:t}=e,[i,s]=(0,n.useState)(null),[c,a]=(0,n.useState)(!1),[d,p]=(0,n.useState)(!1),x=(0,n.useRef)(null),b=(0,n.useRef)(null),g=(0,n.useRef)(r),h=r<=l.DH,k=r>=l.ZV;return(0,n.useEffect)(()=>{if(r!==g.current)return g.current=r,x.current&&clearTimeout(x.current),b.current&&clearTimeout(b.current),a(!0),p(!1),b.current=setTimeout(()=>{p(!0)},1200),x.current=setTimeout(()=>{a(!1),p(!1)},1800),()=>{x.current&&clearTimeout(x.current),b.current&&clearTimeout(b.current)}},[r]),(0,o.jsxs)(o.Fragment,{children:[c&&(0,o.jsxs)("div",{style:{position:"absolute",top:10,left:"50%",transform:"translateX(-50%)",zIndex:50,background:"rgba(20, 20, 25, 0.85)",backdropFilter:"blur(12px)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:8,padding:"4px 12px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.3)",fontSize:"15px",color:"rgba(255, 255, 255, 0.8)",userSelect:"none",opacity:+!d,transition:"opacity ".concat(.5,"s ease-out"),pointerEvents:"none"},children:[r,"x"]}),(0,o.jsxs)("div",{style:{position:"absolute",top:8,left:8,zIndex:50,display:"flex",flexDirection:"column",gap:4},children:[(0,o.jsx)("button",{onClick:()=>t(r+1),disabled:k,onMouseEnter:()=>s("plus"),onMouseLeave:()=>s(null),style:{...u,background:"plus"!==i||k?u.background:"rgba(255,255,255,0.12)",cursor:k?"default":"pointer",opacity:k?.4:1},title:"Zoom in (Ctrl+Scroll)",children:(0,o.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,o.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,o.jsx)("line",{x1:"3",y1:"9",x2:"15",y2:"9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}),(0,o.jsx)("button",{onClick:()=>t(r-1),disabled:h,onMouseEnter:()=>s("minus"),onMouseLeave:()=>s(null),style:{...u,background:"minus"!==i||h?u.background:"rgba(255,255,255,0.12)",cursor:h?"default":"pointer",opacity:h?.4:1},title:"Zoom out (Ctrl+Scroll)",children:(0,o.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,o.jsx)("line",{x1:"3",y1:"9",x2:"15",y2:"9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[336],{336:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var o=n(206),r=n(1406),a=n(138),l=n(5026);function i(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":String(e)}function s(e){return!!e&&!!(e.entryFile||e.previewCmd)}function c(e){let{events:t,name:n,preview:r,onBack:a,onPreview:l}=e,i=[];for(let e of t){var c,p,d,g;switch(e.type){case"TEAM_CHAT":i.push({id:"tc-".concat(e.timestamp,"-").concat(e.fromAgentId),agent:e.fromAgentId,text:e.message,timestamp:e.timestamp,type:e.messageType});break;case"TASK_DONE":(null==(c=e.result)?void 0:c.summary)&&i.push({id:"done-".concat(e.taskId),agent:e.agentId,text:e.result.summary,timestamp:null!=(p=e.timestamp)?p:0,type:"result"});break;case"TASK_DELEGATED":i.push({id:"del-".concat(e.taskId),agent:e.fromAgentId,text:"Delegated to ".concat(e.toAgentId,": ").concat(e.prompt.slice(0,200)),timestamp:null!=(d=e.timestamp)?d:0,type:"delegation"});break;case"TEAM_PHASE":i.push({id:"phase-".concat(e.teamId,"-").concat(e.phase),agent:e.leadAgentId,text:"Phase: ".concat(e.phase),timestamp:null!=(g=e.timestamp)?g:0,type:"phase"})}}let u={delegation:{bg:"rgba(90, 172, 255, 0.06)",border:"rgba(90, 172, 255, 0.12)",label:"DELEGATE",labelColor:"#5aacff"},result:{bg:"rgba(72, 204, 106, 0.06)",border:"rgba(72, 204, 106, 0.12)",label:"DONE",labelColor:"#48cc6a"},phase:{bg:"rgba(232, 176, 64, 0.06)",border:"rgba(232, 176, 64, 0.12)",label:"PHASE",labelColor:"#e8b040"},status:{bg:"rgba(255, 255, 255, 0.02)",border:"rgba(255, 255, 255, 0.06)",label:"STATUS",labelColor:"rgba(255,255,255,0.4)"}};return(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,o.jsxs)("div",{style:{padding:"14px 16px",borderBottom:"1px solid rgba(255, 255, 255, 0.08)",display:"flex",alignItems:"center",gap:10},children:[(0,o.jsx)("button",{onClick:a,style:{background:"none",border:"1px solid rgba(255, 255, 255, 0.15)",color:"rgba(255, 255, 255, 0.5)",padding:"5px 12px",cursor:"pointer",fontSize:11,letterSpacing:"0.03em"},children:"Back"}),(0,o.jsx)("span",{className:"px-font",style:{color:"#e8b040",fontSize:13,fontWeight:600,flex:1,letterSpacing:"0.02em"},children:n}),s(r)&&l&&(0,o.jsx)("button",{onClick:()=>l(r),style:{background:"rgba(72, 204, 106, 0.12)",border:"1px solid rgba(72, 204, 106, 0.25)",color:"#48cc6a",padding:"5px 14px",cursor:"pointer",fontSize:11,letterSpacing:"0.03em"},children:"Preview"})]}),(0,o.jsxs)("div",{style:{flex:1,overflow:"auto",padding:"8px 12px"},children:[0===i.length&&(0,o.jsx)("div",{className:"px-font",style:{color:"rgba(255, 255, 255, 0.3)",fontSize:12,textAlign:"center",padding:40},children:"No messages in this project"}),i.map(e=>{var t;let n=null!=(t=u[e.type])?t:u.status;return(0,o.jsxs)("div",{style:{marginBottom:6,padding:"8px 10px",background:n.bg,borderLeft:"2px solid ".concat(n.border)},children:[(0,o.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:3},children:[(0,o.jsx)("span",{style:{color:n.labelColor,fontSize:9,fontWeight:700,letterSpacing:"0.08em",fontFamily:"monospace",textTransform:"uppercase"},children:n.label}),(0,o.jsx)("span",{style:{color:"rgba(255, 255, 255, 0.6)",fontSize:11,fontWeight:600,fontFamily:"monospace"},children:e.agent.replace(/^agent-/,"").split("-")[0]})]}),(0,o.jsx)("div",{style:{color:"rgba(255, 255, 255, 0.55)",fontSize:12,lineHeight:1.5,fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.text.slice(0,800)})]},e.id)})]})]})}function p(e){let{isOpen:t,onClose:n,onPreview:p}=e,{projectList:d,viewingProjectId:g,viewingProjectEvents:u,viewingProjectName:x,clearViewingProject:m}=(0,a.h)(),[b,f]=(0,r.useState)(!1),h=g?d.find(e=>e.id===g):null;if((0,r.useEffect)(()=>{t&&!b&&((0,l.S8)({type:"LIST_PROJECTS"}),f(!0)),t||(f(!1),m())},[t]),!t)return null;let y=(e,t)=>{let o=e=>(null==e?void 0:e.replace(/\*\*/g,"").replace(/`/g,"").replace(/^_+|_+$/g,"").trim())||void 0,r=o(e.previewCmd),a=o(e.entryFile),i=e.projectDir;r&&e.previewPort?(0,l.S8)({type:"SERVE_PREVIEW",previewCmd:r,previewPort:e.previewPort,cwd:i}):r?(0,l.S8)({type:"SERVE_PREVIEW",previewCmd:r,cwd:i}):a&&i&&(0,l.S8)({type:"SERVE_PREVIEW",filePath:i+"/"+a}),null==p||p(e,t),n()};return(0,o.jsx)("div",{style:{position:"fixed",inset:0,zIndex:100,backgroundColor:"rgba(0,0,0,0.6)",display:"flex",alignItems:"center",justifyContent:"center"},onClick:n,children:(0,o.jsxs)("div",{style:{backgroundColor:"#14141a",border:"2px solid #e8b040",boxShadow:"0 0 40px rgba(200,155,48,0.08), 4px 4px 0px rgba(0,0,0,0.5)",width:"90%",maxWidth:560,height:"70vh",display:"flex",flexDirection:"column"},onClick:e=>e.stopPropagation(),children:[(0,o.jsxs)("div",{style:{padding:"14px 18px",borderBottom:"1px solid rgba(232, 176, 64, 0.2)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,o.jsx)("span",{className:"px-font",style:{color:"#e8b040",fontSize:13,fontWeight:600,letterSpacing:"0.05em"},children:"Project History"}),(0,o.jsx)("button",{onClick:n,style:{background:"none",border:"none",color:"rgba(255, 255, 255, 0.3)",fontSize:16,cursor:"pointer",lineHeight:1},children:"x"})]}),(0,o.jsx)("div",{style:{flex:1,overflow:"auto"},children:g&&u.length>0?(0,o.jsx)(c,{events:u,name:null!=x?x:"Project",preview:null==h?void 0:h.preview,onBack:m,onPreview:e=>y(e,null==h?void 0:h.ratings)}):(0,o.jsx)("div",{style:{padding:"6px 0"},children:0===d.length?(0,o.jsxs)("div",{className:"px-font",style:{color:"rgba(255, 255, 255, 0.3)",fontSize:12,textAlign:"center",padding:40,lineHeight:1.8},children:["No archived projects yet.",(0,o.jsx)("br",{}),"Projects are saved when you click End Project."]}):d.map((e,t)=>(0,o.jsx)("div",{style:{padding:"12px 18px",borderBottom:t<d.length-1?"1px solid rgba(255, 255, 255, 0.05)":"none",cursor:"pointer",transition:"background 0.15s"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(232, 176, 64, 0.04)"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:(0,o.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[(0,o.jsxs)("button",{onClick:()=>(0,l.S8)({type:"LOAD_PROJECT",projectId:e.id}),style:{flex:1,textAlign:"left",background:"none",border:"none",cursor:"pointer",padding:0},children:[(0,o.jsx)("div",{style:{color:"rgba(255, 255, 255, 0.85)",fontSize:12,fontWeight:600,fontFamily:"monospace",marginBottom:5},children:e.name}),(0,o.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"center",flexWrap:"wrap"},children:[(0,o.jsx)("span",{style:{fontSize:10,fontFamily:"monospace",color:"rgba(255, 255, 255, 0.35)"},children:function(e){let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"Just now";if(t<60)return"".concat(t,"m ago");let n=Math.floor(t/60);if(n<24)return"".concat(n,"h ago");let o=Math.floor(n/24);if(o<7)return"".concat(o,"d ago");let r=new Date(e),a=e=>String(e).padStart(2,"0");return"".concat(r.getFullYear(),"-").concat(a(r.getMonth()+1),"-").concat(a(r.getDate())," ").concat(a(r.getHours()),":").concat(a(r.getMinutes()))}(e.endedAt)}),(0,o.jsx)("span",{style:{fontSize:10,fontFamily:"monospace",color:"#e8b040",opacity:.6},children:function(e,t){let n=Math.floor((t-e)/6e4);if(n<1)return"<1m";if(n<60)return"".concat(n,"m");let o=Math.floor(n/60);return"".concat(o,"h ").concat(n%60,"m")}(e.startedAt,e.endedAt)}),(0,o.jsxs)("span",{style:{fontSize:10,fontFamily:"monospace",color:"rgba(90, 172, 255, 0.5)"},children:[e.agentNames.length," agent",1!==e.agentNames.length?"s":""]}),e.tokenUsage&&(e.tokenUsage.inputTokens>0||e.tokenUsage.outputTokens>0)&&(0,o.jsxs)("span",{style:{fontSize:10,fontFamily:"monospace",color:"#48cc6a",opacity:.6},title:"Input: ".concat(e.tokenUsage.inputTokens.toLocaleString()," / Output: ").concat(e.tokenUsage.outputTokens.toLocaleString()),children:["↑",i(e.tokenUsage.inputTokens)," ","↓",i(e.tokenUsage.outputTokens)]})]}),(0,o.jsx)("div",{style:{fontSize:10,fontFamily:"monospace",color:"rgba(255, 255, 255, 0.25)",marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.agentNames.join(" / ")}),e.ratings&&Object.keys(e.ratings).length>0&&(0,o.jsx)("div",{style:{display:"flex",gap:8,marginTop:4,flexWrap:"wrap"},children:Object.entries(e.ratings).map(e=>{let[t,n]=e,r=Math.min(5,Math.max(0,Math.round(n)));return(0,o.jsxs)("span",{style:{fontSize:9,fontFamily:"monospace",color:"rgba(232, 176, 64, 0.7)"},children:[t.slice(0,4)," ","★".repeat(r),"☆".repeat(5-r)]},t)})})]}),s(e.preview)&&(0,o.jsx)("button",{onClick:t=>{t.stopPropagation(),y(e.preview,e.ratings)},style:{background:"rgba(72, 204, 106, 0.1)",border:"1px solid rgba(72, 204, 106, 0.25)",color:"#48cc6a",padding:"5px 12px",cursor:"pointer",fontSize:10,letterSpacing:"0.04em",flexShrink:0,marginTop:2},onMouseEnter:e=>{e.currentTarget.style.background="rgba(72, 204, 106, 0.2)"},onMouseLeave:e=>{e.currentTarget.style.background="rgba(72, 204, 106, 0.1)"},children:"Preview"})]})},e.id))})})]})})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[368],{368:(e,t,l)=>{l.r(t),l.d(t,{default:()=>M});var r=l(206),i=l(1406),a=l(5195);function n(e,t,l,r){let i=l.length,n=i>0?l[0].length:0;if(t<0||t>=i||e<0||e>=n)return!1;let s=l[t][e];return!(s===a.nb.WALL||s===a.nb.VOID||r.has("".concat(e,",").concat(t)))}function s(e,t){let l=e.length,r=l>0?e[0].length:0,i=[];for(let a=0;a<l;a++)for(let l=0;l<r;l++)n(l,a,e,t)&&i.push({col:l,row:a});return i}function o(e,t,l,r,i,a){if(e===l&&t===r)return[];let s=(e,t)=>"".concat(e,",").concat(t),o=s(e,t),c=s(l,r);if(!n(l,r,i,a))return[];let u=new Set;u.add(o);let h=new Map,f=[{col:e,row:t}],d=[{dc:0,dr:-1},{dc:0,dr:1},{dc:-1,dr:0},{dc:1,dr:0}];for(;f.length>0;){let e=f.shift(),t=s(e.col,e.row);if(t===c){let e=[],t=c;for(;t!==o;){let[l,r]=t.split(",").map(Number);e.unshift({col:l,row:r}),t=h.get(t)}return e}for(let l of d){let r=e.col+l.dc,o=e.row+l.dr,c=s(r,o);!u.has(c)&&n(r,o,i,a)&&(u.add(c),h.set(c,t),f.push({col:r,row:o}))}}return[]}var c=l(2243);let u=new Set(["Read","Grep","Glob","WebFetch","WebSearch"]);function h(e,t){return{x:e*a.dn+a.dn/2,y:t*a.dn+a.dn/2}}function f(e,t,l,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=arguments.length>5?arguments[5]:void 0,s=r?r.seatCol:1,o=r?r.seatRow:1,u=h(s,o),f=null!=n?n:r?a.Lp.TYPE:a.Lp.IDLE;return{id:e,state:f,dir:r?r.facingDir:a.OP.DOWN,x:u.x,y:u.y,tileCol:s,tileRow:o,path:[],moveProgress:0,currentTool:null,palette:t,hueShift:i,frame:0,frameTimer:0,wanderTimer:f===a.Lp.IDLE?d(c.wj,c.k8):0,wanderCount:0,wanderLimit:g(c.Rb,c.he),isActive:f===a.Lp.TYPE,seatId:l,bubbleType:null,bubbleTimer:0,speechText:null,speechTimer:0,seatTimer:0,isSubagent:!1,parentAgentId:null,matrixEffect:null,matrixEffectTimer:0,matrixEffectSeeds:[],isExternal:!1,label:null,labelColor:null}}function d(e,t){return e+Math.random()*(t-e)}function g(e,t){return e+Math.floor(Math.random()*(t-e+1))}function m(e,t,l){return(7*e+13*t+31*Math.floor(l*c.vU)&255)<c.gB}function b(){let e=[];for(let t=0;t<c.W3;t++)e.push(Math.random());return e}var p=l(9631),w=l(9892);class T{computeCharacterScale(){let e=Math.max(c.wh,c.YK),t=Math.max(this.layout.cols,this.layout.rows);return t<=e?1:1.15*Math.pow(t/e,.75)}setBackgroundImage(e){this.backgroundImage=e}setLayout(e){for(let t of(this.layout=e,this.tileMap=(0,p.MB)(e),this.characterScale=this.computeCharacterScale(),this.seats=(0,p.CW)(e.furniture),this.blockedTiles=(0,p.AI)(e.furniture),this.furniture=(0,p.Co)(e.furniture),this.walkableTiles=s(this.tileMap,this.blockedTiles),this.characters.values())){if(t.seatId){let e=this.seats.get(t.seatId);if(e)e.assigned=!0;else{t.seatId=null;let e=this.findFreeSeat();e&&(this.seats.get(e).assigned=!0,t.seatId=e)}}if(t.seatId){let e=this.seats.get(t.seatId);t.tileCol=e.seatCol,t.tileRow=e.seatRow,t.dir=e.facingDir}else if(this.walkableTiles.length>0){let e=this.walkableTiles[Math.floor(Math.random()*this.walkableTiles.length)];t.tileCol=e.col,t.tileRow=e.row}t.x=t.tileCol*a.dn+a.dn/2,t.y=t.tileRow*a.dn+a.dn/2,t.path=[],t.moveProgress=0}this.rebuildFurnitureInstances()}addCharacter(e,t,l,r,i,n){if(this.agentIdToCharId.has(e))return;let s=this.nextCharId++;this.agentIdToCharId.set(e,s),this.charIdToAgentId.set(s,e);let{palette:o,hueShift:c}=void 0!==l?{palette:l,hueShift:0}:this.pickDiversePalette(),u=this.walkableTiles.length>0?this.walkableTiles[Math.floor(Math.random()*this.walkableTiles.length)]:{col:1,row:1},h=f(s,o,null,null,c,a.Lp.IDLE);h.x=u.col*a.dn+a.dn/2,h.y=u.row*a.dn+a.dn/2,h.tileCol=u.col,h.tileRow=u.row,r&&(h.isExternal=!0),i&&(h.label=i),n&&(h.labelColor=n),h.matrixEffect="spawn",h.matrixEffectTimer=0,h.matrixEffectSeeds=b(),this.characters.set(s,h)}removeCharacter(e){let t=this.agentIdToCharId.get(e);if(void 0===t)return;let l=this.characters.get(t);if(l&&"despawn"!==l.matrixEffect){if(l.seatId){let e=this.seats.get(l.seatId);e&&(e.assigned=!1)}this.selectedCharId===t&&(this.selectedCharId=null),l.matrixEffect="despawn",l.matrixEffectTimer=0,l.matrixEffectSeeds=b(),l.bubbleType=null}}updateCharacterStatus(e,t,l){let r=this.agentIdToCharId.get(e);if(void 0===r)return;let i=this.characters.get(r);if(!i)return;let a=i.isActive,n="working"===t||"waiting_approval"===t;if(i.isActive=n,l&&!i.seatId){if(i.restSeatId){let e=this.seats.get(i.restSeatId);e&&(e.assigned=!1),i.restSeatId=null,i.seatTimer=0}let e=this.findFreeSeat();e&&(this.seats.get(e).assigned=!0,i.seatId=e),this.rebuildFurnitureInstances()}if(!n&&a){if(l);else{if(i.seatId){let e=this.seats.get(i.seatId);e&&(e.assigned=!1),i.seatId=null}i.seatTimer=-1,i.path=[],i.moveProgress=0}this.rebuildFurnitureInstances()}else if(n&&!a){if(!i.seatId){if(i.restSeatId){let e=this.seats.get(i.restSeatId);e&&(e.assigned=!1),i.restSeatId=null,i.seatTimer=0}let e=this.findFreeSeat();e&&(this.seats.get(e).assigned=!0,i.seatId=e)}this.rebuildFurnitureInstances()}}selectCharacter(e){if(null===e){this.selectedCharId=null;return}let t=this.agentIdToCharId.get(e);this.selectedCharId=null!=t?t:null}showBubble(e,t){let l=this.agentIdToCharId.get(e);if(void 0===l)return;let r=this.characters.get(l);r&&("permission"===t||"working"===t?(r.bubbleType=t,r.bubbleTimer=0):(r.bubbleType="waiting",r.bubbleTimer=c.WK))}clearBubble(e){let t=this.agentIdToCharId.get(e);if(void 0===t)return;let l=this.characters.get(t);l&&("permission"===l.bubbleType||"working"===l.bubbleType?(l.bubbleType=null,l.bubbleTimer=0):"waiting"===l.bubbleType&&(l.bubbleTimer=Math.min(l.bubbleTimer,c.M_)))}showSpeechBubble(e,t){let l=this.agentIdToCharId.get(e);if(void 0===l)return;let r=this.characters.get(l);r&&(r.speechText=t.length>c.lO?t.slice(0,c.lO)+"...":t,r.speechTimer=c.Jk)}getCharacters(){return Array.from(this.characters.values())}getLayout(){return this.layout}getSelectedCharId(){return this.selectedCharId}getHoveredCharId(){return this.hoveredCharId}getAgentId(e){var t;return null!=(t=this.charIdToAgentId.get(e))?t:null}getAgentAtPixel(e,t){let l=this.characterScale;for(let i of this.getCharacters().sort((e,t)=>t.y-e.y)){if("despawn"===i.matrixEffect)continue;let n=i.state===a.Lp.TYPE?c.iE:0,s=i.y+n,o=i.x-c.Ns*l,u=i.x+c.Ns*l,h=s-c.o3*l;if(e>=o&&e<=u&&t>=h&&t<=s){var r;return null!=(r=this.charIdToAgentId.get(i.id))?r:null}}return null}setHoveredCharAtPixel(e,t){let l=this.characterScale;for(let r of this.getCharacters().sort((e,t)=>t.y-e.y)){if("despawn"===r.matrixEffect)continue;let i=r.state===a.Lp.TYPE?c.iE:0,n=r.y+i,s=r.x-c.Ns*l,o=r.x+c.Ns*l,u=n-c.o3*l;if(e>=s&&e<=o&&t>=u&&t<=n){this.hoveredCharId=r.id;return}}this.hoveredCharId=null}update(e){let t=[];for(let l of this.characters.values()){if(l.matrixEffect){l.matrixEffectTimer+=e,l.matrixEffectTimer>=a.Pz&&("spawn"===l.matrixEffect?(l.matrixEffect=null,l.matrixEffectTimer=0,l.matrixEffectSeeds=[]):t.push(l.id));continue}if(l.isActive&&!l.seatId&&l.state===a.Lp.IDLE){let e=this.findFreeSeat();e&&(this.seats.get(e).assigned=!0,l.seatId=e)}this.withOwnSeatUnblocked(l,()=>(function(e,t,l,r,i,n){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,u=arguments.length>7?arguments[7]:void 0;switch(e.frameTimer+=t,e.state){case a.Lp.TYPE:if(e.frameTimer>=c.S3&&(e.frameTimer-=c.S3,e.frame=(e.frame+1)%2),!e.isActive){if(e.seatTimer>0){e.seatTimer-=t;break}e.seatTimer=0,e.state=a.Lp.IDLE,e.frame=0,e.frameTimer=0,e.wanderTimer=d(c.wj,c.k8),e.wanderCount=0,e.wanderLimit=g(c.Rb,c.he)}break;case a.Lp.IDLE:if(e.frame=0,e.seatTimer<0&&(e.seatTimer=0),e.isActive){if(e.restSeatId){let t=r.get(e.restSeatId);t&&(t.assigned=!1),e.restSeatId=null,e.seatTimer=0}if(!e.seatId)break;let t=r.get(e.seatId);if(t){let l=o(e.tileCol,e.tileRow,t.seatCol,t.seatRow,i,n);l.length>0?(e.path=l,e.moveProgress=0,e.state=a.Lp.WALK):(e.state=a.Lp.TYPE,e.dir=t.facingDir),e.frame=0,e.frameTimer=0}break}if(e.restSeatId&&e.seatTimer>0){if(e.seatTimer-=t,e.seatTimer<=0){e.seatTimer=0;let t=r.get(e.restSeatId);t&&(t.assigned=!1),e.restSeatId=null,e.wanderTimer=d(c.wj,c.k8)}break}if(e.wanderTimer-=t,e.wanderTimer<=0){if(e.wanderCount>=e.wanderLimit&&e.seatId){let t=e.restSeatId?r.get(e.restSeatId):null;t&&(t.assigned=!1),e.restSeatId=null;let l=r.get(e.seatId);if(l){let t=o(e.tileCol,e.tileRow,l.seatCol,l.seatRow,i,n);if(t.length>0){e.path=t,e.moveProgress=0,e.state=a.Lp.WALK,e.frame=0,e.frameTimer=0;break}}}if(u&&!e.restSeatId&&.3>Math.random()){let t=u();if(t){let l=r.get(t);if(l){let r="".concat(l.seatCol,",").concat(l.seatRow),s=n.has(r);s&&n.delete(r);let c=o(e.tileCol,e.tileRow,l.seatCol,l.seatRow,i,n);if(s&&n.add(r),c.length>0){l.assigned=!0,e.restSeatId=t,e.path=c,e.moveProgress=0,e.state=a.Lp.WALK,e.frame=0,e.frameTimer=0,e.wanderCount++;break}}}}if(l.length>0){let t=l[Math.floor(Math.random()*l.length)],r=o(e.tileCol,e.tileRow,t.col,t.row,i,n);r.length>0&&(e.path=r,e.moveProgress=0,e.state=a.Lp.WALK,e.frame=0,e.frameTimer=0,e.wanderCount++)}e.wanderTimer=d(c.wj,c.k8)}break;case a.Lp.WALK:{if(e.frameTimer>=c.lY&&(e.frameTimer-=c.lY,e.frame=(e.frame+1)%4),0===e.path.length){let t=h(e.tileCol,e.tileRow);if(e.x=t.x,e.y=t.y,e.isActive)if(e.seatId){let t=r.get(e.seatId);t&&e.tileCol===t.seatCol&&e.tileRow===t.seatRow?(e.state=a.Lp.TYPE,e.dir=t.facingDir):e.state=a.Lp.IDLE}else e.state=a.Lp.IDLE;else{if(e.restSeatId){let t=r.get(e.restSeatId);if(t&&e.tileCol===t.seatCol&&e.tileRow===t.seatRow){e.state=a.Lp.IDLE,e.dir=t.facingDir,e.seatTimer=d(c.Ot,c.Ww),e.frame=0,e.frameTimer=0;break}}if(e.seatId){let t=r.get(e.seatId);if(t&&e.tileCol===t.seatCol&&e.tileRow===t.seatRow){e.state=a.Lp.TYPE,e.dir=t.facingDir,e.seatTimer<0?e.seatTimer=0:e.seatTimer=d(c.Ot,c.Ww),e.wanderCount=0,e.wanderLimit=g(c.Rb,c.he),e.frame=0,e.frameTimer=0;break}}e.state=a.Lp.IDLE,e.wanderTimer=d(c.wj,c.k8)}e.frame=0,e.frameTimer=0;break}let l=e.path[0];e.dir=function(e,t,l,r){let i=l-e;return i>0?a.OP.RIGHT:i<0?a.OP.LEFT:r-t>0?a.OP.DOWN:a.OP.UP}(e.tileCol,e.tileRow,l.col,l.row),e.moveProgress+=c.XE/a.dn*t*s;let u=h(e.tileCol,e.tileRow),f=h(l.col,l.row),m=Math.min(e.moveProgress,1);if(e.x=u.x+(f.x-u.x)*m,e.y=u.y+(f.y-u.y)*m,e.moveProgress>=1&&(e.tileCol=l.col,e.tileRow=l.row,e.x=f.x,e.y=f.y,e.path.shift(),e.moveProgress=0),e.isActive&&e.seatId){let t=r.get(e.seatId);if(t){let l=e.path[e.path.length-1];if(!l||l.col!==t.seatCol||l.row!==t.seatRow){let l=o(e.tileCol,e.tileRow,t.seatCol,t.seatRow,i,n);l.length>0&&(e.path=l,e.moveProgress=0)}}}}}})(l,e,this.walkableTiles,this.seats,this.tileMap,this.blockedTiles,this.characterScale,()=>this.findFreeRestSeat())),"waiting"===l.bubbleType&&(l.bubbleTimer-=e,l.bubbleTimer<=0&&(l.bubbleType=null,l.bubbleTimer=0)),l.speechText&&(l.speechTimer-=e,l.speechTimer<=0&&(l.speechText=null,l.speechTimer=0))}for(let e of t){let t=this.charIdToAgentId.get(e);this.characters.delete(e),t&&(this.agentIdToCharId.delete(t),this.charIdToAgentId.delete(e))}}spawnTestCharacters(){this.clearTestCharacters();let e=0;for(let[t,l]of this.seats){if(l.isRest||l.assigned)continue;let r="__test_".concat(e),i=this.nextCharId++;this.agentIdToCharId.set(r,i),this.charIdToAgentId.set(i,r);let n=e%c.ic;l.assigned=!0;let s=f(i,n,t,l,0,a.Lp.TYPE);s.isActive=!0,this.characters.set(i,s),e++}this.rebuildFurnitureInstances()}clearTestCharacters(){let e=[];for(let[t,l]of this.agentIdToCharId){if(!t.startsWith("__test_"))continue;let r=this.characters.get(l);if(null==r?void 0:r.seatId){let e=this.seats.get(r.seatId);e&&(e.assigned=!1)}this.characters.delete(l),this.charIdToAgentId.delete(l),e.push(t)}for(let t of e)this.agentIdToCharId.delete(t);e.length>0&&this.rebuildFurnitureInstances()}hasTestCharacters(){for(let e of this.agentIdToCharId.keys())if(e.startsWith("__test_"))return!0;return!1}findFreeSeat(){for(let[e,t]of this.seats)if(!t.assigned&&!t.isRest)return e;return null}findFreeRestSeat(){let e=[...this.seats.entries()].filter(e=>{let[,t]=e;return t.isRest&&!t.assigned});if(0===e.length)return null;let[t]=e[Math.floor(Math.random()*e.length)];return t}pickDiversePalette(){let e=Array(c.ic).fill(0);for(let t of this.characters.values())!t.isSubagent&&e[t.palette]++;let t=Math.min(...e),l=[];for(let r=0;r<c.ic;r++)e[r]===t&&l.push(r);let r=l[Math.floor(Math.random()*l.length)],i=0;return t>0&&(i=c.qt+Math.floor(Math.random()*c.p7)),{palette:r,hueShift:i}}ownSeatKey(e){if(!e.seatId)return null;let t=this.seats.get(e.seatId);return t?"".concat(t.seatCol,",").concat(t.seatRow):null}withOwnSeatUnblocked(e,t){let l=this.ownSeatKey(e),r=e.restSeatId?(()=>{let t=this.seats.get(e.restSeatId);return t?"".concat(t.seatCol,",").concat(t.seatRow):null})():null;l&&this.blockedTiles.delete(l),r&&this.blockedTiles.delete(r);let i=t();return l&&this.blockedTiles.add(l),r&&this.blockedTiles.add(r),i}rebuildFurnitureInstances(){let e=new Set;for(let t of this.characters.values()){if(!t.isActive||!t.seatId)continue;let l=this.seats.get(t.seatId);if(!l)continue;let r=l.facingDir===a.OP.RIGHT?1:l.facingDir===a.OP.LEFT?-1:0,i=l.facingDir===a.OP.DOWN?1:l.facingDir===a.OP.UP?-1:0;for(let t=1;t<=c.Xo;t++)e.add("".concat(l.seatCol+r*t,",").concat(l.seatRow+i*t));for(let t=1;t<=c.ou;t++){let a=l.seatCol+r*t,n=l.seatRow+i*t;0!==r?(e.add("".concat(a,",").concat(n-1)),e.add("".concat(a,",").concat(n+1))):(e.add("".concat(a-1,",").concat(n)),e.add("".concat(a+1,",").concat(n)))}}if(0===e.size){this.furniture=(0,p.Co)(this.layout.furniture);return}let t=this.layout.furniture.map(t=>{let l=(0,w.Um)(t.type);if(!l)return t;for(let r=0;r<l.footprintH;r++)for(let i=0;i<l.footprintW;i++)if(e.has("".concat(t.col+i,",").concat(t.row+r))){let e=(0,w.xr)(t.type);if(e!==t.type)return{...t,type:e};return t}return t});this.furniture=(0,p.Co)(t)}constructor(e){this.backgroundImage=null,this.characters=new Map,this.selectedCharId=null,this.hoveredCharId=null,this.characterScale=1,this.agentIdToCharId=new Map,this.charIdToAgentId=new Map,this.nextCharId=1,this.layout=e||(0,p.kr)(),this.tileMap=(0,p.MB)(this.layout),this.seats=(0,p.CW)(this.layout.furniture),this.blockedTiles=(0,p.AI)(this.layout.furniture),this.furniture=(0,p.Co)(this.layout.furniture),this.walkableTiles=s(this.tileMap,this.blockedTiles),this.characterScale=this.computeCharacterScale()}}var I=l(5702),y=l(2988),C=l(4777),S=l(5055),x=l(4296),v=l(1204);class R{addAgent(e,t){this.officeState.addCharacter(e,t.name,t.palette,t.isExternal,t.label,t.labelColor)}removeAgent(e){this.officeState.removeCharacter(e)}updateAgent(e,t,l,r){this.officeState.updateCharacterStatus(e,t,r),l?this.officeState.showBubble(e,l):this.officeState.clearBubble(e)}showSpeechBubble(e,t){this.officeState.showSpeechBubble(e,t)}selectAgent(e){this.officeState.selectCharacter(e)}dispose(){var e;null==(e=this.stopLoop)||e.call(this),this.stopLoop=null}getOfficeState(){return this.officeState}constructor(e,t){this.officeState=e,this.stopLoop=t}}function M(e){let{onAdapterReady:t,onAgentClick:l,editMode:n,editorRef:s,onTileClick:o,onTileRightClick:h,onGhostMove:f,onDragStart:d,onDragMove:g,onDragEnd:b,onDeleteBtnClick:p,onRotateBtnClick:M,officeStateRef:k,onAssetsLoaded:E,zoomRef:L,panRef:P}=e,A=(0,i.useRef)(null),[F,Y]=(0,i.useState)(!1),B=(0,i.useRef)(l);B.current=l;let W=(0,i.useRef)(E);W.current=E;let D=(0,i.useRef)(n);D.current=n;let X=(0,i.useRef)(!1),O=(0,i.useRef)({x:0,y:0,panX:0,panY:0}),U=(0,i.useRef)({offsetX:0,offsetY:0}),H=(0,i.useRef)(null),_=(0,i.useCallback)((e,t)=>{let l=k.current;if(!l)return 4;let r=l.layout.cols*c.dn,i=l.layout.rows*c.dn;return Math.max(c.DH,Math.min(e/r,t/i))},[k]),z=(0,i.useCallback)(()=>{let e=A.current;if(!e)return;let t=e.parentElement;if(!t)return;let l=window.devicePixelRatio||1,r=t.clientWidth,i=t.clientHeight;e.width=r*l,e.height=i*l,e.style.width="".concat(r,"px"),e.style.height="".concat(i,"px");let a=e.getContext("2d");a&&a.scale(l,l),L.current=_(r,i),P.current={x:0,y:0}},[_,L,P]);(0,i.useEffect)(()=>{let e=!1;return(0,x.F)().then(t=>{e||((0,w.ar)(t.tilesetSprites),Y(!0))}).catch(t=>{console.warn("[PixelOfficeScene] Asset loading failed, using fallbacks:",t),e||Y(!0)}),()=>{e=!0}},[]),(0,i.useEffect)(()=>{var e;if(!F)return;let l=A.current;if(!l)return;let r=new T;k.current=r,null==(e=W.current)||e.call(W),z();let i=new ResizeObserver(()=>z());l.parentElement&&i.observe(l.parentElement);let n=window.devicePixelRatio||1,o=function(e,t){let l=e.getContext("2d");l.imageSmoothingEnabled=!1;let r=0,i=0,a=!1,n=e=>{if(a)return;let s=0===r?0:Math.min((e-r)/1e3,c.O9);r=e,t.update(s),l.imageSmoothingEnabled=!1,t.render(l),i=requestAnimationFrame(n)};return i=requestAnimationFrame(n),()=>{a=!0,cancelAnimationFrame(i)}}(l,{update:e=>{r.update(e)},render:e=>{let t,i=l.width/n,o=l.height/n,h=L.current,f=P.current,d=s.current;if(D.current){let e=null;if(d.activeTool===a.VF.FURNITURE_PLACE&&d.selectedFurnitureType){let t=(0,w.Um)(d.selectedFurnitureType);t&&(e=t.sprite)}if(d.dragUid){let t=r.layout.furniture.find(e=>e.uid===d.dragUid);if(t){let l=(0,w.Um)(t.type);l&&(e=l.sprite)}}let l=!1,i=0,n=0,s=1,o=1,c=!1;if(d.selectedFurnitureUid){let e=r.layout.furniture.find(e=>e.uid===d.selectedFurnitureUid);if(e){var g,b;let t=(0,w.Um)(e.type);l=!0,i=e.col,n=e.row,s=null!=(g=null==t?void 0:t.footprintW)?g:1,o=null!=(b=null==t?void 0:t.footprintH)?b:1,c=(0,w.ZZ)(e.type)}}t={showGrid:!0,ghostSprite:e,ghostCol:d.ghostCol,ghostRow:d.ghostRow,ghostValid:d.ghostValid,hasSelection:l,selectedCol:i,selectedRow:n,selectedW:s,selectedH:o,isRotatable:c,deleteButtonBounds:null,rotateButtonBounds:null,showGhostBorder:!0,ghostBorderHoverCol:d.ghostCol,ghostBorderHoverRow:d.ghostRow}}U.current=function(e,t,l,r,i,n,s,o,h,f,d,g,b,p,w,T,x){let v=null!=x?x:1;e.clearRect(0,0,t,l);let R=null!=b?b:r.length>0?r[0].length:0,M=null!=p?p:r.length,k=R*a.dn*s,E=M*a.dn*s,L=Math.floor((t-k)/2)+Math.round(o),P=Math.floor((l-E)/2)+Math.round(h);T&&(e.save(),e.imageSmoothingEnabled=!1,e.drawImage(T,L,P,k,E),e.restore()),T||function(e,t,l,r,i,n,s){let o=a.dn*i,u=(0,C.$0)(),h=t.length,f=h>0?t[0].length:0,d=null!=s?s:f;for(let s=0;s<h;s++)for(let h=0;h<f;h++){var g;let f=t[s][h];if(f===a.nb.VOID)continue;if(f===a.nb.WALL||!u){if(f===a.nb.WALL){let t=s*d+h,l=null==n?void 0:n[t];e.fillStyle=l?(0,S.og)(l):C.ty}else e.fillStyle=c.q3;e.fillRect(l+h*o,r+s*o,o,o);continue}let m=s*d+h,b=null!=(g=null==n?void 0:n[m])?g:{h:0,s:0,b:0,c:0},p=(0,C.To)(f,b),w=(0,I.k)(p,i);e.drawImage(w,l+h*o,r+s*o)}}(e,r,L,P,s,g,b);let A=!T&&(0,S.BN)()?(0,S.vb)(r,g,b):[];return!function(e,t,l,r,i,n,s,o){let h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,f=[],d=n*h;for(let e of t){let t=(0,I.k)(e.sprite,n),l=r+e.x*n,a=i+e.y*n;f.push({zY:e.zY,draw:e=>{e.drawImage(t,l,a)}})}for(let e of l){let t=(0,y.Ih)(e.palette,e.hueShift),l=function(e,t){switch(e.state){case a.Lp.TYPE:var l;if((l=e.currentTool)&&u.has(l))return t.reading[e.dir][e.frame%2];return t.typing[e.dir][e.frame%2];case a.Lp.WALK:return t.walk[e.dir][e.frame%4];case a.Lp.IDLE:default:return t.walk[e.dir][1]}}(e,t),h=(0,I.k)(l,d),g=e.state===a.Lp.TYPE?c.iE:0,b=Math.round(r+e.x*n-h.width/2),p=Math.round(i+(e.y+g)*n-h.height),w=e.y+a.dn/2+c.Sg;if(e.matrixEffect){let t=e;f.push({zY:w,draw:e=>{!function(e,t,l,r,i,n){let s=t.matrixEffectTimer/a.Pz,o="spawn"===t.matrixEffect,u=t.matrixEffectTimer,h=c.wN+c.M1;for(let a=0;a<c.W3;a++){var f,d;let g=Math.max(0,Math.min(1,(s-(null!=(f=t.matrixEffectSeeds[a])?f:0)*c.hI)/(1-c.hI)))*h;for(let t=0;t<c.wN;t++){let s=null==(d=l[t])?void 0:d[a],h=s&&""!==s,f=g-t,b=r+a*n,p=i+t*n;if(o)if(f<0)continue;else if(f<1)e.fillStyle=c.zw,e.fillRect(b,p,n,n);else if(f<c.M1){let l=f/c.M1;if(h){e.fillStyle=s,e.fillRect(b,p,n,n);let r=(1-l)*c.Nd;m(a,t,u)&&(e.fillStyle="rgba(0, 255, 65, ".concat(r,")"),e.fillRect(b,p,n,n))}else if(m(a,t,u)){let t=(1-l)*c.gi;e.fillStyle=l<c.Wn?"rgba(0, 255, 65, ".concat(t,")"):l<c.WJ?"rgba(0, 170, 40, ".concat(t,")"):"rgba(0, 85, 20, ".concat(t,")"),e.fillRect(b,p,n,n)}}else h&&(e.fillStyle=s,e.fillRect(b,p,n,n));else if(f<0)h&&(e.fillStyle=s,e.fillRect(b,p,n,n));else if(f<1)e.fillStyle=c.zw,e.fillRect(b,p,n,n);else if(f<c.M1&&m(a,t,u)){let t=f/c.M1,l=(1-t)*c.gi;e.fillStyle=t<c.Wn?"rgba(0, 255, 65, ".concat(l,")"):t<c.WJ?"rgba(0, 170, 40, ".concat(l,")"):"rgba(0, 85, 20, ".concat(l,")"),e.fillRect(b,p,n,n)}}}}(e,t,l,b,p,d)}});continue}let T=null!==s&&e.id===s,C=null!==o&&e.id===o;if(T||C){let e=T?c.O1:c.y9,t=(0,I.Y)(l),r=(0,I.k)(t,d),i=b-d,a=p-d;f.push({zY:w-c.F2,draw:t=>{t.save(),t.globalAlpha=e,t.drawImage(r,i,a),t.restore()}})}f.push({zY:w,draw:e=>{e.drawImage(h,b,p)}})}for(let t of(f.sort((e,t)=>e.zY-t.zY),f))t.draw(e)}(e,A.length>0?[...A,...i]:i,n,L,P,s,f,d,v),!function(e,t,l,r,i){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=i*n,o=Math.max(1,Math.round(s));for(let h of t){var u;if(!h.label||"despawn"===h.matrixEffect)continue;let t=Math.max(6,Math.round(3.5*s));e.save(),e.imageSmoothingEnabled=!1,e.font="bold ".concat(t,"px monospace");let f=Math.ceil(e.measureText(h.label).width),d=2*o,g=+o,m=f+2*d,b=t+2*g,p=h.state===a.Lp.TYPE?c.PA:0,w=Math.round(l+h.x*i-m/2),T=Math.round(r+(h.y+p-26*n)*i-b),I=null!=(u=h.labelColor)?u:"#8a7a6a";e.fillStyle="#222",e.fillRect(w-o,T,m+2*o,b+o),e.fillRect(w,T-o,m,b+2*o),e.fillStyle=I,e.fillRect(w,T,m,b),e.fillStyle="#fff",e.textBaseline="top",e.fillText(h.label,w+d,T+g),e.restore()}}(e,n,L,P,s,v),!function(e,t,l,r,i){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=i*n;for(let o of t){if(!o.bubbleType)continue;let t="permission"===o.bubbleType?y.$D:"working"===o.bubbleType?y.j9:y.VQ,u=1;"waiting"===o.bubbleType&&o.bubbleTimer<c.v3&&(u=o.bubbleTimer/c.v3);let h=(0,I.k)(t,s),f=o.state===a.Lp.TYPE?c.PA:0,d=Math.round(l+o.x*i-h.width/2),g=Math.round(r+(o.y+f-c.$L*n)*i-h.height-i);e.save(),u<1&&(e.globalAlpha=u),e.drawImage(h,d,g),e.restore()}}(e,n,L,P,s,v),!function(e,t,l,r,i){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=i*n,o=Math.max(1,Math.round(s));for(let u of t){if(!u.speechText)continue;let t=1;if(u.speechTimer<c.nW&&(t=Math.max(0,u.speechTimer/c.nW)),t<=0)continue;let h=Math.max(7,Math.round(4.5*s));e.save(),e.imageSmoothingEnabled=!1,e.font="".concat(h,"px monospace");let f=Math.ceil(e.measureText(u.speechText).width),d=3*o,g=2*o,m=f+2*d,b=h+2*g,p=3*o,w=u.state===a.Lp.TYPE?c.PA:0,T=Math.round(l+u.x*i-m/2),I=Math.round(r+(u.y+w-c.$L*n)*i-b-p-4*o);t<1&&(e.globalAlpha=t),e.fillStyle="#333",e.fillRect(T-o,I,m+2*o,b+o),e.fillRect(T,I-o,m,b+2*o),e.fillStyle="#fff",e.fillRect(T,I,m,b);let y=Math.round(T+m/2);e.fillStyle="#333",e.fillRect(y-2*o,I+b,4*o,o),e.fillRect(y-o,I+b+o,2*o,o),e.fillRect(y,I+b+2*o,o,o),e.fillStyle="#fff",e.fillRect(y-o,I+b,2*o,o),e.fillRect(y,I+b+o,o,o),e.fillStyle="#222",e.textBaseline="top",e.fillText(u.speechText,T+d,I+g),e.restore()}}(e,n,L,P,s,v),w&&(w.showGrid&&function(e,t,l,r,i,n,s){let o=a.dn*r;e.strokeStyle=c.AL,e.lineWidth=1,e.beginPath();for(let r=0;r<=i;r++){let i=t+r*o+.5;e.moveTo(i,l),e.lineTo(i,l+n*o)}for(let r=0;r<=n;r++){let a=l+r*o+.5;e.moveTo(t,a),e.lineTo(t+i*o,a)}if(e.stroke(),s){e.save(),e.strokeStyle=c.fJ,e.lineWidth=1,e.setLineDash(c.i);for(let r=0;r<n;r++)for(let n=0;n<i;n++){var u;(null==(u=s[r])?void 0:u[n])===a.nb.VOID&&e.strokeRect(t+n*o+.5,l+r*o+.5,o-1,o-1)}e.restore()}}(e,L,P,s,R,M,r),w.showGhostBorder&&function(e,t,l,r,i,n,s,o){let u=a.dn*r;e.save();let h=[];for(let e=-1;e<=i;e++)h.push({c:e,r:-1}),h.push({c:e,r:n});for(let e=0;e<n;e++)h.push({c:-1,r:e}),h.push({c:i,r:e});for(let{c:r,r:i}of h){let a=t+r*u,n=l+i*u,h=r===s&&i===o;h&&(e.fillStyle=c.Mo,e.fillRect(a,n,u,u)),e.strokeStyle=h?c.pr:c.gD,e.lineWidth=1,e.setLineDash(c.i),e.strokeRect(a+.5,n+.5,u-1,u-1)}e.restore()}(e,L,P,s,R,M,w.ghostBorderHoverCol,w.ghostBorderHoverRow),w.ghostSprite&&w.ghostCol>=0&&function(e,t,l,r,i,n,s,o){let u=(0,I.k)(t,o),h=n+l*a.dn*o,f=s+r*a.dn*o;e.save(),e.globalAlpha=c.qD,e.drawImage(u,h,f),e.globalAlpha=c.W7,e.fillStyle=i?c.TE:c.oj,e.fillRect(h,f,u.width,u.height),e.restore()}(e,w.ghostSprite,w.ghostCol,w.ghostRow,w.ghostValid,L,P,s),w.hasSelection?(!function(e,t,l,r,i,n,s,o){let u=a.dn*o;e.save(),e.strokeStyle=c.Ii,e.lineWidth=2,e.setLineDash(c.n6),e.strokeRect(n+t*u+1,s+l*u+1,r*u-2,i*u-2),e.restore()}(e,w.selectedCol,w.selectedRow,w.selectedW,w.selectedH,L,P,s),w.deleteButtonBounds=function(e,t,l,r,i,n,s,o){let u=a.dn*o,h=n+(t+r)*u+1,f=s+l*u-1,d=Math.max(c.l0,o*c.YX);e.save(),e.beginPath(),e.arc(h,f,d,0,2*Math.PI),e.fillStyle=c.Zz,e.fill(),e.strokeStyle="#fff",e.lineWidth=Math.max(c.SS,o*c.zY),e.lineCap="round";let g=d*c.R_;return e.beginPath(),e.moveTo(h-g,f-g),e.lineTo(h+g,f+g),e.moveTo(h+g,f-g),e.lineTo(h-g,f+g),e.stroke(),e.restore(),{cx:h,cy:f,radius:d}}(e,w.selectedCol,w.selectedRow,w.selectedW,w.selectedH,L,P,s),w.isRotatable?w.rotateButtonBounds=function(e,t,l,r,i,n,s,o){let u=a.dn*o,h=Math.max(c.l0,o*c.YX),f=n+t*u-1,d=s+l*u-1;e.save(),e.beginPath(),e.arc(f,d,h,0,2*Math.PI),e.fillStyle=c.BD,e.fill(),e.strokeStyle="#fff",e.lineWidth=Math.max(c.SS,o*c.zY),e.lineCap="round";let g=h*c.R_;e.beginPath(),e.arc(f,d,g,-(.8*Math.PI),.7*Math.PI),e.stroke();let m=.7*Math.PI,b=f+g*Math.cos(m),p=d+g*Math.sin(m),w=.35*h;return e.beginPath(),e.moveTo(b+.6*w,p-.3*w),e.lineTo(b,p),e.lineTo(b+.7*w,p+.5*w),e.stroke(),e.restore(),{cx:f,cy:d,radius:h}}(e,w.selectedCol,w.selectedRow,w.selectedW,w.selectedH,L,P,s):w.rotateButtonBounds=null):(w.deleteButtonBounds=null,w.rotateButtonBounds=null)),{offsetX:L,offsetY:P}}(e,i,o,r.tileMap,r.furniture,r.getCharacters(),h,f.x,f.y,r.getSelectedCharId(),r.getHoveredCharId(),r.layout.tileColors,r.layout.cols,r.layout.rows,t,r.backgroundImage,r.characterScale),H.current=null!=t?t:null}}),h=new R(r,o);return t(h),()=>{h.dispose(),k.current=null,i.disconnect()}},[F,z,k,L,P,s,t]);let N=(0,i.useCallback)((e,t)=>{let l=A.current;if(!l)return{x:0,y:0};let r=l.getBoundingClientRect(),i=L.current,{offsetX:a,offsetY:n}=U.current;return{x:(e-r.left-a)/i,y:(t-r.top-n)/i}},[L]),V=(0,i.useCallback)((e,t)=>({col:Math.floor(e/c.dn),row:Math.floor(t/c.dn)}),[]),j=(0,i.useCallback)((e,t)=>{let l=N(e,t);return V(l.x,l.y)},[N,V]),K=(0,i.useCallback)(e=>{if(X.current=!0,O.current={x:e.clientX,y:e.clientY,panX:P.current.x,panY:P.current.y},D.current&&s.current.selectedFurnitureUid){var t;let l=j(e.clientX,e.clientY),r=null==(t=k.current)?void 0:t.layout;if(r){let e=(0,v.iH)(r,l.col,l.row);e&&e.uid===s.current.selectedFurnitureUid&&(null==d||d(l.col,l.row))}}},[P,s,k,j,d]),q=(0,i.useCallback)(e=>{let t=k.current;if(t&&!D.current){let l=N(e.clientX,e.clientY);t.setHoveredCharAtPixel(l.x,l.y)}if(D.current){let t=j(e.clientX,e.clientY);s.current.dragUid?null==g||g(t.col,t.row):null==f||f(t.col,t.row)}if(!X.current||!c.eR||s.current.dragUid)return;let l=e.clientX-O.current.x,r=e.clientY-O.current.y;P.current={x:O.current.panX+l,y:O.current.panY+r}},[N,j,k,P,s,g,f]),G=(0,i.useCallback)(e=>{let t=X.current;if(X.current=!1,s.current.dragUid){let t=j(e.clientX,e.clientY);null==b||b(t.col,t.row);return}let l=Math.abs(e.clientX-O.current.x),r=Math.abs(e.clientY-O.current.y);if(t&&(l>5||r>5))return;let i=k.current;if(!i)return;if(D.current){let t=H.current;if(t){let l=A.current;if(l){let r=l.getBoundingClientRect(),i=e.clientX-r.left,a=e.clientY-r.top;if(t.deleteButtonBounds){let{cx:e,cy:l,radius:r}=t.deleteButtonBounds;if(Math.sqrt((i-e)**2+(a-l)**2)<=r){null==p||p();return}}if(t.rotateButtonBounds){let{cx:e,cy:l,radius:r}=t.rotateButtonBounds;if(Math.sqrt((i-e)**2+(a-l)**2)<=r){null==M||M();return}}}}let l=j(e.clientX,e.clientY);null==o||o(l.col,l.row);return}let a=N(e.clientX,e.clientY),n=i.getAgentAtPixel(a.x,a.y);n&&B.current(n)},[N,j,k,s,o,b,p,M]),J=(0,i.useCallback)(e=>{if(!D.current)return;e.preventDefault();let t=j(e.clientX,e.clientY);null==h||h(t.col,t.row)},[j,h]),Z=(0,i.useCallback)(e=>{},[]),$=(0,i.useRef)([]),Q=(0,i.useRef)(0),ee=(0,i.useCallback)(e=>{if($.current=Array.from(e.touches),2===e.touches.length){let t=e.touches[0].clientX-e.touches[1].clientX,l=e.touches[0].clientY-e.touches[1].clientY;Q.current=Math.sqrt(t*t+l*l)}else 1===e.touches.length&&(X.current=!0,O.current={x:e.touches[0].clientX,y:e.touches[0].clientY,panX:P.current.x,panY:P.current.y})},[P]),et=(0,i.useCallback)(e=>{if(2===e.touches.length){let t=e.touches[0].clientX-e.touches[1].clientX,l=e.touches[0].clientY-e.touches[1].clientY,r=Math.sqrt(t*t+l*l),i=r-Q.current;Math.abs(i)>20&&(L.current=Math.max(c.DH,Math.min(c.ZV,L.current+(i>0?1:-1))),Q.current=r)}else if(1===e.touches.length&&X.current&&c.eR){let t=e.touches[0].clientX-O.current.x,l=e.touches[0].clientY-O.current.y;P.current={x:O.current.panX+t,y:O.current.panY+l}}},[L,P]),el=(0,i.useCallback)(e=>{if(0===e.touches.length&&1===$.current.length){let e=$.current[0],t=Math.abs(e.clientX-O.current.x),l=Math.abs(e.clientY-O.current.y);if(t<10&&l<10)if(D.current){let t=j(e.clientX,e.clientY);null==o||o(t.col,t.row)}else{let t=k.current;if(t){let l=N(e.clientX,e.clientY),r=t.getAgentAtPixel(l.x,l.y);r&&B.current(r)}}}X.current=!1,$.current=Array.from(e.touches)},[N,j,k,o]),er=n?s.current.activeTool===a.VF.ERASE?"crosshair":s.current.activeTool===a.VF.EYEDROPPER?"copy":s.current.activeTool===a.VF.FURNITURE_PLACE?"cell":s.current.dragUid?"grabbing":"default":"grab";return(0,r.jsxs)("div",{style:{width:"100%",height:"100%",overflow:"hidden",backgroundColor:"#12121f"},children:[!F&&(0,r.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#6b7280",fontSize:14,fontFamily:"system-ui, sans-serif",zIndex:10},children:"Loading office..."}),(0,r.jsx)("canvas",{ref:A,onPointerDown:K,onPointerMove:q,onPointerUp:G,onContextMenu:J,onWheel:Z,onTouchStart:ee,onTouchMove:et,onTouchEnd:el,style:{display:"block",width:"100%",height:"100%",touchAction:"none",cursor:er}})]})}},5702:(e,t,l)=>{l.d(t,{Y:()=>a,k:()=>n});let r=new Map,i=new WeakMap;function a(e){let t=i.get(e);if(t)return t;let l=e.length,r=e[0].length,a=[];for(let e=0;e<l+2;e++)a.push(Array(r+2).fill(""));for(let t=0;t<l;t++)for(let l=0;l<r;l++){if(""===e[t][l])continue;let r=t+1,i=l+1;""===a[r-1][i]&&(a[r-1][i]="#FFFFFF"),""===a[r+1][i]&&(a[r+1][i]="#FFFFFF"),""===a[r][i-1]&&(a[r][i-1]="#FFFFFF"),""===a[r][i+1]&&(a[r][i+1]="#FFFFFF")}for(let t=0;t<l;t++)for(let l=0;l<r;l++)""!==e[t][l]&&(a[t+1][l+1]="");return i.set(e,a),a}function n(e,t){let l=r.get(t);l||(l=new WeakMap,r.set(t,l));let i=l.get(e);if(i)return i;let a=e.length,n=e[0].length,s=document.createElement("canvas");s.width=n*t,s.height=a*t;let o=s.getContext("2d");o.imageSmoothingEnabled=!1;for(let l=0;l<a;l++)for(let r=0;r<n;r++){let i=e[l][r];""!==i&&(o.fillStyle=i,o.fillRect(r*t,l*t,t,t))}return l.set(e,s),s}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[632],{632:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d,loadDefaultOffice:()=>u});var a=n(206),i=n(1406),r=n(5712),o=n.n(r),l=n(7378);let c="/offices";async function s(e){try{let t=await fetch(e);if(!t.ok)return null;let n=await t.arrayBuffer(),a=await o().loadAsync(n),i=a.file("room.json");if(!i)return null;let r=JSON.parse(await i.async("text")).backgroundFile;if(!r)return null;let l=a.file(r);if(!l)return null;let c=new Blob([await l.async("arraybuffer")],{type:"image/png"});return URL.createObjectURL(c)}catch(e){return null}}function d(e){let{isOpen:t,onClose:n,onSelect:r,currentOfficeId:o}=e,[d,u]=(0,i.useState)([]),[f,p]=(0,i.useState)(!1),[g,b]=(0,i.useState)(null),[m,h]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(!t)return;let e=!1;return(async()=>{try{let t=await fetch("".concat(c,"/index.json")),n=await t.json();if(e)return;u(n.map(e=>({...e})));let a=n.map(async e=>{if(e.thumbnail)return{id:e.id,url:"".concat(c,"/").concat(e.thumbnail)};let t=await s("".concat(c,"/").concat(e.file));return{id:e.id,url:t}}),i=await Promise.all(a);if(e)return;u(e=>e.map(e=>{let t=i.find(t=>t.id===e.id);return(null==t?void 0:t.url)?{...e,thumbUrl:t.url}:e}))}catch(e){console.error("[OfficeSwitcher] Failed to load index:",e)}})(),()=>{e=!0}},[t]);let y=(0,i.useCallback)(async e=>{if(!f){p(!0),b(e.id);try{let t=await (0,l.k)("".concat(c,"/").concat(e.file));if(t){try{localStorage.setItem("office-selected-id",e.id)}catch(e){}r(t.layout,t.backgroundImage),n()}}catch(e){console.error("[OfficeSwitcher] Failed to load office:",e)}finally{p(!1),b(null)}}},[f,r,n]);return t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{onClick:n,style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.6)",zIndex:99}}),(0,a.jsxs)("div",{style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:100,background:"rgba(20, 20, 25, 0.92)",backdropFilter:"blur(16px)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:12,padding:0,boxShadow:"0 8px 32px rgba(0, 0, 0, 0.4)",width:480,maxWidth:"90vw",maxHeight:"80vh",display:"flex",flexDirection:"column"},children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",borderBottom:"1px solid rgba(255, 255, 255, 0.08)"},children:[(0,a.jsx)("span",{style:{fontSize:"15px",color:"rgba(255, 255, 255, 0.9)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},children:"Switch Office"}),(0,a.jsx)("button",{onClick:n,onMouseEnter:()=>h("close"),onMouseLeave:()=>h(null),style:{background:"close"===m?"rgba(255, 255, 255, 0.08)":"transparent",border:"none",color:"rgba(255, 255, 255, 0.6)",fontSize:"15px",cursor:"pointer",padding:"0 4px",lineHeight:1},children:"X"})]}),(0,a.jsx)("div",{style:{overflowY:"auto",flex:1,minHeight:0},children:(0,a.jsxs)("div",{style:{padding:"12px",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"8px"},children:[0===d.length&&(0,a.jsx)("div",{style:{color:"rgba(255,255,255,0.4)",fontSize:13,padding:20,textAlign:"center",gridColumn:"1 / -1"},children:"Loading..."}),d.map(e=>{let t=o===e.id,n=g===e.id,i=m===e.id,r=e.thumbUrl||(e.thumbnail?"".concat(c,"/").concat(e.thumbnail):void 0);return(0,a.jsxs)("button",{onClick:()=>y(e),onMouseEnter:()=>h(e.id),onMouseLeave:()=>h(null),disabled:f,style:{display:"flex",flexDirection:"column",background:i&&!t?"rgba(255, 255, 255, 0.06)":"transparent",border:t?"2px solid rgba(130, 160, 255, 0.6)":"2px solid rgba(255, 255, 255, 0.08)",borderRadius:8,padding:0,cursor:f?"wait":"pointer",overflow:"hidden",opacity:f&&!n?.5:1},children:[(0,a.jsxs)("div",{style:{width:"100%",aspectRatio:"1",position:"relative",background:"#0a0a14",flexShrink:0},children:[r&&(0,a.jsx)("img",{src:r,alt:e.name,style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",imageRendering:"pixelated"}}),n&&(0,a.jsx)("div",{style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.7)",display:"flex",alignItems:"center",justifyContent:"center",color:"rgba(160, 185, 255, 0.9)",fontSize:13,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},children:"Loading..."})]}),(0,a.jsx)("div",{style:{padding:"5px 4px",fontSize:11,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',color:t?"rgba(160, 185, 255, 0.9)":"rgba(255, 255, 255, 0.6)",textAlign:"center",width:"100%"},children:e.name})]},e.id)})]})})]})]}):null}async function u(){try{let e=await fetch("".concat(c,"/index.json"));if(!e.ok)return null;let t=await e.json(),n=null;try{n=localStorage.getItem("office-selected-id")}catch(e){}let a=t.find(e=>e.id===n)||t[0];if(!a)return null;let i=await (0,l.k)("".concat(c,"/").concat(a.file));if(!i)return null;return{layout:i.layout,backgroundImage:i.backgroundImage,officeId:a.id}}catch(e){return console.error("[loadDefaultOffice] Failed:",e),null}}},7378:(e,t,n)=>{n.d(t,{k:()=>u,l:()=>d});var a=n(5712),i=n.n(a),r=n(5195),o=n(9892);function l(e){return new Promise((t,n)=>{let a=URL.createObjectURL(e),i=new Image;i.onload=()=>{URL.revokeObjectURL(a),t(i)},i.onerror=()=>{URL.revokeObjectURL(a),n(Error("Failed to load image from blob"))},i.src=a})}function c(e){var t;let n=(null==(t=e.split(".").pop())?void 0:t.toLowerCase())||"png";return"jpg"===n||"jpeg"===n?"image/jpeg":"webp"===n?"image/webp":"image/png"}function s(e){return 0===e?r.nb.WALL:8===e?r.nb.VOID:e>=1&&e<=7?e:r.nb.FLOOR_1}async function d(e){let t=await i().loadAsync(e),n=t.file("room.json");if(!n)return alert("Invalid room zip: missing room.json"),null;let a=JSON.parse(await n.async("text"));if(!a.cols||!a.rows||!a.tiles)return alert("Invalid room.json: missing cols/rows/tiles"),null;let d=null;if(a.backgroundFile){let e=t.file(a.backgroundFile);if(e){let t=new Blob([await e.async("arraybuffer")],{type:c(a.backgroundFile)});d=await l(t)}}let u=new Map;if(a.tileset){for(let e of a.tileset){if(!e.file)continue;let n=t.file(e.file);if(!n)continue;let a=new Blob([await n.async("arraybuffer")],{type:c(e.file)}),i=await l(a),o=function(e,t,n){let a=document.createElement("canvas");a.width=t,a.height=n;let i=a.getContext("2d");i.imageSmoothingEnabled=!1;let r=Math.min(t/e.naturalWidth,n/e.naturalHeight),o=Math.round(e.naturalWidth*r),l=Math.round(e.naturalHeight*r),c=Math.round((t-o)/2);i.drawImage(e,c,n-l,o,l);let{data:s}=i.getImageData(0,0,t,n),d=[];for(let e=0;e<n;e++){let n=[];for(let a=0;a<t;a++){let i=(e*t+a)*4,r=s[i],o=s[i+1],l=s[i+2];s[i+3]<128?n.push(""):n.push("#".concat(r.toString(16).padStart(2,"0")).concat(o.toString(16).padStart(2,"0")).concat(l.toString(16).padStart(2,"0")).toUpperCase())}d.push(n)}return d}(i,e.gridW*r.dn,e.gridH*r.dn);u.set("room-".concat(e.id),{sprite:o,footprintW:e.gridW,footprintH:e.gridH,label:e.name,tag:e.tag})}u.size>0&&(0,o.F$)(u)}let f=a.tiles.map(s),p={h:35,s:30,b:15,c:0},g=f.map(e=>e===r.nb.WALL||e===r.nb.VOID?null:p),b=(a.furniture||[]).map(e=>({uid:e.uid,type:"room-".concat(e.tileId),col:e.col,row:e.row}));if(a.objects){let e=["front","right","back","left"];for(let t of new Set(a.objects.map(e=>e.type))){let n=(0,o.Um)(t);if(n)for(let a of e){let e="".concat(t,"-").concat(a);if((0,o.Um)(e))continue;let i={...n,type:e,orientation:a,footprintW:1,footprintH:1};o.hS.push(i)}}for(let e of a.objects){var m;let t=function(e){switch(e%360){case 0:default:return"front";case 90:return"right";case 180:return"back";case 270:return"left"}}(null!=(m=e.rotation)?m:0),n="".concat(e.type,"-").concat(t);b.push({uid:e.id,type:n,col:e.col,row:e.row})}}return{layout:{version:1,cols:a.cols,rows:a.rows,tiles:f,furniture:b,tileColors:g},backgroundImage:d}}async function u(e){let t=await fetch(e);return t.ok?d(new File([new Blob([await t.arrayBuffer()],{type:"application/zip"})],e.split("/").pop()||"room.zip",{type:"application/zip"})):(console.error("[roomZipLoader] Failed to fetch ".concat(e,": ").concat(t.status)),null)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[757],{3757:(o,e,r)=>{r.r(e),r.d(e,{default:()=>i});var t=r(206),n=r(1406);let l={position:"absolute",bottom:10,left:10,zIndex:15,display:"flex",alignItems:"center",gap:2,background:"rgba(20, 20, 25, 0.85)",backdropFilter:"blur(12px)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:8,padding:"3px 4px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.3)"},a={padding:"5px 10px",fontSize:"12px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',color:"rgba(255, 255, 255, 0.5)",background:"transparent",border:"1px solid transparent",borderRadius:4,cursor:"pointer",letterSpacing:"0.03em"},s={...a,background:"rgba(130, 160, 255, 0.15)",border:"1px solid rgba(130, 160, 255, 0.4)",color:"rgba(160, 185, 255, 0.9)"};function i(o){let{editMode:e,onToggleEditMode:r,onOpenSettings:i,onOpenHistory:c,onOpenOfficeSwitcher:b,onToggleTest:u,testActive:d,showEditorControls:g=!0}=o,[p,k]=(0,n.useState)(null);return(0,t.jsxs)("div",{style:l,children:[b&&(0,t.jsx)("button",{onClick:b,onMouseEnter:()=>k("office"),onMouseLeave:()=>k(null),style:{...a,background:"office"===p?"rgba(255, 255, 255, 0.08)":a.background,color:"office"===p?"rgba(255, 255, 255, 0.8)":a.color},title:"Switch office appearance",children:"Office"}),g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:r,onMouseEnter:()=>k("edit"),onMouseLeave:()=>k(null),style:e?s:{...a,background:"edit"===p?"rgba(255, 255, 255, 0.08)":a.background,color:"edit"===p?"rgba(255, 255, 255, 0.8)":a.color},title:"Edit office layout",children:"Layout"}),(0,t.jsx)("button",{onClick:i,onMouseEnter:()=>k("settings"),onMouseLeave:()=>k(null),style:{...a,background:"settings"===p?"rgba(255, 255, 255, 0.08)":a.background,color:"settings"===p?"rgba(255, 255, 255, 0.8)":a.color},title:"Settings",children:"Settings"})]}),c&&(0,t.jsx)("button",{onClick:c,onMouseEnter:()=>k("history"),onMouseLeave:()=>k(null),style:{...a,background:"history"===p?"rgba(255, 255, 255, 0.08)":a.background,color:"history"===p?"rgba(255, 255, 255, 0.8)":a.color},title:"Project history",children:"History"}),u&&(0,t.jsx)("button",{onClick:u,onMouseEnter:()=>k("test"),onMouseLeave:()=>k(null),style:d?{...s,color:"#e85040",borderColor:"rgba(232, 80, 64, 0.4)",background:"rgba(200, 48, 48, 0.12)"}:{...a,background:"test"===p?"rgba(255, 255, 255, 0.08)":a.background,color:"test"===p?"rgba(255, 255, 255, 0.8)":a.color},title:"Fill all work seats with test characters",children:d?"Clear Test":"Test"})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[810],{5702:(e,l,t)=>{t.d(l,{Y:()=>r,k:()=>a});let i=new Map,n=new WeakMap;function r(e){let l=n.get(e);if(l)return l;let t=e.length,i=e[0].length,r=[];for(let e=0;e<t+2;e++)r.push(Array(i+2).fill(""));for(let l=0;l<t;l++)for(let t=0;t<i;t++){if(""===e[l][t])continue;let i=l+1,n=t+1;""===r[i-1][n]&&(r[i-1][n]="#FFFFFF"),""===r[i+1][n]&&(r[i+1][n]="#FFFFFF"),""===r[i][n-1]&&(r[i][n-1]="#FFFFFF"),""===r[i][n+1]&&(r[i][n+1]="#FFFFFF")}for(let l=0;l<t;l++)for(let t=0;t<i;t++)""!==e[l][t]&&(r[l+1][t+1]="");return n.set(e,r),r}function a(e,l){let t=i.get(l);t||(t=new WeakMap,i.set(l,t));let n=t.get(e);if(n)return n;let r=e.length,a=e[0].length,o=document.createElement("canvas");o.width=a*l,o.height=r*l;let s=o.getContext("2d");s.imageSmoothingEnabled=!1;for(let t=0;t<r;t++)for(let i=0;i<a;i++){let n=e[t][i];""!==n&&(s.fillStyle=n,s.fillRect(i*l,t*l,l,l))}return t.set(e,o),o}},9810:(e,l,t)=>{t.r(l),t.d(l,{default:()=>f});var i=t(206),n=t(1406),r=t(5195),a=t(9892),o=t(5702),s=t(4777);let d={padding:"3px 8px",fontSize:"13px",background:"rgba(255, 255, 255, 0.08)",color:"rgba(255, 255, 255, 0.7)",border:"2px solid transparent",borderRadius:0,cursor:"pointer"},c={...d,background:"rgba(90, 140, 255, 0.25)",color:"rgba(255, 255, 255, 0.9)",border:"2px solid #5a8cff"},x={padding:"2px 6px",fontSize:"12px",background:"transparent",color:"rgba(255, 255, 255, 0.5)",border:"2px solid transparent",borderRadius:0,cursor:"pointer"},p={...x,background:"rgba(255, 255, 255, 0.08)",color:"rgba(255, 255, 255, 0.8)",border:"2px solid #5a8cff"};function h(e){let{patternIndex:l,color:t,selected:r,onClick:a}=e,d=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=d.current;if(!e)return;let i=e.getContext("2d");if(!i)return;if(e.width=32,e.height=32,i.imageSmoothingEnabled=!1,!(0,s.$0)()){i.fillStyle="#444",i.fillRect(0,0,32,32);return}let n=(0,s.To)(l,t),r=(0,o.k)(n,2);i.drawImage(r,0,0)},[l,t]),(0,i.jsx)("button",{onClick:a,title:"Floor ".concat(l),style:{width:32,height:32,padding:0,border:r?"2px solid #5a8cff":"2px solid #4a4a6a",borderRadius:0,cursor:"pointer",overflow:"hidden",flexShrink:0,background:"#2A2A3A"},children:(0,i.jsx)("canvas",{ref:d,style:{width:32,height:32,display:"block"}})})}function u(e){let{label:l,value:t,min:n,max:r,onChange:a}=e;return(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,i.jsx)("span",{style:{fontSize:"11px",color:"#999",width:14,textAlign:"right",flexShrink:0},children:l}),(0,i.jsx)("input",{type:"range",min:n,max:r,value:t,onChange:e=>a(Number(e.target.value)),style:{flex:1,height:12,accentColor:"rgba(90, 140, 255, 0.8)"}}),(0,i.jsx)("span",{style:{fontSize:"11px",color:"#999",width:28,textAlign:"right",flexShrink:0},children:t})]})}let g={h:0,s:0,b:0,c:0};function f(e){let{activeTool:l,selectedTileType:t,selectedFurnitureType:f,selectedFurnitureUid:b,selectedFurnitureColor:m,floorColor:y,wallColor:j,onToolChange:C,onTileTypeChange:k,onFloorColorChange:v,onWallColorChange:F,onSelectedFurnitureColorChange:w,onFurnitureTypeChange:E}=e,[R,S]=(0,n.useState)("desks"),[I,A]=(0,n.useState)(!1),[P,V]=(0,n.useState)(!1),[_,N]=(0,n.useState)(!1),T=(0,n.useCallback)((e,l)=>{v({...y,[e]:l})},[y,v]),z=(0,n.useCallback)((e,l)=>{F({...j,[e]:l})},[j,F]),D=null!=m?m:g,U=(0,n.useCallback)((e,l)=>{w({...D,[e]:l})},[D,w]),W=(0,a.Zl)(R),L=Array.from({length:(0,s.QQ)()},(e,l)=>l+1),B=l===r.VF.TILE_PAINT||l===r.VF.EYEDROPPER,H=l===r.VF.WALL_PAINT,M=l===r.VF.ERASE,Y=l===r.VF.FURNITURE_PLACE||l===r.VF.FURNITURE_PICK;return(0,i.jsxs)("div",{style:{position:"absolute",bottom:68,left:10,zIndex:50,background:"#1e1e2e",border:"2px solid #4a4a6a",borderRadius:0,padding:"6px 8px",display:"flex",flexDirection:"column-reverse",gap:6,boxShadow:"2px 2px 0px #0a0a14",maxWidth:"calc(100vw - 20px)"},children:[(0,i.jsxs)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:[(0,i.jsx)("button",{style:B?c:d,onClick:()=>C(r.VF.TILE_PAINT),title:"Paint floor tiles",children:"Floor"}),(0,i.jsx)("button",{style:H?c:d,onClick:()=>C(r.VF.WALL_PAINT),title:"Paint walls",children:"Wall"}),(0,i.jsx)("button",{style:M?c:d,onClick:()=>C(r.VF.ERASE),title:"Erase tiles to void",children:"Erase"}),(0,i.jsx)("button",{style:Y?c:d,onClick:()=>C(r.VF.FURNITURE_PLACE),title:"Place furniture",children:"Furniture"})]}),B&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column-reverse",gap:6},children:[(0,i.jsxs)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[(0,i.jsx)("button",{style:I?c:d,onClick:()=>A(e=>!e),title:"Adjust floor color",children:"Color"}),(0,i.jsx)("button",{style:l===r.VF.EYEDROPPER?c:d,onClick:()=>C(r.VF.EYEDROPPER),title:"Pick floor pattern + color from existing tile",children:"Pick"})]}),I&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3,padding:"4px 6px",background:"#181828",border:"2px solid #4a4a6a",borderRadius:0},children:[(0,i.jsx)(u,{label:"H",value:y.h,min:0,max:360,onChange:e=>T("h",e)}),(0,i.jsx)(u,{label:"S",value:y.s,min:0,max:100,onChange:e=>T("s",e)}),(0,i.jsx)(u,{label:"B",value:y.b,min:-100,max:100,onChange:e=>T("b",e)}),(0,i.jsx)(u,{label:"C",value:y.c,min:-100,max:100,onChange:e=>T("c",e)})]}),(0,i.jsx)("div",{style:{display:"flex",gap:4,overflowX:"auto",flexWrap:"nowrap",paddingBottom:2},children:L.map(e=>(0,i.jsx)(h,{patternIndex:e,color:y,selected:t===e,onClick:()=>k(e)},e))})]}),H&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column-reverse",gap:6},children:[(0,i.jsx)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:(0,i.jsx)("button",{style:P?c:d,onClick:()=>V(e=>!e),title:"Adjust wall color",children:"Color"})}),P&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3,padding:"4px 6px",background:"#181828",border:"2px solid #4a4a6a",borderRadius:0},children:[(0,i.jsx)(u,{label:"H",value:j.h,min:0,max:360,onChange:e=>z("h",e)}),(0,i.jsx)(u,{label:"S",value:j.s,min:0,max:100,onChange:e=>z("s",e)}),(0,i.jsx)(u,{label:"B",value:j.b,min:-100,max:100,onChange:e=>z("b",e)}),(0,i.jsx)(u,{label:"C",value:j.c,min:-100,max:100,onChange:e=>z("c",e)})]})]}),Y&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column-reverse",gap:4},children:[(0,i.jsxs)("div",{style:{display:"flex",gap:2,flexWrap:"wrap",alignItems:"center"},children:[(0,a.Ze)().map(e=>(0,i.jsx)("button",{style:R===e.id?p:x,onClick:()=>S(e.id),children:e.label},e.id)),(0,i.jsx)("div",{style:{width:1,height:14,background:"rgba(255,255,255,0.15)",margin:"0 2px",flexShrink:0}}),(0,i.jsx)("button",{style:l===r.VF.FURNITURE_PICK?c:d,onClick:()=>C(r.VF.FURNITURE_PICK),title:"Pick furniture type from placed item",children:"Pick"})]}),(0,i.jsx)("div",{style:{display:"flex",gap:4,overflowX:"auto",flexWrap:"nowrap",paddingBottom:2},children:W.map(e=>{let l=(0,o.k)(e.sprite,2),t=f===e.type;return(0,i.jsx)("button",{onClick:()=>E(e.type),title:e.label,style:{width:36,height:36,background:"#2A2A3A",border:t?"2px solid #5a8cff":"2px solid #4a4a6a",borderRadius:0,cursor:"pointer",padding:0,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flexShrink:0},children:(0,i.jsx)("canvas",{ref:e=>{if(!e)return;let t=e.getContext("2d");if(!t)return;let i=.85*Math.min(36/l.width,36/l.height);e.width=36,e.height=36,t.imageSmoothingEnabled=!1,t.clearRect(0,0,36,36);let n=l.width*i,r=l.height*i;t.drawImage(l,(36-n)/2,(36-r)/2,n,r)},style:{width:36,height:36}})},e.type)})})]}),b&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column-reverse",gap:3},children:[(0,i.jsxs)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[(0,i.jsx)("button",{style:_?c:d,onClick:()=>N(e=>!e),title:"Adjust selected furniture color",children:"Color"}),m&&(0,i.jsx)("button",{style:{...d,fontSize:"11px",padding:"2px 6px"},onClick:()=>w(null),title:"Remove color (restore original)",children:"Clear"})]}),_&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3,padding:"4px 6px",background:"#181828",border:"2px solid #4a4a6a",borderRadius:0},children:[D.colorize?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u,{label:"H",value:D.h,min:0,max:360,onChange:e=>U("h",e)}),(0,i.jsx)(u,{label:"S",value:D.s,min:0,max:100,onChange:e=>U("s",e)})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u,{label:"H",value:D.h,min:-180,max:180,onChange:e=>U("h",e)}),(0,i.jsx)(u,{label:"S",value:D.s,min:-100,max:100,onChange:e=>U("s",e)})]}),(0,i.jsx)(u,{label:"B",value:D.b,min:-100,max:100,onChange:e=>U("b",e)}),(0,i.jsx)(u,{label:"C",value:D.c,min:-100,max:100,onChange:e=>U("c",e)}),(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:4,fontSize:"11px",color:"#999",cursor:"pointer"},children:[(0,i.jsx)("input",{type:"checkbox",checked:!!D.colorize,onChange:e=>w({...D,colorize:e.target.checked||void 0}),style:{accentColor:"rgba(90, 140, 255, 0.8)"}}),"Colorize"]})]})]})]})}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[880],{2880:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var a=r(206),l=r(1406);let n={A:[28,34,34,62,34,34,34],B:[60,34,34,60,34,34,60],C:[28,34,32,32,32,34,28],D:[60,34,34,34,34,34,60],E:[62,32,32,60,32,32,62],F:[62,32,32,60,32,32,32],G:[28,34,32,46,34,34,28],H:[34,34,34,62,34,34,34],I:[28,8,8,8,8,8,28],J:[14,4,4,4,4,36,24],K:[34,36,40,48,40,36,34],L:[32,32,32,32,32,32,62],M:[34,54,42,42,34,34,34],N:[34,50,42,38,34,34,34],O:[28,34,34,34,34,34,28],P:[60,34,34,60,32,32,32],Q:[28,34,34,34,42,36,26],R:[60,34,34,60,40,36,34],S:[28,34,32,28,2,34,28],T:[62,8,8,8,8,8,8],U:[34,34,34,34,34,34,28],V:[34,34,34,34,20,20,8],W:[34,34,34,42,42,54,34],X:[34,34,20,8,20,34,34],Y:[34,34,20,8,8,8,8],Z:[62,2,4,8,16,32,62]," ":[0,0,0,0,0,0,0],0:[28,34,38,42,50,34,28],1:[8,24,8,8,8,8,28],2:[28,34,2,12,16,32,62],3:[28,34,2,12,2,34,28],4:[4,12,20,36,62,4,4],5:[62,32,60,2,2,34,28],6:[28,32,60,34,34,34,28],7:[62,2,4,8,16,16,16],8:[28,34,34,28,34,34,28],9:[28,34,34,30,2,2,28],".":[0,0,0,0,0,8,8],"!":[8,8,8,8,8,0,8],"-":[0,0,0,28,0,0,0],">":[16,8,4,2,4,8,16]},o=[{text:"> SYSTEM INIT...",color:"#22c55e",delay:0},{text:"> LOADING NEURAL CORE",color:"#22c55e",delay:600},{text:"> BIT OFFICE ENGINE V1.0",color:"#818cf8",delay:1200},{text:"> OFFICE MODE READY",color:"#f97316",delay:1800}];function i(e){let{onComplete:t}=e,r=(0,l.useRef)(null),[i,c]=(0,l.useState)("boot"),[f,d]=(0,l.useState)(0),[s,h]=(0,l.useState)(!1),u=(0,l.useRef)(Date.now()),m=(0,l.useRef)([]),w=(0,l.useRef)(0),y=(0,l.useRef)(0),E=(0,l.useCallback)(e=>{let t="アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン";m.current=Array.from({length:Math.floor(e/14)},(e,r)=>({x:14*r,y:-500*Math.random(),speed:1+3*Math.random(),chars:Array.from({length:20},()=>t[Math.floor(Math.random()*t.length)]),opacity:.3+.7*Math.random()}))},[]),g=(0,l.useCallback)((e,t,r,a,l,o)=>{e.fillStyle=o;let i=6*l,c=r-t.length*i/2;for(let r=0;r<t.length;r++){let o=n[t[r].toUpperCase()];if(o)for(let t=0;t<7;t++)for(let n=0;n<6;n++)o[t]&1<<5-n&&e.fillRect(c+r*i+n*l,a+t*l,l,l)}},[]);return(0,l.useEffect)(()=>{let e=[];return o.forEach((t,r)=>{e.push(setTimeout(()=>d(r+1),t.delay))}),e.push(setTimeout(()=>c("title"),2800)),e.push(setTimeout(()=>{c("ready"),h(!0)},4200)),()=>e.forEach(clearTimeout)},[]),(0,l.useEffect)(()=>{if(!s)return;let e=setInterval(()=>h(e=>!e),500);return()=>clearInterval(e)},[s]),(0,l.useEffect)(()=>{let e=r.current;if(!e)return;let t=e.getContext("2d"),a=()=>{e.width=window.innerWidth,e.height=window.innerHeight,E(e.width)};a(),window.addEventListener("resize",a);let l=()=>{let{width:r,height:a}=e,n=Date.now()-u.current;t.fillStyle="rgba(10, 10, 20, 0.15)",t.fillRect(0,0,r,a),m.current.forEach(e=>{e.y+=e.speed,e.y>a+300&&(e.y=-300*Math.random()),e.chars.forEach((r,l)=>{let n=e.y+16*l;n<0||n>a||(t.font="14px monospace",t.fillStyle=0===l?"rgba(180, 255, 180, ".concat(e.opacity,")"):"rgba(0, 180, 80, ".concat(e.opacity*(1-l/e.chars.length),")"),t.fillText(r,e.x,n))})});for(let e=0;e<a;e+=3)t.fillStyle="rgba(0, 0, 0, 0.08)",t.fillRect(0,e,r,1);if(.02>Math.random()&&(y.current=8),y.current>0){let e=4+20*Math.random(),l=Math.random()*a,n=(Math.random()-.5)*40,o=t.getImageData(0,l,r,e);t.putImageData(o,n,l),y.current--}if(n<3e3){t.font="16px monospace";for(let e=0;e<f;e++){let r=o[e];t.fillStyle=r.color;let l=n-r.delay,i=Math.min(r.text.length,Math.floor(l/30));if(t.fillText(r.text.slice(0,i),40,a/2-60+28*e),e===f-1&&i<r.text.length&&Math.floor(n/200)%2==0){let l=40+t.measureText(r.text.slice(0,i)).width;t.fillRect(l+2,a/2-74+28*e,10,18)}}}if(n>2800){let e=Math.min(1,(n-2800)/800),l=t.createRadialGradient(r/2,a/2-30,0,r/2,a/2-30,200);l.addColorStop(0,"rgba(79, 70, 229, ".concat(.3*e,")")),l.addColorStop(1,"rgba(79, 70, 229, 0)"),t.fillStyle=l,t.fillRect(0,0,r,a);let o=Math.min(4,r/120);g(t,"BIT",r/2,a/2-40,o,"rgba(255, 255, 255, ".concat(e,")")),g(t,"OFFICE",r/2,a/2+10,o,"rgba(249, 115, 22, ".concat(e,")")),t.strokeStyle="rgba(79, 70, 229, ".concat(.6*e,")"),t.lineWidth=2;let i=Math.min(280,r-80);if(t.beginPath(),t.moveTo(r/2-i/2,a/2+55),t.lineTo(r/2+i/2,a/2+55),t.stroke(),n>3400){let e=Math.min(1,(n-3400)/600);t.font="13px monospace",t.fillStyle="rgba(170, 170, 170, ".concat(e,")"),t.textAlign="center",t.fillText("CONTROL YOUR AI AGENTS",r/2,a/2+76),t.textAlign="start"}}n>4200&&Math.floor(n/500)%2==0&&g(t,"PRESS START",r/2,a/2+110,2,"#22c55e");let i=t.createRadialGradient(r/2,a/2,.3*a,r/2,a/2,.8*a);i.addColorStop(0,"rgba(0,0,0,0)"),i.addColorStop(1,"rgba(0,0,0,0.5)"),t.fillStyle=i,t.fillRect(0,0,r,a),w.current=requestAnimationFrame(l)};return w.current=requestAnimationFrame(l),()=>{cancelAnimationFrame(w.current),window.removeEventListener("resize",a)}},[f,E,g]),(0,l.useEffect)(()=>{if("ready"!==i)return;let e=()=>t();return window.addEventListener("click",e),window.addEventListener("keydown",e),window.addEventListener("touchstart",e),()=>{window.removeEventListener("click",e),window.removeEventListener("keydown",e),window.removeEventListener("touchstart",e)}},[i,t]),(0,a.jsx)("canvas",{ref:r,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9999,cursor:"ready"===i?"pointer":"default"}})}}}]);