@afbin/cli 0.4.1 → 0.4.2

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 (468) hide show
  1. package/README.md +5 -0
  2. package/dist/afbin.mjs +33 -12
  3. package/dist/index.mjs +11 -1
  4. package/dist/runtime/dist/web/.vite/manifest.json +216 -216
  5. package/dist/runtime/dist/web/assets/{Account-CvOF6jpD.js → Account-qnxwLep7.js} +1 -1
  6. package/dist/runtime/dist/web/assets/Account-qnxwLep7.js.br +0 -0
  7. package/dist/runtime/dist/web/assets/Account-qnxwLep7.js.gz +0 -0
  8. package/dist/runtime/dist/web/assets/{ArtifactAddress-DORDne01.js → ArtifactAddress-1ftOG9A5.js} +2 -2
  9. package/dist/runtime/dist/web/assets/ArtifactAddress-1ftOG9A5.js.br +0 -0
  10. package/dist/runtime/dist/web/assets/ArtifactAddress-1ftOG9A5.js.gz +0 -0
  11. package/dist/runtime/dist/web/assets/{ArtifactData-BdL9R2dA.js → ArtifactData-CZq-MLWc.js} +1 -1
  12. package/dist/runtime/dist/web/assets/ArtifactData-CZq-MLWc.js.br +0 -0
  13. package/dist/runtime/dist/web/assets/ArtifactData-CZq-MLWc.js.gz +0 -0
  14. package/dist/runtime/dist/web/assets/{ArtifactEditor-BZXbOk_F.js → ArtifactEditor-Cd_-Z6DK.js} +1 -1
  15. package/dist/runtime/dist/web/assets/ArtifactEditor-Cd_-Z6DK.js.br +0 -0
  16. package/dist/runtime/dist/web/assets/ArtifactEditor-Cd_-Z6DK.js.gz +0 -0
  17. package/dist/runtime/dist/web/assets/{AssetPageHeader-DX2RcYTv.js → AssetPageHeader-BqdRtu9K.js} +1 -1
  18. package/dist/runtime/dist/web/assets/AssetPageHeader-BqdRtu9K.js.br +0 -0
  19. package/dist/runtime/dist/web/assets/AssetPageHeader-BqdRtu9K.js.gz +0 -0
  20. package/dist/runtime/dist/web/assets/{Assets-dgdXIgAW.js → Assets-D6htDZnu.js} +1 -1
  21. package/dist/runtime/dist/web/assets/Assets-D6htDZnu.js.br +0 -0
  22. package/dist/runtime/dist/web/assets/Assets-D6htDZnu.js.gz +0 -0
  23. package/dist/runtime/dist/web/assets/{AvatarCircle-MNnIhRvg.js → AvatarCircle-CBpOuCGy.js} +1 -1
  24. package/dist/runtime/dist/web/assets/AvatarCircle-CBpOuCGy.js.br +0 -0
  25. package/dist/runtime/dist/web/assets/AvatarCircle-CBpOuCGy.js.gz +0 -0
  26. package/dist/runtime/dist/web/assets/{Chat-V1ku1-60.js → Chat-DueKnMAf.js} +1 -1
  27. package/dist/runtime/dist/web/assets/Chat-DueKnMAf.js.br +0 -0
  28. package/dist/runtime/dist/web/assets/Chat-DueKnMAf.js.gz +0 -0
  29. package/dist/runtime/dist/web/assets/{ConfirmDialog-Ph1VDgNN.js → ConfirmDialog-hdkXS1mg.js} +1 -1
  30. package/dist/runtime/dist/web/assets/ConfirmDialog-hdkXS1mg.js.br +0 -0
  31. package/dist/runtime/dist/web/assets/ConfirmDialog-hdkXS1mg.js.gz +0 -0
  32. package/dist/runtime/dist/web/assets/{DatasetCatalogView-DBJEPKFI.js → DatasetCatalogView-DKNdjYA_.js} +1 -1
  33. package/dist/runtime/dist/web/assets/DatasetCatalogView-DKNdjYA_.js.br +0 -0
  34. package/dist/runtime/dist/web/assets/DatasetCatalogView-DKNdjYA_.js.gz +0 -0
  35. package/dist/runtime/dist/web/assets/{DatasetEditor-CMqN1duq.js → DatasetEditor-C22-4oJL.js} +1 -1
  36. package/dist/runtime/dist/web/assets/DatasetEditor-C22-4oJL.js.br +0 -0
  37. package/dist/runtime/dist/web/assets/DatasetEditor-C22-4oJL.js.gz +0 -0
  38. package/dist/runtime/dist/web/assets/{Docs-DVoW7b7v.js → Docs-B80IZLN8.js} +1 -1
  39. package/dist/runtime/dist/web/assets/Docs-B80IZLN8.js.br +0 -0
  40. package/dist/runtime/dist/web/assets/Docs-B80IZLN8.js.gz +0 -0
  41. package/dist/runtime/dist/web/assets/{Document-udhy5mlX.js → Document-C6-E9V3_.js} +4 -4
  42. package/dist/runtime/dist/web/assets/Document-C6-E9V3_.js.br +0 -0
  43. package/dist/runtime/dist/web/assets/Document-C6-E9V3_.js.gz +0 -0
  44. package/dist/runtime/dist/web/assets/{DocumentChrome-EUbW_JvA.js → DocumentChrome-Bw4_z5yQ.js} +1 -1
  45. package/dist/runtime/dist/web/assets/DocumentChrome-Bw4_z5yQ.js.br +0 -0
  46. package/dist/runtime/dist/web/assets/DocumentChrome-Bw4_z5yQ.js.gz +0 -0
  47. package/dist/runtime/dist/web/assets/{DocumentSharing-BuTXuflA.js → DocumentSharing-BiTakFtn.js} +1 -1
  48. package/dist/runtime/dist/web/assets/DocumentSharing-BiTakFtn.js.br +0 -0
  49. package/dist/runtime/dist/web/assets/DocumentSharing-BiTakFtn.js.gz +0 -0
  50. package/dist/runtime/dist/web/assets/{FileUpload-D6RTOrHD.js → FileUpload-B-da-wki.js} +1 -1
  51. package/dist/runtime/dist/web/assets/FileUpload-B-da-wki.js.br +0 -0
  52. package/dist/runtime/dist/web/assets/FileUpload-B-da-wki.js.gz +0 -0
  53. package/dist/runtime/dist/web/assets/{Folder-DoNsFB2I.js → Folder-B-OlCz39.js} +1 -1
  54. package/dist/runtime/dist/web/assets/Folder-B-OlCz39.js.br +0 -0
  55. package/dist/runtime/dist/web/assets/Folder-B-OlCz39.js.gz +0 -0
  56. package/dist/runtime/dist/web/assets/{ForkArtifact-DDmXl1BZ.js → ForkArtifact-DXYU1-qL.js} +1 -1
  57. package/dist/runtime/dist/web/assets/ForkArtifact-DXYU1-qL.js.br +0 -0
  58. package/dist/runtime/dist/web/assets/ForkArtifact-DXYU1-qL.js.gz +0 -0
  59. package/dist/runtime/dist/web/assets/{GetStarted-YjltMEeN.js → GetStarted-CFsSvXR0.js} +1 -1
  60. package/dist/runtime/dist/web/assets/GetStarted-CFsSvXR0.js.br +0 -0
  61. package/dist/runtime/dist/web/assets/GetStarted-CFsSvXR0.js.gz +0 -0
  62. package/dist/runtime/dist/web/assets/{Home-DijnltFZ.js → Home-BSO7YYXA.js} +1 -1
  63. package/dist/runtime/dist/web/assets/Home-BSO7YYXA.js.br +0 -0
  64. package/dist/runtime/dist/web/assets/Home-BSO7YYXA.js.gz +0 -0
  65. package/dist/runtime/dist/web/assets/{Login-DLwn4aUr.js → Login-CszZ8VGu.js} +1 -1
  66. package/dist/runtime/dist/web/assets/Login-CszZ8VGu.js.br +0 -0
  67. package/dist/runtime/dist/web/assets/Login-CszZ8VGu.js.gz +0 -0
  68. package/dist/runtime/dist/web/assets/{NotFound-svz4wCeL.js → NotFound-D2MOGkIO.js} +1 -1
  69. package/dist/runtime/dist/web/assets/NotFound-D2MOGkIO.js.br +0 -0
  70. package/dist/runtime/dist/web/assets/NotFound-D2MOGkIO.js.gz +0 -0
  71. package/dist/runtime/dist/web/assets/{Notifications-BGeJKv2W.js → Notifications-M7BiDhSo.js} +1 -1
  72. package/dist/runtime/dist/web/assets/Notifications-M7BiDhSo.js.br +0 -0
  73. package/dist/runtime/dist/web/assets/Notifications-M7BiDhSo.js.gz +0 -0
  74. package/dist/runtime/dist/web/assets/{Profile-B38GeCbR.js → Profile-DqV5PMEi.js} +2 -2
  75. package/dist/runtime/dist/web/assets/Profile-DqV5PMEi.js.br +0 -0
  76. package/dist/runtime/dist/web/assets/Profile-DqV5PMEi.js.gz +0 -0
  77. package/dist/runtime/dist/web/assets/{Program-D3-Gfvjo.js → Program-CdwfK2zE.js} +1 -1
  78. package/dist/runtime/dist/web/assets/Program-CdwfK2zE.js.br +0 -0
  79. package/dist/runtime/dist/web/assets/Program-CdwfK2zE.js.gz +0 -0
  80. package/dist/runtime/dist/web/assets/{RowMenu-J4Gbci3B.js → RowMenu-B2c9LyOb.js} +1 -1
  81. package/dist/runtime/dist/web/assets/RowMenu-B2c9LyOb.js.br +0 -0
  82. package/dist/runtime/dist/web/assets/RowMenu-B2c9LyOb.js.gz +0 -0
  83. package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js +1 -0
  84. package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js.br +0 -0
  85. package/dist/runtime/dist/web/assets/Schedules-D05tndQ1.js.gz +0 -0
  86. package/dist/runtime/dist/web/assets/{ScreenshotEditor-CUmN5F2q.js → ScreenshotEditor-B8g3LiBx.js} +1 -1
  87. package/dist/runtime/dist/web/assets/ScreenshotEditor-B8g3LiBx.js.br +0 -0
  88. package/dist/runtime/dist/web/assets/ScreenshotEditor-B8g3LiBx.js.gz +0 -0
  89. package/dist/runtime/dist/web/assets/{ShareLink-n8KhtnaI.js → ShareLink-qbYss_Eh.js} +1 -1
  90. package/dist/runtime/dist/web/assets/ShareLink-qbYss_Eh.js.br +0 -0
  91. package/dist/runtime/dist/web/assets/ShareLink-qbYss_Eh.js.gz +0 -0
  92. package/dist/runtime/dist/web/assets/{Shelf-BgwHOaeW.js → Shelf-anhc5No9.js} +1 -1
  93. package/dist/runtime/dist/web/assets/Shelf-anhc5No9.js.br +0 -0
  94. package/dist/runtime/dist/web/assets/Shelf-anhc5No9.js.gz +0 -0
  95. package/dist/runtime/dist/web/assets/{SocialPreviewEditor-DwHHRW29.js → SocialPreviewEditor-B4nUY6FA.js} +1 -1
  96. package/dist/runtime/dist/web/assets/SocialPreviewEditor-B4nUY6FA.js.br +0 -0
  97. package/dist/runtime/dist/web/assets/SocialPreviewEditor-B4nUY6FA.js.gz +0 -0
  98. package/dist/runtime/dist/web/assets/{Starter-I01MNooi.js → Starter-DrID859q.js} +1 -1
  99. package/dist/runtime/dist/web/assets/Starter-DrID859q.js.br +0 -0
  100. package/dist/runtime/dist/web/assets/Starter-DrID859q.js.gz +0 -0
  101. package/dist/runtime/dist/web/assets/{Trash-Cu0KXeW7.js → Trash-DoKID_ux.js} +1 -1
  102. package/dist/runtime/dist/web/assets/Trash-DoKID_ux.js.br +0 -0
  103. package/dist/runtime/dist/web/assets/Trash-DoKID_ux.js.gz +0 -0
  104. package/dist/runtime/dist/web/assets/{Welcome-B8iPt_Nh.js → Welcome-Ct29u9Y9.js} +1 -1
  105. package/dist/runtime/dist/web/assets/Welcome-Ct29u9Y9.js.br +0 -0
  106. package/dist/runtime/dist/web/assets/Welcome-Ct29u9Y9.js.gz +0 -0
  107. package/dist/runtime/dist/web/assets/{WorkspaceLayout-fF_ot7EK.js → WorkspaceLayout-Qf3x5yOM.js} +1 -1
  108. package/dist/runtime/dist/web/assets/WorkspaceLayout-Qf3x5yOM.js.br +0 -0
  109. package/dist/runtime/dist/web/assets/WorkspaceLayout-Qf3x5yOM.js.gz +0 -0
  110. package/dist/runtime/dist/web/assets/{browser-artifact-write-ZsGe-hXr.js → browser-artifact-write-CG72iseh.js} +1 -1
  111. package/dist/runtime/dist/web/assets/browser-artifact-write-CG72iseh.js.br +0 -0
  112. package/dist/runtime/dist/web/assets/browser-artifact-write-CG72iseh.js.gz +0 -0
  113. package/dist/runtime/dist/web/assets/{chevron-down-COGO5cmx.js → chevron-down-M1fHuk7u.js} +1 -1
  114. package/dist/runtime/dist/web/assets/{chevron-left-BJZiR3W-.js → chevron-left-NHmvDJpN.js} +1 -1
  115. package/dist/runtime/dist/web/assets/{copy-PNNAtmJH.js → copy-v5iTV3kk.js} +1 -1
  116. package/dist/runtime/dist/web/assets/copy-v5iTV3kk.js.br +0 -0
  117. package/dist/runtime/dist/web/assets/copy-v5iTV3kk.js.gz +0 -0
  118. package/dist/runtime/dist/web/assets/{database-CKOnpvwb.js → database-BbH2eTSj.js} +1 -1
  119. package/dist/runtime/dist/web/assets/database-BbH2eTSj.js.br +2 -0
  120. package/dist/runtime/dist/web/assets/database-BbH2eTSj.js.gz +0 -0
  121. package/dist/runtime/dist/web/assets/{document-update-client-DUF0zs2Z.js → document-update-client-td73lQ81.js} +1 -1
  122. package/dist/runtime/dist/web/assets/document-update-client-td73lQ81.js.br +0 -0
  123. package/dist/runtime/dist/web/assets/document-update-client-td73lQ81.js.gz +0 -0
  124. package/dist/runtime/dist/web/assets/{dom-mounter-64phOf1s.js → dom-mounter-BSxIt5bC.js} +1 -1
  125. package/dist/runtime/dist/web/assets/dom-mounter-BSxIt5bC.js.br +0 -0
  126. package/dist/runtime/dist/web/assets/dom-mounter-BSxIt5bC.js.gz +0 -0
  127. package/dist/runtime/dist/web/assets/{download-j-nqks7p.js → download-Dk3mxCBK.js} +1 -1
  128. package/dist/runtime/dist/web/assets/download-Dk3mxCBK.js.br +0 -0
  129. package/dist/runtime/dist/web/assets/download-Dk3mxCBK.js.gz +0 -0
  130. package/dist/runtime/dist/web/assets/{eye-BNpzRKAK.js → eye-DEiYMLrO.js} +1 -1
  131. package/dist/runtime/dist/web/assets/eye-DEiYMLrO.js.br +0 -0
  132. package/dist/runtime/dist/web/assets/eye-DEiYMLrO.js.gz +0 -0
  133. package/dist/runtime/dist/web/assets/{file-up-DH-HiKEX.js → file-up-GoLKOXxO.js} +1 -1
  134. package/dist/runtime/dist/web/assets/file-up-GoLKOXxO.js.br +1 -0
  135. package/dist/runtime/dist/web/assets/file-up-GoLKOXxO.js.gz +0 -0
  136. package/dist/runtime/dist/web/assets/{git-fork-PQOXxmWW.js → git-fork-CN41g1lF.js} +1 -1
  137. package/dist/runtime/dist/web/assets/git-fork-CN41g1lF.js.br +0 -0
  138. package/dist/runtime/dist/web/assets/git-fork-CN41g1lF.js.gz +0 -0
  139. package/dist/runtime/dist/web/assets/{http-C2exCIpl.js → http-DEdzW08u.js} +1 -1
  140. package/dist/runtime/dist/web/assets/http-DEdzW08u.js.br +0 -0
  141. package/dist/runtime/dist/web/assets/http-DEdzW08u.js.gz +0 -0
  142. package/dist/runtime/dist/web/assets/{list-Dj3WErnh.js → list-CA_o21oZ.js} +1 -1
  143. package/dist/runtime/dist/web/assets/list-CA_o21oZ.js.br +0 -0
  144. package/dist/runtime/dist/web/assets/list-CA_o21oZ.js.gz +0 -0
  145. package/dist/runtime/dist/web/assets/{loader-circle-BXxJOPx-.js → loader-circle-2p_rsu6P.js} +1 -1
  146. package/dist/runtime/dist/web/assets/{lock-B1nhk71f.js → lock-BRsIxNP2.js} +1 -1
  147. package/dist/runtime/dist/web/assets/lock-BRsIxNP2.js.br +0 -0
  148. package/dist/runtime/dist/web/assets/lock-BRsIxNP2.js.gz +0 -0
  149. package/dist/runtime/dist/web/assets/{person-mentions-BEjAedYZ.js → person-mentions-C7vQd7Vr.js} +1 -1
  150. package/dist/runtime/dist/web/assets/person-mentions-C7vQd7Vr.js.br +0 -0
  151. package/dist/runtime/dist/web/assets/person-mentions-C7vQd7Vr.js.gz +0 -0
  152. package/dist/runtime/dist/web/assets/{plus-BtWrAD8F.js → plus-BNzHjmEg.js} +1 -1
  153. package/dist/runtime/dist/web/assets/{rotate-ccw-CSJ78xUE.js → rotate-ccw-CIMUmeuJ.js} +1 -1
  154. package/dist/runtime/dist/web/assets/rotate-ccw-CIMUmeuJ.js.br +0 -0
  155. package/dist/runtime/dist/web/assets/rotate-ccw-CIMUmeuJ.js.gz +0 -0
  156. package/dist/runtime/dist/web/assets/{search-agWZofH1.js → search-CmIkt7xE.js} +1 -1
  157. package/dist/runtime/dist/web/assets/{session-D__Apnw9.js → session-BsshdoaV.js} +1 -1
  158. package/dist/runtime/dist/web/assets/session-BsshdoaV.js.br +0 -0
  159. package/dist/runtime/dist/web/assets/session-BsshdoaV.js.gz +0 -0
  160. package/dist/runtime/dist/web/assets/{shelf-CeaX4iBg.js → shelf-DUXW45ap.js} +1 -1
  161. package/dist/runtime/dist/web/assets/shelf-DUXW45ap.js.br +0 -0
  162. package/dist/runtime/dist/web/assets/shelf-DUXW45ap.js.gz +0 -0
  163. package/dist/runtime/dist/web/assets/{solid-app-BtmRR9Ax.js → solid-app-BNcsMwv4.js} +2 -2
  164. package/dist/runtime/dist/web/assets/solid-app-BNcsMwv4.js.br +0 -0
  165. package/dist/runtime/dist/web/assets/solid-app-BNcsMwv4.js.gz +0 -0
  166. package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css +2 -0
  167. package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css.br +0 -0
  168. package/dist/runtime/dist/web/assets/solid-app-DRAhiXqs.css.gz +0 -0
  169. package/dist/runtime/dist/web/assets/{undo-2-Di8QrlfX.js → undo-2--XbU60MY.js} +1 -1
  170. package/dist/runtime/dist/web/assets/undo-2--XbU60MY.js.br +0 -0
  171. package/dist/runtime/dist/web/assets/undo-2--XbU60MY.js.gz +0 -0
  172. package/dist/runtime/dist/web/assets/{users-BJrdLUkX.js → users-Bm0xpNrq.js} +1 -1
  173. package/dist/runtime/dist/web/assets/users-Bm0xpNrq.js.br +0 -0
  174. package/dist/runtime/dist/web/assets/users-Bm0xpNrq.js.gz +0 -0
  175. package/dist/runtime/dist/web/solid-app.html +2 -2
  176. package/dist/runtime/draft-compile-worker.mjs +10 -0
  177. package/dist/runtime/host.mjs +12 -2
  178. package/dist/runtime/lambda-page-runtime.js +1 -1
  179. package/dist/runtime/lib/build-assets/.server-reader-cache.json +1 -1
  180. package/dist/runtime/lib/build-assets/offline/.build-cache.json +10 -7
  181. package/dist/runtime/lib/build-assets/offline/manifest.json +4 -4
  182. package/dist/runtime/lib/build-assets/offline/solid.js.gz +0 -0
  183. package/dist/runtime/lib/build-assets/prepared-sources.sha256 +1 -1
  184. package/dist/runtime/pool-worker.mjs +3 -0
  185. package/dist/runtime/preview/{ScreenshotEditor-R3UODF65.js → ScreenshotEditor-LHC3JZSA.js} +1 -1
  186. package/dist/runtime/preview/{annotate-U27XXRZK.js → annotate-THM7GL72.js} +1 -1
  187. package/dist/runtime/preview/chrome.css +1 -1
  188. package/dist/runtime/preview/{chunk-7RMKAFBO.js → chunk-4O7LVK2Q.js} +1 -1
  189. package/dist/runtime/preview/chunk-7T3V6PAW.js +1 -0
  190. package/dist/runtime/preview/{chunk-3KKU74WM.js → chunk-RDT3C3F6.js} +1 -1
  191. package/dist/runtime/preview/client.js +13 -13
  192. package/dist/runtime/preview/connect.js +1 -0
  193. package/dist/runtime/preview/{dom-mounter-3OQN7G4J.js → dom-mounter-2URPGP2F.js} +1 -1
  194. package/dist/runtime/preview/{engine-I6R47UTB.js → engine-5UO3LPN5.js} +1 -1
  195. package/dist/runtime/preview/{selection-actions-426G2H4N.js → selection-actions-LBFPODLD.js} +1 -1
  196. package/dist/runtime/preview/{session-UFN5GQK2.js → session-A2Z3M7QD.js} +1 -1
  197. package/dist/runtime/preview/update-parts-ZLXTYSVY.js +1 -0
  198. package/dist/runtime/preview.mjs +74496 -74135
  199. package/dist/runtime/public/chat/install.ps1 +1 -1
  200. package/dist/runtime/public/chat/install.sh +1 -1
  201. package/dist/runtime/public/chat/release.json +1 -1
  202. package/dist/runtime/public/islands/{boot-74e9143aa374c62b.js → boot-281adc05179334e6.js} +1 -1
  203. package/dist/runtime/public/islands/boot-281adc05179334e6.js.br +0 -0
  204. package/dist/runtime/public/islands/boot-281adc05179334e6.js.gz +0 -0
  205. package/dist/runtime/public/islands/{chunk-51a4b62dc42f3594.js → chunk-1af2f1c5f3e99805.js} +1 -1
  206. package/dist/runtime/public/islands/chunk-1af2f1c5f3e99805.js.br +0 -0
  207. package/dist/runtime/public/islands/chunk-1af2f1c5f3e99805.js.gz +0 -0
  208. package/dist/runtime/public/islands/{chunk-f451297257164687.js → chunk-2f5d885a7394f865.js} +1 -1
  209. package/dist/runtime/public/islands/chunk-2f5d885a7394f865.js.br +0 -0
  210. package/dist/runtime/public/islands/{chunk-f451297257164687.js.gz → chunk-2f5d885a7394f865.js.gz} +0 -0
  211. package/dist/runtime/public/islands/{chunk-68a083200dbd5bf7.js → chunk-3cb86bf7badbd2c3.js} +1 -1
  212. package/dist/runtime/public/islands/chunk-3cb86bf7badbd2c3.js.br +0 -0
  213. package/dist/runtime/public/islands/chunk-3cb86bf7badbd2c3.js.gz +0 -0
  214. package/dist/runtime/public/islands/{chunk-adcd632c8be50ba7.js → chunk-5e05b99cb275660b.js} +1 -1
  215. package/dist/runtime/public/islands/chunk-5e05b99cb275660b.js.br +0 -0
  216. package/dist/runtime/public/islands/{chunk-adcd632c8be50ba7.js.gz → chunk-5e05b99cb275660b.js.gz} +0 -0
  217. package/dist/runtime/public/islands/{chunk-e817ee4addba2d95.js → chunk-d924d4620b11b893.js} +1 -1
  218. package/dist/runtime/public/islands/chunk-d924d4620b11b893.js.br +0 -0
  219. package/dist/runtime/public/islands/chunk-d924d4620b11b893.js.gz +0 -0
  220. package/dist/runtime/public/islands/{chunk-1fa28532f51beb9c.js → chunk-dfe07cc2b19c50cc.js} +1 -1
  221. package/dist/runtime/public/islands/{frame-editor-6b8a50886fff8604.js → frame-editor-66b0c0d98283e912.js} +1 -1
  222. package/dist/runtime/public/islands/frame-editor-66b0c0d98283e912.js.br +0 -0
  223. package/dist/runtime/public/islands/frame-editor-66b0c0d98283e912.js.gz +0 -0
  224. package/dist/runtime/public/islands/{frame-editor-chunk-87b0311faf57261c.js → frame-editor-chunk-091e41cba1670be1.js} +1 -1
  225. package/dist/runtime/public/islands/frame-editor-chunk-091e41cba1670be1.js.br +0 -0
  226. package/dist/runtime/public/islands/frame-editor-chunk-091e41cba1670be1.js.gz +0 -0
  227. package/dist/runtime/public/islands/{frame-editor-chunk-69c553d9c4562981.js → frame-editor-chunk-5ea52db3a6d93294.js} +1 -1
  228. package/dist/runtime/public/islands/frame-editor-chunk-5ea52db3a6d93294.js.br +2 -0
  229. package/dist/runtime/public/islands/frame-editor-chunk-5ea52db3a6d93294.js.gz +0 -0
  230. package/dist/runtime/public/islands/{frame-editor-chunk-c2b9018371100824.js → frame-editor-chunk-a6db6db210776f5c.js} +1 -1
  231. package/dist/runtime/public/islands/frame-editor-chunk-a6db6db210776f5c.js.br +0 -0
  232. package/dist/runtime/public/islands/frame-editor-chunk-a6db6db210776f5c.js.gz +0 -0
  233. package/dist/runtime/public/islands/{frame-editor-chunk-a13dce46b9b8401f.js → frame-editor-chunk-c9facbfeee3c9bed.js} +1 -1
  234. package/dist/runtime/public/islands/frame-editor-chunk-c9facbfeee3c9bed.js.br +0 -0
  235. package/dist/runtime/public/islands/frame-editor-chunk-c9facbfeee3c9bed.js.gz +0 -0
  236. package/dist/runtime/public/islands/{frame-editor-chunk-b06f17fc7dae17e8.js → frame-editor-chunk-d6c77179f72db0ab.js} +1 -1
  237. package/dist/runtime/public/islands/frame-editor-chunk-d6c77179f72db0ab.js.br +0 -0
  238. package/dist/runtime/public/islands/frame-editor-chunk-d6c77179f72db0ab.js.gz +0 -0
  239. package/dist/runtime/public/islands/{image-map-a9f95f7e8d0712c1.js → image-map-7419ab54ff59434a.js} +1 -1
  240. package/dist/runtime/public/islands/image-map-7419ab54ff59434a.js.br +0 -0
  241. package/dist/runtime/public/islands/image-map-7419ab54ff59434a.js.gz +0 -0
  242. package/dist/runtime/public/islands/{kit-basic-cbabcc4b41d6132a.js → kit-basic-c22b54dcd2ea6161.js} +1 -1
  243. package/dist/runtime/public/islands/kit-basic-c22b54dcd2ea6161.js.br +2 -0
  244. package/dist/runtime/public/islands/kit-basic-c22b54dcd2ea6161.js.gz +0 -0
  245. package/dist/runtime/public/islands/{kit-cells-cefbceccdfd0dbe0.js → kit-cells-55ade213f1751716.js} +1 -1
  246. package/dist/runtime/public/islands/kit-cells-55ade213f1751716.js.br +0 -0
  247. package/dist/runtime/public/islands/kit-cells-55ade213f1751716.js.gz +0 -0
  248. package/dist/runtime/public/islands/{kit-controls-81d17a10f9d457f2.js → kit-controls-4f1b98d7d87c4b21.js} +1 -1
  249. package/dist/runtime/public/islands/kit-controls-4f1b98d7d87c4b21.js.br +0 -0
  250. package/dist/runtime/public/islands/kit-controls-4f1b98d7d87c4b21.js.gz +0 -0
  251. package/dist/runtime/public/islands/{kit-data-43947f36f1c501aa.js → kit-data-e1012fd12092b177.js} +1 -1
  252. package/dist/runtime/public/islands/kit-data-e1012fd12092b177.js.br +0 -0
  253. package/dist/runtime/public/islands/kit-data-e1012fd12092b177.js.gz +0 -0
  254. package/dist/runtime/public/islands/{kit-dialog-eedc51ce82feec4b.js → kit-dialog-1e427336472b2906.js} +1 -1
  255. package/dist/runtime/public/islands/kit-dialog-1e427336472b2906.js.br +0 -0
  256. package/dist/runtime/public/islands/kit-dialog-1e427336472b2906.js.gz +0 -0
  257. package/dist/runtime/public/islands/{kit-embed-3c8886cbfa06f74d.js → kit-embed-c7019820c5200806.js} +1 -1
  258. package/dist/runtime/public/islands/kit-embed-c7019820c5200806.js.br +0 -0
  259. package/dist/runtime/public/islands/kit-embed-c7019820c5200806.js.gz +0 -0
  260. package/dist/runtime/public/islands/{kit-files-b7a2cb758f00a68b.js → kit-files-dc0b71ca71f2151c.js} +1 -1
  261. package/dist/runtime/public/islands/kit-files-dc0b71ca71f2151c.js.br +0 -0
  262. package/dist/runtime/public/islands/kit-files-dc0b71ca71f2151c.js.gz +0 -0
  263. package/dist/runtime/public/islands/{kit-image-126e12fcae4215c1.js → kit-image-b31acf4d31a4eeaf.js} +1 -1
  264. package/dist/runtime/public/islands/kit-image-b31acf4d31a4eeaf.js.br +0 -0
  265. package/dist/runtime/public/islands/kit-image-b31acf4d31a4eeaf.js.gz +0 -0
  266. package/dist/runtime/public/islands/{kit-people-5b6f5dd4aa82b657.js → kit-people-6feb1b730c5fd37f.js} +1 -1
  267. package/dist/runtime/public/islands/kit-people-6feb1b730c5fd37f.js.br +0 -0
  268. package/dist/runtime/public/islands/kit-people-6feb1b730c5fd37f.js.gz +0 -0
  269. package/dist/runtime/public/islands/{kit-static-28174bd8f593f8c0.js → kit-static-853aed2cd04c1b4a.js} +1 -1
  270. package/dist/runtime/public/islands/kit-static-853aed2cd04c1b4a.js.br +0 -0
  271. package/dist/runtime/public/islands/kit-static-853aed2cd04c1b4a.js.gz +0 -0
  272. package/dist/runtime/public/islands/manifest.json +211 -211
  273. package/dist/runtime/public/islands/manifest.json.br +0 -0
  274. package/dist/runtime/public/islands/manifest.json.gz +0 -0
  275. package/dist/runtime/public/islands/{morph-engine-4e664485be475dbf.js → morph-engine-c61693caf767d9bd.js} +1 -1
  276. package/dist/runtime/public/islands/morph-engine-c61693caf767d9bd.js.br +0 -0
  277. package/dist/runtime/public/islands/morph-engine-c61693caf767d9bd.js.gz +0 -0
  278. package/dist/runtime/public/islands/offline-ba3717e06bc69a4e.json.gzip +0 -0
  279. package/dist/runtime/public/islands/{page-5f87c34c7c181387.js → page-c3ae4acf0988c2b6.js} +1 -1
  280. package/dist/runtime/public/islands/page-c3ae4acf0988c2b6.js.br +0 -0
  281. package/dist/runtime/public/islands/page-c3ae4acf0988c2b6.js.gz +0 -0
  282. package/dist/runtime/public/islands/{rt-30ff0d94ee3732a1.js → rt-2ab0fed85481c574.js} +1 -1
  283. package/dist/runtime/public/islands/rt-2ab0fed85481c574.js.br +0 -0
  284. package/dist/runtime/public/islands/rt-2ab0fed85481c574.js.gz +0 -0
  285. package/dist/runtime/public/islands/{sqlite-engine-9fc56fea8b1e2aaf.js → sqlite-engine-f3956693df7cfa5c.js} +8 -8
  286. package/dist/runtime/public/islands/sqlite-engine-f3956693df7cfa5c.js.br +0 -0
  287. package/dist/runtime/public/islands/sqlite-engine-f3956693df7cfa5c.js.gz +0 -0
  288. package/dist/runtime/public/islands/{ssr-456cabbcb26f723d.js → ssr-ce6931fb7bda9b08.js} +3 -0
  289. package/dist/runtime/public/islands/ssr-ce6931fb7bda9b08.js.br +0 -0
  290. package/dist/runtime/public/islands/ssr-ce6931fb7bda9b08.js.gz +0 -0
  291. package/dist/runtime/public/islands/{url-sync-74b5212f7b3417d7.js → url-sync-b179b054c9d958a7.js} +1 -1
  292. package/dist/runtime/public/islands/url-sync-b179b054c9d958a7.js.br +0 -0
  293. package/dist/runtime/public/islands/url-sync-b179b054c9d958a7.js.gz +0 -0
  294. package/dist/share/man/man1/afbin.1 +6 -4
  295. package/dist/skills/artifactbin/references/commands.md +4 -2
  296. package/dist/skills/artifactbin/references/publishing.md +5 -3
  297. package/npm-shrinkwrap.json +2 -2
  298. package/package.json +1 -1
  299. package/dist/runtime/dist/web/assets/Account-CvOF6jpD.js.br +0 -0
  300. package/dist/runtime/dist/web/assets/Account-CvOF6jpD.js.gz +0 -0
  301. package/dist/runtime/dist/web/assets/ArtifactAddress-DORDne01.js.br +0 -0
  302. package/dist/runtime/dist/web/assets/ArtifactAddress-DORDne01.js.gz +0 -0
  303. package/dist/runtime/dist/web/assets/ArtifactData-BdL9R2dA.js.br +0 -0
  304. package/dist/runtime/dist/web/assets/ArtifactData-BdL9R2dA.js.gz +0 -0
  305. package/dist/runtime/dist/web/assets/ArtifactEditor-BZXbOk_F.js.br +0 -0
  306. package/dist/runtime/dist/web/assets/ArtifactEditor-BZXbOk_F.js.gz +0 -0
  307. package/dist/runtime/dist/web/assets/AssetPageHeader-DX2RcYTv.js.br +0 -0
  308. package/dist/runtime/dist/web/assets/AssetPageHeader-DX2RcYTv.js.gz +0 -0
  309. package/dist/runtime/dist/web/assets/Assets-dgdXIgAW.js.br +0 -0
  310. package/dist/runtime/dist/web/assets/Assets-dgdXIgAW.js.gz +0 -0
  311. package/dist/runtime/dist/web/assets/AvatarCircle-MNnIhRvg.js.br +0 -0
  312. package/dist/runtime/dist/web/assets/AvatarCircle-MNnIhRvg.js.gz +0 -0
  313. package/dist/runtime/dist/web/assets/Chat-V1ku1-60.js.br +0 -0
  314. package/dist/runtime/dist/web/assets/Chat-V1ku1-60.js.gz +0 -0
  315. package/dist/runtime/dist/web/assets/ConfirmDialog-Ph1VDgNN.js.br +0 -0
  316. package/dist/runtime/dist/web/assets/ConfirmDialog-Ph1VDgNN.js.gz +0 -0
  317. package/dist/runtime/dist/web/assets/DatasetCatalogView-DBJEPKFI.js.br +0 -0
  318. package/dist/runtime/dist/web/assets/DatasetCatalogView-DBJEPKFI.js.gz +0 -0
  319. package/dist/runtime/dist/web/assets/DatasetEditor-CMqN1duq.js.br +0 -0
  320. package/dist/runtime/dist/web/assets/DatasetEditor-CMqN1duq.js.gz +0 -0
  321. package/dist/runtime/dist/web/assets/Docs-DVoW7b7v.js.br +0 -0
  322. package/dist/runtime/dist/web/assets/Docs-DVoW7b7v.js.gz +0 -0
  323. package/dist/runtime/dist/web/assets/Document-udhy5mlX.js.br +0 -0
  324. package/dist/runtime/dist/web/assets/Document-udhy5mlX.js.gz +0 -0
  325. package/dist/runtime/dist/web/assets/DocumentChrome-EUbW_JvA.js.br +0 -0
  326. package/dist/runtime/dist/web/assets/DocumentChrome-EUbW_JvA.js.gz +0 -0
  327. package/dist/runtime/dist/web/assets/DocumentSharing-BuTXuflA.js.br +0 -0
  328. package/dist/runtime/dist/web/assets/DocumentSharing-BuTXuflA.js.gz +0 -0
  329. package/dist/runtime/dist/web/assets/FileUpload-D6RTOrHD.js.br +0 -0
  330. package/dist/runtime/dist/web/assets/FileUpload-D6RTOrHD.js.gz +0 -0
  331. package/dist/runtime/dist/web/assets/Folder-DoNsFB2I.js.br +0 -0
  332. package/dist/runtime/dist/web/assets/Folder-DoNsFB2I.js.gz +0 -0
  333. package/dist/runtime/dist/web/assets/ForkArtifact-DDmXl1BZ.js.br +0 -0
  334. package/dist/runtime/dist/web/assets/ForkArtifact-DDmXl1BZ.js.gz +0 -0
  335. package/dist/runtime/dist/web/assets/GetStarted-YjltMEeN.js.br +0 -0
  336. package/dist/runtime/dist/web/assets/GetStarted-YjltMEeN.js.gz +0 -0
  337. package/dist/runtime/dist/web/assets/Home-DijnltFZ.js.br +0 -0
  338. package/dist/runtime/dist/web/assets/Home-DijnltFZ.js.gz +0 -0
  339. package/dist/runtime/dist/web/assets/Login-DLwn4aUr.js.br +0 -0
  340. package/dist/runtime/dist/web/assets/Login-DLwn4aUr.js.gz +0 -0
  341. package/dist/runtime/dist/web/assets/NotFound-svz4wCeL.js.br +0 -0
  342. package/dist/runtime/dist/web/assets/NotFound-svz4wCeL.js.gz +0 -0
  343. package/dist/runtime/dist/web/assets/Notifications-BGeJKv2W.js.br +0 -0
  344. package/dist/runtime/dist/web/assets/Notifications-BGeJKv2W.js.gz +0 -0
  345. package/dist/runtime/dist/web/assets/Profile-B38GeCbR.js.br +0 -0
  346. package/dist/runtime/dist/web/assets/Profile-B38GeCbR.js.gz +0 -0
  347. package/dist/runtime/dist/web/assets/Program-D3-Gfvjo.js.br +0 -0
  348. package/dist/runtime/dist/web/assets/Program-D3-Gfvjo.js.gz +0 -0
  349. package/dist/runtime/dist/web/assets/RowMenu-J4Gbci3B.js.br +0 -0
  350. package/dist/runtime/dist/web/assets/RowMenu-J4Gbci3B.js.gz +0 -0
  351. package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js +0 -1
  352. package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js.br +0 -0
  353. package/dist/runtime/dist/web/assets/Schedules-DK3-YUvJ.js.gz +0 -0
  354. package/dist/runtime/dist/web/assets/ScreenshotEditor-CUmN5F2q.js.br +0 -0
  355. package/dist/runtime/dist/web/assets/ScreenshotEditor-CUmN5F2q.js.gz +0 -0
  356. package/dist/runtime/dist/web/assets/ShareLink-n8KhtnaI.js.br +0 -0
  357. package/dist/runtime/dist/web/assets/ShareLink-n8KhtnaI.js.gz +0 -0
  358. package/dist/runtime/dist/web/assets/Shelf-BgwHOaeW.js.br +0 -0
  359. package/dist/runtime/dist/web/assets/Shelf-BgwHOaeW.js.gz +0 -0
  360. package/dist/runtime/dist/web/assets/SocialPreviewEditor-DwHHRW29.js.br +0 -0
  361. package/dist/runtime/dist/web/assets/SocialPreviewEditor-DwHHRW29.js.gz +0 -0
  362. package/dist/runtime/dist/web/assets/Starter-I01MNooi.js.br +0 -0
  363. package/dist/runtime/dist/web/assets/Starter-I01MNooi.js.gz +0 -0
  364. package/dist/runtime/dist/web/assets/Trash-Cu0KXeW7.js.br +0 -0
  365. package/dist/runtime/dist/web/assets/Trash-Cu0KXeW7.js.gz +0 -0
  366. package/dist/runtime/dist/web/assets/Welcome-B8iPt_Nh.js.br +0 -0
  367. package/dist/runtime/dist/web/assets/Welcome-B8iPt_Nh.js.gz +0 -0
  368. package/dist/runtime/dist/web/assets/WorkspaceLayout-fF_ot7EK.js.br +0 -0
  369. package/dist/runtime/dist/web/assets/WorkspaceLayout-fF_ot7EK.js.gz +0 -0
  370. package/dist/runtime/dist/web/assets/browser-artifact-write-ZsGe-hXr.js.br +0 -0
  371. package/dist/runtime/dist/web/assets/browser-artifact-write-ZsGe-hXr.js.gz +0 -0
  372. package/dist/runtime/dist/web/assets/copy-PNNAtmJH.js.br +0 -0
  373. package/dist/runtime/dist/web/assets/copy-PNNAtmJH.js.gz +0 -0
  374. package/dist/runtime/dist/web/assets/database-CKOnpvwb.js.br +0 -3
  375. package/dist/runtime/dist/web/assets/database-CKOnpvwb.js.gz +0 -0
  376. package/dist/runtime/dist/web/assets/document-update-client-DUF0zs2Z.js.br +0 -0
  377. package/dist/runtime/dist/web/assets/document-update-client-DUF0zs2Z.js.gz +0 -0
  378. package/dist/runtime/dist/web/assets/dom-mounter-64phOf1s.js.br +0 -0
  379. package/dist/runtime/dist/web/assets/dom-mounter-64phOf1s.js.gz +0 -0
  380. package/dist/runtime/dist/web/assets/download-j-nqks7p.js.br +0 -0
  381. package/dist/runtime/dist/web/assets/download-j-nqks7p.js.gz +0 -0
  382. package/dist/runtime/dist/web/assets/eye-BNpzRKAK.js.br +0 -0
  383. package/dist/runtime/dist/web/assets/eye-BNpzRKAK.js.gz +0 -0
  384. package/dist/runtime/dist/web/assets/file-up-DH-HiKEX.js.br +0 -0
  385. package/dist/runtime/dist/web/assets/file-up-DH-HiKEX.js.gz +0 -0
  386. package/dist/runtime/dist/web/assets/git-fork-PQOXxmWW.js.br +0 -0
  387. package/dist/runtime/dist/web/assets/git-fork-PQOXxmWW.js.gz +0 -0
  388. package/dist/runtime/dist/web/assets/http-C2exCIpl.js.br +0 -0
  389. package/dist/runtime/dist/web/assets/http-C2exCIpl.js.gz +0 -0
  390. package/dist/runtime/dist/web/assets/list-Dj3WErnh.js.br +0 -0
  391. package/dist/runtime/dist/web/assets/list-Dj3WErnh.js.gz +0 -0
  392. package/dist/runtime/dist/web/assets/lock-B1nhk71f.js.br +0 -0
  393. package/dist/runtime/dist/web/assets/lock-B1nhk71f.js.gz +0 -0
  394. package/dist/runtime/dist/web/assets/person-mentions-BEjAedYZ.js.br +0 -0
  395. package/dist/runtime/dist/web/assets/person-mentions-BEjAedYZ.js.gz +0 -0
  396. package/dist/runtime/dist/web/assets/rotate-ccw-CSJ78xUE.js.br +0 -0
  397. package/dist/runtime/dist/web/assets/rotate-ccw-CSJ78xUE.js.gz +0 -0
  398. package/dist/runtime/dist/web/assets/session-D__Apnw9.js.br +0 -0
  399. package/dist/runtime/dist/web/assets/session-D__Apnw9.js.gz +0 -0
  400. package/dist/runtime/dist/web/assets/shelf-CeaX4iBg.js.br +0 -0
  401. package/dist/runtime/dist/web/assets/shelf-CeaX4iBg.js.gz +0 -0
  402. package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css +0 -2
  403. package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css.br +0 -0
  404. package/dist/runtime/dist/web/assets/solid-app-BmdFnFpX.css.gz +0 -0
  405. package/dist/runtime/dist/web/assets/solid-app-BtmRR9Ax.js.br +0 -0
  406. package/dist/runtime/dist/web/assets/solid-app-BtmRR9Ax.js.gz +0 -0
  407. package/dist/runtime/dist/web/assets/undo-2-Di8QrlfX.js.br +0 -0
  408. package/dist/runtime/dist/web/assets/undo-2-Di8QrlfX.js.gz +0 -0
  409. package/dist/runtime/dist/web/assets/users-BJrdLUkX.js.br +0 -0
  410. package/dist/runtime/dist/web/assets/users-BJrdLUkX.js.gz +0 -0
  411. package/dist/runtime/preview/update-parts-OJC3ZSRW.js +0 -1
  412. package/dist/runtime/public/islands/boot-74e9143aa374c62b.js.br +0 -0
  413. package/dist/runtime/public/islands/boot-74e9143aa374c62b.js.gz +0 -0
  414. package/dist/runtime/public/islands/chunk-51a4b62dc42f3594.js.br +0 -0
  415. package/dist/runtime/public/islands/chunk-51a4b62dc42f3594.js.gz +0 -0
  416. package/dist/runtime/public/islands/chunk-68a083200dbd5bf7.js.br +0 -0
  417. package/dist/runtime/public/islands/chunk-68a083200dbd5bf7.js.gz +0 -0
  418. package/dist/runtime/public/islands/chunk-adcd632c8be50ba7.js.br +0 -0
  419. package/dist/runtime/public/islands/chunk-e817ee4addba2d95.js.br +0 -0
  420. package/dist/runtime/public/islands/chunk-e817ee4addba2d95.js.gz +0 -0
  421. package/dist/runtime/public/islands/chunk-f451297257164687.js.br +0 -0
  422. package/dist/runtime/public/islands/frame-editor-6b8a50886fff8604.js.br +0 -0
  423. package/dist/runtime/public/islands/frame-editor-6b8a50886fff8604.js.gz +0 -0
  424. package/dist/runtime/public/islands/frame-editor-chunk-69c553d9c4562981.js.br +0 -1
  425. package/dist/runtime/public/islands/frame-editor-chunk-69c553d9c4562981.js.gz +0 -0
  426. package/dist/runtime/public/islands/frame-editor-chunk-87b0311faf57261c.js.br +0 -0
  427. package/dist/runtime/public/islands/frame-editor-chunk-87b0311faf57261c.js.gz +0 -0
  428. package/dist/runtime/public/islands/frame-editor-chunk-a13dce46b9b8401f.js.br +0 -0
  429. package/dist/runtime/public/islands/frame-editor-chunk-a13dce46b9b8401f.js.gz +0 -0
  430. package/dist/runtime/public/islands/frame-editor-chunk-b06f17fc7dae17e8.js.br +0 -0
  431. package/dist/runtime/public/islands/frame-editor-chunk-b06f17fc7dae17e8.js.gz +0 -0
  432. package/dist/runtime/public/islands/frame-editor-chunk-c2b9018371100824.js.br +0 -0
  433. package/dist/runtime/public/islands/frame-editor-chunk-c2b9018371100824.js.gz +0 -0
  434. package/dist/runtime/public/islands/image-map-a9f95f7e8d0712c1.js.br +0 -0
  435. package/dist/runtime/public/islands/image-map-a9f95f7e8d0712c1.js.gz +0 -0
  436. package/dist/runtime/public/islands/kit-basic-cbabcc4b41d6132a.js.br +0 -0
  437. package/dist/runtime/public/islands/kit-basic-cbabcc4b41d6132a.js.gz +0 -0
  438. package/dist/runtime/public/islands/kit-cells-cefbceccdfd0dbe0.js.br +0 -0
  439. package/dist/runtime/public/islands/kit-cells-cefbceccdfd0dbe0.js.gz +0 -0
  440. package/dist/runtime/public/islands/kit-controls-81d17a10f9d457f2.js.br +0 -0
  441. package/dist/runtime/public/islands/kit-controls-81d17a10f9d457f2.js.gz +0 -0
  442. package/dist/runtime/public/islands/kit-data-43947f36f1c501aa.js.br +0 -0
  443. package/dist/runtime/public/islands/kit-data-43947f36f1c501aa.js.gz +0 -0
  444. package/dist/runtime/public/islands/kit-dialog-eedc51ce82feec4b.js.br +0 -0
  445. package/dist/runtime/public/islands/kit-dialog-eedc51ce82feec4b.js.gz +0 -0
  446. package/dist/runtime/public/islands/kit-embed-3c8886cbfa06f74d.js.br +0 -0
  447. package/dist/runtime/public/islands/kit-embed-3c8886cbfa06f74d.js.gz +0 -0
  448. package/dist/runtime/public/islands/kit-files-b7a2cb758f00a68b.js.br +0 -0
  449. package/dist/runtime/public/islands/kit-files-b7a2cb758f00a68b.js.gz +0 -0
  450. package/dist/runtime/public/islands/kit-image-126e12fcae4215c1.js.br +0 -0
  451. package/dist/runtime/public/islands/kit-image-126e12fcae4215c1.js.gz +0 -0
  452. package/dist/runtime/public/islands/kit-people-5b6f5dd4aa82b657.js.br +0 -0
  453. package/dist/runtime/public/islands/kit-people-5b6f5dd4aa82b657.js.gz +0 -0
  454. package/dist/runtime/public/islands/kit-static-28174bd8f593f8c0.js.br +0 -0
  455. package/dist/runtime/public/islands/kit-static-28174bd8f593f8c0.js.gz +0 -0
  456. package/dist/runtime/public/islands/morph-engine-4e664485be475dbf.js.br +0 -0
  457. package/dist/runtime/public/islands/morph-engine-4e664485be475dbf.js.gz +0 -0
  458. package/dist/runtime/public/islands/offline-4446a94ed9f706c3.json.gzip +0 -0
  459. package/dist/runtime/public/islands/page-5f87c34c7c181387.js.br +0 -0
  460. package/dist/runtime/public/islands/page-5f87c34c7c181387.js.gz +0 -0
  461. package/dist/runtime/public/islands/rt-30ff0d94ee3732a1.js.br +0 -0
  462. package/dist/runtime/public/islands/rt-30ff0d94ee3732a1.js.gz +0 -0
  463. package/dist/runtime/public/islands/sqlite-engine-9fc56fea8b1e2aaf.js.br +0 -0
  464. package/dist/runtime/public/islands/sqlite-engine-9fc56fea8b1e2aaf.js.gz +0 -0
  465. package/dist/runtime/public/islands/ssr-456cabbcb26f723d.js.br +0 -0
  466. package/dist/runtime/public/islands/ssr-456cabbcb26f723d.js.gz +0 -0
  467. package/dist/runtime/public/islands/url-sync-74b5212f7b3417d7.js.br +0 -0
  468. package/dist/runtime/public/islands/url-sync-74b5212f7b3417d7.js.gz +0 -0
