@epic-web/workshop-app 4.2.6 → 4.2.8

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 (104) hide show
  1. package/build/client/assets/{_-ByTWgb53.js → _-CsdFvUbA.js} +2 -2
  2. package/build/client/assets/{_-ByTWgb53.js.map → _-CsdFvUbA.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-s_qbmGEJ.js → _exerciseNumber-DWZNkWZM.js} +2 -2
  4. package/build/client/assets/{_exerciseNumber-s_qbmGEJ.js.map → _exerciseNumber-DWZNkWZM.js.map} +1 -1
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-D1wwEMQx.js → _exerciseNumber_._stepNumber-P76hDsE6.js} +2 -2
  6. package/build/client/assets/{_exerciseNumber_._stepNumber-D1wwEMQx.js.map → _exerciseNumber_._stepNumber-P76hDsE6.js.map} +1 -1
  7. package/build/client/assets/{_exerciseNumber_.finished-DJgT9oaU.js → _exerciseNumber_.finished-CpC-flTW.js} +2 -2
  8. package/build/client/assets/{_exerciseNumber_.finished-DJgT9oaU.js.map → _exerciseNumber_.finished-CpC-flTW.js.map} +1 -1
  9. package/build/client/assets/{_layout-49l6Rvwp.js → _layout-BSoUgboG.js} +2 -2
  10. package/build/client/assets/{_layout-49l6Rvwp.js.map → _layout-BSoUgboG.js.map} +1 -1
  11. package/build/client/assets/{_layout-D7Qo_r0X.js → _layout-C8fK4Z98.js} +2 -2
  12. package/build/client/assets/{_layout-D7Qo_r0X.js.map → _layout-C8fK4Z98.js.map} +1 -1
  13. package/build/client/assets/_layout-D1A2zp9y.js +2 -0
  14. package/build/client/assets/{_layout-Bj9PyQQD.js.map → _layout-D1A2zp9y.js.map} +1 -1
  15. package/build/client/assets/{_layout-BaPtC79F.js → _layout-DEZ-aTmx.js} +2 -2
  16. package/build/client/assets/{_layout-BaPtC79F.js.map → _layout-DEZ-aTmx.js.map} +1 -1
  17. package/build/client/assets/{account-Bk4o4AzZ.js → account-BeKnQB9r.js} +2 -2
  18. package/build/client/assets/{account-Bk4o4AzZ.js.map → account-BeKnQB9r.js.map} +1 -1
  19. package/build/client/assets/{button-DnQOyJAN.js → button-Da1iG51o.js} +2 -2
  20. package/build/client/assets/{button-DnQOyJAN.js.map → button-Da1iG51o.js.map} +1 -1
  21. package/build/client/assets/{client-hints-KnbHFIgn.js → client-hints-B2pbEa_9.js} +2 -2
  22. package/build/client/assets/{client-hints-KnbHFIgn.js.map → client-hints-B2pbEa_9.js.map} +1 -1
  23. package/build/client/assets/{components-Dj3sm47B.js → components-BM_XUa9h.js} +15 -15
  24. package/build/client/assets/{components-Dj3sm47B.js.map → components-BM_XUa9h.js.map} +1 -1
  25. package/build/client/assets/diff-BDeBUdSw.js +2 -0
  26. package/build/client/assets/{diff-CLRdJhCn.js.map → diff-BDeBUdSw.js.map} +1 -1
  27. package/build/client/assets/{diff-CT3-9rtW.js → diff-BQhWtDyS.js} +2 -2
  28. package/build/client/assets/{diff-CT3-9rtW.js.map → diff-BQhWtDyS.js.map} +1 -1
  29. package/build/client/assets/{discord-CsluX01E.js → discord-BMNnObT9.js} +2 -2
  30. package/build/client/assets/{discord-CsluX01E.js.map → discord-BMNnObT9.js.map} +1 -1
  31. package/build/client/assets/discord-DdAReDkL.js +2 -0
  32. package/build/client/assets/discord-DdAReDkL.js.map +1 -0
  33. package/build/client/assets/{entry.client-DBBrAxtJ.js → entry.client-XC5tKTFs.js} +2 -2
  34. package/build/client/assets/{entry.client-DBBrAxtJ.js.map → entry.client-XC5tKTFs.js.map} +1 -1
  35. package/build/client/assets/{epic-video-Df7qGSN7.js → epic-video-CxRPT-8l.js} +2 -2
  36. package/build/client/assets/{epic-video-Df7qGSN7.js.map → epic-video-CxRPT-8l.js.map} +1 -1
  37. package/build/client/assets/epic_ws_.js_-l0sNRNKZ.js +2 -0
  38. package/build/client/assets/epic_ws_.js_-l0sNRNKZ.js.map +1 -0
  39. package/build/client/assets/{error-boundary-Bg54_knF.js → error-boundary-tJSWbP6w.js} +2 -2
  40. package/build/client/assets/{error-boundary-Bg54_knF.js.map → error-boundary-tJSWbP6w.js.map} +1 -1
  41. package/build/client/assets/{finished-Dw3SJA8A.js → finished-CMGRmsnb.js} +2 -2
  42. package/build/client/assets/{finished-Dw3SJA8A.js.map → finished-CMGRmsnb.js.map} +1 -1
  43. package/build/client/assets/{index-BL4aE6WC.js → index-B8G3eD8F.js} +2 -2
  44. package/build/client/assets/{index-BL4aE6WC.js.map → index-B8G3eD8F.js.map} +1 -1
  45. package/build/client/assets/index-BDqSZ0-h.js +36 -0
  46. package/build/client/assets/{index-D1WEsmVZ.js.map → index-BDqSZ0-h.js.map} +1 -1
  47. package/build/client/assets/{index-BfoHqrT5.js → index-BymJEf3X.js} +2 -2
  48. package/build/client/assets/{index-BfoHqrT5.js.map → index-BymJEf3X.js.map} +1 -1
  49. package/build/client/assets/{index-YgRENgjt.js → index-CQZ5FyEE.js} +2 -2
  50. package/build/client/assets/{index-YgRENgjt.js.map → index-CQZ5FyEE.js.map} +1 -1
  51. package/build/client/assets/{index-CLnz0tXz.js → index-Dc59VwXx.js} +2 -2
  52. package/build/client/assets/{index-CLnz0tXz.js.map → index-Dc59VwXx.js.map} +1 -1
  53. package/build/client/assets/{loading-D-DClzm1.js → loading-DsjO-T0W.js} +2 -2
  54. package/build/client/assets/{loading-D-DClzm1.js.map → loading-DsjO-T0W.js.map} +1 -1
  55. package/build/client/assets/{login-CjvZj820.js → login-CcuvIoiW.js} +2 -2
  56. package/build/client/assets/{login-CjvZj820.js.map → login-CcuvIoiW.js.map} +1 -1
  57. package/build/client/assets/manifest-1656ae4d.js +1 -0
  58. package/build/client/assets/mdx-CZ_BPVoS.js +2 -0
  59. package/build/client/assets/{mdx-ytg-y2nh.js.map → mdx-CZ_BPVoS.js.map} +1 -1
  60. package/build/client/assets/misc-C1rq7sPa.js +2 -0
  61. package/build/client/assets/{misc-CXGQ7VS9.js.map → misc-C1rq7sPa.js.map} +1 -1
  62. package/build/client/assets/{nav-chevrons-D8c9lJW6.js → nav-chevrons-C-dN3WfT.js} +2 -2
  63. package/build/client/assets/{nav-chevrons-D8c9lJW6.js.map → nav-chevrons-C-dN3WfT.js.map} +1 -1
  64. package/build/client/assets/{onboarding-BxcIdiGj.js → onboarding-CfXLKsN3.js} +2 -2
  65. package/build/client/assets/{onboarding-BxcIdiGj.js.map → onboarding-CfXLKsN3.js.map} +1 -1
  66. package/build/client/assets/{presence-u-05JV3Z.js → presence-BF7lWuVd.js} +2 -2
  67. package/build/client/assets/{presence-u-05JV3Z.js.map → presence-BF7lWuVd.js.map} +1 -1
  68. package/build/client/assets/{progress-bar-DX6yYES2.js → progress-bar-BmszwN_j.js} +2 -2
  69. package/build/client/assets/{progress-bar-DX6yYES2.js.map → progress-bar-BmszwN_j.js.map} +1 -1
  70. package/build/client/assets/{progress-CBZt2pmu.js → progress-mfa_5CZx.js} +2 -2
  71. package/build/client/assets/{progress-CBZt2pmu.js.map → progress-mfa_5CZx.js.map} +1 -1
  72. package/build/client/assets/{root-B02acrJe.js → root-1Cc21xa6.js} +2 -2
  73. package/build/client/assets/{root-B02acrJe.js.map → root-1Cc21xa6.js.map} +1 -1
  74. package/build/client/assets/{support-QTdmLyE7.js → support--jou3sWH.js} +2 -2
  75. package/build/client/assets/{support-QTdmLyE7.js.map → support--jou3sWH.js.map} +1 -1
  76. package/build/client/assets/{tooltip-CVFWPOu0.js → tooltip-BlVFw-is.js} +2 -2
  77. package/build/client/assets/{tooltip-CVFWPOu0.js.map → tooltip-BlVFw-is.js.map} +1 -1
  78. package/build/client/assets/{use-event-source-DXlRuRq2.js → use-event-source-DPLyo0Bh.js} +2 -2
  79. package/build/client/assets/{use-event-source-DXlRuRq2.js.map → use-event-source-DPLyo0Bh.js.map} +1 -1
  80. package/build/client/assets/{user-DiGtbaa7.js → user-p2QVtDZI.js} +2 -2
  81. package/build/client/assets/{user-DiGtbaa7.js.map → user-p2QVtDZI.js.map} +1 -1
  82. package/build/server/index.js +189 -706
  83. package/build/server/index.js.map +1 -1
  84. package/package.json +3 -3
  85. package/build/client/assets/_layout-Bj9PyQQD.js +0 -2
  86. package/build/client/assets/app._id-l0sNRNKZ.js +0 -2
  87. package/build/client/assets/app._id-l0sNRNKZ.js.map +0 -1
  88. package/build/client/assets/app._id._-l0sNRNKZ.js +0 -2
  89. package/build/client/assets/app._id._-l0sNRNKZ.js.map +0 -1
  90. package/build/client/assets/app._id.api._-l0sNRNKZ.js +0 -2
  91. package/build/client/assets/app._id.api._-l0sNRNKZ.js.map +0 -1
  92. package/build/client/assets/app._id.epic_ws_.js_-l0sNRNKZ.js +0 -2
  93. package/build/client/assets/app._id.epic_ws_.js_-l0sNRNKZ.js.map +0 -1
  94. package/build/client/assets/app._id.test._testName-l0sNRNKZ.js +0 -2
  95. package/build/client/assets/app._id.test._testName-l0sNRNKZ.js.map +0 -1
  96. package/build/client/assets/diff-CLRdJhCn.js +0 -2
  97. package/build/client/assets/discord-CK7yz4w6.js +0 -2
  98. package/build/client/assets/discord-CK7yz4w6.js.map +0 -1
  99. package/build/client/assets/index-D1WEsmVZ.js +0 -36
  100. package/build/client/assets/kcd_ws_.js_-l0sNRNKZ.js +0 -2
  101. package/build/client/assets/kcd_ws_.js_-l0sNRNKZ.js.map +0 -1
  102. package/build/client/assets/manifest-9027f7b6.js +0 -1
  103. package/build/client/assets/mdx-ytg-y2nh.js +0 -2
  104. package/build/client/assets/misc-CXGQ7VS9.js +0 -2
