@capyclaw/offline-ddr0 0.0.0-stage → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +441 -2
- package/client/client.js +603 -0
- package/cordis.patch.yml +13 -0
- package/docs/STORAGE-MIGRATION.md +136 -0
- package/lib/atomic.mjs +40 -0
- package/lib/http-cache.mjs +42 -0
- package/lib/inbox.mjs +64 -0
- package/lib/media.mjs +242 -0
- package/lib/migrate-json.mjs +101 -0
- package/lib/mirror-index.mjs +105 -0
- package/lib/mirror.mjs +123 -0
- package/lib/proxy.mjs +188 -0
- package/lib/remote.mjs +158 -0
- package/lib/render.mjs +93 -0
- package/lib/repository.mjs +71 -0
- package/lib/store.mjs +610 -0
- package/lib/surface.mjs +74 -0
- package/lib/sync-ui.mjs +108 -0
- package/lib/sync.mjs +433 -0
- package/lib/wire.mjs +211 -0
- package/lib/workstore-repository.mjs +316 -0
- package/lib/workstore.mjs +338 -0
- package/mirror/files/00001.html +2045 -0
- package/mirror/files/00002.json +1 -0
- package/mirror/files/00003.json +1 -0
- package/mirror/files/00004.json +1 -0
- package/mirror/files/00005.json +1 -0
- package/mirror/files/00006.json +1 -0
- package/mirror/files/00007.json +1 -0
- package/mirror/files/00008.json +1 -0
- package/mirror/files/00009.json +1 -0
- package/mirror/files/00010.json +1 -0
- package/mirror/files/00011.json +1 -0
- package/mirror/files/00012.json +1 -0
- package/mirror/files/00013.json +1 -0
- package/mirror/files/00014.json +1 -0
- package/mirror/files/00015.json +1 -0
- package/mirror/files/00016.json +1 -0
- package/mirror/files/00017.json +1 -0
- package/mirror/files/00018.json +1 -0
- package/mirror/files/00019.json +1 -0
- package/mirror/files/00020.json +1 -0
- package/mirror/files/00021.json +1 -0
- package/mirror/files/00022.json +1 -0
- package/mirror/files/00023.js +205 -0
- package/mirror/files/00024.json +1 -0
- package/mirror/files/00025.json +1 -0
- package/mirror/files/00026.json +1 -0
- package/mirror/files/00027.js +51 -0
- package/mirror/files/00028.json +1 -0
- package/mirror/files/00029.json +1 -0
- package/mirror/files/00030.json +1 -0
- package/mirror/files/00031.json +1 -0
- package/mirror/files/00032.json +1 -0
- package/mirror/files/00033.json +1 -0
- package/mirror/files/00034.json +1 -0
- package/mirror/files/00035.json +1 -0
- package/mirror/files/00036.json +1 -0
- package/mirror/files/00037.json +1 -0
- package/mirror/files/00038.json +1 -0
- package/mirror/files/00039.json +1 -0
- package/mirror/files/00040.js +2311 -0
- package/mirror/files/00041.json +1 -0
- package/mirror/files/00042.json +1 -0
- package/mirror/files/00043.json +1 -0
- package/mirror/files/00044.json +1 -0
- package/mirror/files/00045.js +575 -0
- package/mirror/files/00046.json +1 -0
- package/mirror/files/00047.js +575 -0
- package/mirror/files/00048.js +575 -0
- package/mirror/files/00049.json +1 -0
- package/mirror/files/00050.json +1 -0
- package/mirror/files/00051.json +1 -0
- package/mirror/files/00052.json +1 -0
- package/mirror/files/00053.js +575 -0
- package/mirror/files/00054.json +1 -0
- package/mirror/files/00055.json +1 -0
- package/mirror/files/00056.js +575 -0
- package/mirror/files/00057.json +1 -0
- package/mirror/files/00058.json +1 -0
- package/mirror/files/00059.js +360 -0
- package/mirror/files/00060.json +1 -0
- package/mirror/files/00061.json +1 -0
- package/mirror/files/00062.json +1 -0
- package/mirror/files/00063.json +1 -0
- package/mirror/files/00064.json +1 -0
- package/mirror/files/00065.js +144 -0
- package/mirror/files/00066.js +7 -0
- package/mirror/files/00067.json +1 -0
- package/mirror/files/00068.json +1 -0
- package/mirror/files/00069.json +1 -0
- package/mirror/files/00070.json +1 -0
- package/mirror/files/00071.json +1 -0
- package/mirror/files/00072.json +1 -0
- package/mirror/files/00073.js +1 -0
- package/mirror/files/00074.json +1 -0
- package/mirror/files/00075.json +1 -0
- package/mirror/files/00076.json +1 -0
- package/mirror/files/00077.js +45 -0
- package/mirror/files/00078.js +1348 -0
- package/mirror/files/00079.json +1 -0
- package/mirror/files/00080.json +1 -0
- package/mirror/files/00081.js +1 -0
- package/mirror/files/00082.json +1 -0
- package/mirror/files/00083.json +1 -0
- package/mirror/files/00084.js +7 -0
- package/mirror/files/00085.json +1 -0
- package/mirror/files/00086.json +1 -0
- package/mirror/files/00087.js +7 -0
- package/mirror/files/00088.json +1 -0
- package/mirror/files/00089.json +1 -0
- package/mirror/files/00090.js +7 -0
- package/mirror/files/00091.json +1 -0
- package/mirror/files/00092.json +1 -0
- package/mirror/files/00093.js +102 -0
- package/mirror/files/00094.json +1 -0
- package/mirror/files/00095.json +1 -0
- package/mirror/files/00096.json +1 -0
- package/mirror/files/00097.json +1 -0
- package/mirror/files/00098.json +1 -0
- package/mirror/files/00099.json +1 -0
- package/mirror/files/00100.json +1 -0
- package/mirror/files/00101.js +102 -0
- package/mirror/files/00102.json +1 -0
- package/mirror/files/00103.json +1 -0
- package/mirror/files/00104.json +1 -0
- package/mirror/files/00105.json +1 -0
- package/mirror/files/00106.json +1 -0
- package/mirror/files/00107.js +110 -0
- package/mirror/files/00108.json +1 -0
- package/mirror/files/00109.json +1 -0
- package/mirror/files/00110.json +1 -0
- package/mirror/files/00111.json +1 -0
- package/mirror/files/00112.json +1 -0
- package/mirror/files/00113.json +1 -0
- package/mirror/files/00114.json +1 -0
- package/mirror/files/00115.json +1 -0
- package/mirror/files/00116.json +1 -0
- package/mirror/files/00117.json +1 -0
- package/mirror/files/00118.json +1 -0
- package/mirror/files/00119.json +1 -0
- package/mirror/files/00120.json +1 -0
- package/mirror/files/00121.json +1 -0
- package/mirror/files/00122.json +1 -0
- package/mirror/files/00123.json +1 -0
- package/mirror/files/00124.json +1 -0
- package/mirror/files/00125.json +1 -0
- package/mirror/files/00126.json +1 -0
- package/mirror/files/00127.json +1 -0
- package/mirror/files/00128.json +1 -0
- package/mirror/files/00129.json +1 -0
- package/mirror/files/00130.json +1 -0
- package/mirror/files/00131.json +1 -0
- package/mirror/files/00132.js +110 -0
- package/mirror/files/00133.json +1 -0
- package/mirror/files/00134.json +1 -0
- package/mirror/files/00135.json +1 -0
- package/mirror/files/00136.json +1 -0
- package/mirror/files/00137.js +26 -0
- package/mirror/files/00138.json +1 -0
- package/mirror/files/00139.json +1 -0
- package/mirror/files/00140.json +1 -0
- package/mirror/files/00141.json +1 -0
- package/mirror/files/00142.json +1 -0
- package/mirror/files/00143.json +1 -0
- package/mirror/files/00144.js +26 -0
- package/mirror/files/00145.json +1 -0
- package/mirror/files/00146.json +1 -0
- package/mirror/files/00147.js +29 -0
- package/mirror/files/00148.json +1 -0
- package/mirror/files/00149.json +1 -0
- package/mirror/files/00150.js +23 -0
- package/mirror/files/00151.json +1 -0
- package/mirror/files/00152.json +1 -0
- package/mirror/files/00153.js +719 -0
- package/mirror/files/00154.js +9575 -0
- package/mirror/files/00155.js +108 -0
- package/mirror/files/00156.js +379 -0
- package/mirror/files/00157.js +48 -0
- package/mirror/files/00158.json +16 -0
- package/mirror/manifest.json +1582 -0
- package/node_modules/@capyclaw/asset-service/README.md +48 -0
- package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
- package/node_modules/@capyclaw/asset-service/package.json +59 -0
- package/node_modules/@capyclaw/asset-service/src/index.mjs +223 -0
- package/node_modules/@capyclaw/foundation/README.md +51 -0
- package/node_modules/@capyclaw/foundation/abi/bridge.mjs +86 -0
- package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
- package/node_modules/@capyclaw/foundation/abi/index.mjs +35 -0
- package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
- package/node_modules/@capyclaw/foundation/abi/loader.mjs +345 -0
- package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
- package/node_modules/@capyclaw/foundation/abi/spec.mjs +255 -0
- package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
- package/node_modules/@capyclaw/foundation/abi/version.mjs +82 -0
- package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
- package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +55 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +68 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +113 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
- package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
- package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +34 -0
- package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +85 -0
- package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +160 -0
- package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
- package/node_modules/@capyclaw/foundation/lib/kernel.mjs +185 -0
- package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +87 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +188 -0
- package/node_modules/@capyclaw/foundation/package.json +53 -0
- package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
- package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
- package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
- package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
- package/node_modules/@capyclaw/plugin-kit/package.json +69 -0
- package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
- package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +129 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +139 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
- package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
- package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +150 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
- package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +57 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
- package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
- package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +656 -0
- package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
- package/node_modules/@capyclaw/service-host/README.md +86 -0
- package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
- package/node_modules/@capyclaw/service-host/package.json +60 -0
- package/node_modules/@capyclaw/service-host/src/index.mjs +571 -0
- package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
- package/node_modules/@capyclaw/suite-kit/README.md +238 -0
- package/node_modules/@capyclaw/suite-kit/bin/dsh-domain.mjs +98 -0
- package/node_modules/@capyclaw/suite-kit/bin/dsh-suite.mjs +174 -0
- package/node_modules/@capyclaw/suite-kit/client/embed.js +35 -0
- package/node_modules/@capyclaw/suite-kit/domain.schema.json +129 -0
- package/node_modules/@capyclaw/suite-kit/package.json +54 -0
- package/node_modules/@capyclaw/suite-kit/src/activation-registry.mjs +184 -0
- package/node_modules/@capyclaw/suite-kit/src/artifacts.mjs +131 -0
- package/node_modules/@capyclaw/suite-kit/src/capability.mjs +181 -0
- package/node_modules/@capyclaw/suite-kit/src/compose.mjs +201 -0
- package/node_modules/@capyclaw/suite-kit/src/domain.mjs +138 -0
- package/node_modules/@capyclaw/suite-kit/src/embed.mjs +81 -0
- package/node_modules/@capyclaw/suite-kit/src/index.mjs +10 -0
- package/node_modules/@capyclaw/suite-kit/src/manifest.mjs +263 -0
- package/node_modules/@capyclaw/suite-kit/src/orchestration.mjs +100 -0
- package/node_modules/@capyclaw/suite-kit/src/profile.mjs +584 -0
- package/node_modules/@capyclaw/suite-kit/src/surface.mjs +28 -0
- package/node_modules/@capyclaw/suite-kit/suite.schema.json +112 -0
- package/node_modules/@capyclaw/work-store/README.md +83 -0
- package/node_modules/@capyclaw/work-store/STANDARD.md +257 -0
- package/node_modules/@capyclaw/work-store/cordis.patch.yml +3 -0
- package/node_modules/@capyclaw/work-store/dsh-suite.json +26 -0
- package/node_modules/@capyclaw/work-store/icon.svg +7 -0
- package/node_modules/@capyclaw/work-store/lib/host.mjs +21 -0
- package/node_modules/@capyclaw/work-store/package.json +68 -0
- package/node_modules/@capyclaw/work-store/src/backend.mjs +89 -0
- package/node_modules/@capyclaw/work-store/src/db.mjs +199 -0
- package/node_modules/@capyclaw/work-store/src/envelope.mjs +132 -0
- package/node_modules/@capyclaw/work-store/src/index.mjs +570 -0
- package/node_modules/@capyclaw/work-store/src/interop.mjs +70 -0
- package/node_modules/@capyclaw/work-store/src/refs.mjs +99 -0
- package/node_modules/@capyclaw/work-store/src/routes.mjs +135 -0
- package/package.json +82 -4
- package/plugin.mjs +636 -0
- package/static/index.html +2068 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @caps flow-kit,work-caps
|
|
3
|
+
* Excel 表格装饰器套件(x-spreadsheet 只读装配版)——
|
|
4
|
+
* META view.decorator 渲染套件:ctx.viewDoc(宿主 view.source 分节原文,
|
|
5
|
+
* 表格数据 JSON,三形兼容)只读渲染为 canvas 表格。
|
|
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-sheet-suite-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-sheet-host{width:100%;height:100%;overflow:hidden}.excel-sheet-host>.x-spreadsheet{width:100%;height:100%}.excel-sheet-host canvas{cursor:default}.excel-sheet-host .x-spreadsheet-bottombar,.excel-sheet-host .x-spreadsheet-toolbar,.excel-sheet-host .x-spreadsheet-contextmenu{display:none!important}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
12
|
+
(function(){"use strict";class Y{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 Y(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 Y&&(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 Y(l,t),G=["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 se(l){let t="",e=l;for(;e>=G.length;)e/=G.length,e-=1,t+=G[parseInt(e,10)%G.length];const s=l%G.length;return t+=G[s],t}function Qe(l){let t=0;for(let e=0;e!==l.length;++e)t=26*t+l.charCodeAt(e)-64;return t-1}function L(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[Qe(t),parseInt(e,10)-1]}function V(l,t){return`${se(l)}${t+1}`}function lt(l,t,e,s=()=>!0){if(t===0&&e===0)return l;const[i,n]=L(l);return s(i,n)?V(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]=L(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=V(e,t);return this.multiple()&&(n=`${n}:${V(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]=L(e[0]);let[n,r]=[i,s];return e.length>1&&([r,n]=L(e[1])),new $(i,s,n,r)}}let ts=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 es{constructor(){this.x=0,this.y=0,this.ri=0,this.ci=0}}class ss{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 is{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 ie{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 le{constructor(t,e){this.ci=t,this.order=e}asc(){return this.order==="asc"}desc(){return this.order==="desc"}}class ls{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 ie(i.ci,i.operator,i.value)),s&&(this.sort=new le(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 ie(t,e,s)):i.set(e,s)}setSort(t,e){this.sort=e?new le(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 Rt{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 Rt(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 ns(l){return JSON.parse(JSON.stringify(l))}const ne=(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]||{},ne(l[s],i)):l[s]=i})}),l);function Ft(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(!Ft(n[o],r[o]))return!1}else if(typeof n!="function"&&!Array.isArray(n)&&n instanceof Object&&!Ft(n,r))return!1}return!0}const rs=(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 os(l,t){const e=l[`${t}`];return delete l[`${t}`],e}function cs(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 hs(l,t,e){let s=0;for(let i=l;i<t;i+=1)s+=e(i);return s}function as(l,t,e){for(let s=l;s<t;s+=1)e(s)}function ds(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 Ht(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 X(l,t,e){if(Number.isNaN(t)||Number.isNaN(e))return t+l+e;const s=Ht(t),i=Ht(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,Ht(o)>5?o.toFixed(2):o;return o.toFixed(Math.max(s,i))}const z={cloneDeep:ns,merge:(...l)=>ne({},...l),equals:Ft,arrayEquals:ds,sum:rs,rangeEach:as,rangeSum:hs,rangeReduceIf:cs,deleteProperty:os,numberCalc:X};class fs{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 P=d;P<=f;P+=p)for(let H=a;H<=g;H+=w){const R=P+(k-r),Ot=H+(S-o),j=z.cloneDeep(this._[k].cells[S]);if(i&&j&&j.text&&j.text.length>0){const{text:At}=j;let zt=H-a+(P-d)+2;if(C||(zt-=v+1),At[0]==="=")j.text=At.replace(/[a-zA-Z]{1,3}\d+/g,J=>{let[It,Ge]=[0,0];return r===d?It=zt-1:Ge=zt-1,/^\d+$/.test(J)?J:lt(J,It,Ge)});else if(p<=1&&w>1&&(d>c||f<r)||w<=1&&p>1&&(a>h||g<o)||p<=1&&w<=1){const J=/[\\.\d]+$/.exec(At);if(J!==null){const It=Number(J[0])+zt-1;j.text=At.substring(0,J.index)+It}}}this.setCell(R,Ot,j,s),n(R,Ot,j)}}}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=>lt(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=>lt(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=>lt(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=>lt(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 us{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 gs={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 Mt=["en"];const re={en:gs};function oe(l,t){if(t)for(const e of Mt){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=oe(l,re);return!t&&window&&window.x_spreadsheet&&window.x_spreadsheet.$messages&&(t=oe(l,window.x_spreadsheet.$messages)),t||""}function E(l){return()=>T(l)}function ce(l,t,e=!1){e?Mt=[l]:Mt.unshift(l),t&&(re[l]=t)}const he={phone:/^[1-9]\d{10}$/,email:/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/};function F(l,t,...e){let s="";return l||(s=T(`validation.${t}`,...e)),[l,s]}class ae{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 F(!1,"required");if(/^\s*$/.test(t))return[!0];if(he[n]&&!he[n].test(t))return F(!1,"notMatch");if(n==="list")return F(this.values().includes(t),"notIn");if(s){const r=this.parseValue(t);if(s==="be"){const[o,c]=i;return F(r>=this.parseValue(o)&&r<=this.parseValue(c),"between",o,c)}if(s==="nbe"){const[o,c]=i;return F(r<this.parseValue(o)||r>this.parseValue(c),"notBetween",o,c)}if(s==="eq")return F(r===this.parseValue(i),"equal",i);if(s==="neq")return F(r!==this.parseValue(i),"notEqual",i);if(s==="lt")return F(r<this.parseValue(i),"lessThan",i);if(s==="lte")return F(r<=this.parseValue(i),"lessThanEqual",i);if(s==="gt")return F(r>this.parseValue(i),"greaterThan",i);if(s==="gte")return F(r>=this.parseValue(i),"greaterThanEqual",i)}return[!0]}}class ft{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 ft(e,t,new ae(s,i,r,n))}}class ps{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 ae(s,i,n,r),c=this.getByValidator(o);c!==null?c.addRef(e):this._.push(new ft(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=>ft.valueOf(e))}}const ms={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"}},ws=41,bs=41;function de(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 fe(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 xs(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 Q(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 vs({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)Q.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[P,H,R,Ot]=a[S];if(f===P+R+1&&p.push(S),P<=f&&f<=P+R&&g===H){g+=Ot+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&&Q.call(this,f,g,k),g+=x}}else if(l==="top"||l==="bottom")for(let a=o;a<=h;a+=1)l==="top"&&(Q.call(this,r,a,{top:[t,e]}),a+=n.getCellMerge(r,a)[1]),l==="bottom"&&(Q.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"&&(Q.call(this,a,o,{left:[t,e]}),a+=n.getCellMerge(a,o)[0]),l==="right"&&(Q.call(this,a,h,{right:[t,e]}),a+=n.getCellMerge(a,h)[0])}}function ys(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 ks(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 Cs{constructor(t,e){this.settings=z.merge(ms,e||{}),this.name=t||"sheet",this.freeze=[0,0],this.styles=[],this.merges=new Rt,this.rows=new fs(this.settings.row),this.cols=new us(this.settings.col),this.validations=new ps,this.hyperlinks={},this.comments={},this.selector=new ts,this.scroll=new es,this.history=new ss,this.clipboard=new is,this.autoFilter=new ls,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()||!de.call(this,s.range,i.range,e)?!1:(this.changeData(()=>{s.isCopy()?fe.call(this,s.range,i.range,t):s.isCut()&&xs.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 de.call(this,i,t,s)?(this.changeData(()=>{fe.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")vs.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}(${V(w,a)}:${V(w,g)})`}else if(d>1){const w=n.getCellOrNew(r,p+1);w.text=`=${e}(${V(f,r)}:${V(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}=ys.call(this,e,s.y),{ci:d,left:a,width:f}=ks.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-=bs),e&&(i-=ws),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]=L(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:V(e[1],e[0]),styles:s,merges:i.getData(),rows:n.getData(),cols:r.getData(),validations:o.getData(),autofilter:c.getData()}}}function O(l,t,e){l.addEventListener(t,e)}function ut(l,t,e){l.removeEventListener(t,e)}function tt(l){l.xclickoutside&&(ut(window.document.body,"click",l.xclickoutside),delete l.xclickoutside)}function nt(l,t){l.xclickoutside=e=>{e.detail===2||l.contains(e.target)||(t?t(l):(l.hide(),tt(l)))},O(window.document.body,"click",l.xclickoutside)}function ue(l,t,e){O(l,"mousemove",t);const s=l;s.xEvtUp=i=>{ut(l,"mousemove",t),ut(l,"mouseup",l.xEvtUp),e(i)},O(l,"mouseup",l.xEvtUp)}function ge(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 Es(l,{move:t,end:e}){let s=0,i=0;O(l,"touchstart",n=>{const{pageX:r,pageY:o}=n.touches[0];s=r,i=o}),O(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)&&(ge(c,h,n,t),s=r,i=o),n.preventDefault()}),O(l,"touchend",n=>{if(!e)return;const{pageX:r,pageY:o}=n.changedTouches[0],c=r-s,h=o-i;ge(c,h,n,e)})}function Ss(){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 pe{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(),ue(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 me{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 gt=2*2-1;let Wt=10;class pt{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",`${Wt}`).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))),Wt+=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-gt+.8,height:n-gt+.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-gt,height:n-gt,left:e,top:s}).show()}hideAutofill(){this.autofillEl.hide()}showClipboard(){this.clipboardEl.show()}hideClipboard(){this.clipboardEl.hide()}}function Nt(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 Pt(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 Vt(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 Bt(l){const{br:t}=this;t.setAreaOffset(Nt.call(this,l))}function $s(l){const{tl:t}=this;t.setAreaOffset(l)}function we(l){const{t}=this;t.setAreaOffset(Pt.call(this,l))}function be(l){const{l:t}=this;t.setAreaOffset(Vt.call(this,l))}function xe(l){const{l:t}=this;t.setClipboardOffset(Vt.call(this,l))}function _t(l){const{br:t}=this;t.setClipboardOffset(Nt.call(this,l))}function Ts(l){const{tl:t}=this;t.setClipboardOffset(l)}function ve(l){const{t}=this;t.setClipboardOffset(Pt.call(this,l))}function ye(l){Bt.call(this,l),$s.call(this,l),we.call(this,l),be.call(this,l)}function ke(l){_t.call(this,l),Ts.call(this,l),ve.call(this,l),xe.call(this,l)}class Ds{constructor(t){const{autoFocus:e}=t.settings;this.inputChange=()=>{},this.data=t,this.br=new pt(!0,e),this.t=new pt,this.l=new pt,this.tl=new pt,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,Wt+=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();ye.call(this,t),ke.call(this,e),this.resetOffset()}resetBRTAreaOffset(){const t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Bt.call(this,t),we.call(this,t),_t.call(this,e),ve.call(this,e),this.resetOffset()}resetBRLAreaOffset(){const t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Bt.call(this,t),be.call(this,t),_t.call(this,e),xe.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),ye.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(Nt.call(this,g)),w.showAutofill(Vt.call(this,g)),b.showAutofill(Pt.call(this,g)),x.showAutofill(g)}}hideAutofill(){["br","l","t","tl"].forEach(t=>{this[t].hideAutofill()})}showClipboard(){const t=this.data.getClipboardRect();ke.call(this,t),["br","l","t","tl"].forEach(e=>{this[e].showClipboard()})}hideClipboard(){["br","l","t","tl"].forEach(t=>{this[t].hideClipboard()})}}function Os(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 As(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 Ce(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 zs(l){const{keyCode:t}=l;switch(l.ctrlKey&&l.stopPropagation(),t){case 37:l.stopPropagation();break;case 38:Os.call(this,l);break;case 39:l.stopPropagation();break;case 40:As.call(this,l);break;case 13:Ce.call(this,l);break;case 9:Ce.call(this,l);break;default:l.stopPropagation();break}}class Ee{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(),tt(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(),nt(s.parent(),()=>{this.hide()})}bindInputEvents(t){t.on("keydown",e=>zs.call(this,e))}}class D extends Y{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 Se(l,t){l.setMonth(l.getMonth()+t)}function Is(l,t){const e=new Date(l);return e.setDate(t-l.getDay()+1),e}function Rs(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=Is(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 Fs{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;Se(t,-1),this.buildAll()}next(){const{value:t}=this;Se(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=Rs(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 Hs{constructor(){this.calendar=new Fs(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 mt(){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 Ms({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),mt.call(this)}function Ws(l){const{keyCode:t,altKey:e}=l;t!==13&&t!==9&&l.stopPropagation(),t===13&&e&&(Ms.call(this,l,`
|
|
18
|
+
`),l.stopPropagation()),t===13&&!e&&l.preventDefault()}function Ns(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),mt.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),mt.call(this),this.change("input",t)}}function Ps(l){const{el:t}=this.textEl;setTimeout(()=>{t.focus(),t.setSelectionRange(l,l)},0)}function $e(l,t){const{textEl:e,textlineEl:s}=this;e.el.blur(),e.val(l),s.html(l),Ps.call(this,t)}function Vs(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}`}$e.call(this,this.inputText,s)}function Bs(){this.suggest.setItems(this.formulas)}function _s(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 Ls{constructor(t,e,s){this.viewFn=e,this.rowHeight=s,this.formulas=t,this.suggest=new Ee(t,i=>{Vs.call(this,i)}),this.datepicker=new Hs,this.datepicker.change(i=>{this.setText(_s(i)),this.clear()}),this.areaEl=u("div",`${m}-editor-area`).children(this.textEl=u("textarea","").on("input",i=>Ns.call(this,i)).on("paste.stop",()=>{}).on("keydown",i=>Ws.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(""),Bs.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,$e.call(this,t,t.length),mt.call(this)}}class K extends Y{constructor(t,e=""){super("div",`${m}-button ${e}`),this.child(T(`button.${t}`))}}function wt(){return window.devicePixelRatio||1}function Lt(){return wt()-.5}function y(l){return parseInt(l*wt(),10)}function et(l){const t=y(l);return t>0?t-.5:.5}class qs{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 Te(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 De{constructor(t,e,s){this.el=t,this.ctx=t.getContext("2d"),this.resize(e,s),this.ctx.scale(wt(),wt())}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&&Te.call(this,"strike",f,x,r,o,c.size,v),a&&Te.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=Lt,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(et(s),et(i));for(let n=1;n<t.length;n+=1){const[r,o]=t[n];e.lineTo(et(r),et(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(et(i+1),et(n+1),y(r-2),y(o-2)),s.clip(),s.fill(),e(),s.restore()}}const Oe=[{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"}],qt=[{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 Us(l){for(let t=0;t<qt.length;t+=1){const e=qt[t];if(e.pt===l)return e.px}return l}const js=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]=L(e.pop()),[g,p]=L(e.pop());let w=0;for(let b=g;b<=a;b+=1)for(let x=p;x<=f;x+=1)e.push(V(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},Ys=(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]=L(s);return i*t(n,r)},Xs=(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(X("+",i.pop(),c))}else if(r==="-")if(i.length===1){const c=i.pop();i.push(X("*",c,-1))}else{const c=i.pop();i.push(X("-",i.pop(),c))}else if(r==="*")i.push(X("*",i.pop(),i.pop()));else if(r==="/"){const c=i.pop();i.push(X("/",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(Ys(r,e)),s.pop()}}return i[0]},Ae=(l,t,e,s=[])=>{if(l[0]==="="){const i=js(l.substring(1));return i.length<=0?l:Xs(i,t,(n,r)=>Ae(e(n,r),t,e,s),s)}return l},Ks={render:Ae},Ut=[{key:"SUM",title:E("formula.sum"),render:l=>l.reduce((t,e)=>X("+",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("")}],Zs=Ut,ze={};Ut.forEach(l=>{ze[l.key]=l});const st=l=>l,bt=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},rt=[{key:"normal",title:E("format.normal"),type:"string",render:st},{key:"text",title:E("format.text"),type:"string",render:st},{key:"number",title:E("format.number"),type:"number",label:"1,000.12",render:bt},{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=>`¥${bt(l)}`},{key:"usd",title:E("format.usd"),type:"number",label:"$10.00",render:l=>`$${bt(l)}`},{key:"eur",title:E("format.eur"),type:"number",label:"€10.00",render:l=>`€${bt(l)}`},{key:"date",title:E("format.date"),type:"date",label:"26/09/2008",render:st},{key:"time",title:E("format.time"),type:"date",label:"15:59:00",render:st},{key:"datetime",title:E("format.datetime"),type:"date",label:"26/09/2008 15:59:00",render:st},{key:"duration",title:E("format.duration"),type:"date",label:"24:01:00",render:st}],Ie={};rt.forEach(l=>{Ie[l.key]=l});const Js=5,Gs={fillStyle:"#f4f5f8"},Qs={fillStyle:"#fff",lineWidth:Lt,strokeStyle:"#e6e6e6"};function ti(){return{textAlign:"center",textBaseline:"middle",font:`500 ${y(12)}px Source Sans Pro`,fillStyle:"#585757",lineWidth:Lt(),strokeStyle:"#e6e6e6"}}function Re(l,t,e,s=0){const{left:i,top:n,width:r,height:o}=l.cellRect(t,e);return new qs(i,n+s,r,o,Js)}function xt(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=Re(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=Ks.render(h.text||"",ze,(b,x)=>t.getCellTextOrDefault(x,b)),a.format&&(g=Ie[a.format].render(g));const p=Object.assign({},a.font);p.size=Us(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 ei(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=Re(t,n,r);e.dropdown(o)})}}function vt(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)=>{xt(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))xt(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(),ei.call(this,l),n.restore()}function Fe(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 yt(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(Gs),(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(ti()),(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&&Fe.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&&Fe.call(this,v,0,C,s),r.fillText(se(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 si(l,t){const{draw:e}=this;e.save(),e.attr({fillStyle:"#f4f5f8"}).fillRect(0,0,l,t),e.restore()}function kt({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(Qs).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 ii(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 li{constructor(t,e){this.el=t,this.draw=new De(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;kt.call(this,r,i,n,o,c),vt.call(this,r,i,n,-h,-d),yt.call(this,"all",r,i,n,o,c),si.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,kt.call(this,p,i,n,o,0),vt.call(this,p,i,n,-h,0),yt.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,kt.call(this,p,i,n,0,c),yt.call(this,"left",p,i,n,0,c),vt.call(this,p,i,n,0,-d)}const g=t.freezeViewRange();kt.call(this,g,i,n,0,0),yt.call(this,"all",g,i,n,0,0),vt.call(this,g,i,n,0,0),ii.call(this,i,n,o,c)}}clear(){this.draw.clear()}}const Ct=[["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]],jt=["landscape","portrait"];function Et(l){return parseInt(96*l,10)}function He(l){l==="cancel"?this.el.hide():this.toPrint()}function ni(l){const{paper:t}=this,{value:e}=l.target,s=Ct[e];t.w=Et(s[1]),t.h=Et(s[2]),this.preview()}function ri(l){const{paper:t}=this,{value:e}=l.target,s=jt[e];t.orientation=s,this.preview()}let oi=class{constructor(t){this.paper={w:Et(Ct[0][1]),h:Et(Ct[0][2]),padding:50,orientation:jt[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 K("cancel").on("click",He.bind(this,"cancel")),new K("next","primary").on("click",He.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(...Ct.map((e,s)=>u("option","").attr("value",s).child(`${e[0]} ( ${e[1]}''x${e[2]}'' )`))).on("change",ni.bind(this))),u("fieldset","").children(u("label","").child(`${T("print.orientation")}`),u("select","").children(...jt.map((e,s)=>u("option","").attr("value",s).child(`${T("print.orientations")[s]}`))).on("change",ri.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 De(k.el,s,i);for(S.save(),S.translate(a,f),d<1&&S.scale(d,d);g<=c.eri;g+=1){const H=t.rows.getHeight(g);if(x+=H,x<o)for(let R=0;R<=c.eci;R+=1)xt(S,t,g,R,p),w.eci=R;else{C=-(x-H);break}}w.eri=g,S.restore(),S.save(),S.translate(a,f),d<1&&S.scale(d,d);const P=p;t.eachMergesInView(w,({sri:H,sci:R})=>{xt(S,t,H,R,P)}),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 ci=[{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 hi(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 ai(){return ci.map(l=>hi.call(this,l))}let di=class{constructor(t,e=!1){this.menuItems=ai.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(),tt(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"),nt(s)}};function fi(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`),O(t,"mouseleave",()=>{document.body.contains(r.el)&&document.body.removeChild(r.el)}),O(t,"click",()=>{document.body.contains(r.el)&&document.body.removeChild(r.el)})}class St{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&&fi(this.tip,e.target)}).attr("data-tooltip",t)}setState(){}}class M extends St{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 W extends Y{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(),nt(this.parent(),()=>{this.hide()})}hide(){this.parent().active(!1),this.contentEl.hide(),tt(this.parent())}}function ui(l){return u("div",`${m}-item`).child(new D(l))}class Me extends W{constructor(t,e){const s=new D(`align-${e}`),i=t.map(n=>ui(`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 gi extends M{constructor(t){super("align","",t)}dropdown(){const{value:t}=this;return new Me(["left","center","right"],t)}}class pi extends M{constructor(t){super("valign","",t)}dropdown(){const{value:t}=this;return new Me(["top","middle","bottom"],t)}}class B extends St{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 mi extends B{constructor(){super("autofilter")}setState(){}}class wi extends B{constructor(){super("font-bold","Ctrl+B")}}class bi extends B{constructor(){super("font-italic","Ctrl+I")}}class xi extends B{constructor(){super("strike","Ctrl+U")}}class vi extends B{constructor(){super("underline","Ctrl+U")}}const yi=["#ffffff","#000100","#e7e5e6","#445569","#5b9cd6","#ed7d31","#a5a5a5","#ffc001","#4371c6","#71ae47"],ki=[["#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"]],Ci=["#c00000","#fe0000","#fdc101","#ffff01","#93d051","#00b04e","#01b0f1","#0170c1","#012060","#7030a0"];function Yt(l){return u("td","").child(u("div",`${m}-color-palette-cell`).on("click.stop",()=>this.change(l)).css("background-color",l))}class Ei{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(...yi.map(e=>Yt.call(this,e))),...ki.map(e=>u("tr",`${m}-theme-colors`).children(...e.map(s=>Yt.call(this,s)))),u("tr",`${m}-standard-colors`).children(...Ci.map(e=>Yt.call(this,e)))));this.el.child(t)}}class Xt extends W{constructor(t,e){const s=new D(t).css("height","16px").css("border-bottom",`3px solid ${e}`),i=new Ei;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 Si=[["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 $i extends W{constructor(t){const e=new D("line-type");let s=0;const i=Si.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 We(...l){return u("table","").child(u("tbody","").children(...l))}function Ne(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 Ti{constructor(){this.color="#000",this.style="thin",this.mode="all",this.change=()=>{},this.ddColor=new Xt("line-color",this.color),this.ddColor.change=e=>{this.color=e},this.ddType=new $i(this.style),this.ddType.change=([e])=>{this.style=e},this.el=u("div",`${m}-border-palette`);const t=We(u("tr","").children(u("td",`${m}-border-palette-left`).child(We(u("tr","").children(...["all","inside","horizontal","vertical","outside"].map(e=>Ne.call(this,e))),u("tr","").children(...["left","top","right","bottom","none"].map(e=>Ne.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 Di extends W{constructor(){const t=new D("border-all"),e=new Ti;e.change=s=>{this.change(s),this.hide()},super(t,"auto",!1,"bottom-left",e.el)}}class Oi extends M{constructor(){super("border")}dropdown(){return new Di}}class $t extends St{element(){return super.element().child(new D(this.tag)).on("click",()=>this.change(this.tag))}setState(t){this.el.disabled(t)}}class Ai extends $t{constructor(){super("clearformat")}}class zi extends B{constructor(){super("paintformat")}setState(){}}class Ii extends M{constructor(t){super("color",void 0,t)}dropdown(){const{tag:t,value:e}=this;return new Xt(t,e)}}class Ri extends M{constructor(t){super("bgcolor",void 0,t)}dropdown(){const{tag:t,value:e}=this;return new Xt(t,e)}}class Fi extends W{constructor(){const t=qt.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 Hi=class extends M{constructor(){super("font-size")}getValue(t){return t.pt}dropdown(){return new Fi}};class Mi extends W{constructor(){const t=Oe.map(e=>u("div",`${m}-item`).on("click",()=>{this.setTitle(e.title),this.change(e)}).child(e.title));super(Oe[0].title,"160px",!0,"bottom-left",...t)}}class Wi extends M{constructor(){super("font-name")}getValue(t){return t.key}dropdown(){return new Mi}}class Ni extends W{constructor(){let t=rt.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<rt.length;e+=1)rt[e].key===t&&this.title.html(rt[e].title());this.hide()}}let Pi=class extends M{constructor(){super("format")}getValue(t){return t.key}dropdown(){return new Ni}};class Vi extends W{constructor(){const t=Ut.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 Bi extends M{constructor(){super("formula")}getValue(t){return t.key}dropdown(){return new Vi}}class _i extends B{constructor(){super("freeze")}}class Li extends B{constructor(){super("merge")}setState(t,e){this.el.active(t).disabled(e)}}class qi extends $t{constructor(){super("redo","Ctrl+Y")}}class Ui extends $t{constructor(){super("undo","Ctrl+Z")}}class ji extends $t{constructor(){super("print","Ctrl+P")}}class Yi extends B{constructor(){super("textwrap")}}let Xi=class extends W{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 Ki extends M{constructor(){super("more"),this.el.hide()}dropdown(){return new Xi}show(){this.el.show()}hide(){this.el.hide()}}function q(){return u("div",`${m}-toolbar-divider`)}function Zi(){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 Pe(){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 Ve(l){const t=new St;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 Ji{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 Ui,this.redoEl=new qi,new ji,this.paintformatEl=new zi,this.clearformatEl=new Ai],q(),[this.formatEl=new Pi],q(),[this.fontEl=new Wi,this.fontSizeEl=new Hi],q(),[this.boldEl=new wi,this.italicEl=new bi,this.underlineEl=new vi,this.strikeEl=new xi,this.textColorEl=new Ii(i.color)],q(),[this.fillColorEl=new Ri(i.bgcolor),this.borderEl=new Oi,this.mergeEl=new Li],q(),[this.alignEl=new gi(i.align),this.valignEl=new pi(i.valign),this.textwrapEl=new Yi],q(),[this.freezeEl=new _i,this.autofilterEl=new mi,this.formulaEl=new Bi]];const{extendToolbar:n={}}=t.settings;if(n.left&&n.left.length>0){this.items.unshift(q());const r=n.left.map(Ve.bind(this));this.items.unshift(r)}if(n.right&&n.right.length>0){this.items.push(q());const r=n.right.map(Ve.bind(this));this.items.push(r)}this.items.push([this.moreEl=new Ki]),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(()=>{Zi.call(this),Pe.call(this)},0),O(window,"resize",()=>{Pe.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 Gi{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()},O(window,"keydown",window.xkeydownEsc)}hide(){this.el.hide(),document.body.removeChild(this.dimmer.el),ut(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}class it{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 Kt{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 Ee(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 Qi={number:/(^\d+$)|(^\d+(\.\d{0,4})?$)/,date:/^\d{4}-\d{1,2}-\d{1,2}$/};class U{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||Qi[e.type]).test(n)?(s.html(T("validation.notMatch")),i.addClass("error"),!1):(i.removeClass("error"),!0)}}const Be=100;class tl extends Gi{constructor(){const t=new U(new Kt("cell",["cell"],"100%",h=>T(`dataValidation.modeType.${h}`)),{required:!0},`${T("dataValidation.range")}:`,Be),e=new U(new it("120px","E3 or E3:F12"),{required:!0,pattern:/^([A-Z]{1,2}[1-9]\d*)(:[A-Z]{1,2}[1-9]\d*)?$/}),s=new U(new Kt("list",["list","number","date","phone","email"],"100%",h=>T(`dataValidation.type.${h}`),h=>this.criteriaSelected(h)),{required:!0},`${T("dataValidation.criteria")}:`,Be),i=new U(new Kt("be",["be","nbe","eq","neq","lt","lte","gt","gte"],"160px",h=>T(`dataValidation.operator.${h}`),h=>this.criteriaOperatorSelected(h)),{required:!0}).hide(),n=new U(new it("70px","10"),{required:!0}).hide(),r=new U(new it("70px","100"),{required:!0,type:"number"}).hide(),o=new U(new it("120px","a,b,c"),{required:!0}),c=new U(new it("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 K("cancel").on("click",()=>this.btnClick("cancel")),new K("remove").on("click",()=>this.btnClick("remove")),new K("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 _e(l){return u("div",`${m}-item ${l}`)}function Le(l){return _e("state").child(T(`sort.${l}`)).on("click.stop",()=>this.itemClick(l))}function el(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 qe(){const{filterhEl:l,filterValues:t,values:e}=this;l.html(`${t.length} / ${e.length}`),l.checked(t.length===e.length)}class sl{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=Le.call(this,"asc"),this.sortDescEl=Le.call(this,"desc"),_e("divider"),u("div",`${m}-filter`).children(this.filterhEl,this.filterbEl),u("div",`${m}-buttons`).children(new K("cancel").on("click",()=>this.btnClick("cancel")),new K("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),qe.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),el.call(this,e,s),qe.call(this)}setOffset(t){this.el.offset(t).show();let e=1;nt(this.el,()=>{e<=0&&this.hide(),e-=1})}show(){this.el.show()}hide(){this.el.hide(),tt(this.el)}}function Ue(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 Zt(l,t){let e;return(...s)=>{const i=this,n=s;e||(e=setTimeout(()=>{e=null,l.apply(i,n)},t))}}function il(){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 Z(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 N(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]),Z.call(this,l,r,o),il.call(this)}function ll(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 nl(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)&&Zt(a(l.detail),50),w===p&&Zt(f(h),50),w===g&&Zt(a(c),50)}function rl(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 Jt(){const{data:l,verticalScrollbar:t}=this,{height:e}=this.getTableOffset(),s=l.exceptRowTotalHeight(0,-1);t.set(e,l.rows.totalHeight()-s)}function Gt(){const{data:l,horizontalScrollbar:t}=this,{width:e}=this.getTableOffset();l&&t.set(e,l.cols.totalWidth())}function ol(){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 A(){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`),Jt.call(this),Gt.call(this),ol.call(this),s.render(),i.reset(),n.reset()}function ot(){const{data:l,selector:t}=this;l.clearClipboard(),t.hideClipboard()}function Qt(l){const{data:t,selector:e}=this;t.settings.mode!=="read"&&(t.copy(),t.copyToSystemClipboard(l),e.showClipboard())}function je(){const{data:l,selector:t}=this;l.settings.mode!=="read"&&(l.cut(),t.showClipboard())}function ct(l,t){const{data:e}=this;if(e.settings.mode!=="read"){if(e.clipboard.isClear()){const s=()=>A.call(this),i=n=>{this.trigger("pasted-clipboard",n)};e.pasteFromSystemClipboard(s,i)}else if(e.paste(l,s=>Ue("Tip",s)))A.call(this);else if(t){const s=t.clipboardData.getData("text/plain");this.data.pasteFromText(s),A.call(this)}}}function cl(){this.data.hideRowsOrCols(),A.call(this)}function Ye(l,t){this.data.unhideRowsOrCols(l,t),A.call(this)}function hl(){const{data:l}=this;l.autofilter(),A.call(this)}function al(){const{toolbar:l}=this;l.paintformatActive()&&(ct.call(this,"format"),ot.call(this),l.paintformatToggle())}function Xe(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):Z.call(this,!1,g,p),ue(window,b=>{({ri:g,ci:p}=e.getCellRectByXY(b.offsetX,b.offsetY)),o?t.showAutofill(g,p):b.buttons===1&&!b.shiftKey&&Z.call(this,!0,g,p,!0,!0)},()=>{o&&t.arange&&e.settings.mode!=="read"&&e.autofill(t.arange,"all",b=>Ue("Tip",b))&&s.render(),t.hideAutofill(),al.call(this)})),!o&&l.buttons===1&&l.shiftKey&&Z.call(this,!0,g,p)}function ht(){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 at(){const{editor:l,data:t}=this;t.settings.mode!=="read"&&(ht.call(this),l.setCell(t.getSelectedCell(),t.getSelectedValidator()),ot.call(this))}function dl(l){const{data:t,table:e,selector:s}=this;t.scrolly(l,()=>{s.resetBRLAreaOffset(),ht.call(this),e.render()})}function fl(l){const{data:t,table:e,selector:s}=this;t.scrollx(l,()=>{s.resetBRTAreaOffset(),ht.call(this),e.render()})}function ul(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(),Jt.call(this),ht.call(this)}function gl(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(),Gt.call(this),ht.call(this)}function te(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 Tt(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),ot.call(this),A.call(this))}function pl(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?Qt.call(this):ot.call(this);else if(l==="clearformat")Tt.call(this,"delete-cell-format");else if(l!=="link"){if(l!=="chart")if(l==="autofilter")hl.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()&&at.call(this),A.call(this)}}function ml(l,t,e,s){this.data.setAutoFilter(l,t,e,s),A.call(this)}function wl(){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=>{ll.call(this,a)}).on("mousedown",a=>{r.clear(),o.hide(),a.buttons===2?(this.data.xyInSelectedRect(a.offsetX,a.offsetY)||Xe.call(this,a),o.setPosition(a.offsetX,a.offsetY),a.stopPropagation()):a.detail===2?at.call(this):Xe.call(this,a)}).on("mousewheel.stop",a=>{nl.call(this,a)}).on("mouseout",a=>{const{offsetX:f,offsetY:g}=a;g<=0&&s.hide(),f<=0&&e.hide()}),l.inputChange=a=>{te.call(this,a,"input"),at.call(this)},Es(t.el,{move:(a,f)=>{rl.call(this,a,f)}}),c.change=(a,f)=>pl.call(this,a,f),d.ok=(a,f,g,p)=>ml.call(this,a,f,g,p),e.finishedFn=(a,f)=>{ul.call(this,a,f)},s.finishedFn=(a,f)=>{gl.call(this,a,f)},e.unhideFn=a=>{Ye.call(this,"row",a)},s.unhideFn=a=>{Ye.call(this,"col",a)},i.moveFn=(a,f)=>{dl.call(this,a,f)},n.moveFn=(a,f)=>{fl.call(this,a,f)},r.change=(a,f)=>{te.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"?Qt.call(this):a==="cut"?je.call(this):a==="paste"?ct.call(this,"all"):a==="paste-value"?ct.call(this,"text"):a==="paste-format"?ct.call(this,"format"):a==="hide"?cl.call(this):Tt.call(this,a)},O(window,"resize",()=>{this.reload()}),O(window,"click",a=>{this.focusing=t.contains(a.target)}),O(window,"paste",a=>{this.focusing&&(ct.call(this,"all",a),a.preventDefault())}),O(window,"copy",a=>{this.focusing&&(Qt.call(this,a),a.preventDefault())}),O(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:je.call(this),a.preventDefault();break;case 85:c.trigger("underline"),a.preventDefault();break;case 86:break;case 37:N.call(this,w,"row-first"),a.preventDefault();break;case 38:N.call(this,w,"col-first"),a.preventDefault();break;case 39:N.call(this,w,"row-last"),a.preventDefault();break;case 40:N.call(this,w,"col-last"),a.preventDefault();break;case 32:Z.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&&Z.call(this,!1,this.data.selector.ri,-1,!1);break;case 27:o.hide(),ot.call(this);break;case 37:N.call(this,w,"left"),a.preventDefault();break;case 38:N.call(this,w,"up"),a.preventDefault();break;case 39:N.call(this,w,"right"),a.preventDefault();break;case 40:N.call(this,w,"down"),a.preventDefault();break;case 9:r.clear(),N.call(this,!1,w?"left":"right"),a.preventDefault();break;case 13:r.clear(),N.call(this,!1,w?"up":"down"),a.preventDefault();break;case 8:Tt.call(this,"delete-cell-text"),a.preventDefault();break}g==="Delete"?(Tt.call(this,"delete-cell-text"),a.preventDefault()):f>=65&&f<=90||f>=48&&f<=57||f>=96&&f<=105||a.key==="="?(te.call(this,a.key,"input"),at.call(this)):f===113&&at.call(this)}})}class bl{constructor(t,e){this.eventMap=Ss();const{view:s,showToolbar:i,showContextmenu:n}=e.settings;this.el=u("div",`${m}-sheet`),this.toolbar=new Ji(e,s.width,!i),this.print=new oi(e),t.children(this.toolbar.el,this.el,this.print.el),this.data=e,this.tableEl=u("canvas",`${m}-table`),this.rowResizer=new pe(!1,e.rows.height),this.colResizer=new pe(!0,e.cols.minWidth),this.verticalScrollbar=new me(!0),this.horizontalScrollbar=new me(!1),this.editor=new Ls(Zs,()=>this.getTableOffset(),e.rows.height),this.modalValidation=new tl,this.contextMenu=new di(()=>this.getRect(),!n),this.selector=new Ds(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 sl,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 li(this.tableEl.el,e),wl.call(this),A.call(this),Z.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,Jt.call(this),Gt.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),A.call(this),this}freeze(t,e){const{data:s}=this;return s.setFreeze(t,e),A.call(this),this}undo(){this.data.undo(),A.call(this)}redo(){this.data.redo(),A.call(this)}reload(){return A.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 xl extends W{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 vl=[{key:"delete",title:E("contextmenu.deleteSheet")}];function yl(l){return u("div",`${m}-item`).child(l.title()).on("click",()=>{this.itemClick(l.key),this.hide()})}function kl(){return vl.map(l=>yl.call(this,l))}class Cl{constructor(){this.el=u("div",`${m}-contextmenu`).css("width","160px").children(...kl.call(this)).hide(),this.itemClick=()=>{}}hide(){const{el:t}=this;t.hide(),tt(t)}setOffset(t){const{el:e}=this;e.offset(t),e.show(),nt(e)}}class El{constructor(t=()=>{},e=()=>{},s=()=>{},i=()=>{}){this.swapFunc=e,this.updateFunc=i,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new xl(n=>{this.clickSwap2(this.items[n])}),this.contextMenu=new Cl,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 it("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 Sl{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 El(()=>{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 bl(i,this.data),this.bottombar!==null&&i.child(this.bottombar.el)}addSheet(t,e=!0){const s=t||`sheet${this.sheetIndex}`,i=new Cs(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){ce(t,e)}}const Ke=(l,t={})=>new Sl(l,t);window&&(window.x_spreadsheet=Ke,window.x_spreadsheet.locale=(l,t)=>ce(l,t));const $l={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}}}}}]};function Ze(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 Tl(l){const t=(l||"").trim();if(!t)return null;try{return Ze(JSON.parse(t))}catch{return null}}let _=null,I=null,dt=null;function Je(){dt&&(dt.disconnect(),dt=null),I&&(I.remove(),I=null),_=null}function ee(l,t,e=!0){Je(),I=document.createElement("div"),I.className="excel-sheet-host",l.appendChild(I),_=Ke(I,{mode:"read",showToolbar:!1,showContextmenu:!1,showBottomBar:!1,showGrid:!0,view:{width:()=>(I==null?void 0:I.clientWidth)||1,height:()=>(I==null?void 0:I.clientHeight)||1}});try{_.loadData(t)}catch(s){if(console.warn("[excel-sheet-suite] 数据渲染失败,降级内置示例:",s),e&&t!==Dt){ee(l,Dt,!1);return}}if(typeof ResizeObserver<"u"){const s=I;dt=new ResizeObserver(()=>{!_||!s.isConnected||window.requestAnimationFrame(()=>{var i;return(i=_==null?void 0:_.reRender)==null?void 0:i.call(_)})}),dt.observe(s)}}const Dt=Ze($l)??[];if(typeof window<"u"&&window.Work)window.Work.register({mount(l){ee(l.stage,Tl(l.viewDoc)??Dt),typeof l.ready=="function"&&l.ready()},destroy(){Je()}});else{const l=()=>{const t=document.querySelector("#app")??document.body;ee(t,Dt)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",l):l()}})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"status":"ok","item":{"id":3901,"ref":"WORKS-3901","name":"Starry Nightrider · 星夜骑士","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":8,"like_count":0,"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**3D 意境骑行 · 全程序化生成 · 单机完整体验**\n\n## 玩法\n\n- 骑上自行车穿过梵高的《星月夜》街道:收集漂浮的光球,把它们送到教堂尖顶;结束查看评分与本地最佳\n- **桌面**:`WASD` 骑行 · 鼠标转向 · `左键` 交互 · `Esc` 离开画中回到小镇\n- **移动端**:触控\n- 场景与音效全部程序化生成,零资源下载;《星月夜》原画(1889)为公有领域\n\n## 在线功能说明(本站为单机离线版)\n\n原版带作者后端的在线功能——全球分数榜、小镇里的其他在线玩家、聊天与 NPC 语音。本站离线版:在线接口已打桩,榜单为空、NPC 语音停用;**骑行、收集、送达、评分的完整玩法不受影响**,最高成绩本地保留(会话级)。\n\n## 来源说明\n\n- 原作为[作者的 starrynightrider.com](https://starrynightrider.com/)(本人作品,站内署名 @ebbyamir)\n- 本上架版改造(玩法代码零改动):三个 ES 模块合并为单脚本;五张纹理内嵌为 data: URI(小屏变体别名到桌面版);在线接口打桩降级——单文件零外部请求\n- 结构:游戏文档内嵌于作品沙箱的嵌套 iframe(独立文档)运行;游戏文档内部的视口级 CSS 定位均在嵌套文档内,不参与宿主舞台坐标系\n","description_truncated":false,"description_next_offset":602,"brief":"骑进梵高的《星月夜》:收集光球送到尖顶,星夜自由骑行。","created_at":"2026-11-14T15:09:36.629465+08:00","last_published_at":"2026-11-14T15:21:57.576060+08:00","updated_at":"2026-11-14T15:21:57.574393+08:00","code_url":"/api/works/works/3901/version/2/js","has_code":true,"view":{"kind":"code"},"launch":{"type":"runtime","runtime":{"contract":"work-v1","work_ref":"WORKS-3901","code_url":"/api/works/works/3901/version/2/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}
|