@@ -0,0 +1 @@
1
+ import{a as h,b as Y,c as z}from"./chunk-7T3V6PAW.js";import{A as f,B as V,J as l,b as p,c as y,j,q as u,w as E,z as A}from"./chunk-5JF7QI4S.js";import"./chunk-OOJM4CTU.js";var re=f("<p role=status>Working\u2026"),ie=f("<p role=alert>"),oe=f("<p>Your original file and unsaved edits remain available. Resolve the reported conflict, or import into a separate workspace to keep an independent copy."),le=f('<div class="mx-auto max-w-xl p-6 space-y-4"><h1 class="text-2xl font-semibold">Import an HTML file</h1><p>Choose an artifactbin .jsx.html file, or use Connect to server in your offline file.</p><p>Importing creates or reconciles a copy in this server\u2019s workspace. Your original HTML file stays unchanged. Nothing is published.</p><label class=block>HTML file <input aria-label="HTML file"type=file accept=.html>'),ae=f('<form class=space-y-4><p role=status>Ready to import \u201C<!>\u201D with <!> comment <!>.</p><label class=block>Workspace file <input aria-label="Workspace file"required></label><p>Existing files use the same conflict checks as CLI import. If both copies changed, the server retains both and reports the conflict.</p><button type=submit>Import and open');async function D(w,g){let _=await fetch(w,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(g)}),a=await _.json();if(!_.ok)throw Error([a.error,a.fix].filter(Boolean).join(" ")||"Import failed.");return a}function se(){let[w,g]=p(),[_,a]=p(),[I,L]=p(""),[N,s]=p(""),[c,b]=p(!1),i=new URLSearchParams(location.search).get("request"),m=window.opener,$,x=t=>{m&&m.postMessage(t,$==="null"||$===void 0?"*":$)},k=async t=>{if(!c()){b(!0),s(""),a(void 0),g(void 0);try{let e=await D(z,t);g(t),a(e),L(e.target)}catch(e){s(e instanceof Error?e.message:String(e))}finally{b(!1)}}},M=t=>{if(!m||t.source!==m||!i)return;let e=t.data;if(!(!e||e.channel!==h||e.requestId!==i||e.type!=="offer"||typeof e.html!="string"||typeof e.filename!="string")){if(new Blob([e.html]).size>26214400){s("The HTML file exceeds the 25 MB import limit.");return}$=t.origin,k({html:e.html,filename:e.filename})}};window.addEventListener("message",M),j(()=>window.removeEventListener("message",M)),m&&i&&x({channel:h,type:"ready",requestId:i});let J=async t=>{let e=t.currentTarget.files?.[0];if(e){if(e.size>26214400){s("The HTML file exceeds the 25 MB import limit.");return}await k({html:await e.text(),filename:e.name})}},X=async t=>{t.preventDefault();let e=w();if(!(!e||c())){b(!0),s("");try{let n=await D(Y,{...e,target:I()});if(!n.path.startsWith("/workspace/")||n.path.includes("\\")||n.path.includes("#")||n.path.includes("?"))throw Error("The server returned an invalid editor location.");i&&x({channel:h,type:"opened",requestId:i,path:n.path}),location.replace(n.path)}catch(n){let v=n instanceof Error?n.message:String(n);s(v),i&&x({channel:h,type:"error",requestId:i,message:v}),b(!1)}}};return(()=>{var t=le(),e=t.firstChild,n=e.nextSibling,v=n.nextSibling,F=v.nextSibling,G=F.firstChild,P=G.nextSibling;return P.addEventListener("change",o=>{J(o)}),l(t,u(E,{get when(){return c()},get children(){return re()}}),null),l(t,u(E,{get when(){return N()},get children(){return[(()=>{var o=ie();return l(o,N),o})(),oe()]}}),null),l(t,u(E,{get when(){return _()},children:o=>(()=>{var C=ae(),d=C.firstChild,K=d.firstChild,H=K.nextSibling,Q=H.nextSibling,O=Q.nextSibling,Z=O.nextSibling,R=Z.nextSibling,ce=R.nextSibling,W=d.nextSibling,ee=W.firstChild,S=ee.nextSibling,te=W.nextSibling,ne=te.nextSibling;return C.addEventListener("submit",r=>{X(r)}),l(d,()=>o().title??"Untitled",H),l(d,()=>o().comments,O),l(d,()=>o().comments===1?"thread":"threads",R),S.$$input=r=>L(r.currentTarget.value),y(r=>{var B=c(),q=c();return B!==r.e&&(S.disabled=r.e=B),q!==r.t&&(ne.disabled=r.t=q),r},{e:void 0,t:void 0}),y(()=>S.value=I()),C})()}),null),y(()=>P.disabled=c()),t})()}var T=document.getElementById("afbin-connect");T&&(T.replaceChildren(),A(()=>u(se,{}),T));V(["input"]);
@@ -1,4 +1,4 @@
1
- import{A as G,B as Ne,C as oe,E as de,G as Y,I as fe,J as W,b as K,c as ye,d as xe,e as le,g as ke,h as we,i as ce,j as ne,q,v as Ae,w as Me,z as ue}from"./chunk-5JF7QI4S.js";import{f as je,g as Je,h as Fe}from"./chunk-BXYW7J3T.js";import{b as De,c as Re,d as Te,e as Oe,q as He,r as ve,s as me}from"./chunk-RCXK2DBZ.js";import{a as ze}from"./chunk-SM7P2RYM.js";import{a as Be}from"./chunk-4DRMYA3D.js";import{a as Pe}from"./chunk-7AB63FHW.js";import{g as j}from"./chunk-QVSMXME5.js";import"./chunk-JABILGJZ.js";import"./chunk-7PMY7F6T.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var Ge=`
1
+ import{A as G,B as Ne,C as oe,E as de,G as Y,I as fe,J as W,b as K,c as ye,d as xe,e as le,g as ke,h as we,i as ce,j as ne,q,v as Ae,w as Me,z as ue}from"./chunk-5JF7QI4S.js";import{a as Pe}from"./chunk-7AB63FHW.js";import{f as je,g as Je,h as Fe}from"./chunk-BXYW7J3T.js";import{b as De,c as Re,d as Te,e as Oe,q as He,r as ve,s as me}from"./chunk-RCXK2DBZ.js";import{g as j}from"./chunk-QVSMXME5.js";import"./chunk-JABILGJZ.js";import{a as ze}from"./chunk-SM7P2RYM.js";import"./chunk-7PMY7F6T.js";import{a as Be}from"./chunk-4DRMYA3D.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var Ge=`
2
2
  .react-grid-layout { position: relative; }
