@capyclaw/offline-ddr0 0.0.0-stage → 1.9.1

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 (300) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +441 -2
  3. package/client/client.js +603 -0
  4. package/cordis.patch.yml +13 -0
  5. package/docs/STORAGE-MIGRATION.md +136 -0
  6. package/lib/atomic.mjs +40 -0
  7. package/lib/http-cache.mjs +42 -0
  8. package/lib/inbox.mjs +64 -0
  9. package/lib/media.mjs +242 -0
  10. package/lib/migrate-json.mjs +101 -0
  11. package/lib/mirror-index.mjs +105 -0
  12. package/lib/mirror.mjs +123 -0
  13. package/lib/proxy.mjs +188 -0
  14. package/lib/remote.mjs +158 -0
  15. package/lib/render.mjs +93 -0
  16. package/lib/repository.mjs +71 -0
  17. package/lib/store.mjs +610 -0
  18. package/lib/surface.mjs +74 -0
  19. package/lib/sync-ui.mjs +108 -0
  20. package/lib/sync.mjs +433 -0
  21. package/lib/wire.mjs +211 -0
  22. package/lib/workstore-repository.mjs +316 -0
  23. package/lib/workstore.mjs +348 -0
  24. package/mirror/files/00001.html +2045 -0
  25. package/mirror/files/00002.json +1 -0
  26. package/mirror/files/00003.json +1 -0
  27. package/mirror/files/00004.json +1 -0
  28. package/mirror/files/00005.json +1 -0
  29. package/mirror/files/00006.json +1 -0
  30. package/mirror/files/00007.json +1 -0
  31. package/mirror/files/00008.json +1 -0
  32. package/mirror/files/00009.json +1 -0
  33. package/mirror/files/00010.json +1 -0
  34. package/mirror/files/00011.json +1 -0
  35. package/mirror/files/00012.json +1 -0
  36. package/mirror/files/00013.json +1 -0
  37. package/mirror/files/00014.json +1 -0
  38. package/mirror/files/00015.json +1 -0
  39. package/mirror/files/00016.json +1 -0
  40. package/mirror/files/00017.json +1 -0
  41. package/mirror/files/00018.json +1 -0
  42. package/mirror/files/00019.json +1 -0
  43. package/mirror/files/00020.json +1 -0
  44. package/mirror/files/00021.json +1 -0
  45. package/mirror/files/00022.json +1 -0
  46. package/mirror/files/00023.js +205 -0
  47. package/mirror/files/00024.json +1 -0
  48. package/mirror/files/00025.json +1 -0
  49. package/mirror/files/00026.json +1 -0
  50. package/mirror/files/00027.js +51 -0
  51. package/mirror/files/00028.json +1 -0
  52. package/mirror/files/00029.json +1 -0
  53. package/mirror/files/00030.json +1 -0
  54. package/mirror/files/00031.json +1 -0
  55. package/mirror/files/00032.json +1 -0
  56. package/mirror/files/00033.json +1 -0
  57. package/mirror/files/00034.json +1 -0
  58. package/mirror/files/00035.json +1 -0
  59. package/mirror/files/00036.json +1 -0
  60. package/mirror/files/00037.json +1 -0
  61. package/mirror/files/00038.json +1 -0
  62. package/mirror/files/00039.json +1 -0
  63. package/mirror/files/00040.js +2311 -0
  64. package/mirror/files/00041.json +1 -0
  65. package/mirror/files/00042.json +1 -0
  66. package/mirror/files/00043.json +1 -0
  67. package/mirror/files/00044.json +1 -0
  68. package/mirror/files/00045.js +575 -0
  69. package/mirror/files/00046.json +1 -0
  70. package/mirror/files/00047.js +575 -0
  71. package/mirror/files/00048.js +575 -0
  72. package/mirror/files/00049.json +1 -0
  73. package/mirror/files/00050.json +1 -0
  74. package/mirror/files/00051.json +1 -0
  75. package/mirror/files/00052.json +1 -0
  76. package/mirror/files/00053.js +575 -0
  77. package/mirror/files/00054.json +1 -0
  78. package/mirror/files/00055.json +1 -0
  79. package/mirror/files/00056.js +575 -0
  80. package/mirror/files/00057.json +1 -0
  81. package/mirror/files/00058.json +1 -0
  82. package/mirror/files/00059.js +360 -0
  83. package/mirror/files/00060.json +1 -0
  84. package/mirror/files/00061.json +1 -0
  85. package/mirror/files/00062.json +1 -0
  86. package/mirror/files/00063.json +1 -0
  87. package/mirror/files/00064.json +1 -0
  88. package/mirror/files/00065.js +144 -0
  89. package/mirror/files/00066.js +7 -0
  90. package/mirror/files/00067.json +1 -0
  91. package/mirror/files/00068.json +1 -0
  92. package/mirror/files/00069.json +1 -0
  93. package/mirror/files/00070.json +1 -0
  94. package/mirror/files/00071.json +1 -0
  95. package/mirror/files/00072.json +1 -0
  96. package/mirror/files/00073.js +1 -0
  97. package/mirror/files/00074.json +1 -0
  98. package/mirror/files/00075.json +1 -0
  99. package/mirror/files/00076.json +1 -0
  100. package/mirror/files/00077.js +45 -0
  101. package/mirror/files/00078.js +1348 -0
  102. package/mirror/files/00079.json +1 -0
  103. package/mirror/files/00080.json +1 -0
  104. package/mirror/files/00081.js +1 -0
  105. package/mirror/files/00082.json +1 -0
  106. package/mirror/files/00083.json +1 -0
  107. package/mirror/files/00084.js +7 -0
  108. package/mirror/files/00085.json +1 -0
  109. package/mirror/files/00086.json +1 -0
  110. package/mirror/files/00087.js +7 -0
  111. package/mirror/files/00088.json +1 -0
  112. package/mirror/files/00089.json +1 -0
  113. package/mirror/files/00090.js +7 -0
  114. package/mirror/files/00091.json +1 -0
  115. package/mirror/files/00092.json +1 -0
  116. package/mirror/files/00093.js +102 -0
  117. package/mirror/files/00094.json +1 -0
  118. package/mirror/files/00095.json +1 -0
  119. package/mirror/files/00096.json +1 -0
  120. package/mirror/files/00097.json +1 -0
  121. package/mirror/files/00098.json +1 -0
  122. package/mirror/files/00099.json +1 -0
  123. package/mirror/files/00100.json +1 -0
  124. package/mirror/files/00101.js +102 -0
  125. package/mirror/files/00102.json +1 -0
  126. package/mirror/files/00103.json +1 -0
  127. package/mirror/files/00104.json +1 -0
  128. package/mirror/files/00105.json +1 -0
  129. package/mirror/files/00106.json +1 -0
  130. package/mirror/files/00107.js +110 -0
  131. package/mirror/files/00108.json +1 -0
  132. package/mirror/files/00109.json +1 -0
  133. package/mirror/files/00110.json +1 -0
  134. package/mirror/files/00111.json +1 -0
  135. package/mirror/files/00112.json +1 -0
  136. package/mirror/files/00113.json +1 -0
  137. package/mirror/files/00114.json +1 -0
  138. package/mirror/files/00115.json +1 -0
  139. package/mirror/files/00116.json +1 -0
  140. package/mirror/files/00117.json +1 -0
  141. package/mirror/files/00118.json +1 -0
  142. package/mirror/files/00119.json +1 -0
  143. package/mirror/files/00120.json +1 -0
  144. package/mirror/files/00121.json +1 -0
  145. package/mirror/files/00122.json +1 -0
  146. package/mirror/files/00123.json +1 -0
  147. package/mirror/files/00124.json +1 -0
  148. package/mirror/files/00125.json +1 -0
  149. package/mirror/files/00126.json +1 -0
  150. package/mirror/files/00127.json +1 -0
  151. package/mirror/files/00128.json +1 -0
  152. package/mirror/files/00129.json +1 -0
  153. package/mirror/files/00130.json +1 -0
  154. package/mirror/files/00131.json +1 -0
  155. package/mirror/files/00132.js +110 -0
  156. package/mirror/files/00133.json +1 -0
  157. package/mirror/files/00134.json +1 -0
  158. package/mirror/files/00135.json +1 -0
  159. package/mirror/files/00136.json +1 -0
  160. package/mirror/files/00137.js +26 -0
  161. package/mirror/files/00138.json +1 -0
  162. package/mirror/files/00139.json +1 -0
  163. package/mirror/files/00140.json +1 -0
  164. package/mirror/files/00141.json +1 -0
  165. package/mirror/files/00142.json +1 -0
  166. package/mirror/files/00143.json +1 -0
  167. package/mirror/files/00144.js +26 -0
  168. package/mirror/files/00145.json +1 -0
  169. package/mirror/files/00146.json +1 -0
  170. package/mirror/files/00147.js +29 -0
  171. package/mirror/files/00148.json +1 -0
  172. package/mirror/files/00149.json +1 -0
  173. package/mirror/files/00150.js +23 -0
  174. package/mirror/files/00151.json +1 -0
  175. package/mirror/files/00152.json +1 -0
  176. package/mirror/files/00153.js +719 -0
  177. package/mirror/files/00154.js +9575 -0
  178. package/mirror/files/00155.js +108 -0
  179. package/mirror/files/00156.js +379 -0
  180. package/mirror/files/00157.js +48 -0
  181. package/mirror/files/00158.json +16 -0
  182. package/mirror/manifest.json +1582 -0
  183. package/node_modules/@capyclaw/asset-service/README.md +48 -0
  184. package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
  185. package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
  186. package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
  187. package/node_modules/@capyclaw/asset-service/package.json +59 -0
  188. package/node_modules/@capyclaw/asset-service/src/index.mjs +310 -0
  189. package/node_modules/@capyclaw/foundation/README.md +51 -0
  190. package/node_modules/@capyclaw/foundation/abi/assets.mjs +26 -0
  191. package/node_modules/@capyclaw/foundation/abi/bridge.mjs +88 -0
  192. package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
  193. package/node_modules/@capyclaw/foundation/abi/index.mjs +50 -0
  194. package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
  195. package/node_modules/@capyclaw/foundation/abi/loader.mjs +352 -0
  196. package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
  197. package/node_modules/@capyclaw/foundation/abi/spec.mjs +258 -0
  198. package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
  199. package/node_modules/@capyclaw/foundation/abi/version.mjs +140 -0
  200. package/node_modules/@capyclaw/foundation/abi/visibility.mjs +90 -0
  201. package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
  202. package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
  203. package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
  204. package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
  205. package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
  206. package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +72 -0
  207. package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
  208. package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +69 -0
  209. package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +120 -0
  210. package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
  211. package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
  212. package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
  213. package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
  214. package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
  215. package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +38 -0
  216. package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +88 -0
  217. package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +54 -0
  218. package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +187 -0
  219. package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
  220. package/node_modules/@capyclaw/foundation/lib/kernel.mjs +195 -0
  221. package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +115 -0
  222. package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
  223. package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
  224. package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +198 -0
  225. package/node_modules/@capyclaw/foundation/package.json +53 -0
  226. package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
  227. package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
  228. package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
  229. package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
  230. package/node_modules/@capyclaw/plugin-kit/package.json +71 -0
  231. package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
  232. package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
  233. package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +132 -0
  234. package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat.mjs +26 -0
  235. package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +60 -0
  236. package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
  237. package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
  238. package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
  239. package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
  240. package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
  241. package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
  242. package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
  243. package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
  244. package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +150 -0
  245. package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
  246. package/node_modules/@capyclaw/plugin-kit/src/service/static.mjs +79 -0
  247. package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
  248. package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
  249. package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
  250. package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
  251. package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +57 -0
  252. package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
  253. package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
  254. package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
  255. package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
  256. package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +664 -0
  257. package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
  258. package/node_modules/@capyclaw/service-host/README.md +86 -0
  259. package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
  260. package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
  261. package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
  262. package/node_modules/@capyclaw/service-host/package.json +60 -0
  263. package/node_modules/@capyclaw/service-host/src/index.mjs +570 -0
  264. package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
  265. package/node_modules/@capyclaw/suite-kit/README.md +289 -0
  266. package/node_modules/@capyclaw/suite-kit/bin/dsh-domain.mjs +98 -0
  267. package/node_modules/@capyclaw/suite-kit/bin/dsh-suite.mjs +174 -0
  268. package/node_modules/@capyclaw/suite-kit/client/embed.js +35 -0
  269. package/node_modules/@capyclaw/suite-kit/domain.schema.json +129 -0
  270. package/node_modules/@capyclaw/suite-kit/package.json +58 -0
  271. package/node_modules/@capyclaw/suite-kit/src/activation-registry.mjs +184 -0
  272. package/node_modules/@capyclaw/suite-kit/src/artifacts.mjs +131 -0
  273. package/node_modules/@capyclaw/suite-kit/src/capability.mjs +181 -0
  274. package/node_modules/@capyclaw/suite-kit/src/compose.mjs +201 -0
  275. package/node_modules/@capyclaw/suite-kit/src/domain.mjs +138 -0
  276. package/node_modules/@capyclaw/suite-kit/src/embed.mjs +81 -0
  277. package/node_modules/@capyclaw/suite-kit/src/host.mjs +230 -0
  278. package/node_modules/@capyclaw/suite-kit/src/index.mjs +24 -0
  279. package/node_modules/@capyclaw/suite-kit/src/manifest.mjs +263 -0
  280. package/node_modules/@capyclaw/suite-kit/src/orchestration.mjs +100 -0
  281. package/node_modules/@capyclaw/suite-kit/src/profile.mjs +584 -0
  282. package/node_modules/@capyclaw/suite-kit/src/surface.mjs +28 -0
  283. package/node_modules/@capyclaw/suite-kit/suite.schema.json +128 -0
  284. package/node_modules/@capyclaw/work-store/README.md +83 -0
  285. package/node_modules/@capyclaw/work-store/STANDARD.md +263 -0
  286. package/node_modules/@capyclaw/work-store/cordis.patch.yml +3 -0
  287. package/node_modules/@capyclaw/work-store/dsh-suite.json +33 -0
  288. package/node_modules/@capyclaw/work-store/icon.svg +7 -0
  289. package/node_modules/@capyclaw/work-store/lib/host.mjs +21 -0
  290. package/node_modules/@capyclaw/work-store/package.json +68 -0
  291. package/node_modules/@capyclaw/work-store/src/backend.mjs +90 -0
  292. package/node_modules/@capyclaw/work-store/src/db.mjs +199 -0
  293. package/node_modules/@capyclaw/work-store/src/envelope.mjs +132 -0
  294. package/node_modules/@capyclaw/work-store/src/index.mjs +571 -0
  295. package/node_modules/@capyclaw/work-store/src/interop.mjs +70 -0
  296. package/node_modules/@capyclaw/work-store/src/refs.mjs +99 -0
  297. package/node_modules/@capyclaw/work-store/src/routes.mjs +135 -0
  298. package/package.json +82 -4
  299. package/plugin.mjs +644 -0
  300. package/static/index.html +2068 -0
