decocms 4.113.3 → 4.114.0

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 (437) hide show
  1. package/dist/client/assets/{AlertCircle-C3yBEe62.js → AlertCircle-u3-jN7cm.js} +1 -1
  2. package/dist/client/assets/{AreaChart-infhzD-o.js → AreaChart-BW8WzRm-.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-csX1J00v.js → ArrowRight-mNj20Zjh.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-BMUqiZDH.js → ArrowUp-L9cgM-6a.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-B0lTHBei.js → ArrowUpRight-H1UBXt5Z.js} +1 -1
  6. package/dist/client/assets/{Check-BOCHVTek.js → Check-CaYU5aLO.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-C06fMtNJ.js → CheckCircle-CMKcMKAK.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-yHcuw3Yi.js → ChevronDown-CX9YkMBs.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-BvtCGcbv.js → ChevronRight-DbHUX8I-.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-ClBbaiAV.js → ChevronUp-DIB-4lf0.js} +1 -1
  11. package/dist/client/assets/{Copy01-DjMityLv.js → Copy01-CjNrDuBL.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-C4ZbABhl.js → DotsVertical-Bp1NHhTP.js} +1 -1
  13. package/dist/client/assets/{Eye-Drm0H5R_.js → Eye-FOTe0Dsm.js} +1 -1
  14. package/dist/client/assets/{FilterLines-DqKeoryA.js → FilterLines-BZTwbbeF.js} +1 -1
  15. package/dist/client/assets/{Globe01-BQOw_Ub7.js → Globe01-DOxk62wN.js} +1 -1
  16. package/dist/client/assets/{Globe04-CGcQW0g-.js → Globe04-9hsl-3e6.js} +1 -1
  17. package/dist/client/assets/{HardDrive-CWWkxzA_.js → HardDrive-ynMUj-ia.js} +1 -1
  18. package/dist/client/assets/{Image01-DlFSq1lp.js → Image01-av9S7TeF.js} +1 -1
  19. package/dist/client/assets/{Key01-DrW6AdUh.js → Key01-CwuF_1BL.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DcUppE8c.js → LayoutLeft-D_cBv5Sy.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-BboRX9pE.js → LinkExternal01-B1nrIFqo.js} +1 -1
  22. package/dist/client/assets/{LogOut01-BB-7O4XA.js → LogOut01-BZi_DqYW.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CcN96Otm.js → Monitor01-ymd1mMPU.js} +1 -1
  24. package/dist/client/assets/{Package-BzQD_Ty_.js → Package-CM9ahKwn.js} +1 -1
  25. package/dist/client/assets/{Palette-Blkp2e-R.js → Palette-Ct1p9svP.js} +1 -1
  26. package/dist/client/assets/{Play-D8x6tbEi.js → Play-DVEIH1ry.js} +1 -1
  27. package/dist/client/assets/{Plus-CzNYCMBF.js → Plus-B2hbLmYg.js} +1 -1
  28. package/dist/client/assets/{SearchLg-ChhVm0Qf.js → SearchLg-CtS3seao.js} +1 -1
  29. package/dist/client/assets/{SearchMd-CTSIioHN.js → SearchMd-D3MjkhDD.js} +1 -1
  30. package/dist/client/assets/{Settings02-Cw_4rjJK.js → Settings02-BetwzLEO.js} +1 -1
  31. package/dist/client/assets/{Shield01-DSa5H3Oo.js → Shield01-BAlJAwp4.js} +1 -1
  32. package/dist/client/assets/{Star01-D85zX6Wg.js → Star01-Cp-5Xhim.js} +1 -1
  33. package/dist/client/assets/{Stars01-DTnCAiJN.js → Stars01-CvaXntTQ.js} +1 -1
  34. package/dist/client/assets/{Stars02-BOwVjfZL.js → Stars02-DyviDCrE.js} +1 -1
  35. package/dist/client/assets/{Sun-BgpgdJOh.js → Sun-Y3l5BCJc.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-DdzfKexZ.js → SwitchHorizontal01-q1XlSXKm.js} +1 -1
  37. package/dist/client/assets/{Tool01-BHPElJg3.js → Tool01-DiRWeEXb.js} +1 -1
  38. package/dist/client/assets/{Tool02-B1WxUTRS.js → Tool02-aqrHyC0g.js} +1 -1
  39. package/dist/client/assets/{Trash01-CQs4hG5x.js → Trash01-COnrCNth.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-Cjtdx_Mr.js → TrendUp01-Bn-PWo-g.js} +1 -1
  41. package/dist/client/assets/{Upload01-2aufxkFJ.js → Upload01-DGTw7Jar.js} +1 -1
  42. package/dist/client/assets/{User01-qg2q5EXG.js → User01-BIMIGJ25.js} +1 -1
  43. package/dist/client/assets/{Users01-DecEGc0z.js → Users01-CZUvnM1S.js} +1 -1
  44. package/dist/client/assets/{Users03-DvyrEhaR.js → Users03-CVsX8nJx.js} +1 -1
  45. package/dist/client/assets/{X-ByT759cs.js → X-DNu2-GhF.js} +1 -1
  46. package/dist/client/assets/{XCircle-bCCgCduZ.js → XCircle-C_rSb0eR.js} +1 -1
  47. package/dist/client/assets/{XClose-CZnGWolh.js → XClose-DW-dDUEB.js} +1 -1
  48. package/dist/client/assets/{Zap-CqiaHzzF.js → Zap-De1_wbpV.js} +1 -1
  49. package/dist/client/assets/{ZapSquare-c0rQSrXf.js → ZapSquare-Bp4aYGIH.js} +1 -1
  50. package/dist/client/assets/{ZoomOut-CrXsudJp.js → ZoomOut-BgItYrX3.js} +1 -1
  51. package/dist/client/assets/{access-gate-v1EkWw_v.js → access-gate-CvPG2rlY.js} +1 -1
  52. package/dist/client/assets/{add-section-modal-CCmZDfGj.js → add-section-modal-BA2tqrcH.js} +1 -1
  53. package/dist/client/assets/{agent-icon-BOnTghRl.js → agent-icon-CtZCFShI.js} +1 -1
  54. package/dist/client/assets/{agents-list-Bh9Nz4Fw.js → agents-list-j6YU2i_U.js} +1 -1
  55. package/dist/client/assets/{ai-providers-B78j6u61.js → ai-providers-DLZzYNyZ.js} +1 -1
  56. package/dist/client/assets/{alert-D-rAiL9n.js → alert-EAq1jY4N.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-BV1C1gcm.js → alert-dialog-aAfJenSo.js} +1 -1
  58. package/dist/client/assets/{app-editor-0kysJGlw.js → app-editor-az0PkUZQ.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-OgqNGUQu.js → auth-catchall-DBwvY4WS.js} +1 -1
  60. package/dist/client/assets/{auth-entry-Bu-wAE4C.js → auth-entry-BPBAWmPC.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-BPjEQYcT.js → auth-split-layout-DDWwxUG2.js} +1 -1
  62. package/dist/client/assets/{auth-DrixEdZV.js → auth-uUmd_yUz.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-trH0piDT.js → authenticate-and-persist-oauth-nQ-5iboz.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-Hhbhn6Ve.js → automation-list-row-DLSYuPO0.js} +1 -1
  65. package/dist/client/assets/{automation-runs-Cl8NKzOf.js → automation-runs-BvVxkEL_.js} +1 -1
  66. package/dist/client/assets/{automations-C0XROIdQ.js → automations-Dg5iM9D-.js} +1 -1
  67. package/dist/client/assets/{autosend-bk9SGLB7.js → autosend-DNGUJUeU.js} +1 -1
  68. package/dist/client/assets/{avatar-TfVrzXcD.js → avatar-yTPDq5I2.js} +1 -1
  69. package/dist/client/assets/{badge-Dq8tKfND.js → badge-BYYz59-0.js} +1 -1
  70. package/dist/client/assets/{block-document-CSSMbpaN.js → block-document-D_2P8u2S.js} +1 -1
  71. package/dist/client/assets/{brand-context-BpSXT9j1.js → brand-context-BdmZewbA.js} +1 -1
  72. package/dist/client/assets/{buckets-CSQzXH56.js → buckets-BalCtIX4.js} +1 -1
  73. package/dist/client/assets/{bulk-category-panel-BnemcYrz.js → bulk-category-panel-CziXKZ4f.js} +1 -1
  74. package/dist/client/assets/{calendar-C4A-LflQ.js → calendar-DWFDhFNo.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-BVansliv.js → capability-load-error-BVSx_lmj.js} +1 -1
  76. package/dist/client/assets/{card-CYIXg6Tz.js → card-C3QUqs2n.js} +1 -1
  77. package/dist/client/assets/{category-editor-CQlm8YTD.js → category-editor-yjOQrzEJ.js} +1 -1
  78. package/dist/client/assets/{chat-context-C0qm1cNd.js → chat-context-DZnGXN4a.js} +1 -1
  79. package/dist/client/assets/{checkbox-CJlLtjz4.js → checkbox-CBFK8MAq.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-xyy-6T0v.js → cli-auth-success-2A3RVtIL.js} +1 -1
  81. package/dist/client/assets/{collection-detail-Ber5gOC6.js → collection-detail-Fw_SCIDN.js} +1 -1
  82. package/dist/client/assets/{collection-display-button-_9VLEjYD.js → collection-display-button-CMt3Z67p.js} +1 -1
  83. package/dist/client/assets/{collection-search-DMVP7tq9.js → collection-search-B9mHZ3UO.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-CfaNknkJ.js → collection-table-wrapper-C2UsHzHD.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-BYtcgqcY.js → collection-tabs-BDkyuUR4.js} +1 -1
  86. package/dist/client/assets/{command-55Q776qF.js → command-BPpRMP2H.js} +1 -1
  87. package/dist/client/assets/{commerce-onboarding-CwQohRCA.js → commerce-onboarding-C0k3wy77.js} +1 -1
  88. package/dist/client/assets/{companions-core-BsogTMm0.js → companions-core-DiyBwoGG.js} +1 -1
  89. package/dist/client/assets/{connect-Dzubmbm6.js → connect-D2oqeqWc.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-BRyqkebt.js → connect-desktop-dialog-DNUW6BIf.js} +1 -1
  91. package/dist/client/assets/{connection-card-CnHj36QW.js → connection-card-QCEeFg-E.js} +1 -1
  92. package/dist/client/assets/{connection-detail-DioIwvgq.js → connection-detail-BuvcWRak.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-C36oVpDa.js → connection-form-helpers--HrBI-cC.js} +1 -1
  94. package/dist/client/assets/{connections-CMhMeidX.js → connections-CWtydlE_.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-DbXyz4b2.js → decopilot-sse-pool-D68vKjC2.js} +1 -1
  96. package/dist/client/assets/{dialog-Mssh4wvU.js → dialog-CrWMCat9.js} +1 -1
  97. package/dist/client/assets/{domain-settings-D5jbLq0-.js → domain-settings-qXQKOoeU.js} +1 -1
  98. package/dist/client/assets/{drawer-Df2dZjAh.js → drawer-DVTkiBrG.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-BOgizJmB.js → dropdown-menu-CWVq2kdv.js} +1 -1
  100. package/dist/client/assets/{empty-state-CajaBMj9.js → empty-state-BtX-gDuD.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-Bd7ZbKmz.js → extract-connection-data-DfO_43Ui.js} +1 -1
  102. package/dist/client/assets/{file-explorer-C0-F0HB8.js → file-explorer-nlzTvV0U.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-DeZBzLiN.js → file-type-icon-Blhm8rpp.js} +1 -1
  104. package/dist/client/assets/{files-DMRbcRYD.js → files-CB-VCQ9J.js} +1 -1
  105. package/dist/client/assets/{form-a5EhWS__.js → form-JvR3caoV.js} +1 -1
  106. package/dist/client/assets/{general-BXzwd9kr.js → general-ofhGwPwk.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-BF2G7ylb.js → github-repo-picker-BzqT9Pn1.js} +1 -1
  108. package/dist/client/assets/{hooks-BYKqudQZ.js → hooks-CX-tJdCi.js} +1 -1
  109. package/dist/client/assets/{index-DKYptawH.js → index-BF9MIXYh.js} +1 -1
  110. package/dist/client/assets/{index-i4iJK1qu.js → index-BQKAFkvb.js} +3 -3
  111. package/dist/client/assets/{index-wa1mGSJt.js → index-Bl8jlw7D.js} +5 -5
  112. package/dist/client/assets/{index-D3QnFu3t.js → index-Bm91_nbV.js} +3 -3
  113. package/dist/client/assets/{index-D6Qe38nY.js → index-BuHs6OTD.js} +1 -1
  114. package/dist/client/assets/{index-D0XkAkng.js → index-CZGf-QlT.js} +1 -1
  115. package/dist/client/assets/{index-D8_uS6ju.js → index-CdqOC8p4.js} +1 -1
  116. package/dist/client/assets/{index-ChR3SC6w.js → index-D8itVaOh.js} +1 -1
  117. package/dist/client/assets/{index-Dd318vVc.js → index-DeAa7cPD.js} +1 -1
  118. package/dist/client/assets/{index-CDAhksmq.js → index-TgTbYxQM.js} +1 -1
  119. package/dist/client/assets/{index-BjFrw_Cz.js → index-cM-0JEJy.js} +1 -1
  120. package/dist/client/assets/{index-BvXIjHT6.js → index-jrZjRdSI.js} +1 -1
  121. package/dist/client/assets/{index-BzKhWus-.js → index-k2B6oHDy.js} +1 -1
  122. package/dist/client/assets/{index-redirect-DAwJl3u9.js → index-redirect-pd-pFoY5.js} +1 -1
  123. package/dist/client/assets/{input-DBTIXVeB.js → input-CfDoPzy7.js} +1 -1
  124. package/dist/client/assets/{integration-icon-Cws5p9F1.js → integration-icon-ChBrp2uX.js} +1 -1
  125. package/dist/client/assets/{invite-member-dialog-U14K8dLP.js → invite-member-dialog-7T9uI3o5.js} +1 -1
  126. package/dist/client/assets/{label-hZbHKQe4.js → label-Br-zNLTG.js} +1 -1
  127. package/dist/client/assets/{layout-BbmfwSeT.js → layout-DMOlkuOh.js} +1 -1
  128. package/dist/client/assets/{login-CYk7QqzO.js → login-CWIddfiC.js} +1 -1
  129. package/dist/client/assets/{mcp-oauth-BBJ-dCGK.js → mcp-oauth-DhzxU0XK.js} +1 -1
  130. package/dist/client/assets/{members-Br5ZzfAU.js → members-CGKVy4T3.js} +1 -1
  131. package/dist/client/assets/{monaco-editor-B7XD9jse.js → monaco-editor-BcwFx31f.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-CiB1VTGS.js → monitoring-stats-row-DKIXNyFS.js} +1 -1
  133. package/dist/client/assets/{multi-select-DtCSfvTi.js → multi-select-DwEYUWQk.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-CuoSY6yW.js → oauth-callback-CRC-TNHK.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-DTd9RCl8.js → oauth-callback-ai-provider-Bn5ecNQ9.js} +1 -1
  136. package/dist/client/assets/{onboarding-VI53SQy5.js → onboarding-ChQBM6P7.js} +1 -1
  137. package/dist/client/assets/{org-install-BpRHfBoz.js → org-install-B2VYuIrV.js} +1 -1
  138. package/dist/client/assets/{org-layout-Ip0hYM6i.js → org-layout-CXw1-r8T.js} +1 -1
  139. package/dist/client/assets/{organization-choice-Ccir5zvX.js → organization-choice-thMPBy_H.js} +1 -1
  140. package/dist/client/assets/{orgs-BK0nOPLw.js → orgs-DpewEJO4.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-CBAWdwBB.js → page-seo-form-Bj8agFDN.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-xYyduq_3.js +1 -0
  143. package/dist/client/assets/{popover-WvXSsr2A.js → popover-PFUSi04J.js} +1 -1
  144. package/dist/client/assets/{post-editor-GEIG3Qbs.js → post-editor-fudBfEMW.js} +1 -1
  145. package/dist/client/assets/{primitives-B4b9OMlU.js → primitives-CRg4BEbe.js} +1 -1
  146. package/dist/client/assets/{profile-BJOXihUj.js → profile-krVPqEis.js} +1 -1
  147. package/dist/client/assets/project-app-view-F_105CvS.js +1 -0
  148. package/dist/client/assets/record-editor-B9z6hPr0.js +1 -0
  149. package/dist/client/assets/redirect-editor-pmxNft8I.js +1 -0
  150. package/dist/client/assets/registry-BBaBGga3.js +2 -0
  151. package/dist/client/assets/{registry-layout-CUSBCALf.js → registry-layout-D0if0uky.js} +2 -2
  152. package/dist/client/assets/{reports-CJYmnCRR.js → reports-DQRCq5Dl.js} +2 -2
  153. package/dist/client/assets/{require-capability-BOqOfzCO.js → require-capability-lUm3WxQW.js} +1 -1
  154. package/dist/client/assets/{required-auth-layout-C1iQaX9e.js → required-auth-layout-zgA3qXU6.js} +1 -1
  155. package/dist/client/assets/{reset-password-ChmXlYVK.js → reset-password-d6_AkYAQ.js} +1 -1
  156. package/dist/client/assets/{roles-CuzTIzcA.js → roles-B_zG47r7.js} +1 -1
  157. package/dist/client/assets/{search-input-Di_KVfz5.js → search-input-Im3obJ_5.js} +1 -1
  158. package/dist/client/assets/{secrets-Cwnb5SFR.js → secrets-DZpWBr7n.js} +1 -1
  159. package/dist/client/assets/{sections-editor-BnUP7eos.js → sections-editor-D7TakwFG.js} +1 -1
  160. package/dist/client/assets/{select-CS3vGjLf.js → select-BDOR27tE.js} +1 -1
  161. package/dist/client/assets/{select-model-CBkA3Qex.js → select-model-BRQ-V94m.js} +1 -1
  162. package/dist/client/assets/{self-tool-result-olaCzjy8.js → self-tool-result-VStIScqg.js} +1 -1
  163. package/dist/client/assets/{seo-editor-BS3PrYY5.js → seo-editor-DgKKLq5W.js} +1 -1
  164. package/dist/client/assets/{settings-layout-BWiwB1ve.js → settings-layout-CxNvsg8J.js} +1 -1
  165. package/dist/client/assets/{settings-section-B42r-p4q.js → settings-section-BWS26hMF.js} +1 -1
  166. package/dist/client/assets/{shell-controls-CG47bgem.js → shell-controls-HSPoO0mS.js} +1 -1
  167. package/dist/client/assets/{shell-layout-C2jFubEc.js → shell-layout-D_sblBCw.js} +1 -1
  168. package/dist/client/assets/{sidebar-DhNO0hbl.js → sidebar-BvGzib5A.js} +1 -1
  169. package/dist/client/assets/{skeleton-CkFFLL1Z.js → skeleton-BUe_WzkR.js} +1 -1
  170. package/dist/client/assets/{sso-DvIYBwsX.js → sso-dMXAkSfn.js} +1 -1
  171. package/dist/client/assets/{store-D2kZokQ2.js → store-qzvEGiXH.js} +1 -1
  172. package/dist/client/assets/store-registry-C0M7zBzp.js +2 -0
  173. package/dist/client/assets/{studio-tools-Dj_suUV-.js → studio-tools-CvoMFYCt.js} +1 -1
  174. package/dist/client/assets/{switch-CWGgmiWZ.js → switch-muGjhkBJ.js} +1 -1
  175. package/dist/client/assets/{table-B7Z84RDB.js → table-BUQ1sil8.js} +1 -1
  176. package/dist/client/assets/{tabs-CSjEyx_g.js → tabs-DHpcGpHH.js} +1 -1
  177. package/dist/client/assets/{textarea-DNrJISFS.js → textarea-Bt_QtOk0.js} +1 -1
  178. package/dist/client/assets/{toggle-group-DngQXFC1.js → toggle-group-CQKX4oUd.js} +1 -1
  179. package/dist/client/assets/{toolbar-BJAhXpws.js → toolbar-0DwtxERz.js} +1 -1
  180. package/dist/client/assets/{toolbar-icon-button-BPZ8JgHL.js → toolbar-icon-button-DZhVI9-2.js} +1 -1
  181. package/dist/client/assets/{tooltip-BoYfeb4r.js → tooltip-BigwhDSP.js} +1 -1
  182. package/dist/client/assets/{use-ai-providers-B0uEL6GU.js → use-ai-providers-WKbvbsVL.js} +1 -1
  183. package/dist/client/assets/{use-api-keys-BUXdsmWE.js → use-api-keys-Te5PgtxD.js} +1 -1
  184. package/dist/client/assets/{use-automations-BX-f2xPQ.js → use-automations--GMik9NX.js} +1 -1
  185. package/dist/client/assets/{use-autosave-D2xExJSi.js → use-autosave-M2ceoril.js} +1 -1
  186. package/dist/client/assets/{use-capability-zn_dFQCr.js → use-capability-Bh8YlueK.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-Daz3W4ZL.js → use-clock-tick-IRvpmO0_.js} +1 -1
  188. package/dist/client/assets/{use-connection-CI4KVjBL.js → use-connection-COZgUeU0.js} +1 -1
  189. package/dist/client/assets/{use-copy-BFe-yhR7.js → use-copy-CFyLSHsK.js} +1 -1
  190. package/dist/client/assets/{use-create-virtual-mcp-BruuOj8R.js → use-create-virtual-mcp-VVjBeALb.js} +1 -1
  191. package/dist/client/assets/{use-debounced-autosave-C18-WjK7.js → use-debounced-autosave-BxkO-_ca.js} +1 -1
  192. package/dist/client/assets/{use-debounced-value-CgLjUKeF.js → use-debounced-value-DmIl8W6n.js} +1 -1
  193. package/dist/client/assets/{use-deco-credits-Cl6XjjTb.js → use-deco-credits-CmiQbTPM.js} +1 -1
  194. package/dist/client/assets/{use-decopilot-events-Opg95yOG.js → use-decopilot-events-O1Gk-ETR.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-CkYrHV-n.js → use-delete-connection-B5quwMM9.js} +1 -1
  196. package/dist/client/assets/{use-deployment-admin-CWMJlws-.js → use-deployment-admin-BElTs8M7.js} +1 -1
  197. package/dist/client/assets/{use-file-configs-CU2Y0Emb.js → use-file-configs-B0d07k9Y.js} +1 -1
  198. package/dist/client/assets/{use-infinite-scroll-mXDq9sbk.js → use-infinite-scroll-BZlKDm5N.js} +1 -1
  199. package/dist/client/assets/{use-join-requests-zFCwv89L.js → use-join-requests-CZ3onEZJ.js} +1 -1
  200. package/dist/client/assets/{use-mcp-auth-status-BoHM8OB0.js → use-mcp-auth-status-BeMiAxE7.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-DL89siIV.js → use-mcp-client-CZsvR6c7.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-C4CClJFZ.js → use-mcp-tools-C86d_75c.js} +1 -1
  203. package/dist/client/assets/{use-members-A3agoGMA.js → use-members-DmoF-3Ie.js} +1 -1
  204. package/dist/client/assets/{use-mobile-BwfgD4pT.js → use-mobile-BVFGUH1V.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-Bc0CpSD2.js → use-navigate-to-agent-CID4qRVq.js} +1 -1
  206. package/dist/client/assets/{use-org-auth-client-BTfVRkCO.js → use-org-auth-client-CcOUerBq.js} +1 -1
  207. package/dist/client/assets/{use-org-sso-DYo24v3_.js → use-org-sso-DK1YMh-o.js} +1 -1
  208. package/dist/client/assets/{use-organization-roles-DYKLAq-n.js → use-organization-roles-DGfdPMyJ.js} +1 -1
  209. package/dist/client/assets/{use-organization-settings-DoCpZun-.js → use-organization-settings-C8zNTcuC.js} +1 -1
  210. package/dist/client/assets/{use-registry-app-nEihaLca.js → use-registry-app-DOaPd1Kq.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-DuneVuyO.js → use-registry-connections-BLLrfs0c.js} +1 -1
  212. package/dist/client/assets/{use-secrets-CG9MzH4M.js → use-secrets-CmLaq4UW.js} +1 -1
  213. package/dist/client/assets/{use-status-sounds-C-LWwT7t.js → use-status-sounds-C_iNgi5N.js} +1 -1
  214. package/dist/client/assets/{use-view-mode--BSnFAw6.js → use-view-mode-Be73RvXD.js} +1 -1
  215. package/dist/client/assets/{use-virtual-mcp-C6uu6xME.js → use-virtual-mcp-BGZZhgI8.js} +1 -1
  216. package/dist/client/assets/useInfiniteQuery-Cdk9mXL-.js +1 -0
  217. package/dist/client/assets/{useQueries-BT8q2MfJ.js → useQueries-C11UDtFe.js} +1 -1
  218. package/dist/client/assets/{useRouterState-BMgTcVFU.js → useRouterState-B8sLgF57.js} +1 -1
  219. package/dist/client/assets/useSuspenseInfiniteQuery-LZ9xlW1Z.js +1 -0
  220. package/dist/client/assets/{users-BXaOYgw2.js → users-B_lOVuoe.js} +1 -1
  221. package/dist/client/assets/{variant-calendar-C61DYxyp.js → variant-calendar-3-o3D_Rr.js} +1 -1
  222. package/dist/client/assets/{view-mode-toggle-C8Ikqgl7.js → view-mode-toggle-DnN-vUal.js} +1 -1
  223. package/dist/client/index.html +1 -1
  224. package/dist/client/report-og-fallback.png +0 -0
  225. package/dist/server/cli.js +680 -686
  226. package/dist/server/migrate.js +5 -5
  227. package/dist/server/node_modules/@resvg/resvg-js/LICENSE +373 -0
  228. package/dist/server/node_modules/@resvg/resvg-js/README.md +314 -0
  229. package/dist/server/node_modules/@resvg/resvg-js/index.js +23 -0
  230. package/dist/server/node_modules/@resvg/resvg-js/js-binding.js +1 -0
  231. package/dist/server/node_modules/@resvg/resvg-js/package.json +152 -0
  232. package/dist/server/node_modules/@shuding/opentype.js/LICENSE +20 -0
  233. package/dist/server/node_modules/@shuding/opentype.js/README.md +9 -0
  234. package/dist/server/node_modules/@shuding/opentype.js/RELEASES.md +272 -0
  235. package/dist/server/node_modules/@shuding/opentype.js/bin/ot +84 -0
  236. package/dist/server/node_modules/@shuding/opentype.js/bin/server.js +64 -0
  237. package/dist/server/node_modules/@shuding/opentype.js/bin/test-render +96 -0
  238. package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.js +11655 -0
  239. package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.min.js +2 -0
  240. package/dist/server/node_modules/@shuding/opentype.js/dist/opentype.module.js +11639 -0
  241. package/dist/server/node_modules/@shuding/opentype.js/package.json +73 -0
  242. package/dist/server/node_modules/@shuding/opentype.js/src/bbox.js +158 -0
  243. package/dist/server/node_modules/@shuding/opentype.js/src/bidi.js +243 -0
  244. package/dist/server/node_modules/@shuding/opentype.js/src/char.js +43 -0
  245. package/dist/server/node_modules/@shuding/opentype.js/src/check.js +16 -0
  246. package/dist/server/node_modules/@shuding/opentype.js/src/encoding.js +1032 -0
  247. package/dist/server/node_modules/@shuding/opentype.js/src/features/applySubstitution.js +74 -0
  248. package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/arabicPresentationForms.js +83 -0
  249. package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/arabicRequiredLigatures.js +41 -0
  250. package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/contextCheck/arabicSentence.js +43 -0
  251. package/dist/server/node_modules/@shuding/opentype.js/src/features/arab/contextCheck/arabicWord.js +31 -0
  252. package/dist/server/node_modules/@shuding/opentype.js/src/features/featureQuery.js +483 -0
  253. package/dist/server/node_modules/@shuding/opentype.js/src/features/latn/contextCheck/latinWord.js +31 -0
  254. package/dist/server/node_modules/@shuding/opentype.js/src/features/latn/latinLigatures.js +40 -0
  255. package/dist/server/node_modules/@shuding/opentype.js/src/font.js +433 -0
  256. package/dist/server/node_modules/@shuding/opentype.js/src/glyph.js +274 -0
  257. package/dist/server/node_modules/@shuding/opentype.js/src/glyphset.js +150 -0
  258. package/dist/server/node_modules/@shuding/opentype.js/src/hintingtt.js +3062 -0
  259. package/dist/server/node_modules/@shuding/opentype.js/src/index.js +5 -0
  260. package/dist/server/node_modules/@shuding/opentype.js/src/layout.js +357 -0
  261. package/dist/server/node_modules/@shuding/opentype.js/src/opentype.js +375 -0
  262. package/dist/server/node_modules/@shuding/opentype.js/src/parse.js +628 -0
  263. package/dist/server/node_modules/@shuding/opentype.js/src/path.js +212 -0
  264. package/dist/server/node_modules/@shuding/opentype.js/src/position.js +77 -0
  265. package/dist/server/node_modules/@shuding/opentype.js/src/substitution.js +447 -0
  266. package/dist/server/node_modules/@shuding/opentype.js/src/table.js +215 -0
  267. package/dist/server/node_modules/@shuding/opentype.js/src/tables/cff.js +1156 -0
  268. package/dist/server/node_modules/@shuding/opentype.js/src/tables/cmap.js +145 -0
  269. package/dist/server/node_modules/@shuding/opentype.js/src/tables/fvar.js +71 -0
  270. package/dist/server/node_modules/@shuding/opentype.js/src/tables/gdef.js +62 -0
  271. package/dist/server/node_modules/@shuding/opentype.js/src/tables/glyf.js +349 -0
  272. package/dist/server/node_modules/@shuding/opentype.js/src/tables/gpos.js +146 -0
  273. package/dist/server/node_modules/@shuding/opentype.js/src/tables/gsub.js +251 -0
  274. package/dist/server/node_modules/@shuding/opentype.js/src/tables/head.js +35 -0
  275. package/dist/server/node_modules/@shuding/opentype.js/src/tables/hhea.js +27 -0
  276. package/dist/server/node_modules/@shuding/opentype.js/src/tables/hmtx.js +51 -0
  277. package/dist/server/node_modules/@shuding/opentype.js/src/tables/kern.js +69 -0
  278. package/dist/server/node_modules/@shuding/opentype.js/src/tables/loca.js +31 -0
  279. package/dist/server/node_modules/@shuding/opentype.js/src/tables/ltag.js +33 -0
  280. package/dist/server/node_modules/@shuding/opentype.js/src/tables/maxp.js +32 -0
  281. package/dist/server/node_modules/@shuding/opentype.js/src/tables/meta.js +30 -0
  282. package/dist/server/node_modules/@shuding/opentype.js/src/tables/name.js +680 -0
  283. package/dist/server/node_modules/@shuding/opentype.js/src/tables/os2.js +65 -0
  284. package/dist/server/node_modules/@shuding/opentype.js/src/tables/post.js +41 -0
  285. package/dist/server/node_modules/@shuding/opentype.js/src/tokenizer.js +522 -0
  286. package/dist/server/node_modules/@shuding/opentype.js/src/types.js +976 -0
  287. package/dist/server/node_modules/@shuding/opentype.js/src/util.js +17 -0
  288. package/dist/server/node_modules/base64-js/.travis.yml +5 -0
  289. package/dist/server/node_modules/base64-js/LICENSE.MIT +21 -0
  290. package/dist/server/node_modules/base64-js/README.md +31 -0
  291. package/dist/server/node_modules/base64-js/bench/bench.js +19 -0
  292. package/dist/server/node_modules/base64-js/lib/b64.js +124 -0
  293. package/dist/server/node_modules/base64-js/package.json +34 -0
  294. package/dist/server/node_modules/base64-js/test/convert.js +51 -0
  295. package/dist/server/node_modules/base64-js/test/url-safe.js +18 -0
  296. package/dist/server/node_modules/camelize/.eslintrc +24 -0
  297. package/dist/server/node_modules/camelize/.github/FUNDING.yml +12 -0
  298. package/dist/server/node_modules/camelize/CHANGELOG.md +64 -0
  299. package/dist/server/node_modules/camelize/LICENSE +18 -0
  300. package/dist/server/node_modules/camelize/README.md +81 -0
  301. package/dist/server/node_modules/camelize/example/camel.js +12 -0
  302. package/dist/server/node_modules/camelize/index.js +61 -0
  303. package/dist/server/node_modules/camelize/package.json +84 -0
  304. package/dist/server/node_modules/camelize/test/camel.js +48 -0
  305. package/dist/server/node_modules/color-name/LICENSE +8 -0
  306. package/dist/server/node_modules/color-name/README.md +11 -0
  307. package/dist/server/node_modules/color-name/index.js +152 -0
  308. package/dist/server/node_modules/color-name/package.json +28 -0
  309. package/dist/server/node_modules/css-background-parser/LICENSE +22 -0
  310. package/dist/server/node_modules/css-background-parser/README.md +149 -0
  311. package/dist/server/node_modules/css-background-parser/index.js +162 -0
  312. package/dist/server/node_modules/css-background-parser/package.json +19 -0
  313. package/dist/server/node_modules/css-box-shadow/README.md +27 -0
  314. package/dist/server/node_modules/css-box-shadow/index.js +64 -0
  315. package/dist/server/node_modules/css-box-shadow/package.json +14 -0
  316. package/dist/server/node_modules/css-box-shadow/test.js +204 -0
  317. package/dist/server/node_modules/css-color-keywords/LICENSE +15 -0
  318. package/dist/server/node_modules/css-color-keywords/README.md +47 -0
  319. package/dist/server/node_modules/css-color-keywords/colors.json +148 -0
  320. package/dist/server/node_modules/css-color-keywords/index.js +3 -0
  321. package/dist/server/node_modules/css-color-keywords/package.json +27 -0
  322. package/dist/server/node_modules/css-gradient-parser/LICENSE +21 -0
  323. package/dist/server/node_modules/css-gradient-parser/README.md +75 -0
  324. package/dist/server/node_modules/css-gradient-parser/dist/index.cjs +2 -0
  325. package/dist/server/node_modules/css-gradient-parser/dist/index.js +2 -0
  326. package/dist/server/node_modules/css-gradient-parser/package.json +54 -0
  327. package/dist/server/node_modules/css-to-react-native/LICENSE.md +21 -0
  328. package/dist/server/node_modules/css-to-react-native/README.md +115 -0
  329. package/dist/server/node_modules/css-to-react-native/index.js +886 -0
  330. package/dist/server/node_modules/css-to-react-native/package.json +65 -0
  331. package/dist/server/node_modules/css-to-react-native/src/TokenStream.js +74 -0
  332. package/dist/server/node_modules/css-to-react-native/src/__tests__/aspectRatio.js +23 -0
  333. package/dist/server/node_modules/css-to-react-native/src/__tests__/border.js +85 -0
  334. package/dist/server/node_modules/css-to-react-native/src/__tests__/borderColor.js +37 -0
  335. package/dist/server/node_modules/css-to-react-native/src/__tests__/boxModel.js +136 -0
  336. package/dist/server/node_modules/css-to-react-native/src/__tests__/boxShadow.js +83 -0
  337. package/dist/server/node_modules/css-to-react-native/src/__tests__/colors.js +31 -0
  338. package/dist/server/node_modules/css-to-react-native/src/__tests__/flex.js +122 -0
  339. package/dist/server/node_modules/css-to-react-native/src/__tests__/flexFlow.js +22 -0
  340. package/dist/server/node_modules/css-to-react-native/src/__tests__/font.js +117 -0
  341. package/dist/server/node_modules/css-to-react-native/src/__tests__/fontFamily.js +43 -0
  342. package/dist/server/node_modules/css-to-react-native/src/__tests__/fontVariant.js +15 -0
  343. package/dist/server/node_modules/css-to-react-native/src/__tests__/fontWeight.js +8 -0
  344. package/dist/server/node_modules/css-to-react-native/src/__tests__/index.js +204 -0
  345. package/dist/server/node_modules/css-to-react-native/src/__tests__/placeContent.js +19 -0
  346. package/dist/server/node_modules/css-to-react-native/src/__tests__/shadowOffsets.js +13 -0
  347. package/dist/server/node_modules/css-to-react-native/src/__tests__/textDecoration.js +103 -0
  348. package/dist/server/node_modules/css-to-react-native/src/__tests__/textDecorationLine.js +23 -0
  349. package/dist/server/node_modules/css-to-react-native/src/__tests__/textShadow.js +30 -0
  350. package/dist/server/node_modules/css-to-react-native/src/__tests__/transform.js +55 -0
  351. package/dist/server/node_modules/css-to-react-native/src/__tests__/units.js +132 -0
  352. package/dist/server/node_modules/css-to-react-native/src/devPropertiesWithoutUnitsRegExp.js +19 -0
  353. package/dist/server/node_modules/css-to-react-native/src/index.js +90 -0
  354. package/dist/server/node_modules/css-to-react-native/src/tokenTypes.js +75 -0
  355. package/dist/server/node_modules/css-to-react-native/src/transforms/aspectRatio.js +12 -0
  356. package/dist/server/node_modules/css-to-react-native/src/transforms/border.js +53 -0
  357. package/dist/server/node_modules/css-to-react-native/src/transforms/boxShadow.js +11 -0
  358. package/dist/server/node_modules/css-to-react-native/src/transforms/flex.js +65 -0
  359. package/dist/server/node_modules/css-to-react-native/src/transforms/flexFlow.js +37 -0
  360. package/dist/server/node_modules/css-to-react-native/src/transforms/font.js +63 -0
  361. package/dist/server/node_modules/css-to-react-native/src/transforms/fontFamily.js +20 -0
  362. package/dist/server/node_modules/css-to-react-native/src/transforms/fontVariant.js +14 -0
  363. package/dist/server/node_modules/css-to-react-native/src/transforms/index.js +77 -0
  364. package/dist/server/node_modules/css-to-react-native/src/transforms/placeContent.js +24 -0
  365. package/dist/server/node_modules/css-to-react-native/src/transforms/textDecoration.js +53 -0
  366. package/dist/server/node_modules/css-to-react-native/src/transforms/textDecorationLine.js +18 -0
  367. package/dist/server/node_modules/css-to-react-native/src/transforms/textShadow.js +10 -0
  368. package/dist/server/node_modules/css-to-react-native/src/transforms/transform.js +74 -0
  369. package/dist/server/node_modules/css-to-react-native/src/transforms/util.js +99 -0
  370. package/dist/server/node_modules/hex-rgb/index.js +47 -0
  371. package/dist/server/node_modules/hex-rgb/license +9 -0
  372. package/dist/server/node_modules/hex-rgb/package.json +39 -0
  373. package/dist/server/node_modules/hex-rgb/readme.md +86 -0
  374. package/dist/server/node_modules/linebreak/LICENSE +21 -0
  375. package/dist/server/node_modules/linebreak/dist/main.cjs +1369 -0
  376. package/dist/server/node_modules/linebreak/dist/module.mjs +1368 -0
  377. package/dist/server/node_modules/linebreak/package.json +57 -0
  378. package/dist/server/node_modules/linebreak/readme.md +62 -0
  379. package/dist/server/node_modules/parse-css-color/CHANGELOG.md +54 -0
  380. package/dist/server/node_modules/parse-css-color/LICENSE +21 -0
  381. package/dist/server/node_modules/parse-css-color/README.md +110 -0
  382. package/dist/server/node_modules/parse-css-color/dist/index.cjs.js +171 -0
  383. package/dist/server/node_modules/parse-css-color/dist/index.esm.js +167 -0
  384. package/dist/server/node_modules/parse-css-color/dist/index.umd.js +7 -0
  385. package/dist/server/node_modules/parse-css-color/package.json +55 -0
  386. package/dist/server/node_modules/postcss-value-parser/LICENSE +22 -0
  387. package/dist/server/node_modules/postcss-value-parser/README.md +263 -0
  388. package/dist/server/node_modules/postcss-value-parser/lib/index.js +28 -0
  389. package/dist/server/node_modules/postcss-value-parser/lib/parse.js +321 -0
  390. package/dist/server/node_modules/postcss-value-parser/lib/stringify.js +48 -0
  391. package/dist/server/node_modules/postcss-value-parser/lib/unit.js +120 -0
  392. package/dist/server/node_modules/postcss-value-parser/lib/walk.js +22 -0
  393. package/dist/server/node_modules/postcss-value-parser/package.json +58 -0
  394. package/dist/server/node_modules/satori/LICENSE +373 -0
  395. package/dist/server/node_modules/satori/README.md +516 -0
  396. package/dist/server/node_modules/satori/dist/index.cjs +8 -0
  397. package/dist/server/node_modules/satori/dist/index.cjs.LEGAL.txt +4 -0
  398. package/dist/server/node_modules/satori/dist/index.js +8 -0
  399. package/dist/server/node_modules/satori/dist/index.js.LEGAL.txt +4 -0
  400. package/dist/server/node_modules/satori/dist/jsx/index.cjs +2 -0
  401. package/dist/server/node_modules/satori/dist/jsx/index.cjs.LEGAL.txt +0 -0
  402. package/dist/server/node_modules/satori/dist/jsx/index.js +2 -0
  403. package/dist/server/node_modules/satori/dist/jsx/index.js.LEGAL.txt +0 -0
  404. package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.cjs +2 -0
  405. package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.cjs.LEGAL.txt +0 -0
  406. package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.js +2 -0
  407. package/dist/server/node_modules/satori/dist/jsx/jsx-runtime.js.LEGAL.txt +0 -0
  408. package/dist/server/node_modules/satori/dist/standalone.cjs +8 -0
  409. package/dist/server/node_modules/satori/dist/standalone.cjs.LEGAL.txt +4 -0
  410. package/dist/server/node_modules/satori/dist/standalone.js +8 -0
  411. package/dist/server/node_modules/satori/dist/standalone.js.LEGAL.txt +4 -0
  412. package/dist/server/node_modules/satori/package.json +149 -0
  413. package/dist/server/node_modules/satori/yoga.wasm +0 -0
  414. package/dist/server/node_modules/tiny-inflate/LICENSE +21 -0
  415. package/dist/server/node_modules/tiny-inflate/index.js +375 -0
  416. package/dist/server/node_modules/tiny-inflate/package.json +28 -0
  417. package/dist/server/node_modules/tiny-inflate/readme.md +31 -0
  418. package/dist/server/node_modules/tiny-inflate/test/index.js +75 -0
  419. package/dist/server/node_modules/tiny-inflate/test/lorem.txt +199 -0
  420. package/dist/server/node_modules/unicode-trie/LICENSE +8 -0
  421. package/dist/server/node_modules/unicode-trie/README.md +77 -0
  422. package/dist/server/node_modules/unicode-trie/builder.js +966 -0
  423. package/dist/server/node_modules/unicode-trie/index.js +136 -0
  424. package/dist/server/node_modules/unicode-trie/package.json +27 -0
  425. package/dist/server/node_modules/unicode-trie/swap.js +25 -0
  426. package/dist/server/node_modules/unicode-trie/test/mocha.opts +1 -0
  427. package/dist/server/node_modules/unicode-trie/test/test.js +243 -0
  428. package/dist/server/server.js +664 -670
  429. package/package.json +3 -1
  430. package/dist/client/assets/page-seo-sheet-BVOTKmAi.js +0 -1
  431. package/dist/client/assets/project-app-view-BJPw6BEN.js +0 -1
  432. package/dist/client/assets/record-editor-DGNLZeof.js +0 -1
  433. package/dist/client/assets/redirect-editor-rNADegcF.js +0 -1
  434. package/dist/client/assets/registry-DSHcnwR4.js +0 -2
  435. package/dist/client/assets/store-registry-q7deglpz.js +0 -2
  436. package/dist/client/assets/useInfiniteQuery-DVl8ILZo.js +0 -1
  437. package/dist/client/assets/useSuspenseInfiniteQuery-ClimnWE2.js +0 -1
@@ -0,0 +1,976 @@
1
+ // Data types used in the OpenType font file.
2
+ // All OpenType fonts use Motorola-style byte ordering (Big Endian)
3
+
4
+ import check from './check';
5
+
6
+ const LIMIT16 = 32768; // The limit at which a 16-bit number switches signs == 2^15
7
+ const LIMIT32 = 2147483648; // The limit at which a 32-bit number switches signs == 2 ^ 31
8
+
9
+ /**
10
+ * @exports opentype.decode
11
+ * @class
12
+ */
13
+ const decode = {};
14
+ /**
15
+ * @exports opentype.encode
16
+ * @class
17
+ */
18
+ const encode = {};
19
+ /**
20
+ * @exports opentype.sizeOf
21
+ * @class
22
+ */
23
+ const sizeOf = {};
24
+
25
+ // Return a function that always returns the same value.
26
+ function constant(v) {
27
+ return function() {
28
+ return v;
29
+ };
30
+ }
31
+
32
+ // OpenType data types //////////////////////////////////////////////////////
33
+
34
+ /**
35
+ * Convert an 8-bit unsigned integer to a list of 1 byte.
36
+ * @param {number}
37
+ * @returns {Array}
38
+ */
39
+ encode.BYTE = function(v) {
40
+ check.argument(v >= 0 && v <= 255, 'Byte value should be between 0 and 255.');
41
+ return [v];
42
+ };
43
+ /**
44
+ * @constant
45
+ * @type {number}
46
+ */
47
+ sizeOf.BYTE = constant(1);
48
+
49
+ /**
50
+ * Convert a 8-bit signed integer to a list of 1 byte.
51
+ * @param {string}
52
+ * @returns {Array}
53
+ */
54
+ encode.CHAR = function(v) {
55
+ return [v.charCodeAt(0)];
56
+ };
57
+
58
+ /**
59
+ * @constant
60
+ * @type {number}
61
+ */
62
+ sizeOf.CHAR = constant(1);
63
+
64
+ /**
65
+ * Convert an ASCII string to a list of bytes.
66
+ * @param {string}
67
+ * @returns {Array}
68
+ */
69
+ encode.CHARARRAY = function(v) {
70
+ if (typeof v === 'undefined') {
71
+ v = '';
72
+ console.warn('Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name.');
73
+ }
74
+ const b = [];
75
+ for (let i = 0; i < v.length; i += 1) {
76
+ b[i] = v.charCodeAt(i);
77
+ }
78
+
79
+ return b;
80
+ };
81
+
82
+ /**
83
+ * @param {Array}
84
+ * @returns {number}
85
+ */
86
+ sizeOf.CHARARRAY = function(v) {
87
+ if (typeof v === 'undefined') {
88
+ return 0;
89
+ }
90
+ return v.length;
91
+ };
92
+
93
+ /**
94
+ * Convert a 16-bit unsigned integer to a list of 2 bytes.
95
+ * @param {number}
96
+ * @returns {Array}
97
+ */
98
+ encode.USHORT = function(v) {
99
+ return [(v >> 8) & 0xFF, v & 0xFF];
100
+ };
101
+
102
+ /**
103
+ * @constant
104
+ * @type {number}
105
+ */
106
+ sizeOf.USHORT = constant(2);
107
+
108
+ /**
109
+ * Convert a 16-bit signed integer to a list of 2 bytes.
110
+ * @param {number}
111
+ * @returns {Array}
112
+ */
113
+ encode.SHORT = function(v) {
114
+ // Two's complement
115
+ if (v >= LIMIT16) {
116
+ v = -(2 * LIMIT16 - v);
117
+ }
118
+
119
+ return [(v >> 8) & 0xFF, v & 0xFF];
120
+ };
121
+
122
+ /**
123
+ * @constant
124
+ * @type {number}
125
+ */
126
+ sizeOf.SHORT = constant(2);
127
+
128
+ /**
129
+ * Convert a 24-bit unsigned integer to a list of 3 bytes.
130
+ * @param {number}
131
+ * @returns {Array}
132
+ */
133
+ encode.UINT24 = function(v) {
134
+ return [(v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];
135
+ };
136
+
137
+ /**
138
+ * @constant
139
+ * @type {number}
140
+ */
141
+ sizeOf.UINT24 = constant(3);
142
+
143
+ /**
144
+ * Convert a 32-bit unsigned integer to a list of 4 bytes.
145
+ * @param {number}
146
+ * @returns {Array}
147
+ */
148
+ encode.ULONG = function(v) {
149
+ return [(v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];
150
+ };
151
+
152
+ /**
153
+ * @constant
154
+ * @type {number}
155
+ */
156
+ sizeOf.ULONG = constant(4);
157
+
158
+ /**
159
+ * Convert a 32-bit unsigned integer to a list of 4 bytes.
160
+ * @param {number}
161
+ * @returns {Array}
162
+ */
163
+ encode.LONG = function(v) {
164
+ // Two's complement
165
+ if (v >= LIMIT32) {
166
+ v = -(2 * LIMIT32 - v);
167
+ }
168
+
169
+ return [(v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];
170
+ };
171
+
172
+ /**
173
+ * @constant
174
+ * @type {number}
175
+ */
176
+ sizeOf.LONG = constant(4);
177
+
178
+ encode.FIXED = encode.ULONG;
179
+ sizeOf.FIXED = sizeOf.ULONG;
180
+
181
+ encode.FWORD = encode.SHORT;
182
+ sizeOf.FWORD = sizeOf.SHORT;
183
+
184
+ encode.UFWORD = encode.USHORT;
185
+ sizeOf.UFWORD = sizeOf.USHORT;
186
+
187
+ /**
188
+ * Convert a 32-bit Apple Mac timestamp integer to a list of 8 bytes, 64-bit timestamp.
189
+ * @param {number}
190
+ * @returns {Array}
191
+ */
192
+ encode.LONGDATETIME = function(v) {
193
+ return [0, 0, 0, 0, (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];
194
+ };
195
+
196
+ /**
197
+ * @constant
198
+ * @type {number}
199
+ */
200
+ sizeOf.LONGDATETIME = constant(8);
201
+
202
+ /**
203
+ * Convert a 4-char tag to a list of 4 bytes.
204
+ * @param {string}
205
+ * @returns {Array}
206
+ */
207
+ encode.TAG = function(v) {
208
+ check.argument(v.length === 4, 'Tag should be exactly 4 ASCII characters.');
209
+ return [v.charCodeAt(0),
210
+ v.charCodeAt(1),
211
+ v.charCodeAt(2),
212
+ v.charCodeAt(3)];
213
+ };
214
+
215
+ /**
216
+ * @constant
217
+ * @type {number}
218
+ */
219
+ sizeOf.TAG = constant(4);
220
+
221
+ // CFF data types ///////////////////////////////////////////////////////////
222
+
223
+ encode.Card8 = encode.BYTE;
224
+ sizeOf.Card8 = sizeOf.BYTE;
225
+
226
+ encode.Card16 = encode.USHORT;
227
+ sizeOf.Card16 = sizeOf.USHORT;
228
+
229
+ encode.OffSize = encode.BYTE;
230
+ sizeOf.OffSize = sizeOf.BYTE;
231
+
232
+ encode.SID = encode.USHORT;
233
+ sizeOf.SID = sizeOf.USHORT;
234
+
235
+ // Convert a numeric operand or charstring number to a variable-size list of bytes.
236
+ /**
237
+ * Convert a numeric operand or charstring number to a variable-size list of bytes.
238
+ * @param {number}
239
+ * @returns {Array}
240
+ */
241
+ encode.NUMBER = function(v) {
242
+ if (v >= -107 && v <= 107) {
243
+ return [v + 139];
244
+ } else if (v >= 108 && v <= 1131) {
245
+ v = v - 108;
246
+ return [(v >> 8) + 247, v & 0xFF];
247
+ } else if (v >= -1131 && v <= -108) {
248
+ v = -v - 108;
249
+ return [(v >> 8) + 251, v & 0xFF];
250
+ } else if (v >= -32768 && v <= 32767) {
251
+ return encode.NUMBER16(v);
252
+ } else {
253
+ return encode.NUMBER32(v);
254
+ }
255
+ };
256
+
257
+ /**
258
+ * @param {number}
259
+ * @returns {number}
260
+ */
261
+ sizeOf.NUMBER = function(v) {
262
+ return encode.NUMBER(v).length;
263
+ };
264
+
265
+ /**
266
+ * Convert a signed number between -32768 and +32767 to a three-byte value.
267
+ * This ensures we always use three bytes, but is not the most compact format.
268
+ * @param {number}
269
+ * @returns {Array}
270
+ */
271
+ encode.NUMBER16 = function(v) {
272
+ return [28, (v >> 8) & 0xFF, v & 0xFF];
273
+ };
274
+
275
+ /**
276
+ * @constant
277
+ * @type {number}
278
+ */
279
+ sizeOf.NUMBER16 = constant(3);
280
+
281
+ /**
282
+ * Convert a signed number between -(2^31) and +(2^31-1) to a five-byte value.
283
+ * This is useful if you want to be sure you always use four bytes,
284
+ * at the expense of wasting a few bytes for smaller numbers.
285
+ * @param {number}
286
+ * @returns {Array}
287
+ */
288
+ encode.NUMBER32 = function(v) {
289
+ return [29, (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];
290
+ };
291
+
292
+ /**
293
+ * @constant
294
+ * @type {number}
295
+ */
296
+ sizeOf.NUMBER32 = constant(5);
297
+
298
+ /**
299
+ * @param {number}
300
+ * @returns {Array}
301
+ */
302
+ encode.REAL = function(v) {
303
+ let value = v.toString();
304
+
305
+ // Some numbers use an epsilon to encode the value. (e.g. JavaScript will store 0.0000001 as 1e-7)
306
+ // This code converts it back to a number without the epsilon.
307
+ const m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value);
308
+ if (m) {
309
+ const epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length));
310
+ value = (Math.round(v * epsilon) / epsilon).toString();
311
+ }
312
+
313
+ let nibbles = '';
314
+ for (let i = 0, ii = value.length; i < ii; i += 1) {
315
+ const c = value[i];
316
+ if (c === 'e') {
317
+ nibbles += value[++i] === '-' ? 'c' : 'b';
318
+ } else if (c === '.') {
319
+ nibbles += 'a';
320
+ } else if (c === '-') {
321
+ nibbles += 'e';
322
+ } else {
323
+ nibbles += c;
324
+ }
325
+ }
326
+
327
+ nibbles += (nibbles.length & 1) ? 'f' : 'ff';
328
+ const out = [30];
329
+ for (let i = 0, ii = nibbles.length; i < ii; i += 2) {
330
+ out.push(parseInt(nibbles.substr(i, 2), 16));
331
+ }
332
+
333
+ return out;
334
+ };
335
+
336
+ /**
337
+ * @param {number}
338
+ * @returns {number}
339
+ */
340
+ sizeOf.REAL = function(v) {
341
+ return encode.REAL(v).length;
342
+ };
343
+
344
+ encode.NAME = encode.CHARARRAY;
345
+ sizeOf.NAME = sizeOf.CHARARRAY;
346
+
347
+ encode.STRING = encode.CHARARRAY;
348
+ sizeOf.STRING = sizeOf.CHARARRAY;
349
+
350
+ /**
351
+ * @param {DataView} data
352
+ * @param {number} offset
353
+ * @param {number} numBytes
354
+ * @returns {string}
355
+ */
356
+ decode.UTF8 = function(data, offset, numBytes) {
357
+ const codePoints = [];
358
+ const numChars = numBytes;
359
+ for (let j = 0; j < numChars; j++, offset += 1) {
360
+ codePoints[j] = data.getUint8(offset);
361
+ }
362
+
363
+ return String.fromCharCode.apply(null, codePoints);
364
+ };
365
+
366
+ /**
367
+ * @param {DataView} data
368
+ * @param {number} offset
369
+ * @param {number} numBytes
370
+ * @returns {string}
371
+ */
372
+ decode.UTF16 = function(data, offset, numBytes) {
373
+ const codePoints = [];
374
+ const numChars = numBytes / 2;
375
+ for (let j = 0; j < numChars; j++, offset += 2) {
376
+ codePoints[j] = data.getUint16(offset);
377
+ }
378
+
379
+ return String.fromCharCode.apply(null, codePoints);
380
+ };
381
+
382
+ /**
383
+ * Convert a JavaScript string to UTF16-BE.
384
+ * @param {string}
385
+ * @returns {Array}
386
+ */
387
+ encode.UTF16 = function(v) {
388
+ const b = [];
389
+ for (let i = 0; i < v.length; i += 1) {
390
+ const codepoint = v.charCodeAt(i);
391
+ b[b.length] = (codepoint >> 8) & 0xFF;
392
+ b[b.length] = codepoint & 0xFF;
393
+ }
394
+
395
+ return b;
396
+ };
397
+
398
+ /**
399
+ * @param {string}
400
+ * @returns {number}
401
+ */
402
+ sizeOf.UTF16 = function(v) {
403
+ return v.length * 2;
404
+ };
405
+
406
+ // Data for converting old eight-bit Macintosh encodings to Unicode.
407
+ // This representation is optimized for decoding; encoding is slower
408
+ // and needs more memory. The assumption is that all opentype.js users
409
+ // want to open fonts, but saving a font will be comparatively rare
410
+ // so it can be more expensive. Keyed by IANA character set name.
411
+ //
412
+ // Python script for generating these strings:
413
+ //
414
+ // s = u''.join([chr(c).decode('mac_greek') for c in range(128, 256)])
415
+ // print(s.encode('utf-8'))
416
+ /**
417
+ * @private
418
+ */
419
+ const eightBitMacEncodings = {
420
+ 'x-mac-croatian': // Python: 'mac_croatian'
421
+ 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø' +
422
+ '¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ',
423
+ 'x-mac-cyrillic': // Python: 'mac_cyrillic'
424
+ 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњ' +
425
+ 'јЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю',
426
+ 'x-mac-gaelic': // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/GAELIC.TXT
427
+ 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæø' +
428
+ 'ṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ',
429
+ 'x-mac-greek': // Python: 'mac_greek'
430
+ 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩ' +
431
+ 'άΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\u00AD',
432
+ 'x-mac-icelandic': // Python: 'mac_iceland'
433
+ 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +
434
+ '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',
435
+ 'x-mac-inuit': // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/INUIT.TXT
436
+ 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗ' +
437
+ 'ᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł',
438
+ 'x-mac-ce': // Python: 'mac_latin2'
439
+ 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅ' +
440
+ 'ņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ',
441
+ macintosh: // Python: 'mac_roman'
442
+ 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +
443
+ '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',
444
+ 'x-mac-romanian': // Python: 'mac_romanian'
445
+ 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș' +
446
+ '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',
447
+ 'x-mac-turkish': // Python: 'mac_turkish'
448
+ 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +
449
+ '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ'
450
+ };
451
+
452
+ /**
453
+ * Decodes an old-style Macintosh string. Returns either a Unicode JavaScript
454
+ * string, or 'undefined' if the encoding is unsupported. For example, we do
455
+ * not support Chinese, Japanese or Korean because these would need large
456
+ * mapping tables.
457
+ * @param {DataView} dataView
458
+ * @param {number} offset
459
+ * @param {number} dataLength
460
+ * @param {string} encoding
461
+ * @returns {string}
462
+ */
463
+ decode.MACSTRING = function(dataView, offset, dataLength, encoding) {
464
+ const table = eightBitMacEncodings[encoding];
465
+ if (table === undefined) {
466
+ return undefined;
467
+ }
468
+
469
+ let result = '';
470
+ for (let i = 0; i < dataLength; i++) {
471
+ const c = dataView.getUint8(offset + i);
472
+ // In all eight-bit Mac encodings, the characters 0x00..0x7F are
473
+ // mapped to U+0000..U+007F; we only need to look up the others.
474
+ if (c <= 0x7F) {
475
+ result += String.fromCharCode(c);
476
+ } else {
477
+ result += table[c & 0x7F];
478
+ }
479
+ }
480
+
481
+ return result;
482
+ };
483
+
484
+ // Helper function for encode.MACSTRING. Returns a dictionary for mapping
485
+ // Unicode character codes to their 8-bit MacOS equivalent. This table
486
+ // is not exactly a super cheap data structure, but we do not care because
487
+ // encoding Macintosh strings is only rarely needed in typical applications.
488
+ const macEncodingTableCache = typeof WeakMap === 'function' && new WeakMap();
489
+ let macEncodingCacheKeys;
490
+ const getMacEncodingTable = function (encoding) {
491
+ // Since we use encoding as a cache key for WeakMap, it has to be
492
+ // a String object and not a literal. And at least on NodeJS 2.10.1,
493
+ // WeakMap requires that the same String instance is passed for cache hits.
494
+ if (!macEncodingCacheKeys) {
495
+ macEncodingCacheKeys = {};
496
+ for (let e in eightBitMacEncodings) {
497
+ /*jshint -W053 */ // Suppress "Do not use String as a constructor."
498
+ macEncodingCacheKeys[e] = new String(e);
499
+ }
500
+ }
501
+
502
+ const cacheKey = macEncodingCacheKeys[encoding];
503
+ if (cacheKey === undefined) {
504
+ return undefined;
505
+ }
506
+
507
+ // We can't do "if (cache.has(key)) {return cache.get(key)}" here:
508
+ // since garbage collection may run at any time, it could also kick in
509
+ // between the calls to cache.has() and cache.get(). In that case,
510
+ // we would return 'undefined' even though we do support the encoding.
511
+ if (macEncodingTableCache) {
512
+ const cachedTable = macEncodingTableCache.get(cacheKey);
513
+ if (cachedTable !== undefined) {
514
+ return cachedTable;
515
+ }
516
+ }
517
+
518
+ const decodingTable = eightBitMacEncodings[encoding];
519
+ if (decodingTable === undefined) {
520
+ return undefined;
521
+ }
522
+
523
+ const encodingTable = {};
524
+ for (let i = 0; i < decodingTable.length; i++) {
525
+ encodingTable[decodingTable.charCodeAt(i)] = i + 0x80;
526
+ }
527
+
528
+ if (macEncodingTableCache) {
529
+ macEncodingTableCache.set(cacheKey, encodingTable);
530
+ }
531
+
532
+ return encodingTable;
533
+ };
534
+
535
+ /**
536
+ * Encodes an old-style Macintosh string. Returns a byte array upon success.
537
+ * If the requested encoding is unsupported, or if the input string contains
538
+ * a character that cannot be expressed in the encoding, the function returns
539
+ * 'undefined'.
540
+ * @param {string} str
541
+ * @param {string} encoding
542
+ * @returns {Array}
543
+ */
544
+ encode.MACSTRING = function(str, encoding) {
545
+ const table = getMacEncodingTable(encoding);
546
+ if (table === undefined) {
547
+ return undefined;
548
+ }
549
+
550
+ const result = [];
551
+ for (let i = 0; i < str.length; i++) {
552
+ let c = str.charCodeAt(i);
553
+
554
+ // In all eight-bit Mac encodings, the characters 0x00..0x7F are
555
+ // mapped to U+0000..U+007F; we only need to look up the others.
556
+ if (c >= 0x80) {
557
+ c = table[c];
558
+ if (c === undefined) {
559
+ // str contains a Unicode character that cannot be encoded
560
+ // in the requested encoding.
561
+ return undefined;
562
+ }
563
+ }
564
+ result[i] = c;
565
+ // result.push(c);
566
+ }
567
+
568
+ return result;
569
+ };
570
+
571
+ /**
572
+ * @param {string} str
573
+ * @param {string} encoding
574
+ * @returns {number}
575
+ */
576
+ sizeOf.MACSTRING = function(str, encoding) {
577
+ const b = encode.MACSTRING(str, encoding);
578
+ if (b !== undefined) {
579
+ return b.length;
580
+ } else {
581
+ return 0;
582
+ }
583
+ };
584
+
585
+ // Helper for encode.VARDELTAS
586
+ function isByteEncodable(value) {
587
+ return value >= -128 && value <= 127;
588
+ }
589
+
590
+ // Helper for encode.VARDELTAS
591
+ function encodeVarDeltaRunAsZeroes(deltas, pos, result) {
592
+ let runLength = 0;
593
+ const numDeltas = deltas.length;
594
+ while (pos < numDeltas && runLength < 64 && deltas[pos] === 0) {
595
+ ++pos;
596
+ ++runLength;
597
+ }
598
+ result.push(0x80 | (runLength - 1));
599
+ return pos;
600
+ }
601
+
602
+ // Helper for encode.VARDELTAS
603
+ function encodeVarDeltaRunAsBytes(deltas, offset, result) {
604
+ let runLength = 0;
605
+ const numDeltas = deltas.length;
606
+ let pos = offset;
607
+ while (pos < numDeltas && runLength < 64) {
608
+ const value = deltas[pos];
609
+ if (!isByteEncodable(value)) {
610
+ break;
611
+ }
612
+
613
+ // Within a byte-encoded run of deltas, a single zero is best
614
+ // stored literally as 0x00 value. However, if we have two or
615
+ // more zeroes in a sequence, it is better to start a new run.
616
+ // Fore example, the sequence of deltas [15, 15, 0, 15, 15]
617
+ // becomes 6 bytes (04 0F 0F 00 0F 0F) when storing the zero
618
+ // within the current run, but 7 bytes (01 0F 0F 80 01 0F 0F)
619
+ // when starting a new run.
620
+ if (value === 0 && pos + 1 < numDeltas && deltas[pos + 1] === 0) {
621
+ break;
622
+ }
623
+
624
+ ++pos;
625
+ ++runLength;
626
+ }
627
+ result.push(runLength - 1);
628
+ for (let i = offset; i < pos; ++i) {
629
+ result.push((deltas[i] + 256) & 0xff);
630
+ }
631
+ return pos;
632
+ }
633
+
634
+ // Helper for encode.VARDELTAS
635
+ function encodeVarDeltaRunAsWords(deltas, offset, result) {
636
+ let runLength = 0;
637
+ const numDeltas = deltas.length;
638
+ let pos = offset;
639
+ while (pos < numDeltas && runLength < 64) {
640
+ const value = deltas[pos];
641
+
642
+ // Within a word-encoded run of deltas, it is easiest to start
643
+ // a new run (with a different encoding) whenever we encounter
644
+ // a zero value. For example, the sequence [0x6666, 0, 0x7777]
645
+ // needs 7 bytes when storing the zero inside the current run
646
+ // (42 66 66 00 00 77 77), and equally 7 bytes when starting a
647
+ // new run (40 66 66 80 40 77 77).
648
+ if (value === 0) {
649
+ break;
650
+ }
651
+
652
+ // Within a word-encoded run of deltas, a single value in the
653
+ // range (-128..127) should be encoded within the current run
654
+ // because it is more compact. For example, the sequence
655
+ // [0x6666, 2, 0x7777] becomes 7 bytes when storing the value
656
+ // literally (42 66 66 00 02 77 77), but 8 bytes when starting
657
+ // a new run (40 66 66 00 02 40 77 77).
658
+ if (isByteEncodable(value) && pos + 1 < numDeltas && isByteEncodable(deltas[pos + 1])) {
659
+ break;
660
+ }
661
+
662
+ ++pos;
663
+ ++runLength;
664
+ }
665
+ result.push(0x40 | (runLength - 1));
666
+ for (let i = offset; i < pos; ++i) {
667
+ const val = deltas[i];
668
+ result.push(((val + 0x10000) >> 8) & 0xff, (val + 0x100) & 0xff);
669
+ }
670
+ return pos;
671
+ }
672
+
673
+ /**
674
+ * Encode a list of variation adjustment deltas.
675
+ *
676
+ * Variation adjustment deltas are used in ‘gvar’ and ‘cvar’ tables.
677
+ * They indicate how points (in ‘gvar’) or values (in ‘cvar’) get adjusted
678
+ * when generating instances of variation fonts.
679
+ *
680
+ * @see https://www.microsoft.com/typography/otspec/gvar.htm
681
+ * @see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6gvar.html
682
+ * @param {Array}
683
+ * @return {Array}
684
+ */
685
+ encode.VARDELTAS = function(deltas) {
686
+ let pos = 0;
687
+ const result = [];
688
+ while (pos < deltas.length) {
689
+ const value = deltas[pos];
690
+ if (value === 0) {
691
+ pos = encodeVarDeltaRunAsZeroes(deltas, pos, result);
692
+ } else if (value >= -128 && value <= 127) {
693
+ pos = encodeVarDeltaRunAsBytes(deltas, pos, result);
694
+ } else {
695
+ pos = encodeVarDeltaRunAsWords(deltas, pos, result);
696
+ }
697
+ }
698
+ return result;
699
+ };
700
+
701
+ // Convert a list of values to a CFF INDEX structure.
702
+ // The values should be objects containing name / type / value.
703
+ /**
704
+ * @param {Array} l
705
+ * @returns {Array}
706
+ */
707
+ encode.INDEX = function(l) {
708
+ //var offset, offsets, offsetEncoder, encodedOffsets, encodedOffset, data,
709
+ // i, v;
710
+ // Because we have to know which data type to use to encode the offsets,
711
+ // we have to go through the values twice: once to encode the data and
712
+ // calculate the offsets, then again to encode the offsets using the fitting data type.
713
+ let offset = 1; // First offset is always 1.
714
+ const offsets = [offset];
715
+ const data = [];
716
+ for (let i = 0; i < l.length; i += 1) {
717
+ const v = encode.OBJECT(l[i]);
718
+ Array.prototype.push.apply(data, v);
719
+ offset += v.length;
720
+ offsets.push(offset);
721
+ }
722
+
723
+ if (data.length === 0) {
724
+ return [0, 0];
725
+ }
726
+
727
+ const encodedOffsets = [];
728
+ const offSize = (1 + Math.floor(Math.log(offset) / Math.log(2)) / 8) | 0;
729
+ const offsetEncoder = [undefined, encode.BYTE, encode.USHORT, encode.UINT24, encode.ULONG][offSize];
730
+ for (let i = 0; i < offsets.length; i += 1) {
731
+ const encodedOffset = offsetEncoder(offsets[i]);
732
+ Array.prototype.push.apply(encodedOffsets, encodedOffset);
733
+ }
734
+
735
+ return Array.prototype.concat(encode.Card16(l.length),
736
+ encode.OffSize(offSize),
737
+ encodedOffsets,
738
+ data);
739
+ };
740
+
741
+ /**
742
+ * @param {Array}
743
+ * @returns {number}
744
+ */
745
+ sizeOf.INDEX = function(v) {
746
+ return encode.INDEX(v).length;
747
+ };
748
+
749
+ /**
750
+ * Convert an object to a CFF DICT structure.
751
+ * The keys should be numeric.
752
+ * The values should be objects containing name / type / value.
753
+ * @param {Object} m
754
+ * @returns {Array}
755
+ */
756
+ encode.DICT = function(m) {
757
+ let d = [];
758
+ const keys = Object.keys(m);
759
+ const length = keys.length;
760
+
761
+ for (let i = 0; i < length; i += 1) {
762
+ // Object.keys() return string keys, but our keys are always numeric.
763
+ const k = parseInt(keys[i], 0);
764
+ const v = m[k];
765
+ // Value comes before the key.
766
+ d = d.concat(encode.OPERAND(v.value, v.type));
767
+ d = d.concat(encode.OPERATOR(k));
768
+ }
769
+
770
+ return d;
771
+ };
772
+
773
+ /**
774
+ * @param {Object}
775
+ * @returns {number}
776
+ */
777
+ sizeOf.DICT = function(m) {
778
+ return encode.DICT(m).length;
779
+ };
780
+
781
+ /**
782
+ * @param {number}
783
+ * @returns {Array}
784
+ */
785
+ encode.OPERATOR = function(v) {
786
+ if (v < 1200) {
787
+ return [v];
788
+ } else {
789
+ return [12, v - 1200];
790
+ }
791
+ };
792
+
793
+ /**
794
+ * @param {Array} v
795
+ * @param {string}
796
+ * @returns {Array}
797
+ */
798
+ encode.OPERAND = function(v, type) {
799
+ let d = [];
800
+ if (Array.isArray(type)) {
801
+ for (let i = 0; i < type.length; i += 1) {
802
+ check.argument(v.length === type.length, 'Not enough arguments given for type' + type);
803
+ d = d.concat(encode.OPERAND(v[i], type[i]));
804
+ }
805
+ } else {
806
+ if (type === 'SID') {
807
+ d = d.concat(encode.NUMBER(v));
808
+ } else if (type === 'offset') {
809
+ // We make it easy for ourselves and always encode offsets as
810
+ // 4 bytes. This makes offset calculation for the top dict easier.
811
+ d = d.concat(encode.NUMBER32(v));
812
+ } else if (type === 'number') {
813
+ d = d.concat(encode.NUMBER(v));
814
+ } else if (type === 'real') {
815
+ d = d.concat(encode.REAL(v));
816
+ } else {
817
+ throw new Error('Unknown operand type ' + type);
818
+ // FIXME Add support for booleans
819
+ }
820
+ }
821
+
822
+ return d;
823
+ };
824
+
825
+ encode.OP = encode.BYTE;
826
+ sizeOf.OP = sizeOf.BYTE;
827
+
828
+ // memoize charstring encoding using WeakMap if available
829
+ const wmm = typeof WeakMap === 'function' && new WeakMap();
830
+
831
+ /**
832
+ * Convert a list of CharString operations to bytes.
833
+ * @param {Array}
834
+ * @returns {Array}
835
+ */
836
+ encode.CHARSTRING = function(ops) {
837
+ // See encode.MACSTRING for why we don't do "if (wmm && wmm.has(ops))".
838
+ if (wmm) {
839
+ const cachedValue = wmm.get(ops);
840
+ if (cachedValue !== undefined) {
841
+ return cachedValue;
842
+ }
843
+ }
844
+
845
+ let d = [];
846
+ const length = ops.length;
847
+
848
+ for (let i = 0; i < length; i += 1) {
849
+ const op = ops[i];
850
+ d = d.concat(encode[op.type](op.value));
851
+ }
852
+
853
+ if (wmm) {
854
+ wmm.set(ops, d);
855
+ }
856
+
857
+ return d;
858
+ };
859
+
860
+ /**
861
+ * @param {Array}
862
+ * @returns {number}
863
+ */
864
+ sizeOf.CHARSTRING = function(ops) {
865
+ return encode.CHARSTRING(ops).length;
866
+ };
867
+
868
+ // Utility functions ////////////////////////////////////////////////////////
869
+
870
+ /**
871
+ * Convert an object containing name / type / value to bytes.
872
+ * @param {Object}
873
+ * @returns {Array}
874
+ */
875
+ encode.OBJECT = function(v) {
876
+ const encodingFunction = encode[v.type];
877
+ check.argument(encodingFunction !== undefined, 'No encoding function for type ' + v.type);
878
+ return encodingFunction(v.value);
879
+ };
880
+
881
+ /**
882
+ * @param {Object}
883
+ * @returns {number}
884
+ */
885
+ sizeOf.OBJECT = function(v) {
886
+ const sizeOfFunction = sizeOf[v.type];
887
+ check.argument(sizeOfFunction !== undefined, 'No sizeOf function for type ' + v.type);
888
+ return sizeOfFunction(v.value);
889
+ };
890
+
891
+ /**
892
+ * Convert a table object to bytes.
893
+ * A table contains a list of fields containing the metadata (name, type and default value).
894
+ * The table itself has the field values set as attributes.
895
+ * @param {opentype.Table}
896
+ * @returns {Array}
897
+ */
898
+ encode.TABLE = function(table) {
899
+ let d = [];
900
+ const length = table.fields.length;
901
+ const subtables = [];
902
+ const subtableOffsets = [];
903
+
904
+ for (let i = 0; i < length; i += 1) {
905
+ const field = table.fields[i];
906
+ const encodingFunction = encode[field.type];
907
+ check.argument(encodingFunction !== undefined, 'No encoding function for field type ' + field.type + ' (' + field.name + ')');
908
+ let value = table[field.name];
909
+ if (value === undefined) {
910
+ value = field.value;
911
+ }
912
+
913
+ const bytes = encodingFunction(value);
914
+
915
+ if (field.type === 'TABLE') {
916
+ subtableOffsets.push(d.length);
917
+ d = d.concat([0, 0]);
918
+ subtables.push(bytes);
919
+ } else {
920
+ d = d.concat(bytes);
921
+ }
922
+ }
923
+
924
+ for (let i = 0; i < subtables.length; i += 1) {
925
+ const o = subtableOffsets[i];
926
+ const offset = d.length;
927
+ check.argument(offset < 65536, 'Table ' + table.tableName + ' too big.');
928
+ d[o] = offset >> 8;
929
+ d[o + 1] = offset & 0xff;
930
+ d = d.concat(subtables[i]);
931
+ }
932
+
933
+ return d;
934
+ };
935
+
936
+ /**
937
+ * @param {opentype.Table}
938
+ * @returns {number}
939
+ */
940
+ sizeOf.TABLE = function(table) {
941
+ let numBytes = 0;
942
+ const length = table.fields.length;
943
+
944
+ for (let i = 0; i < length; i += 1) {
945
+ const field = table.fields[i];
946
+ const sizeOfFunction = sizeOf[field.type];
947
+ check.argument(sizeOfFunction !== undefined, 'No sizeOf function for field type ' + field.type + ' (' + field.name + ')');
948
+ let value = table[field.name];
949
+ if (value === undefined) {
950
+ value = field.value;
951
+ }
952
+
953
+ numBytes += sizeOfFunction(value);
954
+
955
+ // Subtables take 2 more bytes for offsets.
956
+ if (field.type === 'TABLE') {
957
+ numBytes += 2;
958
+ }
959
+ }
960
+
961
+ return numBytes;
962
+ };
963
+
964
+ encode.RECORD = encode.TABLE;
965
+ sizeOf.RECORD = sizeOf.TABLE;
966
+
967
+ // Merge in a list of bytes.
968
+ encode.LITERAL = function(v) {
969
+ return v;
970
+ };
971
+
972
+ sizeOf.LITERAL = function(v) {
973
+ return v.length;
974
+ };
975
+
976
+ export { decode, encode, sizeOf };