3
3
  .mx-grid-grip { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; z-index: 4; border: 1px solid rgba(100,116,139,.3); border-radius: 50%; background: white; color: #64748b; cursor: grab; touch-action: none; opacity: 0; }
4
4
  .react-grid-item:hover > .mx-grid-grip, .react-grid-item:focus-within > .mx-grid-grip,
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-4DRMYA3D.js";import"./chunk-7RMKAFBO.js";import"./chunk-BYXBJQAS.js";import"./chunk-7AB63FHW.js";import"./chunk-JABILGJZ.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var Y="/islands",ne=`${Y}/d`;var Xe=600*1e3;var M="mx-story-data";var ve=e=>`/a/${encodeURIComponent(e)}/story`,Ce="surface";function re(e,n,t){let r=new URLSearchParams(n);return r.set(Ce,t),`${ve(e)}?${r.toString()}`}var $="data-mx-island-literals",oe="data-mx-module-data",_e=`<script type="application/json" ${$}=`,rt=`<script type="application/json" ${oe}>`,Ne="<\/script>",ot=new RegExp(`${_e}"[0-9a-f]{16}">[\\s\\S]*?${Ne.replace("/","\\/")}`,"g"),at=new RegExp(`<script type="application\\/json" ${oe}(?:="")?>`);var st=`const $moduleData = JSON.parse(document.getElementById("${M}").textContent).moduleData;
1
+ import"./chunk-4O7LVK2Q.js";import"./chunk-7T3V6PAW.js";import"./chunk-BYXBJQAS.js";import"./chunk-7AB63FHW.js";import"./chunk-JABILGJZ.js";import{a as S}from"./chunk-4DRMYA3D.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var Y="/islands",ne=`${Y}/d`;var Xe=600*1e3;var M="mx-story-data";var ve=e=>`/a/${encodeURIComponent(e)}/story`,Ce="surface";function re(e,n,t){let r=new URLSearchParams(n);return r.set(Ce,t),`${ve(e)}?${r.toString()}`}var $="data-mx-island-literals",oe="data-mx-module-data",_e=`<script type="application/json" ${$}=`,rt=`<script type="application/json" ${oe}>`,Ne="<\/script>",ot=new RegExp(`${_e}"[0-9a-f]{16}">[\\s\\S]*?${Ne.replace("/","\\/")}`,"g"),at=new RegExp(`<script type="application\\/json" ${oe}(?:="")?>`);var st=`const $moduleData = JSON.parse(document.getElementById("${M}").textContent).moduleData;
2
2
  `;function ae(e,n,t=Number.POSITIVE_INFINITY){if(e.length===0)return null;let r=null,o=null;for(let s of e)if(!(s.top>n||s.top+Math.max(s.height,1)<=n)){if(s.height>t){(!o||s.height<o.height)&&(o=s);continue}if(!r){r=s;continue}(s.height<r.height||s.height===r.height&&s.top>r.top)&&(r=s)}if(!r){let s=e.filter(d=>d.top>=n&&d.height<=t).sort((d,c)=>d.top-c.top)[0];return s?{path:s.path,fraction:0}:o?{path:o.path,fraction:j((n-o.top)/Math.max(o.height,1))}:{path:e.reduce((d,c)=>c.top>d.top?c:d).path,fraction:1}}let i=(n-r.top)/Math.max(r.height,1);return{path:r.path,fraction:j(i)}}function se(e,n){let t=e.find(r=>r.path===n.path);return t?Math.max(0,t.top+j(n.fraction)*Math.max(t.height,1)):null}var j=e=>Number.isFinite(e)?Math.min(1,Math.max(0,e)):0;function le(e){let n=e.defaultView?.scrollY??0,t=[];for(let r of e.querySelectorAll(`[${S}]`)){let o=r.getAttribute(S);if(!o)continue;let i=r.getBoundingClientRect();i.height===0&&i.width===0||t.push({path:o,top:i.top+n,height:i.height})}return t}function ie(e){return ae(le(e.document),e.scrollY,e.innerHeight)}function de(e,n){let t=se(le(e.document),n);return t===null?null:(e.scrollTo({top:t}),t)}var ce="mx:doc:";function Pe(e){let n=e.name;if(!n.startsWith(ce))return{};try{let t=JSON.parse(n.slice(ce.length));return t&&typeof t=="object"?t:{}}catch{return{}}}function ue(e){let n=Pe(e).mode;return n==="light"||n==="dark"?n:null}function pe(e,n,t){let r=n??t;!e||!r||(e.classList.toggle("dark",r==="dark"),e.classList.toggle("light",r!=="dark"))}var Oe=/^(\$|%24)/i;function me(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function Le(e){let n=e.replace(/^[?]/,"");if(!n)return[];let t=[];for(let r of n.split("&")){if(!r)continue;let o=r.indexOf("="),i=o<0?r:r.slice(0,o),s=o<0?"":r.slice(o+1),l=Oe.test(i),d=l?me(i):null;t.push({raw:r,ours:l,name:d&&d.startsWith("$")?d.slice(1):null,value:l?me(s):null})}return t}var ge=e=>new Map(e.values.flatMap(n=>n.kind==="scalar"&&n.type&&n.type!=="table"&&n.url!==!1?[[n.name,{name:n.name,type:n.type,default:n.default??null}]]:[]));function ke(e,n){let t={};for(let r of ge(e).values()){if(!Object.prototype.hasOwnProperty.call(n,r.name)){t[r.name]=null;continue}let o=n[r.name];if(Object.is(o,r.default)){t[r.name]=null;continue}if(o===null){t[r.name]="";continue}if(typeof o=="object"){t[r.name]=null;continue}t[r.name]=String(o)}return t}var fe=e=>encodeURIComponent(e).replace(/%24/g,"$");function he(e,n,t){let r=Le(e).filter(l=>!l.ours).map(l=>l.raw),o=ke(n,t),i=[];for(let l of ge(n).values()){let d=o[l.name];d!=null&&i.push(`${fe(`$${l.name}`)}=${fe(d)}`)}let s=[...r,...i].join("&");return s?`?${s}`:""}var _="__mxIslands",L="[data-mx-inline-story]",ye="data-mx-live-id",N="data-mx-live-edit";var Se=/^[\w-]+$/;var x="data-hk",Ue=["data-mx-tw","data-mx-story-css","data-mx-font-vars","data-mx-author"],He=6,$e=250;function Ae(e,n){if(!e||!n)return e===n;let t=r=>JSON.stringify({...r,queries:r.queries.map(({start:o,end:i,...s})=>s),mutations:r.mutations.map(({start:o,end:i,...s})=>s)});return t(e)===t(n)}var J=class extends Error{},v=e=>new J(e),X=e=>import(e);async function xt(e,n={}){let t=e.document,r=t.querySelector(L),o=t.body?.getAttribute(ye);if(!r||!o)throw v("the page has no live story");let i=n.surface??(e.origin==="null"?"raw":"app"),s=r[_],l=s?.morph??null;if(s&&s.mode()!=="read")throw v("the document is being edited");let d=s?.store??null,c=d?he(e.location.search,d.flow,d.getState().values):e.location.search,p=await qe(e,re(o,c,i),n.fetch??e.fetch.bind(e),i),u=p.querySelector(L);if(!u)throw v("the fragment carries no story");let a=p.body.getAttribute(N);if(a&&a===t.body.getAttribute(N))return;let g=W(t),h=W(p);if(g&&h&&V(t)!==V(p))throw v("the island build changed under the page");let I=n.importModule??X,A=h?new URL(h,t.baseURI).href:null,b=null;if(l&&A&&h!==g){let f=p.querySelector(`script[${$}]`),R=f?t.importNode(f,!0):null;R&&t.body.append(R);try{b=await De(l,A,I)}finally{R?.remove()}if(b.FLOW&&!d)throw v("the new version declares data the running islands have no store for")}let E=l?P(r,[...l.islands.keys()]):new Map,m=new Map;if(l&&h&&h===g)for(let f of l.islands.keys())E.has(f)&&m.set(f,f);else if(l&&b){let f=new Map;for(let[T,w]of E){let O=w[0].id;O&&f.set(O,T)}let R=P(u,b.ISLANDS.map(([T])=>T));for(let[T,,w]of b.ISLANDS){let O=R.get(T)?.[0]?.id,H=O?f.get(O):void 0;w&&H&&l.islands.get(H)?.[0]===w&&![...m.values()].includes(H)&&m.set(T,H)}}if(l){let f=new Set(m.values());for(let[R,[,T]]of[...l.islands])f.has(R)||(l.islands.delete(R),T())}let y=We(r,e),D=y?null:ie(e),k=D?Re(r,D.path):null,C=r.querySelector(".mx-rail")||u.querySelector(".mx-rail"),Z=r.querySelector('.mx-rail-row[aria-current="true"]'),we=Z?[...r.querySelectorAll(".mx-doc [data-mx-slide]")][[...r.querySelectorAll(".mx-rail-row")].indexOf(Z)]?.id:null,U=t.activeElement instanceof HTMLElement&&r.contains(t.activeElement)?t.activeElement:null;l&&be(t)&&await l.restartAuthor(null);let ee=n.mode?.()??ue(e);z(r,u,ee),B(r,u,{keep:m,oldUnits:E,used:new Set,kept:new Set([...m.values()].filter(f=>f!=="d-").flatMap(f=>E.get(f)??[])),preserveCharts:!!h&&h===g}),Me(t,p,{adopted:!!n.adopted,override:ee});let K=p.getElementById(M);if(K){let f=t.getElementById(M);f?f.textContent=K.textContent:t.body.append(t.importNode(K,!0))}if(a&&t.body.setAttribute(N,a),l){let f=new Map(l.islands);l.islands.clear();for(let[R,T]of m){let w=f.get(T);w&&l.islands.set(R,w)}if(b){b.FLOW&&d&&!Ae(b.FLOW,d.flow)&&d.replaceFlow({flow:b.FLOW});for(let R of b.ISLANDS)m.has(R[0])||l.hydrate(R)}}else A&&await I(A);Ie(t,p);let te=be(p);if(l&&te&&await l.restartAuthor(te),C&&t.dispatchEvent(new CustomEvent("mx:deck-morphed",{detail:{slideId:we}})),U&&!U.isConnected&&U.id&&t.getElementById(U.id)?.focus({preventScroll:!0}),y){let f=t.getElementById(y.id)?.getBoundingClientRect().top;f!==void 0&&Math.abs(f-y.top)>1&&e.scrollBy({top:f-y.top})}else if(D&&k!==null){let f=Re(r,D.path);f!==null&&Math.abs(f-k)>1&&de(e,D)}}async function qe(e,n,t,r){for(let o=0;;o++){let i=r==="raw"&&e.origin==="null"&&new URL(n,e.document.baseURI).searchParams.has("key"),s=await t(n,{credentials:i?"omit":"same-origin",cache:"no-store"});if(s.status===409&&o<He){await new Promise(l=>e.setTimeout(l,$e*(o+1)));continue}if(!s.ok)throw v(`the story fragment answered ${s.status}`);return new DOMParser().parseFromString(await s.text(),"text/html")}}function We(e,n){let r=[...e.querySelectorAll(`[id][${S}]`)].filter(o=>{let i=o.getBoundingClientRect();return i.height>0&&i.height<=n.innerHeight&&i.bottom>0&&i.top<n.innerHeight}).sort((o,i)=>o.getBoundingClientRect().top-i.getBoundingClientRect().top)[0];return r?{id:r.id,top:r.getBoundingClientRect().top}:null}function be(e){try{let n=JSON.parse(e.getElementById(M)?.textContent||"null");return typeof n?.authorScript=="string"&&n.authorScript?n.authorScript:null}catch{return null}}var q=e=>[...e.querySelectorAll('script[type="module"][src]')].find(n=>n.getAttribute("src").startsWith(`${ne}/`))??null,W=e=>q(e)?.getAttribute("src")??null,Mt=W,G=e=>[...e.querySelectorAll('link[rel="modulepreload"][href]')].find(n=>n.getAttribute("href").startsWith(`${Y}/boot-`))??null,V=e=>G(e)?.getAttribute("href")??null;function Ie(e,n){let t=(r,o,i)=>{if(!o){r?.remove();return}if(r?.isEqualNode(o))return;let s=e.importNode(o,!0);r?r.replaceWith(s):i.append(s)};t(q(e),q(n),e.body),t(G(e),G(n),e.head)}async function De(e,n,t){let r=null;e.take=s=>{r=s,e.modules.set(s.ISLANDS,s),s.TREE&&e.trees.set(s.TREE,s)};let o;try{o=await t(n)}finally{delete e.take}let i=r??(o?.ISLANDS?e.modules.get(o.ISLANDS):o?.TREE?e.trees.get(o.TREE):void 0);if(!i)throw v("the new version's module did not hand in its islands");return i}function F(e){if(e.nodeType!==1)return null;let n=e.getAttribute(x),t=n?n.indexOf("-"):-1,r=t>0?n.slice(0,t+1):null;return r==="d-"?null:r}function P(e,n){let t=new Map;for(let r of n){if(!Se.test(r))continue;let o=`[${x}^="${r}"]`,i=[...e.querySelectorAll(o)].filter(s=>!s.parentElement?.closest(o));i.length&&t.set(r,i)}return t}function Ve(e,n,t){for(let r of[e,...e.querySelectorAll(`[${x}^="${n}"]`)]){let o=r.getAttribute(x);o?.startsWith(n)&&r.setAttribute(x,t+o.slice(n.length))}}var Fe="data-mx-edit-region";function Be(e,n,t){let r=e.moveBefore;if(typeof r=="function"&&n.isConnected&&e.isConnected)try{r.call(e,n,t);return}catch{}e.insertBefore(n,t)}function B(e,n,t){let r=e.ownerDocument,o=[...e.childNodes],i=new Map,s=new Map;for(let a of o)a.nodeType===1&&(!F(a)||t.stableElementIds?.has(a.id))&&a.id&&i.set(a.id,a);for(let a of o)if(a.nodeType===1){let g=a.getAttribute(S);g&&t.stableOldPaths?.has(g)&&s.set(g,a)}let l=a=>{let g=a?t.stableElementPaths?.get(a):void 0;return g===void 0?void 0:s.get(g)},d=e.firstChild,c=a=>{if(t.used.add(a),a===d){d=d.nextSibling;return}Be(e,a,d)},p=new Set,u=new Set;for(let a of n.childNodes)a.nodeType===1&&a.id&&u.add(a.id);for(let a of[...n.childNodes]){let g=t.editRegions?.size&&a.nodeType===1?t.editRegions.get(a.getAttribute(Fe)??""):void 0;if(g){c(g);continue}let h=F(a);if(h){let m=t.keep.get(h);if(m===void 0){let y=a.id,D=y&&t.stableElementIds?.has(y)?i.get(y):void 0,k=l(a.getAttribute(S)),C=D??k;C&&Q(C,a)?(Ee(C,a),c(C)):c(r.importNode(a,!0));continue}if(p.has(h))continue;p.add(h);for(let y of t.oldUnits.get(m)??[])h!==m&&Ve(y,m,h),c(y);continue}let I=a.nodeType===1&&a.id?i.get(a.id):void 0,A=a.nodeType===1?a.getAttribute(S):null,b=l(A),E=I&&!t.used.has(I)?I:b&&!t.used.has(b)?b:Ge(d,a,t,u);if(E&&!t.used.has(E)&&Q(E,a)){if(E.nodeType===1){let m=E,y=a,D=t.preserveCharts&&m.getAttribute("aria-label")==="Question embed"&&y.getAttribute("aria-label")==="Question embed"&&m.getAttribute(S)===y.getAttribute(S);!D&&!t.stableElementIds?.has(m.id)&&!(A&&t.stableElementPaths?.has(A))?m.isEqualNode(y)||(z(m,y,null),B(m,y,t)):D||Ee(m,y)}else E.nodeValue!==a.nodeValue&&(E.nodeValue=a.nodeValue);c(E);continue}c(Je(r,a,t))}for(let a of o)!t.used.has(a)&&!t.kept.has(a)&&a.parentNode===e&&e.removeChild(a)}function Ee(e,n){for(let t of[x,S]){let r=[e,...e.querySelectorAll(`[${t}]`)].filter(i=>i.hasAttribute(t)),o=[n,...n.querySelectorAll(`[${t}]`)].filter(i=>i.hasAttribute(t));r.length===o.length&&r.forEach((i,s)=>{let l=o[s].getAttribute(t);i.getAttribute(t)!==l&&i.setAttribute(t,l)})}}var Ke=e=>"get"in e?e:new Map([...e].map(n=>[n,n])),Te=e=>"get"in e?new Set(e.values()):e,xe=e=>"get"in e?new Set(e.keys()):e;function Ye(e,n,t,r=new Set,o=new Map){let i=u=>[...new Set([...u.querySelectorAll(`[${x}]`)].map(F).filter(a=>!!a))],s=P(e,i(e)),l=P(n,i(n)),d=new Map([...s].map(([u,a])=>[a[0]?.id,u])),c=new Map;for(let[u,a]of l){let g=a[0]?.id,h=g&&t.has(g)?d.get(g):void 0;h&&![...c.values()].includes(h)&&c.set(u,h)}let p=new Set([...[...c.values()].flatMap(u=>s.get(u)??[]),...o.values()]);z(e,n,null),B(e,n,{keep:c,oldUnits:s,used:new Set,kept:p,stableElementIds:t,stableElementPaths:Ke(r),stableOldPaths:Te(r),editRegions:o})}function wt(e,n,t){if(!t.querySelector(L))return"the fragment carries no story";if(!W(t))return null;if(!e[_])return"the version has islands and the page runs none";let r=V(n),o=V(t);return r&&o&&r!==o?"the island build changed under the page":null}function vt(e,n){Me(e,n,{adopted:!0,override:null});let t=n.getElementById(M);if(t){let o=e.getElementById(M);o?o.textContent=t.textContent:e.body.append(e.importNode(t,!0))}let r=n.body.getAttribute(N);r&&e.body.setAttribute(N,r),Ie(e,n)}function Ct(e,n,t){let r=[...e.querySelectorAll(`[${x}^="d-"]`)],o=r[0];if(!o||!r.every(l=>o.contains(l)))return!1;let i=xe(t),s=r.filter(l=>l!==o&&l.hasAttribute(S)&&(n.has(l.id)||i.has(l.getAttribute(S))));return r.every(l=>l===o||s.some(d=>d.contains(l)))}function _t(e,n,t,r=!1){let i=e[_]?.morph;if(!i)return;let s=Te(t);for(let[l,[,d]]of[...i.islands]){let c=P(e,[l]).get(l)?.[0];l!=="d-"&&c&&(n.has(c.id)||s.has(c.getAttribute(S)??""))||l==="d-"&&r||(i.islands.delete(l),d())}}async function je(e,n,t,r=X){let i=n[_]?.morph,s=q(t);if(!i||!s)return null;let l=new URL(s.getAttribute("src"),e.document.baseURI).href,d=t.querySelector(`script[${$}]`),c=d?e.document.importNode(d,!0):null;c&&e.document.body.append(c);try{return await De(i,l,r)}finally{c?.remove()}}async function Nt(e,n,t,r,o,i=X,s,l=new Map,d=!1){let c=n[_],p=c?.morph;if(!p)return;let u=s!==void 0?s:await je(e,n,t,i);if(!u)return;let a=xe(o);u.FLOW&&c.store&&!Ae(u.FLOW,c.store.flow)&&c.store.replaceFlow({flow:u.FLOW});for(let g of u.ISLANDS){let h=P(n,[g[0]]).get(g[0])?.[0];if(!(!h||g[0]!=="d-"&&(r.has(h.id)||a.has(h.getAttribute(S)??"")))&&!(g[0]==="d-"&&d&&p.islands.has("d-"))&&(p.hydrate(g),g[0]==="d-"&&c.mode?.()==="edit")){let I=t.querySelector(L);if(!I)continue;let A=I.querySelectorAll(`[${S}][${x}]`),b=new Set([...r,...[...A].map(m=>m.id).filter(Boolean)]),E=new Set([...a,...[...A].map(m=>m.getAttribute(S)).filter(m=>!!m)]);Ye(n,I,b,E,l)}}}function Je(e,n,t){if(n.nodeType!==1)return e.importNode(n,!1);let r=e.importNode(n,!1);return B(r,n,t),r}function Ge(e,n,t,r){for(let o=e;o;o=o.nextSibling)if(!(t.used.has(o)||t.kept.has(o)||F(o))&&!(o.nodeType===1&&o.id&&r.has(o.id))&&Q(o,n))return o;return null}var Q=(e,n)=>e.nodeType===n.nodeType&&(e.nodeType!==1||e.tagName===n.tagName);function z(e,n,t){for(let r of[...e.attributes])n.hasAttributeNS(r.namespaceURI,r.localName)||e.removeAttributeNS(r.namespaceURI,r.localName);for(let r of[...n.attributes]){let o=r.value;t&&r.name==="class"&&e.hasAttribute("data-mx-inline-story")&&(o=Qe(o,t)),e.getAttributeNS(r.namespaceURI,r.localName)!==o&&e.setAttributeNS(r.namespaceURI,r.name,o)}}var Qe=(e,n)=>[...e.split(/\s+/).filter(t=>t&&t!=="light"&&t!=="dark"),n].join(" ");function Me(e,n,{adopted:t,override:r}){let o=p=>[...p.attributes].find(u=>u.name.startsWith("data-mx-"))?.name??null,i=new Map;for(let p of n.head.querySelectorAll("style")){let u=o(p);u&&i.set(u,p.textContent??"")}let s=new Set;for(let p of[...e.head.querySelectorAll("style")]){let u=o(p);if(!u)continue;s.add(u);let a=i.get(u);if(a===void 0){Ue.includes(u)&&p.remove();continue}p.textContent!==a&&(p.textContent=a)}for(let[p,u]of i){if(s.has(p))continue;let a=e.createElement("style");a.setAttribute(p,""),a.textContent=u,e.head.append(a)}if(t)return;let l=n.querySelector("title")?.textContent;l&&e.title!==l&&(e.title=l);let d=e.documentElement,c=n.documentElement.getAttribute("data-theme");c?d.setAttribute("data-theme",c):d.removeAttribute("data-theme"),pe(d,r,n.documentElement.classList.contains("dark")?"dark":"light")}function Re(e,n){let t=[...e.querySelectorAll(`[${S}]`)].find(r=>r.getAttribute(S)===n);return t?t.getBoundingClientRect().top:null}export{J as MorphRefused,vt as adoptVersionRecord,_t as disposeChangedDraftIslands,Ct as draftTreeKept,Nt as hydrateDraftIslands,je as loadDraftModule,Ye as morphDraftDom,xt as morphStory,wt as readRestoreBlocker,Ae as sameDataflow,Mt as versionModuleUrl};
@@ -1 +1 @@
1
- "use client";import{a as B}from"./chunk-64ZOQAGM.js";import{c as N,k as F,l as $,m as D,t as le,u as ae}from"./chunk-GJT2B5DK.js";import"./chunk-SM7P2RYM.js";import{a as M}from"./chunk-4DRMYA3D.js";import"./chunk-7PMY7F6T.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var ce="data-mx-selection-actions",me="mx-selection-action--coarse",U="data-mx-selection-action",pe="data-mx-selection-actions-css",fe=200,Ee=B.actionsCss,he=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]),ge=n=>he.has(n.key)||n.key==="Shift"||(n.key==="a"||n.key==="A")&&(n.ctrlKey||n.metaKey),Y=n=>n.matchMedia?.("(pointer: coarse)")?.matches===!0;function Le({win:n,onAction:de,root:h,portal:X}){let o=n.document,g=[],m={type:"mx:selection-actions",edit:!1,annotate:!1},E=null,I=null,r=null,S=!1,W=!1,O=o.createElement("style");O.setAttribute(pe,""),O.textContent=Ee,(X??o.head).appendChild(O);let A=0,J=()=>{A&&(n.clearTimeout(A),A=0)},a=()=>{J(),S=!1,E=null,I=null,r&&(r.hidden=!0)},w=e=>{let t=o.createElement("button");t.type="button",t.setAttribute(U,e),t.setAttribute("aria-label",e==="select"?"Select":e==="edit"?"Edit selected text":"Comment on selected text"),Y(n)&&t.classList.add(me);let i=o.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("fill","none"),i.setAttribute("stroke","currentColor"),i.setAttribute("stroke-width","2"),i.setAttribute("stroke-linecap","round"),i.setAttribute("stroke-linejoin","round"),i.setAttribute("aria-hidden","true"),i.setAttribute("class",`lucide lucide-${e==="select"?"square-dashed-mouse-pointer":e==="edit"?"pencil":"message-square"}`);let c=B.icons[e];for(let u of c){let d=o.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("d",u),i.appendChild(d)}return t.append(i,o.createTextNode(e==="select"?"Select":e==="edit"?"edit":"comment")),t},j=(e=!1)=>(r||(r=o.createElement("div"),r.setAttribute(ce,""),r.setAttribute("role","toolbar"),r.hidden=!0,r.addEventListener("pointerdown",t=>t.preventDefault()),r.addEventListener("click",t=>{let c=t.target?.closest(`[${U}]`)?.getAttribute(U);if(!E||c!=="edit"&&c!=="annotate"&&c!=="select")return;t.preventDefault(),t.stopPropagation();let u=(c==="annotate"?I:null)??E;a(),c==="select"&&n.getSelection()?.removeAllRanges(),de(c,u)}),(X??o.body).appendChild(r)),r.setAttribute("aria-label",e?"Document actions":"Text selection actions"),r.replaceChildren(),m.edit&&!D(E?.range)&&r.appendChild(w("edit")),m.annotate&&!e&&r.appendChild(w("annotate")),m.annotate&&r.appendChild(w("select")),r),z=(e,t)=>Math.max(8,Math.min(e,n.innerHeight-8-t)),b=()=>{if(S)return;if(!m.edit&&!m.annotate){a();return}let e=n.getSelection();if(!e||e.isCollapsed||e.rangeCount===0||!e.toString().trim()){a();return}let t=e.getRangeAt(0);if(h){if(!h.contains(t.startContainer)){a();return}if(!h.contains(t.endContainer)){let s=o.createRange();s.selectNodeContents(h);let l=t.cloneRange();if(l.setEnd(s.endContainer,s.endOffset),l.collapsed||l.toString()!==t.toString()){a();return}t=l}}let i=s=>(s.nodeType===1?s:s.parentElement)?.closest(`[${N}], [${M}]`)??null,c=s=>{let l=o.createRange();l.selectNodeContents(s);let p=t.cloneRange();return l.comparePoint(p.startContainer,p.startOffset)===-1&&p.setStart(l.startContainer,l.startOffset),l.comparePoint(p.endContainer,p.endOffset)===1&&p.setEnd(l.endContainer,l.endOffset),!p.collapsed&&p.toString().trim().length>0},d=[i(t.startContainer),i(t.endContainer)].filter(s=>s!==null).filter(c).reduce((s,l)=>{if(!s)return l;let p=s.getAttribute(M)?.split(".").length??0;return(l.getAttribute(M)?.split(".").length??0)>p?l:s},null)??i(t.commonAncestorContainer);if(!d||d.closest(".mx-rail, .mx-present")||d.closest(`[${ce}]`)){a();return}let oe=d.closest(`[${N}]`)?$(d,g):F(d,g);if(!oe){a();return}let y=t.getBoundingClientRect();if(y.width<=0||y.height<=0){a();return}E=oe;let x=le(t),f=x&&!x.closest(".mx-rail, .mx-present")?$(x,g):null;if(f&&x){let s=ae(t,x);f.quote=s.quote,(f.tag!=="For"||D(f.range))&&(f.range=D(f.range)?{...f.range,range:s.range}:s.range)}I=f;let L=j();L.hidden=!1;let H=L.getBoundingClientRect(),K=Y(n),q=(K?Array.from(t.getClientRects()??[]):[]).filter(s=>s.width>0&&s.height>0).at(-1)??y,re=H.width/2,ue=Math.min(Math.max(q.left+q.width/2,re+8),n.innerWidth-re-8),se=!K&&y.top>=H.height+10,ie=se?y.top-7:q.bottom+7;L.style.left=`${Math.round(ue)}px`,L.style.top=`${Math.round(K?z(ie,H.height):ie)}px`,L.style.transform=se?"translate(-50%, -100%)":"translate(-50%, 0)"},R=!1,_=0,C=null,v=()=>{n.clearTimeout(_),_=0,C=null},G=e=>{if(R=!0,r&&e.composedPath().includes(r))return;S&&a(),v();let t=e.target;e.pointerType==="touch"&&t?.closest&&!t.textContent?.trim()&&!t.closest('a, button, input, textarea, select, [contenteditable="true"]')&&(C={x:e.clientX,y:e.clientY},_=n.setTimeout(()=>{_=0,t.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY}))},550))},P=()=>{R=!1,v()},Q=e=>{C&&Math.hypot(e.clientX-C.x,e.clientY-C.y)>8&&v()},V=e=>{R=!1,v(),!(r&&e.composedPath().includes(r))&&n.queueMicrotask(b)},Z=e=>{ge(e)&&b()},ee=()=>{if(!m.edit&&!m.annotate)return;let e=n.getSelection();if(!S){if(!e||e.isCollapsed){a();return}e.toString().trim()&&(R&&!Y(n)||(J(),A=n.setTimeout(()=>{A=0,b()},fe)))}},te=e=>{e.key!=="Escape"||!r||r.hidden||(a(),n.getSelection()?.removeAllRanges())},T=0,k=()=>{if(v(),S){a();return}!E||T||(T=n.requestAnimationFrame(()=>{T=0,b()}))},ne=e=>{if(!m.edit&&!m.annotate||e.shiftKey)return;let t=e.target;if(!t?.closest||h&&!h.contains(t)||t.closest('a, input, textarea, select, [contenteditable="true"], .mx-rail, .mx-present'))return;if(n.getSelection()?.toString().trim()){b();return}let i=t.closest(`[${N}], [${M}]`),c=i&&(i.closest(`[${N}]`)?$(i,g):F(i,g));if(!c)return;e.preventDefault(),a(),E=c,S=!0;let u=j(!0);u.querySelector('[data-mx-selection-action="edit"]')?.setAttribute("aria-label","Edit"),u.hidden=!1;let d=u.getBoundingClientRect();u.style.left=`${Math.max(8,Math.min(e.clientX,n.innerWidth-d.width-8))}px`,u.style.top=`${z(e.clientY+7,d.height)}px`,u.style.transform="none"};return o.addEventListener("contextmenu",ne),o.addEventListener("pointerdown",G),o.addEventListener("pointermove",Q),o.addEventListener("pointerup",V),o.addEventListener("pointercancel",P),n.addEventListener("blur",P),o.addEventListener("keyup",Z),o.addEventListener("selectionchange",ee),o.addEventListener("keydown",te),n.addEventListener("scroll",k,{passive:!0}),n.addEventListener("resize",k,{passive:!0}),{update(e){let t=!W;W=!0,m=e,a(),r&&(r.remove(),r=null),t&&(e.edit||e.annotate)&&n.queueMicrotask(b)},setNodes(e){g=e},dispose(){a(),T&&n.cancelAnimationFrame(T),r?.remove(),O.remove(),o.removeEventListener("contextmenu",ne),v(),o.removeEventListener("pointermove",Q),o.removeEventListener("pointerdown",G),o.removeEventListener("pointerup",V),o.removeEventListener("pointercancel",P),n.removeEventListener("blur",P),o.removeEventListener("keyup",Z),o.removeEventListener("selectionchange",ee),o.removeEventListener("keydown",te),n.removeEventListener("scroll",k),n.removeEventListener("resize",k)}}}export{ce as SELECTION_ACTIONS_ATTR,me as SELECTION_ACTION_COARSE_CLASS,Le as createFrameSelectionActions};
1
+ "use client";import{a as B}from"./chunk-64ZOQAGM.js";import{c as N,k as F,l as $,m as D,t as le,u as ae}from"./chunk-GJT2B5DK.js";import"./chunk-SM7P2RYM.js";import"./chunk-7PMY7F6T.js";import{a as M}from"./chunk-4DRMYA3D.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var ce="data-mx-selection-actions",me="mx-selection-action--coarse",U="data-mx-selection-action",pe="data-mx-selection-actions-css",fe=200,Ee=B.actionsCss,he=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"]),ge=n=>he.has(n.key)||n.key==="Shift"||(n.key==="a"||n.key==="A")&&(n.ctrlKey||n.metaKey),Y=n=>n.matchMedia?.("(pointer: coarse)")?.matches===!0;function Le({win:n,onAction:de,root:h,portal:X}){let o=n.document,g=[],m={type:"mx:selection-actions",edit:!1,annotate:!1},E=null,I=null,r=null,S=!1,W=!1,O=o.createElement("style");O.setAttribute(pe,""),O.textContent=Ee,(X??o.head).appendChild(O);let A=0,J=()=>{A&&(n.clearTimeout(A),A=0)},a=()=>{J(),S=!1,E=null,I=null,r&&(r.hidden=!0)},w=e=>{let t=o.createElement("button");t.type="button",t.setAttribute(U,e),t.setAttribute("aria-label",e==="select"?"Select":e==="edit"?"Edit selected text":"Comment on selected text"),Y(n)&&t.classList.add(me);let i=o.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("fill","none"),i.setAttribute("stroke","currentColor"),i.setAttribute("stroke-width","2"),i.setAttribute("stroke-linecap","round"),i.setAttribute("stroke-linejoin","round"),i.setAttribute("aria-hidden","true"),i.setAttribute("class",`lucide lucide-${e==="select"?"square-dashed-mouse-pointer":e==="edit"?"pencil":"message-square"}`);let c=B.icons[e];for(let u of c){let d=o.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("d",u),i.appendChild(d)}return t.append(i,o.createTextNode(e==="select"?"Select":e==="edit"?"edit":"comment")),t},j=(e=!1)=>(r||(r=o.createElement("div"),r.setAttribute(ce,""),r.setAttribute("role","toolbar"),r.hidden=!0,r.addEventListener("pointerdown",t=>t.preventDefault()),r.addEventListener("click",t=>{let c=t.target?.closest(`[${U}]`)?.getAttribute(U);if(!E||c!=="edit"&&c!=="annotate"&&c!=="select")return;t.preventDefault(),t.stopPropagation();let u=(c==="annotate"?I:null)??E;a(),c==="select"&&n.getSelection()?.removeAllRanges(),de(c,u)}),(X??o.body).appendChild(r)),r.setAttribute("aria-label",e?"Document actions":"Text selection actions"),r.replaceChildren(),m.edit&&!D(E?.range)&&r.appendChild(w("edit")),m.annotate&&!e&&r.appendChild(w("annotate")),m.annotate&&r.appendChild(w("select")),r),z=(e,t)=>Math.max(8,Math.min(e,n.innerHeight-8-t)),b=()=>{if(S)return;if(!m.edit&&!m.annotate){a();return}let e=n.getSelection();if(!e||e.isCollapsed||e.rangeCount===0||!e.toString().trim()){a();return}let t=e.getRangeAt(0);if(h){if(!h.contains(t.startContainer)){a();return}if(!h.contains(t.endContainer)){let s=o.createRange();s.selectNodeContents(h);let l=t.cloneRange();if(l.setEnd(s.endContainer,s.endOffset),l.collapsed||l.toString()!==t.toString()){a();return}t=l}}let i=s=>(s.nodeType===1?s:s.parentElement)?.closest(`[${N}], [${M}]`)??null,c=s=>{let l=o.createRange();l.selectNodeContents(s);let p=t.cloneRange();return l.comparePoint(p.startContainer,p.startOffset)===-1&&p.setStart(l.startContainer,l.startOffset),l.comparePoint(p.endContainer,p.endOffset)===1&&p.setEnd(l.endContainer,l.endOffset),!p.collapsed&&p.toString().trim().length>0},d=[i(t.startContainer),i(t.endContainer)].filter(s=>s!==null).filter(c).reduce((s,l)=>{if(!s)return l;let p=s.getAttribute(M)?.split(".").length??0;return(l.getAttribute(M)?.split(".").length??0)>p?l:s},null)??i(t.commonAncestorContainer);if(!d||d.closest(".mx-rail, .mx-present")||d.closest(`[${ce}]`)){a();return}let oe=d.closest(`[${N}]`)?$(d,g):F(d,g);if(!oe){a();return}let y=t.getBoundingClientRect();if(y.width<=0||y.height<=0){a();return}E=oe;let x=le(t),f=x&&!x.closest(".mx-rail, .mx-present")?$(x,g):null;if(f&&x){let s=ae(t,x);f.quote=s.quote,(f.tag!=="For"||D(f.range))&&(f.range=D(f.range)?{...f.range,range:s.range}:s.range)}I=f;let L=j();L.hidden=!1;let H=L.getBoundingClientRect(),K=Y(n),q=(K?Array.from(t.getClientRects()??[]):[]).filter(s=>s.width>0&&s.height>0).at(-1)??y,re=H.width/2,ue=Math.min(Math.max(q.left+q.width/2,re+8),n.innerWidth-re-8),se=!K&&y.top>=H.height+10,ie=se?y.top-7:q.bottom+7;L.style.left=`${Math.round(ue)}px`,L.style.top=`${Math.round(K?z(ie,H.height):ie)}px`,L.style.transform=se?"translate(-50%, -100%)":"translate(-50%, 0)"},R=!1,_=0,C=null,v=()=>{n.clearTimeout(_),_=0,C=null},G=e=>{if(R=!0,r&&e.composedPath().includes(r))return;S&&a(),v();let t=e.target;e.pointerType==="touch"&&t?.closest&&!t.textContent?.trim()&&!t.closest('a, button, input, textarea, select, [contenteditable="true"]')&&(C={x:e.clientX,y:e.clientY},_=n.setTimeout(()=>{_=0,t.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY}))},550))},P=()=>{R=!1,v()},Q=e=>{C&&Math.hypot(e.clientX-C.x,e.clientY-C.y)>8&&v()},V=e=>{R=!1,v(),!(r&&e.composedPath().includes(r))&&n.queueMicrotask(b)},Z=e=>{ge(e)&&b()},ee=()=>{if(!m.edit&&!m.annotate)return;let e=n.getSelection();if(!S){if(!e||e.isCollapsed){a();return}e.toString().trim()&&(R&&!Y(n)||(J(),A=n.setTimeout(()=>{A=0,b()},fe)))}},te=e=>{e.key!=="Escape"||!r||r.hidden||(a(),n.getSelection()?.removeAllRanges())},T=0,k=()=>{if(v(),S){a();return}!E||T||(T=n.requestAnimationFrame(()=>{T=0,b()}))},ne=e=>{if(!m.edit&&!m.annotate||e.shiftKey)return;let t=e.target;if(!t?.closest||h&&!h.contains(t)||t.closest('a, input, textarea, select, [contenteditable="true"], .mx-rail, .mx-present'))return;if(n.getSelection()?.toString().trim()){b();return}let i=t.closest(`[${N}], [${M}]`),c=i&&(i.closest(`[${N}]`)?$(i,g):F(i,g));if(!c)return;e.preventDefault(),a(),E=c,S=!0;let u=j(!0);u.querySelector('[data-mx-selection-action="edit"]')?.setAttribute("aria-label","Edit"),u.hidden=!1;let d=u.getBoundingClientRect();u.style.left=`${Math.max(8,Math.min(e.clientX,n.innerWidth-d.width-8))}px`,u.style.top=`${z(e.clientY+7,d.height)}px`,u.style.transform="none"};return o.addEventListener("contextmenu",ne),o.addEventListener("pointerdown",G),o.addEventListener("pointermove",Q),o.addEventListener("pointerup",V),o.addEventListener("pointercancel",P),n.addEventListener("blur",P),o.addEventListener("keyup",Z),o.addEventListener("selectionchange",ee),o.addEventListener("keydown",te),n.addEventListener("scroll",k,{passive:!0}),n.addEventListener("resize",k,{passive:!0}),{update(e){let t=!W;W=!0,m=e,a(),r&&(r.remove(),r=null),t&&(e.edit||e.annotate)&&n.queueMicrotask(b)},setNodes(e){g=e},dispose(){a(),T&&n.cancelAnimationFrame(T),r?.remove(),O.remove(),o.removeEventListener("contextmenu",ne),v(),o.removeEventListener("pointermove",Q),o.removeEventListener("pointerdown",G),o.removeEventListener("pointerup",V),o.removeEventListener("pointercancel",P),n.removeEventListener("blur",P),o.removeEventListener("keyup",Z),o.removeEventListener("selectionchange",ee),o.removeEventListener("keydown",te),n.removeEventListener("scroll",k),n.removeEventListener("resize",k)}}}export{ce as SELECTION_ACTIONS_ATTR,me as SELECTION_ACTION_COARSE_CLASS,Le as createFrameSelectionActions};
@@ -1,4 +1,4 @@
1
- "use client";import{a as Le,b as Me,c as xe,d as it,e as st,f as pe}from"./chunk-BXYW7J3T.js";import{a as Qe,b as Ze,c as et,o as Re,p as tt,u as nt,v as rt,w as ot}from"./chunk-RCXK2DBZ.js";import{e as Ie,f as $e,g as Be,h as Ae,i as Fe,j as be,k as Ge,l as Ve,m as Se,p as je,q as ze,r as we,s as Ye,t as Ke,u as We,v as ke,w as qe,x as Je,y as Xe,z as Ue}from"./chunk-JTUTVTQG.js";import{a as Z,e as Ce,f as lt,g as De,h as at,i as ct,j as Oe,k as ce,w as dt}from"./chunk-GJT2B5DK.js";import{b as ne}from"./chunk-SM7P2RYM.js";import{a as z}from"./chunk-4DRMYA3D.js";import"./chunk-QVSMXME5.js";import"./chunk-JABILGJZ.js";import"./chunk-7PMY7F6T.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var Rt={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Lt=".mx-rail, .mx-present, [data-mx-node-chrome]",Mt='[role="listbox"], [role="menu"], [role="combobox"], [role="grid"], [role="tree"]',se=e=>e==="down"||e==="right",fe=e=>e==="up"||e==="down";function Ct(e){return e.defaultPrevented||e.isComposing||e.keyCode===229||e.shiftKey||e.ctrlKey||e.metaKey||e.altKey?null:Rt[e.key]??null}function Dt(e,n,c){let i=e.indexOf(n);return i<0?null:e[i+(se(c)?1:-1)]??null}function ut(e,n){let c=d=>e.contains(d)&&!d.closest(Lt),i=[];for(let d of n)c(d.dom)&&i.push({el:d.dom,view:d});for(let d of e.querySelectorAll('[data-mx-ast][contenteditable="true"]')){if(!c(d)||d.closest(".ProseMirror"))continue;let a=d.parentElement?.closest('[contenteditable="true"]');a&&e.contains(a)||i.push({el:d,view:null})}return i.sort((d,a)=>d.el===a.el?0:d.el.compareDocumentPosition(a.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}function mt(e,{regions:n,selection:c,geometry:i}){let d=Ct(e);if(!d||!c||c.rangeCount===0||!c.isCollapsed)return!1;let a=e.target;if(!a?.closest||a.closest(Mt))return!1;let h=n.find(b=>b.el.contains(c.anchorNode));if(!h||!h.el.contains(a)||!i.atEdge(h,d))return!1;let u=Dt(n.filter(b=>b===h||i.visible(b)),h,d);if(!u)return!1;let s=fe(d)?i.caretX(h):null;return e.preventDefault(),e.stopPropagation(),i.enter(u,d,s),!0}var pt=(e,n,c)=>Math.max(n,Math.min(c,e)),ft=e=>Le.findFrom(e.resolve(0),1,!0),gt=e=>Le.findFrom(e.resolve(e.content.size),-1,!0);function Ot(e,n){let{selection:c,doc:i}=e.state;if(!c.empty||!(c instanceof Me))return!1;let d=se(n)?gt(i):ft(i);return d?fe(n)?c.$head.start()!==d.$head.start()?!1:e.endOfTextblock(n):c.head===d.head:!1}function Pt(e,n,c){let{doc:i}=e.state,d=se(n)?ft(i):gt(i);if(!d)return;let a=d.head;if(c!==null&&fe(n))try{let h=e.domAtPos(a).node;(h.nodeType===1?h:h.parentElement)?.scrollIntoView?.({block:"nearest"});let u=e.coordsAtPos(a),s=e.dom.getBoundingClientRect(),b=e.posAtCoords({left:pt(c,s.left+1,s.right-1),top:(u.top+u.bottom)/2});b&&i.resolve(b.pos).parent.isTextblock&&(a=b.pos)}catch{}e.dispatch(e.state.tr.setSelection(Me.create(i,a)).scrollIntoView()),e.focus()}var Pe=e=>typeof e.getClientRects=="function"?[...e.getClientRects()].filter(n=>n.width>0||n.height>0):[];function ht(e){if(!e.rangeCount)return null;let n=e.getRangeAt(0),[c]=Pe(n);if(c)return c;let i=n.startContainer,a=(i.nodeType===1?i:i.parentElement)?.getBoundingClientRect?.();return a&&(a.width>0||a.height>0)?a:null}function _t(e,n,c){let i=e.getSelection();if(!i?.rangeCount)return!1;let d=i.getRangeAt(0),a=e.document.createRange();if(a.selectNodeContents(n),se(c)?a.setStart(d.endContainer,d.endOffset):a.setEnd(d.startContainer,d.startOffset),!a.toString().trim())return!0;if(!fe(c))return!1;let h=ht(i);return h?!Pe(a).some(u=>{let s=u.top+u.height/2;return c==="down"?s>h.bottom:s<h.top}):!1}function Ht(e,n,c){let i=e.caretPositionFromPoint?.(n,c);if(i){let d=e.createRange();return d.setStart(i.offsetNode,i.offset),d}return e.caretRangeFromPoint?.(n,c)??null}function Nt(e,n,c,i){let d=e.document;n.scrollIntoView?.({block:"nearest"}),n.focus({preventScroll:!0});let a=null;if(i!==null&&fe(c)){let u=d.createRange();u.selectNodeContents(n);let s=Pe(u);if(s.length){let b=se(c)?s.reduce((E,m)=>m.top<E.top?m:E):s.reduce((E,m)=>m.bottom>E.bottom?m:E),D=n.getBoundingClientRect(),f=Ht(d,pt(i,D.left+1,D.right-1),b.top+b.height/2);f&&n.contains(f.startContainer)&&(a=f)}}if(!a){let u=d.createTreeWalker(n,NodeFilter.SHOW_TEXT),s=null;for(let b=u.nextNode();b&&!(b.data.trim()&&(s=b,se(c)));b=u.nextNode());a=d.createRange(),a.selectNodeContents(s??n),a.collapse(se(c))}a.collapse(!0);let h=e.getSelection();h?.removeAllRanges(),h?.addRange(a)}function Et(e){return{visible:({el:n})=>n.isConnected&&(n.checkVisibility?.()??!0),atEdge:(n,c)=>n.view?Ot(n.view,c):_t(e,n.el,c),caretX(n){try{if(n.view)return n.view.coordsAtPos(n.view.state.selection.head).left;let c=e.getSelection();return c?ht(c)?.left??null:null}catch{return null}},enter:(n,c,i)=>n.view?Pt(n.view,c,i):Nt(e,n.el,c,i)}}var It=".mx-rail, .mx-present";function bt(e){let n=e.createElement("div");n.setAttribute("data-mx-drag-preview",""),n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:"fixed",zIndex:"48",pointerEvents:"none",display:"none",padding:"2px 8px",borderRadius:"6px",font:"500 12px/18px system-ui, sans-serif",whiteSpace:"nowrap",color:"#fff",background:"rgba(51, 65, 85, 0.92)",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.18)"});let c=e.createElement("div");c.setAttribute("data-mx-drop-marker",""),Object.assign(c.style,{position:"fixed",zIndex:"47",pointerEvents:"none",display:"none",height:"3px",borderRadius:"3px",background:"#16a34a",boxShadow:"0 0 0 2px rgba(22,163,74,.12)"});let i=e.createElement("style");e.head.append(i),e.body.append(n,c);let d=null,a="",h={label:"Block",parent:"container"},u=m=>m.split(".").slice(0,-1).join("."),s=m=>m.parentElement?.closest("[data-mx-ast]"),b=()=>{d=null,n.style.display=c.style.display="none",i.textContent=""},D=()=>{if(!d)return[];let m=s(d),A=a.split(".").length;return[...(m??e).querySelectorAll("[data-mx-ast]")].filter(y=>{let g=y.getAttribute("data-mx-ast");return g.split(".").length===A&&u(g)===u(a)&&s(y)===s(d)&&!y.closest(It)})},f=(m,A,y)=>{let g=null,T=1/0;for(let H of y){let S=H.getBoundingClientRect(),t=Math.max(S.left-m,0,m-S.right),o=Math.max(S.top-A,0,A-S.bottom),x=Math.hypot(t,o);x<T&&([g,T]=[H,x])}return g},E=(m,A,y)=>{n.textContent=y==="invalid"?`Can only move within this ${h.parent.toLowerCase()}`:`\u283F ${h.label}`,n.setAttribute("data-mx-drop-state",y),n.style.background=y==="invalid"?"rgba(220, 38, 38, 0.92)":"rgba(51, 65, 85, 0.92)",i.textContent=`* { cursor: ${y==="invalid"?"not-allowed":"grabbing"} !important; }`,n.style.display="block";let{width:g,height:T}=n.getBoundingClientRect(),H=(S,t,o)=>{let x=S+14,C=S-14-t,_=x+t<=o-8||C<8?x:C;return Math.max(8,Math.min(_,o-t-8))};n.style.left=`${H(m,g,e.defaultView?.innerWidth??1e3)}px`,n.style.top=`${H(A,T,e.defaultView?.innerHeight??800)}px`,y!=="valid"&&(c.style.display="none")};return{start(m,A,y){d=m,a=A,y&&(h=y)},update(m,A,y){if(!d?.isConnected){b();return}let g=D(),T=y?g.find(_=>_.getAttribute("data-mx-ast")===y)??null:e.elementFromPoint(m,A)?.closest("[data-mx-ast]")??null;if(!y){for(;T&&!g.includes(T);)T=T.parentElement?.closest("[data-mx-ast]")??null;T??=f(m,A,g)}if(g.length<2){E(m,A,"invalid");return}if(!T||T===d){E(m,A,"none");return}let H=T.getAttribute("data-mx-ast"),S=Number(H.split(".").at(-1))>Number(a.split(".").at(-1));E(m,A,"valid"),c.style.display="block";let t=T.getBoundingClientRect(),o=d.getBoundingClientRect(),x=Math.min(t.bottom,o.bottom)>Math.max(t.top,o.top)&&(t.left>=o.right||t.right<=o.left),C=S?t.left>=o.right?t.right:t.left:t.left<o.left?t.left:t.right;return Object.assign(c.style,x?{left:`${C}px`,top:`${t.top}px`,width:"3px",height:`${t.height}px`}:{left:`${t.left}px`,top:`${S?t.bottom:t.top}px`,width:`${t.width}px`,height:"3px"}),H},clear:b,dispose(){b(),n.remove(),c.remove(),i.remove()}}}var ee="data-mx-hover-grip",ve=`[data-mx-node-chrome], [${ee}]`,ge=Z,$t=[`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button > span { color: ${ge.handleColor}; }`,`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button[data-mx-dot] > span { background: ${ge.handleDot}; }`,`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button:hover > span { color: ${ge.handleActive}; }`,`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button[data-mx-dot]:hover > span { background: ${ge.handleActive}; }`,`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button:focus-visible { outline: 2px solid ${ge.handleActive}; outline-offset: -2px; }`].join(`
1
+ "use client";import{a as Le,b as Me,c as xe,d as it,e as st,f as pe}from"./chunk-BXYW7J3T.js";import{a as Qe,b as Ze,c as et,o as Re,p as tt,u as nt,v as rt,w as ot}from"./chunk-RCXK2DBZ.js";import"./chunk-QVSMXME5.js";import"./chunk-JABILGJZ.js";import{e as Ie,f as $e,g as Be,h as Ae,i as Fe,j as be,k as Ge,l as Ve,m as Se,p as je,q as ze,r as we,s as Ye,t as Ke,u as We,v as ke,w as qe,x as Je,y as Xe,z as Ue}from"./chunk-JTUTVTQG.js";import{a as Z,e as Ce,f as lt,g as De,h as at,i as ct,j as Oe,k as ce,w as dt}from"./chunk-GJT2B5DK.js";import{b as ne}from"./chunk-SM7P2RYM.js";import"./chunk-7PMY7F6T.js";import{a as z}from"./chunk-4DRMYA3D.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var Rt={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Lt=".mx-rail, .mx-present, [data-mx-node-chrome]",Mt='[role="listbox"], [role="menu"], [role="combobox"], [role="grid"], [role="tree"]',se=e=>e==="down"||e==="right",fe=e=>e==="up"||e==="down";function Ct(e){return e.defaultPrevented||e.isComposing||e.keyCode===229||e.shiftKey||e.ctrlKey||e.metaKey||e.altKey?null:Rt[e.key]??null}function Dt(e,n,c){let i=e.indexOf(n);return i<0?null:e[i+(se(c)?1:-1)]??null}function ut(e,n){let c=d=>e.contains(d)&&!d.closest(Lt),i=[];for(let d of n)c(d.dom)&&i.push({el:d.dom,view:d});for(let d of e.querySelectorAll('[data-mx-ast][contenteditable="true"]')){if(!c(d)||d.closest(".ProseMirror"))continue;let a=d.parentElement?.closest('[contenteditable="true"]');a&&e.contains(a)||i.push({el:d,view:null})}return i.sort((d,a)=>d.el===a.el?0:d.el.compareDocumentPosition(a.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}function mt(e,{regions:n,selection:c,geometry:i}){let d=Ct(e);if(!d||!c||c.rangeCount===0||!c.isCollapsed)return!1;let a=e.target;if(!a?.closest||a.closest(Mt))return!1;let h=n.find(b=>b.el.contains(c.anchorNode));if(!h||!h.el.contains(a)||!i.atEdge(h,d))return!1;let u=Dt(n.filter(b=>b===h||i.visible(b)),h,d);if(!u)return!1;let s=fe(d)?i.caretX(h):null;return e.preventDefault(),e.stopPropagation(),i.enter(u,d,s),!0}var pt=(e,n,c)=>Math.max(n,Math.min(c,e)),ft=e=>Le.findFrom(e.resolve(0),1,!0),gt=e=>Le.findFrom(e.resolve(e.content.size),-1,!0);function Ot(e,n){let{selection:c,doc:i}=e.state;if(!c.empty||!(c instanceof Me))return!1;let d=se(n)?gt(i):ft(i);return d?fe(n)?c.$head.start()!==d.$head.start()?!1:e.endOfTextblock(n):c.head===d.head:!1}function Pt(e,n,c){let{doc:i}=e.state,d=se(n)?ft(i):gt(i);if(!d)return;let a=d.head;if(c!==null&&fe(n))try{let h=e.domAtPos(a).node;(h.nodeType===1?h:h.parentElement)?.scrollIntoView?.({block:"nearest"});let u=e.coordsAtPos(a),s=e.dom.getBoundingClientRect(),b=e.posAtCoords({left:pt(c,s.left+1,s.right-1),top:(u.top+u.bottom)/2});b&&i.resolve(b.pos).parent.isTextblock&&(a=b.pos)}catch{}e.dispatch(e.state.tr.setSelection(Me.create(i,a)).scrollIntoView()),e.focus()}var Pe=e=>typeof e.getClientRects=="function"?[...e.getClientRects()].filter(n=>n.width>0||n.height>0):[];function ht(e){if(!e.rangeCount)return null;let n=e.getRangeAt(0),[c]=Pe(n);if(c)return c;let i=n.startContainer,a=(i.nodeType===1?i:i.parentElement)?.getBoundingClientRect?.();return a&&(a.width>0||a.height>0)?a:null}function _t(e,n,c){let i=e.getSelection();if(!i?.rangeCount)return!1;let d=i.getRangeAt(0),a=e.document.createRange();if(a.selectNodeContents(n),se(c)?a.setStart(d.endContainer,d.endOffset):a.setEnd(d.startContainer,d.startOffset),!a.toString().trim())return!0;if(!fe(c))return!1;let h=ht(i);return h?!Pe(a).some(u=>{let s=u.top+u.height/2;return c==="down"?s>h.bottom:s<h.top}):!1}function Ht(e,n,c){let i=e.caretPositionFromPoint?.(n,c);if(i){let d=e.createRange();return d.setStart(i.offsetNode,i.offset),d}return e.caretRangeFromPoint?.(n,c)??null}function Nt(e,n,c,i){let d=e.document;n.scrollIntoView?.({block:"nearest"}),n.focus({preventScroll:!0});let a=null;if(i!==null&&fe(c)){let u=d.createRange();u.selectNodeContents(n);let s=Pe(u);if(s.length){let b=se(c)?s.reduce((E,m)=>m.top<E.top?m:E):s.reduce((E,m)=>m.bottom>E.bottom?m:E),D=n.getBoundingClientRect(),f=Ht(d,pt(i,D.left+1,D.right-1),b.top+b.height/2);f&&n.contains(f.startContainer)&&(a=f)}}if(!a){let u=d.createTreeWalker(n,NodeFilter.SHOW_TEXT),s=null;for(let b=u.nextNode();b&&!(b.data.trim()&&(s=b,se(c)));b=u.nextNode());a=d.createRange(),a.selectNodeContents(s??n),a.collapse(se(c))}a.collapse(!0);let h=e.getSelection();h?.removeAllRanges(),h?.addRange(a)}function Et(e){return{visible:({el:n})=>n.isConnected&&(n.checkVisibility?.()??!0),atEdge:(n,c)=>n.view?Ot(n.view,c):_t(e,n.el,c),caretX(n){try{if(n.view)return n.view.coordsAtPos(n.view.state.selection.head).left;let c=e.getSelection();return c?ht(c)?.left??null:null}catch{return null}},enter:(n,c,i)=>n.view?Pt(n.view,c,i):Nt(e,n.el,c,i)}}var It=".mx-rail, .mx-present";function bt(e){let n=e.createElement("div");n.setAttribute("data-mx-drag-preview",""),n.setAttribute("aria-hidden","true"),Object.assign(n.style,{position:"fixed",zIndex:"48",pointerEvents:"none",display:"none",padding:"2px 8px",borderRadius:"6px",font:"500 12px/18px system-ui, sans-serif",whiteSpace:"nowrap",color:"#fff",background:"rgba(51, 65, 85, 0.92)",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.18)"});let c=e.createElement("div");c.setAttribute("data-mx-drop-marker",""),Object.assign(c.style,{position:"fixed",zIndex:"47",pointerEvents:"none",display:"none",height:"3px",borderRadius:"3px",background:"#16a34a",boxShadow:"0 0 0 2px rgba(22,163,74,.12)"});let i=e.createElement("style");e.head.append(i),e.body.append(n,c);let d=null,a="",h={label:"Block",parent:"container"},u=m=>m.split(".").slice(0,-1).join("."),s=m=>m.parentElement?.closest("[data-mx-ast]"),b=()=>{d=null,n.style.display=c.style.display="none",i.textContent=""},D=()=>{if(!d)return[];let m=s(d),A=a.split(".").length;return[...(m??e).querySelectorAll("[data-mx-ast]")].filter(y=>{let g=y.getAttribute("data-mx-ast");return g.split(".").length===A&&u(g)===u(a)&&s(y)===s(d)&&!y.closest(It)})},f=(m,A,y)=>{let g=null,T=1/0;for(let H of y){let S=H.getBoundingClientRect(),t=Math.max(S.left-m,0,m-S.right),o=Math.max(S.top-A,0,A-S.bottom),x=Math.hypot(t,o);x<T&&([g,T]=[H,x])}return g},E=(m,A,y)=>{n.textContent=y==="invalid"?`Can only move within this ${h.parent.toLowerCase()}`:`\u283F ${h.label}`,n.setAttribute("data-mx-drop-state",y),n.style.background=y==="invalid"?"rgba(220, 38, 38, 0.92)":"rgba(51, 65, 85, 0.92)",i.textContent=`* { cursor: ${y==="invalid"?"not-allowed":"grabbing"} !important; }`,n.style.display="block";let{width:g,height:T}=n.getBoundingClientRect(),H=(S,t,o)=>{let x=S+14,C=S-14-t,_=x+t<=o-8||C<8?x:C;return Math.max(8,Math.min(_,o-t-8))};n.style.left=`${H(m,g,e.defaultView?.innerWidth??1e3)}px`,n.style.top=`${H(A,T,e.defaultView?.innerHeight??800)}px`,y!=="valid"&&(c.style.display="none")};return{start(m,A,y){d=m,a=A,y&&(h=y)},update(m,A,y){if(!d?.isConnected){b();return}let g=D(),T=y?g.find(_=>_.getAttribute("data-mx-ast")===y)??null:e.elementFromPoint(m,A)?.closest("[data-mx-ast]")??null;if(!y){for(;T&&!g.includes(T);)T=T.parentElement?.closest("[data-mx-ast]")??null;T??=f(m,A,g)}if(g.length<2){E(m,A,"invalid");return}if(!T||T===d){E(m,A,"none");return}let H=T.getAttribute("data-mx-ast"),S=Number(H.split(".").at(-1))>Number(a.split(".").at(-1));E(m,A,"valid"),c.style.display="block";let t=T.getBoundingClientRect(),o=d.getBoundingClientRect(),x=Math.min(t.bottom,o.bottom)>Math.max(t.top,o.top)&&(t.left>=o.right||t.right<=o.left),C=S?t.left>=o.right?t.right:t.left:t.left<o.left?t.left:t.right;return Object.assign(c.style,x?{left:`${C}px`,top:`${t.top}px`,width:"3px",height:`${t.height}px`}:{left:`${t.left}px`,top:`${S?t.bottom:t.top}px`,width:`${t.width}px`,height:"3px"}),H},clear:b,dispose(){b(),n.remove(),c.remove(),i.remove()}}}var ee="data-mx-hover-grip",ve=`[data-mx-node-chrome], [${ee}]`,ge=Z,$t=[`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button > span { color: ${ge.handleColor}; }`,`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button[data-mx-dot] > span { background: ${ge.handleDot}; }`,`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button:hover > span { color: ${ge.handleActive}; }`,`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button[data-mx-dot]:hover > span { background: ${ge.handleActive}; }`,`:is([data-mx-node-chrome], [${ee}])[data-mx-chrome-root] > button:focus-visible { outline: 2px solid ${ge.handleActive}; outline-offset: -2px; }`].join(`
2
2
  `);function xt(e,n,c){let i=e.createElement("div");i.setAttribute("data-mx-node-chrome",""),i.setAttribute("data-mx-chrome-root",""),Object.assign(i.style,{position:"fixed",zIndex:"45",pointerEvents:"none",display:"none"});let d=e.defaultView?.matchMedia?.("(pointer: coarse)").matches;e.body.append(i);let a=null,h=null,u,s=null,b=bt(e),D=e.createElement("style"),f=Qe();e.head.append(D);let E=e.createElement("style");E.textContent=$t,e.head.append(E);let m=null,A=null,y=0,g=0,T=()=>{e.defaultView?.cancelAnimationFrame(g),g=0,m?.removeAttribute("data-mx-resize-preview"),A?.removeAttribute("data-mx-resize-peer"),m=A=null,D.textContent=""},H=()=>Number.parseFloat(a?.parentElement?e.defaultView.getComputedStyle(a.parentElement).columnGap:"")||0,S=()=>u?(u.width+H())/u.cols:1,t=r=>u?Math.max(1,Math.min(u.cols,Math.round((r+H())/S()))):1,o=new Map,x=(r,k,P,M)=>{let B=e.createElement("button");B.type="button";let X=e.createElement("span");X.textContent=k,X.setAttribute("aria-hidden","true");let ie=!!M&&M!=="move";return Object.assign(X.style,{display:"grid",placeItems:"center",width:ie?"7px":"18px",height:ie?"7px":"18px",borderRadius:"50%",font:M==="move"?"12px system-ui":"16px/1 system-ui",pointerEvents:"none"}),ie&&B.setAttribute("data-mx-dot",""),B.append(X),B.setAttribute("aria-label",r),Object.assign(B.style,{position:"absolute",pointerEvents:"auto",touchAction:"none",width:d?"44px":"28px",height:d?"44px":"28px",padding:"0",border:"0",borderRadius:"50%",background:"transparent",display:"grid",placeItems:"center",font:"16px system-ui",cursor:M==="move"?"grab":M==="width"||M==="divider"?"ew-resize":M==="height"?"ns-resize":M==="resize"?"nwse-resize":"pointer",transform:"translate(-50%, -50%)",...P}),B.addEventListener("pointerdown",ae=>{ae.preventDefault(),M&&ye(ae,M)}),M&&o.set(B,M),i.append(B),B},C=`${-Z.handleOutset}px`,_=`calc(100% + ${Z.handleOutset}px)`,N=x("Move selected block","\u283F",{left:C,top:C},"move"),O=x("Delete selected block","",{left:_,top:C}),V=e.createElementNS("http://www.w3.org/2000/svg","svg");for(let[r,k]of Object.entries({viewBox:"0 0 24 24",width:"12",height:"12",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))V.setAttribute(r,k);for(let r of["M3 6h18","M19 6v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6","M9 6V3h6v3","M10 10v7","M14 10v7"]){let k=e.createElementNS("http://www.w3.org/2000/svg","path");k.setAttribute("d",r),V.append(k)}O.firstElementChild.append(V),x("Resize selected block","",{left:_,top:_},"resize"),x("Resize block width","",{left:_,top:"50%"},"width"),x("Resize block height","",{left:"50%",top:_},"height");let q=x("Resize adjacent columns","",{left:_,top:"50%"},"divider"),F=d?44:24,U=(r,k)=>{let P=0;for(let M=r.previousElementSibling;M;M=M.previousElementSibling){let B=M.getBoundingClientRect();if(B.bottom>k.top&&B.top<k.bottom&&B.right<=k.left){P=Math.max(P,B.right);break}}return k.left-P>=F},l=e.createElement("div");l.setAttribute(ee,""),l.setAttribute("data-mx-chrome-root",""),Object.assign(l.style,{position:"fixed",zIndex:"45",pointerEvents:"none",display:"none"});let w=e.createElement("button");w.type="button",w.tabIndex=-1,w.setAttribute("aria-label","Drag block"),Object.assign(w.style,{width:`${F}px`,height:`${F}px`,padding:"0",border:"0",borderRadius:"4px",background:"transparent",display:"grid",placeItems:"center",pointerEvents:"auto",touchAction:"none",cursor:"grab"});let L=e.createElement("span");L.textContent="\u283F",L.setAttribute("aria-hidden","true"),Object.assign(L.style,{font:"12px system-ui",pointerEvents:"none"}),w.append(L),l.append(w),e.body.append(l);let I=null,W={label:"Block",parent:"container"},Q=()=>{let r=I;if(!r?.isConnected||a||s){l.style.display="none";return}let k=r.getBoundingClientRect();Object.assign(l.style,{display:"block",left:`${U(r,k)?k.left-F:k.left}px`,top:`${k.top}px`})};w.addEventListener("pointerdown",r=>{r.preventDefault();let k=I;!k||!c||(c(k),a===k&&h&&N.style.display!=="none"&&ye(r,"move"))}),O.addEventListener("click",()=>{if(h){let r=h;$(),n({kind:"delete",paths:[r]})}});let Y=()=>{if(Q(),!a?.isConnected){i.style.display="none";return}let r=a.getBoundingClientRect(),k=s&&s.kind!=="move"?p(s):r;Object.assign(i.style,{left:`${r.left}px`,top:`${r.top}px`,width:`${u?r.width:k.width}px`,height:`${Math.max(k.height,r.height)}px`});let P=d?44:28,M=u?r.width:k.width,B=Math.max(k.height,r.height);for(let X of[...o.keys(),O])X!==N&&(X.style.width=`${Math.min(P,M/2+Z.handleOutset)}px`,X.style.height=`${Math.min(P,B/2+Z.handleOutset)}px`);Object.assign(N.style,{width:`${F}px`,height:`${F}px`,left:`${U(a,r)?-F/2:F/2}px`,top:`${F/2}px`}),s?.kind==="move"&&j()};function re(r,k,P=0,M=0){if(!a||!h)return;T();let B=a.getBoundingClientRect();s={kind:r,pointer:k,x:P,y:M,width:B.width,height:B.height,dx:0,dy:0,steps:0,pairTotal:r==="divider"&&a.nextElementSibling?t(B.width)+t(a.nextElementSibling.getBoundingClientRect().width):void 0},r==="move"&&(b.start(a,h,W),v())}function ye(r,k){r.stopPropagation(),re(k,r.pointerId,r.clientX,r.clientY),r.currentTarget.setPointerCapture?.(r.pointerId)}let p=r=>({width:Math.min(a?.parentElement?.getBoundingClientRect().width||4e3,Math.max(40,r.width+(r.kind==="height"?0:r.dx))),height:Math.max(20,r.height+(["width","divider"].includes(r.kind)?0:r.dy))}),v=()=>{if(!s||!a)return;if(s.kind==="move"){j();return}let r=p(s);m=a,a.setAttribute("data-mx-resize-preview",f);let k=`[data-mx-resize-preview="${f}"][data-mx-resize-preview]`,P=[];if(s.kind!=="height")if(u){let M=t(r.width);if(s.kind==="divider"&&a.nextElementSibling instanceof HTMLElement){A=a.nextElementSibling,A.setAttribute("data-mx-resize-peer",f);let B=s.pairTotal;M=Math.min(M,B-1),P.push(`[data-mx-resize-peer="${f}"][data-mx-resize-peer] { grid-column: span ${B-M} !important; }`)}P.push(`${k} { grid-column: span ${M} !important; }`)}else P.push(`${k} { width: ${r.width}px !important; max-width: 100% !important; }`);["width","divider"].includes(s.kind)||P.push(`${k} { min-height: ${r.height}px !important; height: auto !important; }`),D.textContent=P.join(`
3
3
  `),Y(),i.style.outline="1px solid rgba(100,116,139,.3)"},R=()=>{let r=Date.now(),k=()=>{if(!m?.isConnected||!D.sheet){T(),Y();return}let P=m.getBoundingClientRect();D.sheet.disabled=!0;let M=m.getBoundingClientRect();D.sheet.disabled=!1,Math.abs(P.width-M.width)<1&&Math.abs(P.height-M.height)<1||Date.now()-r>1500?(T(),Y()):g=e.defaultView.requestAnimationFrame(k)};g=e.defaultView.requestAnimationFrame(k)},$=()=>s?(s=null,e.defaultView?.cancelAnimationFrame(y),T(),b.clear(),i.style.outline="",Y(),!0):!1,j=()=>{if(!s||!a||!h)return;let r=h.split("."),k=Number(r.pop()),P=a.getBoundingClientRect();return s.pointer===null?b.update(P.left,P.top,[...r,String(k+s.steps)].join(".")):b.update(s.x+s.dx,s.y+s.dy)},K=()=>{let r=s;if(!r||!h)return;let k=h,P=p(r);if(!a?.isConnected||Math.abs(r.dx)+Math.abs(r.dy)<3&&!r.steps){$();return}v();let M=r.kind==="move"?j():void 0;if(s=null,e.defaultView?.cancelAnimationFrame(y),i.style.outline="",R(),r.kind==="move"){b.clear(),M&&n({kind:"move",path:k,target:M});return}if(r.kind==="divider"&&u){n({kind:"divider",path:k,width:t(P.width)});return}n({kind:"resize",path:k,...r.kind==="width"||r.kind==="height"?{axis:r.kind}:{},...u?{width:t(P.width),height:u.positioned?Math.round(P.height/u.rowHeight):P.height,grid:!0}:P})},J=r=>{!s||s.pointer!==r.pointerId||(s.dx=r.clientX-s.x,s.dy=r.clientY-s.y,e.defaultView?.cancelAnimationFrame(y),y=e.defaultView.requestAnimationFrame(v))},oe=r=>{!s||s.pointer!==r.pointerId||(s.dx=r.clientX-s.x,s.dy=r.clientY-s.y,K())},G=r=>{if(r.key==="Escape"&&$()){r.preventDefault(),r.stopImmediatePropagation();return}let k=o.get(r.target);if(!k||!a||!h)return;if(r.key==="Enter"&&s){r.preventDefault(),K();return}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r.key)||(r.preventDefault(),r.stopPropagation(),s||re(k,null),!s))return;let P=r.key==="ArrowLeft"||r.key==="ArrowRight",M=r.key==="ArrowLeft"||r.key==="ArrowUp"?-1:1;k==="move"?s.steps+=M:P?s.dx+=M*(u?S():r.shiftKey?40:10):s.dy+=M*(u?.positioned?u.rowHeight:r.shiftKey?40:10),v()};return e.addEventListener("pointermove",J,!0),e.addEventListener("pointerup",oe,!0),e.addEventListener("pointercancel",$,!0),e.addEventListener("keydown",G,!0),e.defaultView?.addEventListener("scroll",Y,!0),e.defaultView?.addEventListener("resize",Y),{select(r,k,P,M){if(s)return;let B=M?.resizable??!0;W={label:M?.label??"Block",parent:M?.parent??"container"},g&&r&&k===h&&m!==r&&(m?.removeAttribute("data-mx-resize-preview"),m=r,r.setAttribute("data-mx-resize-preview",f)),a=r,h=k,u=P,i.style.display=r?"block":"none";let X=r?.nextElementSibling,ie=!!P&&!P.positioned&&!!X&&Math.abs(X.getBoundingClientRect().top-r.getBoundingClientRect().top)<3;for(let[ae,Te]of o)ae.style.display=P?.positioned||Te==="divider"&&!ie||Te==="width"&&ie||!B&&Te!=="move"?"none":"grid";q.style.display=ie&&B?"grid":"none";for(let ae of i.querySelectorAll("button"))ae.setAttribute("aria-description",`${r?.tagName.toLowerCase()??"block"}: ${r?.textContent?.trim().slice(0,80)??""}. Arrow keys adjust; Enter commits; Escape cancels.`);Y()},hover(r){I=r,Q()},cancel:$,dispose(){$(),T(),b.dispose(),D.remove(),E.remove(),i.remove(),l.remove(),e.removeEventListener("pointermove",J,!0),e.removeEventListener("pointerup",oe,!0),e.removeEventListener("pointercancel",$,!0),e.removeEventListener("keydown",G,!0),e.defaultView?.removeEventListener("scroll",Y,!0),e.defaultView?.removeEventListener("resize",Y)}}}var he="p[data-mx-ast],h1[data-mx-ast],h2[data-mx-ast],h3[data-mx-ast],h4[data-mx-ast],h5[data-mx-ast],h6[data-mx-ast],li[data-mx-ast],pre[data-mx-ast]";function vt(e,n,c){let i=[],d=null,a=null,h=new Map,u=0,s=(t,o)=>{let x=e.caretPositionFromPoint?.(t,o);if(x)return{node:x.offsetNode,offset:x.offset};let C=e.caretRangeFromPoint?.(t,o);return C?{node:C.startContainer,offset:C.startOffset}:null},b=e.createElement("div");b.setAttribute("role","status"),b.setAttribute("data-mx-block-status",""),Object.assign(b.style,{position:"fixed",bottom:"20px",left:"50%",transform:"translateX(-50%)",maxWidth:"calc(100vw - 48px)",font:"12px/1.5 system-ui",boxShadow:"0 2px 12px rgba(15,23,42,.06)",zIndex:"46",background:"rgba(255,255,255,.96)",color:"#64748b",padding:"7px 12px",border:"1px solid rgba(100,116,139,.15)",borderRadius:"20px",display:"none"}),e.body.append(b);let D=()=>i.map(t=>t.getAttribute("data-mx-ast")).filter(Boolean),f=()=>{e.defaultView?.cancelAnimationFrame(u),i.forEach(t=>t.removeAttribute("data-mx-block-selected")),i=[];for(let[t,o]of h)o===null?t.removeAttribute("contenteditable"):t.setAttribute("contenteditable",o);h.clear(),b.style.display="none"},E=t=>(t?.nodeType===1?t:t?.parentElement)?.closest(he)??null,m=(t,o)=>{if(!t||!o||t.closest(".ProseMirror")===o.closest(".ProseMirror"))return;let x=[...n.querySelectorAll(he)].filter(O=>!O.parentElement?.closest(he)),C=x.indexOf(t),_=x.indexOf(o);if(C<0||_<0)return;let N=x.slice(Math.min(C,_),Math.max(C,_)+1);if(!(N.length===i.length&&N.every((O,V)=>O===i[V]))){i.forEach(O=>O.removeAttribute("data-mx-block-selected")),i=N;for(let O of n.querySelectorAll(".ProseMirror"))h.has(O)||h.set(O,O.getAttribute("contenteditable")),O.setAttribute("contenteditable","false");i.forEach(O=>O.setAttribute("data-mx-block-selected","")),b.textContent=`${i.length} blocks \xB7 Delete to remove \xB7 Esc to cancel. Text replacement is unavailable across regions.`,b.style.display="block"}},A=()=>{let t=e.defaultView?.getSelection();!t||t.isCollapsed||m(E(t.anchorNode),E(t.focusNode))},y=t=>{!n.contains(t.target)||t.target?.closest?.(ve)||(f(),d=E(t.target),a=d?s(t.clientX,t.clientY):null)},g=t=>{if(!d||!a)return;let o=s(t.clientX,t.clientY),x=E(o?.node??null);if(!(!o||!x)){if(d.closest(".ProseMirror")===x.closest(".ProseMirror")){i.length&&(f(),e.defaultView?.getSelection()?.setBaseAndExtent(a.node,a.offset,o.node,o.offset));return}m(d,x),e.defaultView?.getSelection()?.setBaseAndExtent(a.node,a.offset,o.node,o.offset),t.preventDefault()}},T=t=>{g(t),d&&m(d,E(e.elementFromPoint?.(t.clientX,t.clientY)??t.target));let o=a,x=s(t.clientX,t.clientY);i.length&&o&&x&&(u=e.defaultView.requestAnimationFrame(()=>{i.length&&o.node.isConnected&&x.node.isConnected&&e.defaultView?.getSelection()?.setBaseAndExtent(o.node,o.offset,x.node,x.offset)})),d=null,a=null},H=t=>{if(!(!n.contains(t.target)&&!(i.length&&n.contains(e.defaultView?.getSelection()?.anchorNode??null))||t.target?.closest?.('input,textarea,[role="dialog"]'))){if(t.shiftKey&&["ArrowRight","ArrowDown","ArrowLeft","ArrowUp"].includes(t.key)){let o=e.defaultView?.getSelection(),x=E(o?.focusNode??null),C=x?.closest(".ProseMirror");if(o?.focusNode&&C&&n.contains(C)){let _=e.createRange();_.selectNodeContents(C),_.setEnd(o.focusNode,o.focusOffset);let N=t.key==="ArrowLeft"||t.key==="ArrowUp",O=N?_.toString().length===0:_.toString().length===(C.textContent??"").length,V=[...n.querySelectorAll(he)].filter(U=>!U.parentElement?.closest(he)),q=i.length?N?i[0]:i.at(-1):x,F=q?V[V.indexOf(q)+(N?-1:1)]:null;if(F&&(O||i.length)&&(m(E(o.anchorNode),F),i.length)){o.anchorNode&&o.setBaseAndExtent(o.anchorNode,o.anchorOffset,F,N?0:F.childNodes.length),t.preventDefault(),t.stopImmediatePropagation();return}}}if(i.length){if(t.key==="Escape"){f(),t.preventDefault(),t.stopImmediatePropagation();return}if(t.key==="Delete"||t.key==="Backspace"){let o=D();f(),t.preventDefault(),t.stopImmediatePropagation(),c({kind:"delete",paths:o});return}(t.key.length===1&&!t.ctrlKey&&!t.metaKey||t.key==="Enter")&&(t.preventDefault(),t.stopImmediatePropagation())}}},S=t=>{i.length&&n.contains(t.target)&&(t.preventDefault(),t.stopImmediatePropagation())};return e.addEventListener("selectionchange",A),e.addEventListener("pointerdown",y,!0),e.addEventListener("pointermove",g,!0),e.addEventListener("pointerup",T,!0),e.addEventListener("keydown",H,!0),e.addEventListener("paste",S,!0),e.addEventListener("beforeinput",S,!0),{paths:D,clear:f,dispose(){f(),b.remove(),e.removeEventListener("selectionchange",A),e.removeEventListener("pointerdown",y,!0),e.removeEventListener("pointermove",g,!0),e.removeEventListener("pointerup",T,!0),e.removeEventListener("keydown",H,!0),e.removeEventListener("paste",S,!0),e.removeEventListener("beforeinput",S,!0)}}}var Bt={p:"Paragraph",div:"Container",section:"Section",article:"Article",img:"Image",span:"Text",a:"Link",li:"List item",ul:"Bulleted list",ol:"Numbered list",blockquote:"Quote",table:"Table",button:"Button",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",GridItem:"Grid cell",Question:"Chart"},_e=e=>Bt[e]??e;var de="data-mx-selected",ue="data-mx-embed-selected",le="data-mx-edit-hover",me="data-mx-edit-spotlight",He="data-mx-edit-root",Ft=new Set(["span","strong","b","em","i","a","code","br","small","sup","sub","s","del","u"]),yt=`.mx-rail, .mx-present, ${ve}`;function Tt({win:e,root:n,nodes:c,views:i,activePath:d,commitActive:a,post:h}){let u=e.document,s=null,b=!1,D=null,f=!1,E=null,m=null,A=0,y=p=>n.querySelector(`[${z}="${CSS.escape(p)}"]`),g=vt(u,n,p=>h({type:Ae,command:p})),T=xt(u,p=>{a(),h({type:Ae,command:p})},p=>C(p)),H=new Set,S=(p=!1)=>{let v=p?[...H,...n.querySelectorAll(`[${de}], [${ue}]`)]:H;for(let R of v)R.removeAttribute(de),R.removeAttribute(ue);H.clear()},t=()=>{S();let p=e.getSelection(),v=()=>{T.select(null,null),x()};if(!s||g.paths().length||p&&!p.isCollapsed&&n.contains(p.anchorNode))return v();let R=y(s);if(!R)return v();let $=Oe(R,c());if(R.setAttribute($==="embed"?ue:de,b?"block":"text"),H.add(R),!b)return v();let j=ne(c(),s),K=ne(c(),s.split(".").slice(0,-1).join(".")),J=K?.type==="element"?Object.fromEntries(K.attributes.flatMap(r=>r.value.static?[[r.name,r.value.json]]:[])):{},oe=j?.type==="element"&&j.tag==="GridItem"?{cols:Ze(J.cols),rowHeight:et(J.rowHeight),width:R.parentElement?.getBoundingClientRect().width??R.getBoundingClientRect().width,positioned:J.mode!=="flow"}:void 0,G=j?.type==="element"&&(Ft.has(j.tag)||R.namespaceURI==="http://www.w3.org/2000/svg"&&j.tag!=="svg");T.select(G?null:R,G?null:s,oe,{resizable:j?.type==="element"&&at(j),label:j?.type==="element"?_e(j.tag):"Block",parent:o(s)}),x()},o=p=>{for(let v=p.split(".").slice(0,-1);v.length;v.pop()){let R=ne(c(),v.join("."));if(R?.type!=="element")break;if(!lt(R,ne(c(),v.slice(0,-1).join("."))))return _e(R.tag)}return"document"},x=()=>{let p=!b&&s?y(s):null,v=D??p;T.hover(v&&De(v,c()))},C=p=>{let v=De(p,c())??p,R=u.activeElement;R&&R!==n&&n.contains(R)&&R.blur(),e.getSelection()?.removeAllRanges(),n.setAttribute(He,""),n.hasAttribute("tabindex")||(n.tabIndex=-1),n.focus({preventScroll:!0}),N(ce(v,c()),!0)},_=p=>{let v=ce(p,c());if(!v)return null;for(let $ of i.all)if($.dom.contains(p)){v.inline=ot($.state);break}let R=dt(e,p);return R&&(v.quote=R.quote,v.range=R.range),v},N=(p,v=!1)=>{s=p?.path??null,b=!!p&&v,p&&(p.mode=b?"block":"typing"),t(),h({type:Se,selection:p})},O=()=>{let p=d();if(!s&&!p)return;let v=y(p??s),R=v?_(v):null;R&&(R.mode=b&&!p?"block":"typing"),h({type:Se,selection:R})},V=p=>{let v=p;if(!v?.closest||!n.contains(v)||v.closest(yt))return null;let R=v.closest(`[${z}]`);return R&&ce(R,c())?R:null},q=p=>{D!==p&&(D?.removeAttribute(le),D=p,D?.setAttribute(le,Ce(D)),x())},F=p=>{for(let R of n.querySelectorAll(`[${me}]`))R.removeAttribute(me);let v=null;for(let R of p){let $=y(R);$&&($.setAttribute(me,""),v??=$)}v?.scrollIntoView?.({block:"nearest",behavior:"smooth"})},U=p=>[...i.all].find(v=>v.dom.contains(p)),l=p=>{i.last=U(p.target)??i.last},w=()=>{let p=e.getSelection()?.anchorNode,v=p?.nodeType===1?p:p?.parentElement;if(!v?.closest(".ProseMirror")||!n.contains(v))return;i.last=U(v)??i.last;let R=v.closest(`[${z}]`);R&&N(_(R))},L=p=>!!p?.closest?.(`[${ee}]`),I=p=>{L(p.target)||q(V(p.target))},W=p=>{L(p.relatedTarget)||q(V(p.relatedTarget))},Q=p=>{let v=p.target;if(!v?.closest||!n.contains(v)||v.closest(yt))return;v.closest(".ProseMirror")&&v.closest("a")&&p.preventDefault();let R=e.getSelection();if(R&&!R.isCollapsed&&n.contains(R.anchorNode)){t();return}let $=v.closest(`[${z}]`);if(!$){N(null);return}let j=Ce($);if(j==="block"){ce($,c())&&C($);return}if(j==="container"){let J=R?.anchorNode;J&&$.contains(J)&&u.activeElement?.isContentEditable||N(null);return}let K=_($);K?.kind==="text"&&d()===K.path||N(K)},Y=!1,re=()=>{Y||(Y=!0,e.requestAnimationFrame(()=>{Y=!1,f||O()}))};return u.addEventListener("focusin",l),u.addEventListener("selectionchange",w),u.addEventListener("click",Q,!0),u.addEventListener("pointerover",I,!0),u.addEventListener("pointerout",W,!0),e.addEventListener("scroll",re,{passive:!0}),e.addEventListener("resize",re,{passive:!0}),{selectedPath:()=>s,blockMode:()=>b,blockSelected:()=>g.paths().length>0,selectableAt:V,selectBlock:C,reportSelection:N,describeWithQuote:_,republishRect:O,select:p=>{let v=++A;if(!p.path){N(null);return}let R=p.path,$=()=>{let G=y(R);return G&&p.nodeId&&G.id!==p.nodeId?null:G&&ce(G,c())?G:null},j=G=>{let r=()=>G.scrollIntoView?.({block:"center",behavior:"smooth"});G.localName==="img"&&!G.complete&&G.addEventListener("load",r,{once:!0}),r()},K=$();if(K||!p.reveal){K?C(K):N(null),K&&p.reveal&&j(K);return}let J=0,oe=()=>{if(f||v!==A)return;let G=$();G?(C(G),j(G)):++J<60&&e.setTimeout(oe,25)};e.setTimeout(oe,25)},setSpotlight:F,nodesChanged(){T.cancel(),g.clear(),E===null&&m===null&&(E=e.requestAnimationFrame(()=>{E=null,m=e.setTimeout(()=>{m=null,f||t()},0)})),s&&!Oe(y(s)??u.createElement("div"),c())&&(s=null)},dispose(){f=!0,E!==null&&e.cancelAnimationFrame(E),m!==null&&e.clearTimeout(m),T.dispose(),g.dispose(),u.removeEventListener("focusin",l),u.removeEventListener("selectionchange",w),u.removeEventListener("click",Q,!0),u.removeEventListener("pointerover",I,!0),u.removeEventListener("pointerout",W,!0),e.removeEventListener("scroll",re),e.removeEventListener("resize",re),S(!0),q(null),F([]),s=null}}}function At(e){if(!e)return null;for(let n of Array.from(e.items??[])){if(n.kind!=="file")continue;let c=n.getAsFile();if(c&&c.type.startsWith("image/"))return c}for(let n of Array.from(e.files??[]))if(n.type.startsWith("image/"))return n;return null}var Ee="data-mx-drop-replace",St="outline: 2px dashed rgba(100, 116, 139, 0.9) !important; outline-offset: 3px !important; opacity: 0.75 !important;",Gt="data-mx-drop-replace-label",Vt=new Set(["span","strong","b","em","i","a","code","br","small","sup","sub","s","del","u","mark"]);function wt({win:e,root:n,nodes:c,selectedPath:i,selectableAt:d,selectImage:a,post:h}){let u=e.document,s=t=>{let o=t?ne(c(),t):null;return o?.type==="element"&&!o.isComponent&&o.tag==="img"},b=t=>{let o=d(t);return o&&o.localName==="img"&&s(o.getAttribute(z))?o:null},D=null,f=null,E=t=>{if(t!==D){if(D?.removeAttribute(Ee),f?.remove(),f=null,D=t,!t)return;t.setAttribute(Ee,""),f=u.createElement("div"),f.setAttribute(Gt,""),f.setAttribute("aria-hidden","true"),f.textContent="Drop to replace",Object.assign(f.style,{position:"fixed",zIndex:"46",pointerEvents:"none",transform:"translate(-50%, -50%)",padding:"4px 10px",borderRadius:"999px",background:"rgba(15, 23, 42, 0.78)",color:"#fff",font:"500 12px/1.4 system-ui, sans-serif",whiteSpace:"nowrap"}),u.body.append(f)}if(t&&f){let o=t.getBoundingClientRect();f.style.left=`${o.x+o.width/2}px`,f.style.top=`${o.y+o.height/2}px`}},m=t=>{let o=ne(c(),t.getAttribute(z)??"");return o?.type==="element"&&Vt.has(o.tag)},A=(t,o)=>{let x=d(t);for(;x&&m(x);)x=d(x.parentElement);if(!x)return null;let C=[...x.querySelectorAll(`[${z}]`)].filter(O=>O.parentElement?.closest(`[${z}]`)===x&&!m(O)),_=O=>{let V=O.getBoundingClientRect();return o<V.top+V.height/2?"before":"after"};if(C.length===0)return{path:x.getAttribute(z),side:_(x)};let N=C.find(O=>_(O)==="before");return N?{path:N.getAttribute(z),side:"before"}:{path:C[C.length-1].getAttribute(z),side:"after"}},y=t=>{let o=b(t.target);o&&(t.preventDefault(),a(o),h({type:ze,path:o.getAttribute(z)}))},g=t=>{let o=t.target===u.body||t.target===u.documentElement,x=t.type==="paste"&&o&&s(i());if(!n.contains(t.target)&&!x)return;let C="clipboardData"in t?t.clipboardData:t.dataTransfer,_=At(C);if(t.type==="drop"&&E(null),!_)return;t.preventDefault();let N=i(),O=t.type==="drop"?b(t.target)?.getAttribute(z):s(N)?N:null,V=!O&&t.type==="drop"?{at:A(t.target,t.clientY)}:{};h({type:je,file:_,...O?{target:O}:{},...V})},T=t=>{if(!n.contains(t.target)){E(null);return}let o=!!t.dataTransfer?.types?.includes("Files");o&&t.preventDefault(),E(o?b(t.target):null)},H=t=>{if(!D)return;let o=t.relatedTarget;(!o||!D.contains(o))&&E(null)},S=()=>E(null);return u.addEventListener("paste",g,!0),u.addEventListener("drop",g,!0),u.addEventListener("dragover",T,!0),u.addEventListener("dragleave",H,!0),u.addEventListener("dragend",S,!0),u.addEventListener("dblclick",y,!0),{dispose(){u.removeEventListener("paste",g,!0),u.removeEventListener("drop",g,!0),u.removeEventListener("dragover",T,!0),u.removeEventListener("dragleave",H,!0),u.removeEventListener("dragend",S,!0),u.removeEventListener("dblclick",y,!0),E(null)}}}function kt({win:e,root:n,views:c,channel:i,post:d,republishRect:a}){let h=e.document,u=D=>n.querySelector(`[${z}="${CSS.escape(D)}"]`);return{applyFormat:(D,f,E)=>{let m=u(D);if(!m)return;let A=[...c.all].find(y=>y.dom.contains(m));if(A&&f!==void 0){let y=null;if(A.state.doc.descendants((g,T)=>{A.nodeDOM(T)===m&&(y=T)}),y!==null){let g=A.state.doc.nodeAt(y),T=g.attrs.source,H=(T?.attributes??[]).filter(S=>!["class","className"].includes(S.name));f&&H.push({name:"className",value:{static:!0,json:f},start:0,end:0}),A.dispatch(A.state.tr.setNodeMarkup(y,void 0,{...g.attrs,source:{...T,attributes:H}}).setMeta("mx-command",!0)),a();return}}f!==void 0&&(f.trim()?m.setAttribute("class",f):m.removeAttribute("class")),E!==void 0&&(E.trim()?m.setAttribute("style",E):m.removeAttribute("style")),a()},applyLink:(D,f)=>{let E=c.last;if(E&&c.all.has(E)){let{from:g,to:T}=E.state.selection,H=E.state.tr,S=f?Re(f):null;if(f&&!S)return;E.state.doc.nodesBetween(g,T,t=>{for(let o of t.marks)o.attrs.tag==="a"&&H.removeMark(g,T,o)}),S&&H.addMark(g,T,tt.marks.inline.create({tag:"a",source:{type:"element",tag:"a",isComponent:!1,attributes:[{name:"href",value:{static:!0,json:S},start:0,end:0}],children:[],selfClosing:!1,start:0,end:0}})),E.dispatch(H.setMeta("mx-command",!0)),E.focus();return}let m=u(D);if(!m)return;let A=e.getSelection();if(!A||A.rangeCount===0)return;let y=A.getRangeAt(0);if(m.contains(y.commonAncestorContainer)){if(f){let g=Re(f);if(!g||!(g.startsWith("https://")||g.startsWith("http://")||g.startsWith("mailto:")||g.startsWith("tel:")||g.startsWith("/")||g.startsWith("#")))return;let T=h.createElement("a");T.setAttribute("href",g),T.setAttribute("target","_blank"),T.setAttribute("rel","noopener noreferrer");try{y.surroundContents(T)}catch{return}}else{let g=y.commonAncestorContainer.parentElement?.closest?.("a")??y.commonAncestorContainer.closest?.("a");if(!g)return;g.replaceWith(...Array.from(g.childNodes))}d({type:be,path:D,innerHtml:i.innerHtmlOf(m)})}}}}var te="data-mx-parent-layout",jt=[".ProseMirror { outline: none; white-space: pre-wrap; overflow-wrap: break-word; }",`[${te}="flex"], [${te}="grid"], [${te}] > .mx-prose-region, [${te}="flex"] > .mx-prose-region > .ProseMirror, [${te}="grid"] > .mx-prose-region > .ProseMirror { flex-direction: inherit; flex-wrap: inherit; justify-content: inherit; justify-items: inherit; align-items: inherit; align-content: inherit; row-gap: inherit; column-gap: inherit; grid-template-columns: inherit; grid-template-rows: inherit; grid-auto-flow: inherit; grid-auto-columns: inherit; grid-auto-rows: inherit; }`,`[${te}="flex"] > .mx-prose-region > .ProseMirror { display: flex; flex: 1 1 auto; align-self: stretch; min-width: 0; }`,`[${te}="grid"] > .mx-prose-region > .ProseMirror { display: grid; grid-column: 1 / -1; min-width: 0; }`,`[${te}="item"] > .mx-prose-region > .ProseMirror { grid-column-start: var(--mx-place-grid-column-start, auto); grid-column-end: var(--mx-place-grid-column-end, auto); grid-row-start: var(--mx-place-grid-row-start, auto); grid-row-end: var(--mx-place-grid-row-end, auto); flex-grow: var(--mx-place-flex-grow, 0); flex-shrink: var(--mx-place-flex-shrink, 1); flex-basis: var(--mx-place-flex-basis, auto); align-self: var(--mx-place-align-self, auto); justify-self: var(--mx-place-justify-self, auto); order: var(--mx-place-order, 0); min-width: 0; }`,`[data-mx-edit-region]:not([${te}]) > .mx-prose-region > .ProseMirror > table { content-visibility: auto; contain-intrinsic-block-size: auto var(--mx-region-h, 480px); }`,'[contenteditable="true"]:focus { outline: none; }',`[${le}="block"][${le}] { cursor: pointer; }`,`[${le}="container"][${le}] { cursor: default; }`,`[${He}]:focus { outline: none; }`,`[${de}="block"][${de}], [${ue}="block"][${ue}] { ${Z.editSelectedCss} }`,`[data-mx-block-selected][data-mx-block-selected] { ${Z.editSelectedCss} }`,`[${me}][${me}] { ${Z.spotlightCss} }`,`[${Ee}][${Ee}] { ${St} }`].join(`
4
4
  `),zt="data-mx-edit-css",Yt=(e,n)=>!!e&&e.anchor.id===n.anchor.id&&e.anchor.offset===n.anchor.offset&&e.head.id===n.head.id&&e.head.offset===n.head.offset;function Ne(e,n){if(e===n)return!0;if(typeof e!="object"||typeof n!="object"||e===null||n===null)return!1;if(Array.isArray(e)){if(!Array.isArray(n)||e.length!==n.length)return!1;for(let d=0;d<e.length;d++)if(!Ne(e[d],n[d]))return!1;return!0}if(Array.isArray(n))return!1;let c=Object.keys(e).filter(d=>e[d]!==void 0),i=Object.keys(n).filter(d=>n[d]!==void 0);if(c.length!==i.length)return!1;for(let d of c)if(!Ne(e[d],n[d]))return!1;return!0}function $n({win:e,channel:n,requestRender:c,root:i,mountCompiled:d}){let a=e.document,h=[],u=null,s=!1,b=!1,D=l=>{(e.scrollX!==l.x||e.scrollY!==l.y)&&e.scrollTo(l.x,l.y)},f={all:new Set,last:null},E=null,m=null,A,y=null,g,T,H=()=>{if(A){if(A!==g){let l=[...f.all].find(w=>!w.isDestroyed&&w.hasFocus());if(l&&Yt(xe(l.state),A)){A=void 0;return}}for(let l of f.all)if(it(l,A)){g&&(T=JSON.stringify(xe(l.state))),A=void 0;break}}},S=l=>n.post({...l,nonce:n.nonce}),t=l=>i.querySelector(`[${z}="${CSS.escape(l)}"]`),o=Tt({win:e,root:i,nodes:()=>h,views:f,activePath:()=>u?.path??null,commitActive:()=>C(u),post:S}),x=l=>{l!==s&&(s=l,S({type:Ve,active:l}))},C=l=>{if(!l||!l.userEdited)return!1;let w=n.innerHtmlOf(l.el);return w===l.snapshot?!1:(l.snapshot=w,l.userEdited=!1,x(!1),S({type:be,path:l.path,innerHtml:w}),!0)},_={onFocus(l,w){f.last=null,u={path:l,el:w,snapshot:n.innerHtmlOf(w),userEdited:!1},o.reportSelection(o.describeWithQuote(w))},onInput(l){u&&(u.userEdited=!0),x(!0)},onBlur(l){let w=u;u=null,C(w),x(!1),c()}},N=Et(e),O=l=>{if(!i.contains(l.target)||l.key.startsWith("Arrow")&&!o.blockSelected()&&mt(l,{regions:ut(i,f.all),selection:e.getSelection(),geometry:N}))return;if(l.key==="Escape"){if(l.target?.closest?.('dialog, [role="dialog"], [role="menu"], [role="listbox"]'))return;let L=o.selectedPath(),I=L&&t(L);if(!I){S({type:we,key:"Escape"});return}if(l.preventDefault(),!o.blockMode()){o.selectBlock(I);return}let W=ct(I,h).at(-1),Q=W&&t(W.path);Q?o.selectBlock(Q):o.reportSelection(null);return}if(l.key!=="Delete"&&l.key!=="Backspace"||u)return;let w=a.activeElement;w&&w.isContentEditable||o.selectedPath()&&(l.preventDefault(),S({type:we,key:l.key}))};a.addEventListener("keydown",O,!0);let V=wt({win:e,root:i,nodes:()=>h,selectedPath:o.selectedPath,selectableAt:o.selectableAt,selectImage:l=>o.reportSelection(o.describeWithQuote(l)),post:S}),q=l=>{l.defaultPrevented||!u?.el.contains(l.target)||!l.clipboardData?.getData("text/html")||(l.preventDefault(),S({type:"mx:edit-error",message:"This element supports typing and plain-text paste. Use a regular paragraph for formatted paste."}))};a.addEventListener("paste",q,!0);let F=a.createElement("style");F.setAttribute(zt,""),F.textContent=jt,a.head.appendChild(F),S({type:Ie});let U=kt({win:e,root:i,views:f,channel:n,post:S,republishRect:o.republishRect});return{canApplyDraft(){return!s&&!u?.userEdited},reconcileDraft(l,w,L,I,W){return!b&&!!E?.reconcile(l,w,L,I,W)},holdUnchanged(l,w){if(m?.dispose(),m=null,b||!E)return new Map;for(let L of f.all)pe(L);return y={x:e.scrollX,y:e.scrollY},m=E.hold(l,w),m.stands},prepareHold(l,w,L){if(b||!E)return!0;for(let I of f.all)pe(I);return E.prepareHold(l,w,L)},releaseHeld(){m?.release(),m=null,y=null},unmountCompiledDom(){y??={x:e.scrollX,y:e.scrollY};for(let I of f.all)pe(I);let l=a.activeElement instanceof HTMLElement&&!!a.activeElement.closest('[aria-label="Typography toolbar"]'),w=[...f.all].find(I=>I.hasFocus())??(l?f.last:null),L=w?xe(w.state):void 0;g&&(T===void 0||T===JSON.stringify(L))?A=g:L&&!A&&(A=L),g=T=void 0,E?.dispose(),E=null,f.all.clear()},async mountCompiledDom(){if(b)return;let l=y??{x:e.scrollX,y:e.scrollY};y=null,E?.dispose();let w=m??void 0;m=null,E=d(i,h,{onFlow(L,I,W,Q,Y){g=T=void 0,S({type:Fe,path:L,expected:I,replacement:W,group:Q,selection:Y})},onLayout(L){S({type:We,rects:L})},onSlideTitle(L,I){S({type:ke,path:L,title:I})},onOpenScript(L){S({type:Ge,component:L})},onError(L){S({type:"mx:edit-error",message:L})},onBusy:x,onView(L){if(L)f.all.add(L),f.last=L,e.requestAnimationFrame(H);else for(let I of[...f.all])I.dom.isConnected||f.all.delete(I)},onHostFocus:_.onFocus,onHostInput:_.onInput,onHostBlur:_.onBlur},w),e.requestAnimationFrame(()=>e.requestAnimationFrame(()=>{b||D(l)}))},renameSlide(l,w){S({type:ke,path:l,title:w})},setNodes(l){if(l!==h){if(Ne(l,h)){h=l;return}h=l,o.nodesChanged()}},onParentMessage(l){let w=f.last&&f.all.has(f.last)?f.last:null;switch(l.type){case $e:w&&(w.dispatch(rt(w.state,l.tag).setMeta("mx-command",!0)),w.focus());break;case Be:if(w)try{let L=st(l.kind,l.value),I=w.state.tr;w.dispatch((w.state.selection.$from.parent.attrs.tag==="pre"?I.insertText(l.value):I.replaceSelection(nt(L))).setMeta("uiEvent","paste")),w.focus()}catch(L){S({type:"mx:edit-error",message:L instanceof Error?L.message:"Paste could not be inserted."})}else S({type:"mx:edit-error",message:"Select a regular text paragraph before inserting Markdown."});break;case Ye:U.applyFormat(l.path,l.className,l.style);break;case Ke:U.applyLink(l.path,l.href);break;case qe:if(l.restore){A=g=l.restore,e.requestAnimationFrame(H);break}for(let L of f.all)pe(L);C(u),S({type:Je});break;case Xe:o.select(l);break;case Ue:o.setSpotlight(l.paths);break;default:break}},dispose(){E?.dispose(),E=null,m?.dispose(),m=null,b=!0,o.dispose(),C(u),u=null,x(!1),a.removeEventListener("keydown",O,!0),a.removeEventListener("paste",q,!0),V.dispose(),F.remove()}}}export{$n as createFrameEditSession};
@@ -0,0 +1 @@
1
+ import{a as _}from"./chunk-RDT3C3F6.js";import"./chunk-4O7LVK2Q.js";import"./chunk-7T3V6PAW.js";import"./chunk-BYXBJQAS.js";import"./chunk-7AB63FHW.js";import{b as x,c as N}from"./chunk-QVSMXME5.js";import"./chunk-JABILGJZ.js";import"./chunk-7PMY7F6T.js";import"./chunk-RXGLTQLL.js";import"./chunk-OOJM4CTU.js";var B=new Set(["address","article","aside","blockquote","details","dialog","div","dl","dd","dt","fieldset","figcaption","figure","footer","header","hr","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","ul"]),M=new Set(["button","template","table","td","th","caption","object","marquee","applet"]),z=new Set(["blockquote","dd","div","dl","dt","h1","h2","h3","h4","h5","h6","hr","li","ol","p","pre","table","ul"]),J=t=>t.type==="element";function E(t,e=!1){return t.some(n=>{if(!J(n))return!1;if(n.isComponent)return n.tag==="For"&&(!e||E(n.children,e));let r=n.tag.toLowerCase();return(e?z:B).has(r)?!0:M.has(r)?!1:E(n.children,e||r==="svg")})}function A(t){let e=!1,n=t.map(r=>{if(!J(r))return r;let s=A(r.children),i=!r.isComponent&&r.tag.toLowerCase()==="p"&&E(r.children);return!i&&s===r.children?r:(e=!0,{...r,...i?{tag:"div"}:{},children:s})});return e?n:t}var O="(max-width: 640px) 100vw, 768px";var G=[["img","src",!1],["File","src",!0]],H=/^https?:\/\//i;function V(t){try{return new URL(t).href}catch{return t}}var q=t=>N(V(t)),K=t=>{let e=(t??"").split("/").pop()??"";return/^[0-9a-f]{8}/.test(e)?e.slice(0,8):null};function k(t,e){let n=`/assets/${q(t)}`,r=e&&typeof e=="object"?K(e.object_key):null;return r?`${n}?v=${r}`:n}var Z=(t,e)=>{let n=k(t,e);return`${n}${n.includes("?")?"&":"?"}w=${e.small_width}`};function Q(t,e){let{width:n,small_width:r}=e;return!e.small_object_key||!r||!n||n<=r?null:`${Z(t,e)} ${r}w, ${k(t,e)} ${n}w`}var X=2;var C=(t,e)=>{for(let n of t)n.type==="element"&&(e(n),C(n.children,e))},$=t=>G.filter(([e,,n])=>t.isComponent===n&&(n?t.tag===e:t.tag.toLowerCase()===e)).map(([,e])=>e),p=(t,e)=>t.attributes.find(n=>n.name.toLowerCase()===e.toLowerCase()),U=(t,e)=>{let n=p(t,e);return!n||!n.value.static||typeof n.value.json!="string"?null:H.test(n.value.json)?n.value.json:null};function d(t,e,n){let r=p(t,e);if(r){r.value={static:!0,json:n};return}t.attributes.push({name:e,value:{static:!0,json:n},start:t.start,end:t.start})}function v(t,e,n={}){let r=!1;if(C(t,o=>{for(let h of $(o)){let f=U(o,h);f&&e(f)&&(r=!0)}}),!r)return t;let s=0,i=structuredClone(t);return C(i,o=>{let f=!o.isComponent&&o.tag.toLowerCase()==="img"?s++:-1;for(let y of $(o)){let c=U(o,y);if(!c)continue;let a=e(c);if(!a||(d(o,y,k(c,a)),y!=="src"||o.isComponent||typeof a!="object")||(a.width&&a.height&&!p(o,"width")&&!p(o,"height")&&(d(o,"width",String(a.width)),d(o,"height",String(a.height))),a.placeholder&&!p(o,"style")&&d(o,"style",{backgroundImage:`url(${a.placeholder})`,backgroundSize:"cover",backgroundRepeat:"no-repeat"}),n.capture))continue;let g=p(o,"srcset")||p(o,"sizes")?null:Q(c,a);g&&(d(o,"srcSet",g),d(o,"sizes",O)),f>=X&&!p(o,"loading")&&(d(o,"loading","lazy"),p(o,"decoding")||d(o,"decoding","async"))}}),i}var Y=/url\(\s*(['"]?)(https?:\/\/[^'")\s]+)\1\s*\)/gi;function L(t,e){return t.replace(Y,(n,r,s)=>{let i=e(s);return i?`url(${r}${k(s,i)}${r})`:n})}function W(t,e,n){return P(x(t),e,n)}function P(t,e,n){if(!t.ok)return null;let{content:r,body:s}=_(A(t.nodes));return e?{content:r.style?{...r,style:L(r.style,e)}:r,body:v(s,e,n)}:{content:r,body:s}}var F=6,m=[];function j(t){let e=m.findIndex(s=>s.source===t);if(e>=0){let[s]=m.splice(e,1);return m.unshift(s),s.result}let n=m.find(s=>s.result.ok),r=n&&tt(n.source,n.result,t)||x(t);return m.unshift({source:t,result:r}),m.length>F&&(m.length=F),r}function I(t,e){return t.type!=="element"?{...t,start:t.start+e,end:t.end+e}:{...t,start:t.start+e,end:t.end+e,attributes:t.attributes.map(n=>({...n,start:n.start+e,end:n.end+e})),children:t.children.map(n=>I(n,e))}}function tt(t,e,n){if(!e.ok)return null;let r=Math.min(t.length,n.length),s=0;for(;s<r&&t.charCodeAt(s)===n.charCodeAt(s);)s++;let i=0;for(;i<r-s&&t.charCodeAt(t.length-1-i)===n.charCodeAt(n.length-1-i);)i++;let o=t.length-i,h=n.length-t.length,f=c=>{let a=c.findIndex(u=>u.start<=s&&o<=u.end),l=c[a];if(!l||l.type!=="element"||l.control)return null;let g=l.children,R=null;if(g.length&&g[0].start<=s&&o<=g.at(-1).end){let u=f(g);u&&(R={...l,end:l.end+h,children:u})}if(!R){if(!(l.start<s&&o<l.end))return null;let u=n.slice(l.start,l.end+h),S=x(u),b=S.ok&&S.nodes.length===1?S.nodes[0]:null;if(!b||b.type!=="element"||b.control||b.start!==0||b.end!==u.length)return null;R=I(b,l.start)}return[...c.slice(0,a),R,...c.slice(a+1).map(u=>I(u,h))]},y=f(e.nodes);return y?{ok:!0,nodes:y}:null}function Pt(t,e){return T(W(t,e))}function It(t,e){let n=w.find(s=>s.source===t&&s.assets===e);if(n)return n.parts;let r=T(P(j(t),e));return w.unshift({source:t,assets:e,parts:r}),w.length>4&&(w.length=4),r}var w=[];function T(t){if(!t)return null;let{content:e,body:n}=t;return{nodes:n,authorCss:e.style??null,authorScript:e.script??null,declarations:JSON.stringify({imports:e.imports.map(r=>({...r,start:0,end:0})),values:e.values.map(r=>({...r,start:0,end:0})),queries:e.queries.map(r=>({...r,start:0,end:0})),notifications:(e.notifications??[]).map(r=>({...r,start:0,end:0})),mutations:e.mutations.map(r=>({...r,start:0,end:0}))})}}export{Pt as storyUpdateParts,It as storyUpdatePartsShared};