@@ -0,0 +1 @@
1
+ {"status":"ok","item":{"id":3882,"ref":"WORKS-3882","name":"Excel 表格编辑器(完整版)","tags":"应用,套件,Excel,编辑器","image_url":"","thumb_url":"","emoji":"📝","status":3,"visible_to":[],"is_pinned":false,"is_locked":false,"ban_hidden":false,"author":"站长","author_id":1,"author_username":"root","author_avatar":"emoji:🦔","view_count":13,"like_count":0,"favorite_count":0,"fork_count":0,"referenced_count":0,"latest_version":5,"default_version":5,"forked_from_ref":"","fork_base_version":0,"description":"# Excel 表格编辑器(完整版)\n\n> 平台作品形态:**完整可写应用**(`kind=code`,打开即编辑器)。\n> 引擎 = [x-spreadsheet](https://github.com/myliang/x-spreadsheet)(MIT),\n> 构建期直引真源,不落副本。本作品与「Excel 表格装饰器套件」(只读查看器)\n> 是一对:**编辑器是唯一可写面,查看器负责纯查看**。\n\n## 这是什么\n\n**一个 js 文件就是完整的 Excel 表格编辑器**(`excel-full-editor.js`,约\n163 KB):打开即进入编辑态——单元格编辑、样式(字体/颜色/对齐/换行/\n边框)、合并单元格、行高列宽、多工作表增删改名、公式(引擎内置函数集)、\n复制粘贴、撤销重做。并可被宿主作品 / 其它 Agent 通过\n`window.ExcelApp` 直接驱动:载入数据、导出数据、读写单元格、订阅事件。\n\n与只读套件共用同一份数据 DSL(`{name, cols, rows{cells}, merges, styles}`),\n编辑器保存形 ⇄ 套件渲染形往返无损。\n\n## 快速开始\n\n### 直接打开\n\n打开本作品即用**内置示例表格**进入编辑态,无需任何配置。\n\n### 作为能力组件被宿主 / Agent 调用\n\n```js\n// 1) 载入数据并挂载到任意容器\nawait ExcelApp.mount(document.getElementById('app'), {\n data: [{ name: '销售', rows: { 0: { cells: { 0: { text: '季度' } } } } }],\n});\n\n// 2) 读 / 写\nExcelApp.cellText(1, 0); // 读 A2\nExcelApp.cellText(1, 0, '38.5'); // 写 A2\nconst sheets = ExcelApp.dump(); // 导出完整数据(可直接交给查看器套件)\n\n// 3) 事件\nExcelApp.on('change', data => console.log('已变更', data));\n```\n\n### 作为 Work 作品被平台拉起\n\n```js\nWork.register({\n mount(ctx) {\n ExcelApp.mount(ctx.stage, { viewDoc: ctx.viewDoc }).then(() => ctx.ready());\n },\n destroy() { ExcelApp.unmount(); },\n});\n```\n\n若宿主在 `%%%WORKS-WORKFLOW-SOURCE%%%` 分节提供了数据(三形兼容),\n打开时以其为初始表格。\n\n## 数据格式\n\n与查看器套件完全一致(同一份 DSL):\n\n```jsonc\n[\n {\n \"name\": \"工作表名\",\n \"styles\": [ { \"font\": { \"bold\": true } } ],\n \"merges\": [\"A1:D1\"],\n \"cols\": { \"len\": 8, \"0\": { \"width\": 140 } },\n \"rows\": {\n \"0\": { \"cells\": { \"0\": { \"text\": \"标题\", \"style\": 0 },\n \"1\": { \"text\": \"=SUM(B2:B5)\" } } }\n }\n }\n]\n```\n\n顶层三形兼容:`[ {sheet} … ]`、`{ \"sheets\": [ … ] }`、`{ \"data\": [ … ] }`、\n单 sheet 对象。\n\n> 平台 `.works` 的 `%%%WORKS-WORKFLOW-SOURCE%%%` 分节必须是 JSON **对象**,\n> 因此宿主侧一律用 `{ \"sheets\": [ … ] }` 形态;数组只在直接调用\n> `ExcelApp.load()` / `mount({data})` 时可用。\n\n## 元素·配置参考(window.ExcelApp)\n\n| 接口 | 说明 |\n|---|---|\n| `ExcelApp.mount(el, {data?, viewDoc?, mode?, options?})` | 挂载编辑器(`mode: 'edit' \\| 'read'`) |\n| `ExcelApp.unmount()` / `isMounted()` | 卸下 / 查询状态 |\n| `ExcelApp.load(data)` | 载入数据(三形兼容) |\n| `ExcelApp.dump()` | 导出完整数据(sheet 数组) |\n| `ExcelApp.sheets()` | 工作表清单 `[{index,name}]` |\n| `ExcelApp.cellText(ri, ci, text?, sheetIndex?)` | 读 / 写单元格文本 |\n| `ExcelApp.cell(ri, ci, sheetIndex?)` / `cellStyle(…)` | 读单元格 / 样式 |\n| `ExcelApp.setMode('edit' \\| 'read')` | 切换编辑 / 只读(保留数据) |\n| `ExcelApp.reRender()` | 强制重绘 |\n| `ExcelApp.describe()` | 结构化摘要 |\n| `ExcelApp.help()` | 控制台打印接口表 |\n| `ExcelApp.on(type, fn)` / `off(type, fn)` | `ready` / `change` / `cell-selected` / `cells-selected` / `cell-edited` / `unmount` |\n\n## 完整示例\n\n### 示例 1:新建一张表并挂载\n\n```js\nawait ExcelApp.mount('#app', {\n data: [{ name: '空白', rows: { 0: { cells: { 0: { text: 'Hello' } } } } }],\n});\n```\n\n### 示例 2:把编辑器内容交给只读套件渲染\n\n```js\nconst sheets = ExcelApp.dump(); // 编辑端导出\n// 宿主 .works:view.decorator = WORKS-<套件>@N,\n// %%%WORKS-WORKFLOW-SOURCE%%% 分节 = JSON.stringify(sheets)\n```\n\n### 示例 3:只读预览同一份数据\n\n```js\nawait ExcelApp.mount('#app', { data: sheets, mode: 'read' });\n```\n\n## 常见问题\n\n1. **打开是示例表格?** 宿主没有提供初始数据(或分节 JSON 非法),\n 编辑器按「不白屏」原则退回内置示例(控制台有告警)。\n2. **公式算不出来?** 引擎只实现部分函数(`SUM` / `AVERAGE` 等);\n 不支持的函数(如 `ROUND`)会让该表装载失败并退回示例——建议保存\n 计算结果而非复杂公式。\n3. **嵌在宿主里高度为 0?** 宿主容器必须给舞台实际尺寸;编辑器跟随\n 容器尺寸(ResizeObserver 重排)。\n\n## 技术限制\n\n- 无后端:所有计算与渲染在浏览器内完成,运行期零请求。\n- 公式:仅引擎内置函数集,不支持自定义函数、跨表引用以外的复杂特性。\n- 图表 / 条件格式 / 数据透视 / 打印分页:引擎未提供,本作品不承诺。\n- 未内置拼写检查、宏、导入导出 `.xlsx` 文件(数据以 JSON DSL 进出)。\n\n## 相关资源\n\n- 上游引擎:https://github.com/myliang/x-spreadsheet(MIT)\n- 配套只读查看器:平台作品「Excel 表格装饰器套件」\n- 构建期真源:`applications/WORKS-<id>/packaging_program_2/`\n\n## 版本信息\n\n- v1.0.3(2026-10-21):示例百分比按引擎口径存数值(`42.2` + `format: percent`)。\n- v1.0.2(2026-10-21):宿主数据示例改为 `{\"sheets\": [...]}` 对象形态\n (平台声明分节必须是 JSON 对象)。\n- v1.0.1(2026-10-21):内置示例改用 `format: percent` 数值 + `AVERAGE` 公式\n (修掉示例里的 `NaN`)。\n- v1.0.0(2026-10-21):首版。x-spreadsheet 1.1.8 完整编辑装配,\n `window.ExcelApp` 对外接口,三形数据兼容,坏数据降级内置示例。","description_truncated":false,"description_next_offset":3870,"brief":"单文件完整 Excel 表格编辑器:编辑 + 显示 + 对外 API。","created_at":"2026-10-22T00:58:30.767560+08:00","last_published_at":"2026-10-27T11:50:18.138770+08:00","updated_at":"2026-10-27T11:50:18.134282+08:00","code_url":"/api/works/works/3882/version/5/js","has_code":true,"launch":{"type":"document","document":{"path":"/apps/works/doc/3882"}},"item_type":"works","delivery_adopted":null,"delivery_published":null,"is_favorited":false,"references":[],"attachments":[]}}
@@ -0,0 +1 @@
1
+ {"liked":false,"favorited":false}
@@ -0,0 +1 @@
1
+ {"status":"ok","item":{"id":3881,"ref":"WORKS-3881","name":"Excel 表格装饰器套件","tags":"外接,套件,Excel","image_url":"","thumb_url":"","emoji":"📊","status":3,"visible_to":[],"is_pinned":false,"is_locked":false,"ban_hidden":false,"author":"站长","author_id":1,"author_username":"root","author_avatar":"emoji:🦔","view_count":83,"like_count":0,"favorite_count":0,"fork_count":0,"referenced_count":0,"latest_version":5,"default_version":5,"forked_from_ref":"","fork_base_version":0,"description":"# Excel 表格装饰器套件(只读查看器)\n\n> 平台作品形态:`view.decorator` 渲染套件。宿主作品在 META 里声明\n> `decorator = WORKS-<本套件>@<版本>`,把表格数据 JSON 放进\n> `%%%WORKS-WORKFLOW-SOURCE%%%` 分节,顶图点击即可只读查看整张表。\n> 引擎 = [x-spreadsheet](https://github.com/myliang/x-spreadsheet)(MIT),\n> 构建期直引真源,不落副本。\n\n## 这是什么\n\n一个**单文件只读表格查看器**(`excel-sheet-suite.js`,约 160 KB):\n把宿主作品的表格数据 JSON 渲染成 canvas 表格——支持多工作表、单元格\n样式、合并单元格、列宽、公式计算结果的显示。固定只读:没有工具栏、\n没有工作表增删、没有右键菜单、没有任何保存/导出通道。\n\n与配套的「Excel 表格编辑器(完整版)」共同锚定同一份数据 DSL:\n**编辑器负责一切写操作,本套件负责纯查看**,两端各自独立迭代。\n\n## 快速开始\n\n### 作为装饰器套件被宿主使用(推荐)\n\n宿主作品 `.works` 的 META:\n\n```json\n{\n \"name\": \"我的报表\",\n \"tags\": \"外接,示例\",\n \"emoji\": \"📊\",\n \"view\": {\n \"kind\": \"code\",\n \"decorator\": \"WORKS-3881@1\",\n \"source\": \"%%%WORKS-WORKFLOW-SOURCE%%%\"\n }\n}\n```\n\n`%%%WORKS-WORKFLOW-SOURCE%%%` 分节放表格数据。**注意:`.works` 的声明分节\n必须是 JSON 对象**(平台发布闸硬性要求),所以这里用 `{\"sheets\": [...]}`\n包裹;直接调 `ExcelApp.load()` 时数组形态也能吃。\n\n```json\n{\n \"sheets\": [\n {\n \"name\": \"销售\",\n \"cols\": { \"len\": 6, \"0\": { \"width\": 140 } },\n \"rows\": {\n \"0\": { \"cells\": { \"0\": { \"text\": \"季度\" }, \"1\": { \"text\": \"收入\" } } },\n \"1\": { \"cells\": { \"0\": { \"text\": \"Q1\" }, \"1\": { \"text\": \"128.5\" } } }\n }\n }\n ]\n}\n```\n\n宿主入口码只需一句占位(内容由套件渲染):\n\n```js\nWork.register({ mount(ctx) { ctx.stage.innerHTML = '<div style=\"padding:24px;opacity:.7\">本作品的看点在顶图。</div>'; } });\n```\n\n### 直接打开套件作品\n\n打开本作品即用**内置示例表格**渲染(无需任何数据配置),可用于自检\n渲染效果。\n\n## 数据格式\n\n### 顶层三形兼容(任选其一)\n\n| 形态 | 形状 | 说明 |\n|---|---|---|\n| sheet 数组 | `[ {sheet}, {sheet} ]` | 多工作表,第一个为活动表 |\n| 包裹形 | `{ \"sheets\": [ … ] }` | 同上,便于和其它元数据共存 |\n| 包裹形 | `{ \"data\": [ … ] }` | 同上 |\n| 单表 | `{ \"rows\": {…}, \"cols\": {…} }` | 单工作表,自动命名 `sheet1` |\n\n> 在 `.works` 宿主作品里,`%%%WORKS-WORKFLOW-SOURCE%%%` 分节必须是 JSON\n> **对象**(平台闸),请用 `{ \"sheets\": [ … ] }` 形态;数组形态只在直接\n> 调用接口时可用。\n\n### sheet 字段\n\n```jsonc\n{\n \"name\": \"工作表名\", // 缺省 sheet1 / sheet2 …\n \"styles\": [ /* 样式数组,单元格用下标引用 */ ],\n \"merges\": [\"A1:D1\"], // 合并区域,A1 表示法\n \"cols\": { \"len\": 8, \"0\": { \"width\": 140 } },\n \"rows\": {\n \"0\": { \"cells\": { \"0\": { \"text\": \"标题\", \"style\": 0 } } }\n }\n}\n```\n\n### cell 字段\n\n| 字段 | 类型 | 说明 |\n|---|---|---|\n| `text` | string | 单元格文本;以 `=` 开头按公式解析(`=SUM(B3:B5)`) |\n| `style` | number | 指向 sheet.styles 的下标 |\n\n### style 字段\n\n`bgcolor` / `color` / `align`(left/center/right)/ `valign`\n(top/middle/bottom)/ `textwrap` / `format`(normal/text/number/percent/\nrmb/usd/eur/date/time)/ `font{name,size,bold,italic}` /\n`border{top,right,bottom,left}`。\n\n## 元素·配置参考\n\n| 配置 | 默认 | 说明 |\n|---|---|---|\n| `mode` | `read` | **固定只读**,套件不暴露该开关 |\n| `showToolbar` | `false` | 编辑工具栏(查看器恒关) |\n| `showBottomBar` | `false` | 工作表切换栏(查看器恒关) |\n| `showContextmenu` | `false` | 右键菜单(查看器恒关) |\n| `showGrid` | `true` | 网格线 |\n| `view.width/height` | 容器尺寸 | 跟随舞台尺寸(ResizeObserver 重排) |\n\n## 完整示例\n\n### 示例 1:单表 + 合并标题\n\n```json\n[{ \"merges\": [\"A1:C1\"],\n \"rows\": { \"0\": { \"cells\": { \"0\": { \"text\": \"月度汇总\" } } },\n \"1\": { \"cells\": { \"0\": { \"text\": \"1 月\" }, \"1\": { \"text\": \"12\" } } } } }]\n```\n\n### 示例 2:多工作表\n\n```json\n[{ \"name\": \"1 月\", \"rows\": { \"0\": { \"cells\": { \"0\": { \"text\": \"A\" } } } } },\n { \"name\": \"2 月\", \"rows\": { \"0\": { \"cells\": { \"0\": { \"text\": \"B\" } } } } }]\n```\n\n### 示例 3:公式与百分比格式\n\n```json\n[{ \"styles\": [{ \"bgcolor\": \"#eef4ff\", \"font\": { \"bold\": true } },\n { \"format\": \"percent\" }],\n \"rows\": { \"0\": { \"cells\": { \"0\": { \"text\": \"合计\", \"style\": 0 },\n \"1\": { \"text\": \"=SUM(B3:B5)\" } } },\n \"1\": { \"cells\": { \"1\": { \"text\": \"10\" } } },\n \"2\": { \"cells\": { \"1\": { \"text\": \"20\" } } },\n \"3\": { \"cells\": { \"1\": { \"text\": \"43\", \"style\": 1 } } } } }]\n```\n\n## 常见问题\n\n1. **打开后只有示例表格?** 数据没进来:检查宿主 META 的 `view.source`\n 是否指向 `%%%WORKS-WORKFLOW-SOURCE%%%`,且该分节内容是合法 JSON。\n2. **公式显示 `NaN` 或空白?** 引擎只支持有限函数集(`SUM` / `AVERAGE`\n 等),对文本单元格做算术会得到 `NaN`;`ROUND` 等未实现的函数会让该表\n 渲染失败。建议在编辑器里保存**计算结果**而不是复杂公式。\n3. **表格没铺满舞台?** 容器尺寸由舞台决定;若宿主把 iframe 高度设为\n 0 则只会渲染 1px,请让舞台有实际尺寸。\n\n## 技术限制\n\n- 只读:不提供编辑、保存、导入/导出;写操作请用配套编辑器。\n- 公式:仅引擎内置函数集;未实现函数会导致该表渲染降级为内置示例\n (不会白屏,控制台有告警)。\n- 渲染:canvas 2D,不支持打印分页、图表、条件格式、数据透视。\n- 依赖:单文件自包含(引擎 + CSS 内联),运行期零后端请求。\n\n## 相关资源\n\n- 上游引擎:https://github.com/myliang/x-spreadsheet(MIT)\n- 配套编辑器:平台作品「Excel 表格编辑器(完整版)」= `WORKS-3882`\n- 构建期真源:`applications/WORKS-3881/packaging_program_1/`\n- 平台规范:`docs/ext-apps.md` §5.2(纯查看装饰器套件)\n\n## 版本信息\n\n- v1.0.3(2026-10-21):示例百分比按引擎口径存数值(`42.2` + `format: percent`\n → 显示 42.2%),合计行用 `format: number` 收敛小数位。\n- v1.0.2(2026-10-21):宿主数据示例改为 `{\"sheets\": [...]}` 对象形态\n (平台声明分节必须是 JSON 对象,数组会被发布闸 400)。\n- v1.0.1(2026-10-21):内置示例改用 `format: percent` 数值 + `AVERAGE`\n 公式(修掉示例里的 `NaN`);产物目录不再被构建清空(保住本文档)。\n- v1.0.0(2026-10-21):首版。x-spreadsheet 1.1.8 只读装配,三形数据兼容,\n ResizeObserver 跟随舞台,坏数据降级内置示例。","description_truncated":false,"description_next_offset":4661,"brief":"表格数据 JSON 只读渲染。","created_at":"2026-10-22T00:58:16.899162+08:00","last_published_at":"2026-10-27T11:50:09.782248+08:00","updated_at":"2026-10-27T11:50:09.776006+08:00","code_url":"/api/works/works/3881/version/5/js","has_code":true,"launch":{"type":"document","document":{"path":"/apps/works/doc/3881"}},"item_type":"works","delivery_adopted":null,"delivery_published":null,"is_favorited":false,"references":[],"attachments":[]}}
@@ -0,0 +1 @@
1
+ {"liked":false,"favorited":false}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @caps flow-kit,work-caps
3
+ * Excel 表格编辑器(完整版,x-spreadsheet 装配)——
4
+ * 单文件完整表格应用:编辑(单元格/样式/公式/合并/多工作表)+ 只读显示 +
5
+ * 对外 API(window.ExcelApp)。
6
+ * flow-kit = 装饰器目标形状闸通行标记;work-caps = 组件本体豁免
7
+ * (自带引擎 UI,弹层 CSS 含 position:fixed,沙箱内相对 iframe 视口定位)。
8
+ * 上游引擎:x-spreadsheet v1.1.8 @ 0c55f3e
9
+ * (myxuchang/x-spreadsheet,MIT,https://github.com/myxuchang/x-spreadsheet)
10
+ */
11
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.id="excel-full-editor-style",e.appendChild(document.createTextNode(`body{margin:0}.x-spreadsheet{font-size:13px;line-height:normal;-webkit-user-select:none;user-select:none;-moz-user-select:none;font-family:Lato,Source Sans Pro,Roboto,Helvetica,Arial,sans-serif;box-sizing:content-box;background:#fff;-webkit-font-smoothing:antialiased}.x-spreadsheet textarea{font:400 13px Arial,Lato,Source Sans Pro,Roboto,Helvetica,sans-serif}.x-spreadsheet-sheet{position:relative;overflow:hidden}.x-spreadsheet-table{vertical-align:bottom}.x-spreadsheet-tooltip{font-family:inherit;position:absolute;padding:5px 10px;color:#fff;border-radius:1px;background:#000;font-size:12px;z-index:201}.x-spreadsheet-tooltip:before{pointer-events:none;position:absolute;left:calc(50% - 4px);top:-4px;content:"";width:8px;height:8px;background:inherit;-webkit-transform:rotate(45deg);transform:rotate(45deg);z-index:1;box-shadow:1px 1px 3px -1px #0000004d}.x-spreadsheet-color-palette{padding:5px}.x-spreadsheet-color-palette table{margin:0;padding:0;border-collapse:separate;border-spacing:2;background:#fff}.x-spreadsheet-color-palette table td{margin:0;cursor:pointer;border:1px solid transparent}.x-spreadsheet-color-palette table td:hover{border-color:#ddd}.x-spreadsheet-color-palette table td .x-spreadsheet-color-palette-cell{width:16px;height:16px}.x-spreadsheet-border-palette{padding:6px}.x-spreadsheet-border-palette table{margin:0;padding:0;border-collapse:separate;border-spacing:0;background:#fff;table-layout:fixed}.x-spreadsheet-border-palette table td{margin:0}.x-spreadsheet-border-palette .x-spreadsheet-border-palette-left{border-right:1px solid #eee;padding-right:6px}.x-spreadsheet-border-palette .x-spreadsheet-border-palette-left .x-spreadsheet-border-palette-cell{width:30px;height:30px;cursor:pointer;text-align:center}.x-spreadsheet-border-palette .x-spreadsheet-border-palette-left .x-spreadsheet-border-palette-cell .x-spreadsheet-icon-img{opacity:.8}.x-spreadsheet-border-palette .x-spreadsheet-border-palette-left .x-spreadsheet-border-palette-cell:hover{background-color:#eee}.x-spreadsheet-border-palette .x-spreadsheet-border-palette-right{padding-left:6px}.x-spreadsheet-border-palette .x-spreadsheet-border-palette-right .x-spreadsheet-toolbar-btn{margin-top:0;margin-bottom:3px}.x-spreadsheet-border-palette .x-spreadsheet-border-palette-right .x-spreadsheet-line-type{position:relative;left:0;top:-3px}.x-spreadsheet-dropdown{position:relative}.x-spreadsheet-dropdown .x-spreadsheet-dropdown-content{position:absolute;z-index:200;background:#fff;box-shadow:1px 2px 5px 2px #33333326}.x-spreadsheet-dropdown.bottom-left .x-spreadsheet-dropdown-content{top:calc(100% + 5px);left:0}.x-spreadsheet-dropdown.bottom-right .x-spreadsheet-dropdown-content{top:calc(100% + 5px);right:0}.x-spreadsheet-dropdown.top-left .x-spreadsheet-dropdown-content{bottom:calc(100% + 5px);left:0}.x-spreadsheet-dropdown.top-right .x-spreadsheet-dropdown-content{bottom:calc(100% + 5px);right:0}.x-spreadsheet-dropdown .x-spreadsheet-dropdown-title{padding:0 5px;display:inline-block}.x-spreadsheet-dropdown .x-spreadsheet-dropdown-header .x-spreadsheet-icon.arrow-left{margin-left:4px}.x-spreadsheet-dropdown .x-spreadsheet-dropdown-header .x-spreadsheet-icon.arrow-right{width:10px;margin-right:4px}.x-spreadsheet-dropdown .x-spreadsheet-dropdown-header .x-spreadsheet-icon.arrow-right .arrow-down{left:-130px}.x-spreadsheet-resizer{position:absolute;z-index:11}.x-spreadsheet-resizer .x-spreadsheet-resizer-hover{background-color:#4b89ff40}.x-spreadsheet-resizer .x-spreadsheet-resizer-line{position:absolute}.x-spreadsheet-resizer.horizontal{cursor:row-resize}.x-spreadsheet-resizer.horizontal .x-spreadsheet-resizer-line{border-bottom:2px dashed #4b89ff;left:0;bottom:0}.x-spreadsheet-resizer.vertical{cursor:col-resize}.x-spreadsheet-resizer.vertical .x-spreadsheet-resizer-line{border-right:2px dashed #4b89ff;top:0;right:0}.x-spreadsheet-scrollbar{position:absolute;bottom:0;right:0;background-color:#f4f5f8;opacity:.9;z-index:12}.x-spreadsheet-scrollbar.horizontal{right:15px;overflow-x:scroll;overflow-y:hidden}.x-spreadsheet-scrollbar.horizontal>div{height:1px;background:#ddd}.x-spreadsheet-scrollbar.vertical{bottom:15px;overflow-x:hidden;overflow-y:scroll}.x-spreadsheet-scrollbar.vertical>div{width:1px;background:#ddd}.x-spreadsheet-overlayer{position:absolute;left:0;top:0;z-index:10}.x-spreadsheet-overlayer .x-spreadsheet-overlayer-content{position:absolute;overflow:hidden;pointer-events:none;width:100%;height:100%}.x-spreadsheet-editor,.x-spreadsheet-selector{box-sizing:content-box;position:absolute;overflow:hidden;pointer-events:none;top:0;left:0;width:100%;height:100%}.x-spreadsheet-selector .hide-input{position:absolute;z-index:0}.x-spreadsheet-selector .hide-input input{padding:0;width:0;border:none!important}.x-spreadsheet-selector .x-spreadsheet-selector-area{position:absolute;border:2px solid #4b89ff;background:#4b89ff1a;z-index:5}.x-spreadsheet-selector .x-spreadsheet-selector-clipboard,.x-spreadsheet-selector .x-spreadsheet-selector-autofill{position:absolute;background:transparent;z-index:100}.x-spreadsheet-selector .x-spreadsheet-selector-clipboard{border:2px dashed #4b89ff}.x-spreadsheet-selector .x-spreadsheet-selector-autofill{border:1px dashed rgba(0,0,0,.45)}.x-spreadsheet-selector .x-spreadsheet-selector-corner{pointer-events:auto;position:absolute;cursor:crosshair;font-size:0;height:5px;width:5px;right:-5px;bottom:-5px;border:2px solid #ffffff;background:#4b89ff}.x-spreadsheet-editor{z-index:20}.x-spreadsheet-editor .x-spreadsheet-editor-area{position:absolute;text-align:left;border:2px solid #4b89ff;line-height:0;z-index:100;pointer-events:auto}.x-spreadsheet-editor .x-spreadsheet-editor-area textarea{box-sizing:content-box;border:none;padding:0 3px;outline:none;resize:none;text-align:start;overflow-y:hidden;font:400 13px Arial,Lato,Source Sans Pro,Roboto,Helvetica,sans-serif;color:inherit;white-space:normal;word-wrap:break-word;line-height:22px;margin:0}.x-spreadsheet-editor .x-spreadsheet-editor-area .textline{overflow:hidden;visibility:hidden;position:fixed;top:0;left:0}.x-spreadsheet-item{-webkit-user-select:none;user-select:none;background:0;border:1px solid transparent;outline:none;height:26px;color:#000000e6;line-height:26px;list-style:none;padding:2px 10px;cursor:default;text-align:left;overflow:hidden}.x-spreadsheet-item.disabled{pointer-events:none;opacity:.5}.x-spreadsheet-item:hover,.x-spreadsheet-item.active{background:#0000000d}.x-spreadsheet-item.divider{height:0;padding:0;margin:5px 0;border:none;border-bottom:1px solid rgba(0,0,0,.1)}.x-spreadsheet-item .label{float:right;opacity:.65;font-size:1em}.x-spreadsheet-item.state,.x-spreadsheet-header.state{padding-left:35px!important;position:relative}.x-spreadsheet-item.state:before,.x-spreadsheet-header.state:before{content:"";position:absolute;width:10px;height:10px;left:12px;top:calc(50% - 5px);background:#00000014;border-radius:2px}.x-spreadsheet-item.state.checked:before,.x-spreadsheet-header.state.checked:before{background:#4b89ff}.x-spreadsheet-checkbox{position:relative;display:inline-block;backface-visibility:hidden;outline:0;vertical-align:baseline;font-style:normal;font-size:1rem;line-height:1em}.x-spreadsheet-checkbox>input{position:absolute;top:0;left:0;opacity:0!important;outline:0;z-index:-1}.x-spreadsheet-suggest,.x-spreadsheet-contextmenu,.x-spreadsheet-sort-filter{position:absolute;box-shadow:1px 2px 5px 2px #33333326;background:#fff;z-index:100;width:260px;pointer-events:auto;overflow:auto}.x-spreadsheet-suggest{width:200px}.x-spreadsheet-filter{border:1px solid #e9e9e9;font-size:12px;margin:10px}.x-spreadsheet-filter .x-spreadsheet-header{padding:.5em .75em;background:#f8f8f9;border-bottom:1px solid #e9e9e9;border-left:1px solid transparent}.x-spreadsheet-filter .x-spreadsheet-body{height:200px;overflow-y:auto}.x-spreadsheet-filter .x-spreadsheet-body .x-spreadsheet-item{height:20px;line-height:20px}.x-spreadsheet-sort-filter .x-spreadsheet-buttons{margin:10px}.x-spreadsheet-toolbar,.x-spreadsheet-bottombar{height:40px;padding:0 30px;text-align:left;background:#f5f6f7;display:flex}.x-spreadsheet-bottombar{position:relative;border-top:1px solid #e0e2e4}.x-spreadsheet-bottombar .x-spreadsheet-menu>li{line-height:40px;height:40px;padding-top:0;padding-bottom:0;vertical-align:middle;border-right:1px solid #e8eaed}.x-spreadsheet-menu{list-style:none;margin:0;padding:0;-webkit-user-select:none;user-select:none}.x-spreadsheet-menu>li{float:left;line-height:1.25em;padding:.785em 1em;margin:0;vertical-align:middle;text-align:left;font-weight:400;color:#80868b;white-space:nowrap;cursor:pointer;transition:all .3s;font-weight:700}.x-spreadsheet-menu>li.active{background-color:#fff;color:#000000a6}.x-spreadsheet-menu>li .x-spreadsheet-icon{margin:0 6px}.x-spreadsheet-menu>li .x-spreadsheet-icon .x-spreadsheet-icon-img:hover{opacity:.85}.x-spreadsheet-menu>li .x-spreadsheet-dropdown{display:inline-block}.x-spreadsheet-toolbar{border-bottom:1px solid #e0e2e4}.x-spreadsheet-toolbar .x-spreadsheet-toolbar-btns{display:inline-flex}.x-spreadsheet-toolbar .x-spreadsheet-toolbar-more{padding:0 6px 6px;text-align:left}.x-spreadsheet-toolbar .x-spreadsheet-toolbar-more .x-spreadsheet-toolbar-divider{margin-top:0}.x-spreadsheet-toolbar .x-spreadsheet-toolbar-btn{flex:0 0 auto;display:inline-block;border:1px solid transparent;height:26px;line-height:26px;min-width:26px;margin:6px 1px 0;padding:0;text-align:center;border-radius:2px}.x-spreadsheet-toolbar .x-spreadsheet-toolbar-btn.disabled{pointer-events:none;opacity:.5}.x-spreadsheet-toolbar .x-spreadsheet-toolbar-btn:hover,.x-spreadsheet-toolbar .x-spreadsheet-toolbar-btn.active{background:#00000014}.x-spreadsheet-toolbar-divider{display:inline-block;border-right:1px solid #e0e2e4;width:0;vertical-align:middle;height:18px;margin:12px 3px 0}.x-spreadsheet-print{position:absolute;left:0;top:0;z-index:100;width:100%;height:100%;display:flex;flex-direction:column}.x-spreadsheet-print-bar{background:#424242;height:60px;line-height:60px;padding:0 30px}.x-spreadsheet-print-bar .-title{color:#fff;font-weight:700;font-size:1.2em;float:left}.x-spreadsheet-print-bar .-right{float:right;margin-top:12px}.x-spreadsheet-print-content{display:flex;flex:auto;flex-direction:row;background:#d0d0d0;height:calc(100% - 60px)}.x-spreadsheet-print-content .-sider{flex:0 0 300px;width:300px;border-left:2px solid #ccc;background:#fff}.x-spreadsheet-print-content .-content{flex:auto;overflow-x:auto;overflow-y:scroll;height:100%}.x-spreadsheet-canvas-card-wraper{margin:40px 20px}.x-spreadsheet-canvas-card{background:#fff;margin:auto;page-break-before:auto;page-break-after:always;box-shadow:0 8px 10px 1px #00000024,0 3px 14px 3px #0000001f,0 4px 5px #0003}.x-spreadsheet-calendar{color:#000000a6;background:#fff;-webkit-user-select:none;user-select:none}.x-spreadsheet-calendar .calendar-header{font-weight:700;line-height:30px;text-align:center;width:100%;float:left;background:#f9fafb}.x-spreadsheet-calendar .calendar-header .calendar-header-left{padding-left:5px;float:left}.x-spreadsheet-calendar .calendar-header .calendar-header-right{float:right}.x-spreadsheet-calendar .calendar-header .calendar-header-right a{padding:3px 0;margin-right:2px;border-radius:2px}.x-spreadsheet-calendar .calendar-header .calendar-header-right a:hover{background:#00000014}.x-spreadsheet-calendar .calendar-body{border-collapse:collapse;border-spacing:0}.x-spreadsheet-calendar .calendar-body th,.x-spreadsheet-calendar .calendar-body td{width:100%/7;min-width:32px;text-align:center;font-weight:700;line-height:30px;padding:0}.x-spreadsheet-calendar .calendar-body td>.cell:hover{background:#ecf6fd}.x-spreadsheet-calendar .calendar-body td>.cell.active,.x-spreadsheet-calendar .calendar-body td>.cell.active:hover{background:#ecf6fd;color:#2185d0}.x-spreadsheet-calendar .calendar-body td>.cell.disabled{pointer-events:none;opacity:.5}.x-spreadsheet-datepicker{box-shadow:2px 2px 5px #0003;position:absolute;left:0;top:calc(100% + 5px);z-index:10;width:auto}.x-spreadsheet-buttons{display:flex;justify-content:flex-end}.x-spreadsheet-buttons .x-spreadsheet-button{margin-left:8px}.x-spreadsheet-button{display:inline-block;border-radius:3px;line-height:1em;min-height:1em;white-space:nowrap;text-align:center;cursor:pointer;font-size:1em;font-weight:700;padding:.75em 1em;color:#0009;background:#e0e1e2;text-decoration:none;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;outline:none;vertical-align:baseline;zoom:1;-webkit-user-select:none;user-select:none;transition:all .1s linear}.x-spreadsheet-button.active,.x-spreadsheet-button:hover{background-color:#c0c1c2;color:#000c}.x-spreadsheet-button.primary{color:#fff;background-color:#2185d0}.x-spreadsheet-button.primary:hover,.x-spreadsheet-button.primary.active{color:#fff;background-color:#1678c2}.x-spreadsheet-form-input{font-size:1em;position:relative;font-weight:400;display:inline-flex;color:#000000de}.x-spreadsheet-form-input input{z-index:1;margin:0;max-width:100%;flex:1 0 auto;outline:0;-webkit-tap-highlight-color:rgba(255,255,255,0);text-align:left;line-height:30px;height:30px;padding:0 8px;background:#fff;border:1px solid #e9e9e9;border-radius:3px;transition:box-shadow .1s ease,border-color .1s ease;box-shadow:inset 0 1px 2px #0a0a0a0f}.x-spreadsheet-form-input input:focus{border-color:#4b89ff;box-shadow:inset 0 1px 2px #4b89ff33}.x-spreadsheet-form-select{position:relative;display:inline-block;background:#fff;border:1px solid #e9e9e9;border-radius:2px;cursor:pointer;color:#000000de;-webkit-user-select:none;user-select:none;box-shadow:inset 0 1px 2px #0a0a0a0f}.x-spreadsheet-form-select .input-text{text-overflow:ellipsis;white-space:nowrap;min-width:60px;width:auto;height:30px;line-height:30px;padding:0 8px}.x-spreadsheet-form-fields{display:flex;flex-direction:row;flex-wrap:wrap}.x-spreadsheet-form-fields .x-spreadsheet-form-field{flex:0 1 auto}.x-spreadsheet-form-fields .x-spreadsheet-form-field .label{display:inline-block;margin:0 10px 0 0}.x-spreadsheet-form-field{display:block;vertical-align:middle;margin-left:10px;margin-bottom:10px}.x-spreadsheet-form-field:first-child{margin-left:0}.x-spreadsheet-form-field.error .x-spreadsheet-form-select,.x-spreadsheet-form-field.error input{border-color:#f04134}.x-spreadsheet-form-field .tip{color:#f04134;font-size:.9em}.x-spreadsheet-dimmer{display:none;position:absolute;top:0!important;left:0!important;width:100%;height:100%;text-align:center;vertical-align:middle;background-color:#0009;opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.5s;animation-duration:.5s;transition:background-color .5s linear;-webkit-user-select:none;user-select:none;z-index:1000}.x-spreadsheet-dimmer.active{display:block;opacity:1}form fieldset{border:none}form fieldset label{display:block;margin-bottom:.5em;font-size:1em;color:#666}form fieldset select{font-size:1.1em;width:100%;background-color:#fff;border:none;border-bottom:2px solid #ddd;padding:.5em .85em;border-radius:2px}.x-spreadsheet-modal,.x-spreadsheet-toast{font-size:13px;position:fixed;z-index:1001;text-align:left;line-height:1.25em;min-width:360px;color:#000000de;font-family:Lato,Source Sans Pro,Roboto,Helvetica,Arial,sans-serif;border-radius:4px;border:1px solid rgba(0,0,0,.1);background-color:#fff;background-clip:padding-box;box-shadow:#0003 0 2px 8px}.x-spreadsheet-toast{background-color:#ffffffd9}.x-spreadsheet-modal-header,.x-spreadsheet-toast-header{font-weight:600;background-clip:padding-box;background-color:#ffffffd9;border-bottom:1px solid rgba(0,0,0,.05);border-radius:4px 4px 0 0}.x-spreadsheet-modal-header .x-spreadsheet-icon,.x-spreadsheet-toast-header .x-spreadsheet-icon{position:absolute;right:.8em;top:.65em;border-radius:18px}.x-spreadsheet-modal-header .x-spreadsheet-icon:hover,.x-spreadsheet-toast-header .x-spreadsheet-icon:hover{opacity:1;background:#00000014}.x-spreadsheet-toast-header{color:#f2711c}.x-spreadsheet-modal-header{border-bottom:1px solid #e0e2e4;background:#00000014;font-size:1.0785em}.x-spreadsheet-modal-header,.x-spreadsheet-modal-content,.x-spreadsheet-toast-header,.x-spreadsheet-toast-content{padding:.75em 1em}@media screen and (min-width: 320px) and (max-width: 480px){.x-spreadsheet-toolbar{display:none}}.x-spreadsheet-icon{width:18px;height:18px;margin:1px 1px 2px;text-align:center;vertical-align:middle;-webkit-user-select:none;user-select:none;overflow:hidden;position:relative;display:inline-block;line-height:0}.x-spreadsheet-icon .x-spreadsheet-icon-img{background-image:url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20x='0'%20y='0'%20width='262px'%20height='72px'%20viewBox='0%200%20262%2072'%20preserveAspectRatio='none'%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(0,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M11.5656391,4.43436088%20L9,7%20L16,7%20L16,0%20L13.0418424,2.95815758%20C11.5936787,1.73635959%209.72260775,1%207.67955083,1%20C4.22126258,1%201.25575599,3.10984908%200,6%20L2,7%20C2.93658775,4.60974406%205.12943697,3.08011229%207.67955083,3%20C9.14881247,3.0528747%2010.4994783,3.57862053%2011.5656391,4.43436088%20Z'%20transform='matrix(-1%200%200%201%2017%205)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(18,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M11.5656391,4.43436088%20L9,7%20L16,7%20L16,0%20L13.0418424,2.95815758%20C11.5936787,1.73635959%209.72260775,1%207.67955083,1%20C4.22126258,1%201.25575599,3.10984908%200,6%20L2,7%20C2.93658775,4.60974406%205.12943697,3.08011229%207.67955083,3%20C9.14881247,3.0528747%2010.4994783,3.57862053%2011.5656391,4.43436088%20Z'%20transform='translate(1%205)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(36,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M13,14%20L3,14%20L3,11%20L0,11%20L0,6.00591905%20C0,4.89808055%200.894513756,4%201.99406028,4%20L14.0059397,4%20C15.1072288,4%2016,4.88655484%2016,6.00591905%20L16,11%20L13,11%20L13,14%20Z%20M5,9%20L11,9%20L11,12%20L5,12%20L5,9%20Z%20M3,0%20L13,0%20L13,3%20L3,3%20L3,0%20Z%20M12,6%20L14,6%20L14,8%20L12,8%20L12,6%20Z'%20transform='translate(1%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(54,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M9,0%20L1,0%20C0.45,0%200,0.45%200,1%20L0,4%20C0,4.55%200.45,5%201,5%20L9,5%20C9.55,5%2010,4.55%2010,4%20L10,3%20L11,3%20L11,6%20L4,6%20L4,14%20L6,14%20L6,8%20L13,8%20L13,2%20L10,2%20L10,1%20C10,0.45%209.55,0%209,0%20Z'%20transform='translate(3%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(72,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M0.27,1.55%20L5.43,6.7%20L3,12%20L5.5,12%20L7.14,8.42%20L11.73,13%20L13,11.73%20L1.55,0.27%20L0.27,1.55%20L0.27,1.55%20Z%20M3.82,0%20L5.82,2%20L7.58,2%20L7.03,3.21%20L8.74,4.92%20L10.08,2%20L14,2%20L14,0%20L3.82,0%20L3.82,0%20Z'%20transform='translate(2%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(90,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M9,3.5%20C9,1.57%207.43,0%205.5,0%20L1.77635684e-15,0%20L1.77635684e-15,12%20L6.25,12%20C8.04,12%209.5,10.54%209.5,8.75%20C9.5,7.45%208.73,6.34%207.63,5.82%20C8.46,5.24%209,4.38%209,3.5%20Z%20M5,2%20C5.82999992,2%206.5,2.67%206.5,3.5%20C6.5,4.33%205.82999992,5%205,5%20L3,5%20L3,2%20L5,2%20Z%20M3,10%20L3,7%20L5.5,7%20C6.32999992,7%207,7.67%207,8.5%20C7,9.33%206.32999992,10%205.5,10%20L3,10%20Z'%20transform='translate(4%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(108,0)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='4%200%204%202%206.58%202%202.92%2010%200%2010%200%2012%208%2012%208%2010%205.42%2010%209.08%202%2012%202%2012%200'%20transform='translate(3%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(126,0)'%3e%3cpath%20fill='%23000000'%20d='M6,12%20C8.76,12%2011,9.76%2011,7%20L11,0%20L9,0%20L9,7%20C9,8.75029916%207.49912807,10%206,10%20C4.50087193,10%203,8.75837486%203,7%20L3,0%20L1,0%20L1,7%20C1,9.76%203.24,12%206,12%20Z%20M0,13%20L0,15%20L12,15%20L12,13%20L0,13%20Z'%20transform='translate(3%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(144,0)'%3e%3cpath%20fill='%23010101'%20fill-rule='evenodd'%20d='M2.8875,3.06%20C2.8875,2.6025%202.985,2.18625%203.18375,1.8075%20C3.3825,1.42875%203.66,1.10625%204.02,0.84%20C4.38,0.57375%204.80375,0.3675%205.29875,0.22125%20C5.79375,0.075%206.33375,0%206.92625,0%20C7.53375,0%208.085,0.0825%208.58,0.25125%20C9.075,0.42%209.49875,0.6525%209.85125,0.95625%20C10.20375,1.25625%2010.47375,1.6125%2010.665,2.02875%20C10.85625,2.44125%2010.95,2.895%2010.95,3.38625%20L8.6925,3.38625%20C8.6925,3.1575%208.655,2.94375%208.58375,2.74875%20C8.5125,2.55%208.4,2.38125%208.25,2.2425%20C8.1,2.10375%207.9125,1.99125%207.6875,1.91625%20C7.4625,1.8375%207.19625,1.8%206.88875,1.8%20C6.5925,1.8%206.3375,1.83375%206.11625,1.8975%20C5.89875,1.96125%205.71875,2.05125%205.57625,2.1675%20C5.43375,2.28375%205.325,2.41875%205.25375,2.5725%20C5.1825,2.72625%205.145,2.895%205.145,3.0675%20C5.145,3.4275%205.32875,3.73125%205.69625,3.975%20C5.71780203,3.98908066%205.73942012,4.00311728%205.76118357,4.01733315%20C6.02342923,4.18863185%206.5,4.5%207,5%20L4,5%20C4,5%203.21375,4.37625%203.17625,4.30875%20C2.985,3.9525%202.8875,3.53625%202.8875,3.06%20Z%20M14,6%20L0,6%20L0,8%20L7.21875,8%20C7.35375,8.0525%207.51875,8.105%207.63125,8.15375%20C7.90875,8.2775%208.12625,8.40875%208.28375,8.53625%20C8.44125,8.6675%208.54625,8.81%208.6025,8.96%20C8.65875,9.11375%208.685,9.28625%208.685,9.47375%20C8.685,9.65%208.65125,9.815%208.58375,9.965%20C8.51625,10.11875%208.41125,10.25%208.2725,10.35875%20C8.13375,10.4675%207.95375,10.55375%207.74,10.6175%20C7.5225,10.68125%207.27125,10.71125%206.97875,10.71125%20C6.6525,10.71125%206.35625,10.6775%206.09,10.61375%20C5.82375,10.55%205.59875,10.445%205.41125,10.3025%20C5.22375,10.16%205.0775,9.9725%204.9725,9.74375%20C4.8675,9.515%204.78125,9.17%204.78125,9%20L2.55,9%20C2.55,9.2525%202.61,9.6875%202.72625,10.025%20C2.8425,10.3625%203.0075,10.66625%203.21375,10.9325%20C3.42,11.19875%203.6675,11.4275%203.94875,11.6225%20C4.23,11.8175%204.53375,11.9825%204.86375,12.11%20C5.19375,12.24125%205.535,12.33875%205.89875,12.39875%20C6.25875,12.4625%206.6225,12.4925%206.9825,12.4925%20C7.5825,12.4925%208.13,12.425%208.6175,12.28625%20C9.105,12.1475%209.525,11.94875%209.87,11.69375%20C10.215,11.435%2010.48125,11.12%2010.6725,10.74125%20C10.86375,10.3625%2010.95375,9.935%2010.95375,9.455%20C10.95375,9.005%2010.875,8.6%2010.72125,8.24375%20C10.68375,8.1575%2010.6425,8.075%2010.59375,7.9925%20L14,8%20L14,6%20Z'%20transform='translate(2%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(162,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M7,0%20L5,0%20L0.5,12%20L2.5,12%20L3.62,9%20L8.37,9%20L9.49,12%20L11.49,12%20L7,0%20L7,0%20Z%20M4.38,7%20L6,2.67%20L7.62,7%20L4.38,7%20L4.38,7%20Z'%20transform='translate(3%201)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(180,0)'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%23000000'%20d='M14.5,8.87%20C14.5,8.87%2013,10.49%2013,11.49%20C13,12.32%2013.67,12.99%2014.5,12.99%20C15.33,12.99%2016,12.32%2016,11.49%20C16,10.5%2014.5,8.87%2014.5,8.87%20L14.5,8.87%20Z%20M12.71,6.79%20L5.91,0%20L4.85,1.06%20L6.44,2.65%20L2.29,6.79%20C1.9,7.18%201.9,7.81%202.29,8.2%20L6.79,12.7%20C6.99,12.9%207.24,13%207.5,13%20C7.76,13%208.01,12.9%208.21,12.71%20L12.71,8.21%20C13.1,7.82%2013.1,7.18%2012.71,6.79%20L12.71,6.79%20Z%20M4.21,7%20L7.5,3.71%20L10.79,7%20L4.21,7%20L4.21,7%20Z'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(198,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M3,6%20L1,6%20L1,2%20L8,2%20L8,4%20L3,4%20L3,6%20Z%20M10,4%20L10,2%20L17,2%20L17,6%20L15,6%20L15,4%20L10,4%20Z%20M10,14%20L15,14%20L15,12%20L17,12%20L17,16%20L10,16%20L10,14%20Z%20M1,12%20L3,12%20L3,14%20L8,14%20L8,16%20L1,16%20L1,12%20Z%20M1,8%20L5,8%20L5,6%20L8,9%20L5,12%20L5,10%20L1,10%20L1,8%20Z%20M10,9%20L13,6%20L13,8%20L17,8%20L17,10%20L13,10%20L13,12%20L10,9%20Z'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(216,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M0,14%20L10,14%20L10,12%20L0,12%20L0,14%20Z%20M10,4%20L0,4%20L0,6%20L10,6%20L10,4%20Z%20M0,0%20L0,2%20L14,2%20L14,0%20L0,0%20Z%20M0,10%20L14,10%20L14,8%20L0,8%20L0,10%20Z'%20transform='translate(2%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(234,0)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M2,12%20L2,14%20L12,14%20L12,12%20L2,12%20Z%20M2,4%20L2,6%20L12,6%20L12,4%20L2,4%20Z%20M0,10%20L14,10%20L14,8%20L0,8%20L0,10%20Z%20M0,0%20L0,2%20L14,2%20L14,0%20L0,0%20Z'%20transform='translate(2%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(0,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M4,14%20L14,14%20L14,12%20L4,12%20L4,14%20Z%20M0,10%20L14,10%20L14,8%20L0,8%20L0,10%20Z%20M0,0%20L0,2%20L14,2%20L14,0%20L0,0%20Z%20M4,6%20L14,6%20L14,4%20L4,4%20L4,6%20Z'%20transform='translate(2%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(18,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M0,0%20L0,2%20L12,2%20L12,0%20L0,0%20L0,0%20Z%20M2.5,7%20L5,7%20L5,14%20L7,14%20L7,7%20L9.5,7%20L6,3.5%20L2.5,7%20L2.5,7%20Z'%20transform='translate(3%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(36,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M9.5,3%20L7,3%20L7,0%20L5,0%20L5,3%20L2.5,3%20L6,6.5%20L9.5,3%20L9.5,3%20Z%20M0,8%20L0,10%20L12,10%20L12,8%20L0,8%20L0,8%20Z%20M2.5,15%20L5,15%20L5,18%20L7,18%20L7,15%20L9.5,15%20L6,11.5%20L2.5,15%20L2.5,15%20Z'%20transform='translate(3)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(54,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M9.5,7%20L7,7%20L7,0%20L5,0%20L5,7%20L2.5,7%20L6,10.5%20L9.5,7%20L9.5,7%20Z%20M0,12%20L0,14%20L12,14%20L12,12%20L0,12%20L0,12%20Z'%20transform='translate(3%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(72,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M14,0%20L0,0%20L0,2%20L14,2%20L14,0%20Z%20M0,12%20L4,12%20L4,10%20L0,10%20L0,12%20Z%20M11.5,5%20L0,5%20L0,7%20L11.75,7%20C12.58,7%2013.25,7.67%2013.25,8.5%20C13.25,9.33%2012.58,10%2011.75,10%20L9,10%20L9,8%20L6,11%20L9,14%20L9,12%20L11.5,12%20C13.43,12%2015,10.43%2015,8.5%20C15,6.57%2013.43,5%2011.5,5%20Z'%20transform='translate(2%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(90,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M0,0%20L0,1%20L6,7%20L6,12%20L8,11%20L8,7%20L14,1%20L14,0%20L0,0%20Z%20M4,3%20L10,3%20L7,6%20L4,3%20Z'%20transform='translate(2%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(108,18)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='10%200%200%200%200%201.8%205.5%207%200%2012.2%200%2014%2010%2014%2010%2012%203.1%2012%208%207%203.1%202%2010%202'%20transform='translate(4%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(126,18)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='0%200%204%204%208%200'%20transform='translate(5%207)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(144,18)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='-2%202%202%206%206%202'%20transform='rotate(-90%208%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(162,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M1.9,4%20C1.9,2.84%202.84,1.9%204,1.9%20L8,1.9%20L8,0%20L4,0%20C1.79,0%200,1.79%200,4%20C0,6.21%201.79,8%204,8%20L8,8%20L8,6.1%20L4,6.1%20C2.84,6.1%201.9,5.16%201.9,4%20L1.9,4%20Z%20M14,0%20L10,0%20L10,1.9%20L14,1.9%20C15.16,1.9%2016.1,2.84%2016.1,4%20C16.1,5.16%2015.16,6.1%2014,6.1%20L10,6.1%20L10,8%20L14,8%20C16.21,8%2018,6.21%2018,4%20C18,1.79%2016.21,0%2014,0%20L14,0%20Z%20M6,5%20L12,5%20L12,3%20L6,3%20L6,5%20L6,5%20Z'%20transform='translate(0%205)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(180,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M15,0%20C15.55,0%2016,0.45%2016,1%20L16,15%20C16,15.55%2015.55,16%2015,16%20L1,16%20C0.45,16%200,15.55%200,15%20L0,1%20C0,0.45%200.45,0%201,0%20L15,0%20Z%20M2,2%20L2,14%20L14,14%20L14,2%20L2,2%20Z%20M6,12%20L4,12%20L4,7%20L6,7%20L6,12%20L6,12%20Z%20M9,12%20L7,12%20L7,4%20L9,4%20L9,12%20L9,12%20Z%20M12,12%20L10,12%20L10,8%20L12,8%20L12,12%20L12,12%20Z'%20transform='translate(1%201)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(198,18)'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23000000'%20d='M1.5%203.5H16.5V15.5H1.5z'/%3e%3cpath%20fill='%23000000'%20d='M6%208H7V15H6z'/%3e%3cpath%20fill='%23D8D8D8'%20d='M2%204H16V7H2z'/%3e%3cpath%20fill='%23000000'%20d='M2%207H16V8H2zM2%2011H16V12H2z'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(216,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M2,0.5%20C1.17,0.5%200.5,1.17%200.5,2%20C0.5,2.83%201.17,3.5%202,3.5%20C2.83,3.5%203.5,2.83%203.5,2%20C3.5,1.17%202.83,0.5%202,0.5%20L2,0.5%20Z%20M12,0.5%20C11.17,0.5%2010.5,1.17%2010.5,2%20C10.5,2.83%2011.17,3.5%2012,3.5%20C12.83,3.5%2013.5,2.83%2013.5,2%20C13.5,1.17%2012.83,0.5%2012,0.5%20L12,0.5%20Z%20M7,0.5%20C6.17,0.5%205.5,1.17%205.5,2%20C5.5,2.83%206.17,3.5%207,3.5%20C7.83,3.5%208.5,2.83%208.5,2%20C8.5,1.17%207.83,0.5%207,0.5%20L7,0.5%20Z'%20transform='translate(2%207)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(234,18)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M6,4%20L6,0%20L4,0%20L4,4%20L0,4%20L0,6%20L4,6%20L4,10%20L6,10%20L6,6%20L10,6%20L10,4%20L6,4%20Z'%20transform='translate(4%204)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(0,36)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M0,0%20L0,14%20L14,14%20L14,0%20L0,0%20L0,0%20Z%20M6,12%20L2,12%20L2,8%20L6,8%20L6,12%20L6,12%20Z%20M6,6%20L2,6%20L2,2%20L6,2%20L6,6%20L6,6%20Z%20M12,12%20L8,12%20L8,8%20L12,8%20L12,12%20L12,12%20Z%20M12,6%20L8,6%20L8,2%20L12,2%20L12,6%20L12,6%20Z'%20transform='translate(2%202)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(18,36)'%3e%3cg%20fill='%23000000'%20fill-rule='evenodd'%20transform='translate(2%202)'%3e%3cpath%20d='M0,14%20L2,14%20L2,12%20L0,12%20L0,14%20L0,14%20Z%20M2,3%20L0,3%20L0,5%20L2,5%20L2,3%20L2,3%20Z%20M3,14%20L5,14%20L5,12%20L3,12%20L3,14%20L3,14%20Z%20M11,0%20L9,0%20L9,2%20L11,2%20L11,0%20L11,0%20Z%20M2,0%20L0,0%20L0,2%20L2,2%20L2,0%20L2,0%20Z%20M5,0%20L3,0%20L3,2%20L5,2%20L5,0%20L5,0%20Z%20M0,11%20L2,11%20L2,9%20L0,9%20L0,11%20L0,11%20Z%20M9,14%20L11,14%20L11,12%20L9,12%20L9,14%20L9,14%20Z%20M12,0%20L12,2%20L14,2%20L14,0%20L12,0%20L12,0%20Z%20M12,5%20L14,5%20L14,3%20L12,3%20L12,5%20L12,5%20Z%20M12,14%20L14,14%20L14,12%20L12,12%20L12,14%20L12,14%20Z%20M12,11%20L14,11%20L14,9%20L12,9%20L12,11%20L12,11%20Z'%20opacity='.54'/%3e%3cpolygon%20points='8%200%206%200%206%206%200%206%200%208%206%208%206%2014%208%2014%208%208%2014%208%2014%206%208%206'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(36,36)'%3e%3cg%20fill='%23000000'%20fill-rule='evenodd'%20transform='translate(2%202)'%3e%3cpath%20d='M6,14%20L8,14%20L8,12%20L6,12%20L6,14%20L6,14%20Z%20M3,2%20L5,2%20L5,0%20L3,0%20L3,2%20L3,2%20Z%20M6,11%20L8,11%20L8,9%20L6,9%20L6,11%20L6,11%20Z%20M3,14%20L5,14%20L5,12%20L3,12%20L3,14%20L3,14%20Z%20M0,5%20L2,5%20L2,3%20L0,3%20L0,5%20L0,5%20Z%20M0,14%20L2,14%20L2,12%20L0,12%20L0,14%20L0,14%20Z%20M0,2%20L2,2%20L2,0%20L0,0%20L0,2%20L0,2%20Z%20M0,11%20L2,11%20L2,9%20L0,9%20L0,11%20L0,11%20Z%20M12,11%20L14,11%20L14,9%20L12,9%20L12,11%20L12,11%20Z%20M12,14%20L14,14%20L14,12%20L12,12%20L12,14%20L12,14%20Z%20M12,5%20L14,5%20L14,3%20L12,3%20L12,5%20L12,5%20Z%20M12,0%20L12,2%20L14,2%20L14,0%20L12,0%20L12,0%20Z%20M6,2%20L8,2%20L8,0%20L6,0%20L6,2%20L6,2%20Z%20M9,2%20L11,2%20L11,0%20L9,0%20L9,2%20L9,2%20Z%20M6,5%20L8,5%20L8,3%20L6,3%20L6,5%20L6,5%20Z%20M9,14%20L11,14%20L11,12%20L9,12%20L9,14%20L9,14%20Z'%20opacity='.54'/%3e%3cpolygon%20points='0%208%2014%208%2014%206%200%206'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(54,36)'%3e%3cg%20fill='%23000000'%20fill-rule='evenodd'%20transform='translate(2%202)'%3e%3cpath%20d='M3,14%20L5,14%20L5,12%20L3,12%20L3,14%20L3,14%20Z%20M0,5%20L2,5%20L2,3%20L0,3%20L0,5%20L0,5%20Z%20M0,2%20L2,2%20L2,0%20L0,0%20L0,2%20L0,2%20Z%20M3,8%20L5,8%20L5,6%20L3,6%20L3,8%20L3,8%20Z%20M3,2%20L5,2%20L5,0%20L3,0%20L3,2%20L3,2%20Z%20M0,14%20L2,14%20L2,12%20L0,12%20L0,14%20L0,14%20Z%20M0,8%20L2,8%20L2,6%20L0,6%20L0,8%20L0,8%20Z%20M0,11%20L2,11%20L2,9%20L0,9%20L0,11%20L0,11%20Z%20M12,0%20L12,2%20L14,2%20L14,0%20L12,0%20L12,0%20Z%20M12,8%20L14,8%20L14,6%20L12,6%20L12,8%20L12,8%20Z%20M12,14%20L14,14%20L14,12%20L12,12%20L12,14%20L12,14%20Z%20M12,5%20L14,5%20L14,3%20L12,3%20L12,5%20L12,5%20Z%20M12,11%20L14,11%20L14,9%20L12,9%20L12,11%20L12,11%20Z%20M9,14%20L11,14%20L11,12%20L9,12%20L9,14%20L9,14%20Z%20M9,8%20L11,8%20L11,6%20L9,6%20L9,8%20L9,8%20Z%20M9,2%20L11,2%20L11,0%20L9,0%20L9,2%20L9,2%20Z'%20opacity='.54'/%3e%3cpolygon%20points='6%2014%208%2014%208%200%206%200'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(72,36)'%3e%3cg%20fill='%23000000'%20fill-rule='evenodd'%20transform='translate(2%202)'%3e%3cpath%20d='M8,3%20L6,3%20L6,5%20L8,5%20L8,3%20L8,3%20Z%20M11,6%20L9,6%20L9,8%20L11,8%20L11,6%20L11,6%20Z%20M8,6%20L6,6%20L6,8%20L8,8%20L8,6%20L8,6%20Z%20M8,9%20L6,9%20L6,11%20L8,11%20L8,9%20L8,9%20Z%20M5,6%20L3,6%20L3,8%20L5,8%20L5,6%20L5,6%20Z'%20opacity='.54'/%3e%3cpath%20d='M0,0%20L14,0%20L14,14%20L0,14%20L0,0%20Z%20M12,12%20L12,2%20L2,2%20L2,12%20L12,12%20Z'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(90,36)'%3e%3cg%20fill='%23000000'%20fill-rule='evenodd'%20transform='translate(2%202)'%3e%3cpath%20d='M6,8%20L8,8%20L8,6%20L6,6%20L6,8%20L6,8%20Z%20M6,5%20L8,5%20L8,3%20L6,3%20L6,5%20L6,5%20Z%20M6,11%20L8,11%20L8,9%20L6,9%20L6,11%20L6,11%20Z%20M6,14%20L8,14%20L8,12%20L6,12%20L6,14%20L6,14%20Z%20M3,14%20L5,14%20L5,12%20L3,12%20L3,14%20L3,14%20Z%20M3,2%20L5,2%20L5,0%20L3,0%20L3,2%20L3,2%20Z%20M3,8%20L5,8%20L5,6%20L3,6%20L3,8%20L3,8%20Z%20M12,14%20L14,14%20L14,12%20L12,12%20L12,14%20L12,14%20Z%20M12,8%20L14,8%20L14,6%20L12,6%20L12,8%20L12,8%20Z%20M12,11%20L14,11%20L14,9%20L12,9%20L12,11%20L12,11%20Z%20M12,5%20L14,5%20L14,3%20L12,3%20L12,5%20L12,5%20Z%20M6,2%20L8,2%20L8,0%20L6,0%20L6,2%20L6,2%20Z%20M12,0%20L12,2%20L14,2%20L14,0%20L12,0%20L12,0%20Z%20M9,14%20L11,14%20L11,12%20L9,12%20L9,14%20L9,14%20Z%20M9,8%20L11,8%20L11,6%20L9,6%20L9,8%20L9,8%20Z%20M9,2%20L11,2%20L11,0%20L9,0%20L9,2%20L9,2%20Z'%20opacity='.54'/%3e%3cpolygon%20points='0%2014%202%2014%202%200%200%200'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(108,36)'%3e%3cg%20fill='%23000000'%20fill-rule='evenodd'%20transform='translate(2%202)'%3e%3cpath%20d='M3,8%20L5,8%20L5,6%20L3,6%20L3,8%20L3,8%20Z%20M0,14%20L2,14%20L2,12%20L0,12%20L0,14%20L0,14%20Z%20M6,14%20L8,14%20L8,12%20L6,12%20L6,14%20L6,14%20Z%20M6,11%20L8,11%20L8,9%20L6,9%20L6,11%20L6,11%20Z%20M3,14%20L5,14%20L5,12%20L3,12%20L3,14%20L3,14%20Z%20M0,11%20L2,11%20L2,9%20L0,9%20L0,11%20L0,11%20Z%20M6,8%20L8,8%20L8,6%20L6,6%20L6,8%20L6,8%20Z%20M0,5%20L2,5%20L2,3%20L0,3%20L0,5%20L0,5%20Z%20M0,8%20L2,8%20L2,6%20L0,6%20L0,8%20L0,8%20Z%20M12,8%20L14,8%20L14,6%20L12,6%20L12,8%20L12,8%20Z%20M12,11%20L14,11%20L14,9%20L12,9%20L12,11%20L12,11%20Z%20M12,5%20L14,5%20L14,3%20L12,3%20L12,5%20L12,5%20Z%20M6,5%20L8,5%20L8,3%20L6,3%20L6,5%20L6,5%20Z%20M9,14%20L11,14%20L11,12%20L9,12%20L9,14%20L9,14%20Z%20M9,8%20L11,8%20L11,6%20L9,6%20L9,8%20L9,8%20Z%20M12,14%20L14,14%20L14,12%20L12,12%20L12,14%20L12,14%20Z'%20opacity='.54'/%3e%3cpolygon%20points='0%200%200%202%2014%202%2014%200'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(126,36)'%3e%3cg%20fill='%23000000'%20fill-rule='evenodd'%20transform='translate(2%202)'%3e%3cpath%20d='M0,2%20L2,2%20L2,0%20L0,0%20L0,2%20L0,2%20Z%20M3,2%20L5,2%20L5,0%20L3,0%20L3,2%20L3,2%20Z%20M3,8%20L5,8%20L5,6%20L3,6%20L3,8%20L3,8%20Z%20M3,14%20L5,14%20L5,12%20L3,12%20L3,14%20L3,14%20Z%20M0,5%20L2,5%20L2,3%20L0,3%20L0,5%20L0,5%20Z%20M0,8%20L2,8%20L2,6%20L0,6%20L0,8%20L0,8%20Z%20M0,14%20L2,14%20L2,12%20L0,12%20L0,14%20L0,14%20Z%20M0,11%20L2,11%20L2,9%20L0,9%20L0,11%20L0,11%20Z%20M9,8%20L11,8%20L11,6%20L9,6%20L9,8%20L9,8%20Z%20M6,14%20L8,14%20L8,12%20L6,12%20L6,14%20L6,14%20Z%20M9,14%20L11,14%20L11,12%20L9,12%20L9,14%20L9,14%20Z%20M6,2%20L8,2%20L8,0%20L6,0%20L6,2%20L6,2%20Z%20M9,2%20L11,2%20L11,0%20L9,0%20L9,2%20L9,2%20Z%20M6,11%20L8,11%20L8,9%20L6,9%20L6,11%20L6,11%20Z%20M6,5%20L8,5%20L8,3%20L6,3%20L6,5%20L6,5%20Z%20M6,8%20L8,8%20L8,6%20L6,6%20L6,8%20L6,8%20Z'%20opacity='.54'/%3e%3cpolygon%20points='12%200%2012%2014%2014%2014%2014%200'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(144,36)'%3e%3cg%20fill='%23000000'%20fill-rule='evenodd'%20transform='translate(2%202)'%3e%3cpath%20d='M5,0%20L3,0%20L3,2%20L5,2%20L5,0%20L5,0%20Z%20M8,6%20L6,6%20L6,8%20L8,8%20L8,6%20L8,6%20Z%20M8,9%20L6,9%20L6,11%20L8,11%20L8,9%20L8,9%20Z%20M11,6%20L9,6%20L9,8%20L11,8%20L11,6%20L11,6%20Z%20M5,6%20L3,6%20L3,8%20L5,8%20L5,6%20L5,6%20Z%20M11,0%20L9,0%20L9,2%20L11,2%20L11,0%20L11,0%20Z%20M8,3%20L6,3%20L6,5%20L8,5%20L8,3%20L8,3%20Z%20M8,0%20L6,0%20L6,2%20L8,2%20L8,0%20L8,0%20Z%20M2,9%20L0,9%20L0,11%20L2,11%20L2,9%20L2,9%20Z%20M12,11%20L14,11%20L14,9%20L12,9%20L12,11%20L12,11%20Z%20M12,5%20L14,5%20L14,3%20L12,3%20L12,5%20L12,5%20Z%20M12,8%20L14,8%20L14,6%20L12,6%20L12,8%20L12,8%20Z%20M12,0%20L12,2%20L14,2%20L14,0%20L12,0%20L12,0%20Z%20M2,0%20L0,0%20L0,2%20L2,2%20L2,0%20L2,0%20Z%20M2,3%20L0,3%20L0,5%20L2,5%20L2,3%20L2,3%20Z%20M2,6%20L0,6%20L0,8%20L2,8%20L2,6%20L2,6%20Z'%20opacity='.54'/%3e%3cpolygon%20points='0%2014%2014%2014%2014%2012%200%2012'/%3e%3c/g%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(162,36)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M6,14%20L8,14%20L8,12%20L6,12%20L6,14%20L6,14%20Z%20M3,8%20L5,8%20L5,6%20L3,6%20L3,8%20L3,8%20Z%20M3,2%20L5,2%20L5,0%20L3,0%20L3,2%20L3,2%20Z%20M6,11%20L8,11%20L8,9%20L6,9%20L6,11%20L6,11%20Z%20M3,14%20L5,14%20L5,12%20L3,12%20L3,14%20L3,14%20Z%20M0,5%20L2,5%20L2,3%20L0,3%20L0,5%20L0,5%20Z%20M0,14%20L2,14%20L2,12%20L0,12%20L0,14%20L0,14%20Z%20M0,2%20L2,2%20L2,0%20L0,0%20L0,2%20L0,2%20Z%20M0,8%20L2,8%20L2,6%20L0,6%20L0,8%20L0,8%20Z%20M6,8%20L8,8%20L8,6%20L6,6%20L6,8%20L6,8%20Z%20M0,11%20L2,11%20L2,9%20L0,9%20L0,11%20L0,11%20Z%20M12,11%20L14,11%20L14,9%20L12,9%20L12,11%20L12,11%20Z%20M12,14%20L14,14%20L14,12%20L12,12%20L12,14%20L12,14%20Z%20M12,8%20L14,8%20L14,6%20L12,6%20L12,8%20L12,8%20Z%20M12,5%20L14,5%20L14,3%20L12,3%20L12,5%20L12,5%20Z%20M12,0%20L12,2%20L14,2%20L14,0%20L12,0%20L12,0%20Z%20M6,2%20L8,2%20L8,0%20L6,0%20L6,2%20L6,2%20Z%20M9,2%20L11,2%20L11,0%20L9,0%20L9,2%20L9,2%20Z%20M6,5%20L8,5%20L8,3%20L6,3%20L6,5%20L6,5%20Z%20M9,14%20L11,14%20L11,12%20L9,12%20L9,14%20L9,14%20Z%20M9,8%20L11,8%20L11,6%20L9,6%20L9,8%20L9,8%20Z'%20transform='translate(2%202)'%20opacity='.54'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(180,36)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M6.5,3.62%20L0,10.12%20L0,13%20L2.88,13%20L9.38,6.5%20L6.5,3.62%20Z%20M11.85,4.02%20C12.05,3.82%2012.05,3.51%2011.85,3.31%20L9.68,1.14%20C9.48,0.94%209.17,0.94%208.97,1.14%20L7.62,2.5%20L10.5,5.38%20L11.85,4.02%20L11.85,4.02%20Z'%20transform='translate(4)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(198,36)'%3e%3cpath%20fill='%23000000'%20fill-rule='evenodd'%20d='M0,0%20L14,0%20L14,2%20L0,2%20L0,0%20Z%20M0,4%20L6,4%20L6,6%20L0,6%20L0,4%20Z%20M0,8%20L2,8%20L2,10%20L0,10%20L0,8%20Z%20M8,4%20L14,4%20L14,6%20L8,6%20L8,4%20Z%20M4,8%20L6,8%20L6,10%20L4,10%20L4,8%20Z%20M8,8%20L10,8%20L10,10%20L8,10%20L8,8%20Z%20M12,8%20L14,8%20L14,10%20L12,10%20L12,8%20Z'%20transform='translate(2%204)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(216,36)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='-2%202%202%206%206%202'%20transform='rotate(90%203%2010)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(234,36)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='7.53%201.53%206.47%20.47%204%202.94%201.53%20.47%20.47%201.53%202.94%204%20.47%206.47%201.53%207.53%204%205.06%206.47%207.53%207.53%206.47%205.06%204'%20transform='translate(5%205)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(0,54)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='8.44%20.44%205%203.88%201.56%20.44%20.5%201.5%205%206%209.5%201.5'%20transform='translate(4%206)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(18,54)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='5%200%20.5%204.5%201.56%205.56%205%202.12%208.44%205.56%209.5%204.5'%20transform='translate(4%206)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(36,54)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='8.44%20.44%205%203.88%201.56%20.44%20.5%201.5%205%206%209.5%201.5'%20transform='rotate(90%204%208)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(54,54)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='5%200%20.5%204.5%201.56%205.56%205%202.12%208.44%205.56%209.5%204.5'%20transform='rotate(90%204%208)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(72,54)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='12%205%203.125%205%207.06%201.06%206%200%200%206%206%2012%207.06%2010.94%203.125%207%2012%207'%20transform='matrix(-1%200%200%201%2015%203)'/%3e%3c/g%3e%3cg%20xmlns='http://www.w3.org/2000/svg'%20transform='translate(90,54)'%3e%3cpolygon%20fill='%23000000'%20fill-rule='evenodd'%20points='12%205%203.125%205%207.06%201.06%206%200%200%206%206%2012%207.06%2010.94%203.125%207%2012%207'%20transform='translate(3%203)'/%3e%3c/g%3e%3c/svg%3e");position:absolute;width:262px;height:444px;opacity:.56}.x-spreadsheet-icon .x-spreadsheet-icon-img.undo{left:0;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.redo{left:-18px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.print{left:-36px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.paintformat{left:-54px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.clearformat{left:-72px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.font-bold{left:-90px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.font-italic{left:-108px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.underline{left:-126px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.strike{left:-144px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.color{left:-162px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.bgcolor{left:-180px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.merge{left:-198px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.align-left{left:-216px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.align-center{left:-234px;top:0}.x-spreadsheet-icon .x-spreadsheet-icon-img.align-right{left:0;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.align-top{left:-18px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.align-middle{left:-36px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.align-bottom{left:-54px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.textwrap{left:-72px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.autofilter{left:-90px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.formula{left:-108px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.arrow-down{left:-126px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.arrow-right{left:-144px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.link{left:-162px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.chart{left:-180px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.freeze{left:-198px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.ellipsis{left:-216px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.add{left:-234px;top:-18px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-all{left:0;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-inside{left:-18px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-horizontal{left:-36px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-vertical{left:-54px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-outside{left:-72px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-left{left:-90px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-top{left:-108px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-right{left:-126px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-bottom{left:-144px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.border-none{left:-162px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.line-color{left:-180px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.line-type{left:-198px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.close{left:-234px;top:-36px}.x-spreadsheet-icon .x-spreadsheet-icon-img.chevron-down{left:0;top:-54px}.x-spreadsheet-icon .x-spreadsheet-icon-img.chevron-up{left:-18px;top:-54px}.x-spreadsheet-icon .x-spreadsheet-icon-img.chevron-left{left:-36px;top:-54px}.x-spreadsheet-icon .x-spreadsheet-icon-img.chevron-right{left:-54px;top:-54px}.excel-full-host{width:100%;height:100%;overflow:hidden}.excel-full-host>.x-spreadsheet{width:100%;height:100%}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
12
+ (function(){"use strict";class j{constructor(t,e=""){typeof t=="string"?(this.el=document.createElement(t),this.el.className=e):this.el=t,this.data={}}data(t,e){return e!==void 0?(this.data[t]=e,this):this.data[t]}on(t,e){const[s,...i]=t.split(".");let n=s;return n==="mousewheel"&&/Firefox/i.test(window.navigator.userAgent)&&(n="DOMMouseScroll"),this.el.addEventListener(n,r=>{e(r);for(let o=0;o<i.length;o+=1){const c=i[o];if(c==="left"&&r.button!==0||c==="right"&&r.button!==2)return;c==="stop"&&r.stopPropagation()}}),this}offset(t){if(t!==void 0)return Object.keys(t).forEach(r=>{this.css(r,`${t[r]}px`)}),this;const{offsetTop:e,offsetLeft:s,offsetHeight:i,offsetWidth:n}=this.el;return{top:e,left:s,height:i,width:n}}scroll(t){const{el:e}=this;return t!==void 0&&(t.left!==void 0&&(e.scrollLeft=t.left),t.top!==void 0&&(e.scrollTop=t.top)),{left:e.scrollLeft,top:e.scrollTop}}box(){return this.el.getBoundingClientRect()}parent(){return new j(this.el.parentNode)}children(...t){return arguments.length===0?this.el.childNodes:(t.forEach(e=>this.child(e)),this)}removeChild(t){this.el.removeChild(t)}child(t){let e=t;return typeof t=="string"?e=document.createTextNode(t):t instanceof j&&(e=t.el),this.el.appendChild(e),this}contains(t){return this.el.contains(t)}className(t){return t!==void 0?(this.el.className=t,this):this.el.className}addClass(t){return this.el.classList.add(t),this}hasClass(t){return this.el.classList.contains(t)}removeClass(t){return this.el.classList.remove(t),this}toggle(t="active"){return this.toggleClass(t)}toggleClass(t){return this.el.classList.toggle(t)}active(t=!0,e="active"){return t?this.addClass(e):this.removeClass(e),this}checked(t=!0){return this.active(t,"checked"),this}disabled(t=!0){return t?this.addClass("disabled"):this.removeClass("disabled"),this}attr(t,e){if(e!==void 0)this.el.setAttribute(t,e);else{if(typeof t=="string")return this.el.getAttribute(t);Object.keys(t).forEach(s=>{this.el.setAttribute(s,t[s])})}return this}removeAttr(t){return this.el.removeAttribute(t),this}html(t){return t!==void 0?(this.el.innerHTML=t,this):this.el.innerHTML}val(t){return t!==void 0?(this.el.value=t,this):this.el.value}focus(){this.el.focus()}cssRemoveKeys(...t){return t.forEach(e=>this.el.style.removeProperty(e)),this}css(t,e){return e===void 0&&typeof t!="string"?(Object.keys(t).forEach(s=>{this.el.style[s]=t[s]}),this):e!==void 0?(this.el.style[t]=e,this):this.el.style[t]}computedStyle(){return window.getComputedStyle(this.el,null)}show(){return this.css("display","block"),this}hide(){return this.css("display","none"),this}}const u=(l,t="")=>new j(l,t),Z=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Qt(l){let t="",e=l;for(;e>=Z.length;)e/=Z.length,e-=1,t+=Z[parseInt(e,10)%Z.length];const s=l%Z.length;return t+=Z[s],t}function Ke(l){let t=0;for(let e=0;e!==l.length;++e)t=26*t+l.charCodeAt(e)-64;return t-1}function B(l){let t="",e="";for(let s=0;s<l.length;s+=1)l.charAt(s)>="0"&&l.charAt(s)<="9"?e+=l.charAt(s):t+=l.charAt(s);return[Ke(t),parseInt(e,10)-1]}function P(l,t){return`${Qt(l)}${t+1}`}function st(l,t,e,s=()=>!0){if(t===0&&e===0)return l;const[i,n]=B(l);return s(i,n)?P(i+t,n+e):l}class ${constructor(t,e,s,i,n=0,r=0){this.sri=t,this.sci=e,this.eri=s,this.eci=i,this.w=n,this.h=r}set(t,e,s,i){this.sri=t,this.sci=e,this.eri=s,this.eci=i}multiple(){return this.eri-this.sri>0||this.eci-this.sci>0}includes(...t){let[e,s]=[0,0];t.length===1?[s,e]=B(t[0]):t.length===2&&([e,s]=t);const{sri:i,sci:n,eri:r,eci:o}=this;return i<=e&&e<=r&&n<=s&&s<=o}each(t,e=()=>!0){const{sri:s,sci:i,eri:n,eci:r}=this;for(let o=s;o<=n;o+=1)if(e(o))for(let c=i;c<=r;c+=1)t(o,c)}contains(t){return this.sri<=t.sri&&this.sci<=t.sci&&this.eri>=t.eri&&this.eci>=t.eci}within(t){return this.sri>=t.sri&&this.sci>=t.sci&&this.eri<=t.eri&&this.eci<=t.eci}disjoint(t){return this.sri>t.eri||this.sci>t.eci||t.sri>this.eri||t.sci>this.eci}intersects(t){return this.sri<=t.eri&&this.sci<=t.eci&&t.sri<=this.eri&&t.sci<=this.eci}union(t){const{sri:e,sci:s,eri:i,eci:n}=this;return new $(t.sri<e?t.sri:e,t.sci<s?t.sci:s,t.eri>i?t.eri:i,t.eci>n?t.eci:n)}difference(t){const e=[],s=(f,g,p,w)=>{e.push(new $(f,g,p,w))},{sri:i,sci:n,eri:r,eci:o}=this,c=t.sri-i,h=t.sci-n,d=r-t.eri,a=o-t.eci;return c>0?(s(i,n,t.sri-1,o),d>0?(s(t.eri+1,n,r,o),h>0&&s(t.sri,n,t.eri,t.sci-1),a>0&&s(t.sri,t.eci+1,t.eri,o)):(h>0&&s(t.sri,n,r,t.sci-1),a>0&&s(t.sri,t.eci+1,r,o))):d>0&&(s(t.eri+1,n,r,o),h>0&&s(i,n,t.eri,t.sci-1),a>0&&s(i,t.eci+1,t.eri,o)),h>0?(s(i,n,r,t.sci-1),a>0?(s(i,t.eri+1,r,o),c>0&&s(i,t.sci,t.sri-1,t.eci),d>0&&s(t.sri+1,t.sci,r,t.eci)):(c>0&&s(i,t.sci,t.sri-1,o),d>0&&s(t.sri+1,t.sci,r,o))):a>0&&(s(r,t.eci+1,r,o),c>0&&s(i,n,t.sri-1,t.eci),d>0&&s(t.eri+1,n,r,t.eci)),e}size(){return[this.eri-this.sri+1,this.eci-this.sci+1]}toString(){const{sri:t,sci:e,eri:s,eci:i}=this;let n=P(e,t);return this.multiple()&&(n=`${n}:${P(i,s)}`),n}clone(){const{sri:t,sci:e,eri:s,eci:i,w:n,h:r}=this;return new $(t,e,s,i,n,r)}equals(t){return this.eri===t.eri&&this.eci===t.eci&&this.sri===t.sri&&this.sci===t.sci}static valueOf(t){const e=t.split(":"),[s,i]=B(e[0]);let[n,r]=[i,s];return e.length>1&&([r,n]=B(e[1])),new $(i,s,n,r)}}let Ze=class{constructor(){this.range=new $(0,0,0,0),this.ri=0,this.ci=0}multiple(){return this.range.multiple()}setIndexes(t,e){this.ri=t,this.ci=e}size(){return this.range.size()}};class Je{constructor(){this.x=0,this.y=0,this.ri=0,this.ci=0}}class Ge{constructor(){this.undoItems=[],this.redoItems=[]}add(t){this.undoItems.push(JSON.stringify(t)),this.redoItems=[]}canUndo(){return this.undoItems.length>0}canRedo(){return this.redoItems.length>0}undo(t,e){const{undoItems:s,redoItems:i}=this;this.canUndo()&&(i.push(JSON.stringify(t)),e(JSON.parse(s.pop())))}redo(t,e){const{undoItems:s,redoItems:i}=this;this.canRedo()&&(s.push(JSON.stringify(t)),e(JSON.parse(i.pop())))}}class Qe{constructor(){this.range=null,this.state="clear"}copy(t){return this.range=t,this.state="copy",this}cut(t){return this.range=t,this.state="cut",this}isCopy(){return this.state==="copy"}isCut(){return this.state==="cut"}isClear(){return this.state==="clear"}clear(){this.range=null,this.state="clear"}}class te{constructor(t,e,s){this.ci=t,this.operator=e,this.value=s}set(t,e){this.operator=t,this.value=e}includes(t){const{operator:e,value:s}=this;return e==="all"?!0:e==="in"?s.includes(t):!1}vlength(){const{operator:t,value:e}=this;return t==="in"?e.length:0}getData(){const{ci:t,operator:e,value:s}=this;return{ci:t,operator:e,value:s}}}class ee{constructor(t,e){this.ci=t,this.order=e}asc(){return this.order==="asc"}desc(){return this.order==="desc"}}class ts{constructor(){this.ref=null,this.filters=[],this.sort=null}setData({ref:t,filters:e,sort:s}){t!=null&&(this.ref=t,this.filters=e.map(i=>new te(i.ci,i.operator,i.value)),s&&(this.sort=new ee(s.ci,s.order)))}getData(){if(this.active()){const{ref:t,filters:e,sort:s}=this;return{ref:t,filters:e.map(i=>i.getData()),sort:s}}return{}}addFilter(t,e,s){const i=this.getFilter(t);i==null?this.filters.push(new te(t,e,s)):i.set(e,s)}setSort(t,e){this.sort=e?new ee(t,e):null}includes(t,e){return this.active()?this.hrange().includes(t,e):!1}getSort(t){const{sort:e}=this;return e&&e.ci===t?e:null}getFilter(t){const{filters:e}=this;for(let s=0;s<e.length;s+=1)if(e[s].ci===t)return e[s];return null}filteredRows(t){const e=new Set,s=new Set;if(this.active()){const{sri:i,eri:n}=this.range(),{filters:r}=this;for(let o=i+1;o<=n;o+=1)for(let c=0;c<r.length;c+=1){const h=r[c],d=t(o,h.ci),a=d?d.text:"";if(h.includes(a))s.add(o);else{e.add(o);break}}}return{rset:e,fset:s}}items(t,e){const s={};if(this.active()){const{sri:i,eri:n}=this.range();for(let r=i+1;r<=n;r+=1){const o=e(r,t);if(o!==null&&!/^\s*$/.test(o.text)){const c=o.text,h=(s[c]||0)+1;s[c]=h}else s[""]=(s[""]||0)+1}}return s}range(){return $.valueOf(this.ref)}hrange(){const t=this.range();return t.eri=t.sri,t}clear(){this.ref=null,this.filters=[],this.sort=null}active(){return this.ref!==null}}class zt{constructor(t=[]){this._=t}forEach(t){this._.forEach(t)}deleteWithin(t){this._=this._.filter(e=>!e.within(t))}getFirstIncludes(t,e){for(let s=0;s<this._.length;s+=1){const i=this._[s];if(i.includes(t,e))return i}return null}filterIntersects(t){return new zt(this._.filter(e=>e.intersects(t)))}intersects(t){for(let e=0;e<this._.length;e+=1)if(this._[e].intersects(t))return!0;return!1}union(t){let e=t;return this._.forEach(s=>{s.intersects(e)&&(e=s.union(e))}),e}add(t){this.deleteWithin(t),this._.push(t)}shift(t,e,s,i){this._.forEach(n=>{const{sri:r,sci:o,eri:c,eci:h}=n,d=n;t==="row"?r>=e?(d.sri+=s,d.eri+=s):r<e&&e<=c&&(d.eri+=s,i(r,o,s,0)):t==="column"&&(o>=e?(d.sci+=s,d.eci+=s):o<e&&e<=h&&(d.eci+=s,i(r,o,0,s)))})}move(t,e,s){this._.forEach(i=>{const n=i;n.within(t)&&(n.eri+=e,n.sri+=e,n.sci+=s,n.eci+=s)})}setData(t){return this._=t.map(e=>$.valueOf(e)),this}getData(){return this._.map(t=>t.toString())}}function es(l){return JSON.parse(JSON.stringify(l))}const se=(l={},...t)=>(t.forEach(e=>{Object.keys(e).forEach(s=>{const i=e[s];typeof i=="string"||typeof i=="number"||typeof i=="boolean"?l[s]=i:typeof i!="function"&&!Array.isArray(i)&&i instanceof Object?(l[s]=l[s]||{},se(l[s],i)):l[s]=i})}),l);function It(l,t){const e=Object.keys(l);if(e.length!==Object.keys(t).length)return!1;for(let s=0;s<e.length;s+=1){const i=e[s],n=l[i],r=t[i];if(r===void 0)return!1;if(typeof n=="string"||typeof n=="number"||typeof n=="boolean"){if(n!==r)return!1}else if(Array.isArray(n)){if(n.length!==r.length)return!1;for(let o=0;o<n.length;o+=1)if(!It(n[o],r[o]))return!1}else if(typeof n!="function"&&!Array.isArray(n)&&n instanceof Object&&!It(n,r))return!1}return!0}const ss=(l,t=e=>e)=>{let e=0,s=0;return Object.keys(l).forEach(i=>{e+=t(l[i],i),s+=1}),[e,s]};function is(l,t){const e=l[`${t}`];return delete l[`${t}`],e}function ls(l,t,e,s,i,n){let r=e,o=s,c=l;for(;c<t&&!(r>i);c+=1)o=n(c),r+=o;return[c,r-o,o]}function ns(l,t,e){let s=0;for(let i=l;i<t;i+=1)s+=e(i);return s}function rs(l,t,e){for(let s=l;s<t;s+=1)e(s)}function os(l,t){if(l.length===t.length){for(let e=0;e<l.length;e+=1)if(l[e]!==t[e])return!1}else return!1;return!0}function Rt(l){const t=`${l}`;let e=0,s=!1;for(let i=0;i<t.length;i+=1)s===!0&&(e+=1),t.charAt(i)==="."&&(s=!0);return e}function U(l,t,e){if(Number.isNaN(t)||Number.isNaN(e))return t+l+e;const s=Rt(t),i=Rt(e),n=Number(t),r=Number(e);let o=0;if(l==="-")o=n-r;else if(l==="+")o=n+r;else if(l==="*")o=n*r;else if(l==="/")return o=n/r,Rt(o)>5?o.toFixed(2):o;return o.toFixed(Math.max(s,i))}const z={cloneDeep:es,merge:(...l)=>se({},...l),equals:It,arrayEquals:os,sum:ss,rangeEach:rs,rangeSum:ns,rangeReduceIf:ls,deleteProperty:is,numberCalc:U};class cs{constructor({len:t,height:e}){this._={},this.len=t,this.height=e}getHeight(t){if(this.isHide(t))return 0;const e=this.get(t);return e&&e.height?e.height:this.height}setHeight(t,e){const s=this.getOrNew(t);s.height=e}unhide(t){let e=t;for(;e>0&&(e-=1,this.isHide(e));)this.setHide(e,!1)}isHide(t){const e=this.get(t);return e&&e.hide}setHide(t,e){const s=this.getOrNew(t);e===!0?s.hide=!0:delete s.hide}setStyle(t,e){const s=this.getOrNew(t);s.style=e}sumHeight(t,e,s){return z.rangeSum(t,e,i=>s&&s.has(i)?0:this.getHeight(i))}totalHeight(){return this.sumHeight(0,this.len)}get(t){return this._[t]}getOrNew(t){return this._[t]=this._[t]||{cells:{}},this._[t]}getCell(t,e){const s=this.get(t);return s!==void 0&&s.cells!==void 0&&s.cells[e]!==void 0?s.cells[e]:null}getCellMerge(t,e){const s=this.getCell(t,e);return s&&s.merge?s.merge:[0,0]}getCellOrNew(t,e){const s=this.getOrNew(t);return s.cells[e]=s.cells[e]||{},s.cells[e]}setCell(t,e,s,i="all"){const n=this.getOrNew(t);i==="all"?n.cells[e]=s:i==="text"?(n.cells[e]=n.cells[e]||{},n.cells[e].text=s.text):i==="format"&&(n.cells[e]=n.cells[e]||{},n.cells[e].style=s.style,s.merge&&(n.cells[e].merge=s.merge))}setCellText(t,e,s){const i=this.getCellOrNew(t,e);i.editable!==!1&&(i.text=s)}copyPaste(t,e,s,i=!1,n=()=>{}){const{sri:r,sci:o,eri:c,eci:h}=t,d=e.sri,a=e.sci,f=e.eri,g=e.eci,[p,w]=t.size(),[b,x]=e.size();let C=!0,v=0;(f<r||g<o)&&(C=!1,f<r?v=b:v=x);for(let k=r;k<=c;k+=1)if(this._[k]){for(let S=o;S<=h;S+=1)if(this._[k].cells&&this._[k].cells[S])for(let N=d;N<=f;N+=p)for(let F=a;F<=g;F+=w){const I=N+(k-r),Tt=F+(S-o),q=z.cloneDeep(this._[k].cells[S]);if(i&&q&&q.text&&q.text.length>0){const{text:Dt}=q;let At=F-a+(N-d)+2;if(C||(At-=v+1),Dt[0]==="=")q.text=Dt.replace(/[a-zA-Z]{1,3}\d+/g,K=>{let[Ot,Xe]=[0,0];return r===d?Ot=At-1:Xe=At-1,/^\d+$/.test(K)?K:st(K,Ot,Xe)});else if(p<=1&&w>1&&(d>c||f<r)||w<=1&&p>1&&(a>h||g<o)||p<=1&&w<=1){const K=/[\\.\d]+$/.exec(Dt);if(K!==null){const Ot=Number(K[0])+At-1;q.text=Dt.substring(0,K.index)+Ot}}}this.setCell(I,Tt,q,s),n(I,Tt,q)}}}cutPaste(t,e){const s={};this.each(i=>{this.eachCells(i,n=>{let r=parseInt(i,10),o=parseInt(n,10);t.includes(i,n)&&(r=e.sri+(r-t.sri),o=e.sci+(o-t.sci)),s[r]=s[r]||{cells:{}},s[r].cells[o]=this._[i].cells[n]})}),this._=s}paste(t,e){if(t.length<=0)return;const{sri:s,sci:i}=e;t.forEach((n,r)=>{const o=s+r;n.forEach((c,h)=>{const d=i+h;this.setCellText(o,d,c)})})}insert(t,e=1){const s={};this.each((i,n)=>{let r=parseInt(i,10);r>=t&&(r+=e,this.eachCells(i,(o,c)=>{c.text&&c.text[0]==="="&&(c.text=c.text.replace(/[a-zA-Z]{1,3}\d+/g,h=>st(h,0,e,(d,a)=>a>=t)))})),s[r]=n}),this._=s,this.len+=e}delete(t,e){const s=e-t+1,i={};this.each((n,r)=>{const o=parseInt(n,10);o<t?i[o]=r:n>e&&(i[o-s]=r,this.eachCells(n,(c,h)=>{h.text&&h.text[0]==="="&&(h.text=h.text.replace(/[a-zA-Z]{1,3}\d+/g,d=>st(d,0,-s,(a,f)=>f>e)))}))}),this._=i,this.len-=s}insertColumn(t,e=1){this.each((s,i)=>{const n={};this.eachCells(s,(r,o)=>{let c=parseInt(r,10);c>=t&&(c+=e,o.text&&o.text[0]==="="&&(o.text=o.text.replace(/[a-zA-Z]{1,3}\d+/g,h=>st(h,e,0,d=>d>=t)))),n[c]=o}),i.cells=n})}deleteColumn(t,e){const s=e-t+1;this.each((i,n)=>{const r={};this.eachCells(i,(o,c)=>{const h=parseInt(o,10);h<t?r[h]=c:h>e&&(r[h-s]=c,c.text&&c.text[0]==="="&&(c.text=c.text.replace(/[a-zA-Z]{1,3}\d+/g,d=>st(d,-s,0,a=>a>e))))}),n.cells=r})}deleteCells(t,e="all"){t.each((s,i)=>{this.deleteCell(s,i,e)})}deleteCell(t,e,s="all"){const i=this.get(t);if(i!==null){const n=this.getCell(t,e);n!==null&&n.editable!==!1&&(s==="all"?delete i.cells[e]:s==="text"?(n.text&&delete n.text,n.value&&delete n.value):s==="format"?(n.style!==void 0&&delete n.style,n.merge&&delete n.merge):s==="merge"&&n.merge&&delete n.merge)}}maxCell(){const t=Object.keys(this._),e=t[t.length-1],s=this._[e];if(s){const{cells:i}=s,n=Object.keys(i),r=n[n.length-1];return[parseInt(e,10),parseInt(r,10)]}return[0,0]}each(t){Object.entries(this._).forEach(([e,s])=>{t(e,s)})}eachCells(t,e){this._[t]&&this._[t].cells&&Object.entries(this._[t].cells).forEach(([s,i])=>{e(s,i)})}setData(t){t.len&&(this.len=t.len,delete t.len),this._=t}getData(){const{len:t}=this;return Object.assign({len:t},this._)}}class hs{constructor({len:t,width:e,indexWidth:s,minWidth:i}){this._={},this.len=t,this.width=e,this.indexWidth=s,this.minWidth=i}setData(t){t.len&&(this.len=t.len,delete t.len),this._=t}getData(){const{len:t}=this;return Object.assign({len:t},this._)}getWidth(t){if(this.isHide(t))return 0;const e=this._[t];return e&&e.width?e.width:this.width}getOrNew(t){return this._[t]=this._[t]||{},this._[t]}setWidth(t,e){const s=this.getOrNew(t);s.width=e}unhide(t){let e=t;for(;e>0&&(e-=1,this.isHide(e));)this.setHide(e,!1)}isHide(t){const e=this._[t];return e&&e.hide}setHide(t,e){const s=this.getOrNew(t);e===!0?s.hide=!0:delete s.hide}setStyle(t,e){const s=this.getOrNew(t);s.style=e}sumWidth(t,e){return z.rangeSum(t,e,s=>this.getWidth(s))}totalWidth(){return this.sumWidth(0,this.len)}}const as={toolbar:{undo:"Undo",redo:"Redo",print:"Print",paintformat:"Paint format",clearformat:"Clear format",format:"Format",fontName:"Font",fontSize:"Font size",fontBold:"Font bold",fontItalic:"Font italic",underline:"Underline",strike:"Strike",color:"Text color",bgcolor:"Fill color",border:"Borders",merge:"Merge cells",align:"Horizontal align",valign:"Vertical align",textwrap:"Text wrapping",freeze:"Freeze cell",autofilter:"Filter",formula:"Functions",more:"More"},contextmenu:{copy:"Copy",cut:"Cut",paste:"Paste",pasteValue:"Paste values only",pasteFormat:"Paste format only",hide:"Hide",insertRow:"Insert row",insertColumn:"Insert column",deleteSheet:"Delete",deleteRow:"Delete row",deleteColumn:"Delete column",deleteCell:"Delete cell",deleteCellText:"Delete cell text",validation:"Data validations",cellprintable:"Enable export",cellnonprintable:"Disable export",celleditable:"Enable editing",cellnoneditable:"Disable editing"},print:{size:"Paper size",orientation:"Page orientation",orientations:["Landscape","Portrait"]},format:{normal:"Normal",text:"Plain Text",number:"Number",percent:"Percent",rmb:"RMB",usd:"USD",eur:"EUR",date:"Date",time:"Time",datetime:"Date time",duration:"Duration"},formula:{sum:"Sum",average:"Average",max:"Max",min:"Min",_if:"IF",and:"AND",or:"OR",concat:"Concat"},validation:{required:"it must be required",notMatch:"it not match its validation rule",between:"it is between {} and {}",notBetween:"it is not between {} and {}",notIn:"it is not in list",equal:"it equal to {}",notEqual:"it not equal to {}",lessThan:"it less than {}",lessThanEqual:"it less than or equal to {}",greaterThan:"it greater than {}",greaterThanEqual:"it greater than or equal to {}"},error:{pasteForMergedCell:"Unable to do this for merged cells"},calendar:{weeks:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},button:{next:"Next",cancel:"Cancel",remove:"Remove",save:"Save",ok:"OK"},sort:{desc:"Sort Z -> A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}};let Ft=["en"];const ie={en:as};function le(l,t){if(t)for(const e of Ft){if(!t[e])break;let s=t[e];const i=l.match(/(?:\\.|[^.])+/g);for(let n=0;n<i.length;n+=1){const r=i[n],o=s[r];if(!o)break;if(n===i.length-1)return o;s=o}}}function T(l){let t=le(l,ie);return!t&&window&&window.x_spreadsheet&&window.x_spreadsheet.$messages&&(t=le(l,window.x_spreadsheet.$messages)),t||""}function E(l){return()=>T(l)}function ne(l,t,e=!1){e?Ft=[l]:Ft.unshift(l),t&&(ie[l]=t)}const re={phone:/^[1-9]\d{10}$/,email:/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/};function R(l,t,...e){let s="";return l||(s=T(`validation.${t}`,...e)),[l,s]}class oe{constructor(t,e,s,i){this.required=e,this.value=s,this.type=t,this.operator=i,this.message=""}parseValue(t){const{type:e}=this;return e==="date"?new Date(t):e==="number"?Number(t):t}equals(t){let e=this.type===t.type&&this.required===t.required&&this.operator===t.operator;return e&&(Array.isArray(this.value)?e=z.arrayEquals(this.value,t.value):e=this.value===t.value),e}values(){return this.value.split(",")}validate(t){const{required:e,operator:s,value:i,type:n}=this;if(e&&/^\s*$/.test(t))return R(!1,"required");if(/^\s*$/.test(t))return[!0];if(re[n]&&!re[n].test(t))return R(!1,"notMatch");if(n==="list")return R(this.values().includes(t),"notIn");if(s){const r=this.parseValue(t);if(s==="be"){const[o,c]=i;return R(r>=this.parseValue(o)&&r<=this.parseValue(c),"between",o,c)}if(s==="nbe"){const[o,c]=i;return R(r<this.parseValue(o)||r>this.parseValue(c),"notBetween",o,c)}if(s==="eq")return R(r===this.parseValue(i),"equal",i);if(s==="neq")return R(r!==this.parseValue(i),"notEqual",i);if(s==="lt")return R(r<this.parseValue(i),"lessThan",i);if(s==="lte")return R(r<=this.parseValue(i),"lessThanEqual",i);if(s==="gt")return R(r>this.parseValue(i),"greaterThan",i);if(s==="gte")return R(r>=this.parseValue(i),"greaterThanEqual",i)}return[!0]}}class at{constructor(t,e,s){this.refs=e,this.mode=t,this.validator=s}includes(t,e){const{refs:s}=this;for(let i=0;i<s.length;i+=1)if($.valueOf(s[i]).includes(t,e))return!0;return!1}addRef(t){this.remove($.valueOf(t)),this.refs.push(t)}remove(t){const e=[];this.refs.forEach(s=>{const i=$.valueOf(s);i.intersects(t)?i.difference(t).forEach(r=>e.push(r.toString())):e.push(s)}),this.refs=e}getData(){const{refs:t,mode:e,validator:s}=this,{type:i,required:n,operator:r,value:o}=s;return{refs:t,mode:e,type:i,required:n,operator:r,value:o}}static valueOf({refs:t,mode:e,type:s,required:i,operator:n,value:r}){return new at(e,t,new oe(s,i,r,n))}}class ds{constructor(){this._=[],this.errors=new Map}getError(t,e){return this.errors.get(`${t}_${e}`)}validate(t,e,s){const i=this.get(t,e),n=`${t}_${e}`,{errors:r}=this;if(i!==null){const[o,c]=i.validator.validate(s);o?r.delete(n):r.set(n,c)}else r.delete(n);return!0}add(t,e,{type:s,required:i,value:n,operator:r}){const o=new oe(s,i,n,r),c=this.getByValidator(o);c!==null?c.addRef(e):this._.push(new at(t,[e],o))}getByValidator(t){for(let e=0;e<this._.length;e+=1){const s=this._[e];if(s.validator.equals(t))return s}return null}get(t,e){for(let s=0;s<this._.length;s+=1){const i=this._[s];if(i.includes(t,e))return i}return null}remove(t){this.each(e=>{e.remove(t)})}each(t){this._.forEach(e=>t(e))}getData(){return this._.filter(t=>t.refs.length>0).map(t=>t.getData())}setData(t){this._=t.map(e=>at.valueOf(e))}}const fs={mode:"edit",view:{height:()=>document.documentElement.clientHeight,width:()=>document.documentElement.clientWidth},showGrid:!0,showToolbar:!0,showContextmenu:!0,showBottomBar:!0,row:{len:100,height:25},col:{len:26,width:100,indexWidth:60,minWidth:60},style:{bgcolor:"#ffffff",align:"left",valign:"middle",textwrap:!1,strike:!1,underline:!1,color:"#0a0a0a",font:{name:"Arial",size:10,bold:!1,italic:!1},format:"normal"}},us=41,gs=41;function ce(l,t,e=()=>{}){const{merges:s}=this,i=t.clone(),[n,r]=l.size(),[o,c]=t.size();return n>o&&(i.eri=t.sri+n-1),r>c&&(i.eci=t.sci+r-1),s.intersects(i)?(e(T("error.pasteForMergedCell")),!1):!0}function he(l,t,e,s=!1){const{rows:i,merges:n}=this;(e==="all"||e==="format")&&(i.deleteCells(t,e),n.deleteWithin(t)),i.copyPaste(l,t,e,s,(r,o,c)=>{if(c&&c.merge){const[h,d]=c.merge;if(h<=0&&d<=0)return;n.add(new $(r,o,r+h,o+d))}})}function ps(l,t){const{clipboard:e,rows:s,merges:i}=this;s.cutPaste(l,t),i.move(l,t.sri-l.sri,t.sci-l.sci),e.clear()}function J(l,t,e){const{styles:s,rows:i}=this,n=i.getCellOrNew(l,t);let r={};n.style!==void 0&&(r=z.cloneDeep(s[n.style])),r=z.merge(r,{border:e}),n.style=this.addStyle(r)}function ms({mode:l,style:t,color:e}){const{styles:s,selector:i,rows:n}=this,{sri:r,sci:o,eri:c,eci:h}=i.range,d=!this.isSingleSelected();if(!(!d&&(l==="inside"||l==="horizontal"||l==="vertical"))){if(l==="outside"&&!d)J.call(this,r,o,{top:[t,e],bottom:[t,e],left:[t,e],right:[t,e]});else if(l==="none")i.range.each((a,f)=>{const g=n.getCell(a,f);if(g&&g.style!==void 0){const p=z.cloneDeep(s[g.style]);delete p.border,g.style=this.addStyle(p)}});else if(l==="all"||l==="inside"||l==="outside"||l==="horizontal"||l==="vertical"){const a=[];for(let f=r;f<=c;f+=1)for(let g=o;g<=h;g+=1){const p=[];for(let S=0;S<a.length;S+=1){const[N,F,I,Tt]=a[S];if(f===N+I+1&&p.push(S),N<=f&&f<=N+I&&g===F){g+=Tt+1;break}}if(p.forEach(S=>a.splice(S,1)),g>h)break;const w=n.getCell(f,g);let[b,x]=[0,0];w&&w.merge&&([b,x]=w.merge,a.push([f,g,b,x]));const C=b>0&&f+b===c,v=x>0&&g+x===h;let k={};l==="all"?k={bottom:[t,e],top:[t,e],left:[t,e],right:[t,e]}:l==="inside"?(!v&&g<h&&(k.right=[t,e]),!C&&f<c&&(k.bottom=[t,e])):l==="horizontal"?!C&&f<c&&(k.bottom=[t,e]):l==="vertical"?!v&&g<h&&(k.right=[t,e]):l==="outside"&&d&&(r===f&&(k.top=[t,e]),(C||c===f)&&(k.bottom=[t,e]),o===g&&(k.left=[t,e]),(v||h===g)&&(k.right=[t,e])),Object.keys(k).length>0&&J.call(this,f,g,k),g+=x}}else if(l==="top"||l==="bottom")for(let a=o;a<=h;a+=1)l==="top"&&(J.call(this,r,a,{top:[t,e]}),a+=n.getCellMerge(r,a)[1]),l==="bottom"&&(J.call(this,c,a,{bottom:[t,e]}),a+=n.getCellMerge(c,a)[1]);else if(l==="left"||l==="right")for(let a=r;a<=c;a+=1)l==="left"&&(J.call(this,a,o,{left:[t,e]}),a+=n.getCellMerge(a,o)[0]),l==="right"&&(J.call(this,a,h,{right:[t,e]}),a+=n.getCellMerge(a,h)[0])}}function ws(l,t){const{rows:e}=this,s=this.freezeTotalHeight();let i=e.height;s+e.height<l&&(i-=t);const n=this.exceptRowSet;let r=0,o=i,{height:c}=e;for(;r<e.len&&!(o>l);r+=1)n.has(r)||(c=e.getHeight(r),o+=c);return o-=c,o<=0?{ri:-1,top:0,height:c}:{ri:r-1,top:o,height:c}}function bs(l,t){const{cols:e}=this,s=this.freezeTotalWidth();let i=e.indexWidth;s+e.indexWidth<l&&(i-=t);const[n,r,o]=z.rangeReduceIf(0,e.len,i,e.indexWidth,l,c=>e.getWidth(c));return r<=0?{ci:-1,left:0,width:e.indexWidth}:{ci:n-1,left:r,width:o}}class xs{constructor(t,e){this.settings=z.merge(fs,e||{}),this.name=t||"sheet",this.freeze=[0,0],this.styles=[],this.merges=new zt,this.rows=new cs(this.settings.row),this.cols=new hs(this.settings.col),this.validations=new ds,this.hyperlinks={},this.comments={},this.selector=new Ze,this.scroll=new Je,this.history=new Ge,this.clipboard=new Qe,this.autoFilter=new ts,this.change=()=>{},this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map}addValidation(t,e,s){this.changeData(()=>{this.validations.add(t,e,s)})}removeValidation(){const{range:t}=this.selector;this.changeData(()=>{this.validations.remove(t)})}getSelectedValidator(){const{ri:t,ci:e}=this.selector,s=this.validations.get(t,e);return s?s.validator:null}getSelectedValidation(){const{ri:t,ci:e,range:s}=this.selector,i=this.validations.get(t,e),n={ref:s.toString()};return i!==null&&(n.mode=i.mode,n.validator=i.validator),n}canUndo(){return this.history.canUndo()}canRedo(){return this.history.canRedo()}undo(){this.history.undo(this.getData(),t=>{this.setData(t)})}redo(){this.history.redo(this.getData(),t=>{this.setData(t)})}copy(){this.clipboard.copy(this.selector.range)}copyToSystemClipboard(t){let e=[];const{sri:s,eri:i,sci:n,eci:r}=this.selector.range;for(let o=s;o<=i;o+=1){const c=[];for(let h=n;h<=r;h+=1){const d=this.getCell(o,h);c.push(d&&d.text||"")}e.push(c)}e=e.map(o=>o.join(" ")).join(`
13
+ `),t&&(t.clipboardData.clearData(),t.clipboardData.setData("text/plain",e),t.preventDefault()),navigator.clipboard&&navigator.clipboard.writeText(e).then(()=>{},o=>{console.log("text copy to the system clipboard error ",e,o)})}cut(){this.clipboard.cut(this.selector.range)}paste(t="all",e=()=>{}){const{clipboard:s,selector:i}=this;return s.isClear()||!ce.call(this,s.range,i.range,e)?!1:(this.changeData(()=>{s.isCopy()?he.call(this,s.range,i.range,t):s.isCut()&&ps.call(this,s.range,i.range)}),!0)}pasteFromSystemClipboard(t,e){const{selector:s}=this;navigator.clipboard.readText().then(i=>{const n=this.parseClipboardContent(i);let r=s.ri;n.forEach(o=>{let c=s.ci;o.forEach(h=>{this.setCellText(r,c,h,"input"),c+=1}),r+=1}),t(),e(this.rows.getData())})}parseClipboardContent(t){const e=[],s=t.split(`
14
+ `);let i=0;return s.forEach(n=>{e[i]=n.split(" "),i+=1}),e}pasteFromText(t){let e=[];if(/\r\n/.test(t)?e=t.split(`\r
15
+ `).map(s=>s.replace(/"/g,"").split(" ")):e=t.split(`
16
+ `).map(s=>s.replace(/"/g,"").split(" ")),e.length){const{rows:s,selector:i}=this;this.changeData(()=>{s.paste(e,i.range)})}}autofill(t,e,s=()=>{}){const i=this.selector.range;return ce.call(this,i,t,s)?(this.changeData(()=>{he.call(this,i,t,e,!0)}),!0):!1}clearClipboard(){this.clipboard.clear()}calSelectedRangeByEnd(t,e){const{selector:s,rows:i,cols:n,merges:r}=this;let{sri:o,sci:c,eri:h,eci:d}=s.range;const a=s.ri,f=s.ci;let[g,p]=[t,e];return t<0&&(g=i.len-1),e<0&&(p=n.len-1),g>a?[o,h]=[a,g]:[o,h]=[g,a],p>f?[c,d]=[f,p]:[c,d]=[p,f],s.range=r.union(new $(o,c,h,d)),s.range=r.union(s.range),s.range}calSelectedRangeByStart(t,e){const{selector:s,rows:i,cols:n,merges:r}=this;let o=r.getFirstIncludes(t,e);return o===null&&(o=new $(t,e,t,e),t===-1&&(o.sri=0,o.eri=i.len-1),e===-1&&(o.sci=0,o.eci=n.len-1)),s.range=o,o}setSelectedCellAttr(t,e){this.changeData(()=>{const{selector:s,styles:i,rows:n}=this;if(t==="merge")e?this.merge():this.unmerge();else if(t==="border")ms.call(this,e);else if(t==="formula"){const{ri:r,ci:o,range:c}=s;if(s.multiple()){const[h,d]=s.size(),{sri:a,sci:f,eri:g,eci:p}=c;if(h>1)for(let w=f;w<=p;w+=1){const b=n.getCellOrNew(g+1,w);b.text=`=${e}(${P(w,a)}:${P(w,g)})`}else if(d>1){const w=n.getCellOrNew(r,p+1);w.text=`=${e}(${P(f,r)}:${P(p,r)})`}}else{const h=n.getCellOrNew(r,o);h.text=`=${e}()`}}else s.range.each((r,o)=>{const c=n.getCellOrNew(r,o);let h={};if(c.style!==void 0&&(h=z.cloneDeep(i[c.style])),t==="format")h.format=e,c.style=this.addStyle(h);else if(t==="font-bold"||t==="font-italic"||t==="font-name"||t==="font-size"){const d={};d[t.split("-")[1]]=e,h.font=Object.assign(h.font||{},d),c.style=this.addStyle(h)}else t==="strike"||t==="textwrap"||t==="underline"||t==="align"||t==="valign"||t==="color"||t==="bgcolor"?(h[t]=e,c.style=this.addStyle(h)):c[t]=e})})}setSelectedCellText(t,e="input"){const{autoFilter:s,selector:i,rows:n}=this,{ri:r,ci:o}=i;let c=r;this.unsortedRowMap.has(r)&&(c=this.unsortedRowMap.get(r));const h=n.getCell(c,o),d=h?h.text:"";if(this.setCellText(c,o,t,e),s.active()){const a=s.getFilter(o);if(a){const f=a.value.findIndex(g=>g===d);f>=0&&a.value.splice(f,1,t)}}}getSelectedCell(){const{ri:t,ci:e}=this.selector;let s=t;return this.unsortedRowMap.has(t)&&(s=this.unsortedRowMap.get(t)),this.rows.getCell(s,e)}xyInSelectedRect(t,e){const{left:s,top:i,width:n,height:r}=this.getSelectedRect(),o=t-this.cols.indexWidth,c=e-this.rows.height;return o>s&&o<s+n&&c>i&&c<i+r}getSelectedRect(){return this.getRect(this.selector.range)}getClipboardRect(){const{clipboard:t}=this;return t.isClear()?{left:-100,top:-100}:this.getRect(t.range)}getRect(t){const{scroll:e,rows:s,cols:i,exceptRowSet:n}=this,{sri:r,sci:o,eri:c,eci:h}=t;if(r<0&&o<0)return{left:0,l:0,top:0,t:0,scroll:e};const d=i.sumWidth(0,o),a=s.sumHeight(0,r,n),f=s.sumHeight(r,c+1,n),g=i.sumWidth(o,h+1);let p=d-e.x,w=a-e.y;const b=this.freezeTotalHeight(),x=this.freezeTotalWidth();return x>0&&x>d&&(p=d),b>0&&b>a&&(w=a),{l:d,t:a,left:p,top:w,height:f,width:g,scroll:e}}getCellRectByXY(t,e){const{scroll:s,merges:i,rows:n,cols:r}=this;let{ri:o,top:c,height:h}=ws.call(this,e,s.y),{ci:d,left:a,width:f}=bs.call(this,t,s.x);if(d===-1&&(f=r.totalWidth()),o===-1&&(h=n.totalHeight()),o>=0||d>=0){const g=i.getFirstIncludes(o,d);g&&(o=g.sri,d=g.sci,{left:a,top:c,width:f,height:h}=this.cellRect(o,d))}return{ri:o,ci:d,left:a,top:c,width:f,height:h}}isSingleSelected(){const{sri:t,sci:e,eri:s,eci:i}=this.selector.range,n=this.getCell(t,e);if(n&&n.merge){const[r,o]=n.merge;if(t+r===s&&e+o===i)return!0}return!this.selector.multiple()}canUnmerge(){const{sri:t,sci:e,eri:s,eci:i}=this.selector.range,n=this.getCell(t,e);if(n&&n.merge){const[r,o]=n.merge;if(t+r===s&&e+o===i)return!0}return!1}merge(){const{selector:t,rows:e}=this;if(this.isSingleSelected())return;const[s,i]=t.size();if(s>1||i>1){const{sri:n,sci:r}=t.range;this.changeData(()=>{const o=e.getCellOrNew(n,r);o.merge=[s-1,i-1],this.merges.add(t.range),this.rows.deleteCells(t.range),this.rows.setCell(n,r,o)})}}unmerge(){const{selector:t}=this;if(!this.isSingleSelected())return;const{sri:e,sci:s}=t.range;this.changeData(()=>{this.rows.deleteCell(e,s,"merge"),this.merges.deleteWithin(t.range)})}canAutofilter(){return!this.autoFilter.active()}autofilter(){const{autoFilter:t,selector:e}=this;this.changeData(()=>{t.active()?(t.clear(),this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map):t.ref=e.range.toString()})}setAutoFilter(t,e,s,i){const{autoFilter:n}=this;n.addFilter(t,s,i),n.setSort(t,e),this.resetAutoFilter()}resetAutoFilter(){const{autoFilter:t,rows:e}=this;if(!t.active())return;const{sort:s}=t,{rset:i,fset:n}=t.filteredRows((c,h)=>e.getCell(c,h)),r=Array.from(n),o=Array.from(n);s&&r.sort((c,h)=>s.order==="asc"?c-h:s.order==="desc"?h-c:0),this.exceptRowSet=i,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,r.forEach((c,h)=>{this.sortedRowMap.set(o[h],c),this.unsortedRowMap.set(c,o[h])})}deleteCell(t="all"){const{selector:e}=this;this.changeData(()=>{this.rows.deleteCells(e.range,t),(t==="all"||t==="format")&&this.merges.deleteWithin(e.range)})}insert(t,e=1){this.changeData(()=>{const{sri:s,sci:i}=this.selector.range,{rows:n,merges:r,cols:o}=this;let c=s;t==="row"?n.insert(s,e):t==="column"&&(n.insertColumn(i,e),c=i,o.len+=e,Object.keys(o._).reverse().forEach(h=>{const d=parseInt(h,10);d>=i&&(o._[d+e]=o._[d],delete o._[d])})),r.shift(t,c,e,(h,d,a,f)=>{const g=n.getCell(h,d);g.merge[0]+=a,g.merge[1]+=f})})}delete(t){this.changeData(()=>{const{rows:e,merges:s,selector:i,cols:n}=this,{range:r}=i,{sri:o,sci:c,eri:h,eci:d}=i.range,[a,f]=i.range.size();let g=o,p=a;t==="row"?e.delete(o,h):t==="column"&&(e.deleteColumn(c,d),g=r.sci,p=f,n.len-=d-c+1,Object.keys(n._).forEach(w=>{const b=parseInt(w,10);b>=c&&(b>d&&(n._[b-(d-c+1)]=n._[b]),delete n._[b])})),s.shift(t,g,-p,(w,b,x,C)=>{const v=e.getCell(w,b);v.merge[0]+=x,v.merge[1]+=C,v.merge[0]===0&&v.merge[1]===0&&delete v.merge})})}scrollx(t,e){const{scroll:s,freeze:i,cols:n}=this,[,r]=i,[o,c,h]=z.rangeReduceIf(r,n.len,0,0,t,a=>n.getWidth(a));let d=c;t>0&&(d+=h),s.x!==d&&(s.ci=t>0?o:0,s.x=d,e())}scrolly(t,e){const{scroll:s,freeze:i,rows:n}=this,[r]=i,[o,c,h]=z.rangeReduceIf(r,n.len,0,0,t,a=>n.getHeight(a));let d=c;t>0&&(d+=h),s.y!==d&&(s.ri=t>0?o:0,s.y=d,e())}cellRect(t,e){const{rows:s,cols:i}=this,n=i.sumWidth(0,e),r=s.sumHeight(0,t),o=s.getCell(t,e);let c=i.getWidth(e),h=s.getHeight(t);if(o!==null&&o.merge){const[d,a]=o.merge;if(d>0)for(let f=1;f<=d;f+=1)h+=s.getHeight(t+f);if(a>0)for(let f=1;f<=a;f+=1)c+=i.getWidth(e+f)}return{left:n,top:r,width:c,height:h,cell:o}}getCell(t,e){return this.rows.getCell(t,e)}getCellTextOrDefault(t,e){const s=this.getCell(t,e);return s&&s.text?s.text:""}getCellStyle(t,e){const s=this.getCell(t,e);return s&&s.style!==void 0?this.styles[s.style]:null}getCellStyleOrDefault(t,e){const{styles:s,rows:i}=this,n=i.getCell(t,e),r=n&&n.style!==void 0?s[n.style]:{};return z.merge(this.defaultStyle(),r)}getSelectedCellStyle(){const{ri:t,ci:e}=this.selector;return this.getCellStyleOrDefault(t,e)}setCellText(t,e,s,i){const{rows:n,history:r,validations:o}=this;i==="finished"?(n.setCellText(t,e,""),r.add(this.getData()),n.setCellText(t,e,s)):(n.setCellText(t,e,s),this.change(this.getData())),o.validate(t,e,s)}freezeIsActive(){const[t,e]=this.freeze;return t>0||e>0}setFreeze(t,e){this.changeData(()=>{this.freeze=[t,e]})}freezeTotalWidth(){return this.cols.sumWidth(0,this.freeze[1])}freezeTotalHeight(){return this.rows.sumHeight(0,this.freeze[0])}setRowHeight(t,e){this.changeData(()=>{this.rows.setHeight(t,e)})}setColWidth(t,e){this.changeData(()=>{this.cols.setWidth(t,e)})}viewHeight(){const{view:t,showToolbar:e,showBottomBar:s}=this.settings;let i=t.height();return s&&(i-=gs),e&&(i-=us),i}viewWidth(){return this.settings.view.width()}freezeViewRange(){const[t,e]=this.freeze;return new $(0,0,t-1,e-1,this.freezeTotalWidth(),this.freezeTotalHeight())}contentRange(){const{rows:t,cols:e}=this,[s,i]=t.maxCell(),n=t.sumHeight(0,s+1),r=e.sumWidth(0,i+1);return new $(0,0,s,i,r,n)}exceptRowTotalHeight(t,e){const{exceptRowSet:s,rows:i}=this,n=Array.from(s);let r=0;return n.forEach(o=>{if(o<t||o>e){const c=i.getHeight(o);r+=c}}),r}viewRange(){const{scroll:t,rows:e,cols:s,freeze:i,exceptRowSet:n}=this;let{ri:r,ci:o}=t;r<=0&&([r]=i),o<=0&&([,o]=i);let[c,h]=[0,0],[d,a]=[e.len,s.len];for(let f=r;f<e.len&&(n.has(f)||(h+=e.getHeight(f),d=f),!(h>this.viewHeight()));f+=1);for(let f=o;f<s.len&&(c+=s.getWidth(f),a=f,!(c>this.viewWidth()));f+=1);return new $(r,o,d,a,c,h)}eachMergesInView(t,e){this.merges.filterIntersects(t).forEach(s=>e(s))}hideRowsOrCols(){const{rows:t,cols:e,selector:s}=this,[i,n]=s.size(),{sri:r,sci:o,eri:c,eci:h}=s.range;if(i===t.len)for(let d=o;d<=h;d+=1)e.setHide(d,!0);else if(n===e.len)for(let d=r;d<=c;d+=1)t.setHide(d,!0)}unhideRowsOrCols(t,e){this[`${t}s`].unhide(e)}rowEach(t,e,s){let i=0;const{rows:n}=this,r=this.exceptRowSet,o=[...r];let c=0;for(let h=0;h<o.length;h+=1)o[h]<t&&(c+=1);for(let h=t+c;h<=e+c;h+=1)if(r.has(h))c+=1;else{const d=n.getHeight(h);if(d>0&&(s(h,i,d),i+=d,i>this.viewHeight()))break}}colEach(t,e,s){let i=0;const{cols:n}=this;for(let r=t;r<=e;r+=1){const o=n.getWidth(r);if(o>0&&(s(r,i,o),i+=o,i>this.viewWidth()))break}}defaultStyle(){return this.settings.style}addStyle(t){const{styles:e}=this;for(let s=0;s<e.length;s+=1){const i=e[s];if(z.equals(i,t))return s}return e.push(t),e.length-1}changeData(t){this.history.add(this.getData()),t(),this.change(this.getData())}setData(t){return Object.keys(t).forEach(e=>{if(e==="merges"||e==="rows"||e==="cols"||e==="validations")this[e].setData(t[e]);else if(e==="freeze"){const[s,i]=B(t[e]);this.freeze=[i,s]}else e==="autofilter"?this.autoFilter.setData(t[e]):t[e]!==void 0&&(this[e]=t[e])}),this}getData(){const{name:t,freeze:e,styles:s,merges:i,rows:n,cols:r,validations:o,autoFilter:c}=this;return{name:t,freeze:P(e[1],e[0]),styles:s,merges:i.getData(),rows:n.getData(),cols:r.getData(),validations:o.getData(),autofilter:c.getData()}}}function A(l,t,e){l.addEventListener(t,e)}function dt(l,t,e){l.removeEventListener(t,e)}function G(l){l.xclickoutside&&(dt(window.document.body,"click",l.xclickoutside),delete l.xclickoutside)}function it(l,t){l.xclickoutside=e=>{e.detail===2||l.contains(e.target)||(t?t(l):(l.hide(),G(l)))},A(window.document.body,"click",l.xclickoutside)}function ae(l,t,e){A(l,"mousemove",t);const s=l;s.xEvtUp=i=>{dt(l,"mousemove",t),dt(l,"mouseup",l.xEvtUp),e(i)},A(l,"mouseup",l.xEvtUp)}function de(l,t,e,s){let i="";Math.abs(l)>Math.abs(t)?(i=l>0?"right":"left",s(i,l,e)):(i=t>0?"down":"up",s(i,t,e))}function vs(l,{move:t,end:e}){let s=0,i=0;A(l,"touchstart",n=>{const{pageX:r,pageY:o}=n.touches[0];s=r,i=o}),A(l,"touchmove",n=>{if(!t)return;const{pageX:r,pageY:o}=n.changedTouches[0],c=r-s,h=o-i;(Math.abs(c)>10||Math.abs(h)>10)&&(de(c,h,n,t),s=r,i=o),n.preventDefault()}),A(l,"touchend",n=>{if(!e)return;const{pageX:r,pageY:o}=n.changedTouches[0],c=r-s,h=o-i;de(c,h,n,e)})}function ys(){const l=new Map;function t(r,o){const c=()=>{const d=l.get(r);return Array.isArray(d)&&d.push(o)||!1},h=()=>l.set(r,[].concat(o));return l.has(r)&&c()||h()}function e(r,o){const c=()=>{const h=l.get(r);for(const d of h)d.call(null,...o)};return l.has(r)&&c()}function s(r,o){const c=()=>{const h=l.get(r),d=h.indexOf(o);return d>=0&&h.splice(d,1)&&l.get(r).length===0&&l.delete(r)};return l.has(r)&&c()}function i(r,o){const c=(...h)=>{o.call(null,...h),s(r,c)};return t(r,c)}function n(){l.clear()}return{get current(){return l},on:t,once:i,fire:e,removeListener:s,removeAllListeners:n}}const m="x-spreadsheet";class fe{constructor(t=!1,e){this.moving=!1,this.vertical=t,this.el=u("div",`${m}-resizer ${t?"vertical":"horizontal"}`).children(this.unhideHoverEl=u("div",`${m}-resizer-hover`).on("dblclick.stop",s=>this.mousedblclickHandler(s)).css("position","absolute").hide(),this.hoverEl=u("div",`${m}-resizer-hover`).on("mousedown.stop",s=>this.mousedownHandler(s)),this.lineEl=u("div",`${m}-resizer-line`).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=e,this.unhideFn=()=>{}}showUnhide(t){this.unhideIndex=t,this.unhideHoverEl.show()}hideUnhide(){this.unhideHoverEl.hide()}show(t,e){const{moving:s,vertical:i,hoverEl:n,lineEl:r,el:o,unhideHoverEl:c}=this;if(s)return;this.cRect=t;const{left:h,top:d,width:a,height:f}=t;o.offset({left:i?h+a-5:h,top:i?d:d+f-5}).show(),n.offset({width:i?5:a,height:i?f:5}),r.offset({width:i?0:e.width,height:i?e.height:0}),c.offset({left:i?5-a:h,top:i?d:5-f,width:i?5:a,height:i?f:5})}hide(){this.el.offset({left:0,top:0}).hide(),this.hideUnhide()}mousedblclickHandler(){this.unhideIndex&&this.unhideFn(this.unhideIndex)}mousedownHandler(t){let e=t;const{el:s,lineEl:i,cRect:n,vertical:r,minDistance:o}=this;let c=r?n.width:n.height;i.show(),ae(window,h=>{this.moving=!0,e!==null&&h.buttons===1&&(r?(c+=h.movementX,c>o&&s.css("left",`${n.left+c}px`)):(c+=h.movementY,c>o&&s.css("top",`${n.top+c}px`)),e=h)},()=>{e=null,i.hide(),this.moving=!1,this.hide(),this.finishedFn&&(c<o&&(c=o),this.finishedFn(n,c))})}}class ue{constructor(t){this.vertical=t,this.moveFn=null,this.el=u("div",`${m}-scrollbar ${t?"vertical":"horizontal"}`).child(this.contentEl=u("div","")).on("mousemove.stop",()=>{}).on("scroll.stop",e=>{const{scrollTop:s,scrollLeft:i}=e.target;this.moveFn&&this.moveFn(this.vertical?s:i,e)})}move(t){return this.el.scroll(t),this}scroll(){return this.el.scroll()}set(t,e){const s=t-1;if(e>s){const i=this.vertical?"height":"width";this.el.css(i,`${s-15}px`).show(),this.contentEl.css(this.vertical?"width":"height","1px").css(i,`${e}px`)}else this.el.hide();return this}}const ft=2*2-1;let Mt=10;class ut{constructor(t=!1,e=!0){this.useHideInput=t,this.autoFocus=e,this.inputChange=()=>{},this.cornerEl=u("div",`${m}-selector-corner`),this.areaEl=u("div",`${m}-selector-area`).child(this.cornerEl).hide(),this.clipboardEl=u("div",`${m}-selector-clipboard`).hide(),this.autofillEl=u("div",`${m}-selector-autofill`).hide(),this.el=u("div",`${m}-selector`).css("z-index",`${Mt}`).children(this.areaEl,this.clipboardEl,this.autofillEl).hide(),t&&(this.hideInput=u("input","").on("compositionend",s=>{this.inputChange(s.target.value)}),this.el.child(this.hideInputDiv=u("div","hide-input").child(this.hideInput)),this.el.child(this.hideInputDiv=u("div","hide-input").child(this.hideInput))),Mt+=1}setOffset(t){return this.el.offset(t).show(),this}hide(){return this.el.hide(),this}setAreaOffset(t){const{left:e,top:s,width:i,height:n}=t,r={width:i-ft+.8,height:n-ft+.8,left:e-.8,top:s-.8};this.areaEl.offset(r).show(),this.useHideInput&&(this.hideInputDiv.offset(r),this.autoFocus?this.hideInput.val("").focus():this.hideInput.val(""))}setClipboardOffset(t){const{left:e,top:s,width:i,height:n}=t;this.clipboardEl.offset({left:e,top:s,width:i-5,height:n-5})}showAutofill(t){const{left:e,top:s,width:i,height:n}=t;this.autofillEl.offset({width:i-ft,height:n-ft,left:e,top:s}).show()}hideAutofill(){this.autofillEl.hide()}showClipboard(){this.clipboardEl.show()}hideClipboard(){this.clipboardEl.hide()}}function Ht(l){const{data:t}=this,{left:e,top:s,width:i,height:n,scroll:r,l:o,t:c}=l,h=t.freezeTotalWidth(),d=t.freezeTotalHeight();let a=e-h;h>o&&(a-=r.x);let f=s-d;return d>c&&(f-=r.y),{left:a,top:f,width:i,height:n}}function Wt(l){const{data:t}=this,{left:e,width:s,height:i,l:n,t:r,scroll:o}=l,c=t.freezeTotalWidth();let h=e-c;return c>n&&(h-=o.x),{left:h,top:r,width:s,height:i}}function Nt(l){const{data:t}=this,{top:e,width:s,height:i,l:n,t:r,scroll:o}=l,c=t.freezeTotalHeight();let h=e-c;return c>r&&(h-=o.y),{left:n,top:h,width:s,height:i}}function Pt(l){const{br:t}=this;t.setAreaOffset(Ht.call(this,l))}function ks(l){const{tl:t}=this;t.setAreaOffset(l)}function ge(l){const{t}=this;t.setAreaOffset(Wt.call(this,l))}function pe(l){const{l:t}=this;t.setAreaOffset(Nt.call(this,l))}function me(l){const{l:t}=this;t.setClipboardOffset(Nt.call(this,l))}function Vt(l){const{br:t}=this;t.setClipboardOffset(Ht.call(this,l))}function Cs(l){const{tl:t}=this;t.setClipboardOffset(l)}function we(l){const{t}=this;t.setClipboardOffset(Wt.call(this,l))}function be(l){Pt.call(this,l),ks.call(this,l),ge.call(this,l),pe.call(this,l)}function xe(l){Vt.call(this,l),Cs.call(this,l),we.call(this,l),me.call(this,l)}class Es{constructor(t){const{autoFocus:e}=t.settings;this.inputChange=()=>{},this.data=t,this.br=new ut(!0,e),this.t=new ut,this.l=new ut,this.tl=new ut,this.br.inputChange=s=>{this.inputChange(s)},this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=u("div",`${m}-selectors`).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,Mt+=1}resetData(t){this.data=t,this.range=t.selector.range,this.resetAreaOffset()}hide(){this.el.hide()}resetOffset(){const{data:t,tl:e,t:s,l:i,br:n}=this,r=t.freezeTotalHeight(),o=t.freezeTotalWidth();r>0||o>0?(e.setOffset({width:o,height:r}),s.setOffset({left:o,height:r}),i.setOffset({top:r,width:o}),n.setOffset({left:o,top:r})):(e.hide(),s.hide(),i.hide(),n.setOffset({left:0,top:0}))}resetAreaOffset(){const t=this.data.getSelectedRect(),e=this.data.getClipboardRect();be.call(this,t),xe.call(this,e),this.resetOffset()}resetBRTAreaOffset(){const t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Pt.call(this,t),ge.call(this,t),Vt.call(this,e),we.call(this,e),this.resetOffset()}resetBRLAreaOffset(){const t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Pt.call(this,t),pe.call(this,t),Vt.call(this,e),me.call(this,e),this.resetOffset()}set(t,e,s=!0){const{data:i}=this,n=i.calSelectedRangeByStart(t,e),{sri:r,sci:o}=n;if(s){let[c,h]=[t,e];t<0&&(c=0),e<0&&(h=0),i.selector.setIndexes(c,h),this.indexes=[c,h]}this.moveIndexes=[r,o],this.range=n,this.resetAreaOffset(),this.el.show()}setEnd(t,e,s=!0){const{data:i,lastri:n,lastci:r}=this;if(s){if(t===n&&e===r)return;this.lastri=t,this.lastci=e}this.range=i.calSelectedRangeByEnd(t,e),be.call(this,this.data.getSelectedRect())}reset(){const{eri:t,eci:e}=this.data.selector.range;this.setEnd(t,e)}showAutofill(t,e){if(t===-1&&e===-1)return;const{sri:s,sci:i,eri:n,eci:r}=this.range,[o,c]=[t,e],h=s-t,d=i-e,a=n-t,f=r-e;if(d>0)this.arange=new $(s,c,n,i-1);else if(h>0)this.arange=new $(o,i,s-1,r);else if(f<0)this.arange=new $(s,r+1,n,c);else if(a<0)this.arange=new $(n+1,i,o,r);else{this.arange=null;return}if(this.arange!==null){const g=this.data.getRect(this.arange);g.width+=2,g.height+=2;const{br:p,l:w,t:b,tl:x}=this;p.showAutofill(Ht.call(this,g)),w.showAutofill(Nt.call(this,g)),b.showAutofill(Wt.call(this,g)),x.showAutofill(g)}}hideAutofill(){["br","l","t","tl"].forEach(t=>{this[t].hideAutofill()})}showClipboard(){const t=this.data.getClipboardRect();xe.call(this,t),["br","l","t","tl"].forEach(e=>{this[e].showClipboard()})}hideClipboard(){["br","l","t","tl"].forEach(t=>{this[t].hideClipboard()})}}function Ss(l){l.preventDefault(),l.stopPropagation();const{filterItems:t}=this;t.length<=0||(this.itemIndex>=0&&t[this.itemIndex].toggle(),this.itemIndex-=1,this.itemIndex<0&&(this.itemIndex=t.length-1),t[this.itemIndex].toggle())}function $s(l){l.stopPropagation();const{filterItems:t}=this;t.length<=0||(this.itemIndex>=0&&t[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>t.length-1&&(this.itemIndex=0),t[this.itemIndex].toggle())}function ve(l){l.preventDefault();const{filterItems:t}=this;t.length<=0||(l.stopPropagation(),this.itemIndex<0&&(this.itemIndex=0),t[this.itemIndex].el.click(),this.hide())}function Ts(l){const{keyCode:t}=l;switch(l.ctrlKey&&l.stopPropagation(),t){case 37:l.stopPropagation();break;case 38:Ss.call(this,l);break;case 39:l.stopPropagation();break;case 40:$s.call(this,l);break;case 13:ve.call(this,l);break;case 9:ve.call(this,l);break;default:l.stopPropagation();break}}class ye{constructor(t,e,s="200px"){this.filterItems=[],this.items=t,this.el=u("div",`${m}-suggest`).css("width",s).hide(),this.itemClick=e,this.itemIndex=-1}setOffset(t){this.el.cssRemoveKeys("top","bottom").offset(t)}hide(){const{el:t}=this;this.filterItems=[],this.itemIndex=-1,t.hide(),G(this.el.parent())}setItems(t){this.items=t}search(t){let{items:e}=this;if(/^\s*$/.test(t)||(e=e.filter(i=>(i.key||i).startsWith(t.toUpperCase()))),e=e.map(i=>{let{title:n}=i;n?typeof n=="function"&&(n=n()):n=i;const r=u("div",`${m}-item`).child(n).on("click.stop",()=>{this.itemClick(i),this.hide()});return i.label&&r.child(u("div","label").html(i.label)),r}),this.filterItems=e,e.length<=0)return;const{el:s}=this;s.html("").children(...e).show(),it(s.parent(),()=>{this.hide()})}bindInputEvents(t){t.on("keydown",e=>Ts.call(this,e))}}class D extends j{constructor(t){super("div",`${m}-icon`),this.iconNameEl=u("div",`${m}-icon-img ${t}`),this.child(this.iconNameEl)}setName(t){this.iconNameEl.className(`${m}-icon-img ${t}`)}}function ke(l,t){l.setMonth(l.getMonth()+t)}function Ds(l,t){const e=new Date(l);return e.setDate(t-l.getDay()+1),e}function As(l,t,e){const s=new Date(l,t,1,23,59,59),i=[[],[],[],[],[],[]];for(let n=0;n<6;n+=1)for(let r=0;r<7;r+=1){const o=n*7+r,c=Ds(s,o),h=c.getMonth()!==t,d=c.getMonth()===e.getMonth()&&c.getDate()===e.getDate();i[n][r]={d:c,disabled:h,active:d}}return i}class Os{constructor(t){this.value=t,this.cvalue=new Date(t),this.headerLeftEl=u("div","calendar-header-left"),this.bodyEl=u("tbody",""),this.buildAll(),this.el=u("div","x-spreadsheet-calendar").children(u("div","calendar-header").children(this.headerLeftEl,u("div","calendar-header-right").children(u("a","calendar-prev").on("click.stop",()=>this.prev()).child(new D("chevron-left")),u("a","calendar-next").on("click.stop",()=>this.next()).child(new D("chevron-right")))),u("table","calendar-body").children(u("thead","").child(u("tr","").children(...T("calendar.weeks").map(e=>u("th","cell").child(e)))),this.bodyEl)),this.selectChange=()=>{}}setValue(t){this.value=t,this.cvalue=new Date(t),this.buildAll()}prev(){const{value:t}=this;ke(t,-1),this.buildAll()}next(){const{value:t}=this;ke(t,1),this.buildAll()}buildAll(){this.buildHeaderLeft(),this.buildBody()}buildHeaderLeft(){const{value:t}=this;this.headerLeftEl.html(`${T("calendar.months")[t.getMonth()]} ${t.getFullYear()}`)}buildBody(){const{value:t,cvalue:e,bodyEl:s}=this,n=As(t.getFullYear(),t.getMonth(),e).map(r=>{const o=r.map(c=>{let h="cell";return c.disabled&&(h+=" disabled"),c.active&&(h+=" active"),u("td","").child(u("div",h).on("click.stop",()=>{this.selectChange(c.d)}).child(c.d.getDate().toString()))});return u("tr","").children(...o)});s.html("").children(...n)}}class zs{constructor(){this.calendar=new Os(new Date),this.el=u("div",`${m}-datepicker`).child(this.calendar.el).hide()}setValue(t){const{calendar:e}=this;return typeof t=="string"?/^\d{4}-\d{1,2}-\d{1,2}$/.test(t)&&e.setValue(new Date(t.replace(new RegExp("-","g"),"/"))):t instanceof Date&&e.setValue(t),this}change(t){this.calendar.selectChange=e=>{t(e),this.hide()}}show(){this.el.show()}hide(){this.el.hide()}}function gt(){const{inputText:l}=this;if(!/^\s*$/.test(l)){const{textlineEl:t,textEl:e,areaOffset:s}=this,i=l.split(`
17
+ `),n=Math.max(...i.map(a=>a.length)),o=t.offset().width/l.length,c=(n+1)*o+5,h=this.viewFn().width-s.left-o;let d=i.length;if(c>s.width){let a=c;c>h&&(a=h,d+=parseInt(c/h,10),d+=c%h>0?1:0),e.css("width",`${a}px`)}d*=this.rowHeight,d>s.height&&e.css("height",`${d}px`)}}function Is({target:l},t){const{value:e,selectionEnd:s}=l,i=`${e.slice(0,s)}${t}${e.slice(s)}`;l.value=i,l.setSelectionRange(s+1,s+1),this.inputText=i,this.textlineEl.html(i),gt.call(this)}function Rs(l){const{keyCode:t,altKey:e}=l;t!==13&&t!==9&&l.stopPropagation(),t===13&&e&&(Is.call(this,l,`
18
+ `),l.stopPropagation()),t===13&&!e&&l.preventDefault()}function Fs(l){const t=l.target.value,{suggest:e,textlineEl:s,validator:i}=this,{cell:n}=this;if(n!==null)if("editable"in n&&n.editable===!0||n.editable===void 0){if(this.inputText=t,i)i.type==="list"?e.search(t):e.hide();else{const r=t.lastIndexOf("=");r!==-1?e.search(t.substring(r+1)):e.hide()}s.html(t),gt.call(this),this.change("input",t)}else l.target.value=n.text||"";else{if(this.inputText=t,i)i.type==="list"?e.search(t):e.hide();else{const r=t.lastIndexOf("=");r!==-1?e.search(t.substring(r+1)):e.hide()}s.html(t),gt.call(this),this.change("input",t)}}function Ms(l){const{el:t}=this.textEl;setTimeout(()=>{t.focus(),t.setSelectionRange(l,l)},0)}function Ce(l,t){const{textEl:e,textlineEl:s}=this;e.el.blur(),e.val(l),s.html(l),Ms.call(this,t)}function Hs(l){const{inputText:t,validator:e}=this;let s=0;if(e&&e.type==="list")this.inputText=l,s=this.inputText.length;else{const i=t.lastIndexOf("="),n=t.substring(0,i+1);let r=t.substring(i+1);r.indexOf(")")!==-1?r=r.substring(r.indexOf(")")):r="",this.inputText=`${n+l.key}(`,s=this.inputText.length,this.inputText+=`)${r}`}Ce.call(this,this.inputText,s)}function Ws(){this.suggest.setItems(this.formulas)}function Ns(l){let t=l.getMonth()+1,e=l.getDate();return t<10&&(t=`0${t}`),e<10&&(e=`0${e}`),`${l.getFullYear()}-${t}-${e}`}class Ps{constructor(t,e,s){this.viewFn=e,this.rowHeight=s,this.formulas=t,this.suggest=new ye(t,i=>{Hs.call(this,i)}),this.datepicker=new zs,this.datepicker.change(i=>{this.setText(Ns(i)),this.clear()}),this.areaEl=u("div",`${m}-editor-area`).children(this.textEl=u("textarea","").on("input",i=>Fs.call(this,i)).on("paste.stop",()=>{}).on("keydown",i=>Rs.call(this,i)),this.textlineEl=u("div","textline"),this.suggest.el,this.datepicker.el).on("mousemove.stop",()=>{}).on("mousedown.stop",()=>{}),this.el=u("div",`${m}-editor`).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=()=>{}}setFreezeLengths(t,e){this.freeze.w=t,this.freeze.h=e}clear(){this.inputText!==""&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.textEl.val(""),this.textlineEl.html(""),Ws.call(this),this.datepicker.hide()}setOffset(t,e="top"){const{textEl:s,areaEl:i,suggest:n,freeze:r,el:o}=this;if(t){this.areaOffset=t;const{left:c,top:h,width:d,height:a,l:f,t:g}=t,p={left:0,top:0};r.w>f&&r.h>g||(r.w<f&&r.h<g?(p.left=r.w,p.top=r.h):r.w>f?p.top=r.h:r.h>g&&(p.left=r.w)),o.offset(p),i.offset({left:c-p.left-.8,top:h-p.top-.8}),s.offset({width:d-9+.8,height:a-3+.8});const w={left:0};w[e]=a,n.setOffset(w),n.hide()}}setCell(t,e){if(t&&t.editable===!1)return;const{el:s,datepicker:i,suggest:n}=this;s.show(),this.cell=t;const r=t&&t.text||"";if(this.setText(r),this.validator=e,e){const{type:o}=e;o==="date"&&(i.show(),/^\s*$/.test(r)||i.setValue(r)),o==="list"&&(n.setItems(e.values()),n.search(""))}}setText(t){this.inputText=t,Ce.call(this,t,t.length),gt.call(this)}}class Y extends j{constructor(t,e=""){super("div",`${m}-button ${e}`),this.child(T(`button.${t}`))}}function pt(){return window.devicePixelRatio||1}function Bt(){return pt()-.5}function y(l){return parseInt(l*pt(),10)}function Q(l){const t=y(l);return t>0?t-.5:.5}class Vs{constructor(t,e,s,i,n=0){this.x=t,this.y=e,this.width=s,this.height=i,this.padding=n,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null}setBorders({top:t,bottom:e,left:s,right:i}){t&&(this.borderTop=t),i&&(this.borderRight=i),e&&(this.borderBottom=e),s&&(this.borderLeft=s)}innerWidth(){return this.width-this.padding*2-2}innerHeight(){return this.height-this.padding*2-2}textx(t){const{width:e,padding:s}=this;let{x:i}=this;return t==="left"?i+=s:t==="center"?i+=e/2:t==="right"&&(i+=e-s),i}texty(t,e){const{height:s,padding:i}=this;let{y:n}=this;return t==="top"?n+=i:t==="middle"?n+=s/2-e/2:t==="bottom"&&(n+=s-i-e),n}topxys(){const{x:t,y:e,width:s}=this;return[[t,e],[t+s,e]]}rightxys(){const{x:t,y:e,width:s,height:i}=this;return[[t+s,e],[t+s,e+i]]}bottomxys(){const{x:t,y:e,width:s,height:i}=this;return[[t,e+i],[t+s,e+i]]}leftxys(){const{x:t,y:e,height:s}=this;return[[t,e],[t,e+s]]}}function Ee(l,t,e,s,i,n,r){const o={x:0,y:0};l==="underline"?i==="bottom"?o.y=0:i==="top"?o.y=-(n+2):o.y=-n/2:l==="strike"&&(i==="bottom"?o.y=n/2:i==="top"&&(o.y=-(n/2+2))),s==="center"?o.x=r/2:s==="right"&&(o.x=r),this.line([t-o.x,e-o.y],[t-o.x+r,e-o.y])}class Se{constructor(t,e,s){this.el=t,this.ctx=t.getContext("2d"),this.resize(e,s),this.ctx.scale(pt(),pt())}resize(t,e){this.el.style.width=`${t}px`,this.el.style.height=`${e}px`,this.el.width=y(t),this.el.height=y(e)}clear(){const{width:t,height:e}=this.el;return this.ctx.clearRect(0,0,t,e),this}attr(t){return Object.assign(this.ctx,t),this}save(){return this.ctx.save(),this.ctx.beginPath(),this}restore(){return this.ctx.restore(),this}beginPath(){return this.ctx.beginPath(),this}translate(t,e){return this.ctx.translate(y(t),y(e)),this}scale(t,e){return this.ctx.scale(t,e),this}clearRect(t,e,s,i){return this.ctx.clearRect(t,e,s,i),this}fillRect(t,e,s,i){return this.ctx.fillRect(y(t)-.5,y(e)-.5,y(s),y(i)),this}fillText(t,e,s){return this.ctx.fillText(t,y(e),y(s)),this}text(t,e,s={},i=!0){const{ctx:n}=this,{align:r,valign:o,font:c,color:h,strike:d,underline:a}=s,f=e.textx(r);n.save(),n.beginPath(),this.attr({textAlign:r,textBaseline:o,font:`${c.italic?"italic":""} ${c.bold?"bold":""} ${y(c.size)}px ${c.name}`,fillStyle:h,strokeStyle:h});const g=`${t}`.split(`
19
+ `),p=e.innerWidth(),w=[];g.forEach(C=>{const v=n.measureText(C).width;if(i&&v>y(p)){let k={w:0,len:0,start:0};for(let S=0;S<C.length;S+=1)k.w>=y(p)&&(w.push(C.substr(k.start,k.len)),k={w:0,len:0,start:S}),k.len+=1,k.w+=n.measureText(C[S]).width+1;k.len>0&&w.push(C.substr(k.start,k.len))}else w.push(C)});const b=(w.length-1)*(c.size+2);let x=e.texty(o,b);return w.forEach(C=>{const v=n.measureText(C).width;this.fillText(C,f,x),d&&Ee.call(this,"strike",f,x,r,o,c.size,v),a&&Ee.call(this,"underline",f,x,r,o,c.size,v),x+=c.size+2}),n.restore(),this}border(t,e){const{ctx:s}=this;return s.lineWidth=Bt,s.strokeStyle=e,t==="medium"?s.lineWidth=y(2)-.5:t==="thick"?s.lineWidth=y(3):t==="dashed"?s.setLineDash([y(3),y(2)]):t==="dotted"?s.setLineDash([y(1),y(1)]):t==="double"&&s.setLineDash([y(2),0]),this}line(...t){const{ctx:e}=this;if(t.length>1){e.beginPath();const[s,i]=t[0];e.moveTo(Q(s),Q(i));for(let n=1;n<t.length;n+=1){const[r,o]=t[n];e.lineTo(Q(r),Q(o))}e.stroke()}return this}strokeBorders(t){const{ctx:e}=this;e.save();const{borderTop:s,borderRight:i,borderBottom:n,borderLeft:r}=t;s&&(this.border(...s),this.line(...t.topxys())),i&&(this.border(...i),this.line(...t.rightxys())),n&&(this.border(...n),this.line(...t.bottomxys())),r&&(this.border(...r),this.line(...t.leftxys())),e.restore()}dropdown(t){const{ctx:e}=this,{x:s,y:i,width:n,height:r}=t,o=s+n-15,c=i+r-15;e.save(),e.beginPath(),e.moveTo(y(o),y(c)),e.lineTo(y(o+8),y(c)),e.lineTo(y(o+4),y(c+6)),e.closePath(),e.fillStyle="rgba(0, 0, 0, .45)",e.fill(),e.restore()}error(t){const{ctx:e}=this,{x:s,y:i,width:n}=t,r=s+n-1;e.save(),e.beginPath(),e.moveTo(y(r-8),y(i-1)),e.lineTo(y(r),y(i-1)),e.lineTo(y(r),y(i+8)),e.closePath(),e.fillStyle="rgba(255, 0, 0, .65)",e.fill(),e.restore()}frozen(t){const{ctx:e}=this,{x:s,y:i,width:n}=t,r=s+n-1;e.save(),e.beginPath(),e.moveTo(y(r-8),y(i-1)),e.lineTo(y(r),y(i-1)),e.lineTo(y(r),y(i+8)),e.closePath(),e.fillStyle="rgba(0, 255, 0, .85)",e.fill(),e.restore()}rect(t,e){const{ctx:s}=this,{x:i,y:n,width:r,height:o,bgcolor:c}=t;s.save(),s.beginPath(),s.fillStyle=c||"#fff",s.rect(Q(i+1),Q(n+1),y(r-2),y(o-2)),s.clip(),s.fill(),e(),s.restore()}}const $e=[{key:"Arial",title:"Arial"},{key:"Helvetica",title:"Helvetica"},{key:"Source Sans Pro",title:"Source Sans Pro"},{key:"Comic Sans MS",title:"Comic Sans MS"},{key:"Courier New",title:"Courier New"},{key:"Verdana",title:"Verdana"},{key:"Lato",title:"Lato"}],_t=[{pt:7.5,px:10},{pt:8,px:11},{pt:9,px:12},{pt:10,px:13},{pt:10.5,px:14},{pt:11,px:15},{pt:12,px:16},{pt:14,px:18.7},{pt:15,px:20},{pt:16,px:21.3},{pt:18,px:24},{pt:22,px:29.3},{pt:24,px:32},{pt:26,px:34.7},{pt:36,px:48},{pt:42,px:56}];function Bs(l){for(let t=0;t<_t.length;t+=1){const e=_t[t];if(e.pt===l)return e.px}return l}const _s=l=>{const t=[],e=[];let s=[],i=0,n="",r=1,o="";for(let c=0;c<l.length;c+=1){const h=l.charAt(c);if(h!==" "){if(h>="a"&&h<="z")s.push(h.toUpperCase());else if(h>="0"&&h<="9"||h>="A"&&h<="Z"||h===".")s.push(h);else if(h==='"'){for(c+=1;l.charAt(c)!=='"';)s.push(l.charAt(c)),c+=1;e.push(`"${s.join("")}`),s=[]}else if(h==="-"&&/[+\-*/,(]/.test(o))s.push(h);else{if(h!=="("&&s.length>0&&e.push(s.join("")),h===")"){let d=t.pop();if(i===2)try{const[a,f]=B(e.pop()),[g,p]=B(e.pop());let w=0;for(let b=g;b<=a;b+=1)for(let x=p;x<=f;x+=1)e.push(P(b,x)),w+=1;e.push([d,w])}catch{}else if(i===1||i===3)i===3&&e.push(n),e.push([d,r]),r=1;else for(;d!=="("&&(e.push(d),!(t.length<=0));)d=t.pop();i=0}else if(h==="="||h===">"||h==="<"){const d=l.charAt(c+1);n=h,(d==="="||d==="-")&&(n+=d,c+=1),i=3}else if(h===":")i=2;else if(h===",")i===3&&e.push(n),i=1,r+=1;else if(h==="("&&s.length>0)t.push(s.join(""));else{if(t.length>0&&(h==="+"||h==="-")){let d=t[t.length-1];if(d!=="("&&e.push(t.pop()),d==="*"||d==="/")for(;t.length>0&&(d=t[t.length-1],d!=="(");)e.push(t.pop())}else if(t.length>0){const d=t[t.length-1];(d==="*"||d==="/")&&e.push(t.pop())}t.push(h)}s=[]}o=h}}for(s.length>0&&e.push(s.join(""));t.length>0;)e.push(t.pop());return e},Ls=(l,t)=>{const[e]=l;let s=l;if(e==='"')return l.substring(1);let i=1;if(e==="-"&&(s=l.substring(1),i=-1),s[0]>="0"&&s[0]<="9")return i*Number(s);const[n,r]=B(s);return i*t(n,r)},qs=(l,t,e,s)=>{const i=[];for(let n=0;n<l.length;n+=1){const r=l[n],o=r[0];if(r==="+"){const c=i.pop();i.push(U("+",i.pop(),c))}else if(r==="-")if(i.length===1){const c=i.pop();i.push(U("*",c,-1))}else{const c=i.pop();i.push(U("-",i.pop(),c))}else if(r==="*")i.push(U("*",i.pop(),i.pop()));else if(r==="/"){const c=i.pop();i.push(U("/",i.pop(),c))}else if(o==="="||o===">"||o==="<"){let c=i.pop();Number.isNaN(c)||(c=Number(c));let h=i.pop();Number.isNaN(h)||(h=Number(h));let d=!1;o==="="?d=h===c:r===">"?d=h>c:r===">="?d=h>=c:r==="<"?d=h<c:r==="<="&&(d=h<=c),i.push(d)}else if(Array.isArray(r)){const[c,h]=r,d=[];for(let a=0;a<h;a+=1)d.push(i.pop());i.push(t[c].render(d.reverse()))}else{if(s.includes(r))return 0;(o>="a"&&o<="z"||o>="A"&&o<="Z")&&s.push(r),i.push(Ls(r,e)),s.pop()}}return i[0]},Te=(l,t,e,s=[])=>{if(l[0]==="="){const i=_s(l.substring(1));return i.length<=0?l:qs(i,t,(n,r)=>Te(e(n,r),t,e,s),s)}return l},js={render:Te},Lt=[{key:"SUM",title:E("formula.sum"),render:l=>l.reduce((t,e)=>U("+",t,e),0)},{key:"AVERAGE",title:E("formula.average"),render:l=>l.reduce((t,e)=>Number(t)+Number(e),0)/l.length},{key:"MAX",title:E("formula.max"),render:l=>Math.max(...l.map(t=>Number(t)))},{key:"MIN",title:E("formula.min"),render:l=>Math.min(...l.map(t=>Number(t)))},{key:"IF",title:E("formula._if"),render:([l,t,e])=>l?t:e},{key:"AND",title:E("formula.and"),render:l=>l.every(t=>t)},{key:"OR",title:E("formula.or"),render:l=>l.some(t=>t)},{key:"CONCAT",title:E("formula.concat"),render:l=>l.join("")}],Us=Lt,De={};Lt.forEach(l=>{De[l.key]=l});const tt=l=>l,mt=l=>{if(/^(-?\d*.?\d*)$/.test(l)){const t=Number(l).toFixed(2).toString(),[e,...s]=t.split("\\.");return[e.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),...s]}return l},lt=[{key:"normal",title:E("format.normal"),type:"string",render:tt},{key:"text",title:E("format.text"),type:"string",render:tt},{key:"number",title:E("format.number"),type:"number",label:"1,000.12",render:mt},{key:"percent",title:E("format.percent"),type:"number",label:"10.12%",render:l=>`${l}%`},{key:"rmb",title:E("format.rmb"),type:"number",label:"¥10.00",render:l=>`¥${mt(l)}`},{key:"usd",title:E("format.usd"),type:"number",label:"$10.00",render:l=>`$${mt(l)}`},{key:"eur",title:E("format.eur"),type:"number",label:"€10.00",render:l=>`€${mt(l)}`},{key:"date",title:E("format.date"),type:"date",label:"26/09/2008",render:tt},{key:"time",title:E("format.time"),type:"date",label:"15:59:00",render:tt},{key:"datetime",title:E("format.datetime"),type:"date",label:"26/09/2008 15:59:00",render:tt},{key:"duration",title:E("format.duration"),type:"date",label:"24:01:00",render:tt}],Ae={};lt.forEach(l=>{Ae[l.key]=l});const Ys=5,Xs={fillStyle:"#f4f5f8"},Ks={fillStyle:"#fff",lineWidth:Bt,strokeStyle:"#e6e6e6"};function Zs(){return{textAlign:"center",textBaseline:"middle",font:`500 ${y(12)}px Source Sans Pro`,fillStyle:"#585757",lineWidth:Bt(),strokeStyle:"#e6e6e6"}}function Oe(l,t,e,s=0){const{left:i,top:n,width:r,height:o}=l.cellRect(t,e);return new Vs(i,n+s,r,o,Ys)}function wt(l,t,e,s,i=0){const{sortedRowMap:n,rows:r,cols:o}=t;if(r.isHide(e)||o.isHide(s))return;let c=e;n.has(e)&&(c=n.get(e));const h=t.getCell(c,s);if(h===null)return;let d=!1;"editable"in h&&h.editable===!1&&(d=!0);const a=t.getCellStyleOrDefault(c,s),f=Oe(t,e,s,i);f.bgcolor=a.bgcolor,a.border!==void 0&&(f.setBorders(a.border),l.strokeBorders(f)),l.rect(f,()=>{let g="";t.settings.evalPaused?g=h.text||"":g=js.render(h.text||"",De,(b,x)=>t.getCellTextOrDefault(x,b)),a.format&&(g=Ae[a.format].render(g));const p=Object.assign({},a.font);p.size=Bs(p.size),l.text(g,f,{align:a.align,valign:a.valign,font:p,color:a.color,strike:a.strike,underline:a.underline},a.textwrap),t.validations.getError(e,s)&&l.error(f),d&&l.frozen(f)})}function Js(l){const{data:t,draw:e}=this;if(l){const{autoFilter:s}=t;if(!s.active())return;const i=s.hrange();l.intersects(i)&&i.each((n,r)=>{const o=Oe(t,n,r);e.dropdown(o)})}}function bt(l,t,e,s,i){const{draw:n,data:r}=this;n.save(),n.translate(t,e).translate(s,i);const{exceptRowSet:o}=r,c=a=>{const f=o.has(a);if(f){const g=r.rows.getHeight(a);n.translate(0,-g)}return!f},h=r.exceptRowTotalHeight(l.sri,l.eri);n.save(),n.translate(0,-h),l.each((a,f)=>{wt(n,r,a,f)},a=>c(a)),n.restore();const d=new Set;n.save(),n.translate(0,-h),r.eachMergesInView(l,({sri:a,sci:f,eri:g})=>{if(!o.has(a))wt(n,r,a,f);else if(!d.has(a)){d.add(a);const p=r.rows.sumHeight(a,g+1);n.translate(0,-p)}}),n.restore(),Js.call(this,l),n.restore()}function ze(l,t,e,s){const{draw:i}=this;i.save(),i.attr({fillStyle:"rgba(75, 137, 255, 0.08)"}).fillRect(l,t,e,s),i.restore()}function xt(l,t,e,s,i,n){const{draw:r,data:o}=this,c=t.h,h=t.w,d=n+s,a=i+e;r.save(),r.attr(Xs),(l==="all"||l==="left")&&r.fillRect(0,d,e,c),(l==="all"||l==="top")&&r.fillRect(a,0,h,s);const{sri:f,sci:g,eri:p,eci:w}=o.selector.range;r.attr(Zs()),(l==="all"||l==="left")&&(o.rowEach(t.sri,t.eri,(b,x,C)=>{const v=d+x,k=b;r.line([0,v],[e,v]),f<=k&&k<p+1&&ze.call(this,0,v,e,C),r.fillText(k+1,e/2,v+C/2),b>0&&o.rows.isHide(b-1)&&(r.save(),r.attr({strokeStyle:"#c6c6c6"}),r.line([5,v+5],[e-5,v+5]),r.restore())}),r.line([0,c+d],[e,c+d]),r.line([e,d],[e,c+d])),(l==="all"||l==="top")&&(o.colEach(t.sci,t.eci,(b,x,C)=>{const v=a+x,k=b;r.line([v,0],[v,s]),g<=k&&k<w+1&&ze.call(this,v,0,C,s),r.fillText(Qt(k),v+C/2,s/2),b>0&&o.cols.isHide(b-1)&&(r.save(),r.attr({strokeStyle:"#c6c6c6"}),r.line([v+5,5],[v+5,s-5]),r.restore())}),r.line([h+a,0],[h+a,s]),r.line([0,s],[h+a,s])),r.restore()}function Gs(l,t){const{draw:e}=this;e.save(),e.attr({fillStyle:"#f4f5f8"}).fillRect(0,0,l,t),e.restore()}function vt({sri:l,sci:t,eri:e,eci:s,w:i,h:n},r,o,c,h){const{draw:d,data:a}=this,{settings:f}=a;if(d.save(),d.attr(Ks).translate(r+c,o+h),!f.showGrid){d.restore();return}a.rowEach(l,e,(g,p,w)=>{g!==l&&d.line([0,p],[i,p]),g===e&&d.line([0,p+w],[i,p+w])}),a.colEach(t,s,(g,p,w)=>{g!==t&&d.line([p,0],[p,n]),g===s&&d.line([p+w,0],[p+w,n])}),d.restore()}function Qs(l,t,e,s){const{draw:i,data:n}=this,r=n.viewWidth()-l,o=n.viewHeight()-t;i.save().translate(l,t).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),i.line([0,s],[r,s]),i.line([e,0],[e,o]),i.restore()}class ti{constructor(t,e){this.el=t,this.draw=new Se(t,e.viewWidth(),e.viewHeight()),this.data=e}resetData(t){this.data=t,this.render()}render(){const{data:t}=this,{rows:e,cols:s}=t,i=s.indexWidth,n=e.height;this.draw.resize(t.viewWidth(),t.viewHeight()),this.clear();const r=t.viewRange(),o=t.freezeTotalWidth(),c=t.freezeTotalHeight(),{x:h,y:d}=t.scroll;vt.call(this,r,i,n,o,c),bt.call(this,r,i,n,-h,-d),xt.call(this,"all",r,i,n,o,c),Gs.call(this,i,n);const[a,f]=t.freeze;if(a>0||f>0){if(a>0){const p=r.clone();p.sri=0,p.eri=a-1,p.h=c,vt.call(this,p,i,n,o,0),bt.call(this,p,i,n,-h,0),xt.call(this,"top",p,i,n,o,0)}if(f>0){const p=r.clone();p.sci=0,p.eci=f-1,p.w=o,vt.call(this,p,i,n,0,c),xt.call(this,"left",p,i,n,0,c),bt.call(this,p,i,n,0,-d)}const g=t.freezeViewRange();vt.call(this,g,i,n,0,0),xt.call(this,"all",g,i,n,0,0),bt.call(this,g,i,n,0,0),Qs.call(this,i,n,o,c)}}clear(){this.draw.clear()}}const yt=[["A3",11.69,16.54],["A4",8.27,11.69],["A5",5.83,8.27],["B4",9.84,13.9],["B5",6.93,9.84]],qt=["landscape","portrait"];function kt(l){return parseInt(96*l,10)}function Ie(l){l==="cancel"?this.el.hide():this.toPrint()}function ei(l){const{paper:t}=this,{value:e}=l.target,s=yt[e];t.w=kt(s[1]),t.h=kt(s[2]),this.preview()}function si(l){const{paper:t}=this,{value:e}=l.target,s=qt[e];t.orientation=s,this.preview()}let ii=class{constructor(t){this.paper={w:kt(yt[0][1]),h:kt(yt[0][2]),padding:50,orientation:qt[0],get width(){return this.orientation==="landscape"?this.h:this.w},get height(){return this.orientation==="landscape"?this.w:this.h}},this.data=t,this.el=u("div",`${m}-print`).children(u("div",`${m}-print-bar`).children(u("div","-title").child("Print settings"),u("div","-right").children(u("div",`${m}-buttons`).children(new Y("cancel").on("click",Ie.bind(this,"cancel")),new Y("next","primary").on("click",Ie.bind(this,"next"))))),u("div",`${m}-print-content`).children(this.contentEl=u("div","-content"),u("div","-sider").child(u("form","").children(u("fieldset","").children(u("label","").child(`${T("print.size")}`),u("select","").children(...yt.map((e,s)=>u("option","").attr("value",s).child(`${e[0]} ( ${e[1]}''x${e[2]}'' )`))).on("change",ei.bind(this))),u("fieldset","").children(u("label","").child(`${T("print.orientation")}`),u("select","").children(...qt.map((e,s)=>u("option","").attr("value",s).child(`${T("print.orientations")[s]}`))).on("change",si.bind(this))))))).hide()}resetData(t){this.data=t}preview(){const{data:t,paper:e}=this,{width:s,height:i,padding:n}=e,r=s-n*2,o=i-n*2,c=t.contentRange(),h=parseInt(c.h/o,10)+1,d=r/c.w;let a=n;const f=n;d>1&&(a+=(r-c.w)/2);let g=0,p=0;this.contentEl.html(""),this.canvases=[];const w={sri:0,sci:0,eri:0,eci:0};for(let b=0;b<h;b+=1){let x=0,C=0;const v=u("div",`${m}-canvas-card`),k=u("canvas",`${m}-canvas`);this.canvases.push(k.el);const S=new Se(k.el,s,i);for(S.save(),S.translate(a,f),d<1&&S.scale(d,d);g<=c.eri;g+=1){const F=t.rows.getHeight(g);if(x+=F,x<o)for(let I=0;I<=c.eci;I+=1)wt(S,t,g,I,p),w.eci=I;else{C=-(x-F);break}}w.eri=g,S.restore(),S.save(),S.translate(a,f),d<1&&S.scale(d,d);const N=p;t.eachMergesInView(w,({sri:F,sci:I})=>{wt(S,t,F,I,N)}),S.restore(),w.sri=w.eri,w.sci=w.eci,p+=C,this.contentEl.child(u("div",`${m}-canvas-card-wraper`).child(v.child(k)))}this.el.show()}toPrint(){this.el.hide();const{paper:t}=this,e=u("iframe","").hide(),{el:s}=e;window.document.body.appendChild(s);const{contentWindow:i}=s,n=i.document,r=document.createElement("style");r.innerHTML=`
20
+ @page { size: ${t.width}px ${t.height}px; };
21
+ canvas {
22
+ page-break-before: auto;
23
+ page-break-after: always;
24
+ image-rendering: pixelated;
25
+ };
26
+ `,n.head.appendChild(r),this.canvases.forEach(o=>{const c=o.cloneNode(!1);c.getContext("2d").drawImage(o,0,0),n.body.appendChild(c)}),i.print()}};const li=[{key:"copy",title:E("contextmenu.copy"),label:"Ctrl+C"},{key:"cut",title:E("contextmenu.cut"),label:"Ctrl+X"},{key:"paste",title:E("contextmenu.paste"),label:"Ctrl+V"},{key:"paste-value",title:E("contextmenu.pasteValue"),label:"Ctrl+Shift+V"},{key:"paste-format",title:E("contextmenu.pasteFormat"),label:"Ctrl+Alt+V"},{key:"divider"},{key:"insert-row",title:E("contextmenu.insertRow")},{key:"insert-column",title:E("contextmenu.insertColumn")},{key:"divider"},{key:"delete-row",title:E("contextmenu.deleteRow")},{key:"delete-column",title:E("contextmenu.deleteColumn")},{key:"delete-cell-text",title:E("contextmenu.deleteCellText")},{key:"hide",title:E("contextmenu.hide")},{key:"divider"},{key:"validation",title:E("contextmenu.validation")},{key:"divider"},{key:"cell-printable",title:E("contextmenu.cellprintable")},{key:"cell-non-printable",title:E("contextmenu.cellnonprintable")},{key:"divider"},{key:"cell-editable",title:E("contextmenu.celleditable")},{key:"cell-non-editable",title:E("contextmenu.cellnoneditable")}];function ni(l){return l.key==="divider"?u("div",`${m}-item divider`):u("div",`${m}-item`).on("click",()=>{this.itemClick(l.key),this.hide()}).children(l.title(),u("div","label").child(l.label||""))}function ri(){return li.map(l=>ni.call(this,l))}let oi=class{constructor(t,e=!1){this.menuItems=ri.call(this),this.el=u("div",`${m}-contextmenu`).children(...this.menuItems).hide(),this.viewFn=t,this.itemClick=()=>{},this.isHide=e,this.setMode("range")}setMode(t){const e=this.menuItems[12];t==="row-col"?e.show():e.hide()}hide(){const{el:t}=this;t.hide(),G(t)}setPosition(t,e){if(this.isHide)return;const{el:s}=this,{width:i}=s.show().offset(),n=this.viewFn(),r=n.height/2;let o=t;n.width-t<=i&&(o-=i),s.css("left",`${o}px`),e>r?s.css("bottom",`${n.height-e}px`).css("max-height",`${e}px`).css("top","auto"):s.css("top",`${e}px`).css("max-height",`${n.height-e}px`).css("bottom","auto"),it(s)}};function ci(l,t){if(t.classList.contains("active"))return;const{left:e,top:s,width:i,height:n}=t.getBoundingClientRect(),r=u("div",`${m}-tooltip`).html(l).show();document.body.appendChild(r.el);const o=r.box();r.css("left",`${e+i/2-o.width/2}px`).css("top",`${s+n+2}px`),A(t,"mouseleave",()=>{document.body.contains(r.el)&&document.body.removeChild(r.el)}),A(t,"click",()=>{document.body.contains(r.el)&&document.body.removeChild(r.el)})}class Ct{constructor(t,e,s){this.tip="",t&&(this.tip=T(`toolbar.${t.replace(/-[a-z]/g,i=>i[1].toUpperCase())}`)),e&&(this.tip+=` (${e})`),this.tag=t,this.shortcut=e,this.value=s,this.el=this.element(),this.change=()=>{}}element(){const{tip:t}=this;return u("div",`${m}-toolbar-btn`).on("mouseenter",e=>{this.tip&&ci(this.tip,e.target)}).attr("data-tooltip",t)}setState(){}}class M extends Ct{dropdown(){}getValue(t){return t}element(){const{tag:t}=this;return this.dd=this.dropdown(),this.dd.change=e=>this.change(t,this.getValue(e)),super.element().child(this.dd)}setState(t){t&&(this.value=t,this.dd.setTitle(t))}}class H extends j{constructor(t,e,s,i,...n){super("div",`${m}-dropdown ${i}`),this.title=t,this.change=()=>{},this.headerClick=()=>{},typeof t=="string"?this.title=u("div",`${m}-dropdown-title`).child(t):s&&this.title.addClass("arrow-left"),this.contentEl=u("div",`${m}-dropdown-content`).css("width",e).hide(),this.setContentChildren(...n),this.headerEl=u("div",`${m}-dropdown-header`),this.headerEl.on("click",()=>{this.contentEl.css("display")!=="block"?this.show():this.hide()}).children(this.title,s?u("div",`${m}-icon arrow-right`).child(u("div",`${m}-icon-img arrow-down`)):""),this.children(this.headerEl,this.contentEl)}setContentChildren(...t){this.contentEl.html(""),t.length>0&&this.contentEl.children(...t)}setTitle(t){this.title.html(t),this.hide()}show(){const{contentEl:t}=this;t.show(),this.parent().active(),it(this.parent(),()=>{this.hide()})}hide(){this.parent().active(!1),this.contentEl.hide(),G(this.parent())}}function hi(l){return u("div",`${m}-item`).child(new D(l))}class Re extends H{constructor(t,e){const s=new D(`align-${e}`),i=t.map(n=>hi(`align-${n}`).on("click",()=>{this.setTitle(n),this.change(n)}));super(s,"auto",!0,"bottom-left",...i)}setTitle(t){this.title.setName(`align-${t}`),this.hide()}}class ai extends M{constructor(t){super("align","",t)}dropdown(){const{value:t}=this;return new Re(["left","center","right"],t)}}class di extends M{constructor(t){super("valign","",t)}dropdown(){const{value:t}=this;return new Re(["top","middle","bottom"],t)}}class V extends Ct{element(){const{tag:t}=this;return super.element().child(new D(t)).on("click",()=>this.click())}click(){this.change(this.tag,this.toggle())}setState(t){this.el.active(t)}toggle(){return this.el.toggle()}active(){return this.el.hasClass("active")}}class fi extends V{constructor(){super("autofilter")}setState(){}}class ui extends V{constructor(){super("font-bold","Ctrl+B")}}class gi extends V{constructor(){super("font-italic","Ctrl+I")}}class pi extends V{constructor(){super("strike","Ctrl+U")}}class mi extends V{constructor(){super("underline","Ctrl+U")}}const wi=["#ffffff","#000100","#e7e5e6","#445569","#5b9cd6","#ed7d31","#a5a5a5","#ffc001","#4371c6","#71ae47"],bi=[["#f2f2f2","#7f7f7f","#d0cecf","#d5dce4","#deeaf6","#fce5d5","#ededed","#fff2cd","#d9e2f3","#e3efd9"],["#d8d8d8","#595959","#afabac","#adb8ca","#bdd7ee","#f7ccac","#dbdbdb","#ffe59a","#b3c6e7","#c5e0b3"],["#bfbfbf","#3f3f3f","#756f6f","#8596b0","#9cc2e6","#f4b184","#c9c9c9","#fed964","#8eaada","#a7d08c"],["#a5a5a5","#262626","#3a3839","#333f4f","#2e75b5","#c45a10","#7b7b7b","#bf8e01","#2f5596","#538136"],["#7f7f7f","#0c0c0c","#171516","#222a35","#1f4e7a","#843c0a","#525252","#7e6000","#203864","#365624"]],xi=["#c00000","#fe0000","#fdc101","#ffff01","#93d051","#00b04e","#01b0f1","#0170c1","#012060","#7030a0"];function jt(l){return u("td","").child(u("div",`${m}-color-palette-cell`).on("click.stop",()=>this.change(l)).css("background-color",l))}class vi{constructor(){this.el=u("div",`${m}-color-palette`),this.change=()=>{};const t=u("table","").children(u("tbody","").children(u("tr",`${m}-theme-color-placeholders`).children(...wi.map(e=>jt.call(this,e))),...bi.map(e=>u("tr",`${m}-theme-colors`).children(...e.map(s=>jt.call(this,s)))),u("tr",`${m}-standard-colors`).children(...xi.map(e=>jt.call(this,e)))));this.el.child(t)}}class Ut extends H{constructor(t,e){const s=new D(t).css("height","16px").css("border-bottom",`3px solid ${e}`),i=new vi;i.change=n=>{this.setTitle(n),this.change(n)},super(s,"auto",!1,"bottom-left",i.el)}setTitle(t){this.title.css("border-color",t),this.hide()}}const yi=[["thin",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" style="user-select: none;"></line></svg>'],["medium",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="2" style="user-select: none;"><line x1="0" y1="1.0" x2="50" y2="1.0" stroke-width="2" stroke="black" style="user-select: none;"></line></svg>'],["thick",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="3" style="user-select: none;"><line x1="0" y1="1.5" x2="50" y2="1.5" stroke-width="3" stroke="black" style="user-select: none;"></line></svg>'],["dashed",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" stroke-dasharray="2" style="user-select: none;"></line></svg>'],["dotted",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" stroke-dasharray="1" style="user-select: none;"></line></svg>']];class ki extends H{constructor(t){const e=new D("line-type");let s=0;const i=yi.map((n,r)=>u("div",`${m}-item state ${t===n[0]?"checked":""}`).on("click",()=>{i[s].toggle("checked"),i[r].toggle("checked"),s=r,this.hide(),this.change(n)}).child(u("div",`${m}-line-type`).html(n[1])));super(e,"auto",!1,"bottom-left",...i)}}function Fe(...l){return u("table","").child(u("tbody","").children(...l))}function Me(l){return u("td","").child(u("div",`${m}-border-palette-cell`).child(new D(`border-${l}`)).on("click",()=>{this.mode=l;const{mode:t,style:e,color:s}=this;this.change({mode:t,style:e,color:s})}))}class Ci{constructor(){this.color="#000",this.style="thin",this.mode="all",this.change=()=>{},this.ddColor=new Ut("line-color",this.color),this.ddColor.change=e=>{this.color=e},this.ddType=new ki(this.style),this.ddType.change=([e])=>{this.style=e},this.el=u("div",`${m}-border-palette`);const t=Fe(u("tr","").children(u("td",`${m}-border-palette-left`).child(Fe(u("tr","").children(...["all","inside","horizontal","vertical","outside"].map(e=>Me.call(this,e))),u("tr","").children(...["left","top","right","bottom","none"].map(e=>Me.call(this,e))))),u("td",`${m}-border-palette-right`).children(u("div",`${m}-toolbar-btn`).child(this.ddColor.el),u("div",`${m}-toolbar-btn`).child(this.ddType.el))));this.el.child(t)}}class Ei extends H{constructor(){const t=new D("border-all"),e=new Ci;e.change=s=>{this.change(s),this.hide()},super(t,"auto",!1,"bottom-left",e.el)}}class Si extends M{constructor(){super("border")}dropdown(){return new Ei}}class Et extends Ct{element(){return super.element().child(new D(this.tag)).on("click",()=>this.change(this.tag))}setState(t){this.el.disabled(t)}}class $i extends Et{constructor(){super("clearformat")}}class Ti extends V{constructor(){super("paintformat")}setState(){}}class Di extends M{constructor(t){super("color",void 0,t)}dropdown(){const{tag:t,value:e}=this;return new Ut(t,e)}}class Ai extends M{constructor(t){super("bgcolor",void 0,t)}dropdown(){const{tag:t,value:e}=this;return new Ut(t,e)}}class Oi extends H{constructor(){const t=_t.map(e=>u("div",`${m}-item`).on("click",()=>{this.setTitle(`${e.pt}`),this.change(e)}).child(`${e.pt}`));super("10","60px",!0,"bottom-left",...t)}}let zi=class extends M{constructor(){super("font-size")}getValue(t){return t.pt}dropdown(){return new Oi}};class Ii extends H{constructor(){const t=$e.map(e=>u("div",`${m}-item`).on("click",()=>{this.setTitle(e.title),this.change(e)}).child(e.title));super($e[0].title,"160px",!0,"bottom-left",...t)}}class Ri extends M{constructor(){super("font-name")}getValue(t){return t.key}dropdown(){return new Ii}}class Fi extends H{constructor(){let t=lt.slice(0);t.splice(2,0,{key:"divider"}),t.splice(8,0,{key:"divider"}),t=t.map(e=>{const s=u("div",`${m}-item`);return e.key==="divider"?s.addClass("divider"):(s.child(e.title()).on("click",()=>{this.setTitle(e.title()),this.change(e)}),e.label&&s.child(u("div","label").html(e.label))),s}),super("Normal","220px",!0,"bottom-left",...t)}setTitle(t){for(let e=0;e<lt.length;e+=1)lt[e].key===t&&this.title.html(lt[e].title());this.hide()}}let Mi=class extends M{constructor(){super("format")}getValue(t){return t.key}dropdown(){return new Fi}};class Hi extends H{constructor(){const t=Lt.map(e=>u("div",`${m}-item`).on("click",()=>{this.hide(),this.change(e)}).child(e.key));super(new D("formula"),"180px",!0,"bottom-left",...t)}}class Wi extends M{constructor(){super("formula")}getValue(t){return t.key}dropdown(){return new Hi}}class Ni extends V{constructor(){super("freeze")}}class Pi extends V{constructor(){super("merge")}setState(t,e){this.el.active(t).disabled(e)}}class Vi extends Et{constructor(){super("redo","Ctrl+Y")}}class Bi extends Et{constructor(){super("undo","Ctrl+Z")}}class _i extends Et{constructor(){super("print","Ctrl+P")}}class Li extends V{constructor(){super("textwrap")}}let qi=class extends H{constructor(){const t=new D("ellipsis"),e=u("div",`${m}-toolbar-more`);super(t,"auto",!1,"bottom-right",e),this.moreBtns=e,this.contentEl.css("max-width","420px")}};class ji extends M{constructor(){super("more"),this.el.hide()}dropdown(){return new qi}show(){this.el.show()}hide(){this.el.hide()}}function _(){return u("div",`${m}-toolbar-divider`)}function Ui(){this.btns2=[],this.items.forEach(l=>{if(Array.isArray(l))l.forEach(({el:t})=>{const e=t.box(),{marginLeft:s,marginRight:i}=t.computedStyle();this.btns2.push([t,e.width+parseInt(s,10)+parseInt(i,10)])});else{const t=l.box(),{marginLeft:e,marginRight:s}=l.computedStyle();this.btns2.push([l,t.width+parseInt(e,10)+parseInt(s,10)])}})}function He(){const{el:l,btns:t,moreEl:e,btns2:s}=this,{moreBtns:i,contentEl:n}=e.dd;l.css("width",`${this.widthFn()}px`);const r=l.box();let o=160,c=12;const h=[],d=[];s.forEach(([a,f],g)=>{o+=f,g===s.length-1||o<r.width?h.push(a):(c+=f,d.push(a))}),t.html("").children(...h),i.html("").children(...d),n.css("width",`${c}px`),d.length>0?e.show():e.hide()}function We(l){const t=new Ct;t.el.on("click",()=>{l.onClick&&l.onClick(this.data.getData(),this.data)}),t.tip=l.tip||"";let{el:e}=l;if(l.icon&&(e=u("img").attr("src",l.icon)),e){const s=u("div",`${m}-icon`);s.child(e),t.el.child(s)}return t}class Yi{constructor(t,e,s=!1){this.data=t,this.change=()=>{},this.widthFn=e,this.isHide=s;const i=t.defaultStyle();this.items=[[this.undoEl=new Bi,this.redoEl=new Vi,new _i,this.paintformatEl=new Ti,this.clearformatEl=new $i],_(),[this.formatEl=new Mi],_(),[this.fontEl=new Ri,this.fontSizeEl=new zi],_(),[this.boldEl=new ui,this.italicEl=new gi,this.underlineEl=new mi,this.strikeEl=new pi,this.textColorEl=new Di(i.color)],_(),[this.fillColorEl=new Ai(i.bgcolor),this.borderEl=new Si,this.mergeEl=new Pi],_(),[this.alignEl=new ai(i.align),this.valignEl=new di(i.valign),this.textwrapEl=new Li],_(),[this.freezeEl=new Ni,this.autofilterEl=new fi,this.formulaEl=new Wi]];const{extendToolbar:n={}}=t.settings;if(n.left&&n.left.length>0){this.items.unshift(_());const r=n.left.map(We.bind(this));this.items.unshift(r)}if(n.right&&n.right.length>0){this.items.push(_());const r=n.right.map(We.bind(this));this.items.push(r)}this.items.push([this.moreEl=new ji]),this.el=u("div",`${m}-toolbar`),this.btns=u("div",`${m}-toolbar-btns`),this.items.forEach(r=>{Array.isArray(r)?r.forEach(o=>{this.btns.child(o.el),o.change=(...c)=>{this.change(...c)}}):this.btns.child(r.el)}),this.el.child(this.btns),s?this.el.hide():(this.reset(),setTimeout(()=>{Ui.call(this),He.call(this)},0),A(window,"resize",()=>{He.call(this)}))}paintformatActive(){return this.paintformatEl.active()}paintformatToggle(){this.paintformatEl.toggle()}trigger(t){this[`${t}El`].click()}resetData(t){this.data=t,this.reset()}reset(){if(this.isHide)return;const{data:t}=this,e=t.getSelectedCellStyle();this.undoEl.setState(!t.canUndo()),this.redoEl.setState(!t.canRedo()),this.mergeEl.setState(t.canUnmerge(),!t.selector.multiple()),this.autofilterEl.setState(!t.canAutofilter());const{font:s,format:i}=e;this.formatEl.setState(i),this.fontEl.setState(s.name),this.fontSizeEl.setState(s.size),this.boldEl.setState(s.bold),this.italicEl.setState(s.italic),this.underlineEl.setState(e.underline),this.strikeEl.setState(e.strike),this.textColorEl.setState(e.color),this.fillColorEl.setState(e.bgcolor),this.alignEl.setState(e.align),this.valignEl.setState(e.valign),this.textwrapEl.setState(e.textwrap),this.freezeEl.setState(t.freezeIsActive())}}class Xi{constructor(t,e,s="600px"){this.title=t,this.el=u("div",`${m}-modal`).css("width",s).children(u("div",`${m}-modal-header`).children(new D("close").on("click.stop",()=>this.hide()),this.title),u("div",`${m}-modal-content`).children(...e)).hide()}show(){this.dimmer=u("div",`${m}-dimmer active`),document.body.appendChild(this.dimmer.el);const{width:t,height:e}=this.el.show().box(),{clientHeight:s,clientWidth:i}=document.documentElement;this.el.offset({left:(i-t)/2,top:(s-e)/3}),window.xkeydownEsc=n=>{n.keyCode===27&&this.hide()},A(window,"keydown",window.xkeydownEsc)}hide(){this.el.hide(),document.body.removeChild(this.dimmer.el),dt(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}class et{constructor(t,e){this.vchange=()=>{},this.el=u("div",`${m}-form-input`),this.input=u("input","").css("width",t).on("input",s=>this.vchange(s)).attr("placeholder",e),this.el.child(this.input)}focus(){setTimeout(()=>{this.input.el.focus()},10)}hint(t){this.input.attr("placeholder",t)}val(t){return this.input.val(t)}}class Yt{constructor(t,e,s,i=r=>r,n=()=>{}){this.key=t,this.getTitle=i,this.vchange=()=>{},this.el=u("div",`${m}-form-select`),this.suggest=new ye(e.map(r=>({key:r,title:this.getTitle(r)})),r=>{this.itemClick(r.key),n(r.key),this.vchange(r.key)},s,this.el),this.el.children(this.itemEl=u("div","input-text").html(this.getTitle(t)),this.suggest.el).on("click",()=>this.show())}show(){this.suggest.search("")}itemClick(t){this.key=t,this.itemEl.html(this.getTitle(t))}val(t){return t!==void 0?(this.key=t,this.itemEl.html(this.getTitle(t)),this):this.key}}const Ki={number:/(^\d+$)|(^\d+(\.\d{0,4})?$)/,date:/^\d{4}-\d{1,2}-\d{1,2}$/};class L{constructor(t,e,s,i){this.label="",this.rule=e,s&&(this.label=u("label","label").css("width",`${i}px`).html(s)),this.tip=u("div","tip").child("tip").hide(),this.input=t,this.input.vchange=()=>this.validate(),this.el=u("div",`${m}-form-field`).children(this.label,t.el,this.tip)}isShow(){return this.el.css("display")!=="none"}show(){this.el.show()}hide(){return this.el.hide(),this}val(t){return this.input.val(t)}hint(t){this.input.hint(t)}validate(){const{input:t,rule:e,tip:s,el:i}=this,n=t.val();return e.required&&/^\s*$/.test(n)?(s.html(T("validation.required")),i.addClass("error"),!1):(e.type||e.pattern)&&!(e.pattern||Ki[e.type]).test(n)?(s.html(T("validation.notMatch")),i.addClass("error"),!1):(i.removeClass("error"),!0)}}const Ne=100;class Zi extends Xi{constructor(){const t=new L(new Yt("cell",["cell"],"100%",h=>T(`dataValidation.modeType.${h}`)),{required:!0},`${T("dataValidation.range")}:`,Ne),e=new L(new et("120px","E3 or E3:F12"),{required:!0,pattern:/^([A-Z]{1,2}[1-9]\d*)(:[A-Z]{1,2}[1-9]\d*)?$/}),s=new L(new Yt("list",["list","number","date","phone","email"],"100%",h=>T(`dataValidation.type.${h}`),h=>this.criteriaSelected(h)),{required:!0},`${T("dataValidation.criteria")}:`,Ne),i=new L(new Yt("be",["be","nbe","eq","neq","lt","lte","gt","gte"],"160px",h=>T(`dataValidation.operator.${h}`),h=>this.criteriaOperatorSelected(h)),{required:!0}).hide(),n=new L(new et("70px","10"),{required:!0}).hide(),r=new L(new et("70px","100"),{required:!0,type:"number"}).hide(),o=new L(new et("120px","a,b,c"),{required:!0}),c=new L(new et("70px","10"),{required:!0,type:"number"}).hide();super(T("contextmenu.validation"),[u("div",`${m}-form-fields`).children(t.el,e.el),u("div",`${m}-form-fields`).children(s.el,i.el,n.el,r.el,c.el,o.el),u("div",`${m}-buttons`).children(new Y("cancel").on("click",()=>this.btnClick("cancel")),new Y("remove").on("click",()=>this.btnClick("remove")),new Y("save","primary").on("click",()=>this.btnClick("save")))]),this.mf=t,this.rf=e,this.cf=s,this.of=i,this.minvf=n,this.maxvf=r,this.vf=c,this.svf=o,this.change=()=>{}}showVf(t){const e=t==="date"?"2018-11-12":"10",{vf:s}=this;s.input.hint(e),s.show()}criteriaSelected(t){const{of:e,minvf:s,maxvf:i,vf:n,svf:r}=this;t==="date"||t==="number"?(e.show(),s.rule.type=t,i.rule.type=t,t==="date"?(s.hint("2018-11-12"),i.hint("2019-11-12")):(s.hint("10"),i.hint("100")),s.show(),i.show(),n.hide(),r.hide()):(t==="list"?r.show():r.hide(),n.hide(),e.hide(),s.hide(),i.hide())}criteriaOperatorSelected(t){if(!t)return;const{minvf:e,maxvf:s,vf:i}=this;if(t==="be"||t==="nbe")e.show(),s.show(),i.hide();else{const n=this.cf.val();i.rule.type=n,n==="date"?i.hint("2018-11-12"):i.hint("10"),i.show(),e.hide(),s.hide()}}btnClick(t){if(t==="cancel")this.hide();else if(t==="remove")this.change("remove"),this.hide();else if(t==="save"){const e=["mf","rf","cf","of","svf","vf","minvf","maxvf"];for(let c=0;c<e.length;c+=1){const h=this[e[c]];if(h.isShow()&&!h.validate())return}const s=this.mf.val(),i=this.rf.val(),n=this.cf.val(),r=this.of.val();let o=this.svf.val();(n==="number"||n==="date")&&(r==="be"||r==="nbe"?o=[this.minvf.val(),this.maxvf.val()]:o=this.vf.val()),this.change("save",s,i,{type:n,operator:r,required:!1,value:o}),this.hide()}}setValue(t){if(t){const{mf:e,rf:s,cf:i,of:n,svf:r,vf:o,minvf:c,maxvf:h}=this,{mode:d,ref:a,validator:f}=t,{type:g,operator:p,value:w}=f||{type:"list"};e.val(d||"cell"),s.val(a),i.val(g),n.val(p),Array.isArray(w)?(c.val(w[0]),h.val(w[1])):(r.val(w||""),o.val(w||"")),this.criteriaSelected(g),this.criteriaOperatorSelected(p)}this.show()}}function Pe(l){return u("div",`${m}-item ${l}`)}function Ve(l){return Pe("state").child(T(`sort.${l}`)).on("click.stop",()=>this.itemClick(l))}function Ji(l){const{filterbEl:t,filterValues:e}=this;t.html(""),Object.keys(l).forEach((i,n)=>{const r=l[i],o=e.includes(i)?"checked":"";t.child(u("div",`${m}-item state ${o}`).on("click.stop",()=>this.filterClick(n,i)).children(i===""?T("filter.empty"):i,u("div","label").html(`(${r})`)))})}function Be(){const{filterhEl:l,filterValues:t,values:e}=this;l.html(`${t.length} / ${e.length}`),l.checked(t.length===e.length)}class Gi{constructor(){this.filterbEl=u("div",`${m}-body`),this.filterhEl=u("div",`${m}-header state`).on("click.stop",()=>this.filterClick(0,"all")),this.el=u("div",`${m}-sort-filter`).children(this.sortAscEl=Ve.call(this,"asc"),this.sortDescEl=Ve.call(this,"desc"),Pe("divider"),u("div",`${m}-filter`).children(this.filterhEl,this.filterbEl),u("div",`${m}-buttons`).children(new Y("cancel").on("click",()=>this.btnClick("cancel")),new Y("ok","primary").on("click",()=>this.btnClick("ok")))).hide(),this.ci=null,this.sortDesc=null,this.values=null,this.filterValues=[]}btnClick(t){if(t==="ok"){const{ci:e,sort:s,filterValues:i}=this;this.ok&&this.ok(e,s,"in",i)}this.hide()}itemClick(t){this.sort=t;const{sortAscEl:e,sortDescEl:s}=this;e.checked(t==="asc"),s.checked(t==="desc")}filterClick(t,e){const{filterbEl:s,filterValues:i,values:n}=this,r=s.children();e==="all"?r.length===i.length?(this.filterValues=[],r.forEach(o=>u(o).checked(!1))):(this.filterValues=Array.from(n),r.forEach(o=>u(o).checked(!0))):u(r[t]).toggle("checked")?i.push(e):i.splice(i.findIndex(c=>c===e),1),Be.call(this)}set(t,e,s,i){this.ci=t;const{sortAscEl:n,sortDescEl:r}=this;i!==null?(this.sort=i.order,n.checked(i.asc()),r.checked(i.desc())):(this.sortDesc=null,n.checked(!1),r.checked(!1)),this.values=Object.keys(e),this.filterValues=s?Array.from(s.value):Object.keys(e),Ji.call(this,e,s),Be.call(this)}setOffset(t){this.el.offset(t).show();let e=1;it(this.el,()=>{e<=0&&this.hide(),e-=1})}show(){this.el.show()}hide(){this.el.hide(),G(this.el)}}function _e(l,t){const e=u("div",`${m}-toast`),s=u("div",`${m}-dimmer active`),i=()=>{document.body.removeChild(e.el),document.body.removeChild(s.el)};e.children(u("div",`${m}-toast-header`).children(new D("close").on("click.stop",()=>i()),l),u("div",`${m}-toast-content`).html(t)),document.body.appendChild(e.el),document.body.appendChild(s.el);const{width:n,height:r}=e.box(),{clientHeight:o,clientWidth:c}=document.documentElement;e.offset({left:(c-n)/2,top:(o-r)/3})}function Xt(l,t){let e;return(...s)=>{const i=this,n=s;e||(e=setTimeout(()=>{e=null,l.apply(i,n)},t))}}function Qi(){const{data:l,verticalScrollbar:t,horizontalScrollbar:e}=this,{l:s,t:i,left:n,top:r,width:o,height:c}=l.getSelectedRect(),h=this.getTableOffset();if(Math.abs(n)+o>h.width)e.move({left:s+o-h.width});else{const d=l.freezeTotalWidth();n<d&&e.move({left:s-1-d})}if(Math.abs(r)+c>h.height)t.move({top:i+c-h.height-1});else{const d=l.freezeTotalHeight();r<d&&t.move({top:i-1-d})}}function X(l,t,e,s=!0,i=!1){if(t===-1&&e===-1)return;const{table:n,selector:r,toolbar:o,data:c,contextMenu:h}=this,d=c.getCell(t,e);l?(r.setEnd(t,e,i),this.trigger("cells-selected",d,r.range)):(r.set(t,e,s),this.trigger("cell-selected",d,t,e)),h.setMode(t===-1||e===-1?"row-col":"range"),o.reset(),n.render()}function W(l,t){const{selector:e,data:s}=this,{rows:i,cols:n}=s;let[r,o]=e.indexes;const{eri:c,eci:h}=e.range;l&&([r,o]=e.moveIndexes),t==="left"?o>0&&(o-=1):t==="right"?(h!==o&&(o=h),o<n.len-1&&(o+=1)):t==="up"?r>0&&(r-=1):t==="down"?(c!==r&&(r=c),r<i.len-1&&(r+=1)):t==="row-first"?o=0:t==="row-last"?o=n.len-1:t==="col-first"?r=0:t==="col-last"&&(r=i.len-1),l&&(e.moveIndexes=[r,o]),X.call(this,l,r,o),Qi.call(this)}function tl(l){if(l.buttons!==0||l.target.className===`${m}-resizer-hover`)return;const{offsetX:t,offsetY:e}=l,{rowResizer:s,colResizer:i,tableEl:n,data:r}=this,{rows:o,cols:c}=r;if(t>c.indexWidth&&e>o.height){s.hide(),i.hide();return}const h=n.box(),d=r.getCellRectByXY(l.offsetX,l.offsetY);d.ri>=0&&d.ci===-1?(d.width=c.indexWidth,s.show(d,{width:h.width}),o.isHide(d.ri-1)?s.showUnhide(d.ri):s.hideUnhide()):s.hide(),d.ri===-1&&d.ci>=0?(d.height=o.height,i.show(d,{height:h.height}),c.isHide(d.ci-1)?i.showUnhide(d.ci):i.hideUnhide()):i.hide()}function el(l){const{verticalScrollbar:t,horizontalScrollbar:e,data:s}=this,{top:i}=t.scroll(),{left:n}=e.scroll(),{rows:r,cols:o}=s,{deltaY:c,deltaX:h}=l,d=(b,x)=>{let C=b,v=0;do v=x(C),C+=1;while(v<=0);return v},a=b=>{if(b>0){const x=s.scroll.ri+1;if(x<r.len){const C=d(x,v=>r.getHeight(v));t.move({top:i+C-1})}}else{const x=s.scroll.ri-1;if(x>=0){const C=d(x,v=>r.getHeight(v));t.move({top:x===0?0:i-C})}}},f=b=>{if(b>0){const x=s.scroll.ci+1;if(x<o.len){const C=d(x,v=>o.getWidth(v));e.move({left:n+C-1})}}else{const x=s.scroll.ci-1;if(x>=0){const C=d(x,v=>o.getWidth(v));e.move({left:x===0?0:n-C})}}},g=Math.abs(c),p=Math.abs(h),w=Math.max(g,p);/Firefox/i.test(window.navigator.userAgent)&&Xt(a(l.detail),50),w===p&&Xt(f(h),50),w===g&&Xt(a(c),50)}function sl(l,t){const{verticalScrollbar:e,horizontalScrollbar:s}=this,{top:i}=e.scroll(),{left:n}=s.scroll();l==="left"||l==="right"?s.move({left:n-t}):(l==="up"||l==="down")&&e.move({top:i-t})}function Kt(){const{data:l,verticalScrollbar:t}=this,{height:e}=this.getTableOffset(),s=l.exceptRowTotalHeight(0,-1);t.set(e,l.rows.totalHeight()-s)}function Zt(){const{data:l,horizontalScrollbar:t}=this,{width:e}=this.getTableOffset();l&&t.set(e,l.cols.totalWidth())}function il(){const{selector:l,data:t,editor:e}=this,[s,i]=t.freeze;if(s>0||i>0){const n=t.freezeTotalWidth(),r=t.freezeTotalHeight();e.setFreezeLengths(n,r)}l.resetAreaOffset()}function O(){const{tableEl:l,overlayerEl:t,overlayerCEl:e,table:s,toolbar:i,selector:n,el:r}=this,o=this.getTableOffset(),c=this.getRect();l.attr(c),t.offset(c),e.offset(o),r.css("width",`${c.width}px`),Kt.call(this),Zt.call(this),il.call(this),s.render(),i.reset(),n.reset()}function nt(){const{data:l,selector:t}=this;l.clearClipboard(),t.hideClipboard()}function Jt(l){const{data:t,selector:e}=this;t.settings.mode!=="read"&&(t.copy(),t.copyToSystemClipboard(l),e.showClipboard())}function Le(){const{data:l,selector:t}=this;l.settings.mode!=="read"&&(l.cut(),t.showClipboard())}function rt(l,t){const{data:e}=this;if(e.settings.mode!=="read"){if(e.clipboard.isClear()){const s=()=>O.call(this),i=n=>{this.trigger("pasted-clipboard",n)};e.pasteFromSystemClipboard(s,i)}else if(e.paste(l,s=>_e("Tip",s)))O.call(this);else if(t){const s=t.clipboardData.getData("text/plain");this.data.pasteFromText(s),O.call(this)}}}function ll(){this.data.hideRowsOrCols(),O.call(this)}function qe(l,t){this.data.unhideRowsOrCols(l,t),O.call(this)}function nl(){const{data:l}=this;l.autofilter(),O.call(this)}function rl(){const{toolbar:l}=this;l.paintformatActive()&&(rt.call(this,"format"),nt.call(this),l.paintformatToggle())}function je(l){const{selector:t,data:e,table:s,sortFilter:i}=this,{offsetX:n,offsetY:r}=l,o=l.target.className===`${m}-selector-corner`,c=e.getCellRectByXY(n,r),{left:h,top:d,width:a,height:f}=c;let{ri:g,ci:p}=c;const{autoFilter:w}=e;if(w.includes(g,p)&&h+a-20<n&&d+f-20<r){const b=w.items(p,(x,C)=>e.rows.getCell(x,C));i.hide(),i.set(p,b,w.getFilter(p),w.getSort(p)),i.setOffset({left:h,top:d+f+2});return}l.shiftKey||(o?t.showAutofill(g,p):X.call(this,!1,g,p),ae(window,b=>{({ri:g,ci:p}=e.getCellRectByXY(b.offsetX,b.offsetY)),o?t.showAutofill(g,p):b.buttons===1&&!b.shiftKey&&X.call(this,!0,g,p,!0,!0)},()=>{o&&t.arange&&e.settings.mode!=="read"&&e.autofill(t.arange,"all",b=>_e("Tip",b))&&s.render(),t.hideAutofill(),rl.call(this)})),!o&&l.buttons===1&&l.shiftKey&&X.call(this,!0,g,p)}function ot(){const{editor:l,data:t}=this,e=t.getSelectedRect(),s=this.getTableOffset();let i="top";e.top>s.height/2&&(i="bottom"),l.setOffset(e,i)}function ct(){const{editor:l,data:t}=this;t.settings.mode!=="read"&&(ot.call(this),l.setCell(t.getSelectedCell(),t.getSelectedValidator()),nt.call(this))}function ol(l){const{data:t,table:e,selector:s}=this;t.scrolly(l,()=>{s.resetBRLAreaOffset(),ot.call(this),e.render()})}function cl(l){const{data:t,table:e,selector:s}=this;t.scrollx(l,()=>{s.resetBRTAreaOffset(),ot.call(this),e.render()})}function hl(l,t){const{ri:e}=l,{table:s,selector:i,data:n}=this,{sri:r,eri:o}=i.range;if(e>=r&&e<=o)for(let c=r;c<=o;c+=1)n.rows.setHeight(c,t);else n.rows.setHeight(e,t);s.render(),i.resetAreaOffset(),Kt.call(this),ot.call(this)}function al(l,t){const{ci:e}=l,{table:s,selector:i,data:n}=this,{sci:r,eci:o}=i.range;if(e>=r&&e<=o)for(let c=r;c<=o;c+=1)n.cols.setWidth(c,t);else n.cols.setWidth(e,t);s.render(),i.resetAreaOffset(),Zt.call(this),ot.call(this)}function Gt(l,t="finished"){const{data:e,table:s}=this;if(e.settings.mode==="read")return;e.setSelectedCellText(l,t);const{ri:i,ci:n}=e.selector;t==="finished"?s.render():this.trigger("cell-edited",l,i,n)}function St(l){const{data:t}=this;t.settings.mode!=="read"&&(l==="insert-row"?t.insert("row"):l==="delete-row"?t.delete("row"):l==="insert-column"?t.insert("column"):l==="delete-column"?t.delete("column"):l==="delete-cell"?t.deleteCell():l==="delete-cell-format"?t.deleteCell("format"):l==="delete-cell-text"?t.deleteCell("text"):l==="cell-printable"?t.setSelectedCellAttr("printable",!0):l==="cell-non-printable"?t.setSelectedCellAttr("printable",!1):l==="cell-editable"?t.setSelectedCellAttr("editable",!0):l==="cell-non-editable"&&t.setSelectedCellAttr("editable",!1),nt.call(this),O.call(this))}function dl(l,t){const{data:e}=this;if(l==="undo")this.undo();else if(l==="redo")this.redo();else if(l==="print")this.print.preview();else if(l==="paintformat")t===!0?Jt.call(this):nt.call(this);else if(l==="clearformat")St.call(this,"delete-cell-format");else if(l!=="link"){if(l!=="chart")if(l==="autofilter")nl.call(this);else if(l==="freeze")if(t){const{ri:s,ci:i}=e.selector;this.freeze(s,i)}else this.freeze(0,0);else e.setSelectedCellAttr(l,t),l==="formula"&&!e.selector.multiple()&&ct.call(this),O.call(this)}}function fl(l,t,e,s){this.data.setAutoFilter(l,t,e,s),O.call(this)}function ul(){const{selector:l,overlayerEl:t,rowResizer:e,colResizer:s,verticalScrollbar:i,horizontalScrollbar:n,editor:r,contextMenu:o,toolbar:c,modalValidation:h,sortFilter:d}=this;t.on("mousemove",a=>{tl.call(this,a)}).on("mousedown",a=>{r.clear(),o.hide(),a.buttons===2?(this.data.xyInSelectedRect(a.offsetX,a.offsetY)||je.call(this,a),o.setPosition(a.offsetX,a.offsetY),a.stopPropagation()):a.detail===2?ct.call(this):je.call(this,a)}).on("mousewheel.stop",a=>{el.call(this,a)}).on("mouseout",a=>{const{offsetX:f,offsetY:g}=a;g<=0&&s.hide(),f<=0&&e.hide()}),l.inputChange=a=>{Gt.call(this,a,"input"),ct.call(this)},vs(t.el,{move:(a,f)=>{sl.call(this,a,f)}}),c.change=(a,f)=>dl.call(this,a,f),d.ok=(a,f,g,p)=>fl.call(this,a,f,g,p),e.finishedFn=(a,f)=>{hl.call(this,a,f)},s.finishedFn=(a,f)=>{al.call(this,a,f)},e.unhideFn=a=>{qe.call(this,"row",a)},s.unhideFn=a=>{qe.call(this,"col",a)},i.moveFn=(a,f)=>{ol.call(this,a,f)},n.moveFn=(a,f)=>{cl.call(this,a,f)},r.change=(a,f)=>{Gt.call(this,f,a)},h.change=(a,...f)=>{a==="save"?this.data.addValidation(...f):this.data.removeValidation()},o.itemClick=a=>{a==="validation"?h.setValue(this.data.getSelectedValidation()):a==="copy"?Jt.call(this):a==="cut"?Le.call(this):a==="paste"?rt.call(this,"all"):a==="paste-value"?rt.call(this,"text"):a==="paste-format"?rt.call(this,"format"):a==="hide"?ll.call(this):St.call(this,a)},A(window,"resize",()=>{this.reload()}),A(window,"click",a=>{this.focusing=t.contains(a.target)}),A(window,"paste",a=>{this.focusing&&(rt.call(this,"all",a),a.preventDefault())}),A(window,"copy",a=>{this.focusing&&(Jt.call(this,a),a.preventDefault())}),A(window,"keydown",a=>{if(!this.focusing)return;const f=a.keyCode||a.which,{key:g,ctrlKey:p,shiftKey:w,metaKey:b}=a;if(p||b)switch(f){case 90:this.undo(),a.preventDefault();break;case 89:this.redo(),a.preventDefault();break;case 67:break;case 88:Le.call(this),a.preventDefault();break;case 85:c.trigger("underline"),a.preventDefault();break;case 86:break;case 37:W.call(this,w,"row-first"),a.preventDefault();break;case 38:W.call(this,w,"col-first"),a.preventDefault();break;case 39:W.call(this,w,"row-last"),a.preventDefault();break;case 40:W.call(this,w,"col-last"),a.preventDefault();break;case 32:X.call(this,!1,-1,this.data.selector.ci,!1),a.preventDefault();break;case 66:c.trigger("bold");break;case 73:c.trigger("italic");break}else{switch(f){case 32:w&&X.call(this,!1,this.data.selector.ri,-1,!1);break;case 27:o.hide(),nt.call(this);break;case 37:W.call(this,w,"left"),a.preventDefault();break;case 38:W.call(this,w,"up"),a.preventDefault();break;case 39:W.call(this,w,"right"),a.preventDefault();break;case 40:W.call(this,w,"down"),a.preventDefault();break;case 9:r.clear(),W.call(this,!1,w?"left":"right"),a.preventDefault();break;case 13:r.clear(),W.call(this,!1,w?"up":"down"),a.preventDefault();break;case 8:St.call(this,"delete-cell-text"),a.preventDefault();break}g==="Delete"?(St.call(this,"delete-cell-text"),a.preventDefault()):f>=65&&f<=90||f>=48&&f<=57||f>=96&&f<=105||a.key==="="?(Gt.call(this,a.key,"input"),ct.call(this)):f===113&&ct.call(this)}})}class gl{constructor(t,e){this.eventMap=ys();const{view:s,showToolbar:i,showContextmenu:n}=e.settings;this.el=u("div",`${m}-sheet`),this.toolbar=new Yi(e,s.width,!i),this.print=new ii(e),t.children(this.toolbar.el,this.el,this.print.el),this.data=e,this.tableEl=u("canvas",`${m}-table`),this.rowResizer=new fe(!1,e.rows.height),this.colResizer=new fe(!0,e.cols.minWidth),this.verticalScrollbar=new ue(!0),this.horizontalScrollbar=new ue(!1),this.editor=new Ps(Us,()=>this.getTableOffset(),e.rows.height),this.modalValidation=new Zi,this.contextMenu=new oi(()=>this.getRect(),!n),this.selector=new Es(e),this.overlayerCEl=u("div",`${m}-overlayer-content`).children(this.editor.el,this.selector.el),this.overlayerEl=u("div",`${m}-overlayer`).child(this.overlayerCEl),this.sortFilter=new Gi,this.el.children(this.tableEl,this.overlayerEl.el,this.rowResizer.el,this.colResizer.el,this.verticalScrollbar.el,this.horizontalScrollbar.el,this.contextMenu.el,this.modalValidation.el,this.sortFilter.el),this.table=new ti(this.tableEl.el,e),ul.call(this),O.call(this),X.call(this,!1,0,0)}on(t,e){return this.eventMap.on(t,e),this}trigger(t,...e){const{eventMap:s}=this;s.fire(t,e)}resetData(t){this.editor.clear(),this.data=t,Kt.call(this),Zt.call(this),this.toolbar.resetData(t),this.print.resetData(t),this.selector.resetData(t),this.table.resetData(t)}loadData(t){return this.data.setData(t),O.call(this),this}freeze(t,e){const{data:s}=this;return s.setFreeze(t,e),O.call(this),this}undo(){this.data.undo(),O.call(this)}redo(){this.data.redo(),O.call(this)}reload(){return O.call(this),this}getRect(){const{data:t}=this;return{width:t.viewWidth(),height:t.viewHeight()}}getTableOffset(){const{rows:t,cols:e}=this.data,{width:s,height:i}=this.getRect();return{width:s-e.indexWidth,height:i-t.height,left:e.indexWidth,top:t.height}}}class pl extends H{constructor(t){const e=new D("ellipsis");super(e,"auto",!1,"top-left"),this.contentClick=t}reset(t){const e=t.map((s,i)=>u("div",`${m}-item`).css("width","150px").css("font-weight","normal").on("click",()=>{this.contentClick(i),this.hide()}).child(s));this.setContentChildren(...e)}setTitle(){}}const ml=[{key:"delete",title:E("contextmenu.deleteSheet")}];function wl(l){return u("div",`${m}-item`).child(l.title()).on("click",()=>{this.itemClick(l.key),this.hide()})}function bl(){return ml.map(l=>wl.call(this,l))}class xl{constructor(){this.el=u("div",`${m}-contextmenu`).css("width","160px").children(...bl.call(this)).hide(),this.itemClick=()=>{}}hide(){const{el:t}=this;t.hide(),G(t)}setOffset(t){const{el:e}=this;e.offset(t),e.show(),it(e)}}class vl{constructor(t=()=>{},e=()=>{},s=()=>{},i=()=>{}){this.swapFunc=e,this.updateFunc=i,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new pl(n=>{this.clickSwap2(this.items[n])}),this.contextMenu=new xl,this.contextMenu.itemClick=s,this.el=u("div",`${m}-bottombar`).children(this.contextMenu.el,this.menuEl=u("ul",`${m}-menu`).child(u("li","").children(new D("add").on("click",()=>{t()}),u("span","").child(this.moreEl))))}addItem(t,e,s){this.dataNames.push(t);const i=u("li",e?"active":"").child(t);i.on("click",()=>{this.clickSwap2(i)}).on("contextmenu",n=>{if(s.mode==="read")return;const{offsetLeft:r,offsetHeight:o}=n.target;this.contextMenu.setOffset({left:r,bottom:o+1}),this.deleteEl=i}).on("dblclick",()=>{if(s.mode==="read")return;const n=i.html(),r=new et("auto","");r.val(n),r.input.on("blur",({target:o})=>{const{value:c}=o,h=this.dataNames.findIndex(d=>d===n);this.renameItem(h,c)}),i.html("").child(r.el),r.focus()}),e&&this.clickSwap(i),this.items.push(i),this.menuEl.child(i),this.moreEl.reset(this.dataNames)}renameItem(t,e){this.dataNames.splice(t,1,e),this.moreEl.reset(this.dataNames),this.items[t].html("").child(e),this.updateFunc(t,e)}clear(){this.items.forEach(t=>{this.menuEl.removeChild(t.el)}),this.items=[],this.dataNames=[],this.moreEl.reset(this.dataNames)}deleteItem(){const{activeEl:t,deleteEl:e}=this;if(this.items.length>1){const s=this.items.findIndex(i=>i===e);if(this.items.splice(s,1),this.dataNames.splice(s,1),this.menuEl.removeChild(e.el),this.moreEl.reset(this.dataNames),t===e){const[i]=this.items;return this.activeEl=i,this.activeEl.toggle(),[s,0]}return[s,-1]}return[-1]}clickSwap2(t){const e=this.items.findIndex(s=>s===t);this.clickSwap(t),this.activeEl.toggle(),this.swapFunc(e)}clickSwap(t){this.activeEl!==null&&this.activeEl.toggle(),this.activeEl=t}}class yl{constructor(t,e={}){let s=t;this.options={showBottomBar:!0,...e},this.sheetIndex=1,this.datas=[],typeof t=="string"&&(s=document.querySelector(t)),this.bottombar=this.options.showBottomBar?new vl(()=>{if(this.options.mode==="read")return;const n=this.addSheet();this.sheet.resetData(n)},n=>{const r=this.datas[n];this.sheet.resetData(r)},()=>{this.deleteSheet()},(n,r)=>{this.datas[n].name=r,this.sheet.trigger("change")}):null,this.data=this.addSheet();const i=u("div",`${m}`).on("contextmenu",n=>n.preventDefault());s.appendChild(i.el),this.sheet=new gl(i,this.data),this.bottombar!==null&&i.child(this.bottombar.el)}addSheet(t,e=!0){const s=t||`sheet${this.sheetIndex}`,i=new xs(s,this.options);return i.change=(...n)=>{this.sheet.trigger("change",...n)},this.datas.push(i),this.bottombar!==null&&this.bottombar.addItem(s,e,this.options),this.sheetIndex+=1,i}deleteSheet(){if(this.bottombar===null)return;const[t,e]=this.bottombar.deleteItem();t>=0&&(this.datas.splice(t,1),e>=0&&this.sheet.resetData(this.datas[e]),this.sheet.trigger("change"))}loadData(t){const e=Array.isArray(t)?t:[t];if(this.bottombar!==null&&this.bottombar.clear(),this.datas=[],e.length>0)for(let s=0;s<e.length;s+=1){const i=e[s],n=this.addSheet(i.name,s===0);n.setData(i),s===0&&this.sheet.resetData(n)}return this}getData(){return this.datas.map(t=>t.getData())}cellText(t,e,s,i=0){return this.datas[i].setCellText(t,e,s,"finished"),this}cell(t,e,s=0){return this.datas[s].getCell(t,e)}cellStyle(t,e,s=0){return this.datas[s].getCellStyle(t,e)}reRender(){return this.sheet.table.render(),this}on(t,e){return this.sheet.on(t,e),this}validate(){const{validations:t}=this.data;return t.errors.size<=0}change(t){return this.sheet.on("change",t),this}static locale(t,e){ne(t,e)}}const Ue=(l,t={})=>new yl(l,t);window&&(window.x_spreadsheet=Ue,window.x_spreadsheet.locale=(l,t)=>ne(l,t));const Ye={sheets:[{name:"示例表格",styles:[{bgcolor:"#eef4ff",font:{bold:!0}},{bgcolor:"#f7f8fa",font:{bold:!0}},{color:"#1a56db",font:{bold:!0}},{format:"percent"},{format:"number"}],merges:["A1:D1"],cols:{0:{width:140},1:{width:110},2:{width:110},3:{width:130},len:8},rows:{0:{cells:{0:{text:"2026 年季度销售概览(示例数据)",style:0}}},1:{cells:{0:{text:"季度",style:1},1:{text:"收入(万元)",style:1},2:{text:"成本(万元)",style:1},3:{text:"毛利率",style:1}}},2:{cells:{0:{text:"Q1"},1:{text:"128.5"},2:{text:"74.2"},3:{text:"42.2",style:3}}},3:{cells:{0:{text:"Q2"},1:{text:"156.0"},2:{text:"88.4"},3:{text:"43.3",style:3}}},4:{cells:{0:{text:"Q3"},1:{text:"173.2"},2:{text:"95.1"},3:{text:"45.1",style:3}}},5:{cells:{0:{text:"合计 / 平均",style:1},1:{text:"=SUM(B3:B5)",style:1},2:{text:"=SUM(C3:C5)",style:1},3:{text:"=AVERAGE(D3:D5)",style:4}}},7:{cells:{0:{text:"数据格式:{ name, cols, rows{cells{ci:{text,style}}}, merges, styles }",style:2}}}}}]},kl=["change","cell-selected","cells-selected","cell-edited"];function ht(l){if(!l||typeof l!="object")return null;const t=l;let e=null;if(Array.isArray(l)?e=l:Array.isArray(t.sheets)?e=t.sheets:Array.isArray(t.data)?e=t.data:(t.rows||t.cols||t.styles||t.merges)&&(e=[l]),!Array.isArray(e)||e.length===0)return null;const s=e.filter(i=>!!i&&typeof i=="object");return s.length===0?null:s.map((i,n)=>({...i,name:i.name||`sheet${n+1}`}))}function Cl(l){const t=(l||"").trim();if(!t)return null;try{return ht(JSON.parse(t))}catch{return null}}class El{constructor(){this.version="1.0.0",this.instance=null,this.host=null,this.observer=null,this.mode="edit",this.handlers=new Map,this.readyFlag=!1}async mount(t,e={}){const s=typeof t=="string"?document.querySelector(t):t;if(!s)throw new Error("[excel-full-editor] 目标容器不存在");this.unmount();const i=document.createElement("div");i.className="excel-full-host",s.appendChild(i),this.host=i,this.mode=e.mode==="read"?"read":"edit",this.instance=Ue(i,{mode:this.mode,showToolbar:this.mode==="edit",showContextmenu:this.mode==="edit",showBottomBar:!0,showGrid:!0,...e.options,view:{width:()=>i.clientWidth||1,height:()=>i.clientHeight||1}});const n=ht(e.data)??Cl(e.viewDoc)??ht(Ye)??[];try{this.instance.loadData(n)}catch(r){console.warn("[excel-full-editor] 数据装载失败,降级内置示例:",r);try{this.instance.loadData(ht(Ye)??[])}catch(o){console.error("[excel-full-editor] 内置示例装载失败:",o)}}for(const r of kl)this.instance.on(r,(...o)=>this.emit(r,...o));typeof ResizeObserver<"u"&&(this.observer=new ResizeObserver(()=>{!this.instance||!i.isConnected||window.requestAnimationFrame(()=>{var r,o;return(o=(r=this.instance)==null?void 0:r.reRender)==null?void 0:o.call(r)})}),this.observer.observe(i)),await Promise.resolve(),this.readyFlag=!0,this.emit("ready")}unmount(){this.observer&&(this.observer.disconnect(),this.observer=null),this.host&&(this.host.remove(),this.host=null);const t=this.instance!==null;this.instance=null,this.readyFlag=!1,t&&this.emit("unmount")}isMounted(){return this.instance!==null}load(t){const e=ht(t);return!this.instance||!e?this:(this.instance.loadData(e),this)}dump(){if(!this.instance)return[];const t=this.instance.getData();return Array.isArray(t)?t:[t]}cellText(t,e,s,i=0){var n,r,o;if(this.instance)return s===void 0?((o=(r=(n=this.instance).cell)==null?void 0:r.call(n,t,e,i))==null?void 0:o.text)??"":(this.instance.cellText(t,e,s,i),this)}cell(t,e,s=0){var i,n;return(n=(i=this.instance)==null?void 0:i.cell)==null?void 0:n.call(i,t,e,s)}cellStyle(t,e,s=0){var i,n;return(n=(i=this.instance)==null?void 0:i.cellStyle)==null?void 0:n.call(i,t,e,s)}sheets(){return this.dump().map((t,e)=>({name:t.name||`sheet${e+1}`,index:e}))}async setMode(t){var i;const e=(i=this.host)==null?void 0:i.parentElement;if(!e||!this.instance){this.mode=t;return}const s=this.dump();await this.mount(e,{data:s,mode:t})}reRender(){var t,e;return(e=(t=this.instance)==null?void 0:t.reRender)==null||e.call(t),this}on(t,e){if(typeof e!="function")return this;const s=this.handlers.get(t)??new Set;return s.add(e),this.handlers.set(t,s),this}off(t,e){const s=this.handlers.get(t);return s?(e?s.delete(e):s.clear(),this):this}describe(){var e;const t=this.sheets();return{mounted:this.isMounted(),mode:this.mode,sheets:t.map(s=>s.name),rows:(e=this.dump()[0])!=null&&e.rows?Object.keys(this.dump()[0].rows).length:0,ready:this.readyFlag}}help(){const t={"ExcelApp.mount(el, options)":"挂载编辑器(options: data/viewDoc/mode/options)","ExcelApp.unmount()":"卸载编辑器","ExcelApp.isMounted()":"是否已挂载","ExcelApp.load(data)":"载入表格数据(三形兼容)","ExcelApp.dump()":"导出完整表格数据(sheet 数组)","ExcelApp.sheets()":"工作表清单","ExcelApp.cellText(ri, ci, text?, sheetIndex?)":"读/写单元格文本","ExcelApp.cell(ri, ci, sheetIndex?)":"读单元格","ExcelApp.cellStyle(ri, ci, sheetIndex?)":"读单元格样式",'ExcelApp.setMode("edit"|"read")':"切换编辑 / 只读","ExcelApp.reRender()":"强制重绘","ExcelApp.describe()":"结构化摘要","ExcelApp.on(type, fn) / off(type, fn)":"事件:ready/change/cell-selected/cells-selected/cell-edited/unmount"};return console.table(t),t}emit(t,...e){const s=this.handlers.get(t);if(s)for(const i of s)try{i(...e)}catch(n){console.error(`[excel-full-editor] 事件 ${t} 处理失败:`,n)}}}const $t=new El;if(window.ExcelApp=$t,typeof window<"u"&&window.Work)window.Work.register({mount(l){$t.mount(l.stage,{viewDoc:typeof l.viewDoc=="string"?l.viewDoc:void 0,mode:"edit"}).then(()=>{typeof l.ready=="function"&&l.ready()}).catch(t=>{console.error("[excel-full-editor] mount failed:",t),l.stage&&(l.stage.innerHTML='<div style="padding:24px;font:14px/1.6 system-ui;color:#b3261e">Excel 表格编辑器装载失败,请刷新重试。</div>'),typeof l.ready=="function"&&l.ready()})},destroy(){$t.unmount()}});else{const l=()=>{const t=document.querySelector("#app")??document.body;$t.mount(t,{mode:"edit"})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",l):l()}})();
@@ -0,0 +1 @@
1
+ {"status":"ok","item":{"id":3897,"ref":"WORKS-3897","name":"极简网页录屏","tags":"桌面应用,录屏,工具","image_url":"","thumb_url":"","emoji":"🎥","status":3,"visible_to":[],"is_pinned":false,"is_locked":false,"ban_hidden":false,"author":"maple496","author_id":4,"author_username":"maple496","author_avatar":"emoji:🌈","view_count":41,"like_count":1,"favorite_count":0,"fork_count":0,"referenced_count":0,"latest_version":2,"default_version":2,"forked_from_ref":"","fork_base_version":0,"description":"# 极简网页录屏\n\n浏览器里直接用的极简录屏工具:点一下开始,再点一下结束,文件自动落盘。\n本作品是桌面应用入口,点开在新标签页打开录制界面。\n\n## 用法\n\n1. 点作品卡片 → 新标签页打开录制界面(https://ddr0.com/apps/works/3897/);\n2. 点「开始录制」或按 F9,在浏览器弹窗里选择要录的屏幕 / 窗口 / 标签页;\n3. 再点一次(或按 F9)结束,视频自动保存;\n4. 可选:点「选择保存文件夹」直接存到指定目录(Chrome / Edge)。\n\n## 说明\n\n- 分辨率自适应,最高 1080p;优先 MP4(H.264),浏览器不支持时自动退回 WebM;\n- 录制全程在本地完成,视频不上传、不经过服务器;\n- 需要 Chrome / Edge 等支持屏幕采集的浏览器,且页面需处于聚焦状态快捷键才生效;\n- 录制页跑在独立页面而非作品沙箱内:浏览器的屏幕采集在沙箱(opaque origin)\n 中被权限策略硬性禁止,只有真实页面才能调用。","description_truncated":false,"description_next_offset":450,"brief":"零设置网页录屏:一键开录,最高 1080p,自动存 MP4(不支持时 WebM)","created_at":"2026-11-05T23:22:54.228945+08:00","last_published_at":"2026-11-05T23:26:03.929935+08:00","updated_at":"2026-11-05T23:26:03.923887+08:00","code_url":"","has_code":false,"view":{"kind":"link","url":"https://ddr0.com/apps/works/3897/"},"launch":{"type":"external","url":"https://ddr0.com/apps/works/3897/"},"item_type":"works","delivery_adopted":null,"delivery_published":null,"is_favorited":false,"references":[],"attachments":[]}}
@@ -0,0 +1 @@
1
+ {"liked":true,"favorited":false}
@@ -0,0 +1 @@
1
+ {"status":"ok","item":{"id":3898,"ref":"WORKS-3898","name":"极简网页视频剪辑","tags":"桌面应用,视频,工具","image_url":"","thumb_url":"","emoji":"🎬","status":3,"visible_to":[],"is_pinned":false,"is_locked":false,"ban_hidden":false,"author":"站长","author_id":1,"author_username":"root","author_avatar":"emoji:🦔","view_count":11,"like_count":0,"favorite_count":0,"fork_count":0,"referenced_count":0,"latest_version":3,"default_version":3,"forked_from_ref":"","fork_base_version":0,"description":"# 极简网页视频剪辑\n\n浏览器里直接用的极简视频剪辑工具:多段裁剪、拼接、滤镜调色,全程本地完成,视频文件不上传。\n本作品是外接应用入口,点开在新标签页打开剪辑界面。\n\n## 用法\n\n1. 选择或拖入本地视频文件(MP4 / WebM / MOV 等浏览器能播的格式);\n2. 播放或拖动到想要的位置,按 **I** 设入点、**O** 设出点,点「添加段」\n (可添加多段,自动按时间序合并;时间线上可直接拖段边微调);\n3. 可调亮度 / 对比度 / 饱和度滤镜,所见即所得;\n4. 点「预览拼接」连播所有保留段,确认效果;\n5. 点「导出视频」,成片自动下载。\n\n## 说明\n\n- 剪辑全程在浏览器本地完成:视频不上传、不经过服务器;\n- 导出为实时渲染,耗时约等于所选段总时长,过程中请保持页面在前台;\n- 导出格式优先 MP4(H.264+AAC),浏览器不支持时自动回退 WebM;\n- 需要 Chrome / Edge 等支持 MediaRecorder 的现代浏览器。","description_truncated":false,"description_next_offset":444,"brief":"浏览器里多段裁剪拼接视频:剪切、滤镜调色、本地导出 MP4/WebM,全程零上传。","created_at":"2026-11-12T00:33:12.333374+08:00","last_published_at":"2026-11-12T07:33:31.932953+08:00","updated_at":"2026-11-12T07:33:31.927022+08:00","code_url":"","has_code":false,"view":{"kind":"link","url":"https://ddr0.com/apps/works/3898/"},"launch":{"type":"external","url":"https://ddr0.com/apps/works/3898/"},"item_type":"works","delivery_adopted":null,"delivery_published":null,"is_favorited":false,"references":[],"attachments":[]}}
@@ -0,0 +1 @@
1
+ {"liked":false,"favorited":false}
@@ -0,0 +1 @@
1
+ {"status":"ok","item":{"id":3900,"ref":"WORKS-3900","name":"Saltline · 盐线","tags":"游戏,射击,潜行,3D,单机","image_url":"","thumb_url":"","emoji":"🧂","status":3,"visible_to":[],"is_pinned":false,"is_locked":false,"ban_hidden":false,"author":"站长","author_id":1,"author_username":"root","author_avatar":"emoji:🦔","view_count":13,"like_count":0,"favorite_count":0,"fork_count":0,"referenced_count":0,"latest_version":3,"default_version":3,"forked_from_ref":"","fork_base_version":0,"description":"潜入失控的终端港:切断三座上行中继,登上接应的船——全程序化 3D 潜行射击。\n\n**第一人称潜入射击 · 全程序化 3D · 单文件零下载**\n\n## 玩法与操作\n\n- **桌面**:`WASD` 移动 · 鼠标视角 · `左键` 开火 · `右键` 瞄准 · `R` 装填 · `E` 切断中继 · `空格` 跳 · `Shift` 疾跑 · `C` 蹲伏 · `Z` 切换瞄准 · `Esc` 暂停\n- **移动端**:双摇杆触控(左半屏移动、右半屏视角,按住 FIRE 拖动可追踪目标),AIM / RLD / JUMP 键位\n- **战术道具**(各一次充能):**诱饵** —— 8 秒内向 14m 内敌人广播假警报;**弹药箱** —— 备弹 +60;**兴奋剂** —— 生命 +50\n- 敌人是会互相通报的安保机器(有弱点部位);切断中继会触发警报,行动要讲究顺序\n\n## 特点\n\n- **全程序化生成**:所有表面、机械与音效都在浏览器里实时合成,零资源下载,秒开\n- three.js 实时 3D,港务稽查站美术风格;内置 中 / 日 / 韩 / EN 四语言(标题页语言条可切)\n- 进度与语言偏好走 localStorage(平台沙箱内为**会话级**内存假面:单次游玩内有效,跨会话不保留)\n- 容器内 Esc 不会穿透到平台容器——关窗请用容器自带的关闭钮\n\n## 来源说明\n\n- 原作为[作者的 claude.ai artifact](https://claude.ai/artifact/BGY1SztrAYcJQHSsnHHGmp)(本人作品,即本站 root 账号)\n- 本上架版以社区非官方移植增强版(workbuddy 分享构建,自带移动端触控层与四语言 i18n)为底整理:**游戏代码零改动**,仅将 Google Fonts 字体内嵌为 data: URI(离线可运行 + 平台 CSP 合规)\n- 结构:游戏文档(约 2.4MB 单文件)以 base64 内嵌于入口脚本,挂载时注入作品沙箱的嵌套 iframe(独立文档)运行;游戏文档内部的视口级 CSS 定位均在嵌套文档内,不参与宿主舞台坐标系\n","description_truncated":false,"description_next_offset":925,"brief":"潜入失控的终端港:切断三座上行中继,登上接应的船——全程序化 3D 潜行射击。","created_at":"2026-11-13T23:54:40.404875+08:00","last_published_at":"2026-11-14T01:12:10.332969+08:00","updated_at":"2026-11-14T01:12:10.330770+08:00","code_url":"/api/works/works/3900/version/3/js","has_code":true,"view":{"kind":"code"},"launch":{"type":"runtime","runtime":{"contract":"work-v1","work_ref":"WORKS-3900","code_url":"/api/works/works/3900/version/3/js","caps_url":"","decorator":""}},"item_type":"works","delivery_adopted":null,"delivery_published":null,"is_favorited":false,"references":[],"attachments":[]}}
@@ -0,0 +1 @@
1
+ {"liked":false,"favorited":false}