@@ -1,2 +1,2 @@
1
- import{j as e}from"./index-D1WEsmVZ.js";import{I as t}from"./misc-CXGQ7VS9.js";import{L as o}from"./components-Dj3sm47B.js";function l({prev:r,next:a}){return e.jsxs("div",{className:"relative flex h-full overflow-hidden",children:[r?e.jsx(o,{prefetch:"intent",...r,className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronLeft",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronLeft",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null,a?e.jsx(o,{prefetch:"intent",...a,className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronRight",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronRight",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null]})}export{l as N};
2
- //# sourceMappingURL=nav-chevrons-D8c9lJW6.js.map
1
+ import{j as e}from"./index-BDqSZ0-h.js";import{I as t}from"./misc-C1rq7sPa.js";import{L as o}from"./components-BM_XUa9h.js";function l({prev:r,next:a}){return e.jsxs("div",{className:"relative flex h-full overflow-hidden",children:[r?e.jsx(o,{prefetch:"intent",...r,className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronLeft",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronLeft",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null,a?e.jsx(o,{prefetch:"intent",...a,className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronRight",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronRight",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null]})}export{l as N};
2
+ //# sourceMappingURL=nav-chevrons-C-dN3WfT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nav-chevrons-D8c9lJW6.js","sources":["../../../app/components/nav-chevrons.tsx"],"sourcesContent":["import { Link, type LinkProps } from '@remix-run/react'\nimport { Icon } from './icons.tsx'\n\nexport function NavChevrons({\n\tprev,\n\tnext,\n}: {\n\tprev?: LinkProps | null\n\tnext?: LinkProps | null\n}) {\n\treturn (\n\t\t<div className=\"relative flex h-full overflow-hidden\">\n\t\t\t{prev ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...prev}\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{next ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...next}\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n"],"names":["NavChevrons","prev","next","jsxs","jsx","Link","Fragment","Icon"],"mappings":"4HAGO,SAASA,EAAY,CAC3B,KAAAC,EACA,KAAAC,CACD,EAGG,CAED,OAAAC,EAAA,KAAC,MAAI,CAAA,UAAU,uCACb,SAAA,CACAF,EAAAG,EAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGJ,EACJ,UAAU,8DACV,SAEEE,EAAA,KAAAG,WAAA,CAAA,SAAA,CAAAF,EAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,2GAAA,CACX,EACAH,EAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,0HAAA,CACX,CAAA,EACD,CAAA,CAAA,EAGC,KACHL,EACAE,EAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGH,EACJ,UAAU,8DACV,SAEEC,EAAA,KAAAG,WAAA,CAAA,SAAA,CAAAF,EAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,2GAAA,CACX,EACAH,EAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,0HAAA,CACX,CAAA,EACD,CAAA,CAAA,EAGC,IACL,CAAA,CAAA,CAEF"}
1
+ {"version":3,"file":"nav-chevrons-C-dN3WfT.js","sources":["../../../app/components/nav-chevrons.tsx"],"sourcesContent":["import { Link, type LinkProps } from '@remix-run/react'\nimport { Icon } from './icons.tsx'\n\nexport function NavChevrons({\n\tprev,\n\tnext,\n}: {\n\tprev?: LinkProps | null\n\tnext?: LinkProps | null\n}) {\n\treturn (\n\t\t<div className=\"relative flex h-full overflow-hidden\">\n\t\t\t{prev ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...prev}\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{next ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...next}\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n"],"names":["NavChevrons","prev","next","jsxs","jsx","Link","Fragment","Icon"],"mappings":"4HAGO,SAASA,EAAY,CAC3B,KAAAC,EACA,KAAAC,CACD,EAGG,CAED,OAAAC,EAAA,KAAC,MAAI,CAAA,UAAU,uCACb,SAAA,CACAF,EAAAG,EAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGJ,EACJ,UAAU,8DACV,SAEEE,EAAA,KAAAG,WAAA,CAAA,SAAA,CAAAF,EAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,2GAAA,CACX,EACAH,EAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,0HAAA,CACX,CAAA,EACD,CAAA,CAAA,EAGC,KACHL,EACAE,EAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGH,EACJ,UAAU,8DACV,SAEEC,EAAA,KAAAG,WAAA,CAAA,SAAA,CAAAF,EAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,2GAAA,CACX,EACAH,EAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,0HAAA,CACX,CAAA,EACD,CAAA,CAAA,EAGC,IACL,CAAA,CAAA,CAEF"}
@@ -1,2 +1,2 @@
1
- import{j as e}from"./index-D1WEsmVZ.js";import{B as t}from"./button-DnQOyJAN.js";import{E as r,D as s}from"./epic-video-Df7qGSN7.js";import{u as i,F as l}from"./components-Dj3sm47B.js";import"./clsx-B-dksMZM.js";import"./misc-CXGQ7VS9.js";import"./loading-D-DClzm1.js";import"./client-hints-KnbHFIgn.js";import"./index-CLnz0tXz.js";import"./index-B8k-Gd1G.js";import"./tooltip-CVFWPOu0.js";function w(){const o=i();return e.jsxs("main",{className:"flex h-full w-full flex-col items-center justify-between gap-4",children:[e.jsxs("div",{className:"container flex h-full w-full max-w-5xl flex-1 flex-col items-center gap-4 overflow-y-scroll py-12 scrollbar-thin scrollbar-thumb-scrollbar",children:[e.jsx("h1",{className:"text-5xl",children:"Onboarding"}),e.jsx("p",{className:"text-xl",children:"Welcome to EpicWeb.dev!"}),e.jsxs("p",{className:"text-lg",children:["Before you get started, ",e.jsx("strong",{children:"you must watch the tour video"}),"! You're going to be spending a lot of time in here, so it's important you understand how to work effectively in this workshop"]}),e.jsx("div",{className:"w-[780px] max-w-full",children:e.jsx(r,{epicVideoInfosPromise:o.videoInfos,children:e.jsx(s,{url:o.tourUrl})})})]}),e.jsx(l,{method:"post",className:"pb-4",children:e.jsx(t,{name:"intent",value:"complete",varient:"primary",children:"I've watched it. Let's go!"})})]})}export{w as default};
2
- //# sourceMappingURL=onboarding-BxcIdiGj.js.map
1
+ import{j as e}from"./index-BDqSZ0-h.js";import{B as t}from"./button-Da1iG51o.js";import{E as r,D as s}from"./epic-video-CxRPT-8l.js";import{u as i,F as l}from"./components-BM_XUa9h.js";import"./clsx-B-dksMZM.js";import"./misc-C1rq7sPa.js";import"./loading-DsjO-T0W.js";import"./client-hints-B2pbEa_9.js";import"./index-Dc59VwXx.js";import"./index-B8k-Gd1G.js";import"./tooltip-BlVFw-is.js";function w(){const o=i();return e.jsxs("main",{className:"flex h-full w-full flex-col items-center justify-between gap-4",children:[e.jsxs("div",{className:"container flex h-full w-full max-w-5xl flex-1 flex-col items-center gap-4 overflow-y-scroll py-12 scrollbar-thin scrollbar-thumb-scrollbar",children:[e.jsx("h1",{className:"text-5xl",children:"Onboarding"}),e.jsx("p",{className:"text-xl",children:"Welcome to EpicWeb.dev!"}),e.jsxs("p",{className:"text-lg",children:["Before you get started, ",e.jsx("strong",{children:"you must watch the tour video"}),"! You're going to be spending a lot of time in here, so it's important you understand how to work effectively in this workshop"]}),e.jsx("div",{className:"w-[780px] max-w-full",children:e.jsx(r,{epicVideoInfosPromise:o.videoInfos,children:e.jsx(s,{url:o.tourUrl})})})]}),e.jsx(l,{method:"post",className:"pb-4",children:e.jsx(t,{name:"intent",value:"complete",varient:"primary",children:"I've watched it. Let's go!"})})]})}export{w as default};
2
+ //# sourceMappingURL=onboarding-CfXLKsN3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-BxcIdiGj.js","sources":["../../../app/routes/onboarding.tsx"],"sourcesContent":["import { invariantResponse } from '@epic-web/invariant'\nimport { updateOnboardingData } from '@epic-web/workshop-utils/db.server'\nimport { makeTimings } from '@epic-web/workshop-utils/timing.server'\nimport {\n\tdefer,\n\ttype ActionFunctionArgs,\n\ttype LoaderFunctionArgs,\n\ttype HeadersFunction,\n\tredirect,\n} from '@remix-run/node'\nimport { Form, useLoaderData } from '@remix-run/react'\nimport { Button } from '#app/components/button.tsx'\nimport {\n\tDeferredEpicVideo,\n\tEpicVideoInfoProvider,\n} from '#app/components/epic-video.tsx'\nimport { getEpicVideoInfos } from '#app/utils/epic-api.ts'\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('onboarding')\n\n\tconst tourUrl =\n\t\t'https://www.epicweb.dev/tips/get-started-with-the-epic-workshop-app'\n\tconst videoInfos = getEpicVideoInfos([tourUrl], { request, timings })\n\treturn defer(\n\t\t{ tourUrl, videoInfos },\n\t\t{ headers: { 'Server-Timing': timings.toString() } },\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': loaderHeaders.get('Server-Timing') ?? '',\n\t}\n\treturn headers\n}\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tconst data = await request.formData()\n\tconst intent = data.get('intent')\n\tinvariantResponse(intent === 'complete', 'Invalid intent')\n\tawait updateOnboardingData({ finishedTourVideo: true })\n\tthrow redirect('/account')\n}\n\nexport default function Onboarding() {\n\tconst data = useLoaderData<typeof loader>()\n\treturn (\n\t\t<main className=\"flex h-full w-full flex-col items-center justify-between gap-4\">\n\t\t\t<div className=\"container flex h-full w-full max-w-5xl flex-1 flex-col items-center gap-4 overflow-y-scroll py-12 scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t<h1 className=\"text-5xl\">Onboarding</h1>\n\t\t\t\t<p className=\"text-xl\">Welcome to EpicWeb.dev!</p>\n\t\t\t\t<p className=\"text-lg\">\n\t\t\t\t\tBefore you get started, <strong>you must watch the tour video</strong>\n\t\t\t\t\t! You're going to be spending a lot of time in here, so it's important\n\t\t\t\t\tyou understand how to work effectively in this workshop\n\t\t\t\t</p>\n\t\t\t\t<div className=\"w-[780px] max-w-full\">\n\t\t\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.videoInfos}>\n\t\t\t\t\t\t<DeferredEpicVideo url={data.tourUrl} />\n\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<Form method=\"post\" className=\"pb-4\">\n\t\t\t\t<Button name=\"intent\" value=\"complete\" varient=\"primary\">\n\t\t\t\t\tI've watched it. Let's go!\n\t\t\t\t</Button>\n\t\t\t</Form>\n\t\t</main>\n\t)\n}\n"],"names":["Onboarding","data","useLoaderData","jsxs","jsx","EpicVideoInfoProvider","DeferredEpicVideo","headers","Form"],"mappings":"sYAGA,SAAAA,GAAA,CACC,MAAAC,EAAAC,IAIA,OAAAC,EAAAA,KAAA,OAAA,CACM,UAAA,iEACP,UAAoCA,EAAA,KAAA,MAAA,CACpC,UAAuB,6IACvB,SAAA,CAAAC,EAAA,IAAA,KAAA,CACC,UAAA,WACA,SAAA,YAAA,CACM,EAAAA,EAAA,IAAA,IAAA,CACP,UAAkC,UAEZ,SAAA,yBACrB,CAAM,SAAsB,IAAY,CAElC,UACL,UACK,SAAA,CAAA,0CAA8D,CAC7D,SAAA,kKACgB,CAAA,CACX,cAA2B,CACvC,UAAA,uBACD,SAAAA,EAAA,IAAAC,EAAA,CAEO,sBAAoCJ,EAAA,WAC1B,SAAAG,EAAA,IAAAE,EAAA,CACE,IAAAL,EAAA,OAAsC,CACxD,CACA,CAAOM,CACR,CAAA,CAAA,CAEA,CAAsB,EAAAH,EAAA,IAAAI,EAAS,CACxB,OAAA,OACA,UAAS,OACG,SAAWJ,QAAY,CACnC,KAAqB,SACrB,iBACP,QAAA,UAEA,SAAA,4BACC,CAAA,CACA,CACC,CAAA,CACC,CAAC,CACA"}
1
+ {"version":3,"file":"onboarding-CfXLKsN3.js","sources":["../../../app/routes/onboarding.tsx"],"sourcesContent":["import { invariantResponse } from '@epic-web/invariant'\nimport { updateOnboardingData } from '@epic-web/workshop-utils/db.server'\nimport { makeTimings } from '@epic-web/workshop-utils/timing.server'\nimport {\n\tdefer,\n\ttype ActionFunctionArgs,\n\ttype LoaderFunctionArgs,\n\ttype HeadersFunction,\n\tredirect,\n} from '@remix-run/node'\nimport { Form, useLoaderData } from '@remix-run/react'\nimport { Button } from '#app/components/button.tsx'\nimport {\n\tDeferredEpicVideo,\n\tEpicVideoInfoProvider,\n} from '#app/components/epic-video.tsx'\nimport { getEpicVideoInfos } from '#app/utils/epic-api.ts'\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('onboarding')\n\n\tconst tourUrl =\n\t\t'https://www.epicweb.dev/tips/get-started-with-the-epic-workshop-app'\n\tconst videoInfos = getEpicVideoInfos([tourUrl], { request, timings })\n\treturn defer(\n\t\t{ tourUrl, videoInfos },\n\t\t{ headers: { 'Server-Timing': timings.toString() } },\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': loaderHeaders.get('Server-Timing') ?? '',\n\t}\n\treturn headers\n}\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tconst data = await request.formData()\n\tconst intent = data.get('intent')\n\tinvariantResponse(intent === 'complete', 'Invalid intent')\n\tawait updateOnboardingData({ finishedTourVideo: true })\n\tthrow redirect('/account')\n}\n\nexport default function Onboarding() {\n\tconst data = useLoaderData<typeof loader>()\n\treturn (\n\t\t<main className=\"flex h-full w-full flex-col items-center justify-between gap-4\">\n\t\t\t<div className=\"container flex h-full w-full max-w-5xl flex-1 flex-col items-center gap-4 overflow-y-scroll py-12 scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t<h1 className=\"text-5xl\">Onboarding</h1>\n\t\t\t\t<p className=\"text-xl\">Welcome to EpicWeb.dev!</p>\n\t\t\t\t<p className=\"text-lg\">\n\t\t\t\t\tBefore you get started, <strong>you must watch the tour video</strong>\n\t\t\t\t\t! You're going to be spending a lot of time in here, so it's important\n\t\t\t\t\tyou understand how to work effectively in this workshop\n\t\t\t\t</p>\n\t\t\t\t<div className=\"w-[780px] max-w-full\">\n\t\t\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.videoInfos}>\n\t\t\t\t\t\t<DeferredEpicVideo url={data.tourUrl} />\n\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<Form method=\"post\" className=\"pb-4\">\n\t\t\t\t<Button name=\"intent\" value=\"complete\" varient=\"primary\">\n\t\t\t\t\tI've watched it. Let's go!\n\t\t\t\t</Button>\n\t\t\t</Form>\n\t\t</main>\n\t)\n}\n"],"names":["Onboarding","data","useLoaderData","jsxs","jsx","EpicVideoInfoProvider","DeferredEpicVideo","headers","Form"],"mappings":"sYAGA,SAAAA,GAAA,CACC,MAAAC,EAAAC,IAIA,OAAAC,EAAAA,KAAA,OAAA,CACM,UAAA,iEACP,UAAoCA,EAAA,KAAA,MAAA,CACpC,UAAuB,6IACvB,SAAA,CAAAC,EAAA,IAAA,KAAA,CACC,UAAA,WACA,SAAA,YAAA,CACM,EAAAA,EAAA,IAAA,IAAA,CACP,UAAkC,UAEZ,SAAA,yBACrB,CAAM,SAAsB,IAAY,CAElC,UACL,UACK,SAAA,CAAA,0CAA8D,CAC7D,SAAA,kKACgB,CAAA,CACX,cAA2B,CACvC,UAAA,uBACD,SAAAA,EAAA,IAAAC,EAAA,CAEO,sBAAoCJ,EAAA,WAC1B,SAAAG,EAAA,IAAAE,EAAA,CACE,IAAAL,EAAA,OAAsC,CACxD,CACA,CAAOM,CACR,CAAA,CAAA,CAEA,CAAsB,EAAAH,EAAA,IAAAI,EAAS,CACxB,OAAA,OACA,UAAS,OACG,SAAWJ,QAAY,CACnC,KAAqB,SACrB,iBACP,QAAA,UAEA,SAAA,4BACC,CAAA,CACA,CACC,CAAA,CACC,CAAC,CACA"}
@@ -1,4 +1,4 @@
1
- var ie=Object.defineProperty;var ce=(t,n,e)=>n in t?ie(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var f=(t,n,e)=>(ce(t,typeof n!="symbol"?n+"":n,e),e);import{h as tt,r as S,j as ae,b as ue}from"./index-D1WEsmVZ.js";import{z as p}from"./index-B8k-Gd1G.js";import{b as V}from"./components-Dj3sm47B.js";const ct="epic-web-presence",le=`https://epic-web-presence.kentcdodds.partykit.dev/parties/main/${ct}`,q=p.object({id:p.string(),avatarUrl:p.string().nullable().optional(),name:p.string().nullable().optional(),location:p.object({workshopTitle:p.string().nullable().optional(),exercise:p.object({type:p.union([p.literal("problem"),p.literal("solution")]).nullable().optional(),exerciseNumber:p.number().nullable().optional(),stepNumber:p.number().nullable().optional()}).nullable().optional()}).nullable().optional()}),he=p.object({type:p.literal("remove-user"),payload:p.object({id:p.string()})}).or(p.object({type:p.literal("add-user"),payload:q})).or(p.object({type:p.literal("presence"),payload:p.object({users:p.array(q)})}));p.object({users:p.array(q)});var C={},y={},w={};Object.defineProperty(w,"__esModule",{value:!0});w.output=w.exists=w.hash=w.bytes=w.bool=w.number=w.isBytes=void 0;function $(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}w.number=$;function at(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}w.bool=at;function ut(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}w.isBytes=ut;function K(t,...n){if(!ut(t))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(t.length))throw new Error(`Uint8Array expected of length ${n}, not of length=${t.length}`)}w.bytes=K;function lt(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");$(t.outputLen),$(t.blockLen)}w.hash=lt;function ht(t,n=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(n&&t.finished)throw new Error("Hash#digest() has already been called")}w.exists=ht;function dt(t,n){K(t);const e=n.outputLen;if(t.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}w.output=dt;const de={number:$,bool:at,bytes:K,hash:lt,exists:ht,output:dt};w.default=de;var u={};Object.defineProperty(u,"__esModule",{value:!0});u.add5L=u.add5H=u.add4H=u.add4L=u.add3H=u.add3L=u.add=u.rotlBL=u.rotlBH=u.rotlSL=u.rotlSH=u.rotr32L=u.rotr32H=u.rotrBL=u.rotrBH=u.rotrSL=u.rotrSH=u.shrSL=u.shrSH=u.toBig=u.split=u.fromBig=void 0;const j=BigInt(2**32-1),X=BigInt(32);function z(t,n=!1){return n?{h:Number(t&j),l:Number(t>>X&j)}:{h:Number(t>>X&j)|0,l:Number(t&j)|0}}u.fromBig=z;function ft(t,n=!1){let e=new Uint32Array(t.length),s=new Uint32Array(t.length);for(let r=0;r<t.length;r++){const{h:i,l:c}=z(t[r],n);[e[r],s[r]]=[i,c]}return[e,s]}u.split=ft;const pt=(t,n)=>BigInt(t>>>0)<<X|BigInt(n>>>0);u.toBig=pt;const yt=(t,n,e)=>t>>>e;u.shrSH=yt;const _t=(t,n,e)=>t<<32-e|n>>>e;u.shrSL=_t;const mt=(t,n,e)=>t>>>e|n<<32-e;u.rotrSH=mt;const gt=(t,n,e)=>t<<32-e|n>>>e;u.rotrSL=gt;const bt=(t,n,e)=>t<<64-e|n>>>e-32;u.rotrBH=bt;const wt=(t,n,e)=>t>>>e-32|n<<64-e;u.rotrBL=wt;const Lt=(t,n)=>n;u.rotr32H=Lt;const kt=(t,n)=>t;u.rotr32L=kt;const vt=(t,n,e)=>t<<e|n>>>32-e;u.rotlSH=vt;const Et=(t,n,e)=>n<<e|t>>>32-e;u.rotlSL=Et;const St=(t,n,e)=>n<<e-32|t>>>64-e;u.rotlBH=St;const xt=(t,n,e)=>t<<e-32|n>>>64-e;u.rotlBL=xt;function Tt(t,n,e,s){const r=(n>>>0)+(s>>>0);return{h:t+e+(r/2**32|0)|0,l:r|0}}u.add=Tt;const Ot=(t,n,e)=>(t>>>0)+(n>>>0)+(e>>>0);u.add3L=Ot;const Ct=(t,n,e,s)=>n+e+s+(t/2**32|0)|0;u.add3H=Ct;const Bt=(t,n,e,s)=>(t>>>0)+(n>>>0)+(e>>>0)+(s>>>0);u.add4L=Bt;const It=(t,n,e,s,r)=>n+e+s+r+(t/2**32|0)|0;u.add4H=It;const Ut=(t,n,e,s,r)=>(t>>>0)+(n>>>0)+(e>>>0)+(s>>>0)+(r>>>0);u.add5L=Ut;const Pt=(t,n,e,s,r,i)=>n+e+s+r+i+(t/2**32|0)|0;u.add5H=Pt;const fe={fromBig:z,split:ft,toBig:pt,shrSH:yt,shrSL:_t,rotrSH:mt,rotrSL:gt,rotrBH:bt,rotrBL:wt,rotr32H:Lt,rotr32L:kt,rotlSH:vt,rotlSL:Et,rotlBH:St,rotlBL:xt,add:Tt,add3L:Ot,add3H:Ct,add4L:Bt,add4H:It,add5H:Pt,add5L:Ut};u.default=fe;var Nt={},F={};Object.defineProperty(F,"__esModule",{value:!0});F.crypto=void 0;F.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(t){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.byteSwap32=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=t.isBytes=void 0;const n=F,e=w;function s(o){return o instanceof Uint8Array||o!=null&&typeof o=="object"&&o.constructor.name==="Uint8Array"}t.isBytes=s;const r=o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength);t.u8=r;const i=o=>new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4));t.u32=i;const c=o=>new DataView(o.buffer,o.byteOffset,o.byteLength);t.createView=c;const a=(o,d)=>o<<32-d|o>>>d;t.rotr=a;const h=(o,d)=>o<<d|o>>>32-d>>>0;t.rotl=h,t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const l=o=>o<<24&4278190080|o<<8&16711680|o>>>8&65280|o>>>24&255;t.byteSwap=l,t.byteSwapIfBE=t.isLE?o=>o:o=>(0,t.byteSwap)(o);function b(o){for(let d=0;d<o.length;d++)o[d]=(0,t.byteSwap)(o[d])}t.byteSwap32=b;const L=Array.from({length:256},(o,d)=>d.toString(16).padStart(2,"0"));function E(o){(0,e.bytes)(o);let d="";for(let g=0;g<o.length;g++)d+=L[o[g]];return d}t.bytesToHex=E;const m={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function P(o){if(o>=m._0&&o<=m._9)return o-m._0;if(o>=m._A&&o<=m._F)return o-(m._A-10);if(o>=m._a&&o<=m._f)return o-(m._a-10)}function O(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);const d=o.length,g=d/2;if(d%2)throw new Error("padded hex string expected, got unpadded hex of length "+d);const _=new Uint8Array(g);for(let k=0,v=0;k<g;k++,v+=2){const Y=P(o.charCodeAt(v)),Z=P(o.charCodeAt(v+1));if(Y===void 0||Z===void 0){const oe=o[v]+o[v+1];throw new Error('hex string expected, got non-hex character "'+oe+'" at index '+v)}_[k]=Y*16+Z}return _}t.hexToBytes=O;const x=async()=>{};t.nextTick=x;async function zt(o,d,g){let _=Date.now();for(let k=0;k<o;k++){g(k);const v=Date.now()-_;v>=0&&v<d||(await(0,t.nextTick)(),_+=v)}}t.asyncLoop=zt;function J(o){if(typeof o!="string")throw new Error(`utf8ToBytes expected string, got ${typeof o}`);return new Uint8Array(new TextEncoder().encode(o))}t.utf8ToBytes=J;function W(o){return typeof o=="string"&&(o=J(o)),(0,e.bytes)(o),o}t.toBytes=W;function Jt(...o){let d=0;for(let _=0;_<o.length;_++){const k=o[_];(0,e.bytes)(k),d+=k.length}const g=new Uint8Array(d);for(let _=0,k=0;_<o.length;_++){const v=o[_];g.set(v,k),k+=v.length}return g}t.concatBytes=Jt;class Yt{clone(){return this._cloneInto()}}t.Hash=Yt;const Zt={}.toString;function te(o,d){if(d!==void 0&&Zt.call(d)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(o,d)}t.checkOpts=te;function ee(o){const d=_=>o().update(W(_)).digest(),g=o();return d.outputLen=g.outputLen,d.blockLen=g.blockLen,d.create=()=>o(),d}t.wrapConstructor=ee;function ne(o){const d=(_,k)=>o(k).update(W(_)).digest(),g=o({});return d.outputLen=g.outputLen,d.blockLen=g.blockLen,d.create=_=>o(_),d}t.wrapConstructorWithOpts=ne;function se(o){const d=(_,k)=>o(k).update(W(_)).digest(),g=o({});return d.outputLen=g.outputLen,d.blockLen=g.blockLen,d.create=_=>o(_),d}t.wrapXOFConstructorWithOpts=se;function re(o=32){if(n.crypto&&typeof n.crypto.getRandomValues=="function")return n.crypto.getRandomValues(new Uint8Array(o));throw new Error("crypto.getRandomValues must be defined")}t.randomBytes=re})(Nt);Object.defineProperty(y,"__esModule",{value:!0});y.shake256=y.shake128=y.keccak_512=y.keccak_384=y.keccak_256=y.keccak_224=y.sha3_512=y.sha3_384=y.sha3_256=y.sha3_224=y.Keccak=y.keccakP=void 0;const N=w,R=u,T=Nt,Ht=[],At=[],Rt=[],pe=BigInt(0),H=BigInt(1),ye=BigInt(2),_e=BigInt(7),me=BigInt(256),ge=BigInt(113);for(let t=0,n=H,e=1,s=0;t<24;t++){[e,s]=[s,(2*e+3*s)%5],Ht.push(2*(5*s+e)),At.push((t+1)*(t+2)/2%64);let r=pe;for(let i=0;i<7;i++)n=(n<<H^(n>>_e)*ge)%me,n&ye&&(r^=H<<(H<<BigInt(i))-H);Rt.push(r)}const[be,we]=(0,R.split)(Rt,!0),et=(t,n,e)=>e>32?(0,R.rotlBH)(t,n,e):(0,R.rotlSH)(t,n,e),nt=(t,n,e)=>e>32?(0,R.rotlBL)(t,n,e):(0,R.rotlSL)(t,n,e);function Mt(t,n=24){const e=new Uint32Array(10);for(let s=24-n;s<24;s++){for(let c=0;c<10;c++)e[c]=t[c]^t[c+10]^t[c+20]^t[c+30]^t[c+40];for(let c=0;c<10;c+=2){const a=(c+8)%10,h=(c+2)%10,l=e[h],b=e[h+1],L=et(l,b,1)^e[a],E=nt(l,b,1)^e[a+1];for(let m=0;m<50;m+=10)t[c+m]^=L,t[c+m+1]^=E}let r=t[2],i=t[3];for(let c=0;c<24;c++){const a=At[c],h=et(r,i,a),l=nt(r,i,a),b=Ht[c];r=t[b],i=t[b+1],t[b]=h,t[b+1]=l}for(let c=0;c<50;c+=10){for(let a=0;a<10;a++)e[a]=t[c+a];for(let a=0;a<10;a++)t[c+a]^=~e[(a+2)%10]&e[(a+4)%10]}t[0]^=be[s],t[1]^=we[s]}e.fill(0)}y.keccakP=Mt;class M extends T.Hash{constructor(n,e,s,r=!1,i=24){if(super(),this.blockLen=n,this.suffix=e,this.outputLen=s,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,N.number)(s),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,T.u32)(this.state)}keccak(){T.isLE||(0,T.byteSwap32)(this.state32),Mt(this.state32,this.rounds),T.isLE||(0,T.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(n){(0,N.exists)(this);const{blockLen:e,state:s}=this;n=(0,T.toBytes)(n);const r=n.length;for(let i=0;i<r;){const c=Math.min(e-this.pos,r-i);for(let a=0;a<c;a++)s[this.pos++]^=n[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:e,pos:s,blockLen:r}=this;n[s]^=e,e&128&&s===r-1&&this.keccak(),n[r-1]^=128,this.keccak()}writeInto(n){(0,N.exists)(this,!1),(0,N.bytes)(n),this.finish();const e=this.state,{blockLen:s}=this;for(let r=0,i=n.length;r<i;){this.posOut>=s&&this.keccak();const c=Math.min(s-this.posOut,i-r);n.set(e.subarray(this.posOut,this.posOut+c),r),this.posOut+=c,r+=c}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return(0,N.number)(n),this.xofInto(new Uint8Array(n))}digestInto(n){if((0,N.output)(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(n){const{blockLen:e,suffix:s,outputLen:r,rounds:i,enableXOF:c}=this;return n||(n=new M(e,s,r,c,i)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=i,n.suffix=s,n.outputLen=r,n.enableXOF=c,n.destroyed=this.destroyed,n}}y.Keccak=M;const B=(t,n,e)=>(0,T.wrapConstructor)(()=>new M(n,t,e));y.sha3_224=B(6,144,224/8);y.sha3_256=B(6,136,256/8);y.sha3_384=B(6,104,384/8);y.sha3_512=B(6,72,512/8);y.keccak_224=B(1,144,224/8);y.keccak_256=B(1,136,256/8);y.keccak_384=B(1,104,384/8);y.keccak_512=B(1,72,512/8);const Wt=(t,n,e)=>(0,T.wrapXOFConstructorWithOpts)((s={})=>new M(n,t,s.dkLen===void 0?e:s.dkLen,!0));y.shake128=Wt(31,168,128/8);y.shake256=Wt(31,136,256/8);const{sha3_512:Le}=y,jt=24,A=32,Q=(t=4,n=Math.random)=>{let e="";for(;e.length<t;)e=e+Math.floor(n()*36).toString(36);return e};function Dt(t){let n=8n,e=0n;for(const s of t.values()){const r=BigInt(s);e=(e<<n)+r}return e}const $t=(t="")=>Dt(Le(t)).toString(36).slice(1),st=Array.from({length:26},(t,n)=>String.fromCharCode(n+97)),ke=t=>st[Math.floor(t()*st.length)],Ft=({globalObj:t=typeof tt<"u"?tt:typeof window<"u"?window:{},random:n=Math.random}={})=>{const e=Object.keys(t).toString(),s=e.length?e+Q(A,n):Q(A,n);return $t(s).substring(0,A)},Gt=t=>()=>t++,ve=476782367,qt=({random:t=Math.random,counter:n=Gt(Math.floor(t()*ve)),length:e=jt,fingerprint:s=Ft({random:t})}={})=>function(){const i=ke(t),c=Date.now().toString(36),a=n().toString(36),h=Q(e,t),l=`${c+h+a+s}`;return`${i+$t(l).substring(1,e)}`},Ee=qt(),Se=(t,{minLength:n=2,maxLength:e=A}={})=>{const s=t.length,r=/^[0-9a-z]+$/;try{if(typeof t=="string"&&s>=n&&s<=e&&r.test(t))return!0}finally{}return!1};C.getConstants=()=>({defaultLength:jt,bigLength:A});C.init=qt;C.createId=Ee;C.bufToBigInt=Dt;C.createCounter=Gt;C.createFingerprint=Ft;C.isCuid=Se;const{createId:xe,init:Ke,getConstants:ze,isCuid:Je}=C;var Te=xe;(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
1
+ var ie=Object.defineProperty;var ce=(t,n,e)=>n in t?ie(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var f=(t,n,e)=>(ce(t,typeof n!="symbol"?n+"":n,e),e);import{k as tt,r as S,j as ae,b as ue}from"./index-BDqSZ0-h.js";import{z as p}from"./index-B8k-Gd1G.js";import{b as V}from"./components-BM_XUa9h.js";const ct="epic-web-presence",le=`https://epic-web-presence.kentcdodds.partykit.dev/parties/main/${ct}`,q=p.object({id:p.string(),avatarUrl:p.string().nullable().optional(),name:p.string().nullable().optional(),location:p.object({workshopTitle:p.string().nullable().optional(),exercise:p.object({type:p.union([p.literal("problem"),p.literal("solution")]).nullable().optional(),exerciseNumber:p.number().nullable().optional(),stepNumber:p.number().nullable().optional()}).nullable().optional()}).nullable().optional()}),he=p.object({type:p.literal("remove-user"),payload:p.object({id:p.string()})}).or(p.object({type:p.literal("add-user"),payload:q})).or(p.object({type:p.literal("presence"),payload:p.object({users:p.array(q)})}));p.object({users:p.array(q)});var C={},y={},w={};Object.defineProperty(w,"__esModule",{value:!0});w.output=w.exists=w.hash=w.bytes=w.bool=w.number=w.isBytes=void 0;function $(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}w.number=$;function at(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}w.bool=at;function ut(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}w.isBytes=ut;function K(t,...n){if(!ut(t))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(t.length))throw new Error(`Uint8Array expected of length ${n}, not of length=${t.length}`)}w.bytes=K;function lt(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");$(t.outputLen),$(t.blockLen)}w.hash=lt;function ht(t,n=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(n&&t.finished)throw new Error("Hash#digest() has already been called")}w.exists=ht;function dt(t,n){K(t);const e=n.outputLen;if(t.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}w.output=dt;const de={number:$,bool:at,bytes:K,hash:lt,exists:ht,output:dt};w.default=de;var u={};Object.defineProperty(u,"__esModule",{value:!0});u.add5L=u.add5H=u.add4H=u.add4L=u.add3H=u.add3L=u.add=u.rotlBL=u.rotlBH=u.rotlSL=u.rotlSH=u.rotr32L=u.rotr32H=u.rotrBL=u.rotrBH=u.rotrSL=u.rotrSH=u.shrSL=u.shrSH=u.toBig=u.split=u.fromBig=void 0;const j=BigInt(2**32-1),X=BigInt(32);function z(t,n=!1){return n?{h:Number(t&j),l:Number(t>>X&j)}:{h:Number(t>>X&j)|0,l:Number(t&j)|0}}u.fromBig=z;function ft(t,n=!1){let e=new Uint32Array(t.length),s=new Uint32Array(t.length);for(let r=0;r<t.length;r++){const{h:i,l:c}=z(t[r],n);[e[r],s[r]]=[i,c]}return[e,s]}u.split=ft;const pt=(t,n)=>BigInt(t>>>0)<<X|BigInt(n>>>0);u.toBig=pt;const yt=(t,n,e)=>t>>>e;u.shrSH=yt;const _t=(t,n,e)=>t<<32-e|n>>>e;u.shrSL=_t;const mt=(t,n,e)=>t>>>e|n<<32-e;u.rotrSH=mt;const gt=(t,n,e)=>t<<32-e|n>>>e;u.rotrSL=gt;const bt=(t,n,e)=>t<<64-e|n>>>e-32;u.rotrBH=bt;const wt=(t,n,e)=>t>>>e-32|n<<64-e;u.rotrBL=wt;const Lt=(t,n)=>n;u.rotr32H=Lt;const kt=(t,n)=>t;u.rotr32L=kt;const vt=(t,n,e)=>t<<e|n>>>32-e;u.rotlSH=vt;const Et=(t,n,e)=>n<<e|t>>>32-e;u.rotlSL=Et;const St=(t,n,e)=>n<<e-32|t>>>64-e;u.rotlBH=St;const xt=(t,n,e)=>t<<e-32|n>>>64-e;u.rotlBL=xt;function Tt(t,n,e,s){const r=(n>>>0)+(s>>>0);return{h:t+e+(r/2**32|0)|0,l:r|0}}u.add=Tt;const Ot=(t,n,e)=>(t>>>0)+(n>>>0)+(e>>>0);u.add3L=Ot;const Ct=(t,n,e,s)=>n+e+s+(t/2**32|0)|0;u.add3H=Ct;const Bt=(t,n,e,s)=>(t>>>0)+(n>>>0)+(e>>>0)+(s>>>0);u.add4L=Bt;const It=(t,n,e,s,r)=>n+e+s+r+(t/2**32|0)|0;u.add4H=It;const Ut=(t,n,e,s,r)=>(t>>>0)+(n>>>0)+(e>>>0)+(s>>>0)+(r>>>0);u.add5L=Ut;const Pt=(t,n,e,s,r,i)=>n+e+s+r+i+(t/2**32|0)|0;u.add5H=Pt;const fe={fromBig:z,split:ft,toBig:pt,shrSH:yt,shrSL:_t,rotrSH:mt,rotrSL:gt,rotrBH:bt,rotrBL:wt,rotr32H:Lt,rotr32L:kt,rotlSH:vt,rotlSL:Et,rotlBH:St,rotlBL:xt,add:Tt,add3L:Ot,add3H:Ct,add4L:Bt,add4H:It,add5H:Pt,add5L:Ut};u.default=fe;var Nt={},F={};Object.defineProperty(F,"__esModule",{value:!0});F.crypto=void 0;F.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(t){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.byteSwap32=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=t.isBytes=void 0;const n=F,e=w;function s(o){return o instanceof Uint8Array||o!=null&&typeof o=="object"&&o.constructor.name==="Uint8Array"}t.isBytes=s;const r=o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength);t.u8=r;const i=o=>new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4));t.u32=i;const c=o=>new DataView(o.buffer,o.byteOffset,o.byteLength);t.createView=c;const a=(o,d)=>o<<32-d|o>>>d;t.rotr=a;const h=(o,d)=>o<<d|o>>>32-d>>>0;t.rotl=h,t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const l=o=>o<<24&4278190080|o<<8&16711680|o>>>8&65280|o>>>24&255;t.byteSwap=l,t.byteSwapIfBE=t.isLE?o=>o:o=>(0,t.byteSwap)(o);function b(o){for(let d=0;d<o.length;d++)o[d]=(0,t.byteSwap)(o[d])}t.byteSwap32=b;const L=Array.from({length:256},(o,d)=>d.toString(16).padStart(2,"0"));function E(o){(0,e.bytes)(o);let d="";for(let g=0;g<o.length;g++)d+=L[o[g]];return d}t.bytesToHex=E;const m={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function P(o){if(o>=m._0&&o<=m._9)return o-m._0;if(o>=m._A&&o<=m._F)return o-(m._A-10);if(o>=m._a&&o<=m._f)return o-(m._a-10)}function O(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);const d=o.length,g=d/2;if(d%2)throw new Error("padded hex string expected, got unpadded hex of length "+d);const _=new Uint8Array(g);for(let k=0,v=0;k<g;k++,v+=2){const Y=P(o.charCodeAt(v)),Z=P(o.charCodeAt(v+1));if(Y===void 0||Z===void 0){const oe=o[v]+o[v+1];throw new Error('hex string expected, got non-hex character "'+oe+'" at index '+v)}_[k]=Y*16+Z}return _}t.hexToBytes=O;const x=async()=>{};t.nextTick=x;async function zt(o,d,g){let _=Date.now();for(let k=0;k<o;k++){g(k);const v=Date.now()-_;v>=0&&v<d||(await(0,t.nextTick)(),_+=v)}}t.asyncLoop=zt;function J(o){if(typeof o!="string")throw new Error(`utf8ToBytes expected string, got ${typeof o}`);return new Uint8Array(new TextEncoder().encode(o))}t.utf8ToBytes=J;function W(o){return typeof o=="string"&&(o=J(o)),(0,e.bytes)(o),o}t.toBytes=W;function Jt(...o){let d=0;for(let _=0;_<o.length;_++){const k=o[_];(0,e.bytes)(k),d+=k.length}const g=new Uint8Array(d);for(let _=0,k=0;_<o.length;_++){const v=o[_];g.set(v,k),k+=v.length}return g}t.concatBytes=Jt;class Yt{clone(){return this._cloneInto()}}t.Hash=Yt;const Zt={}.toString;function te(o,d){if(d!==void 0&&Zt.call(d)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(o,d)}t.checkOpts=te;function ee(o){const d=_=>o().update(W(_)).digest(),g=o();return d.outputLen=g.outputLen,d.blockLen=g.blockLen,d.create=()=>o(),d}t.wrapConstructor=ee;function ne(o){const d=(_,k)=>o(k).update(W(_)).digest(),g=o({});return d.outputLen=g.outputLen,d.blockLen=g.blockLen,d.create=_=>o(_),d}t.wrapConstructorWithOpts=ne;function se(o){const d=(_,k)=>o(k).update(W(_)).digest(),g=o({});return d.outputLen=g.outputLen,d.blockLen=g.blockLen,d.create=_=>o(_),d}t.wrapXOFConstructorWithOpts=se;function re(o=32){if(n.crypto&&typeof n.crypto.getRandomValues=="function")return n.crypto.getRandomValues(new Uint8Array(o));throw new Error("crypto.getRandomValues must be defined")}t.randomBytes=re})(Nt);Object.defineProperty(y,"__esModule",{value:!0});y.shake256=y.shake128=y.keccak_512=y.keccak_384=y.keccak_256=y.keccak_224=y.sha3_512=y.sha3_384=y.sha3_256=y.sha3_224=y.Keccak=y.keccakP=void 0;const N=w,R=u,T=Nt,Ht=[],At=[],Rt=[],pe=BigInt(0),H=BigInt(1),ye=BigInt(2),_e=BigInt(7),me=BigInt(256),ge=BigInt(113);for(let t=0,n=H,e=1,s=0;t<24;t++){[e,s]=[s,(2*e+3*s)%5],Ht.push(2*(5*s+e)),At.push((t+1)*(t+2)/2%64);let r=pe;for(let i=0;i<7;i++)n=(n<<H^(n>>_e)*ge)%me,n&ye&&(r^=H<<(H<<BigInt(i))-H);Rt.push(r)}const[be,we]=(0,R.split)(Rt,!0),et=(t,n,e)=>e>32?(0,R.rotlBH)(t,n,e):(0,R.rotlSH)(t,n,e),nt=(t,n,e)=>e>32?(0,R.rotlBL)(t,n,e):(0,R.rotlSL)(t,n,e);function Mt(t,n=24){const e=new Uint32Array(10);for(let s=24-n;s<24;s++){for(let c=0;c<10;c++)e[c]=t[c]^t[c+10]^t[c+20]^t[c+30]^t[c+40];for(let c=0;c<10;c+=2){const a=(c+8)%10,h=(c+2)%10,l=e[h],b=e[h+1],L=et(l,b,1)^e[a],E=nt(l,b,1)^e[a+1];for(let m=0;m<50;m+=10)t[c+m]^=L,t[c+m+1]^=E}let r=t[2],i=t[3];for(let c=0;c<24;c++){const a=At[c],h=et(r,i,a),l=nt(r,i,a),b=Ht[c];r=t[b],i=t[b+1],t[b]=h,t[b+1]=l}for(let c=0;c<50;c+=10){for(let a=0;a<10;a++)e[a]=t[c+a];for(let a=0;a<10;a++)t[c+a]^=~e[(a+2)%10]&e[(a+4)%10]}t[0]^=be[s],t[1]^=we[s]}e.fill(0)}y.keccakP=Mt;class M extends T.Hash{constructor(n,e,s,r=!1,i=24){if(super(),this.blockLen=n,this.suffix=e,this.outputLen=s,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,N.number)(s),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,T.u32)(this.state)}keccak(){T.isLE||(0,T.byteSwap32)(this.state32),Mt(this.state32,this.rounds),T.isLE||(0,T.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(n){(0,N.exists)(this);const{blockLen:e,state:s}=this;n=(0,T.toBytes)(n);const r=n.length;for(let i=0;i<r;){const c=Math.min(e-this.pos,r-i);for(let a=0;a<c;a++)s[this.pos++]^=n[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:e,pos:s,blockLen:r}=this;n[s]^=e,e&128&&s===r-1&&this.keccak(),n[r-1]^=128,this.keccak()}writeInto(n){(0,N.exists)(this,!1),(0,N.bytes)(n),this.finish();const e=this.state,{blockLen:s}=this;for(let r=0,i=n.length;r<i;){this.posOut>=s&&this.keccak();const c=Math.min(s-this.posOut,i-r);n.set(e.subarray(this.posOut,this.posOut+c),r),this.posOut+=c,r+=c}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return(0,N.number)(n),this.xofInto(new Uint8Array(n))}digestInto(n){if((0,N.output)(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(n){const{blockLen:e,suffix:s,outputLen:r,rounds:i,enableXOF:c}=this;return n||(n=new M(e,s,r,c,i)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=i,n.suffix=s,n.outputLen=r,n.enableXOF=c,n.destroyed=this.destroyed,n}}y.Keccak=M;const B=(t,n,e)=>(0,T.wrapConstructor)(()=>new M(n,t,e));y.sha3_224=B(6,144,224/8);y.sha3_256=B(6,136,256/8);y.sha3_384=B(6,104,384/8);y.sha3_512=B(6,72,512/8);y.keccak_224=B(1,144,224/8);y.keccak_256=B(1,136,256/8);y.keccak_384=B(1,104,384/8);y.keccak_512=B(1,72,512/8);const Wt=(t,n,e)=>(0,T.wrapXOFConstructorWithOpts)((s={})=>new M(n,t,s.dkLen===void 0?e:s.dkLen,!0));y.shake128=Wt(31,168,128/8);y.shake256=Wt(31,136,256/8);const{sha3_512:Le}=y,jt=24,A=32,Q=(t=4,n=Math.random)=>{let e="";for(;e.length<t;)e=e+Math.floor(n()*36).toString(36);return e};function Dt(t){let n=8n,e=0n;for(const s of t.values()){const r=BigInt(s);e=(e<<n)+r}return e}const $t=(t="")=>Dt(Le(t)).toString(36).slice(1),st=Array.from({length:26},(t,n)=>String.fromCharCode(n+97)),ke=t=>st[Math.floor(t()*st.length)],Ft=({globalObj:t=typeof tt<"u"?tt:typeof window<"u"?window:{},random:n=Math.random}={})=>{const e=Object.keys(t).toString(),s=e.length?e+Q(A,n):Q(A,n);return $t(s).substring(0,A)},Gt=t=>()=>t++,ve=476782367,qt=({random:t=Math.random,counter:n=Gt(Math.floor(t()*ve)),length:e=jt,fingerprint:s=Ft({random:t})}={})=>function(){const i=ke(t),c=Date.now().toString(36),a=n().toString(36),h=Q(e,t),l=`${c+h+a+s}`;return`${i+$t(l).substring(1,e)}`},Ee=qt(),Se=(t,{minLength:n=2,maxLength:e=A}={})=>{const s=t.length,r=/^[0-9a-z]+$/;try{if(typeof t=="string"&&s>=n&&s<=e&&r.test(t))return!0}finally{}return!1};C.getConstants=()=>({defaultLength:jt,bigLength:A});C.init=qt;C.createId=Ee;C.bufToBigInt=Dt;C.createCounter=Gt;C.createFingerprint=Ft;C.isCuid=Se;const{createId:xe,init:Ke,getConstants:ze,isCuid:Je}=C;var Te=xe;(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
2
2
  PartySocket requires a global 'EventTarget' class to be available!
3
3
  You can polyfill this global by adding this to your code before any partysocket imports:
4
4
 
@@ -25,4 +25,4 @@ const partysocket = new PartySocket({
25
25
  * https://github.com/pladaria/reconnecting-websocket
26
26
  * License MIT
27
27
  */var Pe=t=>t[1]!==null&&t[1]!==void 0;function Ne(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let t=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let s=Math.random()*16;return t>0?(s=(t+s)%16|0,t=Math.floor(t/16)):(s=(n+s)%16|0,n=Math.floor(n/16)),(e==="x"?s:s&3|8).toString(16)})}function Vt(t,n,e={}){const{host:s,path:r,protocol:i,room:c,party:a,query:h}=t;let l=s.replace(/^(http|https|ws|wss):\/\//,"");if(l.endsWith("/")&&(l=l.slice(0,-1)),r&&r.startsWith("/"))throw new Error("path must not start with a slash");const b=a??"main",L=r?`/${r}`:"",E=i||(l.startsWith("localhost:")||l.startsWith("127.0.0.1:")||l.startsWith("192.168.")||l.startsWith("10.")||l.startsWith("172.")&&l.split(".")[1]>="16"&&l.split(".")[1]<="31"||l.startsWith("[::ffff:7f00:1]:")?n:n+"s"),m=`${E}://${l}/${a?`parties/${a}`:"party"}/${c}${L}`,P=(x={})=>`${m}?${new URLSearchParams([...Object.entries(e),...Object.entries(x).filter(Pe)])}`,O=typeof h=="function"?async()=>P(await h()):P(h);return{host:l,path:L,room:c,name:b,protocol:E,partyUrl:m,urlProvider:O}}var He=class extends Ue{constructor(n){const e=ot(n);super(e.urlProvider,e.protocols,e.socketOptions);f(this,"_pk");f(this,"_pkurl");f(this,"name");f(this,"room");f(this,"host");f(this,"path");this.partySocketOptions=n,this.setWSProperties(e)}updateProperties(n){const e=ot({...this.partySocketOptions,...n,host:n.host??this.host,room:n.room??this.room,path:n.path??this.path});this._url=e.urlProvider,this._protocols=e.protocols,this._options=e.socketOptions,this.setWSProperties(e)}setWSProperties(n){const{_pk:e,_pkurl:s,name:r,room:i,host:c,path:a}=n;this._pk=e,this._pkurl=s,this.name=r,this.room=i,this.host=c,this.path=a}reconnect(n,e){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(n,e)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(n,e){const s=Vt(n,"http"),r=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(n.fetch??fetch)(r,e)}};function ot(t){const{id:n,host:e,path:s,party:r,room:i,protocol:c,query:a,protocols:h,...l}=t,b=n||Ne(),L=Vt(t,"ws",{_pk:b});return{_pk:b,_pkurl:L.partyUrl,name:L.name,room:L.room,host:L.host,path:L.path,protocols:h,socketOptions:l,urlProvider:L.urlProvider}}var Ae=(t,n)=>{const e=S.useRef(n);e.current=n,S.useEffect(()=>{const s=a=>{var h,l;return(l=(h=e.current)==null?void 0:h.onOpen)==null?void 0:l.call(h,a)},r=a=>{var h,l;return(l=(h=e.current)==null?void 0:h.onMessage)==null?void 0:l.call(h,a)},i=a=>{var h,l;return(l=(h=e.current)==null?void 0:h.onClose)==null?void 0:l.call(h,a)},c=a=>{var h,l;return(l=(h=e.current)==null?void 0:h.onError)==null?void 0:l.call(h,a)};return t.addEventListener("open",s),t.addEventListener("close",i),t.addEventListener("error",c),t.addEventListener("message",r),()=>{t.removeEventListener("open",s),t.removeEventListener("close",i),t.removeEventListener("error",c),t.removeEventListener("message",r)}},[t])},Re=t=>[t.startClosed,t.minUptime,t.maxRetries,t.connectionTimeout,t.maxEnqueuedMessages,t.maxReconnectionDelay,t.minReconnectionDelay,t.reconnectionDelayGrowFactor,t.debug];function Me({options:t,createSocket:n,createSocketMemoKey:e}){const s=e(t),r=S.useMemo(()=>t,[s]),[i,c]=S.useState(()=>n({...r,startClosed:!0})),a=S.useRef(null),h=S.useRef(n);return h.current=n,S.useEffect(()=>{if(a.current===i){const l=h.current({...r,startClosed:!1});c(l)}else return!a.current&&r.startClosed!==!0&&i.reconnect(),a.current=i,()=>{i.close()}},[i,r]),i}function We(t){const{host:n,...e}=t,s=Me({options:{host:n||(typeof window<"u"?window.location.host:"dummy-domain.com"),...e},createSocket:r=>new He(r),createSocketMemoKey:r=>JSON.stringify([r.query,r.id,r.host,r.room,r.party,r.path,r.protocol,r.protocols,...Re(r)])});return Ae(s,t),s}const Kt=S.createContext(null);function je(){var n;const t=V("root");return((n=t==null?void 0:t.preferences)==null?void 0:n.presence)??null}function De(){const t=V("root");return(t==null?void 0:t.workshopTitle)??null}const $e=p.object({type:p.union([p.literal("problem"),p.literal("solution")]).optional(),exerciseNumber:p.coerce.number().finite(),stepNumber:p.coerce.number().finite().optional()});function Fe(t){const n=De(),e=ue(),s=je(),r=V("root"),[i,c]=S.useState((r==null?void 0:r.presence.users)??[]),[a]=S.useState(()=>{if(typeof document>"u")return null;if(t)return t.id;const O=sessionStorage.getItem("clientId");if(O)return O;const x=Te();return sessionStorage.setItem("clientId",x),x}),h=We({host:new URL(le).host,room:ct,onMessage(O){const x=he.safeParse(JSON.parse(String(O.data)));x.success&&x.data.type==="presence"&&c(x.data.payload.users)}}),l=$e.safeParse(e),b=l.success?l.data:null,L={workshopTitle:n,...b?{exercise:{type:b.type,exerciseNumber:b.exerciseNumber,stepNumber:b.stepNumber}}:null};let E=null;(!t||s!=null&&s.optOut)&&a?(t&&(E={type:"remove-user",payload:{id:t.id}}),E={type:"add-user",payload:{id:a,location:L}}):t&&(E={type:"add-user",payload:{id:t.id,name:t.name,avatarUrl:t.avatarUrl,location:L}});const m=E?JSON.stringify(E):null;return S.useEffect(()=>{m&&h.send(m)},[m,h]),{users:Ge(L,i)}}function Ge(t,n){return n.map(s=>{var c,a,h,l;let r=0;const i=4;return(t==null?void 0:t.workshopTitle)===((c=s.location)==null?void 0:c.workshopTitle)&&(r+=1,(a=t==null?void 0:t.exercise)!=null&&a.exerciseNumber&&t.exercise.exerciseNumber===((l=(h=s.location)==null?void 0:h.exercise)==null?void 0:l.exerciseNumber)&&(r+=1,t.exercise.stepNumber&&t.exercise.stepNumber===s.location.exercise.stepNumber&&(r+=1,t.exercise.type&&t.exercise.type===s.location.exercise.type&&(r+=1)))),{user:s,score:Math.floor(r/i*10)/10}}).sort((s,r)=>s.score===r.score?0:s.score>r.score?-1:1)}function Ye({user:t,children:n}){return ae.jsx(Kt.Provider,{value:Fe(t),children:n})}function Ze(){const t=S.useContext(Kt);if(!t)throw new Error("usePresence must be used within a PresenceProvider");return t}export{Ye as P,Ze as a,je as u};
28
- //# sourceMappingURL=presence-u-05JV3Z.js.map
28
+ //# sourceMappingURL=presence-BF7lWuVd.js.map